@glasser-ai/cli 0.1.15 → 0.1.16
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/glasser.js +19 -9
- package/package.json +1 -1
package/dist/glasser.js
CHANGED
|
@@ -64820,7 +64820,7 @@ function sleepMs(ms) {
|
|
|
64820
64820
|
// package.json
|
|
64821
64821
|
var package_default = {
|
|
64822
64822
|
name: "@glasser-ai/cli",
|
|
64823
|
-
version: "0.1.
|
|
64823
|
+
version: "0.1.16",
|
|
64824
64824
|
description: "Search, inspect and run paid API endpoints with one Key \u2014 the Glasser CLI",
|
|
64825
64825
|
license: "MIT",
|
|
64826
64826
|
type: "module",
|
|
@@ -65038,6 +65038,10 @@ function literalsFlag(name, literals2, description) {
|
|
|
65038
65038
|
Flag_exports.withDescription(description)
|
|
65039
65039
|
);
|
|
65040
65040
|
}
|
|
65041
|
+
function shellQuote(value3) {
|
|
65042
|
+
if (/^[A-Za-z0-9_@%+=:,./-]+$/.test(value3)) return value3;
|
|
65043
|
+
return `'${value3.replaceAll("'", "'\\''")}'`;
|
|
65044
|
+
}
|
|
65041
65045
|
|
|
65042
65046
|
// src/commands/balance.ts
|
|
65043
65047
|
var history = Command_exports.make(
|
|
@@ -65206,13 +65210,23 @@ Output schema: null \u2014 the output is the provider's raw body; see the docs l
|
|
|
65206
65210
|
Output schema (${detail.output_schema_source}):
|
|
65207
65211
|
${jsonPretty(detail.output_schema)}`
|
|
65208
65212
|
);
|
|
65209
|
-
yield* Console_exports.log(
|
|
65210
|
-
`
|
|
65213
|
+
yield* Console_exports.log(`
|
|
65211
65214
|
Run it:
|
|
65212
|
-
|
|
65213
|
-
);
|
|
65215
|
+
${runItLine(detail)}`);
|
|
65214
65216
|
})
|
|
65215
65217
|
).pipe(Command_exports.withDescription("Inspect one endpoint: schemas, price, version"));
|
|
65218
|
+
function runItLine(detail) {
|
|
65219
|
+
return [
|
|
65220
|
+
"glasser run -p",
|
|
65221
|
+
shellQuote(detail.provider),
|
|
65222
|
+
"-e",
|
|
65223
|
+
shellQuote(detail.endpoint),
|
|
65224
|
+
"-i",
|
|
65225
|
+
shellQuote(JSON.stringify(detail.sample_input)),
|
|
65226
|
+
"--endpoint-version",
|
|
65227
|
+
String(detail.endpoint_version)
|
|
65228
|
+
].join(" ");
|
|
65229
|
+
}
|
|
65216
65230
|
|
|
65217
65231
|
// src/commands/keys.ts
|
|
65218
65232
|
var labelFlag = Flag_exports.string("label").pipe(
|
|
@@ -65825,10 +65839,6 @@ function buildRetryCommand(context3) {
|
|
|
65825
65839
|
parts2.push("--idempotency-key", shellQuote(context3.idempotencyKey));
|
|
65826
65840
|
return parts2.join(" ");
|
|
65827
65841
|
}
|
|
65828
|
-
function shellQuote(value3) {
|
|
65829
|
-
if (/^[A-Za-z0-9_@%+=:,./-]+$/.test(value3)) return value3;
|
|
65830
|
-
return `'${value3.replaceAll("'", "'\\''")}'`;
|
|
65831
|
-
}
|
|
65832
65842
|
function withRetryGuidance(failure, retryCommand) {
|
|
65833
65843
|
const envelope = failure.cause;
|
|
65834
65844
|
const code = typeof envelope?.code === "string" ? envelope.code : null;
|