open-index/open-npm huggingface dataset:
npm package: @mongodb-js/search-index-schema
Description: MongoDB Atlas Search Index JSON schemas
Author: MongoDB Inc.
Latest version: 1.0.0

# @mongodb-js/search-index-schema

MongoDB Atlas Search Index JSON schemas.

This package provides JSON Schema definitions for MongoDB Atlas Search Indexes, including full-text search indexes and vector search indexes.

## Installation

```bash
npm install @mongodb-js/search-index-schema
```

## Package Structure

- **`schema/`** - source JSON schema files
- **`output/`** - bundled JSON schema files generated from source schemas with all `$ref` pointers resolved

## Schema Files

The package includes schemas for different search index types:

### Search Indexes

- `search/index_full.json` - Complete search index schema
- `search/index_jsonEditor.json` - Search index schema for use in JSON editors, which excludes metadata such as `name`, `database`, and `collectionName`

### Vector Search Indexes

- `vectorSearch/index_full.json` - Complete vector search index schema
- `vectorSearch/index_jsonEditor.json` - Vector search index schema for use in JSON editors, which excludes metadata such as `name`, `database`, and `collectionName`

## License

Apache-2.0

## Links

- [MongoDB Atlas Search Documentation](https://www.mongodb.com/docs/atlas/atlas-search/)
- [GitHub Repository](https://github.com/mongodb/mongot)
- [Issues](https://github.com/mongodb/mongot/issues)
npm package: @mongodb-js/server-version
Description: Compass Server Version
Latest version: 1.0.0

# Compass Server Version [![][travis_img]][travis_url]

> Compass Server Version Plugin

## License

Apache 2.0

[travis_img]: https://travis-ci.org/mongodb-js/compass-server-version.svg?branch=master
[travis_url]: https://travis-ci.org/mongodb-js/server-version
npm package: @mongodb-js/shell-bson-parser
Description: Parse valid MongoDB shell syntax queries
Author: MongoDB Inc
Latest version: 1.5.7

# @mongodb-js/shell-bson-parser

Parses valid MongoDB Shell queries.
This library does not validate that these queries are correct. It's focus is on parsing untrusted input. You may wish to use something like https://github.com/mongodb-js/mongodb-language-model to achieve this.

This library creates an AST from the proposed input, and then traverses this AST to check if it looks like a valid MongoDB query. If it does, the library will then evaluate the code to produce the parsed query.

This library currently supports three different modes for parsing queries:

**strict**: [default] Disallows comments and calling methods

```javascript
import parse from '@mongodb-js/shell-bson-parser';

const query = parse(
  `{
    _id: ObjectID("132323"),
    simpleCalc: 6,
    date: new Date(1578974885017)
  }`,
  { mode: 'strict' },
);

/*
  query = { _id: ObjectID("132323"), simpleCalc: 6, date: Date('1578974885017') }
*/
```

**weak**: Disallows comments, allows calling methods

```javascript
import parse from '@mongodb-js/shell-bson-parser';

const query = parse(
  `{
    _id: ObjectID("132323"),
    simpleCalc: Math.max(1,2,3) * Math.min(4,3,2)
  }`,
  { mode: 'weak' },
);

/*
  query = { _id: ObjectID("132323"), simpleCalc: 6 }
*/
```

**loose**: Supports calling methods on Math, Date and ISODate, allows comments

```javascript
import parse from '@mongodb-js/shell-bson-parser';

const query = parse(
  `{
    _id: ObjectID("132323"), // a helpful comment
    simpleCalc: Math.max(1,2,3) * Math.min(4,3,2)
  }`,
  { mode: 'loose' },
);

/*
  query = { _id: ObjectID("132323"), simpleCalc: 6 }
*/
```

The options object passed into parse has the following parameters:

```javascript
{
  mode: ('loose' || 'weak' || 'strict') // Will assign (allowMethods & allowComments) for you
  allowMethods: true, // Allow function calls, ie Date.now(), Math.Max(), (new Date()).getFullYear()
  allowComments: true, // Allow comments (// and /* */)
}
```

The flags can be set to override the default value from a given mode, ie:

```javascript
{
  mode: 'strict',
  allowComments: true
}
```

This options object will disallow method calls, but will allow comments