@donotdev/cli 0.0.30 → 0.0.32

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 (35) hide show
  1. package/dependencies-matrix.json +14 -18
  2. package/dist/bin/commands/agent-setup.js +2 -2
  3. package/dist/bin/commands/build.js +19 -14
  4. package/dist/bin/commands/bump.js +424 -187
  5. package/dist/bin/commands/cacheout.js +19 -14
  6. package/dist/bin/commands/coach.js +19 -14
  7. package/dist/bin/commands/create-app.js +19 -14
  8. package/dist/bin/commands/create-project.js +19 -14
  9. package/dist/bin/commands/db.js +20 -3711
  10. package/dist/bin/commands/deploy.js +19 -14
  11. package/dist/bin/commands/dev.js +19 -14
  12. package/dist/bin/commands/doctor.js +19 -14
  13. package/dist/bin/commands/emu.js +19 -14
  14. package/dist/bin/commands/format.js +19 -14
  15. package/dist/bin/commands/get-demo.js +19 -14
  16. package/dist/bin/commands/make-admin.js +19 -14
  17. package/dist/bin/commands/preview.js +19 -14
  18. package/dist/bin/commands/seed.js +20 -3711
  19. package/dist/bin/commands/setup-cicd.js +19 -14
  20. package/dist/bin/commands/setup.js +19 -14
  21. package/dist/bin/commands/staging.js +19 -14
  22. package/dist/bin/commands/sync-secrets.js +19 -14
  23. package/dist/bin/commands/type-check.js +19 -14
  24. package/dist/bin/commands/wai.js +19 -14
  25. package/dist/bin/dndev.js +1 -1
  26. package/dist/bin/donotdev.js +1 -1
  27. package/dist/index.js +19 -14
  28. package/package.json +1 -1
  29. package/templates/app-next/src/globals.css.example +3 -2
  30. package/templates/app-next/src/pages/HomePage.tsx.example +1 -1
  31. package/templates/app-vite/src/pages/HomePage.tsx.example +1 -1
  32. package/templates/root-consumer/guides/dndev/COMPONENTS_ATOMIC.md.example +3 -3
  33. package/templates/root-consumer/guides/dndev/COMPONENTS_UI.md.example +1 -6
  34. package/templates/root-consumer/guides/wai-way/page_patterns.md.example +70 -34
  35. package/templates/app-demo/stats.html.example +0 -4949
@@ -167,7 +167,7 @@ var require_picocolors = __commonJS({
167
167
  }
168
168
  });
169
169
 
170
- // node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
170
+ // node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
171
171
  import { stdin as j, stdout as M } from "node:process";
172
172
  import * as g from "node:readline";
173
173
  import O from "node:readline";
@@ -283,7 +283,7 @@ function fD({ input: e2 = j, output: u2 = M, overwrite: t = true, hideCursor: F2
283
283
  }
284
284
  var import_sisteransi, import_picocolors, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, dD, A, OD, PD, J, LD, RD;
285
285
  var init_dist = __esm({
286
- "node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
286
+ "node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs"() {
287
287
  init_utils();
288
288
  import_sisteransi = __toESM(require_src(), 1);
289
289
  import_picocolors = __toESM(require_picocolors(), 1);
@@ -6844,7 +6844,7 @@ import {
6844
6844
  sep,
6845
6845
  extname
6846
6846
  } from "node:path";
6847
- import { fileURLToPath } from "node:url";
6847
+ import "node:url";
6848
6848
  function safeExecuteAsync(fn, message) {
6849
6849
  return fn().catch((error2) => {
6850
6850
  throw new Error(
@@ -7771,19 +7771,24 @@ var init_PathResolver = __esm({
7771
7771
  return resolved;
7772
7772
  }
7773
7773
  /**
7774
- * Get path to empty.js module for optional dependency aliasing
7775
- * Used by Vite and Turbopack to alias missing optional deps
7776
- * @param returnPackageSpecifier - If true, returns package specifier '@donotdev/core/empty' for Turbopack. If false, returns absolute path for Vite.
7777
- * @returns Package specifier or absolute path to empty.js
7774
+ * Get absolute path to empty ESM module for optional dependency aliasing.
7775
+ * Used by Vite resolveId — served directly to the browser in dev mode.
7776
+ * Note: resolvePackage uses require.resolve (CJS) which picks the "default"
7777
+ * condition (.cjs), so we derive the ESM path from it.
7778
7778
  */
7779
- getEmptyModulePath(returnPackageSpecifier = false) {
7780
- if (returnPackageSpecifier) {
7781
- return "@donotdev/core/empty";
7782
- }
7779
+ getEmptyModulePath() {
7780
+ const cjsPath = this.getEmptyCjsModulePath();
7781
+ return cjsPath.replace(/\.cjs$/, ".js");
7782
+ }
7783
+ /**
7784
+ * Get absolute path to empty CJS module for esbuild pre-bundling.
7785
+ * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
7786
+ * exports, so any named import resolves.
7787
+ */
7788
+ getEmptyCjsModulePath() {
7783
7789
  const resolved = this.resolvePackage("@donotdev/core/empty");
7784
- if (resolved) return resolved;
7785
- const thisDir = dirname(fileURLToPath(import.meta.url));
7786
- return this.normalizePath(join(thisDir, "../empty.js"));
7790
+ if (!resolved) throw new Error("Cannot resolve @donotdev/core/empty \u2014 package setup is broken");
7791
+ return resolved;
7787
7792
  }
7788
7793
  // === PRIVATE METHODS ===
7789
7794
  /**
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
163
163
  }
164
164
  });
165
165
 
166
- // node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
166
+ // node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
167
167
  import { stdin as j, stdout as M } from "node:process";
168
168
  import O from "node:readline";
169
169
  import { Writable as X } from "node:stream";
@@ -254,7 +254,7 @@ function m(e2, u2) {
254
254
  }
255
255
  var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, A, OD, PD, J, LD;
256
256
  var init_dist = __esm({
257
- "node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
257
+ "node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs"() {
258
258
  init_utils();
259
259
  import_sisteransi = __toESM(require_src(), 1);
260
260
  uD = DD();
@@ -6664,7 +6664,7 @@ import {
6664
6664
  sep,
6665
6665
  extname
6666
6666
  } from "node:path";
6667
- import { fileURLToPath } from "node:url";
6667
+ import "node:url";
6668
6668
  function safeExecuteAsync(fn, message) {
6669
6669
  return fn().catch((error2) => {
6670
6670
  throw new Error(
@@ -7591,19 +7591,24 @@ var init_PathResolver = __esm({
7591
7591
  return resolved;
7592
7592
  }
7593
7593
  /**
7594
- * Get path to empty.js module for optional dependency aliasing
7595
- * Used by Vite and Turbopack to alias missing optional deps
7596
- * @param returnPackageSpecifier - If true, returns package specifier '@donotdev/core/empty' for Turbopack. If false, returns absolute path for Vite.
7597
- * @returns Package specifier or absolute path to empty.js
7594
+ * Get absolute path to empty ESM module for optional dependency aliasing.
7595
+ * Used by Vite resolveId — served directly to the browser in dev mode.
7596
+ * Note: resolvePackage uses require.resolve (CJS) which picks the "default"
7597
+ * condition (.cjs), so we derive the ESM path from it.
7598
7598
  */
7599
- getEmptyModulePath(returnPackageSpecifier = false) {
7600
- if (returnPackageSpecifier) {
7601
- return "@donotdev/core/empty";
7602
- }
7599
+ getEmptyModulePath() {
7600
+ const cjsPath = this.getEmptyCjsModulePath();
7601
+ return cjsPath.replace(/\.cjs$/, ".js");
7602
+ }
7603
+ /**
7604
+ * Get absolute path to empty CJS module for esbuild pre-bundling.
7605
+ * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
7606
+ * exports, so any named import resolves.
7607
+ */
7608
+ getEmptyCjsModulePath() {
7603
7609
  const resolved = this.resolvePackage("@donotdev/core/empty");
7604
- if (resolved) return resolved;
7605
- const thisDir = dirname(fileURLToPath(import.meta.url));
7606
- return this.normalizePath(join(thisDir, "../empty.js"));
7610
+ if (!resolved) throw new Error("Cannot resolve @donotdev/core/empty \u2014 package setup is broken");
7611
+ return resolved;
7607
7612
  }
7608
7613
  // === PRIVATE METHODS ===
7609
7614
  /**
@@ -167,7 +167,7 @@ var require_picocolors = __commonJS({
167
167
  }
168
168
  });
169
169
 
170
- // node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
170
+ // node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
171
171
  import { stdin as j, stdout as M } from "node:process";
172
172
  import { Writable as X } from "node:stream";
173
173
  function DD({ onlyFirst: e2 = false } = {}) {
@@ -208,7 +208,7 @@ function rD() {
208
208
  }
209
209
  var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, nD, _, xD, B, AD, A;
210
210
  var init_dist = __esm({
211
- "node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
211
+ "node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs"() {
212
212
  init_utils();
213
213
  import_sisteransi = __toESM(require_src(), 1);
214
214
  uD = DD();
@@ -6397,7 +6397,7 @@ import {
6397
6397
  sep,
6398
6398
  extname
6399
6399
  } from "node:path";
6400
- import { fileURLToPath } from "node:url";
6400
+ import "node:url";
6401
6401
  function safeExecuteAsync(fn, message) {
6402
6402
  return fn().catch((error2) => {
6403
6403
  throw new Error(
@@ -7324,19 +7324,24 @@ var init_PathResolver = __esm({
7324
7324
  return resolved;
7325
7325
  }
7326
7326
  /**
7327
- * Get path to empty.js module for optional dependency aliasing
7328
- * Used by Vite and Turbopack to alias missing optional deps
7329
- * @param returnPackageSpecifier - If true, returns package specifier '@donotdev/core/empty' for Turbopack. If false, returns absolute path for Vite.
7330
- * @returns Package specifier or absolute path to empty.js
7327
+ * Get absolute path to empty ESM module for optional dependency aliasing.
7328
+ * Used by Vite resolveId — served directly to the browser in dev mode.
7329
+ * Note: resolvePackage uses require.resolve (CJS) which picks the "default"
7330
+ * condition (.cjs), so we derive the ESM path from it.
7331
7331
  */
7332
- getEmptyModulePath(returnPackageSpecifier = false) {
7333
- if (returnPackageSpecifier) {
7334
- return "@donotdev/core/empty";
7335
- }
7332
+ getEmptyModulePath() {
7333
+ const cjsPath = this.getEmptyCjsModulePath();
7334
+ return cjsPath.replace(/\.cjs$/, ".js");
7335
+ }
7336
+ /**
7337
+ * Get absolute path to empty CJS module for esbuild pre-bundling.
7338
+ * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
7339
+ * exports, so any named import resolves.
7340
+ */
7341
+ getEmptyCjsModulePath() {
7336
7342
  const resolved = this.resolvePackage("@donotdev/core/empty");
7337
- if (resolved) return resolved;
7338
- const thisDir = dirname(fileURLToPath(import.meta.url));
7339
- return this.normalizePath(join(thisDir, "../empty.js"));
7343
+ if (!resolved) throw new Error("Cannot resolve @donotdev/core/empty \u2014 package setup is broken");
7344
+ return resolved;
7340
7345
  }
7341
7346
  // === PRIVATE METHODS ===
7342
7347
  /**
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
163
163
  }
164
164
  });
165
165
 
166
- // node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
166
+ // node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
167
167
  import { stdin as j, stdout as M } from "node:process";
168
168
  import O from "node:readline";
169
169
  import { Writable as X } from "node:stream";
@@ -257,7 +257,7 @@ function m(e2, u2) {
257
257
  }
258
258
  var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, A, kD, $D, H, SD, OD, PD, J, LD;
259
259
  var init_dist = __esm({
260
- "node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
260
+ "node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs"() {
261
261
  init_utils();
262
262
  import_sisteransi = __toESM(require_src(), 1);
263
263
  uD = DD();
@@ -6747,7 +6747,7 @@ import {
6747
6747
  sep,
6748
6748
  extname
6749
6749
  } from "node:path";
6750
- import { fileURLToPath } from "node:url";
6750
+ import "node:url";
6751
6751
  function safeExecuteAsync(fn, message) {
6752
6752
  return fn().catch((error2) => {
6753
6753
  throw new Error(
@@ -7674,19 +7674,24 @@ var init_PathResolver = __esm({
7674
7674
  return resolved;
7675
7675
  }
7676
7676
  /**
7677
- * Get path to empty.js module for optional dependency aliasing
7678
- * Used by Vite and Turbopack to alias missing optional deps
7679
- * @param returnPackageSpecifier - If true, returns package specifier '@donotdev/core/empty' for Turbopack. If false, returns absolute path for Vite.
7680
- * @returns Package specifier or absolute path to empty.js
7677
+ * Get absolute path to empty ESM module for optional dependency aliasing.
7678
+ * Used by Vite resolveId — served directly to the browser in dev mode.
7679
+ * Note: resolvePackage uses require.resolve (CJS) which picks the "default"
7680
+ * condition (.cjs), so we derive the ESM path from it.
7681
7681
  */
7682
- getEmptyModulePath(returnPackageSpecifier = false) {
7683
- if (returnPackageSpecifier) {
7684
- return "@donotdev/core/empty";
7685
- }
7682
+ getEmptyModulePath() {
7683
+ const cjsPath = this.getEmptyCjsModulePath();
7684
+ return cjsPath.replace(/\.cjs$/, ".js");
7685
+ }
7686
+ /**
7687
+ * Get absolute path to empty CJS module for esbuild pre-bundling.
7688
+ * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
7689
+ * exports, so any named import resolves.
7690
+ */
7691
+ getEmptyCjsModulePath() {
7686
7692
  const resolved = this.resolvePackage("@donotdev/core/empty");
7687
- if (resolved) return resolved;
7688
- const thisDir = dirname(fileURLToPath(import.meta.url));
7689
- return this.normalizePath(join(thisDir, "../empty.js"));
7693
+ if (!resolved) throw new Error("Cannot resolve @donotdev/core/empty \u2014 package setup is broken");
7694
+ return resolved;
7690
7695
  }
7691
7696
  // === PRIVATE METHODS ===
7692
7697
  /**
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
163
163
  }
164
164
  });
165
165
 
166
- // node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
166
+ // node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
167
167
  import { stdin as j, stdout as M } from "node:process";
168
168
  import { Writable as X } from "node:stream";
169
169
  function DD({ onlyFirst: e2 = false } = {}) {
@@ -204,7 +204,7 @@ function rD() {
204
204
  }
205
205
  var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, nD, _, xD, B, AD, A;
206
206
  var init_dist = __esm({
207
- "node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
207
+ "node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs"() {
208
208
  init_utils();
209
209
  import_sisteransi = __toESM(require_src(), 1);
210
210
  uD = DD();
@@ -6368,7 +6368,7 @@ import {
6368
6368
  sep,
6369
6369
  extname
6370
6370
  } from "node:path";
6371
- import { fileURLToPath } from "node:url";
6371
+ import "node:url";
6372
6372
  function safeExecuteAsync(fn, message) {
6373
6373
  return fn().catch((error2) => {
6374
6374
  throw new Error(
@@ -7295,19 +7295,24 @@ var init_PathResolver = __esm({
7295
7295
  return resolved;
7296
7296
  }
7297
7297
  /**
7298
- * Get path to empty.js module for optional dependency aliasing
7299
- * Used by Vite and Turbopack to alias missing optional deps
7300
- * @param returnPackageSpecifier - If true, returns package specifier '@donotdev/core/empty' for Turbopack. If false, returns absolute path for Vite.
7301
- * @returns Package specifier or absolute path to empty.js
7298
+ * Get absolute path to empty ESM module for optional dependency aliasing.
7299
+ * Used by Vite resolveId — served directly to the browser in dev mode.
7300
+ * Note: resolvePackage uses require.resolve (CJS) which picks the "default"
7301
+ * condition (.cjs), so we derive the ESM path from it.
7302
7302
  */
7303
- getEmptyModulePath(returnPackageSpecifier = false) {
7304
- if (returnPackageSpecifier) {
7305
- return "@donotdev/core/empty";
7306
- }
7303
+ getEmptyModulePath() {
7304
+ const cjsPath = this.getEmptyCjsModulePath();
7305
+ return cjsPath.replace(/\.cjs$/, ".js");
7306
+ }
7307
+ /**
7308
+ * Get absolute path to empty CJS module for esbuild pre-bundling.
7309
+ * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
7310
+ * exports, so any named import resolves.
7311
+ */
7312
+ getEmptyCjsModulePath() {
7307
7313
  const resolved = this.resolvePackage("@donotdev/core/empty");
7308
- if (resolved) return resolved;
7309
- const thisDir = dirname(fileURLToPath(import.meta.url));
7310
- return this.normalizePath(join(thisDir, "../empty.js"));
7314
+ if (!resolved) throw new Error("Cannot resolve @donotdev/core/empty \u2014 package setup is broken");
7315
+ return resolved;
7311
7316
  }
7312
7317
  // === PRIVATE METHODS ===
7313
7318
  /**
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
163
163
  }
164
164
  });
165
165
 
166
- // node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
166
+ // node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
167
167
  import { stdin as j, stdout as M } from "node:process";
168
168
  import * as g from "node:readline";
169
169
  import O from "node:readline";
@@ -279,7 +279,7 @@ function fD({ input: e2 = j, output: u2 = M, overwrite: t = true, hideCursor: F2
279
279
  }
280
280
  var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, A, OD, PD, J, LD;
281
281
  var init_dist = __esm({
282
- "node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
282
+ "node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs"() {
283
283
  init_utils();
284
284
  import_sisteransi = __toESM(require_src(), 1);
285
285
  uD = DD();
@@ -6609,7 +6609,7 @@ import {
6609
6609
  sep,
6610
6610
  extname
6611
6611
  } from "node:path";
6612
- import { fileURLToPath } from "node:url";
6612
+ import "node:url";
6613
6613
  function safeExecuteAsync(fn, message) {
6614
6614
  return fn().catch((error2) => {
6615
6615
  throw new Error(
@@ -7536,19 +7536,24 @@ var init_PathResolver = __esm({
7536
7536
  return resolved;
7537
7537
  }
7538
7538
  /**
7539
- * Get path to empty.js module for optional dependency aliasing
7540
- * Used by Vite and Turbopack to alias missing optional deps
7541
- * @param returnPackageSpecifier - If true, returns package specifier '@donotdev/core/empty' for Turbopack. If false, returns absolute path for Vite.
7542
- * @returns Package specifier or absolute path to empty.js
7539
+ * Get absolute path to empty ESM module for optional dependency aliasing.
7540
+ * Used by Vite resolveId — served directly to the browser in dev mode.
7541
+ * Note: resolvePackage uses require.resolve (CJS) which picks the "default"
7542
+ * condition (.cjs), so we derive the ESM path from it.
7543
7543
  */
7544
- getEmptyModulePath(returnPackageSpecifier = false) {
7545
- if (returnPackageSpecifier) {
7546
- return "@donotdev/core/empty";
7547
- }
7544
+ getEmptyModulePath() {
7545
+ const cjsPath = this.getEmptyCjsModulePath();
7546
+ return cjsPath.replace(/\.cjs$/, ".js");
7547
+ }
7548
+ /**
7549
+ * Get absolute path to empty CJS module for esbuild pre-bundling.
7550
+ * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
7551
+ * exports, so any named import resolves.
7552
+ */
7553
+ getEmptyCjsModulePath() {
7548
7554
  const resolved = this.resolvePackage("@donotdev/core/empty");
7549
- if (resolved) return resolved;
7550
- const thisDir = dirname(fileURLToPath(import.meta.url));
7551
- return this.normalizePath(join(thisDir, "../empty.js"));
7555
+ if (!resolved) throw new Error("Cannot resolve @donotdev/core/empty \u2014 package setup is broken");
7556
+ return resolved;
7552
7557
  }
7553
7558
  // === PRIVATE METHODS ===
7554
7559
  /**
@@ -167,7 +167,7 @@ var require_picocolors = __commonJS({
167
167
  }
168
168
  });
169
169
 
170
- // node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
170
+ // node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
171
171
  import { stdin as j, stdout as M } from "node:process";
172
172
  import * as g from "node:readline";
173
173
  import O from "node:readline";
@@ -283,7 +283,7 @@ function fD({ input: e3 = j, output: u2 = M, overwrite: t2 = true, hideCursor: F
283
283
  }
284
284
  var import_sisteransi, import_picocolors, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, dD, A, OD, PD, J, LD, RD;
285
285
  var init_dist = __esm({
286
- "node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
286
+ "node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs"() {
287
287
  init_utils();
288
288
  import_sisteransi = __toESM(require_src(), 1);
289
289
  import_picocolors = __toESM(require_picocolors(), 1);
@@ -6832,7 +6832,7 @@ import {
6832
6832
  sep,
6833
6833
  extname
6834
6834
  } from "node:path";
6835
- import { fileURLToPath } from "node:url";
6835
+ import "node:url";
6836
6836
  function safeExecuteAsync(fn, message) {
6837
6837
  return fn().catch((error2) => {
6838
6838
  throw new Error(
@@ -7759,19 +7759,24 @@ var init_PathResolver = __esm({
7759
7759
  return resolved;
7760
7760
  }
7761
7761
  /**
7762
- * Get path to empty.js module for optional dependency aliasing
7763
- * Used by Vite and Turbopack to alias missing optional deps
7764
- * @param returnPackageSpecifier - If true, returns package specifier '@donotdev/core/empty' for Turbopack. If false, returns absolute path for Vite.
7765
- * @returns Package specifier or absolute path to empty.js
7762
+ * Get absolute path to empty ESM module for optional dependency aliasing.
7763
+ * Used by Vite resolveId — served directly to the browser in dev mode.
7764
+ * Note: resolvePackage uses require.resolve (CJS) which picks the "default"
7765
+ * condition (.cjs), so we derive the ESM path from it.
7766
7766
  */
7767
- getEmptyModulePath(returnPackageSpecifier = false) {
7768
- if (returnPackageSpecifier) {
7769
- return "@donotdev/core/empty";
7770
- }
7767
+ getEmptyModulePath() {
7768
+ const cjsPath = this.getEmptyCjsModulePath();
7769
+ return cjsPath.replace(/\.cjs$/, ".js");
7770
+ }
7771
+ /**
7772
+ * Get absolute path to empty CJS module for esbuild pre-bundling.
7773
+ * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
7774
+ * exports, so any named import resolves.
7775
+ */
7776
+ getEmptyCjsModulePath() {
7771
7777
  const resolved = this.resolvePackage("@donotdev/core/empty");
7772
- if (resolved) return resolved;
7773
- const thisDir = dirname(fileURLToPath(import.meta.url));
7774
- return this.normalizePath(join(thisDir, "../empty.js"));
7778
+ if (!resolved) throw new Error("Cannot resolve @donotdev/core/empty \u2014 package setup is broken");
7779
+ return resolved;
7775
7780
  }
7776
7781
  // === PRIVATE METHODS ===
7777
7782
  /**
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
163
163
  }
164
164
  });
165
165
 
166
- // node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
166
+ // node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
167
167
  import { stdin as j, stdout as M } from "node:process";
168
168
  import O from "node:readline";
169
169
  import { Writable as X } from "node:stream";
@@ -254,7 +254,7 @@ function m(e2, u2) {
254
254
  }
255
255
  var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, A, OD, PD, J, LD;
256
256
  var init_dist = __esm({
257
- "node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
257
+ "node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs"() {
258
258
  init_utils();
259
259
  import_sisteransi = __toESM(require_src(), 1);
260
260
  uD = DD();
@@ -6664,7 +6664,7 @@ import {
6664
6664
  sep,
6665
6665
  extname
6666
6666
  } from "node:path";
6667
- import { fileURLToPath } from "node:url";
6667
+ import "node:url";
6668
6668
  function safeExecuteAsync(fn, message) {
6669
6669
  return fn().catch((error2) => {
6670
6670
  throw new Error(
@@ -7591,19 +7591,24 @@ var init_PathResolver = __esm({
7591
7591
  return resolved;
7592
7592
  }
7593
7593
  /**
7594
- * Get path to empty.js module for optional dependency aliasing
7595
- * Used by Vite and Turbopack to alias missing optional deps
7596
- * @param returnPackageSpecifier - If true, returns package specifier '@donotdev/core/empty' for Turbopack. If false, returns absolute path for Vite.
7597
- * @returns Package specifier or absolute path to empty.js
7594
+ * Get absolute path to empty ESM module for optional dependency aliasing.
7595
+ * Used by Vite resolveId — served directly to the browser in dev mode.
7596
+ * Note: resolvePackage uses require.resolve (CJS) which picks the "default"
7597
+ * condition (.cjs), so we derive the ESM path from it.
7598
7598
  */
7599
- getEmptyModulePath(returnPackageSpecifier = false) {
7600
- if (returnPackageSpecifier) {
7601
- return "@donotdev/core/empty";
7602
- }
7599
+ getEmptyModulePath() {
7600
+ const cjsPath = this.getEmptyCjsModulePath();
7601
+ return cjsPath.replace(/\.cjs$/, ".js");
7602
+ }
7603
+ /**
7604
+ * Get absolute path to empty CJS module for esbuild pre-bundling.
7605
+ * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
7606
+ * exports, so any named import resolves.
7607
+ */
7608
+ getEmptyCjsModulePath() {
7603
7609
  const resolved = this.resolvePackage("@donotdev/core/empty");
7604
- if (resolved) return resolved;
7605
- const thisDir = dirname(fileURLToPath(import.meta.url));
7606
- return this.normalizePath(join(thisDir, "../empty.js"));
7610
+ if (!resolved) throw new Error("Cannot resolve @donotdev/core/empty \u2014 package setup is broken");
7611
+ return resolved;
7607
7612
  }
7608
7613
  // === PRIVATE METHODS ===
7609
7614
  /**