kourou 1.4.0-dev.2 → 1.4.0-dev.4

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 (73) hide show
  1. package/README.md +1 -1
  2. package/lib/commands/app/debug-proxy.js +3 -3
  3. package/lib/commands/app/doctor.js +10 -7
  4. package/lib/commands/app/scaffold.js +4 -4
  5. package/lib/commands/app/start-services.js +6 -6
  6. package/lib/commands/collection/create.js +1 -1
  7. package/lib/commands/collection/export.js +3 -3
  8. package/lib/commands/collection/import.js +3 -3
  9. package/lib/commands/collection/migrate.js +7 -8
  10. package/lib/commands/config/diff.js +5 -4
  11. package/lib/commands/document/search.js +1 -1
  12. package/lib/commands/es/aliases/cat.d.ts +2 -2
  13. package/lib/commands/es/aliases/cat.js +10 -10
  14. package/lib/commands/es/indices/cat.js +2 -2
  15. package/lib/commands/es/indices/get.js +1 -1
  16. package/lib/commands/es/indices/insert.js +1 -1
  17. package/lib/commands/es/migrate.js +8 -10
  18. package/lib/commands/es/snapshot/create-repository.js +1 -1
  19. package/lib/commands/es/snapshot/create.js +1 -1
  20. package/lib/commands/es/snapshot/list.js +1 -1
  21. package/lib/commands/es/snapshot/restore.js +1 -1
  22. package/lib/commands/file/decrypt.js +2 -2
  23. package/lib/commands/file/encrypt.js +2 -2
  24. package/lib/commands/file/test.js +2 -2
  25. package/lib/commands/import.js +3 -3
  26. package/lib/commands/index/export.js +4 -4
  27. package/lib/commands/index/import.js +3 -3
  28. package/lib/commands/instance/kill.js +8 -8
  29. package/lib/commands/instance/list.js +6 -1
  30. package/lib/commands/instance/logs.js +1 -1
  31. package/lib/commands/instance/spawn.js +10 -11
  32. package/lib/commands/paas/login.js +8 -11
  33. package/lib/commands/profile/export.js +3 -3
  34. package/lib/commands/profile/import.js +2 -2
  35. package/lib/commands/realtime/subscribe.js +2 -3
  36. package/lib/commands/redis/list-keys.js +1 -1
  37. package/lib/commands/role/export.js +3 -3
  38. package/lib/commands/role/import.js +2 -2
  39. package/lib/commands/sdk/execute.js +5 -4
  40. package/lib/commands/sdk/query.js +2 -2
  41. package/lib/commands/user/export-mappings.js +3 -3
  42. package/lib/commands/user/export.js +5 -5
  43. package/lib/commands/user/import-mappings.js +2 -2
  44. package/lib/commands/user/import.js +2 -2
  45. package/lib/commands/vault/add.js +3 -3
  46. package/lib/commands/vault/decrypt.js +2 -2
  47. package/lib/commands/vault/encrypt.js +3 -3
  48. package/lib/commands/vault/show.js +3 -3
  49. package/lib/commands/vault/test.js +1 -1
  50. package/lib/common.js +12 -12
  51. package/lib/hooks/command_not_found/api-action.js +5 -3
  52. package/lib/index.js +0 -1
  53. package/lib/support/PaasKommand.d.ts +1 -1
  54. package/lib/support/PaasKommand.js +2 -2
  55. package/lib/support/docker/checkPrerequisites.js +2 -3
  56. package/lib/support/dump-collection.js +7 -11
  57. package/lib/support/editor.js +2 -2
  58. package/lib/support/emoji.d.ts +17 -0
  59. package/lib/support/emoji.js +20 -0
  60. package/lib/support/execute.d.ts +1 -2
  61. package/lib/support/execute.js +2 -2
  62. package/lib/support/kuzzle.d.ts +0 -1
  63. package/lib/support/kuzzle.js +2 -2
  64. package/lib/support/migrate/providers/bulk.js +2 -3
  65. package/lib/support/migrate/providers/elasticsearch7.js +6 -8
  66. package/lib/support/migrate/providers/elasticsearch8.js +6 -8
  67. package/lib/support/migrate/providers/elasticsearchTypes.d.ts +1 -1
  68. package/lib/support/migrate/providers/file.js +7 -8
  69. package/lib/support/migrate/providers/index.js +6 -13
  70. package/lib/support/migrate/types.d.ts +1 -1
  71. package/lib/support/restore-collection.js +6 -7
  72. package/lib/support/restore-securities.js +31 -12
  73. package/package.json +16 -24
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkPrerequisites = void 0;
3
+ exports.checkPrerequisites = checkPrerequisites;
4
4
  const tslib_1 = require("tslib");
5
- const listr_1 = (0, tslib_1.__importDefault)(require("listr"));
5
+ const listr_1 = tslib_1.__importDefault(require("listr"));
6
6
  const execute_1 = require("../execute");
7
7
  async function checkPrerequisites(ctx) {
8
8
  const checks = new listr_1.default([
@@ -28,4 +28,3 @@ async function checkPrerequisites(ctx) {
28
28
  return false;
29
29
  }
30
30
  }
31
- exports.checkPrerequisites = checkPrerequisites;
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dumpCollectionMappings = exports.dumpCollectionData = void 0;
3
+ exports.dumpCollectionData = dumpCollectionData;
4
+ exports.dumpCollectionMappings = dumpCollectionMappings;
4
5
  const tslib_1 = require("tslib");
5
- const fs_1 = (0, tslib_1.__importDefault)(require("fs"));
6
- const path_1 = (0, tslib_1.__importDefault)(require("path"));
7
- const cli_ux_1 = (0, tslib_1.__importDefault)(require("cli-ux"));
8
- const ndjson_1 = (0, tslib_1.__importDefault)(require("ndjson"));
6
+ const fs_1 = tslib_1.__importDefault(require("fs"));
7
+ const path_1 = tslib_1.__importDefault(require("path"));
8
+ const cli_ux_1 = tslib_1.__importDefault(require("cli-ux"));
9
+ const ndjson_1 = tslib_1.__importDefault(require("ndjson"));
9
10
  const common_1 = require("../common");
10
11
  /**
11
12
  * Flatten an object transform:
@@ -64,15 +65,12 @@ class AbstractDumper {
64
65
  *
65
66
  * @returns void
66
67
  */
67
- // eslint-disable-next-line @typescript-eslint/no-empty-function
68
68
  async setup() { }
69
69
  /**
70
70
  * One-shot call before iterating over the data. Can be
71
71
  * used to write the header of the dumped output.
72
72
  */
73
- // eslint-disable-next-line @typescript-eslint/no-empty-function
74
73
  async writeHeader() { }
75
- // eslint-disable-next-line @typescript-eslint/no-empty-function
76
74
  async tearDown() { }
77
75
  /**
78
76
  * The loop that iterates over the documents of the collection and
@@ -235,7 +233,6 @@ async function dumpCollectionData(sdk, index, collection, batchSize, destPath, q
235
233
  return dumper.dump();
236
234
  }
237
235
  }
238
- exports.dumpCollectionData = dumpCollectionData;
239
236
  async function dumpCollectionMappings(sdk, index, collection, destPath, format = "jsonl") {
240
237
  const collectionDir = path_1.default.join(destPath, collection);
241
238
  const filename = path_1.default.join(collectionDir, "mappings.json");
@@ -246,7 +243,7 @@ async function dumpCollectionMappings(sdk, index, collection, destPath, format =
246
243
  content: {
247
244
  [index]: {
248
245
  [collection]: {
249
- mappings
246
+ mappings,
250
247
  // For later use, we could add the settings here
251
248
  // eg: "settings": { "index.mapping.total_fields.limit": 10000 }
252
249
  // This can be added after the dump and it will work with kourou:import command
@@ -256,4 +253,3 @@ async function dumpCollectionMappings(sdk, index, collection, destPath, format =
256
253
  };
257
254
  fs_1.default.writeFileSync(filename, JSON.stringify(format.toLowerCase() === "jsonl" ? dump : mappings, null, 2));
258
255
  }
259
- exports.dumpCollectionMappings = dumpCollectionMappings;
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Editor = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const fs_1 = (0, tslib_1.__importDefault)(require("fs"));
5
+ const fs_1 = tslib_1.__importDefault(require("fs"));
6
6
  const child_process_1 = require("child_process");
7
- const tmp_1 = (0, tslib_1.__importDefault)(require("tmp"));
7
+ const tmp_1 = tslib_1.__importDefault(require("tmp"));
8
8
  class Editor {
9
9
  constructor(content = "", options = {}) {
10
10
  this._content = content;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The glyphs kourou prints.
3
+ *
4
+ * These used to come from `node-emoji`, but every call site passed a string
5
+ * literal, so the lookup resolved to a constant anyway: the package shipped a
6
+ * full emoji database, and a `string | undefined` return type, for these seven
7
+ * characters.
8
+ */
9
+ export declare const emoji: {
10
+ readonly boom: "💥";
11
+ readonly fire: "🔥";
12
+ readonly okHand: "👌";
13
+ readonly rocket: "🚀";
14
+ readonly shrug: "🤷";
15
+ readonly thumbsDown: "👎";
16
+ readonly thumbsUp: "👍";
17
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emoji = void 0;
4
+ /**
5
+ * The glyphs kourou prints.
6
+ *
7
+ * These used to come from `node-emoji`, but every call site passed a string
8
+ * literal, so the lookup resolved to a constant anyway: the package shipped a
9
+ * full emoji database, and a `string | undefined` return type, for these seven
10
+ * characters.
11
+ */
12
+ exports.emoji = {
13
+ boom: "💥",
14
+ fire: "🔥",
15
+ okHand: "👌",
16
+ rocket: "🚀",
17
+ shrug: "🤷",
18
+ thumbsDown: "👎",
19
+ thumbsUp: "👍",
20
+ };
@@ -1,9 +1,8 @@
1
- /// <reference types="node" />
2
1
  import { ChildProcess } from "child_process";
3
2
  interface ProcessExecutor<T> extends Promise<T> {
4
3
  process: ChildProcess;
5
4
  }
6
- declare type ExecutionResult = {
5
+ type ExecutionResult = {
7
6
  stdout: string;
8
7
  stderr: string;
9
8
  exitCode: number;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.execute = exports.ExecutionError = void 0;
3
+ exports.ExecutionError = void 0;
4
+ exports.execute = execute;
4
5
  const child_process_1 = require("child_process");
5
6
  class ExecutionError extends Error {
6
7
  constructor(stderr, stdout, code, command) {
@@ -48,4 +49,3 @@ function execute(...args) {
48
49
  executor.process = process;
49
50
  return executor;
50
51
  }
51
- exports.execute = execute;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import http from "http";
3
2
  import { flags } from "@oclif/command";
4
3
  import { Kuzzle, JSONObject } from "kuzzle-sdk";
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KuzzleSDK = exports.kuzzleFlags = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const http_1 = (0, tslib_1.__importDefault)(require("http"));
6
- const https_1 = (0, tslib_1.__importDefault)(require("https"));
5
+ const http_1 = tslib_1.__importDefault(require("http"));
6
+ const https_1 = tslib_1.__importDefault(require("https"));
7
7
  const command_1 = require("@oclif/command");
8
8
  const kuzzle_sdk_1 = require("kuzzle-sdk");
9
9
  const SECOND = 1000;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.throwOnBulkErrors = exports.chunkDocuments = void 0;
3
+ exports.chunkDocuments = chunkDocuments;
4
+ exports.throwOnBulkErrors = throwOnBulkErrors;
4
5
  const DEFAULT_CHUNK_SIZE = 1000;
5
6
  /**
6
7
  * Splits documents into chunks so a bulk request never exceeds the
@@ -12,7 +13,6 @@ function* chunkDocuments(docs, chunkSize = DEFAULT_CHUNK_SIZE) {
12
13
  yield docs.slice(i, i + size);
13
14
  }
14
15
  }
15
- exports.chunkDocuments = chunkDocuments;
16
16
  /**
17
17
  * A bulk request answers with a 200 even when some documents were rejected,
18
18
  * so the per-item errors have to be checked explicitly.
@@ -35,4 +35,3 @@ function throwOnBulkErrors(response) {
35
35
  }));
36
36
  throw error;
37
37
  }
38
- exports.throwOnBulkErrors = throwOnBulkErrors;
@@ -13,7 +13,7 @@ class Elasticsearch7 {
13
13
  this.options = options;
14
14
  }
15
15
  extractCredentials(url) {
16
- let auth = undefined;
16
+ let auth;
17
17
  if (url.includes("@")) {
18
18
  const urlCleaned = url.replace(/https?:\/\//, "");
19
19
  const [credentials] = urlCleaned.split("@");
@@ -85,13 +85,11 @@ class Elasticsearch7 {
85
85
  scrollId: body._scroll_id,
86
86
  };
87
87
  }
88
- else {
89
- const { body: { hits }, } = await this.client.scroll({
90
- scroll_id: args.scrollId,
91
- scroll: this.options.scrollDuration,
92
- });
93
- return hits.hits;
94
- }
88
+ const { body: { hits }, } = await this.client.scroll({
89
+ scroll_id: args.scrollId,
90
+ scroll: this.options.scrollDuration,
91
+ });
92
+ return hits.hits;
95
93
  }
96
94
  async writeData(index, docs) {
97
95
  let count = 0;
@@ -13,7 +13,7 @@ class Elasticsearch8 {
13
13
  this.options = options;
14
14
  }
15
15
  extractCredentials(url) {
16
- let auth = undefined;
16
+ let auth;
17
17
  if (url.includes("@")) {
18
18
  const urlCleaned = url.replace(/https?:\/\//, "");
19
19
  const [credentials] = urlCleaned.split("@");
@@ -87,13 +87,11 @@ class Elasticsearch8 {
87
87
  scrollId: body._scroll_id,
88
88
  };
89
89
  }
90
- else {
91
- const { hits, } = await this.client.scroll({
92
- scroll_id: args.scrollId,
93
- scroll: this.options.scrollDuration,
94
- });
95
- return hits.hits;
96
- }
90
+ const { hits } = await this.client.scroll({
91
+ scroll_id: args.scrollId,
92
+ scroll: this.options.scrollDuration,
93
+ });
94
+ return hits.hits;
97
95
  }
98
96
  async writeData(index, docs) {
99
97
  let count = 0;
@@ -1,4 +1,4 @@
1
- export declare type ElasticsearchProviderOptions = {
1
+ export type ElasticsearchProviderOptions = {
2
2
  scrollDuration: string;
3
3
  batchSize: number;
4
4
  };
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fileExists = exports.File = void 0;
3
+ exports.File = void 0;
4
+ exports.fileExists = fileExists;
4
5
  const tslib_1 = require("tslib");
5
6
  const fs_1 = require("fs");
6
- const fs_2 = (0, tslib_1.__importDefault)(require("fs"));
7
+ const fs_2 = tslib_1.__importDefault(require("fs"));
7
8
  class File {
8
9
  constructor(path) {
9
10
  this.path = path;
@@ -35,10 +36,9 @@ class File {
35
36
  const content = await fs_1.promises.readFile(this.getIndexDataFile(index));
36
37
  const data = content
37
38
  .toString()
38
- .replace(/\r\n/g, '\n') // Normalize line endings Windows -> Unix
39
- .split('\n')
40
- .map((line) => line
41
- .trim()) // Remove trailing spaces
39
+ .replace(/\r\n/g, "\n") // Normalize line endings Windows -> Unix
40
+ .split("\n")
41
+ .map((line) => line.trim()) // Remove trailing spaces
42
42
  .filter((line) => line.length > 0) // Remove empty lines
43
43
  .map((line) => JSON.parse(line));
44
44
  return {
@@ -67,8 +67,7 @@ function fileExists(filePath) {
67
67
  fs_2.default.accessSync(filePath, fs_1.constants.F_OK);
68
68
  return true;
69
69
  }
70
- catch (error) {
70
+ catch (_a) {
71
71
  return false;
72
72
  }
73
73
  }
74
- exports.fileExists = fileExists;
@@ -1,18 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isURL = void 0;
3
+ exports.isURL = isURL;
4
4
  const tslib_1 = require("tslib");
5
- (0, tslib_1.__exportStar)(require("./bulk"), exports);
6
- (0, tslib_1.__exportStar)(require("./elasticsearch7"), exports);
7
- (0, tslib_1.__exportStar)(require("./elasticsearch8"), exports);
8
- (0, tslib_1.__exportStar)(require("./file"), exports);
5
+ tslib_1.__exportStar(require("./bulk"), exports);
6
+ tslib_1.__exportStar(require("./elasticsearch7"), exports);
7
+ tslib_1.__exportStar(require("./elasticsearch8"), exports);
8
+ tslib_1.__exportStar(require("./file"), exports);
9
9
  function isURL(str) {
10
- try {
11
- new URL(str);
12
- return true;
13
- }
14
- catch (error) {
15
- return false;
16
- }
10
+ return URL.canParse(str);
17
11
  }
18
- exports.isURL = isURL;
@@ -1,4 +1,4 @@
1
- export declare type IndexSpecification = {
1
+ export type IndexSpecification = {
2
2
  name: string;
3
3
  aliases: {
4
4
  [key: string]: any;
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.restoreCollectionMappings = exports.restoreCollectionData = void 0;
3
+ exports.restoreCollectionData = restoreCollectionData;
4
+ exports.restoreCollectionMappings = restoreCollectionMappings;
4
5
  const tslib_1 = require("tslib");
5
- const fs_1 = (0, tslib_1.__importDefault)(require("fs"));
6
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
- const ndjson_1 = (0, tslib_1.__importDefault)(require("ndjson"));
6
+ const fs_1 = tslib_1.__importDefault(require("fs"));
7
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
8
+ const ndjson_1 = tslib_1.__importDefault(require("ndjson"));
8
9
  function handleError(log, dumpFile, error) {
9
10
  if (error.errors) {
10
11
  const errorFile = `${dumpFile
@@ -13,7 +14,7 @@ function handleError(log, dumpFile, error) {
13
14
  .join(".")}-errors.jsonl`;
14
15
  const writeStream = fs_1.default.createWriteStream(errorFile, { flags: "a" });
15
16
  for (const partialError of error.errors) {
16
- writeStream.write(JSON.stringify(partialError) + '\n');
17
+ writeStream.write(JSON.stringify(partialError) + "\n");
17
18
  }
18
19
  writeStream.end();
19
20
  log(chalk_1.default.red(`[X] Error importing ${dumpFile}. See errors in ${errorFile}`));
@@ -116,7 +117,6 @@ async function restoreCollectionData(sdk, log, batchSize, dumpFile, index, colle
116
117
  index: mWriteRequest.index,
117
118
  };
118
119
  }
119
- exports.restoreCollectionData = restoreCollectionData;
120
120
  /**
121
121
  * Imports mappings from a collection mappings dump
122
122
  * Expected format:
@@ -154,4 +154,3 @@ async function restoreCollectionMappings(sdk, dump, index, collection) {
154
154
  collection: dstCollection,
155
155
  };
156
156
  }
157
- exports.restoreCollectionMappings = restoreCollectionMappings;
@@ -1,10 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.restoreUsers = exports.restoreProfiles = exports.restoreRoles = void 0;
3
+ exports.restoreRoles = restoreRoles;
4
+ exports.restoreProfiles = restoreProfiles;
5
+ exports.restoreUsers = restoreUsers;
4
6
  const tslib_1 = require("tslib");
5
- const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
6
- const bluebird_1 = (0, tslib_1.__importDefault)(require("bluebird"));
7
+ const lodash_1 = tslib_1.__importDefault(require("lodash"));
7
8
  const sleep = (seconds) => new Promise((resolve) => setTimeout(resolve, seconds * 1000));
9
+ /**
10
+ * Applies `fn` to every item, `concurrency` at a time, and returns the results
11
+ * in input order. Rejects on the first failure, like `Promise.all`, and stops
12
+ * feeding the workers once that happens.
13
+ */
14
+ async function mapWithConcurrency(items, fn, concurrency) {
15
+ const results = new Array(items.length);
16
+ let next = 0;
17
+ const worker = async () => {
18
+ while (next < items.length) {
19
+ const index = next;
20
+ next += 1;
21
+ results[index] = await fn(items[index]);
22
+ }
23
+ };
24
+ await Promise.all(Array.from({ length: Math.min(concurrency, items.length) }, worker));
25
+ return results;
26
+ }
8
27
  async function restoreRoles(kommand, dump, preserveAnonymous = false) {
9
28
  if (dump.type !== "roles") {
10
29
  throw new Error("Dump file does not contain roles definition");
@@ -27,30 +46,30 @@ async function restoreRoles(kommand, dump, preserveAnonymous = false) {
27
46
  kommand.logInfo("Anonymous user rights has been preserved.");
28
47
  delete dump.content.anonymous;
29
48
  }
30
- const results = await bluebird_1.default.map(Object.entries(dump.content), ([roleId, role]) => kommand.sdk.security.createOrReplaceRole(roleId, role, { force: true }), { concurrency: 10 });
49
+ const results = await mapWithConcurrency(Object.entries(dump.content), ([roleId, role]) => kommand.sdk.security.createOrReplaceRole(roleId, role, { force: true }), 10);
31
50
  return results.length;
32
51
  }
33
- exports.restoreRoles = restoreRoles;
34
52
  async function restoreProfiles(kommand, dump) {
35
53
  if (dump.type !== "profiles") {
36
54
  throw new Error("Dump file does not contain profiles definition");
37
55
  }
38
- const results = await bluebird_1.default.map(Object.entries(dump.content), ([profileId, profile]) => kommand.sdk.security.createOrReplaceProfile(profileId, profile, {
56
+ const results = await mapWithConcurrency(Object.entries(dump.content), ([profileId, profile]) => kommand.sdk.security.createOrReplaceProfile(profileId, profile, {
39
57
  force: true,
40
- }), { concurrency: 10 });
58
+ }), 10);
41
59
  return results.length;
42
60
  }
43
- exports.restoreProfiles = restoreProfiles;
44
61
  async function restoreUsers(kommand, dump) {
45
62
  if (dump.type !== "users") {
46
63
  throw new Error("Dump file does not contain users definition");
47
64
  }
48
- const results = await bluebird_1.default.map(Object.entries(dump.content), ([userId, userBody]) => {
65
+ const results = await mapWithConcurrency(Object.entries(dump.content), ([userId, userBody]) => {
49
66
  return kommand.sdk.security
50
67
  .createUser(userId, userBody)
51
68
  .then(() => true)
52
- .catch((error) => kommand.logKo(`Error importing user ${userId}: ${error.message}`));
53
- }, { concurrency: 10 });
69
+ .catch((error) => {
70
+ kommand.logKo(`Error importing user ${userId}: ${error.message}`);
71
+ return false;
72
+ });
73
+ }, 10);
54
74
  return results.filter((success) => success).length;
55
75
  }
56
- exports.restoreUsers = restoreUsers;
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": "1.4.0-dev.2",
4
+ "version": "1.4.0-dev.4",
5
5
  "author": "The Kuzzle Team <support@kuzzle.io>",
6
6
  "bin": {
7
7
  "kourou": "./bin/run"
@@ -12,8 +12,8 @@
12
12
  "dev": "./bin/run",
13
13
  "postpack": "rm -f oclif.manifest.json",
14
14
  "version": "oclif-dev readme && git add README.md",
15
- "test:lint": "eslint src/ test/ --ext .ts",
16
- "test:lint:fix": "eslint src/ test/ --ext .ts --fix",
15
+ "test:lint": "eslint src/ test/",
16
+ "test:lint:fix": "eslint src/ test/ --fix",
17
17
  "test:functional": "npm run build && npm run test:functional:stdout && npm run test:functional:cucumber",
18
18
  "test:functional:stdout": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
19
19
  "test:functional:cucumber": "./node_modules/.bin/cucumber-js --fail-fast"
@@ -25,7 +25,6 @@
25
25
  "@oclif/config": "1.18.*",
26
26
  "@oclif/plugin-autocomplete": "1.3.*",
27
27
  "@oclif/plugin-help": "3.2.2",
28
- "bluebird": "3.7.2",
29
28
  "chalk": "4.1.2",
30
29
  "cli-ux": "5.5.1",
31
30
  "inquirer": "8.2.7",
@@ -35,47 +34,40 @@
35
34
  "listr": "0.14.3",
36
35
  "lodash": "4.18.1",
37
36
  "ndjson": "2.0.0",
38
- "node-emoji": "1.11.0",
39
- "node-fetch": "2.7.0",
40
37
  "strip-json-comments": "3.1.1",
41
38
  "tmp": "0.2.7",
42
39
  "tslib": "2.8.1",
43
- "ws": "8.21.1",
44
- "typescript": "4.4.*"
40
+ "ws": "8.21.3",
41
+ "typescript": "5.9.*"
45
42
  },
46
43
  "devDependencies": {
44
+ "@cucumber/cucumber": "13.2.1",
47
45
  "@istanbuljs/nyc-config-typescript": "1.0.2",
48
46
  "@oclif/dev-cli": "1.26.10",
49
47
  "@oclif/test": "1.2.8",
50
- "@types/bluebird": "3.5.42",
51
48
  "@types/chai": "4.3.20",
52
49
  "@types/compare-version": "0.1.34",
53
50
  "@types/inquirer": "8.2.13",
54
51
  "@types/listr": "0.14.10",
55
- "@types/mocha": "8.2.3",
52
+ "@types/mocha": "10.0.10",
56
53
  "@types/ndjson": "2.0.4",
57
- "@types/node": "20.14.15",
58
- "@types/node-emoji": "1.8.2",
59
- "@types/node-fetch": "2.6.13",
54
+ "@types/node": "22.20.1",
60
55
  "@types/tmp": "0.2.6",
61
56
  "@types/ws": "8.18.1",
62
- "@typescript-eslint/eslint-plugin": "4.33.0",
63
- "@typescript-eslint/parser": "4.33.0",
64
57
  "chai": "4.5.0",
65
- "cucumber": "6.0.7",
66
- "eslint": "7.32.0",
58
+ "eslint": "9.32.0",
59
+ "eslint-plugin-kuzzle": "1.0.0",
67
60
  "globby": "11.1.0",
68
- "mocha": "8.4.0",
61
+ "mocha": "12.0.0",
69
62
  "nyc": "15.1.0",
70
- "prettier-eslint": "12.0.0",
63
+ "semantic-release": "25.0.8",
64
+ "semantic-release-config-kuzzle": "1.7.0",
71
65
  "should": "13.2.3",
72
66
  "source-map-support": "0.5.21",
73
- "ts-node": "10.9.*",
74
- "semantic-release": "25.0.8",
75
- "semantic-release-config-kuzzle": "1.7.0"
67
+ "ts-node": "10.9.*"
76
68
  },
77
69
  "engines": {
78
- "node": ">=20.0.0"
70
+ "node": ">=22.0.0"
79
71
  },
80
72
  "files": [
81
73
  "/bin",
@@ -140,7 +132,7 @@
140
132
  "repository": "kuzzleio/kourou",
141
133
  "types": "lib/index.d.ts",
142
134
  "overrides": {
143
- "ws@8": "8.21.1",
135
+ "ws@8": "8.21.3",
144
136
  "cross-spawn@6": "6.0.6",
145
137
  "semver@5": "5.7.2",
146
138
  "picomatch@2": "2.3.2",