@soat/cli 0.6.1 → 0.6.3
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/dist/esm/index.js +78 -24
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { program } from "commander";
|
|
|
16
16
|
// package.json
|
|
17
17
|
var package_default = {
|
|
18
18
|
name: "@soat/cli",
|
|
19
|
-
version: "0.6.
|
|
19
|
+
version: "0.6.3",
|
|
20
20
|
type: "module",
|
|
21
21
|
scripts: {
|
|
22
22
|
generate: "tsx scripts/generate.ts",
|
|
@@ -121,6 +121,14 @@ var resolveEnvRef = /* @__PURE__ */__name(args => {
|
|
|
121
121
|
value,
|
|
122
122
|
env
|
|
123
123
|
} = args;
|
|
124
|
+
const atRef = /^@([A-Za-z_][A-Za-z0-9_]*)$/.exec(value);
|
|
125
|
+
if (atRef) {
|
|
126
|
+
const resolved = env[atRef[1]];
|
|
127
|
+
if (resolved === void 0) {
|
|
128
|
+
throw new Error(`Missing environment variable: ${atRef[1]}`);
|
|
129
|
+
}
|
|
130
|
+
return resolved;
|
|
131
|
+
}
|
|
124
132
|
const simple = /^\$([A-Za-z_][A-Za-z0-9_]*)$/.exec(value);
|
|
125
133
|
if (simple) {
|
|
126
134
|
const resolved = env[simple[1]];
|
|
@@ -139,6 +147,42 @@ var resolveEnvRef = /* @__PURE__ */__name(args => {
|
|
|
139
147
|
}
|
|
140
148
|
return value;
|
|
141
149
|
}, "resolveEnvRef");
|
|
150
|
+
var resolveParameterPair = /* @__PURE__ */__name(args => {
|
|
151
|
+
const {
|
|
152
|
+
pair,
|
|
153
|
+
env
|
|
154
|
+
} = args;
|
|
155
|
+
const eqIdx = pair.indexOf("=");
|
|
156
|
+
if (eqIdx === 0) {
|
|
157
|
+
throw new Error(`Invalid --${PARAMETER_FLAG} value "${pair}". Parameter key cannot be empty.`);
|
|
158
|
+
}
|
|
159
|
+
if (eqIdx === -1) {
|
|
160
|
+
const key2 = pair.trim();
|
|
161
|
+
if (!key2) {
|
|
162
|
+
throw new Error(`Invalid --${PARAMETER_FLAG} value "${pair}". Parameter key cannot be empty.`);
|
|
163
|
+
}
|
|
164
|
+
const resolved = env[key2];
|
|
165
|
+
if (resolved === void 0) {
|
|
166
|
+
throw new Error(`Missing environment variable: ${key2}`);
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
key: key2,
|
|
170
|
+
value: resolved
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
const key = pair.slice(0, eqIdx).trim();
|
|
174
|
+
const rawValue = pair.slice(eqIdx + 1);
|
|
175
|
+
if (!key) {
|
|
176
|
+
throw new Error(`Invalid --${PARAMETER_FLAG} value "${pair}". Parameter key cannot be empty.`);
|
|
177
|
+
}
|
|
178
|
+
return {
|
|
179
|
+
key,
|
|
180
|
+
value: resolveEnvRef({
|
|
181
|
+
value: rawValue,
|
|
182
|
+
env
|
|
183
|
+
})
|
|
184
|
+
};
|
|
185
|
+
}, "resolveParameterPair");
|
|
142
186
|
var formationsWrapper = {
|
|
143
187
|
id: "formations-wrapper",
|
|
144
188
|
commands: FORMATION_COMMANDS,
|
|
@@ -149,7 +193,7 @@ var formationsWrapper = {
|
|
|
149
193
|
type: "string"
|
|
150
194
|
}, {
|
|
151
195
|
name: "parameter",
|
|
152
|
-
description: "Template parameter in key=value format (repeatable). Values
|
|
196
|
+
description: "Template parameter in key=value format (repeatable). Values support env var references: $VAR, ${VAR}, or @VAR_NAME (shell-safe). Omit the value entirely (--parameter KEY) to auto-read KEY from the merged env.",
|
|
153
197
|
required: false,
|
|
154
198
|
type: "string"
|
|
155
199
|
}, {
|
|
@@ -205,19 +249,14 @@ var formationsWrapper = {
|
|
|
205
249
|
if (parameterValues.length > 0) {
|
|
206
250
|
const resolvedParameters = {};
|
|
207
251
|
for (const pair of parameterValues) {
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
const rawValue = pair.slice(eqIdx + 1);
|
|
214
|
-
if (!key) {
|
|
215
|
-
throw new Error(`Invalid --${PARAMETER_FLAG} value "${pair}". Parameter key cannot be empty.`);
|
|
216
|
-
}
|
|
217
|
-
resolvedParameters[key] = resolveEnvRef({
|
|
218
|
-
value: rawValue,
|
|
252
|
+
const {
|
|
253
|
+
key,
|
|
254
|
+
value
|
|
255
|
+
} = resolveParameterPair({
|
|
256
|
+
pair,
|
|
219
257
|
env: mergedEnv
|
|
220
258
|
});
|
|
259
|
+
resolvedParameters[key] = value;
|
|
221
260
|
}
|
|
222
261
|
forcedBody[PARAMETERS_FIELD] = resolvedParameters;
|
|
223
262
|
}
|
|
@@ -2320,9 +2359,9 @@ var routes = {
|
|
|
2320
2359
|
"in": "path"
|
|
2321
2360
|
}]
|
|
2322
2361
|
},
|
|
2323
|
-
"list-runs": {
|
|
2362
|
+
"list-orchestration-runs": {
|
|
2324
2363
|
serviceClass: "Orchestrations",
|
|
2325
|
-
operationId: "
|
|
2364
|
+
operationId: "listOrchestrationRuns",
|
|
2326
2365
|
description: "Returns all runs for an orchestration.",
|
|
2327
2366
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/orchestrations",
|
|
2328
2367
|
pathParams: ["orchestration_id"],
|
|
@@ -2335,9 +2374,9 @@ var routes = {
|
|
|
2335
2374
|
"in": "path"
|
|
2336
2375
|
}]
|
|
2337
2376
|
},
|
|
2338
|
-
"start-run": {
|
|
2377
|
+
"start-orchestration-run": {
|
|
2339
2378
|
serviceClass: "Orchestrations",
|
|
2340
|
-
operationId: "
|
|
2379
|
+
operationId: "startOrchestrationRun",
|
|
2341
2380
|
description: "Creates and immediately executes a new run for the orchestration.",
|
|
2342
2381
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/orchestrations",
|
|
2343
2382
|
pathParams: ["orchestration_id"],
|
|
@@ -2350,9 +2389,9 @@ var routes = {
|
|
|
2350
2389
|
"in": "path"
|
|
2351
2390
|
}]
|
|
2352
2391
|
},
|
|
2353
|
-
"cancel-run": {
|
|
2392
|
+
"cancel-orchestration-run": {
|
|
2354
2393
|
serviceClass: "Orchestrations",
|
|
2355
|
-
operationId: "
|
|
2394
|
+
operationId: "cancelOrchestrationRun",
|
|
2356
2395
|
description: "Cancels a running or paused orchestration run.",
|
|
2357
2396
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/orchestrations",
|
|
2358
2397
|
pathParams: ["orchestration_id", "run_id"],
|
|
@@ -2392,9 +2431,9 @@ var routes = {
|
|
|
2392
2431
|
"in": "path"
|
|
2393
2432
|
}]
|
|
2394
2433
|
},
|
|
2395
|
-
"resume-run": {
|
|
2434
|
+
"resume-orchestration-run": {
|
|
2396
2435
|
serviceClass: "Orchestrations",
|
|
2397
|
-
operationId: "
|
|
2436
|
+
operationId: "resumeOrchestrationRun",
|
|
2398
2437
|
description: "Resumes a paused orchestration run from its last checkpoint.",
|
|
2399
2438
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/orchestrations",
|
|
2400
2439
|
pathParams: ["orchestration_id", "run_id"],
|
|
@@ -2413,9 +2452,9 @@ var routes = {
|
|
|
2413
2452
|
"in": "path"
|
|
2414
2453
|
}]
|
|
2415
2454
|
},
|
|
2416
|
-
"get-run": {
|
|
2455
|
+
"get-orchestration-run": {
|
|
2417
2456
|
serviceClass: "Orchestrations",
|
|
2418
|
-
operationId: "
|
|
2457
|
+
operationId: "getOrchestrationRun",
|
|
2419
2458
|
description: "Returns the status, state, and artifacts of a specific run.",
|
|
2420
2459
|
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/orchestrations",
|
|
2421
2460
|
pathParams: ["orchestration_id", "run_id"],
|
|
@@ -2710,7 +2749,7 @@ var routes = {
|
|
|
2710
2749
|
"in": "query"
|
|
2711
2750
|
}, {
|
|
2712
2751
|
"name": "status",
|
|
2713
|
-
"description": "Filter by session status (open or
|
|
2752
|
+
"description": "Filter by session status (open, closed, or expired)",
|
|
2714
2753
|
"required": false,
|
|
2715
2754
|
"type": "string",
|
|
2716
2755
|
"in": "query"
|
|
@@ -3112,6 +3151,21 @@ var routes = {
|
|
|
3112
3151
|
"in": "path"
|
|
3113
3152
|
}]
|
|
3114
3153
|
},
|
|
3154
|
+
"get-trace-generations": {
|
|
3155
|
+
serviceClass: "Traces",
|
|
3156
|
+
operationId: "getTraceGenerations",
|
|
3157
|
+
description: "Returns all generation IDs associated with the trace.",
|
|
3158
|
+
moduleDocsUrl: "https://soat.ttoss.dev/docs/modules/traces",
|
|
3159
|
+
pathParams: ["trace_id"],
|
|
3160
|
+
queryParams: [],
|
|
3161
|
+
flags: [{
|
|
3162
|
+
"name": "trace_id",
|
|
3163
|
+
"description": "Public ID of the trace",
|
|
3164
|
+
"required": true,
|
|
3165
|
+
"type": "string",
|
|
3166
|
+
"in": "path"
|
|
3167
|
+
}]
|
|
3168
|
+
},
|
|
3115
3169
|
"list-users": {
|
|
3116
3170
|
serviceClass: "Users",
|
|
3117
3171
|
operationId: "listUsers",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soat/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@inquirer/input": "^5.0.12",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@ttoss/logger": "^0.8.10",
|
|
9
9
|
"commander": "^14.0.3",
|
|
10
10
|
"js-yaml": "^4.1.1",
|
|
11
|
-
"@soat/sdk": "0.6.
|
|
11
|
+
"@soat/sdk": "0.6.3"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@ttoss/config": "^1.37.10",
|