create-disposabl-app 0.17.3 → 0.17.4

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/disposabl.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // ../cli/auth.ts
4
4
  import { lock } from "proper-lockfile";
5
5
  // ../cli/package.json
6
- var version = "0.17.3";
6
+ var version = "0.17.4";
7
7
  var package_default = {
8
8
  name: "@disposabl/cli",
9
9
  version,
package/dist/index.js CHANGED
@@ -1563,7 +1563,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
1563
1563
  import { Command, CommanderError } from "commander";
1564
1564
  import * as p2 from "@clack/prompts";
1565
1565
  // package.json
1566
- var version = "0.17.3";
1566
+ var version = "0.17.4";
1567
1567
 
1568
1568
  // ../cli/telemetry.ts
1569
1569
  var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
@@ -67,7 +67,10 @@ export async function billingRequest(
67
67
  },
68
68
  body: JSON.stringify(body),
69
69
  });
70
- if (!response.ok) throw new Error("Billing is temporarily unavailable.");
70
+ // Autumn may accept a write for deferred processing with a success-shaped
71
+ // 202 body. It is not a definitive result; callers must retain unknown holds.
72
+ if (!response.ok || response.status === 202)
73
+ throw new Error("Billing is temporarily unavailable.");
71
74
  const result: unknown = await response.json();
72
75
  if (!result || typeof result !== "object" || Array.isArray(result))
73
76
  throw new Error("Billing is temporarily unavailable.");
@@ -182,4 +182,22 @@ describe("billing boundary", () => {
182
182
  /Billing is temporarily unavailable/,
183
183
  );
184
184
  });
185
+ test("accepted responses cannot establish a final billing result", async () => {
186
+ for (const method of [
187
+ "balances.check",
188
+ "balances.update",
189
+ "balances.create",
190
+ ]) {
191
+ let requests = 0;
192
+ const mock = (async () => {
193
+ requests++;
194
+ return Response.json({ success: true, allowed: true }, { status: 202 });
195
+ }) as typeof fetch;
196
+ await assert.rejects(
197
+ billingRequest("test-key", method, {}, mock),
198
+ /Billing is temporarily unavailable/,
199
+ );
200
+ assert.equal(requests, 1);
201
+ }
202
+ });
185
203
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-disposabl-app",
3
- "version": "0.17.3",
3
+ "version": "0.17.4",
4
4
  "description": "Create a Disposabl app",
5
5
  "type": "module",
6
6
  "license": "MIT",