apiblaze 0.21.21 → 0.21.22
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/browser/widgets.js +59 -0
- package/dist/index.js +246 -344
- package/dist/server/index.d.mts +3 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.js +1 -1
- package/dist/server/index.mjs +1 -1
- package/package.json +5 -2
package/dist/server/index.d.mts
CHANGED
|
@@ -291,6 +291,9 @@ interface ApiblazeKeysConfig {
|
|
|
291
291
|
keyExpiresInSeconds?: number;
|
|
292
292
|
/** Override the apiblaze base (tests/self-host). Default https://apikeys.apiblaze.com */
|
|
293
293
|
base?: string;
|
|
294
|
+
/** The environment the minted keys call (a key is valid on ONE environment). Default 'prod';
|
|
295
|
+
* a proxy tunnelled with `apiblaze dev` serves 'dev'. */
|
|
296
|
+
environment?: string;
|
|
294
297
|
}
|
|
295
298
|
type Action = {
|
|
296
299
|
action: 'list';
|
package/dist/server/index.d.ts
CHANGED
|
@@ -291,6 +291,9 @@ interface ApiblazeKeysConfig {
|
|
|
291
291
|
keyExpiresInSeconds?: number;
|
|
292
292
|
/** Override the apiblaze base (tests/self-host). Default https://apikeys.apiblaze.com */
|
|
293
293
|
base?: string;
|
|
294
|
+
/** The environment the minted keys call (a key is valid on ONE environment). Default 'prod';
|
|
295
|
+
* a proxy tunnelled with `apiblaze dev` serves 'dev'. */
|
|
296
|
+
environment?: string;
|
|
294
297
|
}
|
|
295
298
|
type Action = {
|
|
296
299
|
action: 'list';
|
package/dist/server/index.js
CHANGED
|
@@ -396,7 +396,7 @@ function createApiblazeKeys(cfg) {
|
|
|
396
396
|
}
|
|
397
397
|
const chosen = op.keyType ?? (eligible.includes("call-only") ? "call-only" : eligible[0]);
|
|
398
398
|
await ensureEndUser(user, tenant2);
|
|
399
|
-
const body = { tenant: tenant2, key_type_ids: [chosen], environment: "prod" };
|
|
399
|
+
const body = { tenant: tenant2, key_type_ids: [chosen], environment: cfg.environment || "prod" };
|
|
400
400
|
if (typeof expiresIn === "number" && expiresIn > 0) body.expires_in_seconds = expiresIn;
|
|
401
401
|
const r = await planeFetch("POST", "/apikeys", user, { body });
|
|
402
402
|
const d = await r.json();
|
package/dist/server/index.mjs
CHANGED
|
@@ -367,7 +367,7 @@ function createApiblazeKeys(cfg) {
|
|
|
367
367
|
}
|
|
368
368
|
const chosen = op.keyType ?? (eligible.includes("call-only") ? "call-only" : eligible[0]);
|
|
369
369
|
await ensureEndUser(user, tenant2);
|
|
370
|
-
const body = { tenant: tenant2, key_type_ids: [chosen], environment: "prod" };
|
|
370
|
+
const body = { tenant: tenant2, key_type_ids: [chosen], environment: cfg.environment || "prod" };
|
|
371
371
|
if (typeof expiresIn === "number" && expiresIn > 0) body.expires_in_seconds = expiresIn;
|
|
372
372
|
const r = await planeFetch("POST", "/apikeys", user, { body });
|
|
373
373
|
const d = await r.json();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apiblaze",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.22",
|
|
4
4
|
"description": "APIblaze CLI — Chat with your APIs, Manage your API keys, users and groups with the APIblaze serverless proxy",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apiblaze",
|
|
@@ -78,8 +78,11 @@
|
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@types/inquirer": "^8.2.10",
|
|
80
80
|
"@types/node": "^20.0.0",
|
|
81
|
-
"@types/react": "^18.
|
|
81
|
+
"@types/react": "^18.3.31",
|
|
82
|
+
"@types/react-dom": "^18.3.7",
|
|
82
83
|
"@types/ws": "^8.5.10",
|
|
84
|
+
"react": "^18.3.1",
|
|
85
|
+
"react-dom": "^18.3.1",
|
|
83
86
|
"tsup": "^8.0.0",
|
|
84
87
|
"typescript": "^5.4.0"
|
|
85
88
|
},
|