kourou 0.24.1 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +99 -12
  2. package/lib/commands/api-key/check.d.ts +3 -3
  3. package/lib/commands/api-key/check.js +5 -7
  4. package/lib/commands/api-key/create.d.ts +3 -3
  5. package/lib/commands/api-key/create.js +8 -10
  6. package/lib/commands/api-key/delete.d.ts +3 -3
  7. package/lib/commands/api-key/delete.js +4 -6
  8. package/lib/commands/api-key/search.d.ts +3 -3
  9. package/lib/commands/api-key/search.js +5 -7
  10. package/lib/commands/app/debug-proxy.d.ts +3 -3
  11. package/lib/commands/app/debug-proxy.js +57 -55
  12. package/lib/commands/app/doctor.d.ts +24 -0
  13. package/lib/commands/app/doctor.js +201 -0
  14. package/lib/commands/app/scaffold.d.ts +2 -2
  15. package/lib/commands/app/scaffold.js +20 -15
  16. package/lib/commands/app/start-services.d.ts +1 -1
  17. package/lib/commands/app/start-services.js +26 -26
  18. package/lib/commands/collection/create.d.ts +3 -3
  19. package/lib/commands/collection/create.js +9 -6
  20. package/lib/commands/collection/export.d.ts +5 -5
  21. package/lib/commands/collection/export.js +25 -26
  22. package/lib/commands/collection/import.d.ts +5 -5
  23. package/lib/commands/collection/import.js +17 -17
  24. package/lib/commands/collection/migrate.d.ts +27 -0
  25. package/lib/commands/collection/migrate.js +43 -0
  26. package/lib/commands/config/diff.d.ts +1 -1
  27. package/lib/commands/config/diff.js +27 -21
  28. package/lib/commands/document/search.d.ts +3 -3
  29. package/lib/commands/document/search.js +20 -20
  30. package/lib/commands/es/aliases/cat.d.ts +12 -0
  31. package/lib/commands/es/aliases/cat.js +36 -0
  32. package/lib/commands/es/indices/cat.d.ts +2 -2
  33. package/lib/commands/es/indices/cat.js +8 -8
  34. package/lib/commands/es/indices/get.d.ts +2 -2
  35. package/lib/commands/es/indices/get.js +7 -7
  36. package/lib/commands/es/indices/insert.d.ts +2 -2
  37. package/lib/commands/es/indices/insert.js +9 -9
  38. package/lib/commands/es/migrate.d.ts +10 -8
  39. package/lib/commands/es/migrate.js +86 -82
  40. package/lib/commands/es/snapshot/create-repository.d.ts +2 -2
  41. package/lib/commands/es/snapshot/create-repository.js +16 -12
  42. package/lib/commands/es/snapshot/create.d.ts +2 -2
  43. package/lib/commands/es/snapshot/create.js +7 -7
  44. package/lib/commands/es/snapshot/list.d.ts +2 -2
  45. package/lib/commands/es/snapshot/list.js +12 -8
  46. package/lib/commands/file/decrypt.d.ts +4 -4
  47. package/lib/commands/file/decrypt.js +21 -21
  48. package/lib/commands/file/encrypt.d.ts +4 -4
  49. package/lib/commands/file/encrypt.js +20 -22
  50. package/lib/commands/file/test.d.ts +3 -3
  51. package/lib/commands/file/test.js +13 -13
  52. package/lib/commands/import.d.ts +5 -5
  53. package/lib/commands/import.js +39 -28
  54. package/lib/commands/index/export.d.ts +5 -4
  55. package/lib/commands/index/export.js +21 -19
  56. package/lib/commands/index/import.d.ts +5 -5
  57. package/lib/commands/index/import.js +21 -19
  58. package/lib/commands/instance/kill.d.ts +2 -2
  59. package/lib/commands/instance/kill.js +34 -34
  60. package/lib/commands/instance/list.d.ts +1 -1
  61. package/lib/commands/instance/list.js +33 -30
  62. package/lib/commands/instance/logs.d.ts +2 -2
  63. package/lib/commands/instance/logs.js +26 -22
  64. package/lib/commands/instance/spawn.d.ts +2 -2
  65. package/lib/commands/instance/spawn.js +46 -40
  66. package/lib/commands/paas/deploy.d.ts +2 -2
  67. package/lib/commands/paas/deploy.js +33 -21
  68. package/lib/commands/paas/init.d.ts +1 -1
  69. package/lib/commands/paas/init.js +10 -6
  70. package/lib/commands/paas/login.d.ts +4 -3
  71. package/lib/commands/paas/login.js +36 -15
  72. package/lib/commands/paas/logs.d.ts +27 -0
  73. package/lib/commands/paas/logs.js +137 -18
  74. package/lib/commands/profile/export.d.ts +3 -3
  75. package/lib/commands/profile/export.js +12 -12
  76. package/lib/commands/profile/import.d.ts +3 -3
  77. package/lib/commands/profile/import.js +6 -8
  78. package/lib/commands/realtime/subscribe.d.ts +3 -3
  79. package/lib/commands/realtime/subscribe.js +25 -25
  80. package/lib/commands/redis/list-keys.d.ts +3 -3
  81. package/lib/commands/redis/list-keys.js +15 -11
  82. package/lib/commands/role/export.d.ts +3 -3
  83. package/lib/commands/role/export.js +11 -11
  84. package/lib/commands/role/import.d.ts +4 -4
  85. package/lib/commands/role/import.js +10 -12
  86. package/lib/commands/sdk/execute.d.ts +5 -5
  87. package/lib/commands/sdk/execute.js +23 -19
  88. package/lib/commands/sdk/query.d.ts +5 -4
  89. package/lib/commands/sdk/query.js +30 -24
  90. package/lib/commands/user/export-mappings.d.ts +3 -3
  91. package/lib/commands/user/export-mappings.js +11 -11
  92. package/lib/commands/user/export.d.ts +6 -6
  93. package/lib/commands/user/export.js +34 -33
  94. package/lib/commands/user/import-mappings.d.ts +3 -3
  95. package/lib/commands/user/import-mappings.js +7 -7
  96. package/lib/commands/user/import.d.ts +3 -3
  97. package/lib/commands/user/import.js +6 -8
  98. package/lib/commands/vault/add.d.ts +3 -3
  99. package/lib/commands/vault/add.js +27 -19
  100. package/lib/commands/vault/decrypt.d.ts +4 -4
  101. package/lib/commands/vault/decrypt.js +24 -20
  102. package/lib/commands/vault/encrypt.d.ts +4 -4
  103. package/lib/commands/vault/encrypt.js +24 -20
  104. package/lib/commands/vault/show.d.ts +3 -3
  105. package/lib/commands/vault/show.js +24 -20
  106. package/lib/commands/vault/test.d.ts +3 -3
  107. package/lib/commands/vault/test.js +16 -12
  108. package/lib/common.d.ts +3 -3
  109. package/lib/common.js +28 -29
  110. package/lib/hooks/command_not_found/api-action.d.ts +2 -2
  111. package/lib/hooks/command_not_found/api-action.js +20 -22
  112. package/lib/index.d.ts +1 -1
  113. package/lib/support/PaasKommand.d.ts +2 -2
  114. package/lib/support/PaasKommand.js +9 -9
  115. package/lib/support/dump-collection.js +50 -41
  116. package/lib/support/editor.js +12 -10
  117. package/lib/support/execute.d.ts +6 -1
  118. package/lib/support/execute.js +9 -8
  119. package/lib/support/kuzzle.d.ts +12 -4
  120. package/lib/support/kuzzle.js +65 -31
  121. package/lib/support/migrate/providers/elasticsearch.d.ts +16 -0
  122. package/lib/support/migrate/providers/elasticsearch.js +74 -0
  123. package/lib/support/migrate/providers/file.d.ts +15 -0
  124. package/lib/support/migrate/providers/file.js +74 -0
  125. package/lib/support/migrate/providers/index.d.ts +12 -0
  126. package/lib/support/migrate/providers/index.js +16 -0
  127. package/lib/support/migrate/types.d.ts +8 -0
  128. package/lib/support/migrate/types.js +2 -0
  129. package/lib/support/restore-collection.d.ts +2 -1
  130. package/lib/support/restore-collection.js +37 -26
  131. package/lib/support/restore-securities.js +22 -19
  132. package/package.json +16 -15
package/README.md CHANGED
@@ -26,7 +26,7 @@ $ npm install -g kourou
26
26
  $ kourou COMMAND
27
27
  running command...
28
28
  $ kourou (-v|--version|version)
29
- kourou/0.24.1 linux-x64 node-v16.13.2
29
+ kourou/0.25.0 linux-x64 node-v16.15.0
30
30
  $ kourou --help [COMMAND]
31
31
  USAGE
32
32
  $ kourou COMMAND
@@ -130,14 +130,17 @@ All other arguments and options will be passed as-is to the `sdk:query` method.
130
130
  * [`kourou api-key:delete USER ID`](#kourou-api-keydelete-user-id)
131
131
  * [`kourou api-key:search USER`](#kourou-api-keysearch-user)
132
132
  * [`kourou app:debug-proxy`](#kourou-appdebug-proxy)
133
+ * [`kourou app:doctor`](#kourou-appdoctor)
133
134
  * [`kourou app:scaffold DESTINATION`](#kourou-appscaffold-destination)
134
135
  * [`kourou app:start-services`](#kourou-appstart-services)
135
136
  * [`kourou autocomplete [SHELL]`](#kourou-autocomplete-shell)
136
137
  * [`kourou collection:create INDEX COLLECTION [BODY]`](#kourou-collectioncreate-index-collection-body)
137
138
  * [`kourou collection:export INDEX COLLECTION`](#kourou-collectionexport-index-collection)
138
139
  * [`kourou collection:import PATH`](#kourou-collectionimport-path)
140
+ * [`kourou collection:migrate SCRIPT PATH`](#kourou-collectionmigrate-script-path)
139
141
  * [`kourou config:diff FIRST SECOND`](#kourou-configdiff-first-second)
140
142
  * [`kourou document:search INDEX COLLECTION [QUERY]`](#kourou-documentsearch-index-collection-query)
143
+ * [`kourou es:aliases:cat`](#kourou-esaliasescat)
141
144
  * [`kourou es:indices:cat`](#kourou-esindicescat)
142
145
  * [`kourou es:indices:get INDEX ID`](#kourou-esindicesget-index-id)
143
146
  * [`kourou es:indices:insert INDEX`](#kourou-esindicesinsert-index)
@@ -327,6 +330,29 @@ OPTIONS
327
330
 
328
331
  _See code: [src/commands/app/debug-proxy.ts](src/commands/app/debug-proxy.ts)_
329
332
 
333
+ ## `kourou app:doctor`
334
+
335
+ Analyze a Kuzzle application
336
+
337
+ ```
338
+ USAGE
339
+ $ kourou app:doctor
340
+
341
+ OPTIONS
342
+ --api-key=api-key Kuzzle user api-key
343
+ --as=as Impersonate a user
344
+ --elasticsearch=elasticsearch [default: http://localhost:9200] Elasticsearch server URL
345
+ --help show CLI help
346
+ --host=host [default: localhost] Kuzzle server host
347
+ --password=password Kuzzle user password
348
+ --port=port [default: 7512] Kuzzle server port
349
+ --protocol=protocol [default: ws] Kuzzle protocol (http or ws)
350
+ --ssl Use SSL to connect to Kuzzle
351
+ --username=username [default: anonymous] Kuzzle username (local strategy)
352
+ ```
353
+
354
+ _See code: [src/commands/app/doctor.ts](src/commands/app/doctor.ts)_
355
+
330
356
  ## `kourou app:scaffold DESTINATION`
331
357
 
332
358
  Scaffolds a new Kuzzle application
@@ -339,7 +365,9 @@ ARGUMENTS
339
365
  DESTINATION Directory to scaffold the app
340
366
 
341
367
  OPTIONS
342
- --flavor=flavor [default: generic] Template flavor ("generic", "iot-platform")
368
+ --flavor=flavor [default: generic] Template flavor ("generic", "iot-platform", "iot-console", "iot-platform").
369
+ Those can be found here: https://github.com/kuzzleio/project-templates
370
+
343
371
  --help show CLI help
344
372
  ```
345
373
 
@@ -381,7 +409,7 @@ EXAMPLES
381
409
  $ kourou autocomplete --refresh-cache
382
410
  ```
383
411
 
384
- _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.2.0/src/commands/autocomplete/index.ts)_
412
+ _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.3.10/src/commands/autocomplete/index.ts)_
385
413
 
386
414
  ## `kourou collection:create INDEX COLLECTION [BODY]`
387
415
 
@@ -471,7 +499,8 @@ OPTIONS
471
499
  [default: {}] Only dump documents matching the query (JS or JSON format)
472
500
 
473
501
  --scrollTTL=scrollTTL
474
- The scroll TTL option to pass to the dump operation (which performs a document.search under the hood),
502
+ [default: 20s] The scroll TTL option to pass to the dump operation (which performs a document.search under the
503
+ hood),
475
504
  expressed in ms format, e.g. '2s', '1m', '3h'.
476
505
 
477
506
  --ssl
@@ -516,6 +545,35 @@ OPTIONS
516
545
 
517
546
  _See code: [src/commands/collection/import.ts](src/commands/collection/import.ts)_
518
547
 
548
+ ## `kourou collection:migrate SCRIPT PATH`
549
+
550
+ Migrate a collection
551
+
552
+ ```
553
+ USAGE
554
+ $ kourou collection:migrate SCRIPT PATH
555
+
556
+ ARGUMENTS
557
+ SCRIPT Migration script path
558
+ PATH Collection dump path
559
+
560
+ OPTIONS
561
+ --api-key=api-key Kuzzle user api-key
562
+ --as=as Impersonate a user
563
+ --batch-size=batch-size [default: 200] Maximum batch size (see limits.documentsWriteCount config)
564
+ --collection=collection If set, override the collection destination name
565
+ --help show CLI help
566
+ --host=host [default: localhost] Kuzzle server host
567
+ --index=index If set, override the index destination name
568
+ --password=password Kuzzle user password
569
+ --port=port [default: 7512] Kuzzle server port
570
+ --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
571
+ --ssl Use SSL to connect to Kuzzle
572
+ --username=username [default: anonymous] Kuzzle username (local strategy)
573
+ ```
574
+
575
+ _See code: [src/commands/collection/migrate.ts](src/commands/collection/migrate.ts)_
576
+
519
577
  ## `kourou config:diff FIRST SECOND`
520
578
 
521
579
  Returns differences between two Kuzzle configuration files (kuzzlerc)
@@ -576,6 +634,22 @@ EXAMPLES
576
634
 
577
635
  _See code: [src/commands/document/search.ts](src/commands/document/search.ts)_
578
636
 
637
+ ## `kourou es:aliases:cat`
638
+
639
+ Lists available ES aliases
640
+
641
+ ```
642
+ USAGE
643
+ $ kourou es:aliases:cat
644
+
645
+ OPTIONS
646
+ -g, --grep=grep Match output with pattern
647
+ -n, --node=node [default: http://localhost:9200] Elasticsearch server URL
648
+ --help show CLI help
649
+ ```
650
+
651
+ _See code: [src/commands/es/aliases/cat.ts](src/commands/es/aliases/cat.ts)_
652
+
579
653
  ## `kourou es:indices:cat`
580
654
 
581
655
  Lists available ES indexes
@@ -633,7 +707,7 @@ _See code: [src/commands/es/indices/insert.ts](src/commands/es/indices/insert.ts
633
707
 
634
708
  ## `kourou es:migrate`
635
709
 
636
- Migrate all the index from one Elasticsearch server to another
710
+ Migrate all the index from an Elasticsearch (or a file) to another Elasticsearch
637
711
 
638
712
  ```
639
713
  USAGE
@@ -641,19 +715,19 @@ USAGE
641
715
 
642
716
  OPTIONS
643
717
  --batch-size=batch-size [default: 1000] How many documents to move in batch per operation
644
- --dest=dest (required) Destination Elasticsearch server URL
718
+ --dest=dest (required) Migration destination provider
645
719
  --dry-run Print witch collections will be migrated
646
720
  --help show CLI help
647
721
  --no-interactive Skip confirmation interactive prompts (perfect for scripting)
648
722
  --pattern=pattern Pattern to match indices to migrate
649
723
  --reset Reset destination Elasticsearch server
650
724
  --scroll=scroll [default: 30s] Scroll duration for Elasticsearch scrolling
651
- --src=src (required) Source Elasticsearch server URL
725
+ --src=src (required) Migration source provider
652
726
 
653
727
  EXAMPLES
654
- kourou es:migrate --src http://elasticsearch:9200 --dest http://otherElasticsearch:9200 --reset --batch-size 2000
655
- kourou es:migrate --src http://elasticsearch:9200 --dest http://otherElasticsearch:9200 --reset --batch-size 2000
656
- --no-interactive
728
+ kourou es:migrate --src http://elasticsearch:9200 --dest ./my-backup --batch-size 2000 --pattern
729
+ '&myindexes.collection-*'
730
+ kourou es:migrate --src ./my-backup --dest http://elasticsearch:9200 --reset --batch-size 2000 --no-interactive
657
731
  ```
658
732
 
659
733
  _See code: [src/commands/es/migrate.ts](src/commands/es/migrate.ts)_
@@ -796,7 +870,7 @@ OPTIONS
796
870
  --all see all commands in CLI
797
871
  ```
798
872
 
799
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.2/src/commands/help.ts)_
873
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_
800
874
 
801
875
  ## `kourou import PATH`
802
876
 
@@ -858,6 +932,10 @@ OPTIONS
858
932
 
859
933
  --query=query [default: {}] Only dump documents in collections matching the query (JS or JSON format)
860
934
 
935
+ --scrollTTL=scrollTTL [default: 20s] The scroll TTL option to pass to the dump operation (which performs a
936
+ document.search under the hood),
937
+ expressed in ms format, e.g. '2s', '1m', '3h'.
938
+
861
939
  --ssl Use SSL to connect to Kuzzle
862
940
 
863
941
  --username=username [default: anonymous] Kuzzle username (local strategy)
@@ -1006,6 +1084,7 @@ USAGE
1006
1084
 
1007
1085
  OPTIONS
1008
1086
  --help show CLI help
1087
+ --only_npm Only perform the login on the private NPM registry
1009
1088
  --project=project Current PaaS project
1010
1089
  --username=username PaaS username
1011
1090
  ```
@@ -1025,8 +1104,14 @@ ARGUMENTS
1025
1104
  APPLICATION Kuzzle PaaS application
1026
1105
 
1027
1106
  OPTIONS
1107
+ -f, --follow Follow log output
1108
+ -n, --tail=tail Number of lines to show from the end of the logs
1109
+ -t, --timestamp Show timestamp
1028
1110
  --help show CLI help
1111
+ --podName=podName Name of the pod to show logs from
1029
1112
  --project=project Current PaaS project
1113
+ --since=since Display logs from a specific absolute (e.g. 2022/12/02 09:41) or relative (e.g. a minute ago) time
1114
+ --until=until Display logs until a specific absolute (e.g. 2022/12/02 09:41) or relative (e.g. a minute ago) time
1030
1115
  ```
1031
1116
 
1032
1117
  _See code: [src/commands/paas/logs.ts](src/commands/paas/logs.ts)_
@@ -1305,6 +1390,8 @@ OPTIONS
1305
1390
 
1306
1391
  --port=port [default: 7512] Kuzzle server port
1307
1392
 
1393
+ --print-raw Print only the query result to stdout
1394
+
1308
1395
  --protocol=protocol [default: ws] Kuzzle protocol (http or ws)
1309
1396
 
1310
1397
  --ssl Use SSL to connect to Kuzzle
@@ -1677,7 +1764,7 @@ $ kourou sdk:execute --print-raw '(
1677
1764
 
1678
1765
  # Telemetry
1679
1766
 
1680
- We use a custom Open Source analytics backend (you can check the code [here](https://gihtub.com/kuzzleio/kepler)) to record the use of Kourou by users.
1767
+ We use a custom Open Source analytics backend (you can check the code [here](https://github.com/kuzzleio/kepler)) to record the use of Kourou by users.
1681
1768
 
1682
1769
  Collected metrics will allow us to study the use of our products in order to improve them. We do not collect any personal data about users.
1683
1770
 
@@ -1,5 +1,5 @@
1
- import { flags } from '@oclif/command';
2
- import { Kommand } from '../../common';
1
+ import { flags } from "@oclif/command";
2
+ import { Kommand } from "../../common";
3
3
  declare class ApiKeyCheck extends Kommand {
4
4
  static description: string;
5
5
  static flags: {
@@ -10,7 +10,7 @@ declare class ApiKeyCheck extends Kommand {
10
10
  password: flags.IOptionFlag<string | undefined>;
11
11
  protocol: flags.IOptionFlag<string>;
12
12
  as: flags.IOptionFlag<string | undefined>;
13
- 'api-key': flags.IOptionFlag<string | undefined>;
13
+ "api-key": flags.IOptionFlag<string | undefined>;
14
14
  help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
15
  };
16
16
  static args: {
@@ -7,19 +7,17 @@ class ApiKeyCheck extends common_1.Kommand {
7
7
  async runSafe() {
8
8
  const { valid } = await this.sdk.auth.checkToken(this.args.token);
9
9
  if (valid) {
10
- this.logOk('API key is still valid');
10
+ this.logOk("API key is still valid");
11
11
  }
12
12
  else {
13
- this.logKo('API key is not valid');
13
+ this.logKo("API key is not valid");
14
14
  }
15
15
  }
16
16
  }
17
- ApiKeyCheck.description = 'Checks an API key validity';
17
+ ApiKeyCheck.description = "Checks an API key validity";
18
18
  ApiKeyCheck.flags = Object.assign({ help: command_1.flags.help() }, kuzzle_1.kuzzleFlags);
19
19
  ApiKeyCheck.args = [
20
- { name: 'token', description: 'API key token', required: true },
21
- ];
22
- ApiKeyCheck.examples = [
23
- 'kourou api-key:check eyJhbG...QxfQrc'
20
+ { name: "token", description: "API key token", required: true },
24
21
  ];
22
+ ApiKeyCheck.examples = ["kourou api-key:check eyJhbG...QxfQrc"];
25
23
  exports.default = ApiKeyCheck;
@@ -1,5 +1,5 @@
1
- import { flags } from '@oclif/command';
2
- import { Kommand } from '../../common';
1
+ import { flags } from "@oclif/command";
2
+ import { Kommand } from "../../common";
3
3
  declare class ApiKeyCreate extends Kommand {
4
4
  static description: string;
5
5
  static flags: {
@@ -10,7 +10,7 @@ declare class ApiKeyCreate extends Kommand {
10
10
  password: flags.IOptionFlag<string | undefined>;
11
11
  protocol: flags.IOptionFlag<string>;
12
12
  as: flags.IOptionFlag<string | undefined>;
13
- 'api-key': flags.IOptionFlag<string | undefined>;
13
+ "api-key": flags.IOptionFlag<string | undefined>;
14
14
  help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
15
  description: flags.IOptionFlag<string>;
16
16
  id: flags.IOptionFlag<string | undefined>;
@@ -7,24 +7,22 @@ class ApiKeyCreate extends common_1.Kommand {
7
7
  async runSafe() {
8
8
  const apiKey = await this.sdk.security.createApiKey(this.args.user, this.flags.description, {
9
9
  _id: this.flags.id,
10
- expiresIn: this.flags.expire
10
+ expiresIn: this.flags.expire,
11
11
  });
12
12
  this.logOk(`Successfully created API Key "${apiKey._id}" for user "${this.args.user}"`);
13
13
  this.log(apiKey._source.token);
14
14
  }
15
15
  }
16
- ApiKeyCreate.description = 'Creates a new API Key for a user';
16
+ ApiKeyCreate.description = "Creates a new API Key for a user";
17
17
  ApiKeyCreate.flags = Object.assign({ help: command_1.flags.help(), description: command_1.flags.string({
18
- char: 'd',
19
- description: 'API Key description',
18
+ char: "d",
19
+ description: "API Key description",
20
20
  required: true,
21
21
  }), id: command_1.flags.string({
22
- description: 'API Key unique ID',
22
+ description: "API Key unique ID",
23
23
  }), expire: command_1.flags.string({
24
- description: 'API Key validity',
25
- default: '-1',
24
+ description: "API Key validity",
25
+ default: "-1",
26
26
  }) }, kuzzle_1.kuzzleFlags);
27
- ApiKeyCreate.args = [
28
- { name: 'user', description: 'User kuid', required: true },
29
- ];
27
+ ApiKeyCreate.args = [{ name: "user", description: "User kuid", required: true }];
30
28
  exports.default = ApiKeyCreate;
@@ -1,5 +1,5 @@
1
- import { flags } from '@oclif/command';
2
- import { Kommand } from '../../common';
1
+ import { flags } from "@oclif/command";
2
+ import { Kommand } from "../../common";
3
3
  declare class ApiKeyDelete extends Kommand {
4
4
  static description: string;
5
5
  static flags: {
@@ -10,7 +10,7 @@ declare class ApiKeyDelete extends Kommand {
10
10
  password: flags.IOptionFlag<string | undefined>;
11
11
  protocol: flags.IOptionFlag<string>;
12
12
  as: flags.IOptionFlag<string | undefined>;
13
- 'api-key': flags.IOptionFlag<string | undefined>;
13
+ "api-key": flags.IOptionFlag<string | undefined>;
14
14
  help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
15
  };
16
16
  static args: {
@@ -9,13 +9,11 @@ class ApiKeyDelete extends common_1.Kommand {
9
9
  this.logOk(`Successfully deleted API Key "${this.args.id}" of user "${this.args.user}"`);
10
10
  }
11
11
  }
12
- ApiKeyDelete.description = 'Deletes an API key.';
12
+ ApiKeyDelete.description = "Deletes an API key.";
13
13
  ApiKeyDelete.flags = Object.assign({ help: command_1.flags.help() }, kuzzle_1.kuzzleFlags);
14
14
  ApiKeyDelete.args = [
15
- { name: 'user', description: 'User kuid', required: true },
16
- { name: 'id', description: 'API Key unique ID', required: true },
17
- ];
18
- ApiKeyDelete.examples = [
19
- 'kourou vault:delete sigfox-gateway 1k-BF3EBjsXdvA2PR8x'
15
+ { name: "user", description: "User kuid", required: true },
16
+ { name: "id", description: "API Key unique ID", required: true },
20
17
  ];
18
+ ApiKeyDelete.examples = ["kourou vault:delete sigfox-gateway 1k-BF3EBjsXdvA2PR8x"];
21
19
  exports.default = ApiKeyDelete;
@@ -1,5 +1,5 @@
1
- import { flags } from '@oclif/command';
2
- import { Kommand } from '../../common';
1
+ import { flags } from "@oclif/command";
2
+ import { Kommand } from "../../common";
3
3
  declare class ApiKeySearch extends Kommand {
4
4
  static description: string;
5
5
  static flags: {
@@ -10,7 +10,7 @@ declare class ApiKeySearch extends Kommand {
10
10
  password: flags.IOptionFlag<string | undefined>;
11
11
  protocol: flags.IOptionFlag<string>;
12
12
  as: flags.IOptionFlag<string | undefined>;
13
- 'api-key': flags.IOptionFlag<string | undefined>;
13
+ "api-key": flags.IOptionFlag<string | undefined>;
14
14
  help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
15
  filter: flags.IOptionFlag<string | undefined>;
16
16
  };
@@ -15,11 +15,11 @@ class ApiKeySearch extends common_1.Kommand {
15
15
  }
16
16
  const result = await this.sdk.security.searchApiKeys(this.args.user, query, {
17
17
  from: 0,
18
- size: 100
18
+ size: 100,
19
19
  });
20
20
  this.logOk(`${result.total} API Keys found for user ${this.args.user}`);
21
21
  if (result.total !== 0) {
22
- this.log('');
22
+ this.log("");
23
23
  for (const { _id, _source } of result.hits) {
24
24
  this.log(` - Key "${_id}"`);
25
25
  this.log(` Description: ${_source.description}`);
@@ -29,11 +29,9 @@ class ApiKeySearch extends common_1.Kommand {
29
29
  }
30
30
  }
31
31
  }
32
- ApiKeySearch.description = 'Lists a user\'s API Keys.';
32
+ ApiKeySearch.description = "Lists a user's API Keys.";
33
33
  ApiKeySearch.flags = Object.assign({ help: command_1.flags.help(), filter: command_1.flags.string({
34
- description: 'Filter to match the API Key descriptions',
34
+ description: "Filter to match the API Key descriptions",
35
35
  }) }, kuzzle_1.kuzzleFlags);
36
- ApiKeySearch.args = [
37
- { name: 'user', description: 'User kuid', required: true },
38
- ];
36
+ ApiKeySearch.args = [{ name: "user", description: "User kuid", required: true }];
39
37
  exports.default = ApiKeySearch;
@@ -1,5 +1,5 @@
1
- import { flags } from '@oclif/command';
2
- import { Kommand } from '../../common';
1
+ import { flags } from "@oclif/command";
2
+ import { Kommand } from "../../common";
3
3
  export default class DebugProxy extends Kommand {
4
4
  static description: string;
5
5
  static flags: {
@@ -10,7 +10,7 @@ export default class DebugProxy extends Kommand {
10
10
  password: flags.IOptionFlag<string | undefined>;
11
11
  protocol: flags.IOptionFlag<string>;
12
12
  as: flags.IOptionFlag<string | undefined>;
13
- 'api-key': flags.IOptionFlag<string | undefined>;
13
+ "api-key": flags.IOptionFlag<string | undefined>;
14
14
  help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
15
  forwardPort: import("@oclif/parser/lib/flags").IOptionFlag<number>;
16
16
  ttl: flags.IOptionFlag<string>;