@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
package/dist/bin/commands/wai.js
CHANGED
|
@@ -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") {
|
|
@@ -130,13 +139,13 @@ var require_src = __commonJS({
|
|
|
130
139
|
}
|
|
131
140
|
});
|
|
132
141
|
|
|
133
|
-
// node_modules/.bun/@clack+core@1.5.
|
|
142
|
+
// node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
|
|
134
143
|
import { styleText } from "node:util";
|
|
135
144
|
import { stdout, stdin } from "node:process";
|
|
136
145
|
import { ReadStream } from "node:tty";
|
|
137
146
|
var import_sisteransi, a$1, t, settings, R;
|
|
138
147
|
var init_dist3 = __esm({
|
|
139
|
-
"node_modules/.bun/@clack+core@1.5.
|
|
148
|
+
"node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs"() {
|
|
140
149
|
init_utils2();
|
|
141
150
|
init_main();
|
|
142
151
|
import_sisteransi = __toESM(require_src(), 1);
|
|
@@ -188,7 +197,7 @@ var init_dist3 = __esm({
|
|
|
188
197
|
}
|
|
189
198
|
});
|
|
190
199
|
|
|
191
|
-
// node_modules/.bun/@clack+prompts@1.8.
|
|
200
|
+
// node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
|
|
192
201
|
import { styleText as styleText2, stripVTControlCharacters } from "node:util";
|
|
193
202
|
import process$1 from "node:process";
|
|
194
203
|
import { existsSync, lstatSync, readdirSync } from "node:fs";
|
|
@@ -201,7 +210,7 @@ function isUnicodeSupported() {
|
|
|
201
210
|
}
|
|
202
211
|
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, u2, SELECT_INSTRUCTIONS, i;
|
|
203
212
|
var init_dist4 = __esm({
|
|
204
|
-
"node_modules/.bun/@clack+prompts@1.8.
|
|
213
|
+
"node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs"() {
|
|
205
214
|
init_utils2();
|
|
206
215
|
init_dist3();
|
|
207
216
|
init_dist3();
|
|
@@ -4779,9 +4788,9 @@ var require_reusify = __commonJS({
|
|
|
4779
4788
|
}
|
|
4780
4789
|
});
|
|
4781
4790
|
|
|
4782
|
-
// node_modules/.bun/fastq@1.20.
|
|
4791
|
+
// node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js
|
|
4783
4792
|
var require_queue = __commonJS({
|
|
4784
|
-
"node_modules/.bun/fastq@1.20.
|
|
4793
|
+
"node_modules/.bun/fastq@1.20.3/node_modules/fastq/queue.js"(exports, module) {
|
|
4785
4794
|
"use strict";
|
|
4786
4795
|
init_utils2();
|
|
4787
4796
|
var reusify = require_reusify();
|
|
@@ -4961,11 +4970,12 @@ var require_queue = __commonJS({
|
|
|
4961
4970
|
current.value = null;
|
|
4962
4971
|
current.callback = noop;
|
|
4963
4972
|
current.errorHandler = null;
|
|
4973
|
+
current.next = null;
|
|
4964
4974
|
if (errorHandler2) {
|
|
4965
4975
|
errorHandler2(new Error("abort"), val);
|
|
4966
4976
|
}
|
|
4967
4977
|
callback.call(context2, new Error("abort"));
|
|
4968
|
-
|
|
4978
|
+
cache.release(current);
|
|
4969
4979
|
current = next;
|
|
4970
4980
|
}
|
|
4971
4981
|
self.drain = noop;
|
|
@@ -6431,7 +6441,7 @@ import {
|
|
|
6431
6441
|
sep,
|
|
6432
6442
|
extname
|
|
6433
6443
|
} from "node:path";
|
|
6434
|
-
import "node:url";
|
|
6444
|
+
import { fileURLToPath } from "node:url";
|
|
6435
6445
|
function safeExecuteAsync(fn, message) {
|
|
6436
6446
|
return fn().catch((error2) => {
|
|
6437
6447
|
throw new Error(
|
|
@@ -6488,6 +6498,7 @@ var init_PathResolver = __esm({
|
|
|
6488
6498
|
options;
|
|
6489
6499
|
_repoRoot;
|
|
6490
6500
|
_appRoot = null;
|
|
6501
|
+
_writtenPaths = null;
|
|
6491
6502
|
/**
|
|
6492
6503
|
* Get or create singleton instance
|
|
6493
6504
|
* @param options - Configuration options
|
|
@@ -6806,16 +6817,17 @@ var init_PathResolver = __esm({
|
|
|
6806
6817
|
}
|
|
6807
6818
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
6808
6819
|
let writeContent;
|
|
6809
|
-
if (
|
|
6820
|
+
if (Buffer2.isBuffer(content)) {
|
|
6810
6821
|
writeContent = content;
|
|
6811
6822
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
6812
|
-
writeContent = JSON.stringify(content, null, 2)
|
|
6823
|
+
writeContent = `${JSON.stringify(content, null, 2)}
|
|
6824
|
+
`;
|
|
6813
6825
|
} else {
|
|
6814
6826
|
writeContent = String(content);
|
|
6815
6827
|
}
|
|
6816
6828
|
try {
|
|
6817
6829
|
return await safeExecuteAsync(async () => {
|
|
6818
|
-
if (
|
|
6830
|
+
if (Buffer2.isBuffer(writeContent)) {
|
|
6819
6831
|
await fs.promises.writeFile(normalizedPath, writeContent);
|
|
6820
6832
|
} else {
|
|
6821
6833
|
await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
|
|
@@ -6867,19 +6879,21 @@ var init_PathResolver = __esm({
|
|
|
6867
6879
|
}
|
|
6868
6880
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
6869
6881
|
let writeContent;
|
|
6870
|
-
if (
|
|
6882
|
+
if (Buffer2.isBuffer(content)) {
|
|
6871
6883
|
writeContent = content;
|
|
6872
6884
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
6873
|
-
writeContent = JSON.stringify(content, null, 2)
|
|
6885
|
+
writeContent = `${JSON.stringify(content, null, 2)}
|
|
6886
|
+
`;
|
|
6874
6887
|
} else {
|
|
6875
6888
|
writeContent = String(content);
|
|
6876
6889
|
}
|
|
6877
6890
|
try {
|
|
6878
|
-
if (
|
|
6891
|
+
if (Buffer2.isBuffer(writeContent)) {
|
|
6879
6892
|
fs.writeFileSync(normalizedPath, writeContent);
|
|
6880
6893
|
} else {
|
|
6881
6894
|
fs.writeFileSync(normalizedPath, writeContent, "utf8");
|
|
6882
6895
|
}
|
|
6896
|
+
this._writtenPaths?.add(normalizedPath);
|
|
6883
6897
|
if (verbose) {
|
|
6884
6898
|
log3.info(
|
|
6885
6899
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedPath}`
|
|
@@ -6964,6 +6978,7 @@ var init_PathResolver = __esm({
|
|
|
6964
6978
|
}
|
|
6965
6979
|
try {
|
|
6966
6980
|
fs.copyFileSync(srcPath, normalizedDestPath);
|
|
6981
|
+
this._writtenPaths?.add(normalizedDestPath);
|
|
6967
6982
|
if (verbose) {
|
|
6968
6983
|
log3.info(
|
|
6969
6984
|
`${fileExists ? "Updated" : "Created"} file: ${normalizedDestPath}`
|
|
@@ -7031,6 +7046,24 @@ var init_PathResolver = __esm({
|
|
|
7031
7046
|
return null;
|
|
7032
7047
|
}
|
|
7033
7048
|
}
|
|
7049
|
+
/**
|
|
7050
|
+
* Resolve the real path of a file, following symlinks
|
|
7051
|
+
* @param filePath - Path to resolve
|
|
7052
|
+
* @returns Resolved real path
|
|
7053
|
+
*/
|
|
7054
|
+
realpathSync(filePath) {
|
|
7055
|
+
return fs.realpathSync(filePath);
|
|
7056
|
+
}
|
|
7057
|
+
/**
|
|
7058
|
+
* Watch a directory for changes
|
|
7059
|
+
* @param dirPath - Directory to watch
|
|
7060
|
+
* @param options - fs.watch options
|
|
7061
|
+
* @param callback - Callback for change events
|
|
7062
|
+
* @returns FSWatcher instance
|
|
7063
|
+
*/
|
|
7064
|
+
watch(dirPath, options, callback) {
|
|
7065
|
+
return fs.watch(dirPath, options, callback);
|
|
7066
|
+
}
|
|
7034
7067
|
/**
|
|
7035
7068
|
* Get file stats synchronously (follows symlinks)
|
|
7036
7069
|
* Returns null if file doesn't exist (graceful degradation)
|
|
@@ -7110,6 +7143,28 @@ var init_PathResolver = __esm({
|
|
|
7110
7143
|
* Get app root (where vite.config.ts is, Vite's config.root)
|
|
7111
7144
|
* Falls back to repoRoot if not set
|
|
7112
7145
|
*/
|
|
7146
|
+
/**
|
|
7147
|
+
* Start recording every path written by writeSync/copySync.
|
|
7148
|
+
* Lets a generator know exactly which files the current run produced,
|
|
7149
|
+
* without comparing file timestamps to a clock.
|
|
7150
|
+
*/
|
|
7151
|
+
startWriteRecording() {
|
|
7152
|
+
this._writtenPaths = /* @__PURE__ */ new Set();
|
|
7153
|
+
}
|
|
7154
|
+
/**
|
|
7155
|
+
* Stop recording and return the normalized paths written since
|
|
7156
|
+
* startWriteRecording().
|
|
7157
|
+
*/
|
|
7158
|
+
stopWriteRecording() {
|
|
7159
|
+
if (!this._writtenPaths) {
|
|
7160
|
+
throw new Error(
|
|
7161
|
+
"stopWriteRecording() called without startWriteRecording()"
|
|
7162
|
+
);
|
|
7163
|
+
}
|
|
7164
|
+
const written = this._writtenPaths;
|
|
7165
|
+
this._writtenPaths = null;
|
|
7166
|
+
return written;
|
|
7167
|
+
}
|
|
7113
7168
|
getAppRoot() {
|
|
7114
7169
|
if (!this._appRoot) {
|
|
7115
7170
|
return this._repoRoot;
|
|
@@ -7367,6 +7422,15 @@ var init_PathResolver = __esm({
|
|
|
7367
7422
|
const cjsPath = this.getEmptyCjsModulePath();
|
|
7368
7423
|
return cjsPath.replace(/\.cjs$/, ".js");
|
|
7369
7424
|
}
|
|
7425
|
+
/**
|
|
7426
|
+
* Get absolute path to empty flag component module.
|
|
7427
|
+
* Returns `export default () => null;` — used by flag filtering plugins
|
|
7428
|
+
* to replace unused flag files at build time.
|
|
7429
|
+
*/
|
|
7430
|
+
getEmptyFlagModulePath() {
|
|
7431
|
+
const __dirname2 = dirname2(fileURLToPath(import.meta.url));
|
|
7432
|
+
return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
|
|
7433
|
+
}
|
|
7370
7434
|
/**
|
|
7371
7435
|
* Get absolute path to empty CJS module for esbuild pre-bundling.
|
|
7372
7436
|
* CJS because esbuild statically analyzes ESM exports — CJS has dynamic
|
|
@@ -7460,7 +7524,7 @@ var init_pathResolver = __esm({
|
|
|
7460
7524
|
});
|
|
7461
7525
|
|
|
7462
7526
|
// packages/tooling/src/bundler/utils.ts
|
|
7463
|
-
import { Buffer } from "node:buffer";
|
|
7527
|
+
import { Buffer as Buffer2 } from "node:buffer";
|
|
7464
7528
|
import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7465
7529
|
import { createRequire as createRequire3 } from "node:module";
|
|
7466
7530
|
import { dirname as dirname4, resolve as resolve3 } from "node:path";
|
|
@@ -7477,7 +7541,7 @@ var init_utils2 = __esm({
|
|
|
7477
7541
|
globalThis.require = require2;
|
|
7478
7542
|
globalThis.__filename = __filename;
|
|
7479
7543
|
globalThis.__dirname = __dirname;
|
|
7480
|
-
globalThis.Buffer =
|
|
7544
|
+
globalThis.Buffer = Buffer2;
|
|
7481
7545
|
globalThis.process = process;
|
|
7482
7546
|
if (typeof global === "undefined") {
|
|
7483
7547
|
globalThis.global = globalThis;
|
package/dist/bin/dndev.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __esm = (fn, res) => function __init() {
|
|
5
|
-
|
|
4
|
+
var __esm = (fn, res, err) => function __init() {
|
|
5
|
+
if (err) throw err[0];
|
|
6
|
+
try {
|
|
7
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
8
|
+
} catch (e) {
|
|
9
|
+
throw err = [e], e;
|
|
10
|
+
}
|
|
6
11
|
};
|
|
7
12
|
var __export = (target, all) => {
|
|
8
13
|
for (var name in all)
|
|
@@ -990,7 +995,7 @@ function registerCommand(program2, def, action) {
|
|
|
990
995
|
}
|
|
991
996
|
|
|
992
997
|
// packages/cli/src/bin/dndev.mjs
|
|
993
|
-
var CLI_VERSION = true ? "0.1
|
|
998
|
+
var CLI_VERSION = true ? "0.2.1" : "0.0.0";
|
|
994
999
|
var args = process.argv.slice(2);
|
|
995
1000
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v")) {
|
|
996
1001
|
console.log(CLI_VERSION);
|