kourou 1.4.0-dev.4 → 1.5.0-dev.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 +892 -707
- package/bin/run +10 -24
- package/lib/commands/api-key/check.d.ts +11 -14
- package/lib/commands/api-key/check.js +5 -5
- package/lib/commands/api-key/create.d.ts +14 -17
- package/lib/commands/api-key/create.js +7 -5
- package/lib/commands/api-key/delete.d.ts +12 -14
- package/lib/commands/api-key/delete.js +6 -6
- package/lib/commands/api-key/search.d.ts +12 -15
- package/lib/commands/api-key/search.js +5 -3
- package/lib/commands/app/debug-proxy.d.ts +15 -16
- package/lib/commands/app/debug-proxy.js +7 -7
- package/lib/commands/app/doctor.d.ts +11 -12
- package/lib/commands/app/doctor.js +3 -3
- package/lib/commands/app/scaffold.d.ts +5 -8
- package/lib/commands/app/scaffold.js +8 -9
- package/lib/commands/app/start-services.d.ts +2 -2
- package/lib/commands/app/start-services.js +3 -3
- package/lib/commands/collection/create.d.ts +14 -19
- package/lib/commands/collection/create.js +8 -9
- package/lib/commands/collection/export.d.ts +20 -22
- package/lib/commands/collection/export.js +14 -14
- package/lib/commands/collection/import.d.ts +15 -18
- package/lib/commands/collection/import.js +9 -9
- package/lib/commands/collection/migrate.d.ts +15 -17
- package/lib/commands/collection/migrate.js +12 -9
- package/lib/commands/config/diff.d.ts +5 -6
- package/lib/commands/config/diff.js +11 -9
- package/lib/commands/document/search.d.ts +20 -25
- package/lib/commands/document/search.js +13 -13
- package/lib/commands/es/aliases/cat.d.ts +3 -4
- package/lib/commands/es/aliases/cat.js +4 -4
- package/lib/commands/es/indices/cat.d.ts +3 -4
- package/lib/commands/es/indices/cat.js +4 -4
- package/lib/commands/es/indices/get.d.ts +5 -7
- package/lib/commands/es/indices/get.js +7 -7
- package/lib/commands/es/indices/insert.d.ts +6 -9
- package/lib/commands/es/indices/insert.js +8 -8
- package/lib/commands/es/migrate.d.ts +11 -12
- package/lib/commands/es/migrate.js +26 -15
- package/lib/commands/es/snapshot/create-repository.d.ts +6 -8
- package/lib/commands/es/snapshot/create-repository.js +12 -10
- package/lib/commands/es/snapshot/create.d.ts +6 -8
- package/lib/commands/es/snapshot/create.js +11 -8
- package/lib/commands/es/snapshot/list.d.ts +4 -7
- package/lib/commands/es/snapshot/list.js +7 -8
- package/lib/commands/es/snapshot/restore.d.ts +6 -8
- package/lib/commands/es/snapshot/restore.js +11 -8
- package/lib/commands/file/decrypt.d.ts +5 -8
- package/lib/commands/file/decrypt.js +7 -7
- package/lib/commands/file/encrypt.d.ts +5 -8
- package/lib/commands/file/encrypt.js +7 -5
- package/lib/commands/file/test.d.ts +3 -6
- package/lib/commands/file/test.js +5 -5
- package/lib/commands/import.d.ts +13 -16
- package/lib/commands/import.js +8 -9
- package/lib/commands/index/export.d.ts +17 -20
- package/lib/commands/index/export.js +12 -11
- package/lib/commands/index/import.d.ts +14 -17
- package/lib/commands/index/import.js +11 -8
- package/lib/commands/instance/kill.d.ts +2 -3
- package/lib/commands/instance/kill.js +6 -7
- package/lib/commands/instance/logs.d.ts +2 -3
- package/lib/commands/instance/logs.js +3 -3
- package/lib/commands/instance/spawn.d.ts +3 -4
- package/lib/commands/instance/spawn.js +7 -8
- package/lib/commands/paas/login.d.ts +4 -5
- package/lib/commands/paas/login.js +13 -8
- package/lib/commands/profile/export.d.ts +10 -11
- package/lib/commands/profile/export.js +3 -3
- package/lib/commands/profile/import.d.ts +11 -14
- package/lib/commands/profile/import.js +5 -3
- package/lib/commands/realtime/subscribe.d.ts +19 -24
- package/lib/commands/realtime/subscribe.js +12 -12
- package/lib/commands/redis/list-keys.d.ts +14 -17
- package/lib/commands/redis/list-keys.js +8 -9
- package/lib/commands/role/export.d.ts +10 -11
- package/lib/commands/role/export.js +3 -3
- package/lib/commands/role/import.d.ts +12 -15
- package/lib/commands/role/import.js +6 -4
- package/lib/commands/sdk/execute.d.ts +15 -18
- package/lib/commands/sdk/execute.js +9 -10
- package/lib/commands/sdk/query.d.ts +20 -23
- package/lib/commands/sdk/query.js +14 -15
- package/lib/commands/user/export-mappings.d.ts +10 -11
- package/lib/commands/user/export-mappings.js +3 -3
- package/lib/commands/user/export.d.ts +14 -15
- package/lib/commands/user/export.js +7 -7
- package/lib/commands/user/import-mappings.d.ts +11 -14
- package/lib/commands/user/import-mappings.js +5 -3
- package/lib/commands/user/import.d.ts +11 -14
- package/lib/commands/user/import.js +5 -3
- package/lib/commands/vault/add.d.ts +5 -6
- package/lib/commands/vault/add.js +9 -11
- package/lib/commands/vault/decrypt.d.ts +5 -8
- package/lib/commands/vault/decrypt.js +8 -9
- package/lib/commands/vault/encrypt.d.ts +5 -8
- package/lib/commands/vault/encrypt.js +8 -9
- package/lib/commands/vault/show.d.ts +5 -11
- package/lib/commands/vault/show.js +7 -8
- package/lib/commands/vault/test.d.ts +3 -6
- package/lib/commands/vault/test.js +6 -7
- package/lib/common.d.ts +1 -1
- package/lib/common.js +3 -3
- package/lib/help.d.ts +16 -0
- package/lib/help.js +31 -0
- package/lib/hooks/command_not_found/api-action.d.ts +1 -1
- package/lib/hooks/command_not_found/api-action.js +8 -8
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/support/dump-collection.js +2 -2
- package/lib/support/kuzzle.d.ts +8 -9
- package/lib/support/kuzzle.js +9 -9
- package/lib/support/progressBar.d.ts +10 -0
- package/lib/support/progressBar.js +15 -0
- package/package.json +13 -12
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../common";
|
|
3
2
|
export default class CollectionExport extends Kommand {
|
|
4
3
|
static keepAuth: boolean;
|
|
5
4
|
static description: string;
|
|
6
5
|
static flags: {
|
|
7
|
-
protocol:
|
|
8
|
-
host:
|
|
9
|
-
port:
|
|
10
|
-
ssl: import("@oclif/
|
|
11
|
-
username:
|
|
12
|
-
password:
|
|
13
|
-
as:
|
|
14
|
-
"api-key":
|
|
15
|
-
help: import("@oclif/
|
|
16
|
-
path:
|
|
17
|
-
"batch-size":
|
|
18
|
-
query:
|
|
19
|
-
editor: import("@oclif/
|
|
20
|
-
format:
|
|
21
|
-
fields:
|
|
22
|
-
scrollTTL:
|
|
23
|
-
type:
|
|
6
|
+
protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
15
|
+
path: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
"batch-size": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
query: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
editor: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
format: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
+
fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
21
|
+
scrollTTL: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
|
+
type: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
24
23
|
};
|
|
25
24
|
static args: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}[];
|
|
25
|
+
index: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
26
|
+
collection: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
27
|
+
};
|
|
30
28
|
static examples: string[];
|
|
31
29
|
runSafe(): Promise<void>;
|
|
32
30
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
5
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
7
|
const common_1 = require("../../common");
|
|
@@ -37,23 +37,23 @@ class CollectionExport extends common_1.Kommand {
|
|
|
37
37
|
}
|
|
38
38
|
CollectionExport.keepAuth = true;
|
|
39
39
|
CollectionExport.description = "Exports a collection (JSONL format)";
|
|
40
|
-
CollectionExport.flags = Object.assign(Object.assign({ help:
|
|
40
|
+
CollectionExport.flags = Object.assign(Object.assign({ help: core_1.Flags.help({}), path: core_1.Flags.string({
|
|
41
41
|
description: "Dump root directory",
|
|
42
|
-
}), "batch-size":
|
|
42
|
+
}), "batch-size": core_1.Flags.string({
|
|
43
43
|
description: "Maximum batch size (see limits.documentsFetchCount config)",
|
|
44
44
|
default: "2000",
|
|
45
|
-
}), query:
|
|
45
|
+
}), query: core_1.Flags.string({
|
|
46
46
|
description: "Only dump documents matching the query (JS or JSON format)",
|
|
47
47
|
default: "{}",
|
|
48
|
-
}), editor:
|
|
48
|
+
}), editor: core_1.Flags.boolean({
|
|
49
49
|
description: "Open an editor (EDITOR env variable) to edit the query before sending",
|
|
50
|
-
}), format:
|
|
50
|
+
}), format: core_1.Flags.string({
|
|
51
51
|
description: `"kuzzle" will export in Kuzzle format usable for internal fixtures,
|
|
52
52
|
"jsonl" allows to import that data back with kourou,
|
|
53
53
|
"csv" allows to import data into Excel (please, specify the fields to export using the --fields option).`,
|
|
54
54
|
options: ["jsonl", "kuzzle", "csv"],
|
|
55
55
|
default: "jsonl",
|
|
56
|
-
}), fields:
|
|
56
|
+
}), fields: core_1.Flags.string({
|
|
57
57
|
description: `[CSV format only] The list of fields to be included in the CSV export in dot-path format.
|
|
58
58
|
|
|
59
59
|
Example:
|
|
@@ -61,21 +61,21 @@ Example:
|
|
|
61
61
|
|
|
62
62
|
Note that the '_id' field is always included in the CSV export. Leaving this option empty implies that all
|
|
63
63
|
exportable fields in the mapping will be exported.`,
|
|
64
|
-
}), scrollTTL:
|
|
64
|
+
}), scrollTTL: core_1.Flags.string({
|
|
65
65
|
description: `The scroll TTL option to pass to the dump operation (which performs a document.search under the hood),
|
|
66
66
|
expressed in ms format, e.g. '2s', '1m', '3h'.`,
|
|
67
67
|
default: "20s",
|
|
68
|
-
}), type:
|
|
68
|
+
}), type: core_1.Flags.string({
|
|
69
69
|
description: "Type of the export: all, mappings, data",
|
|
70
70
|
default: "all",
|
|
71
|
-
}) }, kuzzle_1.kuzzleFlags), { protocol:
|
|
71
|
+
}) }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
|
|
72
72
|
description: "Kuzzle protocol (http or websocket)",
|
|
73
73
|
default: "ws",
|
|
74
74
|
}) });
|
|
75
|
-
CollectionExport.args =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
CollectionExport.args = {
|
|
76
|
+
index: core_1.Args.string({ description: "Index name", required: true }),
|
|
77
|
+
collection: core_1.Args.string({ description: "Collection name", required: true }),
|
|
78
|
+
};
|
|
79
79
|
CollectionExport.examples = [
|
|
80
80
|
"kourou collection:export nyc-open-data yellow-taxi",
|
|
81
81
|
"kourou collection:export nyc-open-data yellow-taxi --query '{ term: { city: \"Saigon\" } }'",
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../common";
|
|
3
2
|
export default class CollectionImport extends Kommand {
|
|
4
3
|
static keepAuth: boolean;
|
|
5
4
|
static description: string;
|
|
6
5
|
static flags: {
|
|
7
|
-
protocol:
|
|
8
|
-
host:
|
|
9
|
-
port:
|
|
10
|
-
ssl: import("@oclif/
|
|
11
|
-
username:
|
|
12
|
-
password:
|
|
13
|
-
as:
|
|
14
|
-
"api-key":
|
|
15
|
-
help: import("@oclif/
|
|
16
|
-
"batch-size":
|
|
17
|
-
index:
|
|
18
|
-
collection:
|
|
19
|
-
"no-mappings": import("@oclif/
|
|
6
|
+
protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
15
|
+
"batch-size": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
index: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
collection: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
"no-mappings": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
19
|
};
|
|
21
20
|
static args: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
required: boolean;
|
|
25
|
-
}[];
|
|
21
|
+
path: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
22
|
+
};
|
|
26
23
|
runSafe(): Promise<void>;
|
|
27
24
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
5
5
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
|
-
const
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
7
|
const common_1 = require("../../common");
|
|
8
8
|
const kuzzle_1 = require("../../support/kuzzle");
|
|
9
9
|
const restore_collection_1 = require("../../support/restore-collection");
|
|
@@ -21,20 +21,20 @@ class CollectionImport extends common_1.Kommand {
|
|
|
21
21
|
}
|
|
22
22
|
CollectionImport.keepAuth = true;
|
|
23
23
|
CollectionImport.description = "Imports a collection";
|
|
24
|
-
CollectionImport.flags = Object.assign(Object.assign({ help:
|
|
24
|
+
CollectionImport.flags = Object.assign(Object.assign({ help: core_1.Flags.help({}), "batch-size": core_1.Flags.string({
|
|
25
25
|
description: "Maximum batch size (see limits.documentsWriteCount config)",
|
|
26
26
|
default: "200",
|
|
27
|
-
}), index:
|
|
27
|
+
}), index: core_1.Flags.string({
|
|
28
28
|
description: "If set, override the index destination name",
|
|
29
|
-
}), collection:
|
|
29
|
+
}), collection: core_1.Flags.string({
|
|
30
30
|
description: "If set, override the collection destination name",
|
|
31
|
-
}), "no-mappings":
|
|
31
|
+
}), "no-mappings": core_1.Flags.boolean({
|
|
32
32
|
description: "Skip collection mappings",
|
|
33
|
-
}) }, kuzzle_1.kuzzleFlags), { protocol:
|
|
33
|
+
}) }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
|
|
34
34
|
description: "Kuzzle protocol (http or websocket)",
|
|
35
35
|
default: "ws",
|
|
36
36
|
}) });
|
|
37
|
-
CollectionImport.args =
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
CollectionImport.args = {
|
|
38
|
+
path: core_1.Args.string({ description: "Dump directory path", required: true }),
|
|
39
|
+
};
|
|
40
40
|
exports.default = CollectionImport;
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../common";
|
|
3
2
|
export default class CollectionMigrate extends Kommand {
|
|
4
3
|
static keepAuth: boolean;
|
|
5
4
|
static description: string;
|
|
6
5
|
static flags: {
|
|
7
|
-
protocol:
|
|
8
|
-
host:
|
|
9
|
-
port:
|
|
10
|
-
ssl: import("@oclif/
|
|
11
|
-
username:
|
|
12
|
-
password:
|
|
13
|
-
as:
|
|
14
|
-
"api-key":
|
|
15
|
-
help: import("@oclif/
|
|
16
|
-
"batch-size":
|
|
17
|
-
index:
|
|
18
|
-
collection:
|
|
6
|
+
protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
15
|
+
"batch-size": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
index: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
collection: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
18
|
};
|
|
20
19
|
static args: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}[];
|
|
20
|
+
script: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
21
|
+
path: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
22
|
+
};
|
|
25
23
|
runSafe(): Promise<void>;
|
|
26
24
|
private getMigrationFunction;
|
|
27
25
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
5
5
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
|
-
const
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
7
|
const common_1 = require("../../common");
|
|
8
8
|
const kuzzle_1 = require("../../support/kuzzle");
|
|
9
9
|
const restore_collection_1 = require("../../support/restore-collection");
|
|
@@ -24,19 +24,22 @@ class CollectionMigrate extends common_1.Kommand {
|
|
|
24
24
|
}
|
|
25
25
|
CollectionMigrate.keepAuth = true;
|
|
26
26
|
CollectionMigrate.description = "Migrate a collection by transforming documents from a dump file and importing them into Kuzzle";
|
|
27
|
-
CollectionMigrate.flags = Object.assign(Object.assign({ help:
|
|
27
|
+
CollectionMigrate.flags = Object.assign(Object.assign({ help: core_1.Flags.help({}), "batch-size": core_1.Flags.string({
|
|
28
28
|
description: "Maximum batch size (see limits.documentsWriteCount config)",
|
|
29
29
|
default: "200",
|
|
30
|
-
}), index:
|
|
30
|
+
}), index: core_1.Flags.string({
|
|
31
31
|
description: "If set, override the index destination name",
|
|
32
|
-
}), collection:
|
|
32
|
+
}), collection: core_1.Flags.string({
|
|
33
33
|
description: "If set, override the collection destination name",
|
|
34
|
-
}) }, kuzzle_1.kuzzleFlags), { protocol:
|
|
34
|
+
}) }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
|
|
35
35
|
description: "Kuzzle protocol (http or websocket)",
|
|
36
36
|
default: "ws",
|
|
37
37
|
}) });
|
|
38
|
-
CollectionMigrate.args =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
CollectionMigrate.args = {
|
|
39
|
+
script: core_1.Args.string({
|
|
40
|
+
description: "Migration script path",
|
|
41
|
+
required: true,
|
|
42
|
+
}),
|
|
43
|
+
path: core_1.Args.string({ description: "Collection dump path", required: true }),
|
|
44
|
+
};
|
|
42
45
|
exports.default = CollectionMigrate;
|
|
@@ -4,14 +4,13 @@ export declare class ConfigKeyDiff extends Kommand {
|
|
|
4
4
|
static description: string;
|
|
5
5
|
static examples: string[];
|
|
6
6
|
static flags: {
|
|
7
|
-
strict: import("@oclif/
|
|
8
|
-
values: import("@oclif/
|
|
7
|
+
strict: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
values: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
9
|
};
|
|
10
10
|
static args: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}[];
|
|
11
|
+
first: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
12
|
+
second: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
13
|
+
};
|
|
15
14
|
runSafe(): Promise<void>;
|
|
16
15
|
_keyChanges(base: any, object: any): any;
|
|
17
16
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ConfigKeyDiff = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
6
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
7
7
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
8
8
|
const strip_json_comments_1 = tslib_1.__importDefault(require("strip-json-comments"));
|
|
@@ -68,20 +68,22 @@ ConfigKeyDiff.examples = [
|
|
|
68
68
|
"kourou config:diff config/local/kuzzlerc config/production/kuzzlerc",
|
|
69
69
|
];
|
|
70
70
|
ConfigKeyDiff.flags = {
|
|
71
|
-
strict:
|
|
71
|
+
strict: core_1.Flags.boolean({
|
|
72
72
|
description: "Exit with an error if differences are found",
|
|
73
73
|
default: false,
|
|
74
74
|
}),
|
|
75
|
-
values:
|
|
75
|
+
values: core_1.Flags.boolean({
|
|
76
76
|
description: "Also displays value changes",
|
|
77
77
|
default: false,
|
|
78
78
|
}),
|
|
79
79
|
};
|
|
80
|
-
ConfigKeyDiff.args =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
ConfigKeyDiff.args = {
|
|
81
|
+
first: core_1.Args.string({
|
|
82
|
+
description: "First configuration file",
|
|
83
|
+
required: true,
|
|
84
|
+
}),
|
|
85
|
+
second: core_1.Args.string({
|
|
84
86
|
description: "Second configuration file",
|
|
85
87
|
required: true,
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
+
}),
|
|
89
|
+
};
|
|
@@ -1,33 +1,28 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../common";
|
|
3
2
|
export default class DocumentSearch extends Kommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static examples: string[];
|
|
6
5
|
static flags: {
|
|
7
|
-
host:
|
|
8
|
-
port:
|
|
9
|
-
ssl: import("@oclif/
|
|
10
|
-
username:
|
|
11
|
-
password:
|
|
12
|
-
protocol:
|
|
13
|
-
as:
|
|
14
|
-
"api-key":
|
|
15
|
-
sort:
|
|
16
|
-
from:
|
|
17
|
-
size:
|
|
18
|
-
scroll:
|
|
19
|
-
lang:
|
|
20
|
-
editor: import("@oclif/
|
|
21
|
-
help: import("@oclif/
|
|
6
|
+
host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
sort: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
from: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
size: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
scroll: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
lang: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
editor: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
21
|
+
};
|
|
22
|
+
static args: {
|
|
23
|
+
index: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
24
|
+
collection: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
25
|
+
query: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
22
26
|
};
|
|
23
|
-
static args: ({
|
|
24
|
-
name: string;
|
|
25
|
-
description: string;
|
|
26
|
-
required: boolean;
|
|
27
|
-
} | {
|
|
28
|
-
name: string;
|
|
29
|
-
description: string;
|
|
30
|
-
required?: undefined;
|
|
31
|
-
})[];
|
|
32
27
|
runSafe(): Promise<void>;
|
|
33
28
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
4
|
const common_1 = require("../../common");
|
|
5
5
|
const kuzzle_1 = require("../../support/kuzzle");
|
|
6
6
|
class DocumentSearch extends common_1.Kommand {
|
|
@@ -37,24 +37,24 @@ DocumentSearch.examples = [
|
|
|
37
37
|
"kourou document:search iot sensors '{ match: { name: \"cOrOnna\" } }' -a lang=elasticsearch",
|
|
38
38
|
"kourou document:search iot sensors --editor",
|
|
39
39
|
];
|
|
40
|
-
DocumentSearch.flags = Object.assign({ sort:
|
|
40
|
+
DocumentSearch.flags = Object.assign({ sort: core_1.Flags.string({
|
|
41
41
|
description: "Sort in JS or JSON format.",
|
|
42
42
|
default: "{}",
|
|
43
|
-
}), from:
|
|
43
|
+
}), from: core_1.Flags.string({
|
|
44
44
|
description: "Optional offset",
|
|
45
|
-
}), size:
|
|
45
|
+
}), size: core_1.Flags.string({
|
|
46
46
|
description: "Optional page size",
|
|
47
|
-
}), scroll:
|
|
47
|
+
}), scroll: core_1.Flags.string({
|
|
48
48
|
description: "Optional scroll TTL",
|
|
49
|
-
}), lang:
|
|
49
|
+
}), lang: core_1.Flags.string({
|
|
50
50
|
description: "Specify the query language to use",
|
|
51
51
|
default: "koncorde",
|
|
52
|
-
}), editor:
|
|
52
|
+
}), editor: core_1.Flags.boolean({
|
|
53
53
|
description: "Open an editor (EDITOR env variable) to edit the request before sending",
|
|
54
|
-
}), help:
|
|
55
|
-
DocumentSearch.args =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
}), help: core_1.Flags.help() }, kuzzle_1.kuzzleFlags);
|
|
55
|
+
DocumentSearch.args = {
|
|
56
|
+
index: core_1.Args.string({ description: "Index name", required: true }),
|
|
57
|
+
collection: core_1.Args.string({ description: "Collection name", required: true }),
|
|
58
|
+
query: core_1.Args.string({ description: "Search query in JS or JSON format." }),
|
|
59
|
+
};
|
|
60
60
|
exports.default = DocumentSearch;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../../common";
|
|
3
2
|
export default class EsListAliases extends Kommand {
|
|
4
3
|
static initSdk: boolean;
|
|
5
4
|
static description: string;
|
|
6
5
|
static flags: {
|
|
7
|
-
help: import("@oclif/
|
|
8
|
-
node:
|
|
9
|
-
grep:
|
|
6
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
7
|
+
node: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
grep: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
9
|
};
|
|
11
10
|
runSafe(): Promise<void>;
|
|
12
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
4
|
const sdk_es7_1 = require("sdk-es7");
|
|
5
5
|
const common_1 = require("../../../common");
|
|
6
6
|
class EsListAliases extends common_1.Kommand {
|
|
@@ -22,13 +22,13 @@ class EsListAliases extends common_1.Kommand {
|
|
|
22
22
|
EsListAliases.initSdk = false;
|
|
23
23
|
EsListAliases.description = "Lists available ES aliases";
|
|
24
24
|
EsListAliases.flags = {
|
|
25
|
-
help:
|
|
26
|
-
node:
|
|
25
|
+
help: core_1.Flags.help(),
|
|
26
|
+
node: core_1.Flags.string({
|
|
27
27
|
char: "n",
|
|
28
28
|
description: "Elasticsearch server URL",
|
|
29
29
|
default: "http://localhost:9200",
|
|
30
30
|
}),
|
|
31
|
-
grep:
|
|
31
|
+
grep: core_1.Flags.string({
|
|
32
32
|
char: "g",
|
|
33
33
|
description: "Match output with pattern",
|
|
34
34
|
}),
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../../common";
|
|
3
2
|
export default class EsListIndex extends Kommand {
|
|
4
3
|
static initSdk: boolean;
|
|
5
4
|
static description: string;
|
|
6
5
|
static flags: {
|
|
7
|
-
help: import("@oclif/
|
|
8
|
-
node:
|
|
9
|
-
grep:
|
|
6
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
7
|
+
node: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
grep: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
9
|
};
|
|
11
10
|
runSafe(): Promise<void>;
|
|
12
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
4
|
const sdk_es7_1 = require("sdk-es7");
|
|
5
5
|
const common_1 = require("../../../common");
|
|
6
6
|
class EsListIndex extends common_1.Kommand {
|
|
@@ -23,13 +23,13 @@ class EsListIndex extends common_1.Kommand {
|
|
|
23
23
|
EsListIndex.initSdk = false;
|
|
24
24
|
EsListIndex.description = "Lists available ES indexes";
|
|
25
25
|
EsListIndex.flags = {
|
|
26
|
-
help:
|
|
27
|
-
node:
|
|
26
|
+
help: core_1.Flags.help(),
|
|
27
|
+
node: core_1.Flags.string({
|
|
28
28
|
char: "n",
|
|
29
29
|
description: "Elasticsearch server URL",
|
|
30
30
|
default: "http://localhost:9200",
|
|
31
31
|
}),
|
|
32
|
-
grep:
|
|
32
|
+
grep: core_1.Flags.string({
|
|
33
33
|
char: "g",
|
|
34
34
|
description: "Match output with pattern",
|
|
35
35
|
}),
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../../common";
|
|
3
2
|
export default class EsGet extends Kommand {
|
|
4
3
|
static initSdk: boolean;
|
|
5
4
|
static description: string;
|
|
6
5
|
static flags: {
|
|
7
|
-
help: import("@oclif/
|
|
8
|
-
node:
|
|
6
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
7
|
+
node: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
8
|
};
|
|
10
9
|
static args: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}[];
|
|
10
|
+
index: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
11
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
12
|
+
};
|
|
15
13
|
runSafe(): Promise<void>;
|
|
16
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
4
|
const sdk_es7_1 = require("sdk-es7");
|
|
5
5
|
const common_1 = require("../../../common");
|
|
6
6
|
class EsGet extends common_1.Kommand {
|
|
@@ -17,15 +17,15 @@ class EsGet extends common_1.Kommand {
|
|
|
17
17
|
EsGet.initSdk = false;
|
|
18
18
|
EsGet.description = "Gets a document from ES";
|
|
19
19
|
EsGet.flags = {
|
|
20
|
-
help:
|
|
21
|
-
node:
|
|
20
|
+
help: core_1.Flags.help(),
|
|
21
|
+
node: core_1.Flags.string({
|
|
22
22
|
char: "n",
|
|
23
23
|
description: "Elasticsearch server URL",
|
|
24
24
|
default: "http://localhost:9200",
|
|
25
25
|
}),
|
|
26
26
|
};
|
|
27
|
-
EsGet.args =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
EsGet.args = {
|
|
28
|
+
index: core_1.Args.string({ description: "ES Index name", required: true }),
|
|
29
|
+
id: core_1.Args.string({ description: "Document ID", required: true }),
|
|
30
|
+
};
|
|
31
31
|
exports.default = EsGet;
|