@contrail/cli 2.1.27 → 2.1.28
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 +12 -2
- package/dist/api/schedules.d.ts +7 -0
- package/dist/api/schedules.js +32 -0
- package/dist/commands/projects/load.js +3 -3
- package/dist/helpers/workflow-templates/helper.d.ts +4 -2
- package/dist/helpers/workflow-templates/helper.js +102 -18
- package/dist/interfaces.d.ts +6 -0
- package/dist/templates/typescript/app.yml +1 -0
- package/dist/templates/typescript/package.json +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ $ npm install -g @contrail/cli
|
|
|
17
17
|
$ contrail COMMAND
|
|
18
18
|
running command...
|
|
19
19
|
$ contrail (--version)
|
|
20
|
-
@contrail/cli/2.1.
|
|
20
|
+
@contrail/cli/2.1.28 darwin-arm64 node-v18.13.0
|
|
21
21
|
$ contrail --help [COMMAND]
|
|
22
22
|
USAGE
|
|
23
23
|
$ contrail COMMAND
|
|
@@ -517,7 +517,7 @@ DESCRIPTION
|
|
|
517
517
|
Display help for contrail.
|
|
518
518
|
```
|
|
519
519
|
|
|
520
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.
|
|
520
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.20/src/commands/help.ts)_
|
|
521
521
|
|
|
522
522
|
## `contrail instance export`
|
|
523
523
|
|
|
@@ -696,6 +696,8 @@ EXAMPLES
|
|
|
696
696
|
$ contrail plugins:inspect myplugin
|
|
697
697
|
```
|
|
698
698
|
|
|
699
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.3.2/src/commands/plugins/inspect.ts)_
|
|
700
|
+
|
|
699
701
|
## `contrail plugins:install PLUGIN...`
|
|
700
702
|
|
|
701
703
|
Installs a plugin into the CLI.
|
|
@@ -734,6 +736,8 @@ EXAMPLES
|
|
|
734
736
|
$ contrail plugins:install someuser/someplugin
|
|
735
737
|
```
|
|
736
738
|
|
|
739
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.3.2/src/commands/plugins/install.ts)_
|
|
740
|
+
|
|
737
741
|
## `contrail plugins:link PLUGIN`
|
|
738
742
|
|
|
739
743
|
Links a plugin into the CLI for development.
|
|
@@ -761,6 +765,8 @@ EXAMPLES
|
|
|
761
765
|
$ contrail plugins:link myplugin
|
|
762
766
|
```
|
|
763
767
|
|
|
768
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.3.2/src/commands/plugins/link.ts)_
|
|
769
|
+
|
|
764
770
|
## `contrail plugins:uninstall PLUGIN...`
|
|
765
771
|
|
|
766
772
|
Removes a plugin from the CLI.
|
|
@@ -807,6 +813,8 @@ ALIASES
|
|
|
807
813
|
$ contrail plugins remove
|
|
808
814
|
```
|
|
809
815
|
|
|
816
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.3.2/src/commands/plugins/uninstall.ts)_
|
|
817
|
+
|
|
810
818
|
## `contrail plugins:uninstall PLUGIN...`
|
|
811
819
|
|
|
812
820
|
Removes a plugin from the CLI.
|
|
@@ -846,6 +854,8 @@ DESCRIPTION
|
|
|
846
854
|
Update installed plugins.
|
|
847
855
|
```
|
|
848
856
|
|
|
857
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.3.2/src/commands/plugins/update.ts)_
|
|
858
|
+
|
|
849
859
|
## `contrail projects export PROJECTNAME`
|
|
850
860
|
|
|
851
861
|
Export a project.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function getExistingSchedules(): Promise<any[]>;
|
|
2
|
+
export declare function createSchedule(object: any): Promise<any>;
|
|
3
|
+
export declare function deleteSchedule(id: string): Promise<void>;
|
|
4
|
+
export declare function updateSchedule(options: {
|
|
5
|
+
id: string;
|
|
6
|
+
updates: any;
|
|
7
|
+
}): Promise<any>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateSchedule = exports.deleteSchedule = exports.createSchedule = exports.getExistingSchedules = void 0;
|
|
4
|
+
const sdk_1 = require("@contrail/sdk");
|
|
5
|
+
async function getExistingSchedules() {
|
|
6
|
+
return await new sdk_1.Entities().get({
|
|
7
|
+
entityName: 'scheduler',
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
exports.getExistingSchedules = getExistingSchedules;
|
|
11
|
+
async function createSchedule(object) {
|
|
12
|
+
return await new sdk_1.Entities().create({
|
|
13
|
+
entityName: 'scheduler',
|
|
14
|
+
object,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
exports.createSchedule = createSchedule;
|
|
18
|
+
async function deleteSchedule(id) {
|
|
19
|
+
return await new sdk_1.Entities().delete({
|
|
20
|
+
entityName: 'scheduler',
|
|
21
|
+
id,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.deleteSchedule = deleteSchedule;
|
|
25
|
+
async function updateSchedule(options) {
|
|
26
|
+
return await new sdk_1.Entities().update({
|
|
27
|
+
entityName: 'scheduler',
|
|
28
|
+
id: options.id,
|
|
29
|
+
object: options.updates,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
exports.updateSchedule = updateSchedule;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const sdk_1 = require("@contrail/sdk");
|
|
5
|
+
const types_1 = require("@contrail/types");
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
5
7
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
8
|
const login_1 = require("../../auth/login");
|
|
7
|
-
const helpers_1 = require("../../helpers/projects/helpers");
|
|
8
|
-
const core_1 = require("@oclif/core");
|
|
9
9
|
const basecommand_1 = require("../../basecommand");
|
|
10
|
+
const helpers_1 = require("../../helpers/projects/helpers");
|
|
10
11
|
const logger_1 = tslib_1.__importDefault(require("../../logger"));
|
|
11
|
-
const types_1 = require("@contrail/types");
|
|
12
12
|
class LoadProject extends basecommand_1.BaseCommand {
|
|
13
13
|
async run() {
|
|
14
14
|
const { args } = await this.parse(LoadProject);
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { EventWorkflowActionDefinition, WorkflowTemplate, WorkflowTemplateDeclaration } from '../../interfaces';
|
|
2
2
|
export declare class LocalWorkflowTemplateDeployer {
|
|
3
3
|
deployWorkflows(wtDeclaration: WorkflowTemplateDeclaration): Promise<void>;
|
|
4
|
-
deployWorkflowTemplate(workflow: WorkflowTemplate, existingWorkflows: WorkflowTemplate[]): Promise<WorkflowTemplate>;
|
|
4
|
+
deployWorkflowTemplate(workflow: WorkflowTemplate, existingWorkflows: WorkflowTemplate[], appIdentifier: string): Promise<WorkflowTemplate>;
|
|
5
5
|
private createNewWorkflowTemplate;
|
|
6
6
|
private populateActionIds;
|
|
7
|
+
createWorkflowSchedule(workflowTemplate: WorkflowTemplate, workflowId: string): Promise<any>;
|
|
8
|
+
updateWorkflowSchedule(workflowTemplate: WorkflowTemplate, workflowId: string): Promise<any>;
|
|
7
9
|
private updateWorkflowTemplate;
|
|
8
10
|
deleteWorkflowTemplates(wtDeclaration: WorkflowTemplateDeclaration): Promise<void>;
|
|
9
11
|
}
|
|
10
|
-
export declare function getWorkflowTemplateIdentifier(
|
|
12
|
+
export declare function getWorkflowTemplateIdentifier(workflowTemplate: WorkflowTemplate): string;
|
|
11
13
|
export declare function getActionByIdentifier(identifier: string): Promise<EventWorkflowActionDefinition>;
|
|
12
14
|
export declare class WorkflowTemplateDeployer {
|
|
13
15
|
deleteWorkflowTemplates(): Promise<void>;
|
|
@@ -2,40 +2,44 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.populateActionIdentifiers = exports.localDeployWorkflowTemplate = exports.deleteWorkflowTemplates = exports.WorkflowTemplateDeployer = exports.getActionByIdentifier = exports.getWorkflowTemplateIdentifier = exports.LocalWorkflowTemplateDeployer = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const util_1 = require("@contrail/util");
|
|
6
6
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
7
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
8
8
|
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
9
|
+
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
10
|
+
const path = tslib_1.__importStar(require("path"));
|
|
11
|
+
const apps_1 = require("../../api/apps");
|
|
9
12
|
const event_workflow_action_definition_1 = require("../../api/event-workflow-action-definition");
|
|
10
13
|
const event_workflow_templates_1 = require("../../api/event-workflow-templates");
|
|
14
|
+
const schedules_1 = require("../../api/schedules");
|
|
11
15
|
const login_1 = require("../../auth/login");
|
|
12
16
|
const interface_converters_1 = require("../../interface-converters");
|
|
13
17
|
const logger_1 = tslib_1.__importDefault(require("../../logger"));
|
|
14
|
-
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
15
18
|
class LocalWorkflowTemplateDeployer {
|
|
16
19
|
async deployWorkflows(wtDeclaration) {
|
|
17
20
|
// FETCH ALL WORKFLOWS FROM THE API.
|
|
18
21
|
const existingWorkflows = await (0, event_workflow_templates_1.getExistingWorkflowTemplates)();
|
|
19
22
|
// UPSERT / DELETE BASED ON WORKFLOW TEMPLATES IDENTIFIER
|
|
20
23
|
logger_1.default.info('%s \tDeploying workflow templates.', chalk_1.default.yellow.bold('WORKFLOW TEMPLATES'));
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
logger_1.default.info(wtDeclaration);
|
|
25
|
+
for (const workflowKey of Object.keys(wtDeclaration.workflows)) {
|
|
26
|
+
await this.deployWorkflowTemplate(wtDeclaration.workflows[workflowKey], existingWorkflows, wtDeclaration.appIdentifier);
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
|
-
async deployWorkflowTemplate(workflow, existingWorkflows) {
|
|
29
|
+
async deployWorkflowTemplate(workflow, existingWorkflows, appIdentifier) {
|
|
26
30
|
logger_1.default.info(`%s \tDeploying workflow: ${workflow.triggerKey}`, chalk_1.default.yellow.bold('WORKFLOW TEMPLATES'));
|
|
27
|
-
const identifier = getWorkflowTemplateIdentifier(workflow
|
|
31
|
+
const identifier = getWorkflowTemplateIdentifier(workflow);
|
|
28
32
|
const existingTemplate = existingWorkflows.find((ad) => ad.identifier === identifier);
|
|
29
33
|
(0, interface_converters_1.convertWorkflow)(workflow);
|
|
30
34
|
if (existingTemplate) {
|
|
31
|
-
return await this.updateWorkflowTemplate(identifier, existingTemplate, workflow);
|
|
35
|
+
return await this.updateWorkflowTemplate(identifier, existingTemplate, workflow, appIdentifier);
|
|
32
36
|
}
|
|
33
|
-
return await this.createNewWorkflowTemplate(identifier, workflow);
|
|
37
|
+
return await this.createNewWorkflowTemplate(identifier, workflow, appIdentifier);
|
|
34
38
|
}
|
|
35
|
-
async createNewWorkflowTemplate(workflowKey, workflowTemplate) {
|
|
36
|
-
await this.populateActionIds(workflowTemplate, workflowKey);
|
|
39
|
+
async createNewWorkflowTemplate(workflowKey, workflowTemplate, appIdentifier) {
|
|
40
|
+
await this.populateActionIds(workflowTemplate, workflowKey, appIdentifier);
|
|
37
41
|
const newObject = {
|
|
38
|
-
identifier: getWorkflowTemplateIdentifier(
|
|
42
|
+
identifier: getWorkflowTemplateIdentifier(workflowTemplate),
|
|
39
43
|
name: workflowTemplate.name,
|
|
40
44
|
triggerKey: workflowTemplate.triggerKey,
|
|
41
45
|
workflowDefinition: workflowTemplate.workflowDefinition,
|
|
@@ -45,11 +49,16 @@ class LocalWorkflowTemplateDeployer {
|
|
|
45
49
|
parallelWorkerCount: workflowTemplate.parallelWorkerCount,
|
|
46
50
|
};
|
|
47
51
|
const newWorkflowTemplate = await (0, event_workflow_templates_1.createWorkflowTemplate)(newObject);
|
|
52
|
+
if (workflowTemplate.crons) {
|
|
53
|
+
await this.createWorkflowSchedule(workflowTemplate, newWorkflowTemplate.id);
|
|
54
|
+
}
|
|
48
55
|
logger_1.default.info(`%s Created new workflow definition: ${workflowKey}`, chalk_1.default.yellow.bold('WORKFLOW TEMPLATES'));
|
|
49
56
|
return newWorkflowTemplate;
|
|
50
57
|
}
|
|
51
|
-
async populateActionIds(workflowTemplate, workflowKey) {
|
|
58
|
+
async populateActionIds(workflowTemplate, workflowKey, appIdentifier) {
|
|
52
59
|
var _a;
|
|
60
|
+
const installedApps = await (0, apps_1.getInstalledApps)();
|
|
61
|
+
const appOrg = installedApps.find((x) => x.app.identifier === appIdentifier);
|
|
53
62
|
logger_1.default.info('workflow template:', JSON.stringify(workflowTemplate, null, 2));
|
|
54
63
|
if (!((_a = workflowTemplate === null || workflowTemplate === void 0 ? void 0 : workflowTemplate.workflowDefinition) === null || _a === void 0 ? void 0 : _a.paths)) {
|
|
55
64
|
return;
|
|
@@ -61,8 +70,14 @@ class LocalWorkflowTemplateDeployer {
|
|
|
61
70
|
for (const actionConfiguration of path.actionDefinitionConfigs) {
|
|
62
71
|
const actionKey = actionConfiguration.action;
|
|
63
72
|
try {
|
|
64
|
-
const
|
|
73
|
+
const actionIdentifier = util_1.AppUtil.createActionIdentifier({
|
|
74
|
+
actionNameIdentifier: actionKey,
|
|
75
|
+
appIdentifier,
|
|
76
|
+
versionId: appOrg.appVersionId,
|
|
77
|
+
});
|
|
78
|
+
const actionEntity = await getActionByIdentifier(actionIdentifier);
|
|
65
79
|
actionConfiguration.id = actionEntity.id;
|
|
80
|
+
actionConfiguration.identifier = actionEntity.identifier;
|
|
66
81
|
}
|
|
67
82
|
catch (e) {
|
|
68
83
|
logger_1.default.info(e);
|
|
@@ -73,9 +88,77 @@ class LocalWorkflowTemplateDeployer {
|
|
|
73
88
|
}
|
|
74
89
|
}
|
|
75
90
|
}
|
|
76
|
-
async
|
|
91
|
+
async createWorkflowSchedule(workflowTemplate, workflowId) {
|
|
92
|
+
var _a;
|
|
93
|
+
if (!((_a = workflowTemplate === null || workflowTemplate === void 0 ? void 0 : workflowTemplate.crons) === null || _a === void 0 ? void 0 : _a.length) || !workflowTemplate.id) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const crons = [];
|
|
97
|
+
for (const cron of workflowTemplate.crons) {
|
|
98
|
+
crons.push(await (0, schedules_1.createSchedule)({
|
|
99
|
+
cron: cron.cron,
|
|
100
|
+
entityReference: `event-workflow-template:${workflowId}`,
|
|
101
|
+
name: cron.name,
|
|
102
|
+
requestMethod: 'POST',
|
|
103
|
+
entityName: 'event-workflow-request',
|
|
104
|
+
isActive: true,
|
|
105
|
+
payload: {
|
|
106
|
+
event: {},
|
|
107
|
+
triggerKey: workflowTemplate.triggerKey,
|
|
108
|
+
},
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
return crons;
|
|
112
|
+
}
|
|
113
|
+
async updateWorkflowSchedule(workflowTemplate, workflowId) {
|
|
114
|
+
var _a, _b, _c, _d;
|
|
115
|
+
const existingSchedules = (_a = (await (0, schedules_1.getExistingSchedules)()).filter((x) => (x === null || x === void 0 ? void 0 : x.ownerReference) === `event-workflow-template:${workflowId}`)) !== null && _a !== void 0 ? _a : [];
|
|
116
|
+
const newSchedules = (_b = workflowTemplate === null || workflowTemplate === void 0 ? void 0 : workflowTemplate.crons) !== null && _b !== void 0 ? _b : [];
|
|
117
|
+
const existingCronNames = (_c = existingSchedules.map((x) => x.name)) !== null && _c !== void 0 ? _c : [];
|
|
118
|
+
const newCronNames = (_d = newSchedules.map((x) => x.name)) !== null && _d !== void 0 ? _d : [];
|
|
119
|
+
const cronsToAdd = newSchedules.filter((x) => !existingCronNames.includes(x.name));
|
|
120
|
+
const cronsToRemove = existingSchedules.filter((x) => !newCronNames.includes(x.name));
|
|
121
|
+
const cronsToEdit = existingSchedules.filter((x) => newCronNames.includes(x.name));
|
|
122
|
+
for (const cron of cronsToAdd) {
|
|
123
|
+
logger_1.default.info(`%s Adding new schedule: ${cron.name}`, chalk_1.default.yellow.bold('WORKFLOW TEMPLATES'));
|
|
124
|
+
await (0, schedules_1.createSchedule)({
|
|
125
|
+
cron: cron.cron,
|
|
126
|
+
entityReference: `event-workflow-template:${workflowId}`,
|
|
127
|
+
name: cron.name,
|
|
128
|
+
requestMethod: 'POST',
|
|
129
|
+
entityName: 'event-workflow-request',
|
|
130
|
+
isActive: true,
|
|
131
|
+
payload: {
|
|
132
|
+
event: {},
|
|
133
|
+
triggerKey: workflowTemplate.triggerKey,
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
for (const cron of cronsToRemove) {
|
|
138
|
+
logger_1.default.info(`%s Removing schedule: ${cron.name}`, chalk_1.default.yellow.bold('WORKFLOW TEMPLATES'));
|
|
139
|
+
await (0, schedules_1.deleteSchedule)(cron.id);
|
|
140
|
+
}
|
|
141
|
+
for (const cron of cronsToEdit) {
|
|
142
|
+
logger_1.default.info(`%s Updating schedule: ${cron.name}`, chalk_1.default.yellow.bold('WORKFLOW TEMPLATES'));
|
|
143
|
+
const newCron = workflowTemplate.crons.find((x) => x.name === cron.name);
|
|
144
|
+
await (0, schedules_1.updateSchedule)({
|
|
145
|
+
id: cron.id,
|
|
146
|
+
updates: {
|
|
147
|
+
cron: newCron.cron,
|
|
148
|
+
requestMethod: 'POST',
|
|
149
|
+
entityName: 'event-workflow-request',
|
|
150
|
+
isActive: true,
|
|
151
|
+
payload: {
|
|
152
|
+
event: {},
|
|
153
|
+
triggerKey: workflowTemplate.triggerKey,
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
async updateWorkflowTemplate(workflowKey, existingWorkflowTemplate, workflowTemplate, appIdentifier) {
|
|
77
160
|
var _a, _b;
|
|
78
|
-
await this.populateActionIds(workflowTemplate, workflowKey);
|
|
161
|
+
await this.populateActionIds(workflowTemplate, workflowKey, appIdentifier);
|
|
79
162
|
const updates = Object.assign(new Object(), {
|
|
80
163
|
name: workflowTemplate.name,
|
|
81
164
|
triggerKey: workflowTemplate.triggerKey,
|
|
@@ -88,6 +171,7 @@ class LocalWorkflowTemplateDeployer {
|
|
|
88
171
|
id: existingWorkflowTemplate.id,
|
|
89
172
|
updates,
|
|
90
173
|
});
|
|
174
|
+
await this.updateWorkflowSchedule(workflowTemplate, updatedWorkflowTemplate.id);
|
|
91
175
|
logger_1.default.info(`%s Updated existing workflow template: ${updatedWorkflowTemplate.identifier}`, chalk_1.default.yellow.bold('WORKFLOW TEMPLATES'));
|
|
92
176
|
return updatedWorkflowTemplate;
|
|
93
177
|
}
|
|
@@ -97,7 +181,7 @@ class LocalWorkflowTemplateDeployer {
|
|
|
97
181
|
// UPSERT / DELETE BASED ON WORKFLOW TEMPLATES IDENTIFIER
|
|
98
182
|
logger_1.default.info('%s \tDELETING workflow templates.', chalk_1.default.yellow.bold('WORKFLOW TEMPLATES'));
|
|
99
183
|
for (const workflowKey of Object.keys(wtDeclaration.workflows)) {
|
|
100
|
-
const identifier = getWorkflowTemplateIdentifier(workflowKey);
|
|
184
|
+
const identifier = getWorkflowTemplateIdentifier(wtDeclaration.workflows[workflowKey]);
|
|
101
185
|
const existingTemplate = existingWorkflows.find((ad) => ad.identifier === identifier);
|
|
102
186
|
if (existingTemplate) {
|
|
103
187
|
try {
|
|
@@ -114,8 +198,8 @@ class LocalWorkflowTemplateDeployer {
|
|
|
114
198
|
}
|
|
115
199
|
}
|
|
116
200
|
exports.LocalWorkflowTemplateDeployer = LocalWorkflowTemplateDeployer;
|
|
117
|
-
function getWorkflowTemplateIdentifier(
|
|
118
|
-
return
|
|
201
|
+
function getWorkflowTemplateIdentifier(workflowTemplate) {
|
|
202
|
+
return workflowTemplate.identifier;
|
|
119
203
|
}
|
|
120
204
|
exports.getWorkflowTemplateIdentifier = getWorkflowTemplateIdentifier;
|
|
121
205
|
async function getActionByIdentifier(identifier) {
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export interface WorkflowDefinition {
|
|
|
77
77
|
parallelWorkerCount?: number;
|
|
78
78
|
}
|
|
79
79
|
export interface WorkflowTemplateDeclaration {
|
|
80
|
+
appIdentifier: string;
|
|
80
81
|
workflows?: WorkflowTemplate[];
|
|
81
82
|
}
|
|
82
83
|
export interface WorkflowTemplate {
|
|
@@ -88,6 +89,7 @@ export interface WorkflowTemplate {
|
|
|
88
89
|
workflowDefinition: WorkflowDefinitionPaths;
|
|
89
90
|
isActive: boolean;
|
|
90
91
|
ownerKey?: string;
|
|
92
|
+
crons?: CronDeclaration[];
|
|
91
93
|
supportingAppId?: string;
|
|
92
94
|
parallelism?: number;
|
|
93
95
|
groupId?: string;
|
|
@@ -368,3 +370,7 @@ export declare enum PropertyType {
|
|
|
368
370
|
Image = "image",
|
|
369
371
|
Json = "json"
|
|
370
372
|
}
|
|
373
|
+
export interface CronDeclaration {
|
|
374
|
+
name: string;
|
|
375
|
+
cron: string;
|
|
376
|
+
}
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"build": "tsc; npx copyfiles assets/**/* dist/",
|
|
15
15
|
"start": "nodemon --watch \"src/**/*.ts\" --exec ts-node src/main.ts",
|
|
16
16
|
"debug": "nodemon -r ts-node/register --inspect=127.0.0.1:60002 --watch 'actions/**/*.ts' --exec node src/main.ts",
|
|
17
|
-
"lint": "eslint .
|
|
17
|
+
"lint": "eslint --config eslintrc.json .",
|
|
18
|
+
"lint-fix": "eslint --fix --config eslintrc.json .",
|
|
18
19
|
"test": "jest",
|
|
19
20
|
"test-watch": "jest --watch"
|
|
20
21
|
},
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.28",
|
|
4
4
|
"description": "VibeIQ's Contrail Platform CLI.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"contrail-cli": "./bin/run",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"eslint-config-prettier": "^8.8.0",
|
|
62
62
|
"eslint-plugin-prettier": "^5.0.0",
|
|
63
63
|
"jest": "^29.5.0",
|
|
64
|
-
"oclif": "
|
|
64
|
+
"oclif": "3.16",
|
|
65
65
|
"prettier": "^3.0.0",
|
|
66
66
|
"shx": "^0.3.3",
|
|
67
67
|
"ts-jest": "^29.0.5",
|