kourou 1.4.0-dev.4 → 1.5.0-dev.1

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 (116) hide show
  1. package/README.md +892 -707
  2. package/bin/run +10 -24
  3. package/lib/commands/api-key/check.d.ts +11 -14
  4. package/lib/commands/api-key/check.js +5 -5
  5. package/lib/commands/api-key/create.d.ts +14 -17
  6. package/lib/commands/api-key/create.js +7 -5
  7. package/lib/commands/api-key/delete.d.ts +12 -14
  8. package/lib/commands/api-key/delete.js +6 -6
  9. package/lib/commands/api-key/search.d.ts +12 -15
  10. package/lib/commands/api-key/search.js +5 -3
  11. package/lib/commands/app/debug-proxy.d.ts +15 -16
  12. package/lib/commands/app/debug-proxy.js +7 -7
  13. package/lib/commands/app/doctor.d.ts +11 -12
  14. package/lib/commands/app/doctor.js +3 -3
  15. package/lib/commands/app/scaffold.d.ts +5 -8
  16. package/lib/commands/app/scaffold.js +8 -9
  17. package/lib/commands/app/start-services.d.ts +2 -2
  18. package/lib/commands/app/start-services.js +3 -3
  19. package/lib/commands/collection/create.d.ts +14 -19
  20. package/lib/commands/collection/create.js +8 -9
  21. package/lib/commands/collection/export.d.ts +20 -22
  22. package/lib/commands/collection/export.js +14 -14
  23. package/lib/commands/collection/import.d.ts +15 -18
  24. package/lib/commands/collection/import.js +9 -9
  25. package/lib/commands/collection/migrate.d.ts +15 -17
  26. package/lib/commands/collection/migrate.js +12 -9
  27. package/lib/commands/config/diff.d.ts +5 -6
  28. package/lib/commands/config/diff.js +11 -9
  29. package/lib/commands/document/search.d.ts +20 -25
  30. package/lib/commands/document/search.js +13 -13
  31. package/lib/commands/es/aliases/cat.d.ts +3 -4
  32. package/lib/commands/es/aliases/cat.js +4 -4
  33. package/lib/commands/es/indices/cat.d.ts +3 -4
  34. package/lib/commands/es/indices/cat.js +4 -4
  35. package/lib/commands/es/indices/get.d.ts +5 -7
  36. package/lib/commands/es/indices/get.js +7 -7
  37. package/lib/commands/es/indices/insert.d.ts +6 -9
  38. package/lib/commands/es/indices/insert.js +8 -8
  39. package/lib/commands/es/migrate.d.ts +11 -12
  40. package/lib/commands/es/migrate.js +26 -15
  41. package/lib/commands/es/snapshot/create-repository.d.ts +6 -8
  42. package/lib/commands/es/snapshot/create-repository.js +12 -10
  43. package/lib/commands/es/snapshot/create.d.ts +6 -8
  44. package/lib/commands/es/snapshot/create.js +11 -8
  45. package/lib/commands/es/snapshot/list.d.ts +4 -7
  46. package/lib/commands/es/snapshot/list.js +7 -8
  47. package/lib/commands/es/snapshot/restore.d.ts +6 -8
  48. package/lib/commands/es/snapshot/restore.js +11 -8
  49. package/lib/commands/file/decrypt.d.ts +5 -8
  50. package/lib/commands/file/decrypt.js +7 -7
  51. package/lib/commands/file/encrypt.d.ts +5 -8
  52. package/lib/commands/file/encrypt.js +7 -5
  53. package/lib/commands/file/test.d.ts +3 -6
  54. package/lib/commands/file/test.js +5 -5
  55. package/lib/commands/import.d.ts +13 -16
  56. package/lib/commands/import.js +8 -9
  57. package/lib/commands/index/export.d.ts +17 -20
  58. package/lib/commands/index/export.js +12 -11
  59. package/lib/commands/index/import.d.ts +14 -17
  60. package/lib/commands/index/import.js +11 -8
  61. package/lib/commands/instance/kill.d.ts +2 -3
  62. package/lib/commands/instance/kill.js +6 -7
  63. package/lib/commands/instance/logs.d.ts +2 -3
  64. package/lib/commands/instance/logs.js +3 -3
  65. package/lib/commands/instance/spawn.d.ts +3 -4
  66. package/lib/commands/instance/spawn.js +7 -8
  67. package/lib/commands/paas/login.d.ts +4 -5
  68. package/lib/commands/paas/login.js +13 -8
  69. package/lib/commands/profile/export.d.ts +10 -11
  70. package/lib/commands/profile/export.js +3 -3
  71. package/lib/commands/profile/import.d.ts +11 -14
  72. package/lib/commands/profile/import.js +5 -3
  73. package/lib/commands/realtime/subscribe.d.ts +19 -24
  74. package/lib/commands/realtime/subscribe.js +12 -12
  75. package/lib/commands/redis/list-keys.d.ts +14 -17
  76. package/lib/commands/redis/list-keys.js +8 -9
  77. package/lib/commands/role/export.d.ts +10 -11
  78. package/lib/commands/role/export.js +3 -3
  79. package/lib/commands/role/import.d.ts +12 -15
  80. package/lib/commands/role/import.js +6 -4
  81. package/lib/commands/sdk/execute.d.ts +15 -18
  82. package/lib/commands/sdk/execute.js +9 -10
  83. package/lib/commands/sdk/query.d.ts +20 -23
  84. package/lib/commands/sdk/query.js +14 -15
  85. package/lib/commands/user/export-mappings.d.ts +10 -11
  86. package/lib/commands/user/export-mappings.js +3 -3
  87. package/lib/commands/user/export.d.ts +14 -15
  88. package/lib/commands/user/export.js +7 -7
  89. package/lib/commands/user/import-mappings.d.ts +11 -14
  90. package/lib/commands/user/import-mappings.js +5 -3
  91. package/lib/commands/user/import.d.ts +11 -14
  92. package/lib/commands/user/import.js +5 -3
  93. package/lib/commands/vault/add.d.ts +5 -6
  94. package/lib/commands/vault/add.js +9 -11
  95. package/lib/commands/vault/decrypt.d.ts +5 -8
  96. package/lib/commands/vault/decrypt.js +8 -9
  97. package/lib/commands/vault/encrypt.d.ts +5 -8
  98. package/lib/commands/vault/encrypt.js +8 -9
  99. package/lib/commands/vault/show.d.ts +5 -11
  100. package/lib/commands/vault/show.js +7 -8
  101. package/lib/commands/vault/test.d.ts +3 -6
  102. package/lib/commands/vault/test.js +6 -7
  103. package/lib/common.d.ts +1 -1
  104. package/lib/common.js +3 -3
  105. package/lib/help.d.ts +16 -0
  106. package/lib/help.js +31 -0
  107. package/lib/hooks/command_not_found/api-action.d.ts +1 -1
  108. package/lib/hooks/command_not_found/api-action.js +8 -8
  109. package/lib/index.d.ts +1 -1
  110. package/lib/index.js +2 -2
  111. package/lib/support/dump-collection.js +2 -2
  112. package/lib/support/kuzzle.d.ts +8 -9
  113. package/lib/support/kuzzle.js +9 -9
  114. package/lib/support/progressBar.d.ts +10 -0
  115. package/lib/support/progressBar.js +15 -0
  116. package/package.json +13 -12
package/bin/run CHANGED
@@ -1,31 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const { default: Help } = require('@oclif/plugin-help')
3
+ const oclif = require('@oclif/core')
4
4
 
5
- const Help_showHelp = Help.prototype.showHelp;
6
5
  /**
7
- * Monkey patch of the Help.showHelp method to catch the error when a command is
8
- * not found and add a meaningfull error message about the API action hook
6
+ * oclif v1 accepted -v as an alias for --version, @oclif/core does not, and a
7
+ * script calling `kourou -v` would print nothing at all rather than fail.
8
+ *
9
+ * Only the first token is rewritten: a command name never starts with a dash,
10
+ * so this cannot swallow the -v that instance:spawn uses for its own version
11
+ * flag.
9
12
  */
10
- function showHelp(...args) {
11
- const context = this;
12
-
13
- try {
14
- return Help_showHelp.call(context, ...args);
15
- }
16
- catch (error) {
17
- error.message += `
18
-
19
- If you tried to execute and API action you can see
20
- available options by displaying the "sdk:query" command help:
21
- - kourou sdk:query --help`;
22
-
23
- throw error;
24
- }
13
+ if (process.argv[2] === '-v') {
14
+ process.argv[2] = '--version'
25
15
  }
26
16
 
27
- Help.prototype.showHelp = showHelp
28
-
29
- require('@oclif/command').run()
30
- .then(require('@oclif/command/flush'))
31
- .catch(require('@oclif/errors/handle'))
17
+ oclif.run().then(oclif.flush).catch(oclif.handle)
@@ -1,23 +1,20 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  declare class ApiKeyCheck extends Kommand {
4
3
  static description: string;
5
4
  static flags: {
6
- host: flags.IOptionFlag<string>;
7
- port: flags.IOptionFlag<string>;
8
- ssl: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
9
- username: flags.IOptionFlag<string>;
10
- password: flags.IOptionFlag<string | undefined>;
11
- protocol: flags.IOptionFlag<string>;
12
- as: flags.IOptionFlag<string | undefined>;
13
- "api-key": flags.IOptionFlag<string | undefined>;
14
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
5
+ host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
15
14
  };
16
15
  static args: {
17
- name: string;
18
- description: string;
19
- required: boolean;
20
- }[];
16
+ token: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
17
+ };
21
18
  static examples: string[];
22
19
  runSafe(): Promise<void>;
23
20
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@oclif/command");
3
+ const core_1 = require("@oclif/core");
4
4
  const common_1 = require("../../common");
5
5
  const kuzzle_1 = require("../../support/kuzzle");
6
6
  class ApiKeyCheck extends common_1.Kommand {
@@ -15,9 +15,9 @@ class ApiKeyCheck extends common_1.Kommand {
15
15
  }
16
16
  }
17
17
  ApiKeyCheck.description = "Checks an API key validity";
18
- ApiKeyCheck.flags = Object.assign({ help: command_1.flags.help() }, kuzzle_1.kuzzleFlags);
19
- ApiKeyCheck.args = [
20
- { name: "token", description: "API key token", required: true },
21
- ];
18
+ ApiKeyCheck.flags = Object.assign({ help: core_1.Flags.help() }, kuzzle_1.kuzzleFlags);
19
+ ApiKeyCheck.args = {
20
+ token: core_1.Args.string({ description: "API key token", required: true }),
21
+ };
22
22
  ApiKeyCheck.examples = ["kourou api-key:check eyJhbG...QxfQrc"];
23
23
  exports.default = ApiKeyCheck;
@@ -1,26 +1,23 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  declare class ApiKeyCreate extends Kommand {
4
3
  static description: string;
5
4
  static flags: {
6
- host: flags.IOptionFlag<string>;
7
- port: flags.IOptionFlag<string>;
8
- ssl: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
9
- username: flags.IOptionFlag<string>;
10
- password: flags.IOptionFlag<string | undefined>;
11
- protocol: flags.IOptionFlag<string>;
12
- as: flags.IOptionFlag<string | undefined>;
13
- "api-key": flags.IOptionFlag<string | undefined>;
14
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
- description: flags.IOptionFlag<string>;
16
- id: flags.IOptionFlag<string | undefined>;
17
- expire: flags.IOptionFlag<string>;
5
+ host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
14
+ description: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ expire: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
18
17
  };
19
18
  static args: {
20
- name: string;
21
- description: string;
22
- required: boolean;
23
- }[];
19
+ user: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
20
+ };
24
21
  runSafe(): Promise<void>;
25
22
  }
26
23
  export default ApiKeyCreate;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@oclif/command");
3
+ const core_1 = require("@oclif/core");
4
4
  const common_1 = require("../../common");
5
5
  const kuzzle_1 = require("../../support/kuzzle");
6
6
  class ApiKeyCreate extends common_1.Kommand {
@@ -14,15 +14,17 @@ class ApiKeyCreate extends common_1.Kommand {
14
14
  }
15
15
  }
16
16
  ApiKeyCreate.description = "Creates a new API Key for a user";
17
- ApiKeyCreate.flags = Object.assign({ help: command_1.flags.help(), description: command_1.flags.string({
17
+ ApiKeyCreate.flags = Object.assign({ help: core_1.Flags.help(), description: core_1.Flags.string({
18
18
  char: "d",
19
19
  description: "API Key description",
20
20
  required: true,
21
- }), id: command_1.flags.string({
21
+ }), id: core_1.Flags.string({
22
22
  description: "API Key unique ID",
23
- }), expire: command_1.flags.string({
23
+ }), expire: core_1.Flags.string({
24
24
  description: "API Key validity",
25
25
  default: "-1",
26
26
  }) }, kuzzle_1.kuzzleFlags);
27
- ApiKeyCreate.args = [{ name: "user", description: "User kuid", required: true }];
27
+ ApiKeyCreate.args = {
28
+ user: core_1.Args.string({ description: "User kuid", required: true }),
29
+ };
28
30
  exports.default = ApiKeyCreate;
@@ -1,23 +1,21 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  declare class ApiKeyDelete extends Kommand {
4
3
  static description: string;
5
4
  static flags: {
6
- host: flags.IOptionFlag<string>;
7
- port: flags.IOptionFlag<string>;
8
- ssl: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
9
- username: flags.IOptionFlag<string>;
10
- password: flags.IOptionFlag<string | undefined>;
11
- protocol: flags.IOptionFlag<string>;
12
- as: flags.IOptionFlag<string | undefined>;
13
- "api-key": flags.IOptionFlag<string | undefined>;
14
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
5
+ host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
15
14
  };
16
15
  static args: {
17
- name: string;
18
- description: string;
19
- required: boolean;
20
- }[];
16
+ user: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
17
+ id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
18
+ };
21
19
  static examples: string[];
22
20
  runSafe(): Promise<void>;
23
21
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@oclif/command");
3
+ const core_1 = require("@oclif/core");
4
4
  const common_1 = require("../../common");
5
5
  const kuzzle_1 = require("../../support/kuzzle");
6
6
  class ApiKeyDelete extends common_1.Kommand {
@@ -10,10 +10,10 @@ class ApiKeyDelete extends common_1.Kommand {
10
10
  }
11
11
  }
12
12
  ApiKeyDelete.description = "Deletes an API key.";
13
- ApiKeyDelete.flags = Object.assign({ help: command_1.flags.help() }, kuzzle_1.kuzzleFlags);
14
- ApiKeyDelete.args = [
15
- { name: "user", description: "User kuid", required: true },
16
- { name: "id", description: "API Key unique ID", required: true },
17
- ];
13
+ ApiKeyDelete.flags = Object.assign({ help: core_1.Flags.help() }, kuzzle_1.kuzzleFlags);
14
+ ApiKeyDelete.args = {
15
+ user: core_1.Args.string({ description: "User kuid", required: true }),
16
+ id: core_1.Args.string({ description: "API Key unique ID", required: true }),
17
+ };
18
18
  ApiKeyDelete.examples = ["kourou vault:delete sigfox-gateway 1k-BF3EBjsXdvA2PR8x"];
19
19
  exports.default = ApiKeyDelete;
@@ -1,24 +1,21 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  declare class ApiKeySearch extends Kommand {
4
3
  static description: string;
5
4
  static flags: {
6
- host: flags.IOptionFlag<string>;
7
- port: flags.IOptionFlag<string>;
8
- ssl: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
9
- username: flags.IOptionFlag<string>;
10
- password: flags.IOptionFlag<string | undefined>;
11
- protocol: flags.IOptionFlag<string>;
12
- as: flags.IOptionFlag<string | undefined>;
13
- "api-key": flags.IOptionFlag<string | undefined>;
14
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
- filter: flags.IOptionFlag<string | undefined>;
5
+ host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
14
+ filter: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
15
  };
17
16
  static args: {
18
- name: string;
19
- description: string;
20
- required: boolean;
21
- }[];
17
+ user: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
18
+ };
22
19
  runSafe(): Promise<void>;
23
20
  }
24
21
  export default ApiKeySearch;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@oclif/command");
3
+ const core_1 = require("@oclif/core");
4
4
  const common_1 = require("../../common");
5
5
  const kuzzle_1 = require("../../support/kuzzle");
6
6
  class ApiKeySearch extends common_1.Kommand {
@@ -30,8 +30,10 @@ class ApiKeySearch extends common_1.Kommand {
30
30
  }
31
31
  }
32
32
  ApiKeySearch.description = "Lists a user's API Keys.";
33
- ApiKeySearch.flags = Object.assign({ help: command_1.flags.help(), filter: command_1.flags.string({
33
+ ApiKeySearch.flags = Object.assign({ help: core_1.Flags.help(), filter: core_1.Flags.string({
34
34
  description: "Filter to match the API Key descriptions",
35
35
  }) }, kuzzle_1.kuzzleFlags);
36
- ApiKeySearch.args = [{ name: "user", description: "User kuid", required: true }];
36
+ ApiKeySearch.args = {
37
+ user: core_1.Args.string({ description: "User kuid", required: true }),
38
+ };
37
39
  exports.default = ApiKeySearch;
@@ -1,23 +1,22 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  export default class DebugProxy extends Kommand {
4
3
  static description: string;
5
4
  static flags: {
6
- host: flags.IOptionFlag<string>;
7
- port: flags.IOptionFlag<string>;
8
- ssl: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
9
- username: flags.IOptionFlag<string>;
10
- password: flags.IOptionFlag<string | undefined>;
11
- protocol: flags.IOptionFlag<string>;
12
- as: flags.IOptionFlag<string | undefined>;
13
- "api-key": flags.IOptionFlag<string | undefined>;
14
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
- forwardPort: import("@oclif/parser/lib/flags").IOptionFlag<number>;
16
- ttl: flags.IOptionFlag<string>;
17
- keepAuth: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
18
- noAutoEnableDebugger: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
19
- showDebuggerEvents: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
20
- showDebuggerPayloads: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
5
+ host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
14
+ forwardPort: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ ttl: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ keepAuth: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ noAutoEnableDebugger: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ showDebuggerEvents: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
19
+ showDebuggerPayloads: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
21
20
  };
22
21
  static sdkOptions: {
23
22
  protocol: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const command_1 = require("@oclif/command");
4
+ const core_1 = require("@oclif/core");
5
5
  const common_1 = require("../../common");
6
6
  const kuzzle_1 = require("../../support/kuzzle");
7
7
  const http_1 = tslib_1.__importDefault(require("http"));
@@ -160,22 +160,22 @@ class DebugProxy extends common_1.Kommand {
160
160
  }
161
161
  }
162
162
  DebugProxy.description = "Create a Proxy Server that allows Chrome to debug Kuzzle remotely using the DebugController";
163
- DebugProxy.flags = Object.assign({ help: command_1.flags.help(), forwardPort: command_1.flags.integer({
163
+ DebugProxy.flags = Object.assign({ help: core_1.Flags.help(), forwardPort: core_1.Flags.integer({
164
164
  description: "Port of the forwarding server",
165
165
  default: 9222,
166
- }), ttl: command_1.flags.string({
166
+ }), ttl: core_1.Flags.string({
167
167
  description: "Kuzzle login TTL",
168
168
  default: "1h",
169
- }), keepAuth: command_1.flags.boolean({
169
+ }), keepAuth: core_1.Flags.boolean({
170
170
  description: "Keep the user authenticated",
171
171
  default: false,
172
- }), noAutoEnableDebugger: command_1.flags.boolean({
172
+ }), noAutoEnableDebugger: core_1.Flags.boolean({
173
173
  description: "True if Kourou should not enable and disable the Debugger automatically before and after usage",
174
174
  default: false,
175
- }), showDebuggerEvents: command_1.flags.boolean({
175
+ }), showDebuggerEvents: core_1.Flags.boolean({
176
176
  description: "Verbose mode to display events sent to the Chrome Debugger",
177
177
  default: false,
178
- }), showDebuggerPayloads: command_1.flags.boolean({
178
+ }), showDebuggerPayloads: core_1.Flags.boolean({
179
179
  description: "Verbose mode to display payloads sent by and to the Chrome Debugger",
180
180
  default: false,
181
181
  }) }, kuzzle_1.kuzzleFlags);
@@ -1,20 +1,19 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  export default class AppDoctor extends Kommand {
4
3
  static description: string;
5
4
  static flags: {
6
- host: flags.IOptionFlag<string>;
7
- port: flags.IOptionFlag<string>;
8
- ssl: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
9
- username: flags.IOptionFlag<string>;
10
- password: flags.IOptionFlag<string | undefined>;
11
- protocol: flags.IOptionFlag<string>;
12
- as: flags.IOptionFlag<string | undefined>;
13
- "api-key": flags.IOptionFlag<string | undefined>;
14
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
- elasticsearch: flags.IOptionFlag<string>;
5
+ host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
14
+ elasticsearch: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
16
15
  };
17
- static args: never[];
16
+ static args: {};
18
17
  static readStdin: boolean;
19
18
  ELK_MAX_VERSION: number;
20
19
  NODEJS_MAX_VERSION: number;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const command_1 = require("@oclif/command");
4
+ const core_1 = require("@oclif/core");
5
5
  const common_1 = require("../../common");
6
6
  const kuzzle_1 = require("../../support/kuzzle");
7
7
  const sdk_es7_1 = require("sdk-es7");
@@ -186,10 +186,10 @@ class AppDoctor extends common_1.Kommand {
186
186
  }
187
187
  }
188
188
  AppDoctor.description = "Analyze a Kuzzle application";
189
- AppDoctor.flags = Object.assign({ help: command_1.flags.help(), elasticsearch: command_1.flags.string({
189
+ AppDoctor.flags = Object.assign({ help: core_1.Flags.help(), elasticsearch: core_1.Flags.string({
190
190
  description: "Elasticsearch server URL",
191
191
  default: "http://localhost:9200",
192
192
  }) }, kuzzle_1.kuzzleFlags);
193
- AppDoctor.args = [];
193
+ AppDoctor.args = {};
194
194
  AppDoctor.readStdin = true;
195
195
  exports.default = AppDoctor;
@@ -1,19 +1,16 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  export default class AppScaffold extends Kommand {
4
3
  templatesDir: string;
5
4
  static initSdk: boolean;
6
5
  static description: string;
7
6
  static flags: {
8
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
9
- flavor: flags.IOptionFlag<string>;
10
- token: flags.IOptionFlag<string | undefined>;
7
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
8
+ flavor: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ token: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
10
  };
12
11
  static args: {
13
- name: string;
14
- description: string;
15
- required: boolean;
16
- }[];
12
+ destination: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
13
+ };
17
14
  runSafe(): Promise<void>;
18
15
  getRepo(flavor: string): "template-kuzzle-project" | "template-kiotp-project" | "template-hypervision-project";
19
16
  checkDestination(destination: string): Promise<void>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const command_1 = require("@oclif/command");
4
+ const core_1 = require("@oclif/core");
5
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
6
  const listr_1 = tslib_1.__importDefault(require("listr"));
7
7
  const common_1 = require("../../common");
@@ -155,21 +155,20 @@ class AppScaffold extends common_1.Kommand {
155
155
  AppScaffold.initSdk = false;
156
156
  AppScaffold.description = "Scaffolds a new Kuzzle application";
157
157
  AppScaffold.flags = {
158
- help: command_1.flags.help(),
159
- flavor: command_1.flags.string({
158
+ help: core_1.Flags.help(),
159
+ flavor: core_1.Flags.string({
160
160
  default: "generic",
161
161
  description: `Template flavor ("generic", "iot", "hypervision").`,
162
162
  }),
163
- token: command_1.flags.string({
163
+ token: core_1.Flags.string({
164
164
  description: `GitHub token used to clone private template repositories.
165
165
  Defaults to the GITHUB_TOKEN environment variable, then to the GitHub CLI credentials.`,
166
166
  }),
167
167
  };
168
- AppScaffold.args = [
169
- {
170
- name: "destination",
168
+ AppScaffold.args = {
169
+ destination: core_1.Args.string({
171
170
  description: "Directory to scaffold the app",
172
171
  required: true,
173
- },
174
- ];
172
+ }),
173
+ };
175
174
  exports.default = AppScaffold;
@@ -3,8 +3,8 @@ export default class AppStartServices extends Kommand {
3
3
  static initSdk: boolean;
4
4
  static description: string;
5
5
  static flags: {
6
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
7
- check: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
6
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
7
+ check: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
8
  };
9
9
  runSafe(): Promise<void>;
10
10
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const fs_1 = require("fs");
5
5
  const path_1 = tslib_1.__importDefault(require("path"));
6
- const command_1 = require("@oclif/command");
6
+ const core_1 = require("@oclif/core");
7
7
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
8
8
  const emoji_1 = require("../../support/emoji");
9
9
  const common_1 = require("../../common");
@@ -58,8 +58,8 @@ class AppStartServices extends common_1.Kommand {
58
58
  AppStartServices.initSdk = false;
59
59
  AppStartServices.description = "Starts Kuzzle services (Elasticsearch and Redis)";
60
60
  AppStartServices.flags = {
61
- help: command_1.flags.help(),
62
- check: command_1.flags.boolean({
61
+ help: core_1.Flags.help(),
62
+ check: core_1.Flags.boolean({
63
63
  description: "Check prerequisite before running services",
64
64
  default: false,
65
65
  }),
@@ -1,27 +1,22 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  export default class CollectionCreate extends Kommand {
4
3
  static description: string;
5
4
  static flags: {
6
- host: flags.IOptionFlag<string>;
7
- port: flags.IOptionFlag<string>;
8
- ssl: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
9
- username: flags.IOptionFlag<string>;
10
- password: flags.IOptionFlag<string | undefined>;
11
- protocol: flags.IOptionFlag<string>;
12
- as: flags.IOptionFlag<string | undefined>;
13
- "api-key": flags.IOptionFlag<string | undefined>;
14
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
5
+ host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
14
+ };
15
+ static args: {
16
+ index: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
17
+ collection: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
18
+ body: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
15
19
  };
16
- static args: ({
17
- name: string;
18
- description: string;
19
- required: boolean;
20
- } | {
21
- name: string;
22
- description: string;
23
- required?: undefined;
24
- })[];
25
20
  static readStdin: boolean;
26
21
  runSafe(): Promise<void>;
27
22
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@oclif/command");
3
+ const core_1 = require("@oclif/core");
4
4
  const common_1 = require("../../common");
5
5
  const kuzzle_1 = require("../../support/kuzzle");
6
6
  class CollectionCreate extends common_1.Kommand {
@@ -15,14 +15,13 @@ class CollectionCreate extends common_1.Kommand {
15
15
  }
16
16
  }
17
17
  CollectionCreate.description = "Creates a collection";
18
- CollectionCreate.flags = Object.assign({ help: command_1.flags.help() }, kuzzle_1.kuzzleFlags);
19
- CollectionCreate.args = [
20
- { name: "index", description: "Index name", required: true },
21
- { name: "collection", description: "Collection name", required: true },
22
- {
23
- name: "body",
18
+ CollectionCreate.flags = Object.assign({ help: core_1.Flags.help() }, kuzzle_1.kuzzleFlags);
19
+ CollectionCreate.args = {
20
+ index: core_1.Args.string({ description: "Index name", required: true }),
21
+ collection: core_1.Args.string({ description: "Collection name", required: true }),
22
+ body: core_1.Args.string({
24
23
  description: "Collection mappings and settings in JS or JSON format. Will be read from STDIN if available",
25
- },
26
- ];
24
+ }),
25
+ };
27
26
  CollectionCreate.readStdin = true;
28
27
  exports.default = CollectionCreate;