@contrail/cli 2.1.27 → 2.2.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 +97 -3
- package/dist/api/schedules.d.ts +7 -0
- package/dist/api/schedules.js +32 -0
- package/dist/commands/app/create.js +3 -4
- package/dist/commands/app/delete.js +5 -5
- package/dist/commands/app/init.d.ts +6 -0
- package/dist/commands/app/init.js +63 -0
- package/dist/commands/app/publish.js +3 -3
- package/dist/commands/app/version/major.d.ts +7 -0
- package/dist/commands/app/version/major.js +40 -0
- package/dist/commands/app/version/minor.d.ts +7 -0
- package/dist/commands/app/version/minor.js +40 -0
- package/dist/commands/app/version/patch.d.ts +7 -0
- package/dist/commands/app/version/patch.js +40 -0
- package/dist/commands/colors/deleteAll.js +3 -3
- package/dist/commands/colors/load.js +5 -5
- package/dist/commands/config/environments/remove.js +2 -2
- package/dist/commands/config/environments/set.js +1 -1
- package/dist/commands/groups/export.js +1 -1
- package/dist/commands/loader-process/load.js +4 -4
- package/dist/commands/loader-process/upload-and-load.js +4 -4
- package/dist/commands/projects/load.js +5 -5
- package/dist/commands/types/exportOptionSetHierarchies.js +4 -4
- package/dist/commands/types/getAll.js +31 -25
- package/dist/commands/types/loadAll.js +2 -2
- package/dist/commands/types/mergeOptionSets.js +5 -4
- package/dist/commands/types/mergeTypeProperties.js +2 -2
- package/dist/commands/types/parseOptionSetsHierarchyLocalFile.js +4 -4
- package/dist/commands/types/parseOptionSetsHierarchyValuesToKeysLocalFile.js +2 -2
- package/dist/commands/types/parseOptionSetsLocalFiles.js +2 -2
- package/dist/commands/types/parseOptionSetsToFolderStructure.js +2 -2
- package/dist/commands/types/parseTypesFromFiles.js +2 -2
- package/dist/commands/types/parseTypesFromLocalFiles.js +2 -2
- package/dist/commands/types/parseTypesFromTemplateAndDataFromLocalFiles.js +2 -2
- package/dist/commands/types/parseTypesFromTemplateFromLocalFiles.js +2 -2
- package/dist/commands/types/uploadOptionSetHierarchies.js +30 -20
- package/dist/commands/types/uploadOptionSets.js +16 -15
- package/dist/commands/types/uploadOptionSetsHierarchyLocalFile.js +5 -5
- package/dist/commands/types/uploadRuleSets.js +20 -22
- package/dist/commands/types/uploadTypePolicies.js +23 -23
- package/dist/commands/types/uploadTypePropertyPolicies.js +14 -14
- package/dist/commands/types/uploadUsageInfo.js +12 -12
- package/dist/commands/webhooks/create.js +2 -4
- package/dist/commands/webhooks/list.js +2 -4
- package/dist/helpers/app/actions-deployer.js +4 -4
- package/dist/helpers/app/app-deployer.js +9 -9
- package/dist/helpers/app/extensions-deployer.js +4 -4
- package/dist/helpers/app/update-app-config.d.ts +2 -0
- package/dist/helpers/app/update-app-config.js +20 -0
- package/dist/helpers/app/upgrade-version.d.ts +16 -0
- package/dist/helpers/app/upgrade-version.js +37 -0
- package/dist/helpers/app/upgrade-version.spec.d.ts +1 -0
- package/dist/helpers/app/upgrade-version.spec.js +33 -0
- package/dist/helpers/colors/helpers.js +2 -2
- package/dist/helpers/loader-process/helpers.js +4 -4
- package/dist/helpers/projects/helpers.js +1 -1
- package/dist/helpers/types/csv-parser.js +6 -6
- package/dist/helpers/types/type-extractor.js +1 -1
- package/dist/helpers/types/type-parser.js +11 -11
- package/dist/helpers/types/type-uploader.js +21 -21
- package/dist/helpers/workflow-template-definitions/workflow-template-definition-deployer.js +6 -6
- package/dist/helpers/workflow-templates/helper.d.ts +4 -2
- package/dist/helpers/workflow-templates/helper.js +109 -25
- package/dist/interfaces.d.ts +8 -1
- package/dist/templates/typescript/app.yml +2 -1
- package/dist/templates/typescript/package.json +4 -3
- package/oclif.manifest.json +150 -2
- package/package.json +4 -3
|
@@ -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) {
|
|
26
|
-
logger_1.default.info(
|
|
27
|
-
const identifier = getWorkflowTemplateIdentifier(workflow
|
|
29
|
+
async deployWorkflowTemplate(workflow, existingWorkflows, appIdentifier) {
|
|
30
|
+
logger_1.default.info(`WORKFLOW TEMPLATES \tDeploying workflow: ${workflow.triggerKey}`);
|
|
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,34 +171,35 @@ class LocalWorkflowTemplateDeployer {
|
|
|
88
171
|
id: existingWorkflowTemplate.id,
|
|
89
172
|
updates,
|
|
90
173
|
});
|
|
91
|
-
|
|
174
|
+
await this.updateWorkflowSchedule(workflowTemplate, updatedWorkflowTemplate.id);
|
|
175
|
+
logger_1.default.info(`WORKFLOW TEMPLATES Updated existing workflow template: ${updatedWorkflowTemplate.identifier}`);
|
|
92
176
|
return updatedWorkflowTemplate;
|
|
93
177
|
}
|
|
94
178
|
async deleteWorkflowTemplates(wtDeclaration) {
|
|
95
179
|
// FETCH ALL WORKFLOWS FROM THE API.
|
|
96
180
|
const existingWorkflows = await (0, event_workflow_templates_1.getExistingWorkflowTemplates)();
|
|
97
181
|
// UPSERT / DELETE BASED ON WORKFLOW TEMPLATES IDENTIFIER
|
|
98
|
-
logger_1.default.info('
|
|
182
|
+
logger_1.default.info('WORKFLOW TEMPLATES \tDELETING 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 {
|
|
104
188
|
await (0, event_workflow_templates_1.deleteWorkflowTemplate)(identifier);
|
|
105
189
|
}
|
|
106
190
|
catch (e) {
|
|
107
|
-
logger_1.default.
|
|
191
|
+
logger_1.default.warn('WORKFLOW TEMPLATES \tFAILED to delete workflow template WORKFLOW TEMPLATES.', chalk_1.default.red.bold('WORKFLOW TEMPLATES'), identifier);
|
|
108
192
|
}
|
|
109
193
|
}
|
|
110
194
|
else {
|
|
111
|
-
logger_1.default.info('
|
|
195
|
+
logger_1.default.info('WORKFLOW TEMPLATES \tUnable to locate workflow template WORKFLOW TEMPLATES.', chalk_1.default.yellow.bold('WORKFLOW TEMPLATES'), identifier);
|
|
112
196
|
}
|
|
113
197
|
}
|
|
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) {
|
|
@@ -140,7 +224,7 @@ class WorkflowTemplateDeployer {
|
|
|
140
224
|
for (const idToDelete of answers.wfTemplatesToDelete) {
|
|
141
225
|
await (0, event_workflow_templates_1.deleteWorkflowTemplate)(idToDelete);
|
|
142
226
|
}
|
|
143
|
-
logger_1.default.info('
|
|
227
|
+
logger_1.default.info('WORKFLOW TEMPLATES \tDeleted workflow templates!');
|
|
144
228
|
}
|
|
145
229
|
async listExistingWorkflowTemplates() {
|
|
146
230
|
const templates = await (0, event_workflow_templates_1.getExistingWorkflowTemplates)();
|
|
@@ -163,7 +247,7 @@ async function localDeployWorkflowTemplate(saveFileLocation) {
|
|
|
163
247
|
wtDeclaration = loadTemplateConfig(saveFileLocation);
|
|
164
248
|
}
|
|
165
249
|
catch (e) {
|
|
166
|
-
logger_1.default.
|
|
250
|
+
logger_1.default.error(`FAIL Workflow Deletion Failed . ${e}`);
|
|
167
251
|
return;
|
|
168
252
|
}
|
|
169
253
|
await (0, login_1.authUser)();
|
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;
|
|
@@ -327,7 +329,7 @@ export interface ReducedTypeProperty {
|
|
|
327
329
|
editable: boolean;
|
|
328
330
|
searchable: boolean;
|
|
329
331
|
core: boolean;
|
|
330
|
-
|
|
332
|
+
typePropertyOptionSetSlug: string;
|
|
331
333
|
formula: string;
|
|
332
334
|
referencedTypePath: string;
|
|
333
335
|
referencedTypeRootSlug: string;
|
|
@@ -341,6 +343,7 @@ export interface ReducedTypeProperty {
|
|
|
341
343
|
}
|
|
342
344
|
export interface ReducedOptionSet {
|
|
343
345
|
name: string;
|
|
346
|
+
identifier: string;
|
|
344
347
|
isArchived: boolean;
|
|
345
348
|
optionSet: any[];
|
|
346
349
|
}
|
|
@@ -368,3 +371,7 @@ export declare enum PropertyType {
|
|
|
368
371
|
Image = "image",
|
|
369
372
|
Json = "json"
|
|
370
373
|
}
|
|
374
|
+
export interface CronDeclaration {
|
|
375
|
+
name: string;
|
|
376
|
+
cron: string;
|
|
377
|
+
}
|
|
@@ -4,7 +4,7 @@ appDescription: "APP_DESCRIPTION_STUB" # Give your app a description
|
|
|
4
4
|
visibility: private # This should be private unless you want to develop an app for all VibeIQ customers to use
|
|
5
5
|
hidden: false # can be used with a public app to prevent it from showing on the marketplace, but still installable by other orgs
|
|
6
6
|
publisher: "Your company name" # Your company name, used for public apps
|
|
7
|
-
version: 1.0
|
|
7
|
+
version: 1.0.0
|
|
8
8
|
|
|
9
9
|
# Properties you can configure when you install the app.
|
|
10
10
|
# These property values will be available to all of your actions when they run
|
|
@@ -29,6 +29,7 @@ actions:
|
|
|
29
29
|
|
|
30
30
|
workflows:
|
|
31
31
|
logItemUpdate:
|
|
32
|
+
identifier: "logItemUpdate"
|
|
32
33
|
name: "Item Update -> Log"
|
|
33
34
|
triggerKey: item|update
|
|
34
35
|
isActive: true
|
|
@@ -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
|
},
|
|
@@ -22,8 +23,8 @@
|
|
|
22
23
|
"author": "",
|
|
23
24
|
"license": "ISC",
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"@contrail/app-framework": "^1.2
|
|
26
|
-
"@contrail/sdk": "^1.
|
|
26
|
+
"@contrail/app-framework": "^1.2",
|
|
27
|
+
"@contrail/sdk": "^1.3",
|
|
27
28
|
"chalk": "^4.0.0",
|
|
28
29
|
"js-yaml": "^4.1.0"
|
|
29
30
|
},
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1
|
|
2
|
+
"version": "2.2.1",
|
|
3
3
|
"commands": {
|
|
4
4
|
"app:create": {
|
|
5
5
|
"id": "app:create",
|
|
@@ -120,6 +120,43 @@
|
|
|
120
120
|
},
|
|
121
121
|
"args": {}
|
|
122
122
|
},
|
|
123
|
+
"app:init": {
|
|
124
|
+
"id": "app:init",
|
|
125
|
+
"description": "Create an app from a template",
|
|
126
|
+
"strict": true,
|
|
127
|
+
"pluginName": "@contrail/cli",
|
|
128
|
+
"pluginAlias": "@contrail/cli",
|
|
129
|
+
"pluginType": "core",
|
|
130
|
+
"aliases": [],
|
|
131
|
+
"examples": [
|
|
132
|
+
"$ contrail app init\n"
|
|
133
|
+
],
|
|
134
|
+
"flags": {
|
|
135
|
+
"logLevel": {
|
|
136
|
+
"name": "logLevel",
|
|
137
|
+
"type": "option",
|
|
138
|
+
"char": "l",
|
|
139
|
+
"description": "The Log Level",
|
|
140
|
+
"required": false,
|
|
141
|
+
"multiple": false,
|
|
142
|
+
"options": [
|
|
143
|
+
"error",
|
|
144
|
+
"warn",
|
|
145
|
+
"info",
|
|
146
|
+
"debug"
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"alwaysConfirmEnv": {
|
|
150
|
+
"name": "alwaysConfirmEnv",
|
|
151
|
+
"type": "boolean",
|
|
152
|
+
"char": "e",
|
|
153
|
+
"description": "The Environment variables",
|
|
154
|
+
"required": false,
|
|
155
|
+
"allowNo": false
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"args": {}
|
|
159
|
+
},
|
|
123
160
|
"app:install": {
|
|
124
161
|
"id": "app:install",
|
|
125
162
|
"description": "Install an app from the marketplace",
|
|
@@ -1945,7 +1982,7 @@
|
|
|
1945
1982
|
"name": "dir",
|
|
1946
1983
|
"type": "option",
|
|
1947
1984
|
"char": "d",
|
|
1948
|
-
"description": "The directory from which to export the usage info data. Defaults to the current directory. The
|
|
1985
|
+
"description": "The directory from which to export the usage info data. Defaults to the current directory. The usage info data will be loaded from $dir/usage-info.yml",
|
|
1949
1986
|
"required": false,
|
|
1950
1987
|
"multiple": false,
|
|
1951
1988
|
"default": "."
|
|
@@ -2475,6 +2512,117 @@
|
|
|
2475
2512
|
}
|
|
2476
2513
|
}
|
|
2477
2514
|
},
|
|
2515
|
+
"app:version:major": {
|
|
2516
|
+
"id": "app:version:major",
|
|
2517
|
+
"description": "Upgrade the Major app version",
|
|
2518
|
+
"strict": true,
|
|
2519
|
+
"pluginName": "@contrail/cli",
|
|
2520
|
+
"pluginAlias": "@contrail/cli",
|
|
2521
|
+
"pluginType": "core",
|
|
2522
|
+
"aliases": [],
|
|
2523
|
+
"examples": [
|
|
2524
|
+
"$ contrail app version major\n"
|
|
2525
|
+
],
|
|
2526
|
+
"flags": {
|
|
2527
|
+
"logLevel": {
|
|
2528
|
+
"name": "logLevel",
|
|
2529
|
+
"type": "option",
|
|
2530
|
+
"char": "l",
|
|
2531
|
+
"description": "The Log Level",
|
|
2532
|
+
"required": false,
|
|
2533
|
+
"multiple": false,
|
|
2534
|
+
"options": [
|
|
2535
|
+
"error",
|
|
2536
|
+
"warn",
|
|
2537
|
+
"info",
|
|
2538
|
+
"debug"
|
|
2539
|
+
]
|
|
2540
|
+
},
|
|
2541
|
+
"alwaysConfirmEnv": {
|
|
2542
|
+
"name": "alwaysConfirmEnv",
|
|
2543
|
+
"type": "boolean",
|
|
2544
|
+
"char": "e",
|
|
2545
|
+
"description": "The Environment variables",
|
|
2546
|
+
"required": false,
|
|
2547
|
+
"allowNo": false
|
|
2548
|
+
}
|
|
2549
|
+
},
|
|
2550
|
+
"args": {}
|
|
2551
|
+
},
|
|
2552
|
+
"app:version:minor": {
|
|
2553
|
+
"id": "app:version:minor",
|
|
2554
|
+
"description": "Upgrade the Minor app version",
|
|
2555
|
+
"strict": true,
|
|
2556
|
+
"pluginName": "@contrail/cli",
|
|
2557
|
+
"pluginAlias": "@contrail/cli",
|
|
2558
|
+
"pluginType": "core",
|
|
2559
|
+
"aliases": [],
|
|
2560
|
+
"examples": [
|
|
2561
|
+
"$ contrail app version minor\n"
|
|
2562
|
+
],
|
|
2563
|
+
"flags": {
|
|
2564
|
+
"logLevel": {
|
|
2565
|
+
"name": "logLevel",
|
|
2566
|
+
"type": "option",
|
|
2567
|
+
"char": "l",
|
|
2568
|
+
"description": "The Log Level",
|
|
2569
|
+
"required": false,
|
|
2570
|
+
"multiple": false,
|
|
2571
|
+
"options": [
|
|
2572
|
+
"error",
|
|
2573
|
+
"warn",
|
|
2574
|
+
"info",
|
|
2575
|
+
"debug"
|
|
2576
|
+
]
|
|
2577
|
+
},
|
|
2578
|
+
"alwaysConfirmEnv": {
|
|
2579
|
+
"name": "alwaysConfirmEnv",
|
|
2580
|
+
"type": "boolean",
|
|
2581
|
+
"char": "e",
|
|
2582
|
+
"description": "The Environment variables",
|
|
2583
|
+
"required": false,
|
|
2584
|
+
"allowNo": false
|
|
2585
|
+
}
|
|
2586
|
+
},
|
|
2587
|
+
"args": {}
|
|
2588
|
+
},
|
|
2589
|
+
"app:version:patch": {
|
|
2590
|
+
"id": "app:version:patch",
|
|
2591
|
+
"description": "Upgrade the Patch app version",
|
|
2592
|
+
"strict": true,
|
|
2593
|
+
"pluginName": "@contrail/cli",
|
|
2594
|
+
"pluginAlias": "@contrail/cli",
|
|
2595
|
+
"pluginType": "core",
|
|
2596
|
+
"aliases": [],
|
|
2597
|
+
"examples": [
|
|
2598
|
+
"$ contrail app version patch\n"
|
|
2599
|
+
],
|
|
2600
|
+
"flags": {
|
|
2601
|
+
"logLevel": {
|
|
2602
|
+
"name": "logLevel",
|
|
2603
|
+
"type": "option",
|
|
2604
|
+
"char": "l",
|
|
2605
|
+
"description": "The Log Level",
|
|
2606
|
+
"required": false,
|
|
2607
|
+
"multiple": false,
|
|
2608
|
+
"options": [
|
|
2609
|
+
"error",
|
|
2610
|
+
"warn",
|
|
2611
|
+
"info",
|
|
2612
|
+
"debug"
|
|
2613
|
+
]
|
|
2614
|
+
},
|
|
2615
|
+
"alwaysConfirmEnv": {
|
|
2616
|
+
"name": "alwaysConfirmEnv",
|
|
2617
|
+
"type": "boolean",
|
|
2618
|
+
"char": "e",
|
|
2619
|
+
"description": "The Environment variables",
|
|
2620
|
+
"required": false,
|
|
2621
|
+
"allowNo": false
|
|
2622
|
+
}
|
|
2623
|
+
},
|
|
2624
|
+
"args": {}
|
|
2625
|
+
},
|
|
2478
2626
|
"config:environments:list": {
|
|
2479
2627
|
"id": "config:environments:list",
|
|
2480
2628
|
"description": "List the environment configurations",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/cli",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "VibeIQ's Contrail Platform CLI.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"contrail-cli": "./bin/run",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@contrail/entity-types": "^1.1.17",
|
|
26
26
|
"@contrail/sdk": "^1.2.17",
|
|
27
|
-
"@contrail/types": "^3.0.
|
|
27
|
+
"@contrail/types": "^3.0.48",
|
|
28
28
|
"@contrail/util": "^1.0.41",
|
|
29
29
|
"@oclif/core": "^2",
|
|
30
30
|
"@oclif/plugin-autocomplete": "^2.1.4",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"lodash": "^4.17.21",
|
|
48
48
|
"ncp": "^2.0.0",
|
|
49
49
|
"pkg-install": "^1.0.0",
|
|
50
|
+
"semver": "^7.5.4",
|
|
50
51
|
"winston": "^3.10.0",
|
|
51
52
|
"zip-a-folder": "^1.1.5"
|
|
52
53
|
},
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
"eslint-config-prettier": "^8.8.0",
|
|
62
63
|
"eslint-plugin-prettier": "^5.0.0",
|
|
63
64
|
"jest": "^29.5.0",
|
|
64
|
-
"oclif": "
|
|
65
|
+
"oclif": "3.16",
|
|
65
66
|
"prettier": "^3.0.0",
|
|
66
67
|
"shx": "^0.3.3",
|
|
67
68
|
"ts-jest": "^29.0.5",
|