create-disposabl-app 0.20.12 → 0.20.14

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.12";
6
+ var version = "0.20.14";
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.12";
1566
+ var version = "0.20.14";
1567
1567
 
1568
1568
  // ../cli/telemetry.ts
1569
1569
  var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
@@ -9226,6 +9226,23 @@ function validateAndroidArchitectures(values = defaultAndroidArchitectures) {
9226
9226
  }
9227
9227
 
9228
9228
  // scaffold.ts
9229
+ function formatGenerated(directory, files = []) {
9230
+ if (spawnSync("bun", ["fmt", "--no-script", "--help"], {
9231
+ cwd: directory,
9232
+ stdio: "ignore"
9233
+ }).status !== 0)
9234
+ return;
9235
+ try {
9236
+ execFileSync("bun", ["fmt", "--no-script", ...files], {
9237
+ cwd: directory,
9238
+ stdio: "pipe"
9239
+ });
9240
+ } catch (cause) {
9241
+ if (!files.length)
9242
+ throw cause;
9243
+ throw new Error("Configuration changes were saved, but formatting failed. " + "In the app directory, run bun fmt --no-script disposabl.json, " + "then retry the original generator command to continue.", { cause });
9244
+ }
9245
+ }
9229
9246
  var authStarterPaths = [
9230
9247
  "packages/disposabl-kit/client/routes/_auth-pages",
9231
9248
  "packages/disposabl-kit/client/routes/consent.tsx",
@@ -9456,14 +9473,7 @@ main().catch((error) => {
9456
9473
  }
9457
9474
  await writeFile4(join4(destination, "disposabl.json"), JSON.stringify(config, null, 2) + `
9458
9475
  `);
9459
- if (spawnSync("bun", ["fmt", "--no-script", "--help"], {
9460
- cwd: destination,
9461
- stdio: "ignore"
9462
- }).status === 0)
9463
- execFileSync("bun", ["fmt", "--no-script"], {
9464
- cwd: destination,
9465
- stdio: "pipe"
9466
- });
9476
+ formatGenerated(destination);
9467
9477
  } catch (error) {
9468
9478
  await rm4(destination, { recursive: true, force: true });
9469
9479
  throw error;
@@ -9669,6 +9679,7 @@ async function reconfigureApp(template, directory, version, options) {
9669
9679
  }
9670
9680
  await writeFile5(join5(directory, configPath), JSON.stringify(config, null, 2) + `
9671
9681
  `);
9682
+ formatGenerated(directory, [configPath]);
9672
9683
  return config;
9673
9684
  } finally {
9674
9685
  await rm5(temp, { recursive: true, force: true });
@@ -9738,6 +9749,7 @@ async function setupApp(directory, name, run = runDisposabl) {
9738
9749
  config.androidArchitectures = validateAndroidArchitectures(config.androidArchitectures);
9739
9750
  await writeFile6(path, JSON.stringify(config, null, 2) + `
9740
9751
  `);
9752
+ formatGenerated(directory, ["disposabl.json"]);
9741
9753
  const status = await run(["login", "status"]);
9742
9754
  if (!status.currentUser) {
9743
9755
  await run(["login"], true);
@@ -9772,10 +9784,7 @@ async function setupApp(directory, name, run = runDisposabl) {
9772
9784
  config.appId = app.appId;
9773
9785
  await writeFile6(path, JSON.stringify(config, null, 2) + `
9774
9786
  `);
9775
- execFileSync2("bun", ["fmt", "disposabl.json"], {
9776
- cwd: directory,
9777
- stdio: "pipe"
9778
- });
9787
+ formatGenerated(directory, ["disposabl.json"]);
9779
9788
  }
9780
9789
  const configured = await run([
9781
9790
  "previews",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-disposabl-app",
3
- "version": "0.20.12",
3
+ "version": "0.20.14",
4
4
  "description": "Create a Disposabl app",
5
5
  "type": "module",
6
6
  "license": "MIT",