@donotdev/cli 0.1.46 → 0.2.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.
- package/dependencies-matrix.json +189 -149
- package/dist/bin/commands/agent-setup.js +83 -19
- package/dist/bin/commands/build.js +207 -62
- package/dist/bin/commands/bump.js +108 -44
- package/dist/bin/commands/cacheout.js +83 -19
- package/dist/bin/commands/coach.js +83 -19
- package/dist/bin/commands/create-app.js +111 -43
- package/dist/bin/commands/create-project.js +111 -43
- package/dist/bin/commands/db.js +134098 -72027
- package/dist/bin/commands/deploy.js +524 -323
- package/dist/bin/commands/dev.js +87 -23
- package/dist/bin/commands/doctor.js +83 -19
- package/dist/bin/commands/emu.js +93 -29
- package/dist/bin/commands/format.js +83 -19
- package/dist/bin/commands/get-demo.js +87 -23
- package/dist/bin/commands/make-admin.js +7466 -8217
- package/dist/bin/commands/preview.js +87 -23
- package/dist/bin/commands/seed.js +134098 -72027
- package/dist/bin/commands/setup-cicd.js +107 -43
- package/dist/bin/commands/setup.js +110 -43
- package/dist/bin/commands/staging.js +524 -323
- package/dist/bin/commands/sync-secrets.js +88 -24
- package/dist/bin/commands/type-check.js +83 -19
- package/dist/bin/commands/wai.js +83 -19
- package/dist/bin/dndev.js +8 -3
- package/dist/index.js +534 -331
- package/package.json +3 -3
- package/templates/app-next/src/app/ClientLayout.tsx.example +11 -1
- package/templates/app-next/src/app/layout.tsx.example +19 -1
- package/templates/deploy-config/vercel.json.example +13 -13
- package/templates/functions-firebase/src/billing/handleStripeWebhook.ts.example +8 -18
- package/templates/functions-firebase/src/billing/index.ts.example +0 -1
- package/templates/functions-firebase/src/billing/refreshSubscriptionStatus.ts.example +4 -8
- package/templates/functions-firebase/src/index.ts.example +0 -1
- package/templates/functions-supabase/supabase/config.toml.example +4 -0
- package/templates/functions-supabase/supabase/functions/stripe-webhook/index.ts.example +12 -0
- package/templates/functions-supabase/supabase/migrations/20250101000005_webhook_events.sql +133 -0
- package/templates/functions-vercel/.env.example +9 -0
- package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +12 -14
- package/templates/functions-vercel/src/api/billing/refreshSubscriptionStatus.ts.example +4 -14
- package/templates/overlay-supabase/src/config/providers.ts.example +2 -2
- package/templates/root-consumer/.claude/hooks/guard-write.sh.example +32 -0
- package/templates/root-consumer/.claude/hooks/record-lookup.sh.example +22 -0
- package/templates/root-consumer/.claude/rules/definition-of-done.md.example +7 -0
- package/templates/root-consumer/.claude/rules/framework.md.example +6 -0
- package/templates/root-consumer/.claude/settings.json.example +11 -1
- package/templates/functions-firebase/src/billing/processPaymentSuccess.ts.example +0 -14
- package/templates/functions-vercel/src/api/billing/processPaymentSuccess.ts.example +0 -20
|
@@ -10,11 +10,20 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
10
10
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
11
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
12
|
});
|
|
13
|
-
var __esm = (fn, res) => function __init() {
|
|
14
|
-
|
|
13
|
+
var __esm = (fn, res, err) => function __init() {
|
|
14
|
+
if (err) throw err[0];
|
|
15
|
+
try {
|
|
16
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
throw err = [e], e;
|
|
19
|
+
}
|
|
15
20
|
};
|
|
16
21
|
var __commonJS = (cb, mod) => function __require2() {
|
|
17
|
-
|
|
22
|
+
try {
|
|
23
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
24
|
+
} catch (e) {
|
|
25
|
+
throw mod = 0, e;
|
|
26
|
+
}
|
|
18
27
|
};
|
|
19
28
|
var __export = (target, all) => {
|
|
20
29
|
for (var name in all)
|
|
@@ -134,13 +143,13 @@ var require_src = __commonJS({
|
|
|
134
143
|
}
|
|
135
144
|
});
|
|
136
145
|
|
|
137
|
-
// node_modules/.bun/@clack+core@1.5.
|
|
146
|
+
// node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
|
|
138
147
|
import { styleText } from "node:util";
|
|
139
148
|
import { stdout, stdin } from "node:process";
|
|
140
149
|
import { ReadStream } from "node:tty";
|
|
141
150
|
var import_sisteransi, a$1, t, settings, R;
|
|
142
151
|
var init_dist3 = __esm({
|
|
143
|
-
"node_modules/.bun/@clack+core@1.5.
|
|
152
|
+
"node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs"() {
|
|
144
153
|
init_utils2();
|
|
145
154
|
init_main();
|
|
146
155
|
import_sisteransi = __toESM(require_src(), 1);
|
|
@@ -192,7 +201,7 @@ var init_dist3 = __esm({
|
|
|
192
201
|
}
|
|
193
202
|
});
|
|
194
203
|
|
|
195
|
-
// node_modules/.bun/@clack+prompts@1.8.
|
|
204
|
+
// node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
|
|
196
205
|
import { styleText as styleText2, stripVTControlCharacters } from "node:util";
|
|
197
206
|
import process$1 from "node:process";
|
|
198
207
|
import { existsSync, lstatSync, readdirSync } from "node:fs";
|
|
@@ -205,7 +214,7 @@ function isUnicodeSupported() {
|
|
|
205
214
|
}
|
|
206
215
|
var import_sisteransi2, unicode, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, MULTISELECT_INSTRUCTIONS, log, intro, outro, u2, SELECT_INSTRUCTIONS, i;
|
|
207
216
|
var init_dist4 = __esm({
|
|
208
|
-
"node_modules/.bun/@clack+prompts@1.8.
|
|
217
|
+
"node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs"() {
|
|
209
218
|
init_utils2();
|
|
210
219
|
init_dist3();
|
|
211
220
|
init_dist3();
|
|
@@ -4937,9 +4946,9 @@ var require_reusify = __commonJS({
|
|
|
4937
4946
|
}
|
|
4938
4947
|
});
|
|
4939
4948
|
|
|
4940
|
-
// node_modules/.bun/fastq@1.20.
|
|
4949
|
+
// node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js
|
|
4941
4950
|
var require_queue = __commonJS({
|
|
4942
|
-
"node_modules/.bun/fastq@1.20.
|
|
4951
|
+
"node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js"(exports, module) {
|
|
4943
4952
|
"use strict";
|
|
4944
4953
|
init_utils2();
|
|
4945
4954
|
var reusify = require_reusify();
|
|
@@ -5119,11 +5128,12 @@ var require_queue = __commonJS({
|
|
|
5119
5128
|
current.value = null;
|
|
5120
5129
|
current.callback = noop;
|
|
5121
5130
|
current.errorHandler = null;
|
|
5131
|
+
current.next = null;
|
|
5122
5132
|
if (errorHandler2) {
|
|
5123
5133
|
errorHandler2(new Error("abort"), val);
|
|
5124
5134
|
}
|
|
5125
5135
|
callback.call(context2, new Error("abort"));
|
|
5126
|
-
|
|
5136
|
+
cache.release(current);
|
|
5127
5137
|
current = next;
|
|
5128
5138
|
}
|
|
5129
5139
|
self.drain = noop;
|
|
@@ -6589,7 +6599,7 @@ import {
|
|
|
6589
6599
|
sep,
|
|
6590
6600
|
extname
|
|
6591
6601
|
} from "node:path";
|
|
6592
|
-
import "node:url";
|
|
6602
|
+
import { fileURLToPath } from "node:url";
|
|
6593
6603
|
function safeExecuteAsync(fn, message) {
|
|
6594
6604
|
return fn().catch((error2) => {
|
|
6595
6605
|
throw new Error(
|
|
@@ -6646,6 +6656,7 @@ var init_PathResolver = __esm({
|
|
|
6646
6656
|
options;
|
|
6647
6657
|
_repoRoot;
|
|
6648
6658
|
_appRoot = null;
|
|
6659
|
+
_writtenPaths = null;
|
|
6649
6660
|
/**
|
|
6650
6661
|
* Get or create singleton instance
|
|
6651
6662
|
* @param options - Configuration options
|
|
@@ -6964,16 +6975,17 @@ var init_PathResolver = __esm({
|
|
|
6964
6975
|
}
|
|
6965
6976
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
6966
6977
|
let writeContent;
|
|
6967
|
-
if (
|
|
6978
|
+
if (Buffer2.isBuffer(content)) {
|
|
6968
6979
|
writeContent = content;
|
|
6969
6980
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
6970
|
-
writeContent = JSON.stringify(content, null, 2)
|
|
6981
|
+
writeContent = `${JSON.stringify(content, null, 2)}
|
|
6982
|
+
`;
|
|
6971
6983
|
} else {
|
|
6972
6984
|
writeContent = String(content);
|
|
6973
6985
|
}
|
|
6974
6986
|
try {
|
|
6975
6987
|
return await safeExecuteAsync(async () => {
|
|
6976
|
-
if (
|
|
6988
|
+
if (Buffer2.isBuffer(writeContent)) {
|
|
6977
6989
|
await fs.promises.writeFile(normalizedPath, writeContent);
|
|
6978
6990
|
} else {
|
|
6979
6991
|
await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
|
|
@@ -7025,19 +7037,21 @@ var init_PathResolver = __esm({
|
|
|
7025
7037
|
}
|
|
7026
7038
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
7027
7039
|
let writeContent;
|
|
7028
|
-
if (
|
|
7040
|
+
if (Buffer2.isBuffer(content)) {
|
|
7029
7041
|
writeContent = content;
|
|
7030
7042
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
7031
|
-
writeContent = JSON.stringify(content, null, 2)
|
|
7043
|
+
writeContent = `${JSON.stringify(content, null, 2)}
|
|
7044
|
+
`;
|
|
7032
7045
|
} else {
|
|
7033
7046
|
writeContent = String(content);
|
|
7034
7047
|
}
|
|
7035
7048
|
try {
|
|
7036
|
-
if (
|
|
7049
|
+
if (Buffer2.isBuffer(writeContent)) {
|
|
7037
7050
|
fs.writeFileSync(normalizedPath, writeContent);
|
|
7038
7051
|
} else {
|
|
7039
7052
|
fs.writeFileSync(normalizedPath, writeContent, "utf8");
|
|
7040
7053
|
}
|
|
7054
|
+
this._writtenPaths?.add(normalizedPath);
|
|
7041
7055
|
if (verbose) {
|
|
7042
7056
|
log3.info(
|
|
7043
7057
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
|
|
@@ -7122,6 +7136,7 @@ var init_PathResolver = __esm({
|
|
|
7122
7136
|
}
|
|
7123
7137
|
try {
|
|
7124
7138
|
fs.copyFileSync(srcPath, normalizedDestPath);
|
|
7139
|
+
this._writtenPaths?.add(normalizedDestPath);
|
|
7125
7140
|
if (verbose) {
|
|
7126
7141
|
log3.info(
|
|
7127
7142
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
|
|
@@ -7189,6 +7204,24 @@ var init_PathResolver = __esm({
|
|
|
7189
7204
|
return null;
|
|
7190
7205
|
}
|
|
7191
7206
|
}
|
|
7207
|
+
/**
|
|
7208
|
+
* Resolve the real path of a file, following symlinks
|
|
7209
|
+
* @param filePath - Path to resolve
|
|
7210
|
+
* @returns Resolved real path
|
|
7211
|
+
*/
|
|
7212
|
+
realpathSync(filePath) {
|
|
7213
|
+
return fs.realpathSync(filePath);
|
|
7214
|
+
}
|
|
7215
|
+
/**
|
|
7216
|
+
* Watch a directory for changes
|
|
7217
|
+
* @param dirPath - Directory to watch
|
|
7218
|
+
* @param options - fs.watch options
|
|
7219
|
+
* @param callback - Callback for change events
|
|
7220
|
+
* @returns FSWatcher instance
|
|
7221
|
+
*/
|
|
7222
|
+
watch(dirPath, options, callback) {
|
|
7223
|
+
return fs.watch(dirPath, options, callback);
|
|
7224
|
+
}
|
|
7192
7225
|
/**
|
|
7193
7226
|
* Get file stats synchronously (follows symlinks)
|
|
7194
7227
|
* Returns null if file doesn't exist (graceful degradation)
|
|
@@ -7268,6 +7301,28 @@ var init_PathResolver = __esm({
|
|
|
7268
7301
|
* Get app root (where vite.config.ts is, Vite's config.root)
|
|
7269
7302
|
* Falls back to repoRoot if not set
|
|
7270
7303
|
*/
|
|
7304
|
+
/**
|
|
7305
|
+
* Start recording every path written by writeSync/copySync.
|
|
7306
|
+
* Lets a generator know exactly which files the current run produced,
|
|
7307
|
+
* without comparing file timestamps to a clock.
|
|
7308
|
+
*/
|
|
7309
|
+
startWriteRecording() {
|
|
7310
|
+
this._writtenPaths = /* @__PURE__ */ new Set();
|
|
7311
|
+
}
|
|
7312
|
+
/**
|
|
7313
|
+
* Stop recording and return the normalized paths written since
|
|
7314
|
+
* startWriteRecording().
|
|
7315
|
+
*/
|
|
7316
|
+
stopWriteRecording() {
|
|
7317
|
+
if (!this._writtenPaths) {
|
|
7318
|
+
throw new Error(
|
|
7319
|
+
"stopWriteRecording() called without startWriteRecording()"
|
|
7320
|
+
);
|
|
7321
|
+
}
|
|
7322
|
+
const written = this._writtenPaths;
|
|
7323
|
+
this._writtenPaths = null;
|
|
7324
|
+
return written;
|
|
7325
|
+
}
|
|
7271
7326
|
getAppRoot() {
|
|
7272
7327
|
if (!this._appRoot) {
|
|
7273
7328
|
return this._repoRoot;
|
|
@@ -7525,6 +7580,15 @@ var init_PathResolver = __esm({
|
|
|
7525
7580
|
const cjsPath = this.getEmptyCjsModulePath();
|
|
7526
7581
|
return cjsPath.replace(/\.cjs$/, ".js");
|
|
7527
7582
|
}
|
|
7583
|
+
/**
|
|
7584
|
+
* Get absolute path to empty flag component module.
|
|
7585
|
+
* Returns `export default () => null;` — used by flag filtering plugins
|
|
7586
|
+
* to replace unused flag files at build time.
|
|
7587
|
+
*/
|
|
7588
|
+
getEmptyFlagModulePath() {
|
|
7589
|
+
const __dirname2 = dirname2(fileURLToPath(import.meta.url));
|
|
7590
|
+
return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
|
|
7591
|
+
}
|
|
7528
7592
|
/**
|
|
7529
7593
|
* Get absolute path to empty CJS module for esbuild pre-bundling.
|
|
7530
7594
|
* CJS because esbuild statically analyzes ESM exports — CJS has dynamic
|
|
@@ -7649,7 +7713,7 @@ var init_typed_file_operations = __esm({
|
|
|
7649
7713
|
});
|
|
7650
7714
|
|
|
7651
7715
|
// packages/tooling/src/bundler/utils.ts
|
|
7652
|
-
import { Buffer } from "node:buffer";
|
|
7716
|
+
import { Buffer as Buffer2 } from "node:buffer";
|
|
7653
7717
|
import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7654
7718
|
import { createRequire as createRequire3 } from "node:module";
|
|
7655
7719
|
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
@@ -7666,7 +7730,7 @@ var init_utils2 = __esm({
|
|
|
7666
7730
|
globalThis.require = require2;
|
|
7667
7731
|
globalThis.__filename = __filename;
|
|
7668
7732
|
globalThis.__dirname = __dirname;
|
|
7669
|
-
globalThis.Buffer =
|
|
7733
|
+
globalThis.Buffer = Buffer2;
|
|
7670
7734
|
globalThis.process = process;
|
|
7671
7735
|
if (typeof global === "undefined") {
|
|
7672
7736
|
globalThis.global = globalThis;
|
|
@@ -10,11 +10,20 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
10
10
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
11
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
12
|
});
|
|
13
|
-
var __esm = (fn, res) => function __init() {
|
|
14
|
-
|
|
13
|
+
var __esm = (fn, res, err) => function __init() {
|
|
14
|
+
if (err) throw err[0];
|
|
15
|
+
try {
|
|
16
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
throw err = [e], e;
|
|
19
|
+
}
|
|
15
20
|
};
|
|
16
21
|
var __commonJS = (cb, mod) => function __require2() {
|
|
17
|
-
|
|
22
|
+
try {
|
|
23
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
24
|
+
} catch (e) {
|
|
25
|
+
throw mod = 0, e;
|
|
26
|
+
}
|
|
18
27
|
};
|
|
19
28
|
var __export = (target, all) => {
|
|
20
29
|
for (var name in all)
|
|
@@ -457,7 +466,7 @@ var require_src = __commonJS({
|
|
|
457
466
|
}
|
|
458
467
|
});
|
|
459
468
|
|
|
460
|
-
// node_modules/.bun/@clack+core@1.5.
|
|
469
|
+
// node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
|
|
461
470
|
import { styleText } from "node:util";
|
|
462
471
|
import { stdout, stdin } from "node:process";
|
|
463
472
|
import * as l from "node:readline";
|
|
@@ -556,7 +565,7 @@ function runValidation(e, a2) {
|
|
|
556
565
|
}
|
|
557
566
|
var import_sisteransi, a$1, t, settings, R, CANCEL_SYMBOL, getColumns, getRows, y, r, n$1, n2;
|
|
558
567
|
var init_dist3 = __esm({
|
|
559
|
-
"node_modules/.bun/@clack+core@1.5.
|
|
568
|
+
"node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs"() {
|
|
560
569
|
init_utils2();
|
|
561
570
|
init_main();
|
|
562
571
|
import_sisteransi = __toESM(require_src(), 1);
|
|
@@ -856,7 +865,7 @@ var init_dist3 = __esm({
|
|
|
856
865
|
}
|
|
857
866
|
});
|
|
858
867
|
|
|
859
|
-
// node_modules/.bun/@clack+prompts@1.8.
|
|
868
|
+
// node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
|
|
860
869
|
import { styleText as styleText2, stripVTControlCharacters } from "node:util";
|
|
861
870
|
import process$1 from "node:process";
|
|
862
871
|
import { existsSync, lstatSync, readdirSync } from "node:fs";
|
|
@@ -873,7 +882,7 @@ function formatInstructionFooter(o, e) {
|
|
|
873
882
|
}
|
|
874
883
|
var import_sisteransi2, unicode, isCI, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, symbol, symbolBar, I, limitOptions, confirm, MULTISELECT_INSTRUCTIONS, log, cancel, intro, outro, W$1, C, note, W, spinner, u2, SELECT_INSTRUCTIONS, c, select, i, text;
|
|
875
884
|
var init_dist4 = __esm({
|
|
876
|
-
"node_modules/.bun/@clack+prompts@1.8.
|
|
885
|
+
"node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs"() {
|
|
877
886
|
init_utils2();
|
|
878
887
|
init_dist3();
|
|
879
888
|
init_dist3();
|
|
@@ -1002,39 +1011,39 @@ var init_dist4 = __esm({
|
|
|
1002
1011
|
x.push(n3);
|
|
1003
1012
|
return c2 && x.push(M), x;
|
|
1004
1013
|
};
|
|
1005
|
-
confirm = (
|
|
1006
|
-
const a2 =
|
|
1014
|
+
confirm = (e) => {
|
|
1015
|
+
const a2 = e.active ?? "Yes", o = e.inactive ?? "No";
|
|
1007
1016
|
return new r({
|
|
1008
1017
|
active: a2,
|
|
1009
|
-
inactive:
|
|
1010
|
-
signal:
|
|
1011
|
-
input:
|
|
1012
|
-
output:
|
|
1013
|
-
initialValue:
|
|
1018
|
+
inactive: o,
|
|
1019
|
+
signal: e.signal,
|
|
1020
|
+
input: e.input,
|
|
1021
|
+
output: e.output,
|
|
1022
|
+
initialValue: e.initialValue ?? true,
|
|
1014
1023
|
render() {
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1017
|
-
|
|
1024
|
+
const i2 = e.withGuide ?? settings.withGuide, u3 = `${symbol(this.state)} `, l2 = i2 ? `${styleText2("gray", S_BAR)} ` : "", f = wrapTextWithPrefix(
|
|
1025
|
+
e.output,
|
|
1026
|
+
e.message,
|
|
1018
1027
|
l2,
|
|
1019
1028
|
u3
|
|
1020
|
-
),
|
|
1029
|
+
), s = `${i2 ? `${styleText2("gray", S_BAR)}
|
|
1021
1030
|
` : ""}${f}
|
|
1022
|
-
`, c2 = this.value ? a2 :
|
|
1031
|
+
`, c2 = this.value ? a2 : o;
|
|
1023
1032
|
switch (this.state) {
|
|
1024
1033
|
case "submit": {
|
|
1025
|
-
const r2 =
|
|
1026
|
-
return `${
|
|
1034
|
+
const r2 = i2 ? `${styleText2("gray", S_BAR)} ` : "";
|
|
1035
|
+
return `${s}${r2}${styleText2("dim", c2)}`;
|
|
1027
1036
|
}
|
|
1028
1037
|
case "cancel": {
|
|
1029
|
-
const r2 =
|
|
1030
|
-
return `${
|
|
1038
|
+
const r2 = i2 ? `${styleText2("gray", S_BAR)} ` : "";
|
|
1039
|
+
return `${s}${r2}${styleText2(["strikethrough", "dim"], c2)}${i2 ? `
|
|
1031
1040
|
${styleText2("gray", S_BAR)}` : ""}`;
|
|
1032
1041
|
}
|
|
1033
1042
|
default: {
|
|
1034
|
-
const r2 =
|
|
1035
|
-
return `${
|
|
1043
|
+
const r2 = i2 ? `${styleText2("cyan", S_BAR)} ` : "", g = i2 ? styleText2("cyan", S_BAR_END) : "";
|
|
1044
|
+
return `${s}${r2}${this.value ? `${styleText2("green", S_RADIO_ACTIVE)} ${a2}` : `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", a2)}`}${e.vertical ? i2 ? `
|
|
1036
1045
|
${styleText2("cyan", S_BAR)} ` : `
|
|
1037
|
-
` : ` ${styleText2("dim", "/")} `}${this.value ? `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim",
|
|
1046
|
+
` : ` ${styleText2("dim", "/")} `}${this.value ? `${styleText2("dim", S_RADIO_INACTIVE)} ${styleText2("dim", o)}` : `${styleText2("green", S_RADIO_ACTIVE)} ${o}`}
|
|
1038
1047
|
${g}
|
|
1039
1048
|
`;
|
|
1040
1049
|
}
|
|
@@ -1286,19 +1295,19 @@ ${styleText2("gray", S_BAR)}` : ""}`;
|
|
|
1286
1295
|
}
|
|
1287
1296
|
default: {
|
|
1288
1297
|
const r2 = n3 ? `${styleText2("cyan", S_BAR)} ` : "", a2 = u3.split(`
|
|
1289
|
-
`).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [],
|
|
1290
|
-
`),
|
|
1298
|
+
`).length, p = d ? formatInstructionFooter(SELECT_INSTRUCTIONS, n3) : n3 ? [styleText2("cyan", S_BAR_END)] : [], f = p.join(`
|
|
1299
|
+
`), b = p.length + 1;
|
|
1291
1300
|
return `${u3}${r2}${limitOptions({
|
|
1292
1301
|
output: t2.output,
|
|
1293
1302
|
cursor: this.cursor,
|
|
1294
1303
|
options: this.options,
|
|
1295
1304
|
maxItems: t2.maxItems,
|
|
1296
1305
|
columnPadding: r2.length,
|
|
1297
|
-
rowPadding: a2 +
|
|
1306
|
+
rowPadding: a2 + b,
|
|
1298
1307
|
style: (g, x) => o(g, g.disabled ? "disabled" : x ? "active" : "inactive")
|
|
1299
1308
|
}).join(`
|
|
1300
1309
|
${r2}`)}
|
|
1301
|
-
${
|
|
1310
|
+
${f}
|
|
1302
1311
|
`;
|
|
1303
1312
|
}
|
|
1304
1313
|
}
|
|
@@ -5906,9 +5915,9 @@ var require_reusify = __commonJS({
|
|
|
5906
5915
|
}
|
|
5907
5916
|
});
|
|
5908
5917
|
|
|
5909
|
-
// node_modules/.bun/fastq@1.20.
|
|
5918
|
+
// node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js
|
|
5910
5919
|
var require_queue = __commonJS({
|
|
5911
|
-
"node_modules/.bun/fastq@1.20.
|
|
5920
|
+
"node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js"(exports, module) {
|
|
5912
5921
|
"use strict";
|
|
5913
5922
|
init_utils2();
|
|
5914
5923
|
var reusify = require_reusify();
|
|
@@ -6088,11 +6097,12 @@ var require_queue = __commonJS({
|
|
|
6088
6097
|
current.value = null;
|
|
6089
6098
|
current.callback = noop;
|
|
6090
6099
|
current.errorHandler = null;
|
|
6100
|
+
current.next = null;
|
|
6091
6101
|
if (errorHandler2) {
|
|
6092
6102
|
errorHandler2(new Error("abort"), val);
|
|
6093
6103
|
}
|
|
6094
6104
|
callback.call(context2, new Error("abort"));
|
|
6095
|
-
|
|
6105
|
+
cache.release(current);
|
|
6096
6106
|
current = next;
|
|
6097
6107
|
}
|
|
6098
6108
|
self.drain = noop;
|
|
@@ -7558,7 +7568,7 @@ import {
|
|
|
7558
7568
|
sep,
|
|
7559
7569
|
extname
|
|
7560
7570
|
} from "node:path";
|
|
7561
|
-
import "node:url";
|
|
7571
|
+
import { fileURLToPath } from "node:url";
|
|
7562
7572
|
function safeExecuteAsync(fn, message) {
|
|
7563
7573
|
return fn().catch((error2) => {
|
|
7564
7574
|
throw new Error(
|
|
@@ -7615,6 +7625,7 @@ var init_PathResolver = __esm({
|
|
|
7615
7625
|
options;
|
|
7616
7626
|
_repoRoot;
|
|
7617
7627
|
_appRoot = null;
|
|
7628
|
+
_writtenPaths = null;
|
|
7618
7629
|
/**
|
|
7619
7630
|
* Get or create singleton instance
|
|
7620
7631
|
* @param options - Configuration options
|
|
@@ -7933,16 +7944,17 @@ var init_PathResolver = __esm({
|
|
|
7933
7944
|
}
|
|
7934
7945
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
7935
7946
|
let writeContent;
|
|
7936
|
-
if (
|
|
7947
|
+
if (Buffer2.isBuffer(content)) {
|
|
7937
7948
|
writeContent = content;
|
|
7938
7949
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
7939
|
-
writeContent = JSON.stringify(content, null, 2)
|
|
7950
|
+
writeContent = `${JSON.stringify(content, null, 2)}
|
|
7951
|
+
`;
|
|
7940
7952
|
} else {
|
|
7941
7953
|
writeContent = String(content);
|
|
7942
7954
|
}
|
|
7943
7955
|
try {
|
|
7944
7956
|
return await safeExecuteAsync(async () => {
|
|
7945
|
-
if (
|
|
7957
|
+
if (Buffer2.isBuffer(writeContent)) {
|
|
7946
7958
|
await fs.promises.writeFile(normalizedPath, writeContent);
|
|
7947
7959
|
} else {
|
|
7948
7960
|
await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
|
|
@@ -7994,19 +8006,21 @@ var init_PathResolver = __esm({
|
|
|
7994
8006
|
}
|
|
7995
8007
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
7996
8008
|
let writeContent;
|
|
7997
|
-
if (
|
|
8009
|
+
if (Buffer2.isBuffer(content)) {
|
|
7998
8010
|
writeContent = content;
|
|
7999
8011
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
8000
|
-
writeContent = JSON.stringify(content, null, 2)
|
|
8012
|
+
writeContent = `${JSON.stringify(content, null, 2)}
|
|
8013
|
+
`;
|
|
8001
8014
|
} else {
|
|
8002
8015
|
writeContent = String(content);
|
|
8003
8016
|
}
|
|
8004
8017
|
try {
|
|
8005
|
-
if (
|
|
8018
|
+
if (Buffer2.isBuffer(writeContent)) {
|
|
8006
8019
|
fs.writeFileSync(normalizedPath, writeContent);
|
|
8007
8020
|
} else {
|
|
8008
8021
|
fs.writeFileSync(normalizedPath, writeContent, "utf8");
|
|
8009
8022
|
}
|
|
8023
|
+
this._writtenPaths?.add(normalizedPath);
|
|
8010
8024
|
if (verbose) {
|
|
8011
8025
|
log3.info(
|
|
8012
8026
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
|
|
@@ -8091,6 +8105,7 @@ var init_PathResolver = __esm({
|
|
|
8091
8105
|
}
|
|
8092
8106
|
try {
|
|
8093
8107
|
fs.copyFileSync(srcPath, normalizedDestPath);
|
|
8108
|
+
this._writtenPaths?.add(normalizedDestPath);
|
|
8094
8109
|
if (verbose) {
|
|
8095
8110
|
log3.info(
|
|
8096
8111
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
|
|
@@ -8158,6 +8173,24 @@ var init_PathResolver = __esm({
|
|
|
8158
8173
|
return null;
|
|
8159
8174
|
}
|
|
8160
8175
|
}
|
|
8176
|
+
/**
|
|
8177
|
+
* Resolve the real path of a file, following symlinks
|
|
8178
|
+
* @param filePath - Path to resolve
|
|
8179
|
+
* @returns Resolved real path
|
|
8180
|
+
*/
|
|
8181
|
+
realpathSync(filePath) {
|
|
8182
|
+
return fs.realpathSync(filePath);
|
|
8183
|
+
}
|
|
8184
|
+
/**
|
|
8185
|
+
* Watch a directory for changes
|
|
8186
|
+
* @param dirPath - Directory to watch
|
|
8187
|
+
* @param options - fs.watch options
|
|
8188
|
+
* @param callback - Callback for change events
|
|
8189
|
+
* @returns FSWatcher instance
|
|
8190
|
+
*/
|
|
8191
|
+
watch(dirPath, options, callback) {
|
|
8192
|
+
return fs.watch(dirPath, options, callback);
|
|
8193
|
+
}
|
|
8161
8194
|
/**
|
|
8162
8195
|
* Get file stats synchronously (follows symlinks)
|
|
8163
8196
|
* Returns null if file doesn't exist (graceful degradation)
|
|
@@ -8237,6 +8270,28 @@ var init_PathResolver = __esm({
|
|
|
8237
8270
|
* Get app root (where vite.config.ts is, Vite's config.root)
|
|
8238
8271
|
* Falls back to repoRoot if not set
|
|
8239
8272
|
*/
|
|
8273
|
+
/**
|
|
8274
|
+
* Start recording every path written by writeSync/copySync.
|
|
8275
|
+
* Lets a generator know exactly which files the current run produced,
|
|
8276
|
+
* without comparing file timestamps to a clock.
|
|
8277
|
+
*/
|
|
8278
|
+
startWriteRecording() {
|
|
8279
|
+
this._writtenPaths = /* @__PURE__ */ new Set();
|
|
8280
|
+
}
|
|
8281
|
+
/**
|
|
8282
|
+
* Stop recording and return the normalized paths written since
|
|
8283
|
+
* startWriteRecording().
|
|
8284
|
+
*/
|
|
8285
|
+
stopWriteRecording() {
|
|
8286
|
+
if (!this._writtenPaths) {
|
|
8287
|
+
throw new Error(
|
|
8288
|
+
"stopWriteRecording() called without startWriteRecording()"
|
|
8289
|
+
);
|
|
8290
|
+
}
|
|
8291
|
+
const written = this._writtenPaths;
|
|
8292
|
+
this._writtenPaths = null;
|
|
8293
|
+
return written;
|
|
8294
|
+
}
|
|
8240
8295
|
getAppRoot() {
|
|
8241
8296
|
if (!this._appRoot) {
|
|
8242
8297
|
return this._repoRoot;
|
|
@@ -8494,6 +8549,15 @@ var init_PathResolver = __esm({
|
|
|
8494
8549
|
const cjsPath = this.getEmptyCjsModulePath();
|
|
8495
8550
|
return cjsPath.replace(/\.cjs$/, ".js");
|
|
8496
8551
|
}
|
|
8552
|
+
/**
|
|
8553
|
+
* Get absolute path to empty flag component module.
|
|
8554
|
+
* Returns `export default () => null;` — used by flag filtering plugins
|
|
8555
|
+
* to replace unused flag files at build time.
|
|
8556
|
+
*/
|
|
8557
|
+
getEmptyFlagModulePath() {
|
|
8558
|
+
const __dirname2 = dirname2(fileURLToPath(import.meta.url));
|
|
8559
|
+
return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
|
|
8560
|
+
}
|
|
8497
8561
|
/**
|
|
8498
8562
|
* Get absolute path to empty CJS module for esbuild pre-bundling.
|
|
8499
8563
|
* CJS because esbuild statically analyzes ESM exports — CJS has dynamic
|
|
@@ -8762,7 +8826,7 @@ async function isBinaryFile(filePath) {
|
|
|
8762
8826
|
try {
|
|
8763
8827
|
let fileHandle = null;
|
|
8764
8828
|
try {
|
|
8765
|
-
const buffer =
|
|
8829
|
+
const buffer = Buffer2.alloc(4096);
|
|
8766
8830
|
const fs2 = await import("node:fs");
|
|
8767
8831
|
fileHandle = await fs2.promises.open(filePath, "r");
|
|
8768
8832
|
const { bytesRead } = await fileHandle.read(buffer, 0, 4096, 0);
|
|
@@ -8947,7 +9011,7 @@ var init_pathResolver = __esm({
|
|
|
8947
9011
|
});
|
|
8948
9012
|
|
|
8949
9013
|
// packages/tooling/src/bundler/utils.ts
|
|
8950
|
-
import { Buffer } from "node:buffer";
|
|
9014
|
+
import { Buffer as Buffer2 } from "node:buffer";
|
|
8951
9015
|
import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
8952
9016
|
import { createRequire as createRequire3 } from "node:module";
|
|
8953
9017
|
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
@@ -8964,7 +9028,7 @@ var init_utils2 = __esm({
|
|
|
8964
9028
|
globalThis.require = require2;
|
|
8965
9029
|
globalThis.__filename = __filename;
|
|
8966
9030
|
globalThis.__dirname = __dirname;
|
|
8967
|
-
globalThis.Buffer =
|
|
9031
|
+
globalThis.Buffer = Buffer2;
|
|
8968
9032
|
globalThis.process = process;
|
|
8969
9033
|
if (typeof global === "undefined") {
|
|
8970
9034
|
globalThis.global = globalThis;
|
|
@@ -9736,6 +9800,8 @@ async function createApp(appName, appConfig, workspaceRoot, templatesRoot) {
|
|
|
9736
9800
|
appName,
|
|
9737
9801
|
appShortName: appName.toUpperCase().replace(/-/g, " "),
|
|
9738
9802
|
includeFunctions: Boolean(row.functionsTemplate),
|
|
9803
|
+
// vercel.json functions/rewrites/env only fit Vercel API functions, not Supabase or Firebase ones.
|
|
9804
|
+
includeVercelFunctions: row.functionsTemplate === "functions-vercel",
|
|
9739
9805
|
needsCRUD: Boolean(appConfig.needsCRUD),
|
|
9740
9806
|
setupGithubActions: false,
|
|
9741
9807
|
appNames: [appName],
|
|
@@ -9830,6 +9896,8 @@ async function createApp(appName, appConfig, workspaceRoot, templatesRoot) {
|
|
|
9830
9896
|
appName,
|
|
9831
9897
|
template: isReservedTemplate ? "vite" : appTemplate,
|
|
9832
9898
|
includeFunctions: Boolean(row.functionsTemplate),
|
|
9899
|
+
// vercel.json functions/rewrites/env only fit Vercel API functions, not Supabase or Firebase ones.
|
|
9900
|
+
includeVercelFunctions: row.functionsTemplate === "functions-vercel",
|
|
9833
9901
|
platform: isReservedTemplate ? void 0 : backendPlatform
|
|
9834
9902
|
});
|
|
9835
9903
|
const packageJsonPath = joinPath(appDir, "package.json");
|