@mongodb-js/mongodb-constants 0.7.1 → 0.7.2

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.
@@ -6,6 +6,7 @@ export const ADL = mod.ADL;
6
6
  export const ANY_COLLECTION_NAMESPACE = mod.ANY_COLLECTION_NAMESPACE;
7
7
  export const ANY_NAMESPACE = mod.ANY_NAMESPACE;
8
8
  export const ATLAS = mod.ATLAS;
9
+ export const ATLAS_SEARCH_TEMPLATES = mod.ATLAS_SEARCH_TEMPLATES;
9
10
  export const BSON_TYPES = mod.BSON_TYPES;
10
11
  export const BSON_TYPE_ALIASES = mod.BSON_TYPE_ALIASES;
11
12
  export const COLLECTION = mod.COLLECTION;
@@ -0,0 +1,7 @@
1
+ export type SearchTemplate = {
2
+ name: string;
3
+ snippet: string;
4
+ version: string;
5
+ };
6
+ export declare const ATLAS_SEARCH_TEMPLATES: SearchTemplate[];
7
+ //# sourceMappingURL=atlas-search-templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atlas-search-templates.d.ts","sourceRoot":"","sources":["../src/atlas-search-templates.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,cAAc,EA+GlD,CAAC"}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ATLAS_SEARCH_TEMPLATES = void 0;
7
+ const dedent_1 = __importDefault(require("dedent"));
8
+ exports.ATLAS_SEARCH_TEMPLATES = [
9
+ {
10
+ name: 'Dynamic field mappings',
11
+ snippet: (0, dedent_1.default) `{
12
+ "mappings": {
13
+ "dynamic": true
14
+ }
15
+ }`,
16
+ version: '4.4.0',
17
+ },
18
+ {
19
+ name: 'Static field mappings',
20
+ snippet: (0, dedent_1.default) `{
21
+ "mappings": {
22
+ "dynamic": false,
23
+ "fields": {
24
+ \${1:<string field name>}: {
25
+ "type": "string"
26
+ },
27
+ \${2:<number field name>}: {
28
+ "type": "number"
29
+ },
30
+ \${3:<date field name>}: {
31
+ "type": "date"
32
+ },
33
+ \${4:<geo field name>}: {
34
+ "type": "geo"
35
+ },
36
+ }
37
+ }
38
+ }`,
39
+ version: '4.4.0',
40
+ },
41
+ {
42
+ name: 'Text field mappings',
43
+ snippet: (0, dedent_1.default) `{
44
+ "mappings": {
45
+ "dynamic": true,
46
+ "fields": {
47
+ \${1:<string field name>}: [
48
+ {
49
+ // Enables text queries
50
+ "type": "string"
51
+ },
52
+ {
53
+ // Enables autocomplete queries
54
+ "type": "autocomplete"
55
+
56
+ },
57
+ {
58
+ // Enables sorting
59
+ "type": "token"
60
+ }
61
+ ]
62
+ }
63
+ }
64
+ }`,
65
+ version: '4.4.0',
66
+ },
67
+ {
68
+ name: 'Facet field mappings',
69
+ snippet: (0, dedent_1.default) `{
70
+ "mappings": {
71
+ "dynamic": true,
72
+ "fields": {
73
+ \${1:<number field name for faceting>}: [
74
+ {
75
+ "type": "numberFacet"
76
+ },
77
+ {
78
+ "type": "number"
79
+ },
80
+ ],
81
+ \${2:<date field name for faceting>}: [
82
+ {
83
+ "type": "dateFacet"
84
+ }
85
+ {
86
+ "type": "date"
87
+ }
88
+ ],
89
+ \${3:<string field name for faceting>}: [
90
+ {
91
+ "type": "stringFacet"
92
+ },
93
+ {
94
+ "type": "string",
95
+ "analyzer": "lucene.keyword"
96
+ },
97
+ ],
98
+ }
99
+ }
100
+ }`,
101
+ version: '4.4.0',
102
+ },
103
+ {
104
+ name: 'Vector Embedding field mapping',
105
+ snippet: (0, dedent_1.default) `{
106
+ "mappings": {
107
+ "dynamic": true,
108
+ "fields": {
109
+ \${1:<vector embedding field name>}: [
110
+ {
111
+ "type": "vectorEmbedding"
112
+ }
113
+ ]
114
+ }
115
+ }
116
+ }`,
117
+ version: '4.4.0',
118
+ },
119
+ ];
120
+ //# sourceMappingURL=atlas-search-templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atlas-search-templates.js","sourceRoot":"","sources":["../src/atlas-search-templates.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAQf,QAAA,sBAAsB,GAAqB;IACtD;QACE,IAAI,EAAE,wBAAwB;QAC9B,OAAO,EAAE,IAAA,gBAAM,EAAA;;;;UAIT;QACN,OAAO,EAAE,OAAO;KACjB;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,OAAO,EAAE,IAAA,gBAAM,EAAA;;;;;;;;;;;;;;;;;;UAkBT;QACN,OAAO,EAAE,OAAO;KACjB;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE,IAAA,gBAAM,EAAA;;;;;;;;;;;;;;;;;;;;;YAqBP;QACR,OAAO,EAAE,OAAO;KACjB;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,OAAO,EAAE,IAAA,gBAAM,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA+BP;QACR,OAAO,EAAE,OAAO;KACjB;IACD;QACE,IAAI,EAAE,gCAAgC;QACtC,OAAO,EAAE,IAAA,gBAAM,EAAA;;;;;;;;;;;UAWT;QACN,OAAO,EAAE,OAAO;KACjB;CACF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -11,4 +11,5 @@ export * from './stage-operators';
11
11
  export * from './system-variables';
12
12
  export { getFilteredCompletions, wrapField } from './filter';
13
13
  export type { Completion, FilterOptions as CompletionFilterOptions, } from './filter';
14
+ export * from './atlas-search-templates';
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
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"}
package/dist/index.js CHANGED
@@ -29,4 +29,5 @@ __exportStar(require("./system-variables"), exports);
29
29
  var filter_1 = require("./filter");
30
30
  Object.defineProperty(exports, "getFilteredCompletions", { enumerable: true, get: function () { return filter_1.getFilteredCompletions; } });
31
31
  Object.defineProperty(exports, "wrapField", { enumerable: true, get: function () { return filter_1.wrapField; } });
32
+ __exportStar(require("./atlas-search-templates"), exports);
32
33
  //# sourceMappingURL=index.js.map
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"}
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"}
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.7.1",
16
+ "version": "0.7.2",
17
17
  "repository": {
18
18
  "type": "git",
19
19
  "url": "https://github.com/mongodb-js/devtools-shared.git"
@@ -66,7 +66,8 @@
66
66
  "typescript": "^5.0.4"
67
67
  },
68
68
  "dependencies": {
69
+ "dedent": "^1.5.1",
69
70
  "semver": "^7.5.4"
70
71
  },
71
- "gitHead": "db3b603b83bf47643e48fedb4fc6e4f3d2261c83"
72
+ "gitHead": "665d291d3d63746a5d9d13f951f6229fe9f308dc"
72
73
  }