kourou 1.4.0-dev.2 → 1.4.0-dev.3

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 (67) 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 +8 -5
  4. package/lib/commands/app/scaffold.js +3 -3
  5. package/lib/commands/app/start-services.js +4 -4
  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 +6 -8
  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 +5 -5
  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 +6 -6
  32. package/lib/commands/paas/login.js +4 -9
  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 -2
  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 -3
  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 +2 -2
  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 +8 -8
  51. package/lib/hooks/command_not_found/api-action.js +5 -3
  52. package/lib/support/PaasKommand.d.ts +1 -1
  53. package/lib/support/PaasKommand.js +2 -2
  54. package/lib/support/docker/checkPrerequisites.js +1 -1
  55. package/lib/support/dump-collection.js +5 -5
  56. package/lib/support/editor.js +2 -2
  57. package/lib/support/execute.d.ts +1 -1
  58. package/lib/support/kuzzle.js +2 -2
  59. package/lib/support/migrate/providers/elasticsearch7.js +6 -8
  60. package/lib/support/migrate/providers/elasticsearch8.js +6 -8
  61. package/lib/support/migrate/providers/elasticsearchTypes.d.ts +1 -1
  62. package/lib/support/migrate/providers/file.js +4 -5
  63. package/lib/support/migrate/providers/index.js +5 -11
  64. package/lib/support/migrate/types.d.ts +1 -1
  65. package/lib/support/restore-collection.js +4 -4
  66. package/lib/support/restore-securities.js +2 -2
  67. package/package.json +10 -9
@@ -2,17 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isURL = void 0;
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
12
  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;
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.restoreCollectionMappings = exports.restoreCollectionData = void 0;
4
4
  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"));
5
+ const fs_1 = tslib_1.__importDefault(require("fs"));
6
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
+ const ndjson_1 = tslib_1.__importDefault(require("ndjson"));
8
8
  function handleError(log, dumpFile, error) {
9
9
  if (error.errors) {
10
10
  const errorFile = `${dumpFile
@@ -13,7 +13,7 @@ function handleError(log, dumpFile, error) {
13
13
  .join(".")}-errors.jsonl`;
14
14
  const writeStream = fs_1.default.createWriteStream(errorFile, { flags: "a" });
15
15
  for (const partialError of error.errors) {
16
- writeStream.write(JSON.stringify(partialError) + '\n');
16
+ writeStream.write(JSON.stringify(partialError) + "\n");
17
17
  }
18
18
  writeStream.end();
19
19
  log(chalk_1.default.red(`[X] Error importing ${dumpFile}. See errors in ${errorFile}`));
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.restoreUsers = exports.restoreProfiles = exports.restoreRoles = void 0;
4
4
  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"));
5
+ const lodash_1 = tslib_1.__importDefault(require("lodash"));
6
+ const bluebird_1 = tslib_1.__importDefault(require("bluebird"));
7
7
  const sleep = (seconds) => new Promise((resolve) => setTimeout(resolve, seconds * 1000));
8
8
  async function restoreRoles(kommand, dump, preserveAnonymous = false) {
9
9
  if (dump.type !== "roles") {
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.3",
5
5
  "author": "The Kuzzle Team <support@kuzzle.io>",
6
6
  "bin": {
7
7
  "kourou": "./bin/run"
@@ -41,7 +41,7 @@
41
41
  "tmp": "0.2.7",
42
42
  "tslib": "2.8.1",
43
43
  "ws": "8.21.1",
44
- "typescript": "4.4.*"
44
+ "typescript": "5.4.*"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@istanbuljs/nyc-config-typescript": "1.0.2",
@@ -59,20 +59,21 @@
59
59
  "@types/node-fetch": "2.6.13",
60
60
  "@types/tmp": "0.2.6",
61
61
  "@types/ws": "8.18.1",
62
- "@typescript-eslint/eslint-plugin": "4.33.0",
63
- "@typescript-eslint/parser": "4.33.0",
62
+ "@typescript-eslint/eslint-plugin": "7.18.0",
63
+ "@typescript-eslint/parser": "7.18.0",
64
64
  "chai": "4.5.0",
65
65
  "cucumber": "6.0.7",
66
- "eslint": "7.32.0",
66
+ "eslint": "8.57.1",
67
+ "eslint-plugin-kuzzle": "0.0.15",
68
+ "eslint-plugin-prettier": "5.1.3",
67
69
  "globby": "11.1.0",
68
70
  "mocha": "8.4.0",
69
71
  "nyc": "15.1.0",
70
- "prettier-eslint": "12.0.0",
72
+ "semantic-release": "25.0.8",
73
+ "semantic-release-config-kuzzle": "1.7.0",
71
74
  "should": "13.2.3",
72
75
  "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"
76
+ "ts-node": "10.9.*"
76
77
  },
77
78
  "engines": {
78
79
  "node": ">=20.0.0"