@contrail/cli 1.0.14 → 1.0.15
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/lib/cli.js +39 -6
- package/lib/types/interfaces.d.ts +2 -2
- package/lib/types/option-set-merger.d.ts +1 -0
- package/lib/types/option-set-merger.js +102 -0
- package/lib/types/option-set-uploader.d.ts +1 -1
- package/lib/types/option-set-uploader.js +17 -1
- package/lib/types/parse-types.d.ts +2 -0
- package/lib/types/parse-types.js +85 -0
- package/lib/types/types-extractor.d.ts +1 -0
- package/lib/types/types-extractor.js +10 -6
- package/lib/types/types-properties-merger.d.ts +1 -0
- package/lib/types/types-properties-merger.js +69 -0
- package/lib/types/types-uploader.js +0 -4
- package/package.json +2 -2
- package/src/cli.ts +40 -6
- package/src/types/interfaces.ts +2 -2
- package/src/types/option-set-merger.ts +123 -0
- package/src/types/option-set-uploader.ts +21 -1
- package/src/types/parse-types.ts +104 -0
- package/src/types/types-extractor.ts +12 -10
- package/src/types/types-properties-merger.ts +85 -0
- package/src/types/types-uploader.ts +1 -6
- package/.eslint.js +0 -54
- package/.eslintrc.js +0 -20
- package/lib/types/parse-optionSet.d.ts +0 -2
- package/lib/types/parse-optionSet.js +0 -79
- package/option_sets.yml +0 -15
- package/src/types/parse-optionSet.ts +0 -96
- package/test/actions/exampleAction.d.ts +0 -1
- package/test/actions/exampleAction.js +0 -40
- package/test/actions/exampleAction.ts +0 -39
- package/test/app.yml +0 -46
- package/test/option_sets.yml +0 -15
- package/test/package-lock.json +0 -57
- package/test/package.json +0 -26
- package/test/tsconfig.json +0 -31
- package/test/types.yml +0 -1621
- package/types.yml +0 -1621
package/test/app.yml
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
appIdentifier: "@vibe/kamaltest"
|
|
2
|
-
appName: "kamal's test app"
|
|
3
|
-
appDescription: "just a hello world app"
|
|
4
|
-
visibility: private
|
|
5
|
-
publisher: "vibeiq kamal"
|
|
6
|
-
version: 1.0
|
|
7
|
-
|
|
8
|
-
# eventWorkflowTriggerKeyMapping will be used to parse an incoming event into a key that can trigger workflows
|
|
9
|
-
# {} indicates a field on the event. You can use nested fields by separating the levels with a '.'
|
|
10
|
-
# i.e. an event {details: {eventType: 'apparel'}, actionType: 'create'} can be parsed to apparel|create with the following
|
|
11
|
-
eventWorkflowTriggerKeyMapping: "{details.eventType}|{actionType}"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# Actions can be written in .ts but must be compiled to .js before deployment.
|
|
15
|
-
# Ensure the handler points to a .js file
|
|
16
|
-
actions:
|
|
17
|
-
updateProduct:
|
|
18
|
-
handler: actions/exampleAction.js
|
|
19
|
-
name: "Update Product"
|
|
20
|
-
description: "Updates a product in the destination system."
|
|
21
|
-
actionConfiguration:
|
|
22
|
-
email:
|
|
23
|
-
label: "Email Address"
|
|
24
|
-
propertyType: "string"
|
|
25
|
-
|
|
26
|
-
triggers:
|
|
27
|
-
trigger1:
|
|
28
|
-
key: product|create
|
|
29
|
-
name: "External Product Created"
|
|
30
|
-
external: true
|
|
31
|
-
description: "Triggers on externally created products"
|
|
32
|
-
|
|
33
|
-
# TODO - This is not read
|
|
34
|
-
workflows:
|
|
35
|
-
workflow1:
|
|
36
|
-
name: "Update item on product creation"
|
|
37
|
-
triggerKey: product|create
|
|
38
|
-
paths:
|
|
39
|
-
path1:
|
|
40
|
-
conditional: "{retailPrice} > 10"
|
|
41
|
-
actions:
|
|
42
|
-
updateItem:
|
|
43
|
-
actionId: updateItem
|
|
44
|
-
configuration:
|
|
45
|
-
|
|
46
|
-
|
package/test/option_sets.yml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
optionSets:
|
|
2
|
-
- name: Collection
|
|
3
|
-
isArchived: false
|
|
4
|
-
optionSet:
|
|
5
|
-
- value: collection_1
|
|
6
|
-
display: Collection 1
|
|
7
|
-
- value: collection_2
|
|
8
|
-
display: Collection 2
|
|
9
|
-
- name: Gender
|
|
10
|
-
isArchived: false
|
|
11
|
-
optionSet:
|
|
12
|
-
- value: womens
|
|
13
|
-
display: Women's
|
|
14
|
-
- value: mens
|
|
15
|
-
display: Men's
|
package/test/package-lock.json
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "test-app",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"lockfileVersion": 1,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"ansi-styles": {
|
|
8
|
-
"version": "4.3.0",
|
|
9
|
-
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
|
10
|
-
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
|
11
|
-
"requires": {
|
|
12
|
-
"color-convert": "^2.0.1"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"chalk": {
|
|
16
|
-
"version": "4.1.2",
|
|
17
|
-
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
18
|
-
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
19
|
-
"requires": {
|
|
20
|
-
"ansi-styles": "^4.1.0",
|
|
21
|
-
"supports-color": "^7.1.0"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"color-convert": {
|
|
25
|
-
"version": "2.0.1",
|
|
26
|
-
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
|
27
|
-
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
|
28
|
-
"requires": {
|
|
29
|
-
"color-name": "~1.1.4"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"color-name": {
|
|
33
|
-
"version": "1.1.4",
|
|
34
|
-
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
|
35
|
-
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
|
36
|
-
},
|
|
37
|
-
"has-flag": {
|
|
38
|
-
"version": "4.0.0",
|
|
39
|
-
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
|
40
|
-
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
|
|
41
|
-
},
|
|
42
|
-
"supports-color": {
|
|
43
|
-
"version": "7.2.0",
|
|
44
|
-
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
|
45
|
-
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
|
46
|
-
"requires": {
|
|
47
|
-
"has-flag": "^4.0.0"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"typescript": {
|
|
51
|
-
"version": "4.7.4",
|
|
52
|
-
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
|
|
53
|
-
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
|
|
54
|
-
"dev": true
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
package/test/package.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "test-app",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"@contrail/contrail-cli": "bin/init",
|
|
8
|
-
"contrail": "bin/init"
|
|
9
|
-
},
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "tsc",
|
|
15
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [],
|
|
18
|
-
"author": "",
|
|
19
|
-
"license": "ISC",
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"chalk": "^4.0.0"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"typescript": "^4.7.4"
|
|
25
|
-
}
|
|
26
|
-
}
|
package/test/tsconfig.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2017",
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"outDir": "./actions",
|
|
8
|
-
"strict": false,
|
|
9
|
-
"experimentalDecorators": true,
|
|
10
|
-
"strictPropertyInitialization": false,
|
|
11
|
-
"noImplicitAny": false,
|
|
12
|
-
"emitDecoratorMetadata": true,
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"moduleResolution": "node",
|
|
15
|
-
"lib": [
|
|
16
|
-
"es5",
|
|
17
|
-
"ES2015",
|
|
18
|
-
"ES2016",
|
|
19
|
-
"ES2017",
|
|
20
|
-
"dom",
|
|
21
|
-
"esnext.asynciterable"
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
"include": [
|
|
25
|
-
"actions"
|
|
26
|
-
],
|
|
27
|
-
"exclude": [
|
|
28
|
-
"node_modules",
|
|
29
|
-
"**/__tests__/*"
|
|
30
|
-
]
|
|
31
|
-
}
|