@boltic/cli 1.0.41 → 1.0.42
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 +64 -15
- package/api/serverless.js +148 -3
- package/cli.js +69 -34
- package/commands/env.js +11 -2
- package/commands/integration.js +11 -2
- package/commands/mcp.js +9 -2
- package/commands/serverless.js +1004 -188
- package/helper/verbose.js +62 -0
- package/package.json +1 -1
package/helper/verbose.js
CHANGED
|
@@ -18,3 +18,65 @@ export const logApi = (method, url, status) => {
|
|
|
18
18
|
)
|
|
19
19
|
);
|
|
20
20
|
};
|
|
21
|
+
|
|
22
|
+
export const logApiRequest = (method, url, payload = null) => {
|
|
23
|
+
if (!isVerbose) return;
|
|
24
|
+
console.log(
|
|
25
|
+
chalk.dim(
|
|
26
|
+
"\n┌─────────────────────────────────────────────────────────────"
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
console.log(chalk.dim("│ ") + chalk.cyan("REQUEST"));
|
|
30
|
+
console.log(
|
|
31
|
+
chalk.dim(
|
|
32
|
+
"├─────────────────────────────────────────────────────────────"
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
console.log(
|
|
36
|
+
chalk.dim("│ ") +
|
|
37
|
+
chalk.yellow("Method: ") +
|
|
38
|
+
chalk.white(method.toUpperCase())
|
|
39
|
+
);
|
|
40
|
+
console.log(chalk.dim("│ ") + chalk.yellow("URL: ") + chalk.white(url));
|
|
41
|
+
if (payload) {
|
|
42
|
+
console.log(chalk.dim("│ ") + chalk.yellow("Payload:"));
|
|
43
|
+
const payloadStr = JSON.stringify(payload, null, 2);
|
|
44
|
+
payloadStr.split("\n").forEach((line) => {
|
|
45
|
+
console.log(chalk.dim("│ ") + chalk.gray(line));
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const logApiResponse = (status, data) => {
|
|
51
|
+
if (!isVerbose) return;
|
|
52
|
+
console.log(
|
|
53
|
+
chalk.dim(
|
|
54
|
+
"├─────────────────────────────────────────────────────────────"
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
console.log(chalk.dim("│ ") + chalk.cyan("RESPONSE"));
|
|
58
|
+
console.log(
|
|
59
|
+
chalk.dim(
|
|
60
|
+
"├─────────────────────────────────────────────────────────────"
|
|
61
|
+
)
|
|
62
|
+
);
|
|
63
|
+
console.log(
|
|
64
|
+
chalk.dim("│ ") +
|
|
65
|
+
chalk.yellow("Status: ") +
|
|
66
|
+
(status >= 200 && status < 300
|
|
67
|
+
? chalk.green(status)
|
|
68
|
+
: chalk.red(status))
|
|
69
|
+
);
|
|
70
|
+
if (data) {
|
|
71
|
+
console.log(chalk.dim("│ ") + chalk.yellow("Data:"));
|
|
72
|
+
const dataStr = JSON.stringify(data, null, 2);
|
|
73
|
+
dataStr.split("\n").forEach((line) => {
|
|
74
|
+
console.log(chalk.dim("│ ") + chalk.gray(line));
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
console.log(
|
|
78
|
+
chalk.dim(
|
|
79
|
+
"└─────────────────────────────────────────────────────────────\n"
|
|
80
|
+
)
|
|
81
|
+
);
|
|
82
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boltic/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.42",
|
|
4
4
|
"description": "Professional CLI for interacting with the Boltic platform — create, manage, and publish integrations, serverless functions, workflows, MCPs, and more with enterprise-grade features and a seamless developer experience",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|