kourou 0.24.0 → 0.24.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.
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.0 darwin-x64 node-v14.18.2
29
+ kourou/0.24.1 linux-x64 node-v16.13.2
30
30
  $ kourou --help [COMMAND]
31
31
  USAGE
32
32
  $ kourou COMMAND
@@ -198,7 +198,6 @@ OPTIONS
198
198
  --port=port [default: 7512] Kuzzle server port
199
199
  --protocol=protocol [default: ws] Kuzzle protocol (http or ws)
200
200
  --ssl Use SSL to connect to Kuzzle
201
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
202
201
  --username=username [default: anonymous] Kuzzle username (local strategy)
203
202
 
204
203
  EXAMPLE
@@ -230,7 +229,6 @@ OPTIONS
230
229
  --port=port [default: 7512] Kuzzle server port
231
230
  --protocol=protocol [default: ws] Kuzzle protocol (http or ws)
232
231
  --ssl Use SSL to connect to Kuzzle
233
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
234
232
  --username=username [default: anonymous] Kuzzle username (local strategy)
235
233
  ```
236
234
 
@@ -257,7 +255,6 @@ OPTIONS
257
255
  --port=port [default: 7512] Kuzzle server port
258
256
  --protocol=protocol [default: ws] Kuzzle protocol (http or ws)
259
257
  --ssl Use SSL to connect to Kuzzle
260
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
261
258
  --username=username [default: anonymous] Kuzzle username (local strategy)
262
259
 
263
260
  EXAMPLE
@@ -287,7 +284,6 @@ OPTIONS
287
284
  --port=port [default: 7512] Kuzzle server port
288
285
  --protocol=protocol [default: ws] Kuzzle protocol (http or ws)
289
286
  --ssl Use SSL to connect to Kuzzle
290
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
291
287
  --username=username [default: anonymous] Kuzzle username (local strategy)
292
288
  ```
293
289
 
@@ -385,7 +381,7 @@ EXAMPLES
385
381
  $ kourou autocomplete --refresh-cache
386
382
  ```
387
383
 
388
- _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.3.0/src/commands/autocomplete/index.ts)_
384
+ _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.2.0/src/commands/autocomplete/index.ts)_
389
385
 
390
386
  ## `kourou collection:create INDEX COLLECTION [BODY]`
391
387
 
@@ -409,7 +405,6 @@ OPTIONS
409
405
  --port=port [default: 7512] Kuzzle server port
410
406
  --protocol=protocol [default: ws] Kuzzle protocol (http or ws)
411
407
  --ssl Use SSL to connect to Kuzzle
412
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
413
408
  --username=username [default: anonymous] Kuzzle username (local strategy)
414
409
  ```
415
410
 
@@ -482,9 +477,6 @@ OPTIONS
482
477
  --ssl
483
478
  Use SSL to connect to Kuzzle
484
479
 
485
- --ttl=ttl
486
- [default: 90] Kuzzle login TTL (in seconds)
487
-
488
480
  --username=username
489
481
  [default: anonymous] Kuzzle username (local strategy)
490
482
 
@@ -519,7 +511,6 @@ OPTIONS
519
511
  --port=port [default: 7512] Kuzzle server port
520
512
  --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
521
513
  --ssl Use SSL to connect to Kuzzle
522
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
523
514
  --username=username [default: anonymous] Kuzzle username (local strategy)
524
515
  ```
525
516
 
@@ -575,7 +566,6 @@ OPTIONS
575
566
  --size=size Optional page size
576
567
  --sort=sort [default: {}] Sort in JS or JSON format.
577
568
  --ssl Use SSL to connect to Kuzzle
578
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
579
569
  --username=username [default: anonymous] Kuzzle username (local strategy)
580
570
 
581
571
  EXAMPLES
@@ -830,7 +820,6 @@ OPTIONS
830
820
  --preserve-anonymous Preserve anonymous rights
831
821
  --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
832
822
  --ssl Use SSL to connect to Kuzzle
833
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
834
823
  --username=username [default: anonymous] Kuzzle username (local strategy)
835
824
  ```
836
825
 
@@ -871,8 +860,6 @@ OPTIONS
871
860
 
872
861
  --ssl Use SSL to connect to Kuzzle
873
862
 
874
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
875
-
876
863
  --username=username [default: anonymous] Kuzzle username (local strategy)
877
864
 
878
865
  EXAMPLES
@@ -905,7 +892,6 @@ OPTIONS
905
892
  --port=port [default: 7512] Kuzzle server port
906
893
  --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
907
894
  --ssl Use SSL to connect to Kuzzle
908
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
909
895
  --username=username [default: anonymous] Kuzzle username (local strategy)
910
896
 
911
897
  EXAMPLES
@@ -1063,7 +1049,6 @@ OPTIONS
1063
1049
  --port=port [default: 7512] Kuzzle server port
1064
1050
  --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
1065
1051
  --ssl Use SSL to connect to Kuzzle
1066
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1067
1052
  --username=username [default: anonymous] Kuzzle username (local strategy)
1068
1053
  ```
1069
1054
 
@@ -1089,7 +1074,6 @@ OPTIONS
1089
1074
  --port=port [default: 7512] Kuzzle server port
1090
1075
  --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
1091
1076
  --ssl Use SSL to connect to Kuzzle
1092
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1093
1077
  --username=username [default: anonymous] Kuzzle username (local strategy)
1094
1078
  ```
1095
1079
 
@@ -1131,8 +1115,6 @@ OPTIONS
1131
1115
 
1132
1116
  --ssl Use SSL to connect to Kuzzle
1133
1117
 
1134
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1135
-
1136
1118
  --username=username [default: anonymous] Kuzzle username (local strategy)
1137
1119
 
1138
1120
  --users=users [default: all] Subscribe to users entering or leaving the room (all, in, out, none)
@@ -1172,7 +1154,6 @@ OPTIONS
1172
1154
  --remove Remove matching keys
1173
1155
  --size=size [default: 100] Page size
1174
1156
  --ssl Use SSL to connect to Kuzzle
1175
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1176
1157
  --username=username [default: anonymous] Kuzzle username (local strategy)
1177
1158
 
1178
1159
  EXAMPLES
@@ -1200,7 +1181,6 @@ OPTIONS
1200
1181
  --port=port [default: 7512] Kuzzle server port
1201
1182
  --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
1202
1183
  --ssl Use SSL to connect to Kuzzle
1203
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1204
1184
  --username=username [default: anonymous] Kuzzle username (local strategy)
1205
1185
  ```
1206
1186
 
@@ -1227,7 +1207,6 @@ OPTIONS
1227
1207
  --preserve-anonymous Preserve anonymous rights
1228
1208
  --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
1229
1209
  --ssl Use SSL to connect to Kuzzle
1230
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1231
1210
  --username=username [default: anonymous] Kuzzle username (local strategy)
1232
1211
  ```
1233
1212
 
@@ -1257,7 +1236,6 @@ OPTIONS
1257
1236
  --print-raw Print only the script result to stdout
1258
1237
  --protocol=protocol [default: ws] Kuzzle protocol (http or ws)
1259
1238
  --ssl Use SSL to connect to Kuzzle
1260
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1261
1239
  --username=username [default: anonymous] Kuzzle username (local strategy)
1262
1240
 
1263
1241
  DESCRIPTION
@@ -1331,8 +1309,6 @@ OPTIONS
1331
1309
 
1332
1310
  --ssl Use SSL to connect to Kuzzle
1333
1311
 
1334
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1335
-
1336
1312
  --username=username [default: anonymous] Kuzzle username (local strategy)
1337
1313
 
1338
1314
  DESCRIPTION
@@ -1415,7 +1391,6 @@ OPTIONS
1415
1391
  --port=port [default: 7512] Kuzzle server port
1416
1392
  --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
1417
1393
  --ssl Use SSL to connect to Kuzzle
1418
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1419
1394
  --username=username [default: anonymous] Kuzzle username (local strategy)
1420
1395
 
1421
1396
  DESCRIPTION
@@ -1464,7 +1439,6 @@ OPTIONS
1464
1439
  --port=port [default: 7512] Kuzzle server port
1465
1440
  --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
1466
1441
  --ssl Use SSL to connect to Kuzzle
1467
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1468
1442
  --username=username [default: anonymous] Kuzzle username (local strategy)
1469
1443
  ```
1470
1444
 
@@ -1490,7 +1464,6 @@ OPTIONS
1490
1464
  --port=port [default: 7512] Kuzzle server port
1491
1465
  --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
1492
1466
  --ssl Use SSL to connect to Kuzzle
1493
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1494
1467
  --username=username [default: anonymous] Kuzzle username (local strategy)
1495
1468
  ```
1496
1469
 
@@ -1516,7 +1489,6 @@ OPTIONS
1516
1489
  --port=port [default: 7512] Kuzzle server port
1517
1490
  --protocol=protocol [default: ws] Kuzzle protocol (http or websocket)
1518
1491
  --ssl Use SSL to connect to Kuzzle
1519
- --ttl=ttl [default: 90] Kuzzle login TTL (in seconds)
1520
1492
  --username=username [default: anonymous] Kuzzle username (local strategy)
1521
1493
  ```
1522
1494
 
@@ -21,9 +21,11 @@ class AppScaffold extends common_1.Kommand {
21
21
  this.logOk(`Scaffolding complete! Use ${chalk_1.default.grey(`cd ${destination} && npm run docker npm install`)} install dependencies and then ${chalk_1.default.grey(`npm run docker:dev`)} to run your application!`);
22
22
  }
23
23
  async cloneTemplate(flavor, destination) {
24
- await (0, execute_1.execute)('git', 'clone', '--depth=1', 'https://github.com/kuzzleio/project-templates', '--branch', flavor, '--single-branch');
25
- await (0, execute_1.execute)('mv', `project-templates/${flavor}`, `${destination}/`);
26
- await (0, execute_1.execute)('rm', '-rf', 'project-templates/');
24
+ const templatesDir = '/tmp/project-templates';
25
+ await (0, execute_1.execute)('rm', '-rf', templatesDir);
26
+ await (0, execute_1.execute)('git', 'clone', '--depth=1', 'https://github.com/kuzzleio/project-templates', '--branch', flavor, '--single-branch', templatesDir);
27
+ await (0, execute_1.execute)('cp', '-r', `${templatesDir}/${flavor}`, `${destination}/`);
28
+ await (0, execute_1.execute)('rm', '-rf', templatesDir);
27
29
  }
28
30
  }
29
31
  exports.default = AppScaffold;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VaultEncrypt = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const fs_1 = tslib_1.__importDefault(require("fs"));
6
+ const path_1 = tslib_1.__importDefault(require("path"));
6
7
  const lodash_1 = tslib_1.__importDefault(require("lodash"));
7
8
  const command_1 = require("@oclif/command");
8
9
  const kuzzle_vault_1 = require("kuzzle-vault");
@@ -15,8 +16,8 @@ class VaultEncrypt extends common_1.Kommand {
15
16
  if (lodash_1.default.isEmpty(this.args.file)) {
16
17
  throw new Error('A secrets file must be provided');
17
18
  }
18
- const [filename, ext] = this.args.file.split('.');
19
- let outputFile = `${filename}.enc.${ext}`;
19
+ const { name, ext } = path_1.default.parse(this.args.file);
20
+ let outputFile = `${name}.enc${ext}`;
20
21
  if (this.flags['output-file']) {
21
22
  outputFile = this.flags['output-file'];
22
23
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kourou",
3
3
  "description": "The CLI that helps you manage your Kuzzle instances",
4
- "version": "0.24.0",
4
+ "version": "0.24.1",
5
5
  "author": "The Kuzzle Team <support@kuzzle.io>",
6
6
  "bin": {
7
7
  "kourou": "./bin/run"