apiblaze 0.17.18 → 0.17.20

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 +10 -6
  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.20";
703
707
 
704
708
  // src/index.ts
705
709
  init_types();
@@ -3740,7 +3744,7 @@ var TOOLS = [
3740
3744
  },
3741
3745
  {
3742
3746
  name: "mint_key",
3743
- description: "Mint a consumer-admin developer key (secret returned once).",
3747
+ description: "Mint a manager developer key \u2014 call, configure, issue-keys (secret returned once).",
3744
3748
  params: { desc: "optional description", expires_days: "optional expiry in days" },
3745
3749
  run: async (a, { teamId }) => {
3746
3750
  const body = { role: "consumer-admin" };
@@ -4722,7 +4726,7 @@ async function runKeyMint(opts) {
4722
4726
  method: "POST",
4723
4727
  path: `/teams/${encodeURIComponent(teamId)}/developer-keys`,
4724
4728
  body,
4725
- summary: `Mint a consumer-admin developer key`
4729
+ summary: `Mint a manager developer key ({call, configure, issue-keys})`
4726
4730
  });
4727
4731
  spinner.succeed("Key minted.");
4728
4732
  if (opts.json) {
@@ -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.20",
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",