@glasser-ai/cli 0.1.2 → 0.1.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/README.md +2 -2
- package/dist/glasser.js +7 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ never falls back silently) > the active stored Key > an error pointing at
|
|
|
52
52
|
The local store is `$XDG_CONFIG_HOME/glasser/keys.json` (default
|
|
53
53
|
`~/.config`, file mode 0600). Labels are unique; the first Key auto-activates;
|
|
54
54
|
removing the active Key deactivates it; `keys remove` only touches this
|
|
55
|
-
machine — it does not revoke the Key. Only masked tokens (`
|
|
55
|
+
machine — it does not revoke the Key. Only masked tokens (`gl_1bba****`) are
|
|
56
56
|
ever printed.
|
|
57
57
|
|
|
58
58
|
## Run semantics
|
|
@@ -105,7 +105,7 @@ node apps/cli/dist/glasser.js --help
|
|
|
105
105
|
cd apps/cli && pnpm link --global # a PATH `glasser` shim
|
|
106
106
|
|
|
107
107
|
pnpm --filter @glasser-ai/cli test:p0 # unit
|
|
108
|
-
GLASSER_API_KEY=
|
|
108
|
+
GLASSER_API_KEY=gl_… pnpm --filter @glasser-ai/cli test:integration # needs seeded :3101
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
Env: `GLASSER_API_BASE_URL` (default `https://api.glasser.ai`),
|
package/dist/glasser.js
CHANGED
|
@@ -64571,9 +64571,12 @@ var glasserApi = HttpApi_exports.make("glasser").add(endpoints).add(runs).add(ba
|
|
|
64571
64571
|
import os from "node:os";
|
|
64572
64572
|
import path4 from "node:path";
|
|
64573
64573
|
|
|
64574
|
+
// ../../packages/lib/src/api-key-format.ts
|
|
64575
|
+
var API_KEY_PREFIX = "gl_";
|
|
64576
|
+
var API_KEY_SECRET_BYTES = 16;
|
|
64577
|
+
|
|
64574
64578
|
// ../../packages/lib/src/api-key.ts
|
|
64575
|
-
var
|
|
64576
|
-
var SECRET_BYTES = 16;
|
|
64579
|
+
var SECRET_BYTES = API_KEY_SECRET_BYTES;
|
|
64577
64580
|
function isValidApiKeyFormat(token) {
|
|
64578
64581
|
if (!token.startsWith(API_KEY_PREFIX)) return false;
|
|
64579
64582
|
const secret = token.slice(API_KEY_PREFIX.length);
|
|
@@ -65105,7 +65108,7 @@ var keysAdd = Command_exports.make(
|
|
|
65105
65108
|
const json2 = yield* JsonMode;
|
|
65106
65109
|
if (!isValidApiKeyFormat(key)) {
|
|
65107
65110
|
return yield* new UsageError({
|
|
65108
|
-
message: "That is not a valid Key (expected
|
|
65111
|
+
message: "That is not a valid Key (expected gl_ + 32 hex characters)."
|
|
65109
65112
|
});
|
|
65110
65113
|
}
|
|
65111
65114
|
const dir2 = yield* configDir;
|
|
@@ -66017,7 +66020,7 @@ async function refreshLatestVersion(options4) {
|
|
|
66017
66020
|
// package.json
|
|
66018
66021
|
var package_default = {
|
|
66019
66022
|
name: "@glasser-ai/cli",
|
|
66020
|
-
version: "0.1.
|
|
66023
|
+
version: "0.1.3",
|
|
66021
66024
|
description: "Search, inspect and run paid API endpoints with one Key \u2014 the Glasser CLI",
|
|
66022
66025
|
license: "MIT",
|
|
66023
66026
|
type: "module",
|