@donotdev/cli 0.0.7 → 0.0.9
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/README.md +3 -18
- package/dependencies-matrix.json +54 -45
- package/dist/bin/commands/build.js +19 -5
- package/dist/bin/commands/bump.js +30 -5
- package/dist/bin/commands/cacheout.js +36 -19
- package/dist/bin/commands/create-app.js +73 -7
- package/dist/bin/commands/create-project.js +90 -8
- package/dist/bin/commands/deploy.js +130 -27
- package/dist/bin/commands/dev.js +23 -7
- package/dist/bin/commands/emu.js +28 -12
- package/dist/bin/commands/format.js +39 -22
- package/dist/bin/commands/lint.js +36 -19
- package/dist/bin/commands/preview.js +24 -8
- package/dist/bin/commands/sync-secrets.js +19 -5
- package/dist/bin/dndev.js +7 -20
- package/dist/bin/donotdev.js +7 -20
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +209 -100
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/templates/app-next/src/config/app.ts.example +1 -1
- package/templates/app-vite/index.html.example +24 -2
- package/templates/app-vite/src/config/app.ts.example +1 -1
- package/templates/app-vite/src/pages/FormPageExample.tsx.example +8 -5
- package/templates/app-vite/src/pages/ListPageExample.tsx.example +4 -7
- package/templates/root-consumer/.firebaserc.example +5 -0
- package/templates/root-consumer/entities/ExampleEntity.ts.example +2 -1
- package/templates/root-consumer/entities/demo.ts.example +15 -1
- package/templates/root-consumer/eslint.config.js.example +2 -80
- package/templates/root-consumer/firestore.indexes.json.example +4 -0
- package/templates/root-consumer/firestore.rules.example +11 -0
- package/templates/root-consumer/guides/dndev/COMPONENTS_CRUD.md.example +9 -6
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +376 -38
- package/templates/root-consumer/guides/dndev/SETUP_I18N.md.example +46 -0
- package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +1 -1
- package/templates/root-consumer/storage.rules.example +8 -0
|
@@ -164,6 +164,8 @@ var require_picocolors = __commonJS({
|
|
|
164
164
|
});
|
|
165
165
|
|
|
166
166
|
// node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
|
|
167
|
+
import { stdin as j, stdout as M } from "node:process";
|
|
168
|
+
import { Writable as X } from "node:stream";
|
|
167
169
|
function DD({ onlyFirst: e2 = false } = {}) {
|
|
168
170
|
const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
169
171
|
return new RegExp(t, e2 ? void 0 : "g");
|
|
@@ -259,11 +261,12 @@ var init_dist = __esm({
|
|
|
259
261
|
});
|
|
260
262
|
|
|
261
263
|
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/dist/index.mjs
|
|
264
|
+
import { stripVTControlCharacters as S } from "node:util";
|
|
262
265
|
import y from "node:process";
|
|
263
266
|
function ce() {
|
|
264
267
|
return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
265
268
|
}
|
|
266
|
-
var import_picocolors, import_sisteransi2, V, u, le, L2, W2, C, ue, o, d, k, P, A2, T, F, $e, _2, me, de, pe, q, D, U, K,
|
|
269
|
+
var import_picocolors, import_sisteransi2, V, u, le, L2, W2, C, ue, o, d, k, P, A2, T, F, $e, _2, me, de, pe, q, D, U, K, M2, J;
|
|
267
270
|
var init_dist2 = __esm({
|
|
268
271
|
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/dist/index.mjs"() {
|
|
269
272
|
init_utils();
|
|
@@ -294,7 +297,7 @@ var init_dist2 = __esm({
|
|
|
294
297
|
D = u("\u25C6", "*");
|
|
295
298
|
U = u("\u25B2", "!");
|
|
296
299
|
K = u("\u25A0", "x");
|
|
297
|
-
|
|
300
|
+
M2 = { message: (t = "", { symbol: n = import_picocolors.default.gray(o) } = {}) => {
|
|
298
301
|
const r2 = [`${import_picocolors.default.gray(o)}`];
|
|
299
302
|
if (t) {
|
|
300
303
|
const [i, ...s] = t.split(`
|
|
@@ -305,23 +308,24 @@ var init_dist2 = __esm({
|
|
|
305
308
|
`)}
|
|
306
309
|
`);
|
|
307
310
|
}, info: (t) => {
|
|
308
|
-
|
|
311
|
+
M2.message(t, { symbol: import_picocolors.default.blue(q) });
|
|
309
312
|
}, success: (t) => {
|
|
310
|
-
|
|
313
|
+
M2.message(t, { symbol: import_picocolors.default.green(D) });
|
|
311
314
|
}, step: (t) => {
|
|
312
|
-
|
|
315
|
+
M2.message(t, { symbol: import_picocolors.default.green(C) });
|
|
313
316
|
}, warn: (t) => {
|
|
314
|
-
|
|
317
|
+
M2.message(t, { symbol: import_picocolors.default.yellow(U) });
|
|
315
318
|
}, warning: (t) => {
|
|
316
|
-
|
|
319
|
+
M2.warn(t);
|
|
317
320
|
}, error: (t) => {
|
|
318
|
-
|
|
321
|
+
M2.message(t, { symbol: import_picocolors.default.red(K) });
|
|
319
322
|
} };
|
|
320
323
|
J = `${import_picocolors.default.gray(o)} `;
|
|
321
324
|
}
|
|
322
325
|
});
|
|
323
326
|
|
|
324
327
|
// packages/tooling/src/utils/cli-output.ts
|
|
328
|
+
import "node:os";
|
|
325
329
|
function supportsColor() {
|
|
326
330
|
if (process.env.NO_COLOR) return false;
|
|
327
331
|
if (process.platform === "win32") {
|
|
@@ -402,7 +406,7 @@ var init_cli_output = __esm({
|
|
|
402
406
|
error(...args) {
|
|
403
407
|
if (currentLogLevel < 0 /* Quiet */) return;
|
|
404
408
|
const message = formatMessage(...args);
|
|
405
|
-
|
|
409
|
+
M2.error(colorize(message, colors.brightRed));
|
|
406
410
|
},
|
|
407
411
|
/**
|
|
408
412
|
* Logs a warning message (shows at Normal level and above)
|
|
@@ -411,7 +415,7 @@ var init_cli_output = __esm({
|
|
|
411
415
|
warn(...args) {
|
|
412
416
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
413
417
|
const message = formatMessage(...args);
|
|
414
|
-
|
|
418
|
+
M2.warn(colorize(message, colors.brightYellow));
|
|
415
419
|
},
|
|
416
420
|
/**
|
|
417
421
|
* Logs an info message (shows at Normal level and above)
|
|
@@ -420,7 +424,7 @@ var init_cli_output = __esm({
|
|
|
420
424
|
info(...args) {
|
|
421
425
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
422
426
|
const message = formatMessage(...args);
|
|
423
|
-
|
|
427
|
+
M2.info(colorize(message, colors.brightCyan));
|
|
424
428
|
},
|
|
425
429
|
/**
|
|
426
430
|
* Logs a success message (shows at Normal level and above)
|
|
@@ -429,7 +433,7 @@ var init_cli_output = __esm({
|
|
|
429
433
|
success(...args) {
|
|
430
434
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
431
435
|
const message = formatMessage(...args);
|
|
432
|
-
|
|
436
|
+
M2.success(colorize(message, colors.brightGreen));
|
|
433
437
|
},
|
|
434
438
|
/**
|
|
435
439
|
* Logs a debug message (only shows at Verbose level and above)
|
|
@@ -438,7 +442,7 @@ var init_cli_output = __esm({
|
|
|
438
442
|
debug(...args) {
|
|
439
443
|
if (currentLogLevel < 2 /* Verbose */) return;
|
|
440
444
|
const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
|
|
441
|
-
|
|
445
|
+
M2.message(
|
|
442
446
|
colorize(
|
|
443
447
|
`[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
|
|
444
448
|
colors.gray
|
|
@@ -452,7 +456,7 @@ var init_cli_output = __esm({
|
|
|
452
456
|
trace(...args) {
|
|
453
457
|
if (currentLogLevel < 3 /* Debug */) return;
|
|
454
458
|
const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
|
|
455
|
-
|
|
459
|
+
M2.message(
|
|
456
460
|
colorize(
|
|
457
461
|
`[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
|
|
458
462
|
colors.gray
|
|
@@ -6109,7 +6113,16 @@ var init_constants = __esm({
|
|
|
6109
6113
|
},
|
|
6110
6114
|
i18n: {
|
|
6111
6115
|
eager: ["src/locales/*_*.json"],
|
|
6112
|
-
lazy: [
|
|
6116
|
+
lazy: [
|
|
6117
|
+
"src/**/locales/*_*.json",
|
|
6118
|
+
"!src/locales/*_*.json",
|
|
6119
|
+
// Auto-detect shared entity translations in monorepos (if exists, use it; if not, no problem)
|
|
6120
|
+
"../../entities/locales/*_*.json"
|
|
6121
|
+
],
|
|
6122
|
+
// Additional paths from workspace packages (e.g., shared entities)
|
|
6123
|
+
// Consumers can still configure via i18n.additionalPaths in dndev/vite config for custom paths
|
|
6124
|
+
// Example: ['../../packages/shared/locales/*_*.json']
|
|
6125
|
+
additional: [],
|
|
6113
6126
|
framework: {
|
|
6114
6127
|
eager: [`${I18N_PATHS.SOURCE_EAGER}/*_*.json`],
|
|
6115
6128
|
lazy: [`${I18N_PATHS.SOURCE_LAZY}/*_*.json`]
|
|
@@ -6202,6 +6215,7 @@ var init_constants = __esm({
|
|
|
6202
6215
|
|
|
6203
6216
|
// packages/core/config/utils/PathResolver.ts
|
|
6204
6217
|
import * as fs from "node:fs";
|
|
6218
|
+
import "node:fs";
|
|
6205
6219
|
import { createRequire } from "node:module";
|
|
6206
6220
|
import {
|
|
6207
6221
|
resolve,
|
|
@@ -7314,6 +7328,7 @@ var init_errors = __esm({
|
|
|
7314
7328
|
});
|
|
7315
7329
|
|
|
7316
7330
|
// packages/tooling/src/utils/pathResolver.ts
|
|
7331
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
7317
7332
|
import {
|
|
7318
7333
|
join as join2,
|
|
7319
7334
|
dirname as dirname2,
|
|
@@ -7323,6 +7338,7 @@ import {
|
|
|
7323
7338
|
resolve as resolve2,
|
|
7324
7339
|
isAbsolute as pathIsAbsolute
|
|
7325
7340
|
} from "node:path";
|
|
7341
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
7326
7342
|
function readdirSync2(dirPath, options) {
|
|
7327
7343
|
return pathResolverInstance.readdirSync(dirPath, options);
|
|
7328
7344
|
}
|
|
@@ -7354,16 +7370,17 @@ var init_pathResolver = __esm({
|
|
|
7354
7370
|
|
|
7355
7371
|
// packages/tooling/src/bundler/utils.ts
|
|
7356
7372
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
7357
|
-
import {
|
|
7373
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7374
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
7358
7375
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
7359
7376
|
import process from "node:process";
|
|
7360
|
-
import { fileURLToPath as
|
|
7377
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
7361
7378
|
var require2, __filename, __dirname;
|
|
7362
7379
|
var init_utils = __esm({
|
|
7363
7380
|
"packages/tooling/src/bundler/utils.ts"() {
|
|
7364
7381
|
"use strict";
|
|
7365
|
-
require2 =
|
|
7366
|
-
__filename =
|
|
7382
|
+
require2 = createRequire3(import.meta.url);
|
|
7383
|
+
__filename = fileURLToPath3(import.meta.url);
|
|
7367
7384
|
__dirname = dirname3(__filename);
|
|
7368
7385
|
if (typeof globalThis !== "undefined") {
|
|
7369
7386
|
globalThis.require = require2;
|
|
@@ -7393,7 +7410,7 @@ init_cli_output();
|
|
|
7393
7410
|
init_errors();
|
|
7394
7411
|
init_pathResolver();
|
|
7395
7412
|
import { spawnSync } from "node:child_process";
|
|
7396
|
-
import { EOL } from "node:os";
|
|
7413
|
+
import { EOL as EOL2 } from "node:os";
|
|
7397
7414
|
async function main(options = {}) {
|
|
7398
7415
|
const dryRun = options.dryRun ?? false;
|
|
7399
7416
|
const verbose = options.verbose ?? false;
|
|
@@ -7511,7 +7528,7 @@ async function addPathComments(files, rootDir, dryRun, verbose) {
|
|
|
7511
7528
|
let modified = false;
|
|
7512
7529
|
if (contentLines.length === 0) {
|
|
7513
7530
|
if (!dryRun) {
|
|
7514
|
-
writeSync(file, `${expectedPathComment}${
|
|
7531
|
+
writeSync(file, `${expectedPathComment}${EOL2}`, {
|
|
7515
7532
|
overwrite: true
|
|
7516
7533
|
});
|
|
7517
7534
|
}
|
|
@@ -7636,7 +7653,7 @@ async function addPathComments(files, rootDir, dryRun, verbose) {
|
|
|
7636
7653
|
newLines.push("");
|
|
7637
7654
|
}
|
|
7638
7655
|
newLines.push(...contentLines);
|
|
7639
|
-
const newContent = newLines.join(
|
|
7656
|
+
const newContent = newLines.join(EOL2);
|
|
7640
7657
|
const contentChanged = fileContent !== newContent;
|
|
7641
7658
|
if (contentChanged) {
|
|
7642
7659
|
try {
|
|
@@ -164,6 +164,8 @@ var require_picocolors = __commonJS({
|
|
|
164
164
|
});
|
|
165
165
|
|
|
166
166
|
// node_modules/.bun/@clack+core@0.5.0/node_modules/@clack/core/dist/index.mjs
|
|
167
|
+
import { stdin as j, stdout as M } from "node:process";
|
|
168
|
+
import { Writable as X } from "node:stream";
|
|
167
169
|
function DD({ onlyFirst: e2 = false } = {}) {
|
|
168
170
|
const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
169
171
|
return new RegExp(t, e2 ? void 0 : "g");
|
|
@@ -259,11 +261,12 @@ var init_dist = __esm({
|
|
|
259
261
|
});
|
|
260
262
|
|
|
261
263
|
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/dist/index.mjs
|
|
264
|
+
import { stripVTControlCharacters as S } from "node:util";
|
|
262
265
|
import y from "node:process";
|
|
263
266
|
function ce() {
|
|
264
267
|
return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
265
268
|
}
|
|
266
|
-
var import_picocolors, import_sisteransi2, V, u, le, L2, W2, C, ue, o, d, k, P, A2, T, F, $e, _2, me, de, pe, q, D, U, K,
|
|
269
|
+
var import_picocolors, import_sisteransi2, V, u, le, L2, W2, C, ue, o, d, k, P, A2, T, F, $e, _2, me, de, pe, q, D, U, K, M2, J;
|
|
267
270
|
var init_dist2 = __esm({
|
|
268
271
|
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/dist/index.mjs"() {
|
|
269
272
|
init_utils();
|
|
@@ -294,7 +297,7 @@ var init_dist2 = __esm({
|
|
|
294
297
|
D = u("\u25C6", "*");
|
|
295
298
|
U = u("\u25B2", "!");
|
|
296
299
|
K = u("\u25A0", "x");
|
|
297
|
-
|
|
300
|
+
M2 = { message: (t = "", { symbol: n = import_picocolors.default.gray(o) } = {}) => {
|
|
298
301
|
const r2 = [`${import_picocolors.default.gray(o)}`];
|
|
299
302
|
if (t) {
|
|
300
303
|
const [i, ...s] = t.split(`
|
|
@@ -305,23 +308,24 @@ var init_dist2 = __esm({
|
|
|
305
308
|
`)}
|
|
306
309
|
`);
|
|
307
310
|
}, info: (t) => {
|
|
308
|
-
|
|
311
|
+
M2.message(t, { symbol: import_picocolors.default.blue(q) });
|
|
309
312
|
}, success: (t) => {
|
|
310
|
-
|
|
313
|
+
M2.message(t, { symbol: import_picocolors.default.green(D) });
|
|
311
314
|
}, step: (t) => {
|
|
312
|
-
|
|
315
|
+
M2.message(t, { symbol: import_picocolors.default.green(C) });
|
|
313
316
|
}, warn: (t) => {
|
|
314
|
-
|
|
317
|
+
M2.message(t, { symbol: import_picocolors.default.yellow(U) });
|
|
315
318
|
}, warning: (t) => {
|
|
316
|
-
|
|
319
|
+
M2.warn(t);
|
|
317
320
|
}, error: (t) => {
|
|
318
|
-
|
|
321
|
+
M2.message(t, { symbol: import_picocolors.default.red(K) });
|
|
319
322
|
} };
|
|
320
323
|
J = `${import_picocolors.default.gray(o)} `;
|
|
321
324
|
}
|
|
322
325
|
});
|
|
323
326
|
|
|
324
327
|
// packages/tooling/src/utils/cli-output.ts
|
|
328
|
+
import "node:os";
|
|
325
329
|
function supportsColor() {
|
|
326
330
|
if (process.env.NO_COLOR) return false;
|
|
327
331
|
if (process.platform === "win32") {
|
|
@@ -402,7 +406,7 @@ var init_cli_output = __esm({
|
|
|
402
406
|
error(...args) {
|
|
403
407
|
if (currentLogLevel < 0 /* Quiet */) return;
|
|
404
408
|
const message = formatMessage(...args);
|
|
405
|
-
|
|
409
|
+
M2.error(colorize(message, colors.brightRed));
|
|
406
410
|
},
|
|
407
411
|
/**
|
|
408
412
|
* Logs a warning message (shows at Normal level and above)
|
|
@@ -411,7 +415,7 @@ var init_cli_output = __esm({
|
|
|
411
415
|
warn(...args) {
|
|
412
416
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
413
417
|
const message = formatMessage(...args);
|
|
414
|
-
|
|
418
|
+
M2.warn(colorize(message, colors.brightYellow));
|
|
415
419
|
},
|
|
416
420
|
/**
|
|
417
421
|
* Logs an info message (shows at Normal level and above)
|
|
@@ -420,7 +424,7 @@ var init_cli_output = __esm({
|
|
|
420
424
|
info(...args) {
|
|
421
425
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
422
426
|
const message = formatMessage(...args);
|
|
423
|
-
|
|
427
|
+
M2.info(colorize(message, colors.brightCyan));
|
|
424
428
|
},
|
|
425
429
|
/**
|
|
426
430
|
* Logs a success message (shows at Normal level and above)
|
|
@@ -429,7 +433,7 @@ var init_cli_output = __esm({
|
|
|
429
433
|
success(...args) {
|
|
430
434
|
if (currentLogLevel < 1 /* Normal */) return;
|
|
431
435
|
const message = formatMessage(...args);
|
|
432
|
-
|
|
436
|
+
M2.success(colorize(message, colors.brightGreen));
|
|
433
437
|
},
|
|
434
438
|
/**
|
|
435
439
|
* Logs a debug message (only shows at Verbose level and above)
|
|
@@ -438,7 +442,7 @@ var init_cli_output = __esm({
|
|
|
438
442
|
debug(...args) {
|
|
439
443
|
if (currentLogLevel < 2 /* Verbose */) return;
|
|
440
444
|
const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
|
|
441
|
-
|
|
445
|
+
M2.message(
|
|
442
446
|
colorize(
|
|
443
447
|
`[${timeStamp}] \u{1F50D} DEBUG: ${formatMessage(...args)}`,
|
|
444
448
|
colors.gray
|
|
@@ -452,7 +456,7 @@ var init_cli_output = __esm({
|
|
|
452
456
|
trace(...args) {
|
|
453
457
|
if (currentLogLevel < 3 /* Debug */) return;
|
|
454
458
|
const timeStamp = (/* @__PURE__ */ new Date()).toISOString().slice(11, 19);
|
|
455
|
-
|
|
459
|
+
M2.message(
|
|
456
460
|
colorize(
|
|
457
461
|
`[${timeStamp}] \u{1F52C} TRACE: ${formatMessage(...args)}`,
|
|
458
462
|
colors.gray
|
|
@@ -6109,7 +6113,16 @@ var init_constants = __esm({
|
|
|
6109
6113
|
},
|
|
6110
6114
|
i18n: {
|
|
6111
6115
|
eager: ["src/locales/*_*.json"],
|
|
6112
|
-
lazy: [
|
|
6116
|
+
lazy: [
|
|
6117
|
+
"src/**/locales/*_*.json",
|
|
6118
|
+
"!src/locales/*_*.json",
|
|
6119
|
+
// Auto-detect shared entity translations in monorepos (if exists, use it; if not, no problem)
|
|
6120
|
+
"../../entities/locales/*_*.json"
|
|
6121
|
+
],
|
|
6122
|
+
// Additional paths from workspace packages (e.g., shared entities)
|
|
6123
|
+
// Consumers can still configure via i18n.additionalPaths in dndev/vite config for custom paths
|
|
6124
|
+
// Example: ['../../packages/shared/locales/*_*.json']
|
|
6125
|
+
additional: [],
|
|
6113
6126
|
framework: {
|
|
6114
6127
|
eager: [`${I18N_PATHS.SOURCE_EAGER}/*_*.json`],
|
|
6115
6128
|
lazy: [`${I18N_PATHS.SOURCE_LAZY}/*_*.json`]
|
|
@@ -6202,6 +6215,7 @@ var init_constants = __esm({
|
|
|
6202
6215
|
|
|
6203
6216
|
// packages/core/config/utils/PathResolver.ts
|
|
6204
6217
|
import * as fs from "node:fs";
|
|
6218
|
+
import "node:fs";
|
|
6205
6219
|
import { createRequire } from "node:module";
|
|
6206
6220
|
import {
|
|
6207
6221
|
resolve,
|
|
@@ -7314,6 +7328,7 @@ var init_errors = __esm({
|
|
|
7314
7328
|
});
|
|
7315
7329
|
|
|
7316
7330
|
// packages/tooling/src/utils/pathResolver.ts
|
|
7331
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
7317
7332
|
import {
|
|
7318
7333
|
join as join2,
|
|
7319
7334
|
dirname as dirname2,
|
|
@@ -7323,6 +7338,7 @@ import {
|
|
|
7323
7338
|
resolve as resolve2,
|
|
7324
7339
|
isAbsolute as pathIsAbsolute
|
|
7325
7340
|
} from "node:path";
|
|
7341
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
7326
7342
|
var pathResolverInstance, normalizePath, pathExists, joinPath;
|
|
7327
7343
|
var init_pathResolver = __esm({
|
|
7328
7344
|
"packages/tooling/src/utils/pathResolver.ts"() {
|
|
@@ -7342,16 +7358,17 @@ var init_pathResolver = __esm({
|
|
|
7342
7358
|
|
|
7343
7359
|
// packages/tooling/src/bundler/utils.ts
|
|
7344
7360
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
7345
|
-
import {
|
|
7361
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7362
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
7346
7363
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
7347
7364
|
import process from "node:process";
|
|
7348
|
-
import { fileURLToPath as
|
|
7365
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
7349
7366
|
var require2, __filename, __dirname;
|
|
7350
7367
|
var init_utils = __esm({
|
|
7351
7368
|
"packages/tooling/src/bundler/utils.ts"() {
|
|
7352
7369
|
"use strict";
|
|
7353
|
-
require2 =
|
|
7354
|
-
__filename =
|
|
7370
|
+
require2 = createRequire3(import.meta.url);
|
|
7371
|
+
__filename = fileURLToPath3(import.meta.url);
|
|
7355
7372
|
__dirname = dirname3(__filename);
|
|
7356
7373
|
if (typeof globalThis !== "undefined") {
|
|
7357
7374
|
globalThis.require = require2;
|
|
@@ -502,6 +502,7 @@ var init_dist = __esm({
|
|
|
502
502
|
});
|
|
503
503
|
|
|
504
504
|
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/dist/index.mjs
|
|
505
|
+
import { stripVTControlCharacters as S2 } from "node:util";
|
|
505
506
|
import y2 from "node:process";
|
|
506
507
|
function ce() {
|
|
507
508
|
return y2.platform !== "win32" ? y2.env.TERM !== "linux" : !!y2.env.CI || !!y2.env.WT_SESSION || !!y2.env.TERMINUS_SUBLIME || y2.env.ConEmuTask === "{cmd::Cmder}" || y2.env.TERM_PROGRAM === "Terminus-Sublime" || y2.env.TERM_PROGRAM === "vscode" || y2.env.TERM === "xterm-256color" || y2.env.TERM === "alacritty" || y2.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
@@ -620,6 +621,7 @@ ${import_picocolors.default.cyan(d2)}
|
|
|
620
621
|
});
|
|
621
622
|
|
|
622
623
|
// packages/tooling/src/utils/cli-output.ts
|
|
624
|
+
import "node:os";
|
|
623
625
|
function supportsColor() {
|
|
624
626
|
if (process.env.NO_COLOR) return false;
|
|
625
627
|
if (process.platform === "win32") {
|
|
@@ -6407,7 +6409,16 @@ var init_constants = __esm({
|
|
|
6407
6409
|
},
|
|
6408
6410
|
i18n: {
|
|
6409
6411
|
eager: ["src/locales/*_*.json"],
|
|
6410
|
-
lazy: [
|
|
6412
|
+
lazy: [
|
|
6413
|
+
"src/**/locales/*_*.json",
|
|
6414
|
+
"!src/locales/*_*.json",
|
|
6415
|
+
// Auto-detect shared entity translations in monorepos (if exists, use it; if not, no problem)
|
|
6416
|
+
"../../entities/locales/*_*.json"
|
|
6417
|
+
],
|
|
6418
|
+
// Additional paths from workspace packages (e.g., shared entities)
|
|
6419
|
+
// Consumers can still configure via i18n.additionalPaths in dndev/vite config for custom paths
|
|
6420
|
+
// Example: ['../../packages/shared/locales/*_*.json']
|
|
6421
|
+
additional: [],
|
|
6411
6422
|
framework: {
|
|
6412
6423
|
eager: [`${I18N_PATHS.SOURCE_EAGER}/*_*.json`],
|
|
6413
6424
|
lazy: [`${I18N_PATHS.SOURCE_LAZY}/*_*.json`]
|
|
@@ -6500,6 +6511,7 @@ var init_constants = __esm({
|
|
|
6500
6511
|
|
|
6501
6512
|
// packages/core/config/utils/PathResolver.ts
|
|
6502
6513
|
import * as fs from "node:fs";
|
|
6514
|
+
import "node:fs";
|
|
6503
6515
|
import { createRequire } from "node:module";
|
|
6504
6516
|
import {
|
|
6505
6517
|
resolve,
|
|
@@ -7612,6 +7624,7 @@ var init_errors = __esm({
|
|
|
7612
7624
|
});
|
|
7613
7625
|
|
|
7614
7626
|
// packages/tooling/src/utils/pathResolver.ts
|
|
7627
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
7615
7628
|
import {
|
|
7616
7629
|
join as join2,
|
|
7617
7630
|
dirname as dirname2,
|
|
@@ -7621,6 +7634,7 @@ import {
|
|
|
7621
7634
|
resolve as resolve2,
|
|
7622
7635
|
isAbsolute as pathIsAbsolute
|
|
7623
7636
|
} from "node:path";
|
|
7637
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
7624
7638
|
function readdirSync2(dirPath, options) {
|
|
7625
7639
|
return pathResolverInstance.readdirSync(dirPath, options);
|
|
7626
7640
|
}
|
|
@@ -7646,16 +7660,17 @@ var init_pathResolver = __esm({
|
|
|
7646
7660
|
|
|
7647
7661
|
// packages/tooling/src/bundler/utils.ts
|
|
7648
7662
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
7649
|
-
import {
|
|
7663
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7664
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
7650
7665
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
7651
7666
|
import process from "node:process";
|
|
7652
|
-
import { fileURLToPath as
|
|
7667
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
7653
7668
|
var require2, __filename, __dirname;
|
|
7654
7669
|
var init_utils = __esm({
|
|
7655
7670
|
"packages/tooling/src/bundler/utils.ts"() {
|
|
7656
7671
|
"use strict";
|
|
7657
|
-
require2 =
|
|
7658
|
-
__filename =
|
|
7672
|
+
require2 = createRequire3(import.meta.url);
|
|
7673
|
+
__filename = fileURLToPath3(import.meta.url);
|
|
7659
7674
|
__dirname = dirname3(__filename);
|
|
7660
7675
|
if (typeof globalThis !== "undefined") {
|
|
7661
7676
|
globalThis.require = require2;
|
|
@@ -7806,6 +7821,7 @@ async function selectApp(projectRoot, appName) {
|
|
|
7806
7821
|
|
|
7807
7822
|
// packages/tooling/src/utils/spawn-utils.ts
|
|
7808
7823
|
init_utils();
|
|
7824
|
+
import { spawnSync, execSync } from "node:child_process";
|
|
7809
7825
|
function createAppEnv(appPath) {
|
|
7810
7826
|
return {
|
|
7811
7827
|
...process.env,
|
|
@@ -7815,7 +7831,7 @@ function createAppEnv(appPath) {
|
|
|
7815
7831
|
|
|
7816
7832
|
// packages/tooling/src/apps/preview.ts
|
|
7817
7833
|
init_utils();
|
|
7818
|
-
import { spawnSync } from "node:child_process";
|
|
7834
|
+
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
7819
7835
|
init_cli_output();
|
|
7820
7836
|
init_errors();
|
|
7821
7837
|
init_pathResolver();
|
|
@@ -7839,7 +7855,7 @@ async function main() {
|
|
|
7839
7855
|
if (!hasBuild) {
|
|
7840
7856
|
log.info(`Build not found. Building ${app.name} first...
|
|
7841
7857
|
`);
|
|
7842
|
-
const buildResult =
|
|
7858
|
+
const buildResult = spawnSync2(
|
|
7843
7859
|
"bunx",
|
|
7844
7860
|
["turbo", "build", "--filter", app.packageName],
|
|
7845
7861
|
{
|
|
@@ -7855,7 +7871,7 @@ async function main() {
|
|
|
7855
7871
|
log.info(`Previewing ${app.name}...
|
|
7856
7872
|
`);
|
|
7857
7873
|
const turboArgs = ["preview", "--filter", app.packageName];
|
|
7858
|
-
const result =
|
|
7874
|
+
const result = spawnSync2("bunx", ["turbo", ...turboArgs], {
|
|
7859
7875
|
stdio: "inherit",
|
|
7860
7876
|
env: createAppEnv(app.path),
|
|
7861
7877
|
cwd: projectRoot
|
|
@@ -644,6 +644,7 @@ ${import_picocolors.default.gray(de + _2.repeat(s + 2) + pe)}
|
|
|
644
644
|
});
|
|
645
645
|
|
|
646
646
|
// packages/tooling/src/utils/cli-output.ts
|
|
647
|
+
import "node:os";
|
|
647
648
|
function supportsColor() {
|
|
648
649
|
if (process.env.NO_COLOR) return false;
|
|
649
650
|
if (process.platform === "win32") {
|
|
@@ -6431,7 +6432,16 @@ var init_constants = __esm({
|
|
|
6431
6432
|
},
|
|
6432
6433
|
i18n: {
|
|
6433
6434
|
eager: ["src/locales/*_*.json"],
|
|
6434
|
-
lazy: [
|
|
6435
|
+
lazy: [
|
|
6436
|
+
"src/**/locales/*_*.json",
|
|
6437
|
+
"!src/locales/*_*.json",
|
|
6438
|
+
// Auto-detect shared entity translations in monorepos (if exists, use it; if not, no problem)
|
|
6439
|
+
"../../entities/locales/*_*.json"
|
|
6440
|
+
],
|
|
6441
|
+
// Additional paths from workspace packages (e.g., shared entities)
|
|
6442
|
+
// Consumers can still configure via i18n.additionalPaths in dndev/vite config for custom paths
|
|
6443
|
+
// Example: ['../../packages/shared/locales/*_*.json']
|
|
6444
|
+
additional: [],
|
|
6435
6445
|
framework: {
|
|
6436
6446
|
eager: [`${I18N_PATHS.SOURCE_EAGER}/*_*.json`],
|
|
6437
6447
|
lazy: [`${I18N_PATHS.SOURCE_LAZY}/*_*.json`]
|
|
@@ -6524,6 +6534,7 @@ var init_constants = __esm({
|
|
|
6524
6534
|
|
|
6525
6535
|
// packages/core/config/utils/PathResolver.ts
|
|
6526
6536
|
import * as fs from "node:fs";
|
|
6537
|
+
import "node:fs";
|
|
6527
6538
|
import { createRequire } from "node:module";
|
|
6528
6539
|
import {
|
|
6529
6540
|
resolve,
|
|
@@ -7636,6 +7647,7 @@ var init_errors = __esm({
|
|
|
7636
7647
|
});
|
|
7637
7648
|
|
|
7638
7649
|
// packages/tooling/src/utils/pathResolver.ts
|
|
7650
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
7639
7651
|
import {
|
|
7640
7652
|
join as join2,
|
|
7641
7653
|
dirname as dirname2,
|
|
@@ -7645,6 +7657,7 @@ import {
|
|
|
7645
7657
|
resolve as resolve2,
|
|
7646
7658
|
isAbsolute as pathIsAbsolute
|
|
7647
7659
|
} from "node:path";
|
|
7660
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
7648
7661
|
function readdirSync2(dirPath, options) {
|
|
7649
7662
|
return pathResolverInstance.readdirSync(dirPath, options);
|
|
7650
7663
|
}
|
|
@@ -7678,16 +7691,17 @@ var init_pathResolver = __esm({
|
|
|
7678
7691
|
|
|
7679
7692
|
// packages/tooling/src/bundler/utils.ts
|
|
7680
7693
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
7681
|
-
import {
|
|
7694
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7695
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
7682
7696
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
7683
7697
|
import process from "node:process";
|
|
7684
|
-
import { fileURLToPath as
|
|
7698
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
7685
7699
|
var require2, __filename, __dirname;
|
|
7686
7700
|
var init_utils = __esm({
|
|
7687
7701
|
"packages/tooling/src/bundler/utils.ts"() {
|
|
7688
7702
|
"use strict";
|
|
7689
|
-
require2 =
|
|
7690
|
-
__filename =
|
|
7703
|
+
require2 = createRequire3(import.meta.url);
|
|
7704
|
+
__filename = fileURLToPath3(import.meta.url);
|
|
7691
7705
|
__dirname = dirname3(__filename);
|
|
7692
7706
|
if (typeof globalThis !== "undefined") {
|
|
7693
7707
|
globalThis.require = require2;
|
package/dist/bin/dndev.js
CHANGED
|
@@ -46,13 +46,12 @@ Usage: dndev <command>[:<app>] [options]
|
|
|
46
46
|
|
|
47
47
|
Commands:
|
|
48
48
|
init, create-project Create a new DoNotDev project
|
|
49
|
-
create-app [name] Add app
|
|
49
|
+
create-app [name] Add app (--builder vite|next, --functions, --project <id>)
|
|
50
50
|
dev [app] Start development server
|
|
51
51
|
build [app] Build for production
|
|
52
52
|
preview [app] Preview production build
|
|
53
53
|
emu [app] Start dev with Firebase emulators
|
|
54
54
|
format Format code with Prettier
|
|
55
|
-
lint Lint code with ESLint
|
|
56
55
|
deploy [app] Deploy to Firebase
|
|
57
56
|
sync-secrets Sync env vars to Firebase/Vercel
|
|
58
57
|
cacheout [app] Clear build caches
|
|
@@ -67,7 +66,8 @@ Examples:
|
|
|
67
66
|
dndev init my-project Create a new project
|
|
68
67
|
dndev create-app Interactive app creation
|
|
69
68
|
dndev create-app my-app Create 'my-app' with defaults (vite, no functions)
|
|
70
|
-
dndev create-app my-app --builder next --functions
|
|
69
|
+
dndev create-app my-app --builder next --functions Next.js + functions
|
|
70
|
+
dndev create-app my-app --functions --project my-fb-id Set Firebase project (2-min setup)
|
|
71
71
|
dndev dev Start dev server
|
|
72
72
|
dndev dev:web Start dev server for 'web' app
|
|
73
73
|
dndev wai Output WAI-WAY activation prompt
|
|
@@ -91,14 +91,16 @@ program.command("init [name]").alias("create-project").description("Create a new
|
|
|
91
91
|
const { main } = await import("./commands/create-project.js");
|
|
92
92
|
await main({ projectName: name });
|
|
93
93
|
});
|
|
94
|
-
program.command("create-app [name]").description("Add a new app to existing project").option("--name <name>", "App name (non-interactive)").option("--builder <builder>", "Framework: vite or next (default: vite)").option("--functions", "Include Firebase functions").action(async (name, options) => {
|
|
94
|
+
program.command("create-app [name]").description("Add a new app to existing project").option("--name <name>", "App name (non-interactive)").option("--builder <builder>", "Framework: vite or next (default: vite)").option("--functions", "Include Firebase functions").option("--project <id>", "Firebase project ID (default: app name)").option("--region <region>", "Firebase region (default: europe-west1)").action(async (name, options) => {
|
|
95
95
|
const { main } = await import("./commands/create-app.js");
|
|
96
96
|
const appName = name || options.name;
|
|
97
97
|
if (appName) {
|
|
98
98
|
await main({
|
|
99
99
|
name: appName,
|
|
100
100
|
builder: options.builder,
|
|
101
|
-
functions: options.functions
|
|
101
|
+
functions: options.functions,
|
|
102
|
+
firebaseProjectId: options.project,
|
|
103
|
+
firebaseRegion: options.region
|
|
102
104
|
});
|
|
103
105
|
} else {
|
|
104
106
|
await main();
|
|
@@ -119,21 +121,6 @@ formatCmd.action(async (commanderOptions) => {
|
|
|
119
121
|
throw error;
|
|
120
122
|
}
|
|
121
123
|
});
|
|
122
|
-
var lintCmd = program.command("lint").description("Lint code with ESLint").option("-f, --fix", "automatically fix issues");
|
|
123
|
-
addCommonOptions(lintCmd);
|
|
124
|
-
lintCmd.action(async (commanderOptions) => {
|
|
125
|
-
const commonOptions = extractCommonOptions(commanderOptions);
|
|
126
|
-
const options = { ...commonOptions, ...commanderOptions };
|
|
127
|
-
try {
|
|
128
|
-
const { main } = await import("./commands/lint.js");
|
|
129
|
-
await main(options);
|
|
130
|
-
} catch (error) {
|
|
131
|
-
if (error.code === "invalid-argument" || error.name === "DoNotDevError") {
|
|
132
|
-
process.exit(error.context?.exitCode || 1);
|
|
133
|
-
}
|
|
134
|
-
throw error;
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
124
|
var cacheoutCmd = program.command("cacheout [app]").alias("co").description("Clear build caches").option("--app <app>", "App name to clear cache for");
|
|
138
125
|
addCommonOptions(cacheoutCmd);
|
|
139
126
|
cacheoutCmd.action(async (app, commanderOptions) => {
|