create-disposabl-app 1.4.0 → 1.4.1

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 (3) hide show
  1. package/index.mjs +3 -1
  2. package/package.json +1 -1
  3. package/setup.mjs +3 -3
package/index.mjs CHANGED
@@ -128,7 +128,9 @@ async function main() {
128
128
  readProjectConfig(config);
129
129
  const { signal } = setupCancellation;
130
130
  await terminal.install(directory, config, signal);
131
- if (!values["skip-setup"]) await setup(directory, app.name, config, terminal, signal);
131
+ if (!values["skip-setup"]) {
132
+ await setup(directory, { appSlug: config.appSlug ?? name, appName: app.name }, config, terminal, signal);
133
+ }
132
134
  } catch (error) {
133
135
  const reason = setupCancellation.signal.aborted ? "Setup paused." : error.message;
134
136
  throw new Error(`${reason}\nProject files are in ${directory}.\nRun this command from ${dirname(directory)} to resume.\n bunx create-disposabl-app@latest ${name} --resume`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-disposabl-app",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Create a Disposabl app with Exact and Convex",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/disposabl-dev/disposabl-exact/tree/main/packages/create-disposabl-app#readme",
package/setup.mjs CHANGED
@@ -65,7 +65,7 @@ async function connect(client, terminal, signal, provider, label, providerLink,
65
65
  throw new Error(label + " connection timed out. Resume to check again.");
66
66
  }
67
67
 
68
- export async function setup(directory, name, config, terminal, signal) {
68
+ export async function setup(directory, { appSlug, appName }, config, terminal, signal) {
69
69
  const require = createRequire(join(directory, "package.json"));
70
70
  const cli = dirname(require.resolve("@disposabl/cli/package.json"));
71
71
  const { createClient, providerLink } = await import(join(cli, "client.mjs"));
@@ -93,9 +93,9 @@ export async function setup(directory, name, config, terminal, signal) {
93
93
  const app = await client.request("/api/apps/create", {
94
94
  method: "POST", signal, timeout: 120_000,
95
95
  headers: { "Content-Type": "application/json" },
96
- body: JSON.stringify({ appSlug: name, appName: name }),
96
+ body: JSON.stringify({ appSlug, appName }),
97
97
  }, true);
98
- if (app.appSlug !== name) {
98
+ if (app.appSlug !== appSlug) {
99
99
  throw new Error("Disposabl did not return the expected app slug.");
100
100
  }
101
101
  if ((config.appSlug && config.appSlug !== app.appSlug) || (config.appId && config.appId !== app.appId)) {