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,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 common_1 = require("../../common");
|
|
7
7
|
const kuzzle_1 = require("../../support/kuzzle");
|
|
@@ -15,9 +15,11 @@ class ProfileImport extends common_1.Kommand {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
ProfileImport.description = "Imports profiles";
|
|
18
|
-
ProfileImport.flags = Object.assign(Object.assign({ help:
|
|
18
|
+
ProfileImport.flags = Object.assign(Object.assign({ help: core_1.Flags.help({}) }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
|
|
19
19
|
description: "Kuzzle protocol (http or websocket)",
|
|
20
20
|
default: "ws",
|
|
21
21
|
}) });
|
|
22
|
-
ProfileImport.args =
|
|
22
|
+
ProfileImport.args = {
|
|
23
|
+
path: core_1.Args.string({ description: "Dump file", required: true }),
|
|
24
|
+
};
|
|
23
25
|
exports.default = ProfileImport;
|
|
@@ -1,33 +1,28 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../common";
|
|
3
2
|
export default class RealtimeSubscribe extends Kommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static examples: 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
|
-
scope:
|
|
16
|
-
users:
|
|
17
|
-
volatile:
|
|
18
|
-
display:
|
|
19
|
-
editor: import("@oclif/
|
|
20
|
-
help: 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
|
+
scope: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
users: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
volatile: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
+
display: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
+
editor: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
20
|
+
};
|
|
21
|
+
static args: {
|
|
22
|
+
index: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
23
|
+
collection: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
24
|
+
filters: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
21
25
|
};
|
|
22
|
-
static args: ({
|
|
23
|
-
name: string;
|
|
24
|
-
description: string;
|
|
25
|
-
required: boolean;
|
|
26
|
-
} | {
|
|
27
|
-
name: string;
|
|
28
|
-
description: string;
|
|
29
|
-
required?: undefined;
|
|
30
|
-
})[];
|
|
31
26
|
static readStdin: boolean;
|
|
32
27
|
beforeConnect(): Promise<void>;
|
|
33
28
|
runSafe(): Promise<void>;
|
|
@@ -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 lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
6
6
|
const common_1 = require("../../common");
|
|
7
7
|
const kuzzle_1 = require("../../support/kuzzle");
|
|
@@ -40,28 +40,28 @@ RealtimeSubscribe.examples = [
|
|
|
40
40
|
"kourou realtime:subscribe iot-data sensors --users all --volatile '{ clientId: \"citizen-kane\" }'",
|
|
41
41
|
"kourou realtime:subscribe iot-data sensors --display result._source.temperature",
|
|
42
42
|
];
|
|
43
|
-
RealtimeSubscribe.flags = Object.assign(Object.assign({ scope:
|
|
43
|
+
RealtimeSubscribe.flags = Object.assign(Object.assign({ scope: core_1.Flags.string({
|
|
44
44
|
description: "Subscribe to document entering or leaving the scope (all, in, out, none)",
|
|
45
45
|
default: "all",
|
|
46
|
-
}), users:
|
|
46
|
+
}), users: core_1.Flags.string({
|
|
47
47
|
description: "Subscribe to users entering or leaving the room (all, in, out, none)",
|
|
48
48
|
default: "all",
|
|
49
|
-
}), volatile:
|
|
49
|
+
}), volatile: core_1.Flags.string({
|
|
50
50
|
description: "Additional subscription information used in user join/leave notifications",
|
|
51
51
|
default: "{}",
|
|
52
|
-
}), display:
|
|
52
|
+
}), display: core_1.Flags.string({
|
|
53
53
|
description: "Path of the property to display from the notification (empty string to display everything)",
|
|
54
54
|
default: "result",
|
|
55
|
-
}), editor:
|
|
55
|
+
}), editor: core_1.Flags.boolean({
|
|
56
56
|
description: "Open an editor (EDITOR env variable) to edit the filters before subscribing.",
|
|
57
|
-
}), help:
|
|
57
|
+
}), help: core_1.Flags.help() }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
|
|
58
58
|
description: "Kuzzle protocol (only websocket for realtime)",
|
|
59
59
|
default: "websocket",
|
|
60
60
|
}) });
|
|
61
|
-
RealtimeSubscribe.args =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
RealtimeSubscribe.args = {
|
|
62
|
+
index: core_1.Args.string({ description: "Index name", required: true }),
|
|
63
|
+
collection: core_1.Args.string({ description: "Collection name", required: true }),
|
|
64
|
+
filters: core_1.Args.string({ description: "Set of Koncorde filters" }),
|
|
65
|
+
};
|
|
66
66
|
RealtimeSubscribe.readStdin = true;
|
|
67
67
|
exports.default = RealtimeSubscribe;
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../common";
|
|
3
2
|
export default class RedisListKeys extends Kommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
host:
|
|
7
|
-
port:
|
|
8
|
-
ssl: import("@oclif/
|
|
9
|
-
username:
|
|
10
|
-
password:
|
|
11
|
-
protocol:
|
|
12
|
-
as:
|
|
13
|
-
"api-key":
|
|
14
|
-
help: import("@oclif/
|
|
15
|
-
remove: import("@oclif/
|
|
16
|
-
size:
|
|
17
|
-
max:
|
|
5
|
+
host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
|
+
port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
14
|
+
remove: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
size: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
max: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
17
|
};
|
|
19
18
|
static args: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
default: string;
|
|
23
|
-
}[];
|
|
19
|
+
match: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
20
|
+
};
|
|
24
21
|
static examples: string[];
|
|
25
22
|
static readStdin: boolean;
|
|
26
23
|
runSafe(): Promise<void>;
|
|
@@ -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 RedisListKeys extends common_1.Kommand {
|
|
@@ -40,23 +40,22 @@ class RedisListKeys extends common_1.Kommand {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
RedisListKeys.description = "Lists keys stored in Redis";
|
|
43
|
-
RedisListKeys.flags = Object.assign({ help:
|
|
43
|
+
RedisListKeys.flags = Object.assign({ help: core_1.Flags.help(), remove: core_1.Flags.boolean({
|
|
44
44
|
description: "Remove matching keys",
|
|
45
45
|
default: false,
|
|
46
|
-
}), size:
|
|
46
|
+
}), size: core_1.Flags.string({
|
|
47
47
|
description: "Page size",
|
|
48
48
|
default: "100",
|
|
49
|
-
}), max:
|
|
49
|
+
}), max: core_1.Flags.string({
|
|
50
50
|
description: "Maximum number of page to retrieve (-1 to retrieve everything)",
|
|
51
51
|
default: "-1",
|
|
52
52
|
}) }, kuzzle_1.kuzzleFlags);
|
|
53
|
-
RedisListKeys.args =
|
|
54
|
-
{
|
|
55
|
-
name: "match",
|
|
53
|
+
RedisListKeys.args = {
|
|
54
|
+
match: core_1.Args.string({
|
|
56
55
|
description: "Match Redis keys with a pattern",
|
|
57
56
|
default: "*",
|
|
58
|
-
},
|
|
59
|
-
|
|
57
|
+
}),
|
|
58
|
+
};
|
|
60
59
|
RedisListKeys.examples = [
|
|
61
60
|
'kourou redis:list-keys "*cluster*"',
|
|
62
61
|
'kourou redis:list-keys "counters/*" --remove',
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../common";
|
|
3
2
|
export default class RoleDump extends Kommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
protocol:
|
|
7
|
-
host:
|
|
8
|
-
port:
|
|
9
|
-
ssl: import("@oclif/
|
|
10
|
-
username:
|
|
11
|
-
password:
|
|
12
|
-
as:
|
|
13
|
-
"api-key":
|
|
14
|
-
help: import("@oclif/
|
|
15
|
-
path:
|
|
5
|
+
protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
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
|
+
as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
14
|
+
path: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
15
|
};
|
|
17
16
|
runSafe(): Promise<void>;
|
|
18
17
|
_dumpRoles(): Promise<any>;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
5
5
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
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
|
class RoleDump extends common_1.Kommand {
|
|
@@ -35,10 +35,10 @@ class RoleDump extends common_1.Kommand {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
RoleDump.description = "Exports roles";
|
|
38
|
-
RoleDump.flags = Object.assign(Object.assign({ help:
|
|
38
|
+
RoleDump.flags = Object.assign(Object.assign({ help: core_1.Flags.help({}), path: core_1.Flags.string({
|
|
39
39
|
description: "Dump directory",
|
|
40
40
|
default: "roles",
|
|
41
|
-
}) }, kuzzle_1.kuzzleFlags), { protocol:
|
|
41
|
+
}) }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
|
|
42
42
|
description: "Kuzzle protocol (http or websocket)",
|
|
43
43
|
default: "ws",
|
|
44
44
|
}) });
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../common";
|
|
3
2
|
export default class RoleImport extends Kommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
protocol:
|
|
7
|
-
host:
|
|
8
|
-
port:
|
|
9
|
-
ssl: import("@oclif/
|
|
10
|
-
username:
|
|
11
|
-
password:
|
|
12
|
-
as:
|
|
13
|
-
"api-key":
|
|
14
|
-
"preserve-anonymous": import("@oclif/
|
|
15
|
-
help: import("@oclif/
|
|
5
|
+
protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
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
|
+
as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
"preserve-anonymous": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
16
15
|
};
|
|
17
16
|
static args: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
required: boolean;
|
|
21
|
-
}[];
|
|
17
|
+
path: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
18
|
+
};
|
|
22
19
|
runSafe(): Promise<void>;
|
|
23
20
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
5
|
-
const
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
6
|
const common_1 = require("../../common");
|
|
7
7
|
const kuzzle_1 = require("../../support/kuzzle");
|
|
8
8
|
const restore_securities_1 = require("../../support/restore-securities");
|
|
@@ -15,12 +15,14 @@ class RoleImport extends common_1.Kommand {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
RoleImport.description = "Import roles";
|
|
18
|
-
RoleImport.flags = Object.assign(Object.assign({ "preserve-anonymous":
|
|
18
|
+
RoleImport.flags = Object.assign(Object.assign({ "preserve-anonymous": core_1.Flags.boolean({
|
|
19
19
|
description: "Preserve anonymous rights",
|
|
20
20
|
default: false,
|
|
21
|
-
}), help:
|
|
21
|
+
}), help: core_1.Flags.help({}) }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
|
|
22
22
|
description: "Kuzzle protocol (http or websocket)",
|
|
23
23
|
default: "ws",
|
|
24
24
|
}) });
|
|
25
|
-
RoleImport.args =
|
|
25
|
+
RoleImport.args = {
|
|
26
|
+
path: core_1.Args.string({ description: "Dump file", required: true }),
|
|
27
|
+
};
|
|
26
28
|
exports.default = RoleImport;
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../common";
|
|
3
2
|
declare class SdkExecute extends Kommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
host:
|
|
7
|
-
port:
|
|
8
|
-
ssl: import("@oclif/
|
|
9
|
-
username:
|
|
10
|
-
password:
|
|
11
|
-
protocol:
|
|
12
|
-
as:
|
|
13
|
-
"api-key":
|
|
14
|
-
help: import("@oclif/
|
|
15
|
-
var:
|
|
16
|
-
editor: import("@oclif/
|
|
17
|
-
"keep-alive": import("@oclif/
|
|
18
|
-
"print-raw": import("@oclif/
|
|
5
|
+
host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
|
+
port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
14
|
+
var: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
editor: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
"keep-alive": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
"print-raw": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
18
|
};
|
|
20
19
|
static args: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
required: boolean;
|
|
24
|
-
}[];
|
|
20
|
+
code: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
21
|
+
};
|
|
25
22
|
private code;
|
|
26
23
|
static readStdin: boolean;
|
|
27
24
|
beforeConnect(): Promise<void>;
|
|
@@ -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 lodash_1 = require("lodash");
|
|
6
6
|
const editor_1 = require("../../support/editor");
|
|
7
7
|
const common_1 = require("../../common");
|
|
@@ -119,23 +119,22 @@ Other
|
|
|
119
119
|
Examples:
|
|
120
120
|
- kourou sdk:execute 'return await sdk.server.now()' --editor
|
|
121
121
|
`;
|
|
122
|
-
SdkExecute.flags = Object.assign({ help:
|
|
122
|
+
SdkExecute.flags = Object.assign({ help: core_1.Flags.help(), var: core_1.Flags.string({
|
|
123
123
|
char: "v",
|
|
124
124
|
description: "Additional arguments injected into the code. (eg: --var 'index=\"iot-data\"'",
|
|
125
125
|
multiple: true,
|
|
126
|
-
}), editor:
|
|
126
|
+
}), editor: core_1.Flags.boolean({
|
|
127
127
|
description: "Open an editor (EDITOR env variable) to edit the code before executing it.",
|
|
128
|
-
}), "keep-alive":
|
|
128
|
+
}), "keep-alive": core_1.Flags.boolean({
|
|
129
129
|
description: "Keep the connection running (websocket only)",
|
|
130
|
-
}), "print-raw":
|
|
130
|
+
}), "print-raw": core_1.Flags.boolean({
|
|
131
131
|
description: "Print only the script result to stdout",
|
|
132
132
|
}) }, kuzzle_1.kuzzleFlags);
|
|
133
|
-
SdkExecute.args =
|
|
134
|
-
{
|
|
135
|
-
name: "code",
|
|
133
|
+
SdkExecute.args = {
|
|
134
|
+
code: core_1.Args.string({
|
|
136
135
|
description: "Code to execute. Will be read from STDIN if available.",
|
|
137
136
|
required: false,
|
|
138
|
-
},
|
|
139
|
-
|
|
137
|
+
}),
|
|
138
|
+
};
|
|
140
139
|
SdkExecute.readStdin = true;
|
|
141
140
|
exports.default = SdkExecute;
|
|
@@ -1,32 +1,29 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../common";
|
|
3
2
|
declare class SdkQuery extends Kommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
host:
|
|
7
|
-
port:
|
|
8
|
-
ssl: import("@oclif/
|
|
9
|
-
username:
|
|
10
|
-
password:
|
|
11
|
-
protocol:
|
|
12
|
-
as:
|
|
13
|
-
"api-key":
|
|
14
|
-
help: import("@oclif/
|
|
15
|
-
arg:
|
|
16
|
-
body:
|
|
17
|
-
editor: import("@oclif/
|
|
18
|
-
"body-editor": import("@oclif/
|
|
19
|
-
index:
|
|
20
|
-
collection:
|
|
21
|
-
id:
|
|
22
|
-
display:
|
|
23
|
-
"print-raw": import("@oclif/
|
|
5
|
+
host: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
|
+
port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
ssl: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
username: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
password: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
14
|
+
arg: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
body: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
editor: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
"body-editor": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
index: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
|
+
collection: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
+
id: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
21
|
+
display: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
|
+
"print-raw": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
24
23
|
};
|
|
25
24
|
static args: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
required: boolean;
|
|
29
|
-
}[];
|
|
25
|
+
"controller:action": import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
26
|
+
};
|
|
30
27
|
static readStdin: boolean;
|
|
31
28
|
runSafe(): Promise<void>;
|
|
32
29
|
}
|
|
@@ -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 lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
6
6
|
const common_1 = require("../../common");
|
|
7
7
|
const kuzzle_1 = require("../../support/kuzzle");
|
|
@@ -93,37 +93,36 @@ Default fallback to API action
|
|
|
93
93
|
- kourou bulk:import iot sensors '{ bulkData: [...] }'
|
|
94
94
|
- kourou admin:loadMappings < mappings.json
|
|
95
95
|
`;
|
|
96
|
-
SdkQuery.flags = Object.assign({ help:
|
|
96
|
+
SdkQuery.flags = Object.assign({ help: core_1.Flags.help(), arg: core_1.Flags.string({
|
|
97
97
|
char: "a",
|
|
98
98
|
description: 'Additional argument. Repeatable. (e.g. "-a refresh=wait_for")',
|
|
99
99
|
multiple: true,
|
|
100
|
-
}), body:
|
|
100
|
+
}), body: core_1.Flags.string({
|
|
101
101
|
description: "Request body in JS or JSON format. Will be read from STDIN if available.",
|
|
102
102
|
default: "{}",
|
|
103
|
-
}), editor:
|
|
103
|
+
}), editor: core_1.Flags.boolean({
|
|
104
104
|
description: "Open an editor (EDITOR env variable) to edit the request before sending.",
|
|
105
|
-
}), "body-editor":
|
|
105
|
+
}), "body-editor": core_1.Flags.boolean({
|
|
106
106
|
description: "Open an editor (EDITOR env variable) to edit the body before sending.",
|
|
107
|
-
}), index:
|
|
107
|
+
}), index: core_1.Flags.string({
|
|
108
108
|
char: "i",
|
|
109
109
|
description: "Index argument",
|
|
110
|
-
}), collection:
|
|
110
|
+
}), collection: core_1.Flags.string({
|
|
111
111
|
char: "c",
|
|
112
112
|
description: "Collection argument",
|
|
113
|
-
}), id:
|
|
113
|
+
}), id: core_1.Flags.string({
|
|
114
114
|
description: "ID argument (_id)",
|
|
115
|
-
}), display:
|
|
115
|
+
}), display: core_1.Flags.string({
|
|
116
116
|
description: "Path of the property to display from the response (empty string to display the result)",
|
|
117
117
|
default: "result",
|
|
118
|
-
}), "print-raw":
|
|
118
|
+
}), "print-raw": core_1.Flags.boolean({
|
|
119
119
|
description: "Print only the query result to stdout",
|
|
120
120
|
}) }, kuzzle_1.kuzzleFlags);
|
|
121
|
-
SdkQuery.args =
|
|
122
|
-
{
|
|
123
|
-
name: "controller:action",
|
|
121
|
+
SdkQuery.args = {
|
|
122
|
+
"controller:action": core_1.Args.string({
|
|
124
123
|
description: 'Controller and action (eg: "server:now")',
|
|
125
124
|
required: true,
|
|
126
|
-
},
|
|
127
|
-
|
|
125
|
+
}),
|
|
126
|
+
};
|
|
128
127
|
SdkQuery.readStdin = true;
|
|
129
128
|
exports.default = SdkQuery;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { flags } from "@oclif/command";
|
|
2
1
|
import { Kommand } from "../../common";
|
|
3
2
|
export default class UserExportMappings extends Kommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
|
-
protocol:
|
|
7
|
-
host:
|
|
8
|
-
port:
|
|
9
|
-
ssl: import("@oclif/
|
|
10
|
-
username:
|
|
11
|
-
password:
|
|
12
|
-
as:
|
|
13
|
-
"api-key":
|
|
14
|
-
help: import("@oclif/
|
|
15
|
-
path:
|
|
5
|
+
protocol: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
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
|
+
as: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
"api-key": import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
14
|
+
path: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
15
|
};
|
|
17
16
|
runSafe(): Promise<void>;
|
|
18
17
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
5
5
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
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
|
class UserExportMappings extends common_1.Kommand {
|
|
@@ -21,10 +21,10 @@ class UserExportMappings extends common_1.Kommand {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
UserExportMappings.description = "Exports users collection mappings to JSON.";
|
|
24
|
-
UserExportMappings.flags = Object.assign(Object.assign({ help:
|
|
24
|
+
UserExportMappings.flags = Object.assign(Object.assign({ help: core_1.Flags.help({}), path: core_1.Flags.string({
|
|
25
25
|
description: "Dump directory",
|
|
26
26
|
default: "users",
|
|
27
|
-
}) }, kuzzle_1.kuzzleFlags), { protocol:
|
|
27
|
+
}) }, kuzzle_1.kuzzleFlags), { protocol: core_1.Flags.string({
|
|
28
28
|
description: "Kuzzle protocol (http or websocket)",
|
|
29
29
|
default: "ws",
|
|
30
30
|
}) });
|