create-disposabl-app 0.20.14 → 0.20.16

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.20.14";
6
+ var version = "0.20.16";
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.20.14";
1566
+ var version = "0.20.16";
1567
1567
 
1568
1568
  // ../cli/telemetry.ts
1569
1569
  var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
@@ -275,3 +275,39 @@ test("top-up rejects an unannounced non-US storefront before browser open", asyn
275
275
  expect(result.topupAvailable).toBe(false);
276
276
  expect(result.busy).toBe(false);
277
277
  });
278
+
279
+ test.each([null, "error"])(
280
+ "top-up rejects an in-flight unknown storefront: %s",
281
+ async (next) => {
282
+ topupReady = true;
283
+ await mount();
284
+ handoff.mockImplementationOnce(async () => {
285
+ country = next;
286
+ return link;
287
+ });
288
+ let opened;
289
+ await act(async () => {
290
+ opened = await result.open("topup");
291
+ });
292
+ expect(handoff).toHaveBeenCalledTimes(1);
293
+ expect(opened).toBe(false);
294
+ expect(openURL).not.toHaveBeenCalled();
295
+ expect(result.busy).toBe(false);
296
+ },
297
+ );
298
+
299
+ test("top-up rejects an in-flight session change", async () => {
300
+ topupReady = true;
301
+ await mount();
302
+ handoff.mockImplementationOnce(async () => {
303
+ current = false;
304
+ return link;
305
+ });
306
+ let opened;
307
+ await act(async () => {
308
+ opened = await result.open("topup");
309
+ });
310
+ expect(handoff).toHaveBeenCalledTimes(1);
311
+ expect(opened).toBe(false);
312
+ expect(openURL).not.toHaveBeenCalled();
313
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-disposabl-app",
3
- "version": "0.20.14",
3
+ "version": "0.20.16",
4
4
  "description": "Create a Disposabl app",
5
5
  "type": "module",
6
6
  "license": "MIT",