@mongodb-js/mongodb-ts-autocomplete 0.2.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.
- package/LICENSE +201 -0
- package/dist/.esm-wrapper.mjs +4 -0
- package/dist/autocompleter.d.ts +26 -0
- package/dist/autocompleter.d.ts.map +1 -0
- package/dist/autocompleter.js +133 -0
- package/dist/autocompleter.js.map +1 -0
- package/dist/autocompletion-context.d.ts +33 -0
- package/dist/autocompletion-context.d.ts.map +1 -0
- package/dist/autocompletion-context.js +54 -0
- package/dist/autocompletion-context.js.map +1 -0
- package/dist/cdt-analyser.d.ts +4 -0
- package/dist/cdt-analyser.d.ts.map +1 -0
- package/dist/cdt-analyser.js +34 -0
- package/dist/cdt-analyser.js.map +1 -0
- package/dist/fixtures/autocomplete-types.d.ts +7 -0
- package/dist/fixtures/autocomplete-types.d.ts.map +1 -0
- package/dist/fixtures/autocomplete-types.js +5 -0
- package/dist/fixtures/autocomplete-types.js.map +1 -0
- package/dist/fixtures/mql.d.ts +29 -0
- package/dist/fixtures/mql.d.ts.map +1 -0
- package/dist/fixtures/mql.js +3 -0
- package/dist/fixtures/mql.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocomplete-types.js","sourceRoot":"","sources":["../../src/fixtures/autocomplete-types.ts"],"names":[],"mappings":";;AACA,MAAM,KAAK,GAAG,EAAC,UAAU,EAAC,sl+DAAsl+D,EAAC,SAAS,EAAC,srBAAsrB,EAAC,eAAe,EAAC,8vyYAA8vyY,EAAC,CAAC;AAClkyc,kBAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface Document {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export interface Array<T> {
|
|
5
|
+
[n: number]: T;
|
|
6
|
+
}
|
|
7
|
+
export interface Cursor<T> {
|
|
8
|
+
toArray(): Array<T>;
|
|
9
|
+
first: T;
|
|
10
|
+
}
|
|
11
|
+
export type Filter<T> = T;
|
|
12
|
+
export type Project<T> = {
|
|
13
|
+
$project: {
|
|
14
|
+
[t in keyof T]: 1 | 0;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type Lookup<T, R> = {
|
|
18
|
+
$lookup: {
|
|
19
|
+
from: string;
|
|
20
|
+
localField: keyof T;
|
|
21
|
+
foreignField: keyof R;
|
|
22
|
+
as: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type Match<T> = {
|
|
26
|
+
$match: Filter<T>;
|
|
27
|
+
};
|
|
28
|
+
export type Pipeline<T> = Array<Match<T> | Project<T> | Lookup<T, any>>;
|
|
29
|
+
//# sourceMappingURL=mql.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mql.d.ts","sourceRoot":"","sources":["../../src/fixtures/mql.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,QAAQ;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,KAAK,CAAC,CAAC;IACtB,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;CAChB;AAED,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAC1B,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IACvB,QAAQ,EAAE;SACP,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI;IACzB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC,CAAC;QACtB,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI;IACrB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mql.js","sourceRoot":"","sources":["../../src/fixtures/mql.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MongoDBAutocompleter = void 0;
|
|
4
|
+
var autocompleter_1 = require("./autocompleter");
|
|
5
|
+
Object.defineProperty(exports, "MongoDBAutocompleter", { enumerable: true, get: function () { return autocompleter_1.MongoDBAutocompleter; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,iDAAuD;AAA9C,qHAAA,oBAAoB,OAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mongodb-js/mongodb-ts-autocomplete",
|
|
3
|
+
"description": "Provide MongoDB-specific autocompletion support",
|
|
4
|
+
"author": {
|
|
5
|
+
"name": "MongoDB Inc",
|
|
6
|
+
"email": "compass@mongodb.com"
|
|
7
|
+
},
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://jira.mongodb.org/projects/COMPASS/issues",
|
|
13
|
+
"email": "compass@mongodb.com"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/mongodb-js/devtools-shared",
|
|
16
|
+
"version": "0.2.0",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/mongodb-js/devtools-shared.git"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"license": "Apache-2.0",
|
|
25
|
+
"main": "dist/index.js",
|
|
26
|
+
"exports": {
|
|
27
|
+
"require": "./dist/index.js",
|
|
28
|
+
"import": "./dist/.esm-wrapper.mjs"
|
|
29
|
+
},
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"scripts": {
|
|
32
|
+
"bootstrap": "npm run compile",
|
|
33
|
+
"prepublishOnly": "npm run compile",
|
|
34
|
+
"compile": "npm run extract-types && tsc -p tsconfig.json && gen-esm-wrapper . ./dist/.esm-wrapper.mjs",
|
|
35
|
+
"typecheck": "tsc --noEmit",
|
|
36
|
+
"eslint": "eslint",
|
|
37
|
+
"prettier": "prettier",
|
|
38
|
+
"lint": "npm run eslint . && npm run prettier -- --check .",
|
|
39
|
+
"depcheck": "depcheck",
|
|
40
|
+
"check": "npm run typecheck && npm run lint && npm run depcheck",
|
|
41
|
+
"check-ci": "npm run check",
|
|
42
|
+
"test": "mocha",
|
|
43
|
+
"test-cov": "nyc -x \"**/*.spec.*\" --reporter=lcov --reporter=text --reporter=html npm run test",
|
|
44
|
+
"test-watch": "npm run test -- --watch",
|
|
45
|
+
"test-ci": "npm run test-cov",
|
|
46
|
+
"reformat": "npm run prettier -- --write .",
|
|
47
|
+
"extract-types": "ts-node scripts/extract-types.ts"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@mongodb-js/eslint-config-devtools": "0.9.11",
|
|
51
|
+
"@mongodb-js/mocha-config-devtools": "^1.0.4",
|
|
52
|
+
"@mongodb-js/prettier-config-devtools": "^1.0.1",
|
|
53
|
+
"@mongodb-js/ts-autocomplete": "^0.3.0",
|
|
54
|
+
"@mongodb-js/tsconfig-devtools": "^1.0.2",
|
|
55
|
+
"@mongosh/shell-api": "^3.11.0",
|
|
56
|
+
"@types/chai": "^4.2.21",
|
|
57
|
+
"@types/mocha": "^9.1.1",
|
|
58
|
+
"@types/node": "^17.0.35",
|
|
59
|
+
"@types/sinon-chai": "^3.2.5",
|
|
60
|
+
"bson": "^6.8.0",
|
|
61
|
+
"chai": "^4.3.6",
|
|
62
|
+
"depcheck": "^1.4.1",
|
|
63
|
+
"eslint": "^7.25.0",
|
|
64
|
+
"gen-esm-wrapper": "^1.1.1",
|
|
65
|
+
"mocha": "^8.4.0",
|
|
66
|
+
"mongodb-schema": "^12.6.2",
|
|
67
|
+
"node-cache": "^5.1.2",
|
|
68
|
+
"nyc": "^15.1.0",
|
|
69
|
+
"prettier": "^3.5.3",
|
|
70
|
+
"sinon": "^9.2.3",
|
|
71
|
+
"ts-node": "^10.9.2",
|
|
72
|
+
"typescript": "^5.0.4"
|
|
73
|
+
},
|
|
74
|
+
"gitHead": "1965782342b851ea54a71eff19e75b622a3e03f6"
|
|
75
|
+
}
|