@withone/cli 1.43.4 → 1.43.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/bin/cli.js +3 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +12 -7
- package/package.json +9 -2
package/bin/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import {
|
|
3
2
|
ApiError,
|
|
4
3
|
FLOW_SCHEMA,
|
|
@@ -114,7 +113,7 @@ import {
|
|
|
114
113
|
writeConfig
|
|
115
114
|
} from "./chunk-AU2ZEEMS.js";
|
|
116
115
|
|
|
117
|
-
// src/
|
|
116
|
+
// src/cli.ts
|
|
118
117
|
import { createRequire as createRequire2 } from "module";
|
|
119
118
|
import path12 from "path";
|
|
120
119
|
import { Command } from "commander";
|
|
@@ -485,7 +484,7 @@ async function configCommand() {
|
|
|
485
484
|
let isValid = false;
|
|
486
485
|
try {
|
|
487
486
|
const api = new OneApi(apiKey, `${normalized}/v1`);
|
|
488
|
-
isValid = await api.validateApiKey();
|
|
487
|
+
isValid = Boolean(await api.validateApiKey());
|
|
489
488
|
} catch (err) {
|
|
490
489
|
spinner5.stop("Connection failed");
|
|
491
490
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -521,7 +520,7 @@ async function configCommand() {
|
|
|
521
520
|
let isValid = false;
|
|
522
521
|
try {
|
|
523
522
|
const api = new OneApi(apiKey, "https://api.withone.ai/v1");
|
|
524
|
-
isValid = await api.validateApiKey();
|
|
523
|
+
isValid = Boolean(await api.validateApiKey());
|
|
525
524
|
} catch (err) {
|
|
526
525
|
spinner5.stop("Connection failed");
|
|
527
526
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -2865,7 +2864,11 @@ async function actionsExecuteParallelCommand() {
|
|
|
2865
2864
|
else headers = r.value;
|
|
2866
2865
|
}
|
|
2867
2866
|
if (actionDetails && !flags.skipValidation && segErrors.length === 0) {
|
|
2868
|
-
const validation = validateActionInput(actionDetails, {
|
|
2867
|
+
const validation = validateActionInput(actionDetails, {
|
|
2868
|
+
data,
|
|
2869
|
+
pathVariables,
|
|
2870
|
+
queryParams
|
|
2871
|
+
});
|
|
2869
2872
|
if (!validation.valid) {
|
|
2870
2873
|
for (const m of validation.missing) {
|
|
2871
2874
|
segErrors.push(`Missing ${m.flag} "${m.param}"${m.description ? ` \u2014 ${m.description}` : ""}`);
|
|
@@ -10628,7 +10631,7 @@ async function logoutCommand() {
|
|
|
10628
10631
|
p9.outro("Logged out.");
|
|
10629
10632
|
}
|
|
10630
10633
|
|
|
10631
|
-
// src/
|
|
10634
|
+
// src/cli.ts
|
|
10632
10635
|
var require3 = createRequire2(import.meta.url);
|
|
10633
10636
|
var { version } = require3("../package.json");
|
|
10634
10637
|
var program = new Command();
|
|
@@ -11064,4 +11067,6 @@ program.command("add [platform]").description("Shortcut for: connection add").ac
|
|
|
11064
11067
|
program.command("list").alias("ls").description("Shortcut for: connection list").option("-s, --search <query>", "Filter connections by platform name").option("-l, --limit <n>", "Max connections to return (agent mode default: 20)").action(async (options) => {
|
|
11065
11068
|
await connectionListCommand(options);
|
|
11066
11069
|
});
|
|
11067
|
-
|
|
11070
|
+
export {
|
|
11071
|
+
program
|
|
11072
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@withone/cli",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.5",
|
|
4
4
|
"description": "CLI for managing One",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -12,12 +12,19 @@
|
|
|
12
12
|
"bin": {
|
|
13
13
|
"one": "./bin/cli.js"
|
|
14
14
|
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
15
21
|
"scripts": {
|
|
16
22
|
"build": "tsup",
|
|
17
23
|
"dev": "tsup --watch",
|
|
18
24
|
"start": "node bin/cli.js",
|
|
19
25
|
"typecheck": "tsc --noEmit",
|
|
20
|
-
"test": "tsx --test \"src/**/*.test.ts\""
|
|
26
|
+
"test": "tsx --test \"src/**/*.test.ts\"",
|
|
27
|
+
"prepare": "tsup"
|
|
21
28
|
},
|
|
22
29
|
"dependencies": {
|
|
23
30
|
"@clack/prompts": "^0.9.1",
|