@qp-mongosh/types 0.0.0-dev.0 → 0.0.0-dev.3
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/.eslintignore +2 -2
- package/.eslintrc.js +1 -1
- package/AUTHORS +6 -6
- package/README.md +11 -11
- package/lib/index.d.ts +236 -236
- package/lib/index.js +136 -136
- package/package.json +38 -38
- package/src/index.spec.ts +69 -69
- package/src/index.ts +488 -488
- package/tsconfig.json +13 -13
- package/tsconfig.lint.json +8 -8
package/.eslintignore
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
node_modules
|
|
2
|
-
lib
|
|
1
|
+
node_modules
|
|
2
|
+
lib
|
package/.eslintrc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('../../config/eslintrc.base');
|
|
1
|
+
module.exports = require('../../config/eslintrc.base');
|
package/AUTHORS
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Anna Henningsen <anna@addaleax.net>
|
|
2
|
-
Maurizio Casimirri <maurizio.cas@gmail.com>
|
|
3
|
-
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
|
4
|
-
Michael Rose <michael_rose@gmx.de>
|
|
5
|
-
Alena Khineika <alena.khineika@gmail.com>
|
|
6
|
-
Sergey Petushkov <petushkov.sergey@gmail.com>
|
|
1
|
+
Anna Henningsen <anna@addaleax.net>
|
|
2
|
+
Maurizio Casimirri <maurizio.cas@gmail.com>
|
|
3
|
+
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
|
4
|
+
Michael Rose <michael_rose@gmx.de>
|
|
5
|
+
Alena Khineika <alena.khineika@gmail.com>
|
|
6
|
+
Sergey Petushkov <petushkov.sergey@gmail.com>
|
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# `@qp-mongosh/types`
|
|
2
|
-
|
|
3
|
-
> TODO: description
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
const types = require('@qp-mongosh/types');
|
|
9
|
-
|
|
10
|
-
// TODO: DEMONSTRATE API
|
|
11
|
-
```
|
|
1
|
+
# `@qp-mongosh/types`
|
|
2
|
+
|
|
3
|
+
> TODO: description
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
const types = require('@qp-mongosh/types');
|
|
9
|
+
|
|
10
|
+
// TODO: DEMONSTRATE API
|
|
11
|
+
```
|
package/lib/index.d.ts
CHANGED
|
@@ -1,236 +1,236 @@
|
|
|
1
|
-
import type { ConnectEventMap } from '@mongodb-js/devtools-connect';
|
|
2
|
-
export interface ApiEventArguments {
|
|
3
|
-
pipeline?: any[];
|
|
4
|
-
query?: object;
|
|
5
|
-
options?: object;
|
|
6
|
-
filter?: object;
|
|
7
|
-
}
|
|
8
|
-
export interface ApiEventWithArguments {
|
|
9
|
-
method: string;
|
|
10
|
-
class?: string;
|
|
11
|
-
db?: string;
|
|
12
|
-
coll?: string;
|
|
13
|
-
uri?: string;
|
|
14
|
-
arguments?: ApiEventArguments;
|
|
15
|
-
}
|
|
16
|
-
export interface ApiEvent {
|
|
17
|
-
method: string;
|
|
18
|
-
class: string;
|
|
19
|
-
deprecated: boolean;
|
|
20
|
-
isAsync: boolean;
|
|
21
|
-
callDepth: number;
|
|
22
|
-
}
|
|
23
|
-
export interface ApiWarning {
|
|
24
|
-
method: string;
|
|
25
|
-
class: string;
|
|
26
|
-
message: string;
|
|
27
|
-
}
|
|
28
|
-
export interface UseEvent {
|
|
29
|
-
db: string;
|
|
30
|
-
}
|
|
31
|
-
export interface EvaluateInputEvent {
|
|
32
|
-
input: string;
|
|
33
|
-
}
|
|
34
|
-
export interface ShowEvent {
|
|
35
|
-
method: string;
|
|
36
|
-
}
|
|
37
|
-
export interface ConnectEvent {
|
|
38
|
-
is_atlas: boolean;
|
|
39
|
-
is_localhost: boolean;
|
|
40
|
-
is_do: boolean;
|
|
41
|
-
server_version: string;
|
|
42
|
-
server_os?: string;
|
|
43
|
-
server_arch?: string;
|
|
44
|
-
is_enterprise: boolean;
|
|
45
|
-
auth_type?: string;
|
|
46
|
-
is_data_lake: boolean;
|
|
47
|
-
dl_version?: string;
|
|
48
|
-
is_genuine: boolean;
|
|
49
|
-
non_genuine_server_name: string;
|
|
50
|
-
api_version?: string;
|
|
51
|
-
api_strict?: boolean;
|
|
52
|
-
api_deprecation_errors?: boolean;
|
|
53
|
-
node_version: string;
|
|
54
|
-
uri: string;
|
|
55
|
-
}
|
|
56
|
-
export interface ScriptLoadFileEvent {
|
|
57
|
-
nested: boolean;
|
|
58
|
-
filename: string;
|
|
59
|
-
}
|
|
60
|
-
export interface StartLoadingCliScriptsEvent {
|
|
61
|
-
usesShellOption: boolean;
|
|
62
|
-
}
|
|
63
|
-
export interface GlobalConfigFileLoadEvent {
|
|
64
|
-
filename: string;
|
|
65
|
-
found: boolean;
|
|
66
|
-
}
|
|
67
|
-
export interface MongocryptdTrySpawnEvent {
|
|
68
|
-
spawnPath: string[];
|
|
69
|
-
path: string;
|
|
70
|
-
}
|
|
71
|
-
export interface MongocryptdErrorEvent {
|
|
72
|
-
cause: string;
|
|
73
|
-
error?: Error;
|
|
74
|
-
stderr?: string;
|
|
75
|
-
pid?: number;
|
|
76
|
-
}
|
|
77
|
-
export interface MongocryptdLogEvent {
|
|
78
|
-
pid: number;
|
|
79
|
-
logEntry: any;
|
|
80
|
-
}
|
|
81
|
-
export interface StartMongoshReplEvent {
|
|
82
|
-
version: string;
|
|
83
|
-
}
|
|
84
|
-
export interface SnippetsLoadedEvent {
|
|
85
|
-
installdir: string;
|
|
86
|
-
}
|
|
87
|
-
export interface SnippetsNpmLookupEvent {
|
|
88
|
-
existingVersion: string;
|
|
89
|
-
}
|
|
90
|
-
export interface SnippetsNpmDownloadActiveEvent {
|
|
91
|
-
npmMetadataURL: string;
|
|
92
|
-
npmTarballURL: string;
|
|
93
|
-
}
|
|
94
|
-
export interface SnippetsNpmDownloadFailedEvent {
|
|
95
|
-
npmMetadataURL: string;
|
|
96
|
-
npmTarballURL?: string;
|
|
97
|
-
status?: number;
|
|
98
|
-
}
|
|
99
|
-
export interface SnippetsFetchIndexEvent {
|
|
100
|
-
refreshMode: string;
|
|
101
|
-
}
|
|
102
|
-
export interface SnippetsFetchIndexErrorEvent {
|
|
103
|
-
action: string;
|
|
104
|
-
url?: string;
|
|
105
|
-
status?: number;
|
|
106
|
-
error?: string;
|
|
107
|
-
}
|
|
108
|
-
export interface SnippetsErrorEvent {
|
|
109
|
-
error: string;
|
|
110
|
-
}
|
|
111
|
-
export interface SnippetsRunNpmEvent {
|
|
112
|
-
args: string[];
|
|
113
|
-
}
|
|
114
|
-
export interface SnippetsLoadSnippetEvent {
|
|
115
|
-
source: string;
|
|
116
|
-
name: string;
|
|
117
|
-
}
|
|
118
|
-
export interface SnippetsCommandEvent {
|
|
119
|
-
args: string[];
|
|
120
|
-
}
|
|
121
|
-
export interface SnippetsTransformErrorEvent {
|
|
122
|
-
error: string;
|
|
123
|
-
addition: string;
|
|
124
|
-
name: string;
|
|
125
|
-
}
|
|
126
|
-
export interface EditorRunEditCommandEvent {
|
|
127
|
-
tmpDoc: string;
|
|
128
|
-
editor: string;
|
|
129
|
-
code: string;
|
|
130
|
-
}
|
|
131
|
-
export interface EditorReadVscodeExtensionsDoneEvent {
|
|
132
|
-
vscodeDir: string;
|
|
133
|
-
hasMongodbExtension: boolean;
|
|
134
|
-
}
|
|
135
|
-
export interface EditorReadVscodeExtensionsFailedEvent {
|
|
136
|
-
vscodeDir: string;
|
|
137
|
-
error: Error;
|
|
138
|
-
}
|
|
139
|
-
export interface MongoshBusEventsMap extends ConnectEventMap {
|
|
140
|
-
'mongosh:connect': (ev: ConnectEvent) => void;
|
|
141
|
-
'mongosh:new-user': (identity: {
|
|
142
|
-
userId: string;
|
|
143
|
-
anonymousId: string;
|
|
144
|
-
}) => void;
|
|
145
|
-
'mongosh:update-user': (identity: {
|
|
146
|
-
userId: string;
|
|
147
|
-
anonymousId?: string;
|
|
148
|
-
}) => void;
|
|
149
|
-
'mongosh:error': (error: Error, component: string) => void;
|
|
150
|
-
'mongosh:evaluate-input': (ev: EvaluateInputEvent) => void;
|
|
151
|
-
'mongosh:evaluate-started': () => void;
|
|
152
|
-
'mongosh:evaluate-finished': () => void;
|
|
153
|
-
'mongosh:use': (ev: UseEvent) => void;
|
|
154
|
-
'mongosh:getDB': (ev: UseEvent) => void;
|
|
155
|
-
'mongosh:show': (ev: ShowEvent) => void;
|
|
156
|
-
'mongosh:setCtx': (ev: ApiEventWithArguments) => void;
|
|
157
|
-
'mongosh:api-call-with-arguments': (ev: ApiEventWithArguments) => void;
|
|
158
|
-
'mongosh:api-call': (ev: ApiEvent) => void;
|
|
159
|
-
'mongosh:warn': (ev: ApiWarning) => void;
|
|
160
|
-
'mongosh:api-load-file': (ev: ScriptLoadFileEvent) => void;
|
|
161
|
-
'mongosh:start-loading-cli-scripts': (event: StartLoadingCliScriptsEvent) => void;
|
|
162
|
-
'mongosh:start-mongosh-repl': (ev: StartMongoshReplEvent) => void;
|
|
163
|
-
'mongosh:mongoshrc-load': () => void;
|
|
164
|
-
'mongosh:globalconfig-load': (ev: GlobalConfigFileLoadEvent) => void;
|
|
165
|
-
'mongosh:mongoshrc-mongorc-warn': () => void;
|
|
166
|
-
'mongosh:eval-cli-script': () => void;
|
|
167
|
-
'mongosh:eval-interrupted': () => void;
|
|
168
|
-
'mongosh:mongocryptd-tryspawn': (ev: MongocryptdTrySpawnEvent) => void;
|
|
169
|
-
'mongosh:mongocryptd-error': (ev: MongocryptdErrorEvent) => void;
|
|
170
|
-
'mongosh:mongocryptd-log': (ev: MongocryptdLogEvent) => void;
|
|
171
|
-
'mongosh:closed': () => void;
|
|
172
|
-
'mongosh:eval-complete': () => void;
|
|
173
|
-
'mongosh:autocompletion-complete': () => void;
|
|
174
|
-
'mongosh:interrupt-complete': () => void;
|
|
175
|
-
'mongosh-snippets:loaded': (ev: SnippetsLoadedEvent) => void;
|
|
176
|
-
'mongosh-snippets:npm-lookup': (ev: SnippetsNpmLookupEvent) => void;
|
|
177
|
-
'mongosh-snippets:npm-lookup-stopped': () => void;
|
|
178
|
-
'mongosh-snippets:npm-download-failed': (ev: SnippetsNpmDownloadFailedEvent) => void;
|
|
179
|
-
'mongosh-snippets:npm-download-active': (ev: SnippetsNpmDownloadActiveEvent) => void;
|
|
180
|
-
'mongosh-snippets:fetch-index': (ev: SnippetsFetchIndexEvent) => void;
|
|
181
|
-
'mongosh-snippets:fetch-cache-invalid': () => void;
|
|
182
|
-
'mongosh-snippets:fetch-index-error': (ev: SnippetsFetchIndexErrorEvent) => void;
|
|
183
|
-
'mongosh-snippets:fetch-index-done': () => void;
|
|
184
|
-
'mongosh-snippets:package-json-edit-error': (ev: SnippetsErrorEvent) => void;
|
|
185
|
-
'mongosh-snippets:spawn-child': (ev: SnippetsRunNpmEvent) => void;
|
|
186
|
-
'mongosh-snippets:load-snippet': (ev: SnippetsLoadSnippetEvent) => void;
|
|
187
|
-
'mongosh-snippets:snippet-command': (ev: SnippetsCommandEvent) => void;
|
|
188
|
-
'mongosh-snippets:transform-error': (ev: SnippetsTransformErrorEvent) => void;
|
|
189
|
-
'mongosh-sp:reset-connection-options': () => void;
|
|
190
|
-
'mongosh-editor:run-edit-command': (ev: EditorRunEditCommandEvent) => void;
|
|
191
|
-
'mongosh-editor:read-vscode-extensions-done': (ev: EditorReadVscodeExtensionsDoneEvent) => void;
|
|
192
|
-
'mongosh-editor:read-vscode-extensions-failed': (ev: EditorReadVscodeExtensionsFailedEvent) => void;
|
|
193
|
-
}
|
|
194
|
-
export interface MongoshBus {
|
|
195
|
-
on<K extends keyof MongoshBusEventsMap>(event: K, listener: MongoshBusEventsMap[K]): this;
|
|
196
|
-
once<K extends keyof MongoshBusEventsMap>(event: K, listener: MongoshBusEventsMap[K]): this;
|
|
197
|
-
emit<K extends keyof MongoshBusEventsMap>(event: K, ...args: MongoshBusEventsMap[K] extends (...args: infer P) => any ? P : never): unknown;
|
|
198
|
-
}
|
|
199
|
-
export declare class ShellUserConfig {
|
|
200
|
-
displayBatchSize: number;
|
|
201
|
-
maxTimeMS: number | null;
|
|
202
|
-
enableTelemetry: boolean;
|
|
203
|
-
editor: string | null;
|
|
204
|
-
}
|
|
205
|
-
export declare class ShellUserConfigValidator {
|
|
206
|
-
static validate<K extends keyof ShellUserConfig>(key: K, value: ShellUserConfig[K]): Promise<string | null>;
|
|
207
|
-
}
|
|
208
|
-
export declare class SnippetShellUserConfig extends ShellUserConfig {
|
|
209
|
-
snippetIndexSourceURLs: string;
|
|
210
|
-
snippetRegistryURL: string;
|
|
211
|
-
snippetAutoload: boolean;
|
|
212
|
-
}
|
|
213
|
-
export declare class SnippetShellUserConfigValidator extends ShellUserConfigValidator {
|
|
214
|
-
static validate<K extends keyof SnippetShellUserConfig>(key: K, value: SnippetShellUserConfig[K]): Promise<string | null>;
|
|
215
|
-
}
|
|
216
|
-
export declare class CliUserConfig extends SnippetShellUserConfig {
|
|
217
|
-
userId: string;
|
|
218
|
-
telemetryAnonymousId: string;
|
|
219
|
-
disableGreetingMessage: boolean;
|
|
220
|
-
forceDisableTelemetry: boolean;
|
|
221
|
-
inspectCompact: number | boolean;
|
|
222
|
-
inspectDepth: number;
|
|
223
|
-
historyLength: number;
|
|
224
|
-
showStackTraces: boolean;
|
|
225
|
-
redactHistory: 'keep' | 'remove' | 'remove-redact';
|
|
226
|
-
}
|
|
227
|
-
export declare class CliUserConfigValidator extends SnippetShellUserConfigValidator {
|
|
228
|
-
static validate<K extends keyof CliUserConfig>(key: K, value: CliUserConfig[K]): Promise<string | null>;
|
|
229
|
-
}
|
|
230
|
-
export interface ConfigProvider<T> {
|
|
231
|
-
getConfig<K extends keyof T>(key: K): Promise<T[K]>;
|
|
232
|
-
setConfig<K extends keyof T>(key: K, value: T[K]): Promise<'success' | 'ignored'>;
|
|
233
|
-
resetConfig<K extends keyof T>(key: K): Promise<'success' | 'ignored'>;
|
|
234
|
-
validateConfig<K extends keyof T>(key: K, value: T[K]): Promise<string | null>;
|
|
235
|
-
listConfigOptions(): string[] | Promise<string[]>;
|
|
236
|
-
}
|
|
1
|
+
import type { ConnectEventMap } from '@mongodb-js/devtools-connect';
|
|
2
|
+
export interface ApiEventArguments {
|
|
3
|
+
pipeline?: any[];
|
|
4
|
+
query?: object;
|
|
5
|
+
options?: object;
|
|
6
|
+
filter?: object;
|
|
7
|
+
}
|
|
8
|
+
export interface ApiEventWithArguments {
|
|
9
|
+
method: string;
|
|
10
|
+
class?: string;
|
|
11
|
+
db?: string;
|
|
12
|
+
coll?: string;
|
|
13
|
+
uri?: string;
|
|
14
|
+
arguments?: ApiEventArguments;
|
|
15
|
+
}
|
|
16
|
+
export interface ApiEvent {
|
|
17
|
+
method: string;
|
|
18
|
+
class: string;
|
|
19
|
+
deprecated: boolean;
|
|
20
|
+
isAsync: boolean;
|
|
21
|
+
callDepth: number;
|
|
22
|
+
}
|
|
23
|
+
export interface ApiWarning {
|
|
24
|
+
method: string;
|
|
25
|
+
class: string;
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
export interface UseEvent {
|
|
29
|
+
db: string;
|
|
30
|
+
}
|
|
31
|
+
export interface EvaluateInputEvent {
|
|
32
|
+
input: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ShowEvent {
|
|
35
|
+
method: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ConnectEvent {
|
|
38
|
+
is_atlas: boolean;
|
|
39
|
+
is_localhost: boolean;
|
|
40
|
+
is_do: boolean;
|
|
41
|
+
server_version: string;
|
|
42
|
+
server_os?: string;
|
|
43
|
+
server_arch?: string;
|
|
44
|
+
is_enterprise: boolean;
|
|
45
|
+
auth_type?: string;
|
|
46
|
+
is_data_lake: boolean;
|
|
47
|
+
dl_version?: string;
|
|
48
|
+
is_genuine: boolean;
|
|
49
|
+
non_genuine_server_name: string;
|
|
50
|
+
api_version?: string;
|
|
51
|
+
api_strict?: boolean;
|
|
52
|
+
api_deprecation_errors?: boolean;
|
|
53
|
+
node_version: string;
|
|
54
|
+
uri: string;
|
|
55
|
+
}
|
|
56
|
+
export interface ScriptLoadFileEvent {
|
|
57
|
+
nested: boolean;
|
|
58
|
+
filename: string;
|
|
59
|
+
}
|
|
60
|
+
export interface StartLoadingCliScriptsEvent {
|
|
61
|
+
usesShellOption: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface GlobalConfigFileLoadEvent {
|
|
64
|
+
filename: string;
|
|
65
|
+
found: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface MongocryptdTrySpawnEvent {
|
|
68
|
+
spawnPath: string[];
|
|
69
|
+
path: string;
|
|
70
|
+
}
|
|
71
|
+
export interface MongocryptdErrorEvent {
|
|
72
|
+
cause: string;
|
|
73
|
+
error?: Error;
|
|
74
|
+
stderr?: string;
|
|
75
|
+
pid?: number;
|
|
76
|
+
}
|
|
77
|
+
export interface MongocryptdLogEvent {
|
|
78
|
+
pid: number;
|
|
79
|
+
logEntry: any;
|
|
80
|
+
}
|
|
81
|
+
export interface StartMongoshReplEvent {
|
|
82
|
+
version: string;
|
|
83
|
+
}
|
|
84
|
+
export interface SnippetsLoadedEvent {
|
|
85
|
+
installdir: string;
|
|
86
|
+
}
|
|
87
|
+
export interface SnippetsNpmLookupEvent {
|
|
88
|
+
existingVersion: string;
|
|
89
|
+
}
|
|
90
|
+
export interface SnippetsNpmDownloadActiveEvent {
|
|
91
|
+
npmMetadataURL: string;
|
|
92
|
+
npmTarballURL: string;
|
|
93
|
+
}
|
|
94
|
+
export interface SnippetsNpmDownloadFailedEvent {
|
|
95
|
+
npmMetadataURL: string;
|
|
96
|
+
npmTarballURL?: string;
|
|
97
|
+
status?: number;
|
|
98
|
+
}
|
|
99
|
+
export interface SnippetsFetchIndexEvent {
|
|
100
|
+
refreshMode: string;
|
|
101
|
+
}
|
|
102
|
+
export interface SnippetsFetchIndexErrorEvent {
|
|
103
|
+
action: string;
|
|
104
|
+
url?: string;
|
|
105
|
+
status?: number;
|
|
106
|
+
error?: string;
|
|
107
|
+
}
|
|
108
|
+
export interface SnippetsErrorEvent {
|
|
109
|
+
error: string;
|
|
110
|
+
}
|
|
111
|
+
export interface SnippetsRunNpmEvent {
|
|
112
|
+
args: string[];
|
|
113
|
+
}
|
|
114
|
+
export interface SnippetsLoadSnippetEvent {
|
|
115
|
+
source: string;
|
|
116
|
+
name: string;
|
|
117
|
+
}
|
|
118
|
+
export interface SnippetsCommandEvent {
|
|
119
|
+
args: string[];
|
|
120
|
+
}
|
|
121
|
+
export interface SnippetsTransformErrorEvent {
|
|
122
|
+
error: string;
|
|
123
|
+
addition: string;
|
|
124
|
+
name: string;
|
|
125
|
+
}
|
|
126
|
+
export interface EditorRunEditCommandEvent {
|
|
127
|
+
tmpDoc: string;
|
|
128
|
+
editor: string;
|
|
129
|
+
code: string;
|
|
130
|
+
}
|
|
131
|
+
export interface EditorReadVscodeExtensionsDoneEvent {
|
|
132
|
+
vscodeDir: string;
|
|
133
|
+
hasMongodbExtension: boolean;
|
|
134
|
+
}
|
|
135
|
+
export interface EditorReadVscodeExtensionsFailedEvent {
|
|
136
|
+
vscodeDir: string;
|
|
137
|
+
error: Error;
|
|
138
|
+
}
|
|
139
|
+
export interface MongoshBusEventsMap extends ConnectEventMap {
|
|
140
|
+
'mongosh:connect': (ev: ConnectEvent) => void;
|
|
141
|
+
'mongosh:new-user': (identity: {
|
|
142
|
+
userId: string;
|
|
143
|
+
anonymousId: string;
|
|
144
|
+
}) => void;
|
|
145
|
+
'mongosh:update-user': (identity: {
|
|
146
|
+
userId: string;
|
|
147
|
+
anonymousId?: string;
|
|
148
|
+
}) => void;
|
|
149
|
+
'mongosh:error': (error: Error, component: string) => void;
|
|
150
|
+
'mongosh:evaluate-input': (ev: EvaluateInputEvent) => void;
|
|
151
|
+
'mongosh:evaluate-started': () => void;
|
|
152
|
+
'mongosh:evaluate-finished': () => void;
|
|
153
|
+
'mongosh:use': (ev: UseEvent) => void;
|
|
154
|
+
'mongosh:getDB': (ev: UseEvent) => void;
|
|
155
|
+
'mongosh:show': (ev: ShowEvent) => void;
|
|
156
|
+
'mongosh:setCtx': (ev: ApiEventWithArguments) => void;
|
|
157
|
+
'mongosh:api-call-with-arguments': (ev: ApiEventWithArguments) => void;
|
|
158
|
+
'mongosh:api-call': (ev: ApiEvent) => void;
|
|
159
|
+
'mongosh:warn': (ev: ApiWarning) => void;
|
|
160
|
+
'mongosh:api-load-file': (ev: ScriptLoadFileEvent) => void;
|
|
161
|
+
'mongosh:start-loading-cli-scripts': (event: StartLoadingCliScriptsEvent) => void;
|
|
162
|
+
'mongosh:start-mongosh-repl': (ev: StartMongoshReplEvent) => void;
|
|
163
|
+
'mongosh:mongoshrc-load': () => void;
|
|
164
|
+
'mongosh:globalconfig-load': (ev: GlobalConfigFileLoadEvent) => void;
|
|
165
|
+
'mongosh:mongoshrc-mongorc-warn': () => void;
|
|
166
|
+
'mongosh:eval-cli-script': () => void;
|
|
167
|
+
'mongosh:eval-interrupted': () => void;
|
|
168
|
+
'mongosh:mongocryptd-tryspawn': (ev: MongocryptdTrySpawnEvent) => void;
|
|
169
|
+
'mongosh:mongocryptd-error': (ev: MongocryptdErrorEvent) => void;
|
|
170
|
+
'mongosh:mongocryptd-log': (ev: MongocryptdLogEvent) => void;
|
|
171
|
+
'mongosh:closed': () => void;
|
|
172
|
+
'mongosh:eval-complete': () => void;
|
|
173
|
+
'mongosh:autocompletion-complete': () => void;
|
|
174
|
+
'mongosh:interrupt-complete': () => void;
|
|
175
|
+
'mongosh-snippets:loaded': (ev: SnippetsLoadedEvent) => void;
|
|
176
|
+
'mongosh-snippets:npm-lookup': (ev: SnippetsNpmLookupEvent) => void;
|
|
177
|
+
'mongosh-snippets:npm-lookup-stopped': () => void;
|
|
178
|
+
'mongosh-snippets:npm-download-failed': (ev: SnippetsNpmDownloadFailedEvent) => void;
|
|
179
|
+
'mongosh-snippets:npm-download-active': (ev: SnippetsNpmDownloadActiveEvent) => void;
|
|
180
|
+
'mongosh-snippets:fetch-index': (ev: SnippetsFetchIndexEvent) => void;
|
|
181
|
+
'mongosh-snippets:fetch-cache-invalid': () => void;
|
|
182
|
+
'mongosh-snippets:fetch-index-error': (ev: SnippetsFetchIndexErrorEvent) => void;
|
|
183
|
+
'mongosh-snippets:fetch-index-done': () => void;
|
|
184
|
+
'mongosh-snippets:package-json-edit-error': (ev: SnippetsErrorEvent) => void;
|
|
185
|
+
'mongosh-snippets:spawn-child': (ev: SnippetsRunNpmEvent) => void;
|
|
186
|
+
'mongosh-snippets:load-snippet': (ev: SnippetsLoadSnippetEvent) => void;
|
|
187
|
+
'mongosh-snippets:snippet-command': (ev: SnippetsCommandEvent) => void;
|
|
188
|
+
'mongosh-snippets:transform-error': (ev: SnippetsTransformErrorEvent) => void;
|
|
189
|
+
'mongosh-sp:reset-connection-options': () => void;
|
|
190
|
+
'mongosh-editor:run-edit-command': (ev: EditorRunEditCommandEvent) => void;
|
|
191
|
+
'mongosh-editor:read-vscode-extensions-done': (ev: EditorReadVscodeExtensionsDoneEvent) => void;
|
|
192
|
+
'mongosh-editor:read-vscode-extensions-failed': (ev: EditorReadVscodeExtensionsFailedEvent) => void;
|
|
193
|
+
}
|
|
194
|
+
export interface MongoshBus {
|
|
195
|
+
on<K extends keyof MongoshBusEventsMap>(event: K, listener: MongoshBusEventsMap[K]): this;
|
|
196
|
+
once<K extends keyof MongoshBusEventsMap>(event: K, listener: MongoshBusEventsMap[K]): this;
|
|
197
|
+
emit<K extends keyof MongoshBusEventsMap>(event: K, ...args: MongoshBusEventsMap[K] extends (...args: infer P) => any ? P : never): unknown;
|
|
198
|
+
}
|
|
199
|
+
export declare class ShellUserConfig {
|
|
200
|
+
displayBatchSize: number;
|
|
201
|
+
maxTimeMS: number | null;
|
|
202
|
+
enableTelemetry: boolean;
|
|
203
|
+
editor: string | null;
|
|
204
|
+
}
|
|
205
|
+
export declare class ShellUserConfigValidator {
|
|
206
|
+
static validate<K extends keyof ShellUserConfig>(key: K, value: ShellUserConfig[K]): Promise<string | null>;
|
|
207
|
+
}
|
|
208
|
+
export declare class SnippetShellUserConfig extends ShellUserConfig {
|
|
209
|
+
snippetIndexSourceURLs: string;
|
|
210
|
+
snippetRegistryURL: string;
|
|
211
|
+
snippetAutoload: boolean;
|
|
212
|
+
}
|
|
213
|
+
export declare class SnippetShellUserConfigValidator extends ShellUserConfigValidator {
|
|
214
|
+
static validate<K extends keyof SnippetShellUserConfig>(key: K, value: SnippetShellUserConfig[K]): Promise<string | null>;
|
|
215
|
+
}
|
|
216
|
+
export declare class CliUserConfig extends SnippetShellUserConfig {
|
|
217
|
+
userId: string;
|
|
218
|
+
telemetryAnonymousId: string;
|
|
219
|
+
disableGreetingMessage: boolean;
|
|
220
|
+
forceDisableTelemetry: boolean;
|
|
221
|
+
inspectCompact: number | boolean;
|
|
222
|
+
inspectDepth: number;
|
|
223
|
+
historyLength: number;
|
|
224
|
+
showStackTraces: boolean;
|
|
225
|
+
redactHistory: 'keep' | 'remove' | 'remove-redact';
|
|
226
|
+
}
|
|
227
|
+
export declare class CliUserConfigValidator extends SnippetShellUserConfigValidator {
|
|
228
|
+
static validate<K extends keyof CliUserConfig>(key: K, value: CliUserConfig[K]): Promise<string | null>;
|
|
229
|
+
}
|
|
230
|
+
export interface ConfigProvider<T> {
|
|
231
|
+
getConfig<K extends keyof T>(key: K): Promise<T[K]>;
|
|
232
|
+
setConfig<K extends keyof T>(key: K, value: T[K]): Promise<'success' | 'ignored'>;
|
|
233
|
+
resetConfig<K extends keyof T>(key: K): Promise<'success' | 'ignored'>;
|
|
234
|
+
validateConfig<K extends keyof T>(key: K, value: T[K]): Promise<string | null>;
|
|
235
|
+
listConfigOptions(): string[] | Promise<string[]>;
|
|
236
|
+
}
|