kourou 1.3.0 → 1.4.0-dev.2

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
@@ -27,7 +27,7 @@ $ npm install -g kourou
27
27
  $ kourou COMMAND
28
28
  running command...
29
29
  $ kourou (-v|--version|version)
30
- kourou/1.3.0 linux-x64 node-v24.18.0
30
+ kourou/1.4.0-dev.2 linux-x64 node-v24.18.0
31
31
  $ kourou --help [COMMAND]
32
32
  USAGE
33
33
  $ kourou COMMAND
@@ -759,6 +759,9 @@ ARGUMENTS
759
759
  OPTIONS
760
760
  -n, --node=node [default: http://localhost:9200] Elasticsearch server URL
761
761
  --help show CLI help
762
+
763
+ --[no-]wait Wait for the snapshot to complete before returning. Use --no-wait to return as soon as Elasticsearch
764
+ has accepted the request
762
765
  ```
763
766
 
764
767
  _See code: [lib/commands/es/snapshot/create.js](lib/commands/es/snapshot/create.js)_
@@ -816,6 +819,9 @@ ARGUMENTS
816
819
  OPTIONS
817
820
  -n, --node=node [default: http://localhost:9200] Elasticsearch server URL
818
821
  --help show CLI help
822
+
823
+ --[no-]wait Wait for the restore to complete before returning. Use --no-wait to return as soon as Elasticsearch
824
+ has accepted the request
819
825
  ```
820
826
 
821
827
  _See code: [lib/commands/es/snapshot/restore.js](lib/commands/es/snapshot/restore.js)_
@@ -5,6 +5,7 @@ export default class EsSnapshotsCreate extends Kommand {
5
5
  static description: string;
6
6
  static flags: {
7
7
  node: flags.IOptionFlag<string>;
8
+ wait: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
8
9
  help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
9
10
  };
10
11
  static args: {
@@ -3,12 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const command_1 = require("@oclif/command");
4
4
  const sdk_es7_1 = require("sdk-es7");
5
5
  const common_1 = require("../../../common");
6
+ const SNAPSHOT_TIMEOUT = 30 * 60 * 1000;
6
7
  class EsSnapshotsCreate extends common_1.Kommand {
7
8
  async runSafe() {
8
- const esClient = new sdk_es7_1.Client({ node: this.flags.node });
9
+ const esClient = new sdk_es7_1.Client({
10
+ node: this.flags.node,
11
+ // Waiting holds the HTTP request open for as long as the snapshot takes,
12
+ // which the 30s default would cut short on any real dataset.
13
+ requestTimeout: this.flags.wait ? SNAPSHOT_TIMEOUT : undefined,
14
+ });
9
15
  const esRequest = {
10
16
  repository: this.args.repository,
11
17
  snapshot: this.args.name,
18
+ wait_for_completion: this.flags.wait,
12
19
  body: {
13
20
  indices: "*",
14
21
  include_global_state: false,
@@ -28,6 +35,11 @@ EsSnapshotsCreate.flags = {
28
35
  description: "Elasticsearch server URL",
29
36
  default: "http://localhost:9200",
30
37
  }),
38
+ wait: command_1.flags.boolean({
39
+ description: "Wait for the snapshot to complete before returning. Use --no-wait to return as soon as Elasticsearch has accepted the request",
40
+ default: true,
41
+ allowNo: true,
42
+ }),
31
43
  help: command_1.flags.help(),
32
44
  };
33
45
  EsSnapshotsCreate.args = [
@@ -5,6 +5,7 @@ export default class EsSnapshotsRestore extends Kommand {
5
5
  static description: string;
6
6
  static flags: {
7
7
  node: flags.IOptionFlag<string>;
8
+ wait: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
8
9
  help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
9
10
  };
10
11
  static args: {
@@ -3,9 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const command_1 = require("@oclif/command");
4
4
  const sdk_es7_1 = require("sdk-es7");
5
5
  const common_1 = require("../../../common");
6
+ const RESTORE_TIMEOUT = 30 * 60 * 1000;
6
7
  class EsSnapshotsRestore extends common_1.Kommand {
7
8
  async runSafe() {
8
- const esClient = new sdk_es7_1.Client({ node: this.flags.node });
9
+ const esClient = new sdk_es7_1.Client({
10
+ node: this.flags.node,
11
+ // Waiting holds the HTTP request open for as long as the restore takes,
12
+ // which the 30s default would cut short on any real dataset.
13
+ requestTimeout: this.flags.wait ? RESTORE_TIMEOUT : undefined,
14
+ });
9
15
  await esClient.indices.close({
10
16
  index: "*",
11
17
  expand_wildcards: "all",
@@ -13,6 +19,7 @@ class EsSnapshotsRestore extends common_1.Kommand {
13
19
  const esRequest = {
14
20
  repository: this.args.repository,
15
21
  snapshot: this.args.name,
22
+ wait_for_completion: this.flags.wait,
16
23
  body: {
17
24
  feature_states: ["none"],
18
25
  include_global_state: false,
@@ -32,6 +39,11 @@ EsSnapshotsRestore.flags = {
32
39
  description: "Elasticsearch server URL",
33
40
  default: "http://localhost:9200",
34
41
  }),
42
+ wait: command_1.flags.boolean({
43
+ description: "Wait for the restore to complete before returning. Use --no-wait to return as soon as Elasticsearch has accepted the request",
44
+ default: true,
45
+ allowNo: true,
46
+ }),
35
47
  help: command_1.flags.help(),
36
48
  };
37
49
  EsSnapshotsRestore.args = [
@@ -50,7 +50,7 @@ export declare class KuzzleSDK {
50
50
  get document(): import("kuzzle-sdk").DocumentController;
51
51
  get collection(): import("kuzzle-sdk").CollectionController;
52
52
  get index(): import("kuzzle-sdk").IndexController;
53
- get security(): import("kuzzle-sdk/src/controllers/Security").SecurityController;
53
+ get security(): import("kuzzle-sdk/out/src/controllers/Security").SecurityController;
54
54
  get auth(): import("kuzzle-sdk").AuthController;
55
55
  get server(): import("kuzzle-sdk").ServerController;
56
56
  get realtime(): import("kuzzle-sdk").RealtimeController;
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.3.0",
4
+ "version": "1.4.0-dev.2",
5
5
  "author": "The Kuzzle Team <support@kuzzle.io>",
6
6
  "bin": {
7
7
  "kourou": "./bin/run"
@@ -19,67 +19,63 @@
19
19
  "test:functional:cucumber": "./node_modules/.bin/cucumber-js --fail-fast"
20
20
  },
21
21
  "dependencies": {
22
- "sdk-es7": "npm:@elastic/elasticsearch@7.12.0",
23
- "sdk-es8": "npm:@elastic/elasticsearch@8.17.1",
22
+ "sdk-es7": "npm:@elastic/elasticsearch@7.17.14",
23
+ "sdk-es8": "npm:@elastic/elasticsearch@8.19.2",
24
24
  "@oclif/command": "1.8.*",
25
25
  "@oclif/config": "1.18.*",
26
26
  "@oclif/plugin-autocomplete": "1.3.*",
27
27
  "@oclif/plugin-help": "3.2.2",
28
28
  "bluebird": "3.7.2",
29
- "chalk": "4.1.0",
30
- "chrono-node": "2.4.2",
29
+ "chalk": "4.1.2",
31
30
  "cli-ux": "5.5.1",
32
- "inquirer": "8.0.0",
33
- "kepler-companion": "1.1.3",
34
- "kuzzle-sdk": "7.14.0",
35
- "kuzzle-vault": "2.0.4",
31
+ "inquirer": "8.2.7",
32
+ "kepler-companion": "1.1.6",
33
+ "kuzzle-sdk": "7.17.1",
34
+ "kuzzle-vault": "2.1.0",
36
35
  "listr": "0.14.3",
37
- "lodash": "4.17.21",
36
+ "lodash": "4.18.1",
38
37
  "ndjson": "2.0.0",
39
- "node-emoji": "1.10.0",
40
- "node-fetch": "2.6.7",
41
- "production": "0.0.2",
38
+ "node-emoji": "1.11.0",
39
+ "node-fetch": "2.7.0",
42
40
  "strip-json-comments": "3.1.1",
43
- "tar": "6.1.11",
44
- "tmp": "0.2.1",
45
- "tslib": "2.3.1",
46
- "ws": "8.8.0",
41
+ "tmp": "0.2.7",
42
+ "tslib": "2.8.1",
43
+ "ws": "8.21.1",
47
44
  "typescript": "4.4.*"
48
45
  },
49
46
  "devDependencies": {
50
- "@istanbuljs/nyc-config-typescript": "1.0.1",
51
- "@oclif/dev-cli": "1.26.0",
47
+ "@istanbuljs/nyc-config-typescript": "1.0.2",
48
+ "@oclif/dev-cli": "1.26.10",
52
49
  "@oclif/test": "1.2.8",
53
- "@types/bluebird": "3.5.33",
54
- "@types/chai": "4.2.16",
55
- "@types/compare-version": "0.1.31",
56
- "@types/inquirer": "7.3.3",
57
- "@types/listr": "0.14.2",
58
- "@types/mocha": "8.2.2",
59
- "@types/ndjson": "2.0.0",
60
- "@types/node": "18.19.0",
61
- "@types/node-emoji": "1.8.1",
62
- "@types/node-fetch": "2.6.1",
63
- "@types/tar": "6.1.3",
64
- "@types/tmp": "0.2.0",
65
- "@types/ws": "8.5.3",
66
- "@typescript-eslint/eslint-plugin": "4.22.0",
67
- "@typescript-eslint/parser": "4.22.0",
68
- "chai": "4.3.4",
50
+ "@types/bluebird": "3.5.42",
51
+ "@types/chai": "4.3.20",
52
+ "@types/compare-version": "0.1.34",
53
+ "@types/inquirer": "8.2.13",
54
+ "@types/listr": "0.14.10",
55
+ "@types/mocha": "8.2.3",
56
+ "@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",
60
+ "@types/tmp": "0.2.6",
61
+ "@types/ws": "8.18.1",
62
+ "@typescript-eslint/eslint-plugin": "4.33.0",
63
+ "@typescript-eslint/parser": "4.33.0",
64
+ "chai": "4.5.0",
69
65
  "cucumber": "6.0.7",
70
- "eslint": "7.24.0",
71
- "globby": "11.0.3",
72
- "mocha": "8.3.2",
66
+ "eslint": "7.32.0",
67
+ "globby": "11.1.0",
68
+ "mocha": "8.4.0",
73
69
  "nyc": "15.1.0",
74
70
  "prettier-eslint": "12.0.0",
75
71
  "should": "13.2.3",
76
- "source-map-support": "0.5.19",
72
+ "source-map-support": "0.5.21",
77
73
  "ts-node": "10.9.*",
78
74
  "semantic-release": "25.0.8",
79
75
  "semantic-release-config-kuzzle": "1.7.0"
80
76
  },
81
77
  "engines": {
82
- "node": ">=18.0.0"
78
+ "node": ">=20.0.0"
83
79
  },
84
80
  "files": [
85
81
  "/bin",
@@ -142,5 +138,13 @@
142
138
  }
143
139
  },
144
140
  "repository": "kuzzleio/kourou",
145
- "types": "lib/index.d.ts"
141
+ "types": "lib/index.d.ts",
142
+ "overrides": {
143
+ "ws@8": "8.21.1",
144
+ "cross-spawn@6": "6.0.6",
145
+ "semver@5": "5.7.2",
146
+ "picomatch@2": "2.3.2",
147
+ "js-yaml@3": "3.15.0",
148
+ "minimatch@3": "3.1.5"
149
+ }
146
150
  }