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
@@ -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 fs_1 = tslib_1.__importDefault(require("fs"));
6
6
  const common_1 = require("../../common");
7
7
  const kuzzle_1 = require("../../support/kuzzle");
@@ -15,9 +15,11 @@ class ProfileImport extends common_1.Kommand {
15
15
  }
16
16
  }
17
17
  ProfileImport.description = "Imports profiles";
18
- ProfileImport.flags = Object.assign(Object.assign({ help: command_1.flags.help({}) }, kuzzle_1.kuzzleFlags), { protocol: command_1.flags.string({
18
+ ProfileImport.flags = Object.assign(Object.assign({ help: core_1.Flags.help({}) }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
19
19
  description: "Kuzzle protocol (http or websocket)",
20
20
  default: "ws",
21
21
  }) });
22
- ProfileImport.args = [{ name: "path", description: "Dump file", required: true }];
22
+ ProfileImport.args = {
23
+ path: core_1.Args.string({ description: "Dump file", required: true }),
24
+ };
23
25
  exports.default = ProfileImport;
@@ -1,33 +1,28 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  export default class RealtimeSubscribe extends Kommand {
4
3
  static description: string;
5
4
  static examples: string[];
6
5
  static flags: {
7
- protocol: flags.IOptionFlag<string>;
8
- host: flags.IOptionFlag<string>;
9
- port: flags.IOptionFlag<string>;
10
- ssl: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
11
- username: flags.IOptionFlag<string>;
12
- password: flags.IOptionFlag<string | undefined>;
13
- as: flags.IOptionFlag<string | undefined>;
14
- "api-key": flags.IOptionFlag<string | undefined>;
15
- scope: flags.IOptionFlag<string>;
16
- users: flags.IOptionFlag<string>;
17
- volatile: flags.IOptionFlag<string>;
18
- display: flags.IOptionFlag<string>;
19
- editor: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
20
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
6
+ protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ users: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ volatile: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ display: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
18
+ editor: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
19
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
20
+ };
21
+ static args: {
22
+ index: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
23
+ collection: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
24
+ filters: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
21
25
  };
22
- static args: ({
23
- name: string;
24
- description: string;
25
- required: boolean;
26
- } | {
27
- name: string;
28
- description: string;
29
- required?: undefined;
30
- })[];
31
26
  static readStdin: boolean;
32
27
  beforeConnect(): Promise<void>;
33
28
  runSafe(): 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 lodash_1 = tslib_1.__importDefault(require("lodash"));
6
6
  const common_1 = require("../../common");
7
7
  const kuzzle_1 = require("../../support/kuzzle");
@@ -40,28 +40,28 @@ RealtimeSubscribe.examples = [
40
40
  "kourou realtime:subscribe iot-data sensors --users all --volatile '{ clientId: \"citizen-kane\" }'",
41
41
  "kourou realtime:subscribe iot-data sensors --display result._source.temperature",
42
42
  ];
43
- RealtimeSubscribe.flags = Object.assign(Object.assign({ scope: command_1.flags.string({
43
+ RealtimeSubscribe.flags = Object.assign(Object.assign({ scope: core_1.Flags.string({
44
44
  description: "Subscribe to document entering or leaving the scope (all, in, out, none)",
45
45
  default: "all",
46
- }), users: command_1.flags.string({
46
+ }), users: core_1.Flags.string({
47
47
  description: "Subscribe to users entering or leaving the room (all, in, out, none)",
48
48
  default: "all",
49
- }), volatile: command_1.flags.string({
49
+ }), volatile: core_1.Flags.string({
50
50
  description: "Additional subscription information used in user join/leave notifications",
51
51
  default: "{}",
52
- }), display: command_1.flags.string({
52
+ }), display: core_1.Flags.string({
53
53
  description: "Path of the property to display from the notification (empty string to display everything)",
54
54
  default: "result",
55
- }), editor: command_1.flags.boolean({
55
+ }), editor: core_1.Flags.boolean({
56
56
  description: "Open an editor (EDITOR env variable) to edit the filters before subscribing.",
57
- }), help: command_1.flags.help() }, kuzzle_1.kuzzleFlags), { protocol: command_1.flags.string({
57
+ }), help: core_1.Flags.help() }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
58
58
  description: "Kuzzle protocol (only websocket for realtime)",
59
59
  default: "websocket",
60
60
  }) });
61
- RealtimeSubscribe.args = [
62
- { name: "index", description: "Index name", required: true },
63
- { name: "collection", description: "Collection name", required: true },
64
- { name: "filters", description: "Set of Koncorde filters" },
65
- ];
61
+ RealtimeSubscribe.args = {
62
+ index: core_1.Args.string({ description: "Index name", required: true }),
63
+ collection: core_1.Args.string({ description: "Collection name", required: true }),
64
+ filters: core_1.Args.string({ description: "Set of Koncorde filters" }),
65
+ };
66
66
  RealtimeSubscribe.readStdin = true;
67
67
  exports.default = RealtimeSubscribe;
@@ -1,26 +1,23 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  export default class RedisListKeys 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
- remove: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
16
- size: flags.IOptionFlag<string>;
17
- max: 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
+ remove: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ size: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ max: 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
- default: string;
23
- }[];
19
+ match: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
20
+ };
24
21
  static examples: string[];
25
22
  static readStdin: boolean;
26
23
  runSafe(): Promise<void>;
@@ -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 RedisListKeys extends common_1.Kommand {
@@ -40,23 +40,22 @@ class RedisListKeys extends common_1.Kommand {
40
40
  }
41
41
  }
42
42
  RedisListKeys.description = "Lists keys stored in Redis";
43
- RedisListKeys.flags = Object.assign({ help: command_1.flags.help(), remove: command_1.flags.boolean({
43
+ RedisListKeys.flags = Object.assign({ help: core_1.Flags.help(), remove: core_1.Flags.boolean({
44
44
  description: "Remove matching keys",
45
45
  default: false,
46
- }), size: command_1.flags.string({
46
+ }), size: core_1.Flags.string({
47
47
  description: "Page size",
48
48
  default: "100",
49
- }), max: command_1.flags.string({
49
+ }), max: core_1.Flags.string({
50
50
  description: "Maximum number of page to retrieve (-1 to retrieve everything)",
51
51
  default: "-1",
52
52
  }) }, kuzzle_1.kuzzleFlags);
53
- RedisListKeys.args = [
54
- {
55
- name: "match",
53
+ RedisListKeys.args = {
54
+ match: core_1.Args.string({
56
55
  description: "Match Redis keys with a pattern",
57
56
  default: "*",
58
- },
59
- ];
57
+ }),
58
+ };
60
59
  RedisListKeys.examples = [
61
60
  'kourou redis:list-keys "*cluster*"',
62
61
  'kourou redis:list-keys "counters/*" --remove',
@@ -1,18 +1,17 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  export default class RoleDump extends Kommand {
4
3
  static description: string;
5
4
  static flags: {
6
- protocol: flags.IOptionFlag<string>;
7
- host: flags.IOptionFlag<string>;
8
- port: flags.IOptionFlag<string>;
9
- ssl: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
10
- username: flags.IOptionFlag<string>;
11
- password: flags.IOptionFlag<string | undefined>;
12
- as: flags.IOptionFlag<string | undefined>;
13
- "api-key": flags.IOptionFlag<string | undefined>;
14
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
- path: flags.IOptionFlag<string>;
5
+ protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ password: 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
+ path: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
16
15
  };
17
16
  runSafe(): Promise<void>;
18
17
  _dumpRoles(): Promise<any>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const fs_1 = tslib_1.__importDefault(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 common_1 = require("../../common");
8
8
  const kuzzle_1 = require("../../support/kuzzle");
9
9
  class RoleDump extends common_1.Kommand {
@@ -35,10 +35,10 @@ class RoleDump extends common_1.Kommand {
35
35
  }
36
36
  }
37
37
  RoleDump.description = "Exports roles";
38
- RoleDump.flags = Object.assign(Object.assign({ help: command_1.flags.help({}), path: command_1.flags.string({
38
+ RoleDump.flags = Object.assign(Object.assign({ help: core_1.Flags.help({}), path: core_1.Flags.string({
39
39
  description: "Dump directory",
40
40
  default: "roles",
41
- }) }, kuzzle_1.kuzzleFlags), { protocol: command_1.flags.string({
41
+ }) }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
42
42
  description: "Kuzzle protocol (http or websocket)",
43
43
  default: "ws",
44
44
  }) });
@@ -1,23 +1,20 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  export default class RoleImport extends Kommand {
4
3
  static description: string;
5
4
  static flags: {
6
- protocol: flags.IOptionFlag<string>;
7
- host: flags.IOptionFlag<string>;
8
- port: flags.IOptionFlag<string>;
9
- ssl: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
10
- username: flags.IOptionFlag<string>;
11
- password: flags.IOptionFlag<string | undefined>;
12
- as: flags.IOptionFlag<string | undefined>;
13
- "api-key": flags.IOptionFlag<string | undefined>;
14
- "preserve-anonymous": import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
15
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
5
+ protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ password: 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
+ "preserve-anonymous": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
16
15
  };
17
16
  static args: {
18
- name: string;
19
- description: string;
20
- required: boolean;
21
- }[];
17
+ path: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
18
+ };
22
19
  runSafe(): Promise<void>;
23
20
  }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const fs_1 = tslib_1.__importDefault(require("fs"));
5
- const command_1 = require("@oclif/command");
5
+ const core_1 = require("@oclif/core");
6
6
  const common_1 = require("../../common");
7
7
  const kuzzle_1 = require("../../support/kuzzle");
8
8
  const restore_securities_1 = require("../../support/restore-securities");
@@ -15,12 +15,14 @@ class RoleImport extends common_1.Kommand {
15
15
  }
16
16
  }
17
17
  RoleImport.description = "Import roles";
18
- RoleImport.flags = Object.assign(Object.assign({ "preserve-anonymous": command_1.flags.boolean({
18
+ RoleImport.flags = Object.assign(Object.assign({ "preserve-anonymous": core_1.Flags.boolean({
19
19
  description: "Preserve anonymous rights",
20
20
  default: false,
21
- }), help: command_1.flags.help({}) }, kuzzle_1.kuzzleFlags), { protocol: command_1.flags.string({
21
+ }), help: core_1.Flags.help({}) }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
22
22
  description: "Kuzzle protocol (http or websocket)",
23
23
  default: "ws",
24
24
  }) });
25
- RoleImport.args = [{ name: "path", description: "Dump file", required: true }];
25
+ RoleImport.args = {
26
+ path: core_1.Args.string({ description: "Dump file", required: true }),
27
+ };
26
28
  exports.default = RoleImport;
@@ -1,27 +1,24 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  declare class SdkExecute 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
- var: flags.IOptionFlag<string[]>;
16
- editor: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
17
- "keep-alive": import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
18
- "print-raw": 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
+ var: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ editor: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ "keep-alive": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ "print-raw": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
19
18
  };
20
19
  static args: {
21
- name: string;
22
- description: string;
23
- required: boolean;
24
- }[];
20
+ code: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
21
+ };
25
22
  private code;
26
23
  static readStdin: boolean;
27
24
  beforeConnect(): 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 lodash_1 = require("lodash");
6
6
  const editor_1 = require("../../support/editor");
7
7
  const common_1 = require("../../common");
@@ -119,23 +119,22 @@ Other
119
119
  Examples:
120
120
  - kourou sdk:execute 'return await sdk.server.now()' --editor
121
121
  `;
122
- SdkExecute.flags = Object.assign({ help: command_1.flags.help(), var: command_1.flags.string({
122
+ SdkExecute.flags = Object.assign({ help: core_1.Flags.help(), var: core_1.Flags.string({
123
123
  char: "v",
124
124
  description: "Additional arguments injected into the code. (eg: --var 'index=\"iot-data\"'",
125
125
  multiple: true,
126
- }), editor: command_1.flags.boolean({
126
+ }), editor: core_1.Flags.boolean({
127
127
  description: "Open an editor (EDITOR env variable) to edit the code before executing it.",
128
- }), "keep-alive": command_1.flags.boolean({
128
+ }), "keep-alive": core_1.Flags.boolean({
129
129
  description: "Keep the connection running (websocket only)",
130
- }), "print-raw": command_1.flags.boolean({
130
+ }), "print-raw": core_1.Flags.boolean({
131
131
  description: "Print only the script result to stdout",
132
132
  }) }, kuzzle_1.kuzzleFlags);
133
- SdkExecute.args = [
134
- {
135
- name: "code",
133
+ SdkExecute.args = {
134
+ code: core_1.Args.string({
136
135
  description: "Code to execute. Will be read from STDIN if available.",
137
136
  required: false,
138
- },
139
- ];
137
+ }),
138
+ };
140
139
  SdkExecute.readStdin = true;
141
140
  exports.default = SdkExecute;
@@ -1,32 +1,29 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  declare class SdkQuery 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
- arg: flags.IOptionFlag<string[]>;
16
- body: flags.IOptionFlag<string>;
17
- editor: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
18
- "body-editor": import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
19
- index: flags.IOptionFlag<string | undefined>;
20
- collection: flags.IOptionFlag<string | undefined>;
21
- id: flags.IOptionFlag<string | undefined>;
22
- display: flags.IOptionFlag<string>;
23
- "print-raw": 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
+ arg: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ body: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ editor: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ "body-editor": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ index: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
+ collection: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
20
+ id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
21
+ display: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
22
+ "print-raw": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
24
23
  };
25
24
  static args: {
26
- name: string;
27
- description: string;
28
- required: boolean;
29
- }[];
25
+ "controller:action": import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
26
+ };
30
27
  static readStdin: boolean;
31
28
  runSafe(): Promise<void>;
32
29
  }
@@ -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 lodash_1 = tslib_1.__importDefault(require("lodash"));
6
6
  const common_1 = require("../../common");
7
7
  const kuzzle_1 = require("../../support/kuzzle");
@@ -93,37 +93,36 @@ Default fallback to API action
93
93
  - kourou bulk:import iot sensors '{ bulkData: [...] }'
94
94
  - kourou admin:loadMappings < mappings.json
95
95
  `;
96
- SdkQuery.flags = Object.assign({ help: command_1.flags.help(), arg: command_1.flags.string({
96
+ SdkQuery.flags = Object.assign({ help: core_1.Flags.help(), arg: core_1.Flags.string({
97
97
  char: "a",
98
98
  description: 'Additional argument. Repeatable. (e.g. "-a refresh=wait_for")',
99
99
  multiple: true,
100
- }), body: command_1.flags.string({
100
+ }), body: core_1.Flags.string({
101
101
  description: "Request body in JS or JSON format. Will be read from STDIN if available.",
102
102
  default: "{}",
103
- }), editor: command_1.flags.boolean({
103
+ }), editor: core_1.Flags.boolean({
104
104
  description: "Open an editor (EDITOR env variable) to edit the request before sending.",
105
- }), "body-editor": command_1.flags.boolean({
105
+ }), "body-editor": core_1.Flags.boolean({
106
106
  description: "Open an editor (EDITOR env variable) to edit the body before sending.",
107
- }), index: command_1.flags.string({
107
+ }), index: core_1.Flags.string({
108
108
  char: "i",
109
109
  description: "Index argument",
110
- }), collection: command_1.flags.string({
110
+ }), collection: core_1.Flags.string({
111
111
  char: "c",
112
112
  description: "Collection argument",
113
- }), id: command_1.flags.string({
113
+ }), id: core_1.Flags.string({
114
114
  description: "ID argument (_id)",
115
- }), display: command_1.flags.string({
115
+ }), display: core_1.Flags.string({
116
116
  description: "Path of the property to display from the response (empty string to display the result)",
117
117
  default: "result",
118
- }), "print-raw": command_1.flags.boolean({
118
+ }), "print-raw": core_1.Flags.boolean({
119
119
  description: "Print only the query result to stdout",
120
120
  }) }, kuzzle_1.kuzzleFlags);
121
- SdkQuery.args = [
122
- {
123
- name: "controller:action",
121
+ SdkQuery.args = {
122
+ "controller:action": core_1.Args.string({
124
123
  description: 'Controller and action (eg: "server:now")',
125
124
  required: true,
126
- },
127
- ];
125
+ }),
126
+ };
128
127
  SdkQuery.readStdin = true;
129
128
  exports.default = SdkQuery;
@@ -1,18 +1,17 @@
1
- import { flags } from "@oclif/command";
2
1
  import { Kommand } from "../../common";
3
2
  export default class UserExportMappings extends Kommand {
4
3
  static description: string;
5
4
  static flags: {
6
- protocol: flags.IOptionFlag<string>;
7
- host: flags.IOptionFlag<string>;
8
- port: flags.IOptionFlag<string>;
9
- ssl: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
10
- username: flags.IOptionFlag<string>;
11
- password: flags.IOptionFlag<string | undefined>;
12
- as: flags.IOptionFlag<string | undefined>;
13
- "api-key": flags.IOptionFlag<string | undefined>;
14
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
- path: flags.IOptionFlag<string>;
5
+ protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ password: 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
+ path: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
16
15
  };
17
16
  runSafe(): Promise<void>;
18
17
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const fs_1 = tslib_1.__importDefault(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 common_1 = require("../../common");
8
8
  const kuzzle_1 = require("../../support/kuzzle");
9
9
  class UserExportMappings extends common_1.Kommand {
@@ -21,10 +21,10 @@ class UserExportMappings extends common_1.Kommand {
21
21
  }
22
22
  }
23
23
  UserExportMappings.description = "Exports users collection mappings to JSON.";
24
- UserExportMappings.flags = Object.assign(Object.assign({ help: command_1.flags.help({}), path: command_1.flags.string({
24
+ UserExportMappings.flags = Object.assign(Object.assign({ help: core_1.Flags.help({}), path: core_1.Flags.string({
25
25
  description: "Dump directory",
26
26
  default: "users",
27
- }) }, kuzzle_1.kuzzleFlags), { protocol: command_1.flags.string({
27
+ }) }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
28
28
  description: "Kuzzle protocol (http or websocket)",
29
29
  default: "ws",
30
30
  }) });