@extrahorizon/exh-cli 1.13.0-dev-187-6a4e090 → 1.13.0-dev-189-4cbf653
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/build/commands/data/schemas/sync.d.ts +4 -4
- package/build/commands/data/schemas/sync.js +4 -4
- package/build/commands/data/schemas/verify.d.ts +2 -2
- package/build/commands/data/schemas/verify.js +2 -2
- package/build/commands/dispatchers/init.d.ts +4 -4
- package/build/commands/dispatchers/init.js +5 -5
- package/build/commands/dispatchers/sync.d.ts +2 -2
- package/build/commands/dispatchers/sync.js +2 -2
- package/build/commands/localizations/sync.d.ts +1 -1
- package/build/commands/localizations/sync.js +1 -1
- package/build/commands/login.d.ts +5 -5
- package/build/commands/login.js +5 -5
- package/build/commands/settings/sync.d.ts +1 -1
- package/build/commands/settings/sync.js +1 -1
- package/build/commands/sync.d.ts +9 -9
- package/build/commands/sync.js +9 -9
- package/build/commands/tasks/sync.d.ts +9 -9
- package/build/commands/tasks/sync.js +9 -9
- package/build/commands/templates/delete.d.ts +2 -2
- package/build/commands/templates/delete.js +2 -2
- package/build/commands/templates/get.d.ts +2 -2
- package/build/commands/templates/get.js +2 -2
- package/build/commands/templates/sync.d.ts +2 -2
- package/build/commands/templates/sync.js +2 -2
- package/build/services/dispatchers/init.d.ts +1 -1
- package/build/services/dispatchers/init.js +4 -4
- package/package.json +2 -2
|
@@ -4,22 +4,22 @@ export declare const desc = "Sync all schemas in a directory with the ExH cloud"
|
|
|
4
4
|
export declare const builder: (yargs: any) => import("yargs").Argv<import("yargs").Omit<{}, "file" | "dir" | "dry" | "ignoreVerificationErrors"> & import("yargs").InferredOptionTypes<{
|
|
5
5
|
dir: {
|
|
6
6
|
demandOption: false;
|
|
7
|
-
|
|
7
|
+
description: string;
|
|
8
8
|
type: "string";
|
|
9
9
|
};
|
|
10
10
|
file: {
|
|
11
11
|
demandOption: false;
|
|
12
|
-
|
|
12
|
+
description: string;
|
|
13
13
|
type: "string";
|
|
14
14
|
};
|
|
15
15
|
dry: {
|
|
16
16
|
demandOption: false;
|
|
17
|
-
|
|
17
|
+
description: string;
|
|
18
18
|
type: "boolean";
|
|
19
19
|
};
|
|
20
20
|
ignoreVerificationErrors: {
|
|
21
21
|
demandOption: false;
|
|
22
|
-
|
|
22
|
+
description: string;
|
|
23
23
|
type: "boolean";
|
|
24
24
|
default: boolean;
|
|
25
25
|
};
|
|
@@ -8,22 +8,22 @@ exports.desc = 'Sync all schemas in a directory with the ExH cloud';
|
|
|
8
8
|
const builder = (yargs) => (0, util_1.epilogue)(yargs).options({
|
|
9
9
|
dir: {
|
|
10
10
|
demandOption: false,
|
|
11
|
-
|
|
11
|
+
description: 'Directory containing the schemas which need to be synced',
|
|
12
12
|
type: 'string',
|
|
13
13
|
},
|
|
14
14
|
file: {
|
|
15
15
|
demandOption: false,
|
|
16
|
-
|
|
16
|
+
description: 'File containing a schema which needs to be synced',
|
|
17
17
|
type: 'string',
|
|
18
18
|
},
|
|
19
19
|
dry: {
|
|
20
20
|
demandOption: false,
|
|
21
|
-
|
|
21
|
+
description: 'When set, a dry-run will be performed. Only output will be printed, but no changes will be pushed to the back-end.',
|
|
22
22
|
type: 'boolean',
|
|
23
23
|
},
|
|
24
24
|
ignoreVerificationErrors: {
|
|
25
25
|
demandOption: false,
|
|
26
|
-
|
|
26
|
+
description: 'Allow synchronization to proceed with validation errors.',
|
|
27
27
|
type: 'boolean',
|
|
28
28
|
default: false,
|
|
29
29
|
},
|
|
@@ -3,11 +3,11 @@ export declare const command = "verify";
|
|
|
3
3
|
export declare const desc = "Syntactically verify a local schema";
|
|
4
4
|
export declare const builder: (yargs: any) => import("yargs").Argv<import("yargs").Omit<{}, "file" | "dir"> & import("yargs").InferredOptionTypes<{
|
|
5
5
|
file: {
|
|
6
|
-
|
|
6
|
+
description: string;
|
|
7
7
|
type: "string";
|
|
8
8
|
};
|
|
9
9
|
dir: {
|
|
10
|
-
|
|
10
|
+
description: string;
|
|
11
11
|
type: "string";
|
|
12
12
|
};
|
|
13
13
|
}>>;
|
|
@@ -10,11 +10,11 @@ exports.desc = 'Syntactically verify a local schema';
|
|
|
10
10
|
const builder = (yargs) => (0, util_1.epilogue)(yargs)
|
|
11
11
|
.options({
|
|
12
12
|
file: {
|
|
13
|
-
|
|
13
|
+
description: 'schema json file which needs to be verified',
|
|
14
14
|
type: 'string',
|
|
15
15
|
},
|
|
16
16
|
dir: {
|
|
17
|
-
|
|
17
|
+
description: 'directory containing schemas to be verified',
|
|
18
18
|
type: 'string',
|
|
19
19
|
},
|
|
20
20
|
})
|
|
@@ -3,14 +3,14 @@ export declare const command = "init <name>";
|
|
|
3
3
|
export declare const desc = "Create a basic Dispatcher";
|
|
4
4
|
export declare const builder: (yargs: any) => import("yargs").Argv<import("yargs").Omit<{
|
|
5
5
|
name: string;
|
|
6
|
-
}, "
|
|
7
|
-
|
|
6
|
+
}, "file"> & import("yargs").InferredOptionTypes<{
|
|
7
|
+
file: {
|
|
8
8
|
description: string;
|
|
9
9
|
type: "string";
|
|
10
10
|
default: string;
|
|
11
11
|
};
|
|
12
12
|
}>>;
|
|
13
|
-
export declare const handler: ({ name,
|
|
13
|
+
export declare const handler: ({ name, file }: {
|
|
14
14
|
name: string;
|
|
15
|
-
|
|
15
|
+
file: string;
|
|
16
16
|
}) => Promise<void>;
|
|
@@ -12,14 +12,14 @@ const builder = (yargs) => (0, util_1.epilogue)(yargs)
|
|
|
12
12
|
type: 'string',
|
|
13
13
|
})
|
|
14
14
|
.options({
|
|
15
|
-
|
|
16
|
-
description: '
|
|
15
|
+
file: {
|
|
16
|
+
description: 'Path to the file where the new Dispatcher should be added',
|
|
17
17
|
type: 'string',
|
|
18
|
-
default: './',
|
|
18
|
+
default: './dispatchers.json',
|
|
19
19
|
},
|
|
20
20
|
});
|
|
21
21
|
exports.builder = builder;
|
|
22
|
-
const handler = async function init({ name,
|
|
23
|
-
await dispatcherService.init(name,
|
|
22
|
+
const handler = async function init({ name, file }) {
|
|
23
|
+
await dispatcherService.init(name, file);
|
|
24
24
|
};
|
|
25
25
|
exports.handler = handler;
|
|
@@ -4,13 +4,13 @@ export declare const desc = "Synchronize Dispatchers, if a declared Dispatcher d
|
|
|
4
4
|
export declare const builder: (yargs: Argv) => Argv<import("yargs").Omit<{}, "file" | "clean"> & import("yargs").InferredOptionTypes<{
|
|
5
5
|
file: {
|
|
6
6
|
demandOption: false;
|
|
7
|
-
|
|
7
|
+
description: string;
|
|
8
8
|
type: "string";
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
11
11
|
clean: {
|
|
12
12
|
demandOption: false;
|
|
13
|
-
|
|
13
|
+
description: string;
|
|
14
14
|
type: "boolean";
|
|
15
15
|
};
|
|
16
16
|
}>>;
|
|
@@ -8,13 +8,13 @@ exports.desc = 'Synchronize Dispatchers, if a declared Dispatcher does not exist
|
|
|
8
8
|
const builder = (yargs) => (0, util_1.epilogue)(yargs).options({
|
|
9
9
|
file: {
|
|
10
10
|
demandOption: false,
|
|
11
|
-
|
|
11
|
+
description: 'Path to the file containing the Dispatcher(s) configuration',
|
|
12
12
|
type: 'string',
|
|
13
13
|
default: './dispatchers.json',
|
|
14
14
|
},
|
|
15
15
|
clean: {
|
|
16
16
|
demandOption: false,
|
|
17
|
-
|
|
17
|
+
description: 'Delete Dispatchers created using the CLI, that are no longer present in the local Dispatcher file',
|
|
18
18
|
type: 'boolean',
|
|
19
19
|
},
|
|
20
20
|
});
|
|
@@ -4,7 +4,7 @@ export declare const desc = "Sync all localizations in a directory with the ExH
|
|
|
4
4
|
export declare const builder: (yargs: any) => import("yargs").Argv<import("yargs").Omit<{}, "path"> & import("yargs").InferredOptionTypes<{
|
|
5
5
|
path: {
|
|
6
6
|
demandOption: false;
|
|
7
|
-
|
|
7
|
+
description: string;
|
|
8
8
|
type: "string";
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
@@ -8,7 +8,7 @@ exports.desc = 'Sync all localizations in a directory with the ExH cloud';
|
|
|
8
8
|
const builder = (yargs) => (0, util_1.epilogue)(yargs).options({
|
|
9
9
|
path: {
|
|
10
10
|
demandOption: false,
|
|
11
|
-
|
|
11
|
+
description: 'Directory containing the localizations which need to be synced in a JSON format. By Default: ./localizations',
|
|
12
12
|
type: 'string',
|
|
13
13
|
default: './localizations',
|
|
14
14
|
},
|
|
@@ -5,27 +5,27 @@ export declare const builder: (yargs: any) => import("yargs").Argv<import("yargs
|
|
|
5
5
|
host: {
|
|
6
6
|
demandOption: true;
|
|
7
7
|
type: "string";
|
|
8
|
-
|
|
8
|
+
description: string;
|
|
9
9
|
};
|
|
10
10
|
email: {
|
|
11
11
|
demandOption: true;
|
|
12
12
|
type: "string";
|
|
13
|
-
|
|
13
|
+
description: string;
|
|
14
14
|
};
|
|
15
15
|
password: {
|
|
16
16
|
demandOption: true;
|
|
17
17
|
type: "string";
|
|
18
|
-
|
|
18
|
+
description: string;
|
|
19
19
|
};
|
|
20
20
|
consumerKey: {
|
|
21
21
|
demandOption: true;
|
|
22
22
|
type: "string";
|
|
23
|
-
|
|
23
|
+
description: string;
|
|
24
24
|
};
|
|
25
25
|
consumerSecret: {
|
|
26
26
|
demandOption: true;
|
|
27
27
|
type: "string";
|
|
28
|
-
|
|
28
|
+
description: string;
|
|
29
29
|
};
|
|
30
30
|
}>>;
|
|
31
31
|
export declare const handler: ({ host, email, password, consumerKey, consumerSecret }: {
|
package/build/commands/login.js
CHANGED
|
@@ -9,27 +9,27 @@ const builder = (yargs) => (0, util_1.epilogue)(yargs).options({
|
|
|
9
9
|
host: {
|
|
10
10
|
demandOption: true,
|
|
11
11
|
type: 'string',
|
|
12
|
-
|
|
12
|
+
description: 'the address of your ExH cloud instance (eg. https://api.dev.my-instance.extrahorizon.io)',
|
|
13
13
|
},
|
|
14
14
|
email: {
|
|
15
15
|
demandOption: true,
|
|
16
16
|
type: 'string',
|
|
17
|
-
|
|
17
|
+
description: 'email address of your ExH account',
|
|
18
18
|
},
|
|
19
19
|
password: {
|
|
20
20
|
demandOption: true,
|
|
21
21
|
type: 'string',
|
|
22
|
-
|
|
22
|
+
description: 'password of your ExH account',
|
|
23
23
|
},
|
|
24
24
|
consumerKey: {
|
|
25
25
|
demandOption: true,
|
|
26
26
|
type: 'string',
|
|
27
|
-
|
|
27
|
+
description: 'Consumer key',
|
|
28
28
|
},
|
|
29
29
|
consumerSecret: {
|
|
30
30
|
demandOption: true,
|
|
31
31
|
type: 'string',
|
|
32
|
-
|
|
32
|
+
description: 'Consumer secret',
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
35
|
exports.builder = builder;
|
|
@@ -4,7 +4,7 @@ export declare const desc = "Synchronize Service Settings";
|
|
|
4
4
|
export declare const builder: (yargs: Argv) => Argv<import("yargs").Omit<{}, "file"> & import("yargs").InferredOptionTypes<{
|
|
5
5
|
file: {
|
|
6
6
|
demandOption: false;
|
|
7
|
-
|
|
7
|
+
description: string;
|
|
8
8
|
type: "string";
|
|
9
9
|
default: string;
|
|
10
10
|
};
|
|
@@ -8,7 +8,7 @@ exports.desc = 'Synchronize Service Settings';
|
|
|
8
8
|
const builder = (yargs) => (0, util_1.epilogue)(yargs).options({
|
|
9
9
|
file: {
|
|
10
10
|
demandOption: false,
|
|
11
|
-
|
|
11
|
+
description: 'Path to the file containing the Service Settings configuration',
|
|
12
12
|
type: 'string',
|
|
13
13
|
default: './service-settings.json',
|
|
14
14
|
},
|
package/build/commands/sync.d.ts
CHANGED
|
@@ -4,53 +4,53 @@ export declare const desc = "Sync your ExH configuration to the cloud environmen
|
|
|
4
4
|
export declare const builder: (yargs: any) => import("yargs").Argv<import("yargs").Omit<{}, "path" | "settings" | "schemas" | "dispatchers" | "tasks" | "templates" | "localizations" | "cleanDispatchers" | "ignoreSchemaVerificationErrors"> & import("yargs").InferredOptionTypes<{
|
|
5
5
|
path: {
|
|
6
6
|
demandOption: false;
|
|
7
|
-
|
|
7
|
+
description: string;
|
|
8
8
|
type: "string";
|
|
9
9
|
};
|
|
10
10
|
schemas: {
|
|
11
11
|
demandOption: false;
|
|
12
|
-
|
|
12
|
+
description: string;
|
|
13
13
|
type: "boolean";
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
16
|
tasks: {
|
|
17
17
|
demandOption: false;
|
|
18
|
-
|
|
18
|
+
description: string;
|
|
19
19
|
type: "boolean";
|
|
20
20
|
default: boolean;
|
|
21
21
|
};
|
|
22
22
|
templates: {
|
|
23
23
|
demandOption: false;
|
|
24
|
-
|
|
24
|
+
description: string;
|
|
25
25
|
type: "boolean";
|
|
26
26
|
default: boolean;
|
|
27
27
|
};
|
|
28
28
|
dispatchers: {
|
|
29
29
|
demandOption: false;
|
|
30
|
-
|
|
30
|
+
description: string;
|
|
31
31
|
type: "boolean";
|
|
32
32
|
default: boolean;
|
|
33
33
|
};
|
|
34
34
|
cleanDispatchers: {
|
|
35
35
|
demandOption: false;
|
|
36
|
-
|
|
36
|
+
description: string;
|
|
37
37
|
type: "boolean";
|
|
38
38
|
};
|
|
39
39
|
localizations: {
|
|
40
40
|
demandOption: false;
|
|
41
|
-
|
|
41
|
+
description: string;
|
|
42
42
|
type: "boolean";
|
|
43
43
|
default: boolean;
|
|
44
44
|
};
|
|
45
45
|
settings: {
|
|
46
46
|
demandOption: false;
|
|
47
|
-
|
|
47
|
+
description: string;
|
|
48
48
|
type: "boolean";
|
|
49
49
|
default: boolean;
|
|
50
50
|
};
|
|
51
51
|
ignoreSchemaVerificationErrors: {
|
|
52
52
|
demandOption: false;
|
|
53
|
-
|
|
53
|
+
description: string;
|
|
54
54
|
type: "boolean";
|
|
55
55
|
default: boolean;
|
|
56
56
|
};
|
package/build/commands/sync.js
CHANGED
|
@@ -12,54 +12,54 @@ const builder = (yargs) => (0, util_1.epilogue)(yargs)
|
|
|
12
12
|
.options({
|
|
13
13
|
path: {
|
|
14
14
|
demandOption: false,
|
|
15
|
-
|
|
15
|
+
description: `Path to folder which needs to be synchronized. The target folder should contain a ${repoConfig_1.REPO_CONFIG_FILE} file.
|
|
16
16
|
If not, the local directory is assumed with a default configuration which assumes tasks are in a 'tasks' folder, schemas in a 'schemas' folder, etc...`,
|
|
17
17
|
type: 'string',
|
|
18
18
|
},
|
|
19
19
|
schemas: {
|
|
20
20
|
demandOption: false,
|
|
21
|
-
|
|
21
|
+
description: 'Sync schemas only',
|
|
22
22
|
type: 'boolean',
|
|
23
23
|
default: false,
|
|
24
24
|
},
|
|
25
25
|
tasks: {
|
|
26
26
|
demandOption: false,
|
|
27
|
-
|
|
27
|
+
description: 'Sync tasks only',
|
|
28
28
|
type: 'boolean',
|
|
29
29
|
default: false,
|
|
30
30
|
},
|
|
31
31
|
templates: {
|
|
32
32
|
demandOption: false,
|
|
33
|
-
|
|
33
|
+
description: 'Sync templates only',
|
|
34
34
|
type: 'boolean',
|
|
35
35
|
default: false,
|
|
36
36
|
},
|
|
37
37
|
dispatchers: {
|
|
38
38
|
demandOption: false,
|
|
39
|
-
|
|
39
|
+
description: 'Sync Dispatchers only',
|
|
40
40
|
type: 'boolean',
|
|
41
41
|
default: false,
|
|
42
42
|
},
|
|
43
43
|
cleanDispatchers: {
|
|
44
44
|
demandOption: false,
|
|
45
|
-
|
|
45
|
+
description: 'Delete Dispatchers created using the CLI, that are no longer present in the local Dispatcher file',
|
|
46
46
|
type: 'boolean',
|
|
47
47
|
},
|
|
48
48
|
localizations: {
|
|
49
49
|
demandOption: false,
|
|
50
|
-
|
|
50
|
+
description: 'Sync localizations only',
|
|
51
51
|
type: 'boolean',
|
|
52
52
|
default: false,
|
|
53
53
|
},
|
|
54
54
|
settings: {
|
|
55
55
|
demandOption: false,
|
|
56
|
-
|
|
56
|
+
description: 'Sync service settings only',
|
|
57
57
|
type: 'boolean',
|
|
58
58
|
default: false,
|
|
59
59
|
},
|
|
60
60
|
ignoreSchemaVerificationErrors: {
|
|
61
61
|
demandOption: false,
|
|
62
|
-
|
|
62
|
+
description: 'Allow schema synchronization to proceed with validation errors.',
|
|
63
63
|
type: 'boolean',
|
|
64
64
|
default: false,
|
|
65
65
|
},
|
|
@@ -4,45 +4,45 @@ export declare const desc = "Sync a task. Will create the task first if it doesn
|
|
|
4
4
|
export declare const builder: (yargs: any) => import("yargs").Argv<import("yargs").Omit<{}, "description" | "code" | "name" | "path" | "entryPoint" | "runtime" | "env" | "timeLimit" | "memoryLimit" | "executionPermission" | "defaultPriority"> & import("yargs").InferredOptionTypes<{
|
|
5
5
|
path: {
|
|
6
6
|
demandOption: false;
|
|
7
|
-
|
|
7
|
+
description: string;
|
|
8
8
|
type: "string";
|
|
9
9
|
};
|
|
10
10
|
name: {
|
|
11
11
|
demandOption: false;
|
|
12
|
-
|
|
12
|
+
description: string;
|
|
13
13
|
type: "string";
|
|
14
14
|
};
|
|
15
15
|
code: {
|
|
16
16
|
demandOption: false;
|
|
17
|
-
|
|
17
|
+
description: string;
|
|
18
18
|
type: "string";
|
|
19
19
|
};
|
|
20
20
|
entryPoint: {
|
|
21
21
|
demandOption: false;
|
|
22
|
-
|
|
22
|
+
description: string;
|
|
23
23
|
type: "string";
|
|
24
24
|
};
|
|
25
25
|
runtime: {
|
|
26
26
|
demandOption: false;
|
|
27
|
-
|
|
27
|
+
description: string;
|
|
28
28
|
choices: string[];
|
|
29
29
|
type: "string";
|
|
30
30
|
};
|
|
31
31
|
description: {
|
|
32
|
-
|
|
32
|
+
description: string;
|
|
33
33
|
type: "string";
|
|
34
34
|
default: string;
|
|
35
35
|
};
|
|
36
36
|
timeLimit: {
|
|
37
|
-
|
|
37
|
+
description: string;
|
|
38
38
|
type: "number";
|
|
39
39
|
};
|
|
40
40
|
memoryLimit: {
|
|
41
|
-
|
|
41
|
+
description: string;
|
|
42
42
|
type: "number";
|
|
43
43
|
};
|
|
44
44
|
env: {
|
|
45
|
-
|
|
45
|
+
description: string;
|
|
46
46
|
type: "string";
|
|
47
47
|
default: any[];
|
|
48
48
|
};
|
|
@@ -11,46 +11,46 @@ const builder = (yargs) => (0, util_1.epilogue)(yargs)
|
|
|
11
11
|
.options({
|
|
12
12
|
path: {
|
|
13
13
|
demandOption: false,
|
|
14
|
-
|
|
14
|
+
description: `Path of the configuration json file containing task parameters. If a directory is given instead, all sub-directories will be searched for a task-config.json file & synced.
|
|
15
15
|
If this option is not used, each parameter (name, code, entryPoint, runtime, ...) will need to be supplied separately`,
|
|
16
16
|
type: 'string',
|
|
17
17
|
},
|
|
18
18
|
name: {
|
|
19
19
|
demandOption: false,
|
|
20
|
-
|
|
20
|
+
description: 'Name of the task',
|
|
21
21
|
type: 'string',
|
|
22
22
|
},
|
|
23
23
|
code: {
|
|
24
24
|
demandOption: false,
|
|
25
|
-
|
|
25
|
+
description: 'The path to a directory containing the built task. exh-cli will compress the directory and upload it',
|
|
26
26
|
type: 'string',
|
|
27
27
|
},
|
|
28
28
|
entryPoint: {
|
|
29
29
|
demandOption: false,
|
|
30
|
-
|
|
30
|
+
description: "The code function that should be invoked. For example 'index.handler' for Nodejs",
|
|
31
31
|
type: 'string',
|
|
32
32
|
},
|
|
33
33
|
runtime: {
|
|
34
34
|
demandOption: false,
|
|
35
|
-
|
|
35
|
+
description: 'Runtime to use for the task',
|
|
36
36
|
choices: constants_1.runtimeChoices,
|
|
37
37
|
type: 'string',
|
|
38
38
|
},
|
|
39
39
|
description: {
|
|
40
|
-
|
|
40
|
+
description: 'A description for this task',
|
|
41
41
|
type: 'string',
|
|
42
42
|
default: '',
|
|
43
43
|
},
|
|
44
44
|
timeLimit: {
|
|
45
|
-
|
|
45
|
+
description: 'The execution time limit for this task (in seconds). Min: 3 max: 900',
|
|
46
46
|
type: 'number',
|
|
47
47
|
},
|
|
48
48
|
memoryLimit: {
|
|
49
|
-
|
|
49
|
+
description: 'The allocated memory for this task (in MB). Min: 128 max: 10240',
|
|
50
50
|
type: 'number',
|
|
51
51
|
},
|
|
52
52
|
env: {
|
|
53
|
-
|
|
53
|
+
description: 'Environment Variables set for this task. This option can be used multiple times.',
|
|
54
54
|
type: 'string',
|
|
55
55
|
default: [],
|
|
56
56
|
},
|
|
@@ -3,11 +3,11 @@ export declare const command = "delete";
|
|
|
3
3
|
export declare const desc = "Delete a template";
|
|
4
4
|
export declare const builder: (yargs: any) => import("yargs").Argv<import("yargs").Omit<{}, "id" | "name"> & import("yargs").InferredOptionTypes<{
|
|
5
5
|
name: {
|
|
6
|
-
|
|
6
|
+
description: string;
|
|
7
7
|
type: "string";
|
|
8
8
|
};
|
|
9
9
|
id: {
|
|
10
|
-
|
|
10
|
+
description: string;
|
|
11
11
|
type: "string";
|
|
12
12
|
};
|
|
13
13
|
}>>;
|
|
@@ -8,11 +8,11 @@ exports.desc = 'Delete a template';
|
|
|
8
8
|
const builder = (yargs) => (0, util_1.epilogue)(yargs)
|
|
9
9
|
.options({
|
|
10
10
|
name: {
|
|
11
|
-
|
|
11
|
+
description: 'Name of the template to delete',
|
|
12
12
|
type: 'string',
|
|
13
13
|
},
|
|
14
14
|
id: {
|
|
15
|
-
|
|
15
|
+
description: 'ID of the template to delete',
|
|
16
16
|
type: 'string',
|
|
17
17
|
},
|
|
18
18
|
})
|
|
@@ -3,11 +3,11 @@ export declare const command = "get";
|
|
|
3
3
|
export declare const desc = "Fetch a template";
|
|
4
4
|
export declare const builder: (yargs: any) => import("yargs").Argv<import("yargs").Omit<{}, "id" | "name"> & import("yargs").InferredOptionTypes<{
|
|
5
5
|
name: {
|
|
6
|
-
|
|
6
|
+
description: string;
|
|
7
7
|
type: "string";
|
|
8
8
|
};
|
|
9
9
|
id: {
|
|
10
|
-
|
|
10
|
+
description: string;
|
|
11
11
|
type: "string";
|
|
12
12
|
};
|
|
13
13
|
}>>;
|
|
@@ -8,11 +8,11 @@ exports.desc = 'Fetch a template';
|
|
|
8
8
|
const builder = (yargs) => (0, util_1.epilogue)(yargs)
|
|
9
9
|
.options({
|
|
10
10
|
name: {
|
|
11
|
-
|
|
11
|
+
description: 'Name of the template',
|
|
12
12
|
type: 'string',
|
|
13
13
|
},
|
|
14
14
|
id: {
|
|
15
|
-
|
|
15
|
+
description: 'ID of the template',
|
|
16
16
|
type: 'string',
|
|
17
17
|
},
|
|
18
18
|
})
|
|
@@ -4,12 +4,12 @@ export declare const desc = "Sync all templates in a directory with the ExH clou
|
|
|
4
4
|
export declare const builder: (yargs: any) => import("yargs").Argv<import("yargs").Omit<{}, "template" | "path"> & import("yargs").InferredOptionTypes<{
|
|
5
5
|
path: {
|
|
6
6
|
demandOption: false;
|
|
7
|
-
|
|
7
|
+
description: string;
|
|
8
8
|
type: "string";
|
|
9
9
|
};
|
|
10
10
|
template: {
|
|
11
11
|
demandOption: false;
|
|
12
|
-
|
|
12
|
+
description: string;
|
|
13
13
|
type: "string";
|
|
14
14
|
};
|
|
15
15
|
}>>;
|
|
@@ -11,12 +11,12 @@ const builder = (yargs) => (0, util_1.epilogue)(yargs)
|
|
|
11
11
|
.options({
|
|
12
12
|
path: {
|
|
13
13
|
demandOption: false,
|
|
14
|
-
|
|
14
|
+
description: 'Directory containing the templates which need to be synced',
|
|
15
15
|
type: 'string',
|
|
16
16
|
},
|
|
17
17
|
template: {
|
|
18
18
|
demandOption: false,
|
|
19
|
-
|
|
19
|
+
description: 'Template file to sync',
|
|
20
20
|
type: 'string',
|
|
21
21
|
},
|
|
22
22
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function init(name: string,
|
|
1
|
+
export declare function init(name: string, filePath: string): Promise<void>;
|
|
@@ -3,12 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.init = void 0;
|
|
4
4
|
const fs_1 = require("fs");
|
|
5
5
|
const promises_1 = require("fs/promises");
|
|
6
|
-
const
|
|
6
|
+
const path = require("path");
|
|
7
7
|
const javascript_sdk_1 = require("@extrahorizon/javascript-sdk");
|
|
8
8
|
const util_1 = require("../../helpers/util");
|
|
9
9
|
const readDispatcherFile_1 = require("./util/readDispatcherFile");
|
|
10
|
-
async function init(name,
|
|
11
|
-
const filePath = osPath.join(path, 'dispatchers.json');
|
|
10
|
+
async function init(name, filePath) {
|
|
12
11
|
const exists = (0, fs_1.existsSync)(filePath);
|
|
13
12
|
const fileContent = {
|
|
14
13
|
dispatchers: [createDispatcher(name)],
|
|
@@ -19,7 +18,8 @@ async function init(name, path) {
|
|
|
19
18
|
fileContent.dispatchers.push(...existingDispatchers);
|
|
20
19
|
}
|
|
21
20
|
else {
|
|
22
|
-
|
|
21
|
+
const dirPath = path.dirname(filePath);
|
|
22
|
+
await (0, promises_1.mkdir)(dirPath, { recursive: true });
|
|
23
23
|
}
|
|
24
24
|
await (0, promises_1.writeFile)(filePath, JSON.stringify(fileContent, null, 2));
|
|
25
25
|
console.log(`✅ Successfully ${exists ? 'updated' : 'created'} ${filePath}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/exh-cli",
|
|
3
|
-
"version": "1.13.0-dev-
|
|
3
|
+
"version": "1.13.0-dev-189-4cbf653",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"exports": "./build/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"typescript": "4.5.5"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@extrahorizon/javascript-sdk": "8.9.1-dev-
|
|
44
|
+
"@extrahorizon/javascript-sdk": "8.9.1-dev-154-e691949",
|
|
45
45
|
"ajv": "8.18.0",
|
|
46
46
|
"archiver": "^7.0.1",
|
|
47
47
|
"chalk": "^4.0.0",
|