@mongodb-js/mongodb-constants 0.8.0 → 0.8.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.
- package/dist/filter.d.ts +71 -9
- package/dist/filter.d.ts.map +1 -1
- package/dist/filter.js +5 -5
- package/dist/filter.js.map +1 -1
- package/dist/system-variables.d.ts +71 -8
- package/dist/system-variables.d.ts.map +1 -1
- package/dist/system-variables.js.map +1 -1
- package/package.json +2 -2
package/dist/filter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const ALL_CONSTANTS: ({
|
|
1
|
+
export declare const ALL_CONSTANTS: ({
|
|
2
2
|
readonly name: "$accumulator";
|
|
3
3
|
readonly value: "$accumulator";
|
|
4
4
|
readonly score: 1;
|
|
@@ -2252,12 +2252,75 @@ declare const ALL_CONSTANTS: ({
|
|
|
2252
2252
|
readonly comment: "/**\n * users: Optional list of users for which local sessions need to be returned.\n * allUsers: Optional boolean value to specify whether to return local sessions for all users or not.\n */\n";
|
|
2253
2253
|
readonly snippet: "{\n allUsers: ${1:false},\n users: [\n { user: '${2:string}', db: '${3:string}' }\n ]\n}";
|
|
2254
2254
|
} | {
|
|
2255
|
-
name:
|
|
2256
|
-
value:
|
|
2257
|
-
score:
|
|
2258
|
-
meta:
|
|
2259
|
-
version:
|
|
2260
|
-
description:
|
|
2255
|
+
readonly name: "$$NOW";
|
|
2256
|
+
readonly value: "$$NOW";
|
|
2257
|
+
readonly score: 1;
|
|
2258
|
+
readonly meta: "variable:system";
|
|
2259
|
+
readonly version: "4.2.0";
|
|
2260
|
+
readonly description: "A variable that returns the current datetime value. NOW returns the same value for all members of the deployment and remains the same throughout all stages of the aggregation pipeline.";
|
|
2261
|
+
} | {
|
|
2262
|
+
readonly name: "$$CLUSTER_TIME";
|
|
2263
|
+
readonly value: "$$CLUSTER_TIME";
|
|
2264
|
+
readonly score: 1;
|
|
2265
|
+
readonly meta: "variable:system";
|
|
2266
|
+
readonly version: "4.2.0";
|
|
2267
|
+
readonly description: "A variable that returns the current timestamp value. CLUSTER_TIME is only available on replica sets and sharded clusters. CLUSTER_TIME returns the same value for all members of the deployment and remains the same throughout all stages of the pipeline.";
|
|
2268
|
+
} | {
|
|
2269
|
+
readonly name: "$$ROOT";
|
|
2270
|
+
readonly value: "$$ROOT";
|
|
2271
|
+
readonly score: 1;
|
|
2272
|
+
readonly meta: "variable:system";
|
|
2273
|
+
readonly version: "2.4.0";
|
|
2274
|
+
readonly description: "References the root document, i.e. the top-level document, currently being processed in the aggregation pipeline stage.";
|
|
2275
|
+
} | {
|
|
2276
|
+
readonly name: "$$CURRENT";
|
|
2277
|
+
readonly value: "$$CURRENT";
|
|
2278
|
+
readonly score: 1;
|
|
2279
|
+
readonly meta: "variable:system";
|
|
2280
|
+
readonly version: "2.4.0";
|
|
2281
|
+
readonly description: "References the start of the field path being processed in the aggregation pipeline stage. Unless documented otherwise, all stages start with CURRENT the same as ROOT. CURRENT is modifiable. However, since `$<field>` is equivalent to `$$CURRENT.<field>`, rebinding CURRENT changes the meaning of `$` accesses.";
|
|
2282
|
+
} | {
|
|
2283
|
+
readonly name: "$$REMOVE";
|
|
2284
|
+
readonly value: "$$REMOVE";
|
|
2285
|
+
readonly score: 1;
|
|
2286
|
+
readonly meta: "variable:system";
|
|
2287
|
+
readonly version: "3.6.0";
|
|
2288
|
+
readonly description: "A variable which evaluates to the missing value. Allows for the conditional exclusion of fields. In a `$project`, a field set to the variable REMOVE is excluded from the output.";
|
|
2289
|
+
} | {
|
|
2290
|
+
readonly name: "$$DESCEND";
|
|
2291
|
+
readonly value: "$$DESCEND";
|
|
2292
|
+
readonly score: 1;
|
|
2293
|
+
readonly meta: "variable:system";
|
|
2294
|
+
readonly version: "3.0.0";
|
|
2295
|
+
readonly description: "One of the allowed results of a `$redact` expression.";
|
|
2296
|
+
} | {
|
|
2297
|
+
readonly name: "$$PRUNE";
|
|
2298
|
+
readonly value: "$$PRUNE";
|
|
2299
|
+
readonly score: 1;
|
|
2300
|
+
readonly meta: "variable:system";
|
|
2301
|
+
readonly version: "3.0.0";
|
|
2302
|
+
readonly description: "One of the allowed results of a `$redact` expression.";
|
|
2303
|
+
} | {
|
|
2304
|
+
readonly name: "$$KEEP";
|
|
2305
|
+
readonly value: "$$KEEP";
|
|
2306
|
+
readonly score: 1;
|
|
2307
|
+
readonly meta: "variable:system";
|
|
2308
|
+
readonly version: "3.0.0";
|
|
2309
|
+
readonly description: "One of the allowed results of a `$redact` expression.";
|
|
2310
|
+
} | {
|
|
2311
|
+
readonly name: "$$SEARCH_META";
|
|
2312
|
+
readonly value: "$$SEARCH_META";
|
|
2313
|
+
readonly score: 1;
|
|
2314
|
+
readonly meta: "variable:system";
|
|
2315
|
+
readonly version: "5.0.0";
|
|
2316
|
+
readonly description: "A variable that stores the metadata results of an Atlas Search query. In all supported aggregation pipeline stages, a field set to the variable SEARCH_META returns the metadata results for the query. For an example of its usage, see Atlas Search facet and count.";
|
|
2317
|
+
} | {
|
|
2318
|
+
readonly name: "$$USER_ROLES";
|
|
2319
|
+
readonly value: "$$USER_ROLES";
|
|
2320
|
+
readonly score: 1;
|
|
2321
|
+
readonly meta: "variable:system";
|
|
2322
|
+
readonly version: "7.0.0";
|
|
2323
|
+
readonly description: "A variable that stores the role names of the authenticated user running the command.";
|
|
2261
2324
|
})[];
|
|
2262
2325
|
export type Meta = typeof ALL_CONSTANTS[number]['meta'] | 'field:identifier' | 'field:reference';
|
|
2263
2326
|
export type Completion = {
|
|
@@ -2287,11 +2350,10 @@ export type FilterOptions = {
|
|
|
2287
2350
|
name: string;
|
|
2288
2351
|
description?: string;
|
|
2289
2352
|
})[];
|
|
2290
|
-
meta?: (Meta | 'field:*' | 'accumulator:*' | 'expr:*')[];
|
|
2353
|
+
meta?: (Meta | 'field:*' | 'accumulator:*' | 'expr:*' | 'variable:*')[];
|
|
2291
2354
|
stage?: StageFilterOptions;
|
|
2292
2355
|
};
|
|
2293
2356
|
export declare function createConstantFilter({ meta: filterMeta, serverVersion, stage: filterStage, }?: Pick<FilterOptions, 'meta' | 'serverVersion' | 'stage'>): (completion: Completion) => boolean;
|
|
2294
2357
|
export declare function wrapField(field: string, force?: boolean): string;
|
|
2295
2358
|
export declare function getFilteredCompletions(options?: FilterOptions, constants?: Completion[]): Completion[];
|
|
2296
|
-
export {};
|
|
2297
2359
|
//# sourceMappingURL=filter.d.ts.map
|
package/dist/filter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../src/filter.ts"],"names":[],"mappings":"AAWA,
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../src/filter.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ist/filter.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFilteredCompletions = exports.wrapField = exports.createConstantFilter = void 0;
|
|
3
|
+
exports.getFilteredCompletions = exports.wrapField = exports.createConstantFilter = exports.ALL_CONSTANTS = void 0;
|
|
4
4
|
const semver_1 = require("semver");
|
|
5
5
|
const accumulators_1 = require("./accumulators");
|
|
6
6
|
const bson_type_aliases_1 = require("./bson-type-aliases");
|
|
@@ -11,7 +11,7 @@ const json_schema_1 = require("./json-schema");
|
|
|
11
11
|
const query_operators_1 = require("./query-operators");
|
|
12
12
|
const stage_operators_1 = require("./stage-operators");
|
|
13
13
|
const system_variables_1 = require("./system-variables");
|
|
14
|
-
|
|
14
|
+
exports.ALL_CONSTANTS = [
|
|
15
15
|
...accumulators_1.ACCUMULATORS,
|
|
16
16
|
...bson_types_1.BSON_TYPES,
|
|
17
17
|
...bson_type_aliases_1.BSON_TYPE_ALIASES,
|
|
@@ -41,11 +41,11 @@ function isIn(val, set) {
|
|
|
41
41
|
return val.some((v) => set.includes(v));
|
|
42
42
|
}
|
|
43
43
|
function satisfiesVersion(v1, v2) {
|
|
44
|
-
const isGTECheck = /^\d
|
|
44
|
+
const isGTECheck = /^\d+\.\d+\.\d+$/.test(v2);
|
|
45
45
|
return (0, semver_1.satisfies)(v1, isGTECheck ? `>=${v2}` : v2);
|
|
46
46
|
}
|
|
47
47
|
function createConstantFilter({ meta: filterMeta, serverVersion = DEFAULT_SERVER_VERSION, stage: filterStage = {}, } = {}) {
|
|
48
|
-
const currentServerVersion = /^(?<version>\d
|
|
48
|
+
const currentServerVersion = /^(?<version>\d+\.\d+\.\d+)/.exec(serverVersion)?.groups?.version ??
|
|
49
49
|
DEFAULT_SERVER_VERSION;
|
|
50
50
|
return ({ version: minServerVersion, meta, env, namespace, apiVersions }) => {
|
|
51
51
|
return (satisfiesVersion(currentServerVersion, minServerVersion) &&
|
|
@@ -82,7 +82,7 @@ function normalizeField(field) {
|
|
|
82
82
|
description: field.description,
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
function getFilteredCompletions(options = {}, constants = ALL_CONSTANTS) {
|
|
85
|
+
function getFilteredCompletions(options = {}, constants = exports.ALL_CONSTANTS) {
|
|
86
86
|
const { serverVersion = DEFAULT_SERVER_VERSION, fields = [], meta, stage, } = options;
|
|
87
87
|
const completionsFilter = createConstantFilter({
|
|
88
88
|
serverVersion,
|
package/dist/filter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../src/filter.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,iDAA8C;AAC9C,2DAAwD;AACxD,6CAA0C;AAC1C,iEAA8D;AAC9D,iEAA8D;AAC9D,+CAA4C;AAC5C,uDAAoD;AACpD,uDAAoD;AACpD,yDAAsD;
|
|
1
|
+
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../src/filter.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,iDAA8C;AAC9C,2DAAwD;AACxD,6CAA0C;AAC1C,iEAA8D;AAC9D,iEAA8D;AAC9D,+CAA4C;AAC5C,uDAAoD;AACpD,uDAAoD;AACpD,yDAAsD;AAEzC,QAAA,aAAa,GAAG;IAC3B,GAAG,2BAAY;IACf,GAAG,uBAAU;IACb,GAAG,qCAAiB;IACpB,GAAG,2CAAoB;IACvB,GAAG,2CAAoB;IACvB,GAAG,yBAAW;IACd,GAAG,iCAAe;IAClB,GAAG,iCAAe;IAClB,GAAG,mCAAgB;CACpB,CAAC;AAEF,MAAM,sBAAsB,GAAG,aAAa,CAAC;AAuD7C,SAAS,WAAW,CAAC,MAAgB,EAAE,IAAY;IACjD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAA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,EAAE,EAC3B,YAA0B,qBAA6B;IAEvD,MAAM,EACJ,aAAa,GAAG,sBAAsB,EACtC,MAAM,GAAG,EAAE,EACX,IAAI,EACJ,KAAK,GACN,GAAG,OAAO,CAAC;IACZ,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;QAC7C,aAAa;QACb,IAAI;QACJ,KAAK;KACN,CAAC,CAAC;IACH,MAAM,qBAAqB,GAAG,SAAS,CAAC,MAAM,CAC5C,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACvB,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QACrD,OAAO;YACL;gBACE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,kBAAkB;gBACxB,OAAO,EAAE,OAAO;gBAChB,WAAW;aACZ;YACD;gBACE,KAAK,EAAE,IAAI,KAAK,EAAE;gBAClB,IAAI,EAAE,iBAAiB;gBACvB,OAAO,EAAE,OAAO;gBAChB,WAAW;aACZ;SACF,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;IAEF,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE;QACjD,OAAO,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC;AAtCD,wDAsCC"}
|
|
@@ -1,10 +1,73 @@
|
|
|
1
|
-
declare const SYSTEM_VARIABLES: {
|
|
2
|
-
name:
|
|
3
|
-
value:
|
|
4
|
-
score:
|
|
5
|
-
meta:
|
|
6
|
-
version:
|
|
7
|
-
description:
|
|
8
|
-
}
|
|
1
|
+
declare const SYSTEM_VARIABLES: readonly [{
|
|
2
|
+
readonly name: "$$NOW";
|
|
3
|
+
readonly value: "$$NOW";
|
|
4
|
+
readonly score: 1;
|
|
5
|
+
readonly meta: "variable:system";
|
|
6
|
+
readonly version: "4.2.0";
|
|
7
|
+
readonly description: "A variable that returns the current datetime value. NOW returns the same value for all members of the deployment and remains the same throughout all stages of the aggregation pipeline.";
|
|
8
|
+
}, {
|
|
9
|
+
readonly name: "$$CLUSTER_TIME";
|
|
10
|
+
readonly value: "$$CLUSTER_TIME";
|
|
11
|
+
readonly score: 1;
|
|
12
|
+
readonly meta: "variable:system";
|
|
13
|
+
readonly version: "4.2.0";
|
|
14
|
+
readonly description: "A variable that returns the current timestamp value. CLUSTER_TIME is only available on replica sets and sharded clusters. CLUSTER_TIME returns the same value for all members of the deployment and remains the same throughout all stages of the pipeline.";
|
|
15
|
+
}, {
|
|
16
|
+
readonly name: "$$ROOT";
|
|
17
|
+
readonly value: "$$ROOT";
|
|
18
|
+
readonly score: 1;
|
|
19
|
+
readonly meta: "variable:system";
|
|
20
|
+
readonly version: "2.4.0";
|
|
21
|
+
readonly description: "References the root document, i.e. the top-level document, currently being processed in the aggregation pipeline stage.";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "$$CURRENT";
|
|
24
|
+
readonly value: "$$CURRENT";
|
|
25
|
+
readonly score: 1;
|
|
26
|
+
readonly meta: "variable:system";
|
|
27
|
+
readonly version: "2.4.0";
|
|
28
|
+
readonly description: "References the start of the field path being processed in the aggregation pipeline stage. Unless documented otherwise, all stages start with CURRENT the same as ROOT. CURRENT is modifiable. However, since `$<field>` is equivalent to `$$CURRENT.<field>`, rebinding CURRENT changes the meaning of `$` accesses.";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "$$REMOVE";
|
|
31
|
+
readonly value: "$$REMOVE";
|
|
32
|
+
readonly score: 1;
|
|
33
|
+
readonly meta: "variable:system";
|
|
34
|
+
readonly version: "3.6.0";
|
|
35
|
+
readonly description: "A variable which evaluates to the missing value. Allows for the conditional exclusion of fields. In a `$project`, a field set to the variable REMOVE is excluded from the output.";
|
|
36
|
+
}, {
|
|
37
|
+
readonly name: "$$DESCEND";
|
|
38
|
+
readonly value: "$$DESCEND";
|
|
39
|
+
readonly score: 1;
|
|
40
|
+
readonly meta: "variable:system";
|
|
41
|
+
readonly version: "3.0.0";
|
|
42
|
+
readonly description: "One of the allowed results of a `$redact` expression.";
|
|
43
|
+
}, {
|
|
44
|
+
readonly name: "$$PRUNE";
|
|
45
|
+
readonly value: "$$PRUNE";
|
|
46
|
+
readonly score: 1;
|
|
47
|
+
readonly meta: "variable:system";
|
|
48
|
+
readonly version: "3.0.0";
|
|
49
|
+
readonly description: "One of the allowed results of a `$redact` expression.";
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "$$KEEP";
|
|
52
|
+
readonly value: "$$KEEP";
|
|
53
|
+
readonly score: 1;
|
|
54
|
+
readonly meta: "variable:system";
|
|
55
|
+
readonly version: "3.0.0";
|
|
56
|
+
readonly description: "One of the allowed results of a `$redact` expression.";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "$$SEARCH_META";
|
|
59
|
+
readonly value: "$$SEARCH_META";
|
|
60
|
+
readonly score: 1;
|
|
61
|
+
readonly meta: "variable:system";
|
|
62
|
+
readonly version: "5.0.0";
|
|
63
|
+
readonly description: "A variable that stores the metadata results of an Atlas Search query. In all supported aggregation pipeline stages, a field set to the variable SEARCH_META returns the metadata results for the query. For an example of its usage, see Atlas Search facet and count.";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "$$USER_ROLES";
|
|
66
|
+
readonly value: "$$USER_ROLES";
|
|
67
|
+
readonly score: 1;
|
|
68
|
+
readonly meta: "variable:system";
|
|
69
|
+
readonly version: "7.0.0";
|
|
70
|
+
readonly description: "A variable that stores the role names of the authenticated user running the command.";
|
|
71
|
+
}];
|
|
9
72
|
export { SYSTEM_VARIABLES };
|
|
10
73
|
//# sourceMappingURL=system-variables.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-variables.d.ts","sourceRoot":"","sources":["../src/system-variables.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"system-variables.d.ts","sourceRoot":"","sources":["../src/system-variables.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwFZ,CAAC;AAEX,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-variables.js","sourceRoot":"","sources":["../src/system-variables.ts"],"names":[],"mappings":";;;AAIA,MAAM,gBAAgB,GAAG;IACvB;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,0LAA0L;KAC7L;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,6PAA6P;KAChQ;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,yHAAyH;KAC5H;IACD;QACE,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,sTAAsT;KACzT;IACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,mLAAmL;KACtL;IACD;QACE,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,uDAAuD;KACrE;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,uDAAuD;KACrE;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,uDAAuD;KACrE;IACD;QACE,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,eAAe;QACtB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,wQAAwQ;KAC3Q;IACD;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,sFAAsF;KACzF;
|
|
1
|
+
{"version":3,"file":"system-variables.js","sourceRoot":"","sources":["../src/system-variables.ts"],"names":[],"mappings":";;;AAIA,MAAM,gBAAgB,GAAG;IACvB;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,0LAA0L;KAC7L;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,6PAA6P;KAChQ;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,yHAAyH;KAC5H;IACD;QACE,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,sTAAsT;KACzT;IACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,mLAAmL;KACtL;IACD;QACE,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,uDAAuD;KACrE;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,uDAAuD;KACrE;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,uDAAuD;KACrE;IACD;QACE,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,eAAe;QACtB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,wQAAwQ;KAC3Q;IACD;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,WAAW,EACT,sFAAsF;KACzF;CACO,CAAC;AAEF,4CAAgB"}
|
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.8.
|
|
16
|
+
"version": "0.8.2",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "https://github.com/mongodb-js/devtools-shared.git"
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"dedent": "^1.5.1",
|
|
70
70
|
"semver": "^7.5.4"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "4bdafc692e5892d0e726d89af1e6ef3d478f25fc"
|
|
73
73
|
}
|