create-disposabl-app 0.8.8 → 0.8.9

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/README.md CHANGED
@@ -15,10 +15,10 @@ its access checks remain installed.
15
15
  Releases publish automatically after changes reach `main`. Commit messages
16
16
  determine the next version; no manual version edit is needed.
17
17
 
18
- Choose managed setup to sign in through `disposabl login`, create an app, save its UUID in `disposabl.json`, and configure a named development preview. The service is `https://www.disposabl.dev`.
18
+ Every creation checks your Disposabl login and asks you to sign in through `disposabl login` if needed. It then creates the app, saves its UUID in `disposabl.json`, and configures a named development preview. There is no setup option. `--yes`, `--json`, and `--skip-install` still require login and app creation. The service is `https://www.disposabl.dev`.
19
19
 
20
20
  ```sh
21
- bun create disposabl-app@latest my-app --setup
21
+ bun create disposabl-app@latest my-app
22
22
  cd my-app
23
23
  bun run dev
24
24
  ```
@@ -29,4 +29,6 @@ The website opens automatically and Metro starts with development-client support
29
29
 
30
30
  To get another development key in a worktree, run `disposabl previews token create --configure .`. The branch is detected automatically, or the worktree name when detached. Repeated requests reuse the preview and issue a new key.
31
31
 
32
- If managed setup fails, rerun `bun create disposabl-app@latest my-app --setup` from the parent directory. It resumes setup using the existing files and app UUID.
32
+ If app creation is interrupted, rerun `bun create disposabl-app@latest my-app` from the parent directory. It resumes setup using the existing files and app UUID.
33
+
34
+ Generated apps do not include the `create-disposabl-app` package, its workspace lockfile entry, or its Turbo build task. The generator and bundled Disposabl CLI run externally.
package/dist/disposabl.js CHANGED
@@ -22,7 +22,7 @@ import { Command } from "commander";
22
22
  // ../cli/package.json
23
23
  var package_default = {
24
24
  name: "@disposabl/cli",
25
- version: "0.8.8",
25
+ version: "0.8.9",
26
26
  type: "module",
27
27
  description: "Command-line access to your Disposabl app",
28
28
  license: "MIT",
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
8
8
  import { Command, CommanderError } from "commander";
9
9
  import * as p2 from "@clack/prompts";
10
10
  // package.json
11
- var version = "0.8.8";
11
+ var version = "0.8.9";
12
12
 
13
13
  // ../disposabl-kit/platforms.ts
14
14
  var platforms = [
@@ -476,7 +476,7 @@ main().catch((error) => {
476
476
  // setup.ts
477
477
  import { execFileSync, spawn, spawnSync as spawnSync2 } from "node:child_process";
478
478
  import { readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
479
- import { join as join3 } from "node:path";
479
+ import { basename as basename3, join as join3 } from "node:path";
480
480
  import { fileURLToPath } from "node:url";
481
481
 
482
482
  // ../cli/preview.ts
@@ -508,7 +508,7 @@ var runDisposabl = (args, interactive = false) => new Promise((resolve, reject)
508
508
  child.once("error", reject);
509
509
  child.once("close", (code) => {
510
510
  if (code !== 0) {
511
- reject(new Error(`disposabl ${args.slice(0, 3).join(" ")} failed. Your files are saved. Retry from the parent directory: bun create disposabl-app@latest <app-directory> --setup`));
511
+ reject(new Error(`disposabl ${args.slice(0, 3).join(" ")} failed. Your files are saved. Retry from the parent directory: bun create disposabl-app@latest <app-directory>`));
512
512
  return;
513
513
  }
514
514
  try {
@@ -529,7 +529,7 @@ async function setupApp(directory, name, run = runDisposabl) {
529
529
  }
530
530
  const connections = await run(["connections", "status", "--wait"]);
531
531
  if (!connections.ready)
532
- throw new Error("Connect GitHub and Convex at https://www.disposabl.dev/dashboard/connections, then retry: bun create disposabl-app@latest " + directory + " --setup. Your app files and login are saved.");
532
+ throw new Error("Connect GitHub and Convex at https://www.disposabl.dev/dashboard/connections, then retry from the parent directory: bun create disposabl-app@latest " + basename3(directory) + ". Your app files and login are saved.");
533
533
  const path = join3(directory, "disposabl.json");
534
534
  const config = JSON.parse(await readFile2(path, "utf8"));
535
535
  if (config.appId) {
@@ -610,7 +610,7 @@ function commitApp(directory) {
610
610
 
611
611
  // index.ts
612
612
  var jsonOutput = process.argv.slice(2).includes("--json");
613
- var program = new Command("create-disposabl-app").description("Create a Disposabl starter. Web is always included.").version(version, "-v, --version").argument("[appname]", "App name and new directory").option("--platforms <ids>", "Comma-separated platform IDs; Web is always included").option("--features <ids>", "Comma-separated feature IDs, or none (default: authentication)").option("-y, --yes", "Skip prompts; include Web and authentication by default").option("--setup", "Sign in to Disposabl and configure a development preview").option("--skip-install", "Create files without running bun install").option("--list-options", "List every platform and feature, including disabled choices").option("--json", "Skip prompts and emit a JSON result or error; install logs go to stderr").helpOption("-h, --help").addHelpText("after", `
613
+ var program = new Command("create-disposabl-app").description("Create a Disposabl starter. Web is always included.").version(version, "-v, --version").argument("[appname]", "App name and new directory").option("--platforms <ids>", "Comma-separated platform IDs; Web is always included").option("--features <ids>", "Comma-separated feature IDs, or none (default: authentication)").option("-y, --yes", "Skip app options prompts; include Web and authentication by default").option("--skip-install", "Create files without running bun install").option("--list-options", "List every platform and feature, including disabled choices").option("--json", "Skip app options prompts and emit JSON; login and install logs go to stderr").helpOption("-h, --help").addHelpText("after", `
614
614
  Platforms:
615
615
  web (required), android, ios, macos, windows, linux, api, mcp, cli, typescript-sdk
616
616
  CLI and TypeScript SDK automatically include API.
@@ -626,9 +626,9 @@ Examples:
626
626
  bun create disposabl-app@latest my-app --platforms web --features none --skip-install --json
627
627
  bun create disposabl-app@latest --list-options --json
628
628
 
629
- Without a TTY, the CLI never prompts. Supply an app name.
629
+ Without a TTY, supply an app name. App options are not prompted, but login is still required.
630
630
  Platform and feature choices are saved in disposabl.json.
631
- Backend authentication code is always included. Use --setup to create an app UUID and development environment through https://www.disposabl.dev.
631
+ Backend authentication code is always included. Every app checks your Disposabl login, asks you to sign in if needed, and creates an app UUID and development environment through https://www.disposabl.dev. Rerun the same command to resume an existing app.
632
632
  `).configureOutput({ writeErr: () => {} }).exitOverride();
633
633
 
634
634
  class Cancelled extends Error {
@@ -700,8 +700,13 @@ async function main() {
700
700
  if (invalidName)
701
701
  throw new Error(invalidName);
702
702
  let directory = resolve2(name);
703
- if (options.setup && pathExists(join4(directory, "disposabl.json"))) {
703
+ if (pathExists(join4(directory, "disposabl.json"))) {
704
704
  const appId = await setupApp(directory, name);
705
+ if (spawnSync3("git", ["rev-parse", "--verify", "HEAD"], {
706
+ cwd: directory,
707
+ stdio: "ignore"
708
+ }).status !== 0)
709
+ commitApp(directory);
705
710
  console.log(options.json ? JSON.stringify({ status: "configured", directory, appId }) : `
706
711
  Setup complete.
707
712
 
@@ -745,10 +750,6 @@ Setup complete.
745
750
  }));
746
751
  chosenFeatures = selectFeatures(selected.length ? selected.join(",") : "none");
747
752
  }
748
- const managedSetup = options.setup ?? (interactive && answer(await p2.confirm({
749
- message: "Set up this app with Disposabl?",
750
- initialValue: false
751
- })));
752
753
  const config = {
753
754
  version,
754
755
  platforms: chosenPlatforms,
@@ -784,8 +785,7 @@ Setup complete.
784
785
  cwd: directory,
785
786
  stdio: "pipe"
786
787
  });
787
- if (managedSetup)
788
- config.appId = await setupApp(directory, name);
788
+ config.appId = await setupApp(directory, name);
789
789
  commitApp(directory);
790
790
  const folders = selectedFolders(config);
791
791
  if (options.json) {