@boltic/cli 1.0.6-beta.1 → 1.0.6-beta.2
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/.claude/settings.local.json +2 -1
- package/cli.js +17 -9
- package/commands/integration.js +18 -3
- package/commands/login.js +1 -1
- package/helper/env.js +1 -1
- package/helper/validation.js +17 -0
- package/package.json +3 -2
- package/utils/integration.js +1 -1
package/cli.js
CHANGED
|
@@ -114,7 +114,7 @@ async function showHelp(commands) {
|
|
|
114
114
|
packageJson = JSON.parse(
|
|
115
115
|
fs.readFileSync(path.join(process.cwd(), "package.json"))
|
|
116
116
|
);
|
|
117
|
-
} catch
|
|
117
|
+
} catch {
|
|
118
118
|
// Fallback version if package.json not found
|
|
119
119
|
packageJson = { version: "1.0.0" };
|
|
120
120
|
}
|
|
@@ -141,17 +141,25 @@ async function handleEnvironment(args) {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
async function showVersion() {
|
|
144
|
-
let
|
|
144
|
+
let version = "1.0.0"; // default fallback
|
|
145
145
|
try {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
let packageJsonPath;
|
|
147
|
+
if (typeof import.meta !== "undefined" && import.meta.url) {
|
|
148
|
+
// ES modules in Node.js
|
|
149
|
+
const currentDir = path.dirname(new URL(import.meta.url).pathname);
|
|
150
|
+
packageJsonPath = path.join(currentDir, "package.json");
|
|
151
|
+
} else {
|
|
152
|
+
// Jest or other environments
|
|
153
|
+
packageJsonPath = path.join(process.cwd(), "package.json");
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const packageJson = JSON.parse(
|
|
157
|
+
fs.readFileSync(packageJsonPath, "utf-8")
|
|
149
158
|
);
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
159
|
+
version = packageJson.version;
|
|
160
|
+
} catch {
|
|
161
|
+
// fallback already defined
|
|
153
162
|
}
|
|
154
|
-
const version = packageJson.version;
|
|
155
163
|
console.log(`Boltic CLI Version: ${version}`);
|
|
156
164
|
}
|
|
157
165
|
|
package/commands/integration.js
CHANGED
|
@@ -638,7 +638,12 @@ async function handleEdit() {
|
|
|
638
638
|
const choices =
|
|
639
639
|
integrations
|
|
640
640
|
.filter((integration) =>
|
|
641
|
-
[
|
|
641
|
+
[
|
|
642
|
+
"customActivity",
|
|
643
|
+
"CloudTrigger",
|
|
644
|
+
"applicationFdkActivity",
|
|
645
|
+
"platformFdkActivity",
|
|
646
|
+
].includes(
|
|
642
647
|
integration.activity_type || integration.trigger_type
|
|
643
648
|
)
|
|
644
649
|
)
|
|
@@ -793,7 +798,12 @@ async function handlePull(args) {
|
|
|
793
798
|
const choices =
|
|
794
799
|
integrations
|
|
795
800
|
.filter((integration) =>
|
|
796
|
-
[
|
|
801
|
+
[
|
|
802
|
+
"customActivity",
|
|
803
|
+
"CloudTrigger",
|
|
804
|
+
"applicationFdkActivity",
|
|
805
|
+
"platformFdkActivity",
|
|
806
|
+
].includes(
|
|
797
807
|
integration.activity_type ||
|
|
798
808
|
integration.trigger_type
|
|
799
809
|
)
|
|
@@ -899,7 +909,12 @@ async function handleStatus() {
|
|
|
899
909
|
const choices =
|
|
900
910
|
integrations
|
|
901
911
|
.filter((integration) =>
|
|
902
|
-
[
|
|
912
|
+
[
|
|
913
|
+
"customActivity",
|
|
914
|
+
"CloudTrigger",
|
|
915
|
+
"applicationFdkActivity",
|
|
916
|
+
"platformFdkActivity",
|
|
917
|
+
].includes(
|
|
903
918
|
integration.activity_type || integration.trigger_type
|
|
904
919
|
)
|
|
905
920
|
)
|
package/commands/login.js
CHANGED
package/helper/env.js
CHANGED
package/helper/validation.js
CHANGED
|
@@ -154,6 +154,23 @@ const validateResources = (resourcesDir, resourceFields, errors) => {
|
|
|
154
154
|
});
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
+
// const validateParametersScema = (schema, errors) => {
|
|
158
|
+
// if (!schema || !Array.isArray(schema.parameters)) {
|
|
159
|
+
// errors.add(
|
|
160
|
+
// `Schema is missing or parameters are not defined as an array.`
|
|
161
|
+
// );
|
|
162
|
+
// return;
|
|
163
|
+
// }
|
|
164
|
+
// schema.parameters.forEach((param) => {
|
|
165
|
+
// const { meta } = param;
|
|
166
|
+
// if (!param.name) {
|
|
167
|
+
// errors.add(
|
|
168
|
+
// `Parameter in schema is missing a name. Ensure all parameters have a "name" field.`
|
|
169
|
+
// );
|
|
170
|
+
// }
|
|
171
|
+
// });
|
|
172
|
+
// };
|
|
173
|
+
|
|
157
174
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
158
175
|
// MAIN FUNCTION
|
|
159
176
|
// ─────────────────────────────────────────────────────────────────────────────
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boltic/cli",
|
|
3
|
-
"version": "1.0.6-beta.
|
|
3
|
+
"version": "1.0.6-beta.2",
|
|
4
4
|
"description": "A powerful CLI tool for managing Boltic Workflow integrations",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"start": "node index.js",
|
|
13
13
|
"dev": "nodemon index.js",
|
|
14
14
|
"test": "jest",
|
|
15
|
-
"prepare": "husky"
|
|
15
|
+
"prepare": "husky",
|
|
16
|
+
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
|
|
16
17
|
},
|
|
17
18
|
"keywords": [
|
|
18
19
|
"cli",
|