@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 __copyProps = (to, from, except, desc) => {
|
|
20
29
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -453,13 +462,13 @@ var require_src = __commonJS({
|
|
|
453
462
|
}
|
|
454
463
|
});
|
|
455
464
|
|
|
456
|
-
// node_modules/.bun/@clack+core@1.5.
|
|
465
|
+
// node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
|
|
457
466
|
import { styleText } from "node:util";
|
|
458
467
|
import { stdout, stdin } from "node:process";
|
|
459
468
|
import { ReadStream } from "node:tty";
|
|
460
469
|
var import_sisteransi, a$1, t, settings, R, getColumns;
|
|
461
470
|
var init_dist3 = __esm({
|
|
462
|
-
"node_modules/.bun/@clack+core@1.5.
|
|
471
|
+
"node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs"() {
|
|
463
472
|
init_utils2();
|
|
464
473
|
init_main();
|
|
465
474
|
import_sisteransi = __toESM(require_src(), 1);
|
|
@@ -512,7 +521,7 @@ var init_dist3 = __esm({
|
|
|
512
521
|
}
|
|
513
522
|
});
|
|
514
523
|
|
|
515
|
-
// node_modules/.bun/@clack+prompts@1.8.
|
|
524
|
+
// node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
|
|
516
525
|
import { styleText as styleText2, stripVTControlCharacters } from "node:util";
|
|
517
526
|
import process$1 from "node:process";
|
|
518
527
|
import { existsSync, lstatSync, readdirSync } from "node:fs";
|
|
@@ -525,7 +534,7 @@ function isUnicodeSupported() {
|
|
|
525
534
|
}
|
|
526
535
|
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, W$1, C, note, u2, SELECT_INSTRUCTIONS, i;
|
|
527
536
|
var init_dist4 = __esm({
|
|
528
|
-
"node_modules/.bun/@clack+prompts@1.8.
|
|
537
|
+
"node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs"() {
|
|
529
538
|
init_utils2();
|
|
530
539
|
init_dist3();
|
|
531
540
|
init_dist3();
|
|
@@ -5147,9 +5156,9 @@ var require_reusify = __commonJS({
|
|
|
5147
5156
|
}
|
|
5148
5157
|
});
|
|
5149
5158
|
|
|
5150
|
-
// node_modules/.bun/fastq@1.20.
|
|
5159
|
+
// node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js
|
|
5151
5160
|
var require_queue = __commonJS({
|
|
5152
|
-
"node_modules/.bun/fastq@1.20.
|
|
5161
|
+
"node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js"(exports, module) {
|
|
5153
5162
|
"use strict";
|
|
5154
5163
|
init_utils2();
|
|
5155
5164
|
var reusify = require_reusify();
|
|
@@ -5329,11 +5338,12 @@ var require_queue = __commonJS({
|
|
|
5329
5338
|
current.value = null;
|
|
5330
5339
|
current.callback = noop;
|
|
5331
5340
|
current.errorHandler = null;
|
|
5341
|
+
current.next = null;
|
|
5332
5342
|
if (errorHandler2) {
|
|
5333
5343
|
errorHandler2(new Error("abort"), val);
|
|
5334
5344
|
}
|
|
5335
5345
|
callback.call(context2, new Error("abort"));
|
|
5336
|
-
|
|
5346
|
+
cache.release(current);
|
|
5337
5347
|
current = next;
|
|
5338
5348
|
}
|
|
5339
5349
|
self.drain = noop;
|
|
@@ -6799,7 +6809,7 @@ import {
|
|
|
6799
6809
|
sep,
|
|
6800
6810
|
extname
|
|
6801
6811
|
} from "node:path";
|
|
6802
|
-
import "node:url";
|
|
6812
|
+
import { fileURLToPath } from "node:url";
|
|
6803
6813
|
function safeExecuteAsync(fn, message) {
|
|
6804
6814
|
return fn().catch((error2) => {
|
|
6805
6815
|
throw new Error(
|
|
@@ -6856,6 +6866,7 @@ var init_PathResolver = __esm({
|
|
|
6856
6866
|
options;
|
|
6857
6867
|
_repoRoot;
|
|
6858
6868
|
_appRoot = null;
|
|
6869
|
+
_writtenPaths = null;
|
|
6859
6870
|
/**
|
|
6860
6871
|
* Get or create singleton instance
|
|
6861
6872
|
* @param options - Configuration options
|
|
@@ -7174,16 +7185,17 @@ var init_PathResolver = __esm({
|
|
|
7174
7185
|
}
|
|
7175
7186
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
7176
7187
|
let writeContent;
|
|
7177
|
-
if (
|
|
7188
|
+
if (Buffer2.isBuffer(content)) {
|
|
7178
7189
|
writeContent = content;
|
|
7179
7190
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
7180
|
-
writeContent = JSON.stringify(content, null, 2)
|
|
7191
|
+
writeContent = `${JSON.stringify(content, null, 2)}
|
|
7192
|
+
`;
|
|
7181
7193
|
} else {
|
|
7182
7194
|
writeContent = String(content);
|
|
7183
7195
|
}
|
|
7184
7196
|
try {
|
|
7185
7197
|
return await safeExecuteAsync(async () => {
|
|
7186
|
-
if (
|
|
7198
|
+
if (Buffer2.isBuffer(writeContent)) {
|
|
7187
7199
|
await fs.promises.writeFile(normalizedPath, writeContent);
|
|
7188
7200
|
} else {
|
|
7189
7201
|
await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
|
|
@@ -7235,19 +7247,21 @@ var init_PathResolver = __esm({
|
|
|
7235
7247
|
}
|
|
7236
7248
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
7237
7249
|
let writeContent;
|
|
7238
|
-
if (
|
|
7250
|
+
if (Buffer2.isBuffer(content)) {
|
|
7239
7251
|
writeContent = content;
|
|
7240
7252
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
7241
|
-
writeContent = JSON.stringify(content, null, 2)
|
|
7253
|
+
writeContent = `${JSON.stringify(content, null, 2)}
|
|
7254
|
+
`;
|
|
7242
7255
|
} else {
|
|
7243
7256
|
writeContent = String(content);
|
|
7244
7257
|
}
|
|
7245
7258
|
try {
|
|
7246
|
-
if (
|
|
7259
|
+
if (Buffer2.isBuffer(writeContent)) {
|
|
7247
7260
|
fs.writeFileSync(normalizedPath, writeContent);
|
|
7248
7261
|
} else {
|
|
7249
7262
|
fs.writeFileSync(normalizedPath, writeContent, "utf8");
|
|
7250
7263
|
}
|
|
7264
|
+
this._writtenPaths?.add(normalizedPath);
|
|
7251
7265
|
if (verbose) {
|
|
7252
7266
|
log3.info(
|
|
7253
7267
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
|
|
@@ -7332,6 +7346,7 @@ var init_PathResolver = __esm({
|
|
|
7332
7346
|
}
|
|
7333
7347
|
try {
|
|
7334
7348
|
fs.copyFileSync(srcPath, normalizedDestPath);
|
|
7349
|
+
this._writtenPaths?.add(normalizedDestPath);
|
|
7335
7350
|
if (verbose) {
|
|
7336
7351
|
log3.info(
|
|
7337
7352
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
|
|
@@ -7399,6 +7414,24 @@ var init_PathResolver = __esm({
|
|
|
7399
7414
|
return null;
|
|
7400
7415
|
}
|
|
7401
7416
|
}
|
|
7417
|
+
/**
|
|
7418
|
+
* Resolve the real path of a file, following symlinks
|
|
7419
|
+
* @param filePath - Path to resolve
|
|
7420
|
+
* @returns Resolved real path
|
|
7421
|
+
*/
|
|
7422
|
+
realpathSync(filePath) {
|
|
7423
|
+
return fs.realpathSync(filePath);
|
|
7424
|
+
}
|
|
7425
|
+
/**
|
|
7426
|
+
* Watch a directory for changes
|
|
7427
|
+
* @param dirPath - Directory to watch
|
|
7428
|
+
* @param options - fs.watch options
|
|
7429
|
+
* @param callback - Callback for change events
|
|
7430
|
+
* @returns FSWatcher instance
|
|
7431
|
+
*/
|
|
7432
|
+
watch(dirPath, options, callback) {
|
|
7433
|
+
return fs.watch(dirPath, options, callback);
|
|
7434
|
+
}
|
|
7402
7435
|
/**
|
|
7403
7436
|
* Get file stats synchronously (follows symlinks)
|
|
7404
7437
|
* Returns null if file doesn't exist (graceful degradation)
|
|
@@ -7478,6 +7511,28 @@ var init_PathResolver = __esm({
|
|
|
7478
7511
|
* Get app root (where vite.config.ts is, Vite's config.root)
|
|
7479
7512
|
* Falls back to repoRoot if not set
|
|
7480
7513
|
*/
|
|
7514
|
+
/**
|
|
7515
|
+
* Start recording every path written by writeSync/copySync.
|
|
7516
|
+
* Lets a generator know exactly which files the current run produced,
|
|
7517
|
+
* without comparing file timestamps to a clock.
|
|
7518
|
+
*/
|
|
7519
|
+
startWriteRecording() {
|
|
7520
|
+
this._writtenPaths = /* @__PURE__ */ new Set();
|
|
7521
|
+
}
|
|
7522
|
+
/**
|
|
7523
|
+
* Stop recording and return the normalized paths written since
|
|
7524
|
+
* startWriteRecording().
|
|
7525
|
+
*/
|
|
7526
|
+
stopWriteRecording() {
|
|
7527
|
+
if (!this._writtenPaths) {
|
|
7528
|
+
throw new Error(
|
|
7529
|
+
"stopWriteRecording() called without startWriteRecording()"
|
|
7530
|
+
);
|
|
7531
|
+
}
|
|
7532
|
+
const written = this._writtenPaths;
|
|
7533
|
+
this._writtenPaths = null;
|
|
7534
|
+
return written;
|
|
7535
|
+
}
|
|
7481
7536
|
getAppRoot() {
|
|
7482
7537
|
if (!this._appRoot) {
|
|
7483
7538
|
return this._repoRoot;
|
|
@@ -7735,6 +7790,15 @@ var init_PathResolver = __esm({
|
|
|
7735
7790
|
const cjsPath = this.getEmptyCjsModulePath();
|
|
7736
7791
|
return cjsPath.replace(/\.cjs$/, ".js");
|
|
7737
7792
|
}
|
|
7793
|
+
/**
|
|
7794
|
+
* Get absolute path to empty flag component module.
|
|
7795
|
+
* Returns `export default () => null;` — used by flag filtering plugins
|
|
7796
|
+
* to replace unused flag files at build time.
|
|
7797
|
+
*/
|
|
7798
|
+
getEmptyFlagModulePath() {
|
|
7799
|
+
const __dirname2 = dirname2(fileURLToPath(import.meta.url));
|
|
7800
|
+
return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
|
|
7801
|
+
}
|
|
7738
7802
|
/**
|
|
7739
7803
|
* Get absolute path to empty CJS module for esbuild pre-bundling.
|
|
7740
7804
|
* CJS because esbuild statically analyzes ESM exports — CJS has dynamic
|
|
@@ -7832,7 +7896,7 @@ var init_pathResolver = __esm({
|
|
|
7832
7896
|
});
|
|
7833
7897
|
|
|
7834
7898
|
// packages/tooling/src/bundler/utils.ts
|
|
7835
|
-
import { Buffer } from "node:buffer";
|
|
7899
|
+
import { Buffer as Buffer2 } from "node:buffer";
|
|
7836
7900
|
import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7837
7901
|
import { createRequire as createRequire3 } from "node:module";
|
|
7838
7902
|
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
@@ -7849,7 +7913,7 @@ var init_utils2 = __esm({
|
|
|
7849
7913
|
globalThis.require = require2;
|
|
7850
7914
|
globalThis.__filename = __filename;
|
|
7851
7915
|
globalThis.__dirname = __dirname;
|
|
7852
|
-
globalThis.Buffer =
|
|
7916
|
+
globalThis.Buffer = Buffer2;
|
|
7853
7917
|
globalThis.process = process;
|
|
7854
7918
|
if (typeof global === "undefined") {
|
|
7855
7919
|
globalThis.global = globalThis;
|