@qp-mongosh/shell-api 0.0.0-dev.5 → 0.0.0-dev.7

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.
Files changed (72) hide show
  1. package/.eslintignore +2 -2
  2. package/.eslintrc.js +1 -1
  3. package/AUTHORS +15 -15
  4. package/LICENSE +200 -200
  5. package/bin/report-missing-help.ts +24 -24
  6. package/bin/report-supported-api.ts +14 -14
  7. package/lib/abstract-cursor.d.ts +33 -33
  8. package/lib/abstract-cursor.js +191 -191
  9. package/lib/aggregation-cursor.d.ts +6 -6
  10. package/lib/aggregation-cursor.js +19 -19
  11. package/lib/bulk.d.ts +43 -43
  12. package/lib/bulk.js +223 -223
  13. package/lib/change-stream-cursor.d.ts +28 -28
  14. package/lib/change-stream-cursor.js +111 -111
  15. package/lib/collection.d.ts +95 -95
  16. package/lib/collection.js +964 -964
  17. package/lib/cursor.d.ts +32 -32
  18. package/lib/cursor.js +215 -215
  19. package/lib/database.d.ts +116 -116
  20. package/lib/database.js +1223 -1223
  21. package/lib/dbquery.d.ts +8 -8
  22. package/lib/dbquery.js +28 -28
  23. package/lib/decorators.d.ts +73 -73
  24. package/lib/decorators.js +395 -395
  25. package/lib/deprecation-warning.d.ts +2 -0
  26. package/lib/deprecation-warning.js +19 -0
  27. package/lib/deprecation-warning.js.map +1 -0
  28. package/lib/enums.d.ts +28 -28
  29. package/lib/enums.js +33 -33
  30. package/lib/error-codes.d.ts +12 -12
  31. package/lib/error-codes.js +19 -19
  32. package/lib/explainable-cursor.d.ts +11 -11
  33. package/lib/explainable-cursor.js +31 -31
  34. package/lib/explainable.d.ts +32 -32
  35. package/lib/explainable.js +166 -166
  36. package/lib/field-level-encryption.d.ts +50 -50
  37. package/lib/field-level-encryption.js +176 -176
  38. package/lib/help.d.ts +22 -22
  39. package/lib/help.js +26 -26
  40. package/lib/helpers.d.ts +71 -71
  41. package/lib/helpers.js +588 -588
  42. package/lib/index.d.ts +16 -16
  43. package/lib/index.js +45 -45
  44. package/lib/interruptor.d.ts +19 -19
  45. package/lib/interruptor.js +62 -62
  46. package/lib/mongo-errors.d.ts +5 -5
  47. package/lib/mongo-errors.js +37 -37
  48. package/lib/mongo.d.ts +75 -75
  49. package/lib/mongo.js +476 -476
  50. package/lib/no-db.d.ts +5 -5
  51. package/lib/no-db.js +28 -28
  52. package/lib/plan-cache.d.ts +16 -16
  53. package/lib/plan-cache.js +70 -70
  54. package/lib/replica-set.d.ts +45 -45
  55. package/lib/replica-set.js +314 -314
  56. package/lib/result.d.ts +61 -61
  57. package/lib/result.js +104 -104
  58. package/lib/session.d.ts +25 -25
  59. package/lib/session.js +88 -88
  60. package/lib/shard.d.ts +42 -42
  61. package/lib/shard.js +414 -414
  62. package/lib/shell-api.d.ts +52 -52
  63. package/lib/shell-api.js +298 -298
  64. package/lib/shell-bson.d.ts +40 -40
  65. package/lib/shell-bson.js +159 -159
  66. package/lib/shell-instance-state.d.ts +77 -77
  67. package/lib/shell-instance-state.js +392 -392
  68. package/lib/shell-internal-state.d.ts +74 -0
  69. package/lib/shell-internal-state.js +364 -0
  70. package/lib/shell-internal-state.js.map +1 -0
  71. package/package.json +47 -47
  72. package/tsconfig.lint.json +8 -8
@@ -1,52 +1,52 @@
1
- import { ShellApiClass } from './decorators';
2
- import { asPrintable } from './enums';
3
- import Mongo from './mongo';
4
- import Database from './database';
5
- import { CommandResult } from './result';
6
- import type ShellInstanceState from './shell-instance-state';
7
- import { ServerApi, ServerApiVersion } from '@qp-mongosh/service-provider-core';
8
- import { DBQuery } from './dbquery';
9
- import { ClientSideFieldLevelEncryptionOptions } from './field-level-encryption';
10
- import { ShellUserConfig } from '@qp-mongosh/types';
11
- declare const instanceStateSymbol: unique symbol;
12
- declare const loadCallNestingLevelSymbol: unique symbol;
13
- declare class ShellConfig extends ShellApiClass {
14
- _instanceState: ShellInstanceState;
15
- defaults: Readonly<ShellUserConfig>;
16
- constructor(instanceState: ShellInstanceState);
17
- set<K extends keyof ShellUserConfig>(key: K, value: ShellUserConfig[K]): Promise<string>;
18
- get<K extends keyof ShellUserConfig>(key: K): Promise<ShellUserConfig[K]>;
19
- reset<K extends keyof ShellUserConfig>(key: K): Promise<string>;
20
- _allKeys(): Promise<(keyof ShellUserConfig)[]>;
21
- [asPrintable](): Promise<Map<keyof ShellUserConfig, ShellUserConfig[keyof ShellUserConfig]>>;
22
- }
23
- export default class ShellApi extends ShellApiClass {
24
- [instanceStateSymbol]: ShellInstanceState;
25
- [loadCallNestingLevelSymbol]: number;
26
- DBQuery: DBQuery;
27
- config: ShellConfig;
28
- constructor(instanceState: ShellInstanceState);
29
- get _instanceState(): ShellInstanceState;
30
- get loadCallNestingLevel(): number;
31
- set loadCallNestingLevel(value: number);
32
- use(db: string): any;
33
- show(cmd: string, arg?: string): Promise<CommandResult>;
34
- exit(exitCode?: number): Promise<never>;
35
- quit(exitCode?: number): Promise<never>;
36
- Mongo(uri?: string, fleOptions?: ClientSideFieldLevelEncryptionOptions, otherOptions?: {
37
- api?: ServerApi | ServerApiVersion;
38
- }): Promise<Mongo>;
39
- connect(uri: string, user?: string, pwd?: string): Promise<Database>;
40
- it(): Promise<any>;
41
- version(): string;
42
- load(filename: string): Promise<true>;
43
- enableTelemetry(): Promise<any>;
44
- disableTelemetry(): Promise<any>;
45
- passwordPrompt(): Promise<string>;
46
- sleep(ms: number): Promise<void>;
47
- print(...origArgs: any[]): Promise<void>;
48
- printjson(...origArgs: any[]): Promise<void>;
49
- cls(): Promise<void>;
50
- isInteractive(): boolean;
51
- }
52
- export {};
1
+ import { ShellApiClass } from './decorators';
2
+ import { asPrintable } from './enums';
3
+ import Mongo from './mongo';
4
+ import Database from './database';
5
+ import { CommandResult } from './result';
6
+ import type ShellInstanceState from './shell-instance-state';
7
+ import { ServerApi, ServerApiVersion } from '@qp-mongosh/service-provider-core';
8
+ import { DBQuery } from './dbquery';
9
+ import { ClientSideFieldLevelEncryptionOptions } from './field-level-encryption';
10
+ import { ShellUserConfig } from '@qp-mongosh/types';
11
+ declare const instanceStateSymbol: unique symbol;
12
+ declare const loadCallNestingLevelSymbol: unique symbol;
13
+ declare class ShellConfig extends ShellApiClass {
14
+ _instanceState: ShellInstanceState;
15
+ defaults: Readonly<ShellUserConfig>;
16
+ constructor(instanceState: ShellInstanceState);
17
+ set<K extends keyof ShellUserConfig>(key: K, value: ShellUserConfig[K]): Promise<string>;
18
+ get<K extends keyof ShellUserConfig>(key: K): Promise<ShellUserConfig[K]>;
19
+ reset<K extends keyof ShellUserConfig>(key: K): Promise<string>;
20
+ _allKeys(): Promise<(keyof ShellUserConfig)[]>;
21
+ [asPrintable](): Promise<Map<keyof ShellUserConfig, ShellUserConfig[keyof ShellUserConfig]>>;
22
+ }
23
+ export default class ShellApi extends ShellApiClass {
24
+ [instanceStateSymbol]: ShellInstanceState;
25
+ [loadCallNestingLevelSymbol]: number;
26
+ DBQuery: DBQuery;
27
+ config: ShellConfig;
28
+ constructor(instanceState: ShellInstanceState);
29
+ get _instanceState(): ShellInstanceState;
30
+ get loadCallNestingLevel(): number;
31
+ set loadCallNestingLevel(value: number);
32
+ use(db: string): any;
33
+ show(cmd: string, arg?: string): Promise<CommandResult>;
34
+ exit(exitCode?: number): Promise<never>;
35
+ quit(exitCode?: number): Promise<never>;
36
+ Mongo(uri?: string, fleOptions?: ClientSideFieldLevelEncryptionOptions, otherOptions?: {
37
+ api?: ServerApi | ServerApiVersion;
38
+ }): Promise<Mongo>;
39
+ connect(uri: string, user?: string, pwd?: string): Promise<Database>;
40
+ it(): Promise<any>;
41
+ version(): string;
42
+ load(filename: string): Promise<true>;
43
+ enableTelemetry(): Promise<any>;
44
+ disableTelemetry(): Promise<any>;
45
+ passwordPrompt(): Promise<string>;
46
+ sleep(ms: number): Promise<void>;
47
+ print(...origArgs: any[]): Promise<void>;
48
+ printjson(...origArgs: any[]): Promise<void>;
49
+ cls(): Promise<void>;
50
+ isInteractive(): boolean;
51
+ }
52
+ export {};