@boltic/cli 1.0.6-beta.3 → 1.0.6-beta.5
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/commands/integration.js +13 -0
- package/helper/folder.js +5 -1
- package/package.json +1 -1
- package/templates/schemas.js +23 -5
package/commands/integration.js
CHANGED
|
@@ -151,6 +151,19 @@ async function handleSync(args) {
|
|
|
151
151
|
if (fs.existsSync(specPath)) {
|
|
152
152
|
const specContent = JSON.parse(fs.readFileSync(specPath, "utf8"));
|
|
153
153
|
// Update integration with spec.json content
|
|
154
|
+
|
|
155
|
+
if (
|
|
156
|
+
specContent.trigger_type &&
|
|
157
|
+
specContent.trigger_type !== "CloudTrigger"
|
|
158
|
+
) {
|
|
159
|
+
console.error(
|
|
160
|
+
chalk.red(
|
|
161
|
+
`Error: Invalid trigger_type "${specContent.trigger_type}". It should be "CloudTrigger" or null.`
|
|
162
|
+
)
|
|
163
|
+
);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
|
|
154
167
|
const updatedIntegration = await updateIntegration(
|
|
155
168
|
apiUrl,
|
|
156
169
|
token,
|
package/helper/folder.js
CHANGED
|
@@ -57,7 +57,11 @@ export const createIntegrationFolderStructure = async (
|
|
|
57
57
|
4
|
|
58
58
|
),
|
|
59
59
|
}),
|
|
60
|
-
"schemas/base.json": JSON.stringify(
|
|
60
|
+
"schemas/base.json": JSON.stringify(
|
|
61
|
+
base(name, create_catalogue),
|
|
62
|
+
null,
|
|
63
|
+
4
|
|
64
|
+
),
|
|
61
65
|
...(!isEmpty(trigger_type) && {
|
|
62
66
|
"schemas/webhook.json": JSON.stringify(webhook(name), null, 4),
|
|
63
67
|
}),
|
package/package.json
CHANGED
package/templates/schemas.js
CHANGED
|
@@ -45,10 +45,24 @@ const authentication = {
|
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
const base = (name) => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
const base = (name, create_catalogue) => {
|
|
49
|
+
const secretParameter = create_catalogue
|
|
50
|
+
? {
|
|
51
|
+
name: "secret",
|
|
52
|
+
meta: {
|
|
53
|
+
displayName: "Service Account",
|
|
54
|
+
displayType: "hidden",
|
|
55
|
+
placeholder: "Select Service Account",
|
|
56
|
+
description:
|
|
57
|
+
"Your service account credentials are encrypted & can be removed at any time.",
|
|
58
|
+
options: [],
|
|
59
|
+
value: `__BOLTIC_INTEGRATION_${name.toUpperCase()}`,
|
|
60
|
+
validation: {
|
|
61
|
+
required: true,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
: {
|
|
52
66
|
name: "secret",
|
|
53
67
|
meta: {
|
|
54
68
|
displayName: "Service Account",
|
|
@@ -72,7 +86,11 @@ const base = (name) => {
|
|
|
72
86
|
required: true,
|
|
73
87
|
},
|
|
74
88
|
},
|
|
75
|
-
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
parameters: [
|
|
93
|
+
secretParameter,
|
|
76
94
|
{
|
|
77
95
|
name: "resource",
|
|
78
96
|
meta: {
|