@mongodb-js/mongodb-constants 0.10.4 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,6 +25,7 @@ export const STAGE_OPERATORS = mod.STAGE_OPERATORS;
25
25
  export const STAGE_OPERATOR_NAMES = mod.STAGE_OPERATOR_NAMES;
26
26
  export const SYSTEM_VARIABLES = mod.SYSTEM_VARIABLES;
27
27
  export const TIME_SERIES = mod.TIME_SERIES;
28
+ export const VALIDATION_TEMPLATE = mod.VALIDATION_TEMPLATE;
28
29
  export const VIEW = mod.VIEW;
29
30
  export const getFilteredCompletions = mod.getFilteredCompletions;
30
31
  export const wrapField = mod.wrapField;
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export * from './ns';
9
9
  export * from './query-operators';
10
10
  export * from './stage-operators';
11
11
  export * from './system-variables';
12
+ export * from './validation-template';
12
13
  export { getFilteredCompletions, wrapField } from './filter';
13
14
  export type { Completion, FilterOptions as CompletionFilterOptions, } from './filter';
14
15
  export * from './atlas-search-templates';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,OAAO,CAAC;AACtB,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,MAAM,CAAC;AACrB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC7D,YAAY,EACV,UAAU,EACV,aAAa,IAAI,uBAAuB,GACzC,MAAM,UAAU,CAAC;AAClB,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,OAAO,CAAC;AACtB,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,MAAM,CAAC;AACrB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC7D,YAAY,EACV,UAAU,EACV,aAAa,IAAI,uBAAuB,GACzC,MAAM,UAAU,CAAC;AAClB,cAAc,0BAA0B,CAAC"}
package/dist/index.js CHANGED
@@ -26,6 +26,7 @@ __exportStar(require("./ns"), exports);
26
26
  __exportStar(require("./query-operators"), exports);
27
27
  __exportStar(require("./stage-operators"), exports);
28
28
  __exportStar(require("./system-variables"), exports);
29
+ __exportStar(require("./validation-template"), exports);
29
30
  var filter_1 = require("./filter");
30
31
  Object.defineProperty(exports, "getFilteredCompletions", { enumerable: true, get: function () { return filter_1.getFilteredCompletions; } });
31
32
  Object.defineProperty(exports, "wrapField", { enumerable: true, get: function () { return filter_1.wrapField; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,sDAAoC;AACpC,+CAA6B;AAC7B,yDAAuC;AACvC,wCAAsB;AACtB,yDAAuC;AACvC,gDAA8B;AAC9B,uCAAqB;AACrB,oDAAkC;AAClC,oDAAkC;AAClC,qDAAmC;AACnC,mCAA6D;AAApD,gHAAA,sBAAsB,OAAA;AAAE,mGAAA,SAAS,OAAA;AAK1C,2DAAyC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,sDAAoC;AACpC,+CAA6B;AAC7B,yDAAuC;AACvC,wCAAsB;AACtB,yDAAuC;AACvC,gDAA8B;AAC9B,uCAAqB;AACrB,oDAAkC;AAClC,oDAAkC;AAClC,qDAAmC;AACnC,wDAAsC;AACtC,mCAA6D;AAApD,gHAAA,sBAAsB,OAAA;AAAE,mGAAA,SAAS,OAAA;AAK1C,2DAAyC"}
@@ -0,0 +1,2 @@
1
+ export declare const VALIDATION_TEMPLATE = "/**\n * This is a starter template for a schema validation rule for a collection.\n * More information on schema validation rules can be found at:\n * https://www.mongodb.com/docs/manual/core/schema-validation/\n */\n{\n $jsonSchema: {\n title: \"Library.books\",\n bsonType: \"object\",\n required: [\"fieldname1\", \"fieldname2\"],\n properties: {\n fieldname1: {\n bsonType: \"string\",\n description: \"Fieldname1 must be a string\",\n },\n fieldname2: {\n bsonType: \"int\",\n description: \"Fieldname2 must be an integer\",\n },\n arrayFieldName: {\n bsonType: \"array\",\n items: {\n bsonType: \"string\"\n },\n description: \"arrayFieldName must be an array of strings\"\n },\n }\n }\n}";
2
+ //# sourceMappingURL=validation-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation-template.d.ts","sourceRoot":"","sources":["../src/validation-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,2yBA4B9B,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VALIDATION_TEMPLATE = void 0;
4
+ exports.VALIDATION_TEMPLATE = `/**
5
+ * This is a starter template for a schema validation rule for a collection.
6
+ * More information on schema validation rules can be found at:
7
+ * https://www.mongodb.com/docs/manual/core/schema-validation/
8
+ */
9
+ {
10
+ $jsonSchema: {
11
+ title: "Library.books",
12
+ bsonType: "object",
13
+ required: ["fieldname1", "fieldname2"],
14
+ properties: {
15
+ fieldname1: {
16
+ bsonType: "string",
17
+ description: "Fieldname1 must be a string",
18
+ },
19
+ fieldname2: {
20
+ bsonType: "int",
21
+ description: "Fieldname2 must be an integer",
22
+ },
23
+ arrayFieldName: {
24
+ bsonType: "array",
25
+ items: {
26
+ bsonType: "string"
27
+ },
28
+ description: "arrayFieldName must be an array of strings"
29
+ },
30
+ }
31
+ }
32
+ }`;
33
+ //# sourceMappingURL=validation-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation-template.js","sourceRoot":"","sources":["../src/validation-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BjC,CAAC"}
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "email": "compass@mongodb.com"
14
14
  },
15
15
  "homepage": "https://github.com/mongodb-js/devtools-shared",
16
- "version": "0.10.4",
16
+ "version": "0.11.0",
17
17
  "repository": {
18
18
  "type": "git",
19
19
  "url": "https://github.com/mongodb-js/devtools-shared.git"
@@ -68,5 +68,5 @@
68
68
  "dependencies": {
69
69
  "semver": "^7.5.4"
70
70
  },
71
- "gitHead": "a9d22fc630a8781e9184f09c9ff818a758abbc86"
71
+ "gitHead": "791575a1f20c3daa4701fe8a46120158cf8cadc0"
72
72
  }