@contrail/cli 2.1.26 → 2.1.27
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 +1 -1
- package/dist/helpers/colors/helpers.js +12 -3
- package/dist/helpers/workflow-template-definitions/workflow-template-definition-deployer.d.ts +2 -1
- package/dist/helpers/workflow-template-definitions/workflow-template-definition-deployer.js +8 -1
- package/dist/interfaces.d.ts +1 -0
- package/dist/templates/typescript/eslintrc.json +47 -0
- package/dist/templates/typescript/package.json +3 -0
- 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.27 darwin-arm64 node-v18.13.0
|
|
21
21
|
$ contrail --help [COMMAND]
|
|
22
22
|
USAGE
|
|
23
23
|
$ contrail COMMAND
|
|
@@ -22,14 +22,23 @@ async function getLocalColors() {
|
|
|
22
22
|
exports.getLocalColors = getLocalColors;
|
|
23
23
|
async function getExistingColors() {
|
|
24
24
|
logger_1.default.info('%s Getting Existing Colors', chalk_1.default.yellow.bold('COLORS'));
|
|
25
|
+
const colors = [];
|
|
25
26
|
try {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
let nextPageKey = null;
|
|
28
|
+
do {
|
|
29
|
+
const result = await new sdk_1.Entities().get({
|
|
30
|
+
entityName: 'color',
|
|
31
|
+
nextPageKey,
|
|
32
|
+
apiVersion: sdk_1.API_VERSION.V2,
|
|
33
|
+
});
|
|
34
|
+
colors.push(...result.results);
|
|
35
|
+
nextPageKey = result.nextPageKey;
|
|
36
|
+
} while (nextPageKey);
|
|
29
37
|
}
|
|
30
38
|
catch (e) {
|
|
31
39
|
throw new Error(`ERROR DOWNLOADING COLORS: ${e}`);
|
|
32
40
|
}
|
|
41
|
+
return colors;
|
|
33
42
|
}
|
|
34
43
|
exports.getExistingColors = getExistingColors;
|
|
35
44
|
async function deleteColor(color) {
|
package/dist/helpers/workflow-template-definitions/workflow-template-definition-deployer.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ export declare class WorkflowTemplateDefinitionDeployer {
|
|
|
8
8
|
private createNewWorkflowDefinition;
|
|
9
9
|
private populateActionIds;
|
|
10
10
|
private updateWorkflowTemplateDefinition;
|
|
11
|
-
|
|
11
|
+
getActionDeclarationIdentifier(actionKey: any, app: App): string;
|
|
12
|
+
getWorkflowDeclarationIdentifier(workflowKey: any, app: App): string;
|
|
12
13
|
}
|
|
@@ -147,6 +147,10 @@ class WorkflowTemplateDefinitionDeployer {
|
|
|
147
147
|
throw new Error(`Could not find action ${actionKey} declared in workflow definition ${workflowDefinition.name}`);
|
|
148
148
|
}
|
|
149
149
|
actionConfiguration.id = action.id;
|
|
150
|
+
actionConfiguration.identifier = (0, actions_deployer_1.getActionDeclarationIdentifier)(actionKey, app);
|
|
151
|
+
if (!actionConfiguration.identifier) {
|
|
152
|
+
throw new Error(`Could not create action identifier for action ${actionKey} workflow definition ${workflowDefinition.name}`);
|
|
153
|
+
}
|
|
150
154
|
}
|
|
151
155
|
}
|
|
152
156
|
}
|
|
@@ -168,8 +172,11 @@ class WorkflowTemplateDefinitionDeployer {
|
|
|
168
172
|
logger_1.default.info(`%s Updated existing workflow definition: ${updatedWorkflowDefinition.identifier}`, chalk_1.default.yellow.bold('WORKFLOW DEFINITION'));
|
|
169
173
|
return updatedWorkflowDefinition;
|
|
170
174
|
}
|
|
171
|
-
|
|
175
|
+
getActionDeclarationIdentifier(actionKey, app) {
|
|
172
176
|
return `${app.identifier}@${app.latestAppVersionId}:${actionKey}`;
|
|
173
177
|
}
|
|
178
|
+
getWorkflowDeclarationIdentifier(workflowKey, app) {
|
|
179
|
+
return `${app.identifier}@${app.latestAppVersionId}:${workflowKey}`;
|
|
180
|
+
}
|
|
174
181
|
}
|
|
175
182
|
exports.WorkflowTemplateDefinitionDeployer = WorkflowTemplateDefinitionDeployer;
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true,
|
|
4
|
+
"es2021": true,
|
|
5
|
+
"node": true
|
|
6
|
+
},
|
|
7
|
+
"extends": [
|
|
8
|
+
"eslint:recommended",
|
|
9
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
10
|
+
"plugin:@typescript-eslint/recommended"
|
|
11
|
+
],
|
|
12
|
+
"ignorePatterns": ["node_modules/", "dist/"],
|
|
13
|
+
"parser": "@typescript-eslint/parser",
|
|
14
|
+
"parserOptions": {
|
|
15
|
+
"ecmaVersion": "latest",
|
|
16
|
+
"sourceType": "module"
|
|
17
|
+
},
|
|
18
|
+
"plugins": ["@typescript-eslint", "unused-imports"],
|
|
19
|
+
"rules": {
|
|
20
|
+
"indent": ["error", 2],
|
|
21
|
+
"linebreak-style": ["error", "unix"],
|
|
22
|
+
"quote-props": ["error", "as-needed"],
|
|
23
|
+
"quotes": ["error", "single"],
|
|
24
|
+
"semi": ["error", "always"],
|
|
25
|
+
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }],
|
|
26
|
+
"no-trailing-spaces": "error",
|
|
27
|
+
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
|
|
28
|
+
"@typescript-eslint/no-empty-function": [
|
|
29
|
+
"error",
|
|
30
|
+
{ "allow": ["arrowFunctions"] }
|
|
31
|
+
],
|
|
32
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
33
|
+
"@typescript-eslint/no-var-requires": "warn",
|
|
34
|
+
"no-unused-vars": "off",
|
|
35
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
36
|
+
"unused-imports/no-unused-imports": "error",
|
|
37
|
+
"unused-imports/no-unused-vars": [
|
|
38
|
+
"warn",
|
|
39
|
+
{
|
|
40
|
+
"vars": "all",
|
|
41
|
+
"varsIgnorePattern": "^_",
|
|
42
|
+
"args": "after-used",
|
|
43
|
+
"argsIgnorePattern": "^_"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
}
|
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.27",
|
|
4
4
|
"description": "VibeIQ's Contrail Platform CLI.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"contrail-cli": "./bin/run",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@contrail/entity-types": "^1.1.17",
|
|
26
|
-
"@contrail/sdk": "^1.2.
|
|
26
|
+
"@contrail/sdk": "^1.2.17",
|
|
27
27
|
"@contrail/types": "^3.0.20",
|
|
28
28
|
"@contrail/util": "^1.0.41",
|
|
29
29
|
"@oclif/core": "^2",
|