apiblaze 0.17.18 → 0.17.19

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -328,7 +328,11 @@ function saveAnonCred(cp_key, team_id, claim_code) {
328
328
  claim_code: claim_code ?? prev?.claim_code,
329
329
  created_at: prev?.created_at ?? (/* @__PURE__ */ new Date()).toISOString()
330
330
  };
331
- fs2.writeFileSync(FILE, JSON.stringify(merged, null, 2));
331
+ fs2.writeFileSync(FILE, JSON.stringify(merged, null, 2), { mode: 384 });
332
+ try {
333
+ fs2.chmodSync(FILE, 384);
334
+ } catch {
335
+ }
332
336
  } catch {
333
337
  }
334
338
  }
@@ -699,7 +703,7 @@ var import_commander = require("commander");
699
703
  var import_chalk38 = __toESM(require("chalk"));
700
704
 
701
705
  // package.json
702
- var version = "0.17.18";
706
+ var version = "0.17.19";
703
707
 
704
708
  // src/index.ts
705
709
  init_types();
@@ -5394,8 +5398,8 @@ async function mintDurableProxyKey(teamId, tenant2) {
5394
5398
  const out = await admin({
5395
5399
  method: "POST",
5396
5400
  path: `/teams/${encodeURIComponent(teamId)}/tenants/${encodeURIComponent(tenant2)}/admin/keys`,
5397
- body: { key_type: "apiblaze-consumer-admin", environment: "prod" },
5398
- // no expiry durable
5401
+ body: { permissions: ["call", "wallet"], environment: "prod" },
5402
+ // key_model §2: call the API + spend the team wallet; non-expiring service key
5399
5403
  summary: "Mint a durable data-plane key for apichat"
5400
5404
  });
5401
5405
  if (!out?.key) throw new Error("key mint returned no key");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apiblaze",
3
- "version": "0.17.18",
3
+ "version": "0.17.19",
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",