@donotdev/cli 0.0.7 → 0.0.8
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 +45 -120
- 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 +30 -1
- package/dist/bin/commands/create-project.js +30 -1
- package/dist/bin/commands/deploy.js +19 -5
- 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 +0 -16
- package/dist/bin/donotdev.js +0 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -70
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/root-consumer/entities/demo.ts.example +14 -0
- package/templates/root-consumer/eslint.config.js.example +2 -80
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +75 -9
- package/templates/root-consumer/guides/dndev/SETUP_I18N.md.example +46 -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
|
}
|
|
@@ -7377,16 +7393,17 @@ var init_pathResolver = __esm({
|
|
|
7377
7393
|
|
|
7378
7394
|
// packages/tooling/src/bundler/utils.ts
|
|
7379
7395
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
7380
|
-
import {
|
|
7396
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7397
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
7381
7398
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
7382
7399
|
import process from "node:process";
|
|
7383
|
-
import { fileURLToPath as
|
|
7400
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
7384
7401
|
var require2, __filename, __dirname;
|
|
7385
7402
|
var init_utils = __esm({
|
|
7386
7403
|
"packages/tooling/src/bundler/utils.ts"() {
|
|
7387
7404
|
"use strict";
|
|
7388
|
-
require2 =
|
|
7389
|
-
__filename =
|
|
7405
|
+
require2 = createRequire3(import.meta.url);
|
|
7406
|
+
__filename = fileURLToPath3(import.meta.url);
|
|
7390
7407
|
__dirname = dirname3(__filename);
|
|
7391
7408
|
if (typeof globalThis !== "undefined") {
|
|
7392
7409
|
globalThis.require = require2;
|
|
@@ -822,6 +822,7 @@ __export(cli_output_exports, {
|
|
|
822
822
|
success: () => success,
|
|
823
823
|
warn: () => warn
|
|
824
824
|
});
|
|
825
|
+
import "node:os";
|
|
825
826
|
function supportsColor() {
|
|
826
827
|
if (process.env.NO_COLOR) return false;
|
|
827
828
|
if (process.platform === "win32") {
|
|
@@ -6655,7 +6656,16 @@ var init_constants = __esm({
|
|
|
6655
6656
|
},
|
|
6656
6657
|
i18n: {
|
|
6657
6658
|
eager: ["src/locales/*_*.json"],
|
|
6658
|
-
lazy: [
|
|
6659
|
+
lazy: [
|
|
6660
|
+
"src/**/locales/*_*.json",
|
|
6661
|
+
"!src/locales/*_*.json",
|
|
6662
|
+
// Auto-detect shared entity translations in monorepos (if exists, use it; if not, no problem)
|
|
6663
|
+
"../../entities/locales/*_*.json"
|
|
6664
|
+
],
|
|
6665
|
+
// Additional paths from workspace packages (e.g., shared entities)
|
|
6666
|
+
// Consumers can still configure via i18n.additionalPaths in dndev/vite config for custom paths
|
|
6667
|
+
// Example: ['../../packages/shared/locales/*_*.json']
|
|
6668
|
+
additional: [],
|
|
6659
6669
|
framework: {
|
|
6660
6670
|
eager: [`${I18N_PATHS.SOURCE_EAGER}/*_*.json`],
|
|
6661
6671
|
lazy: [`${I18N_PATHS.SOURCE_LAZY}/*_*.json`]
|
|
@@ -6748,6 +6758,7 @@ var init_constants = __esm({
|
|
|
6748
6758
|
|
|
6749
6759
|
// packages/core/config/utils/PathResolver.ts
|
|
6750
6760
|
import * as fs from "node:fs";
|
|
6761
|
+
import "node:fs";
|
|
6751
6762
|
import { createRequire } from "node:module";
|
|
6752
6763
|
import {
|
|
6753
6764
|
resolve,
|
|
@@ -8215,6 +8226,7 @@ var init_pathResolver = __esm({
|
|
|
8215
8226
|
|
|
8216
8227
|
// packages/tooling/src/bundler/utils.ts
|
|
8217
8228
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
8229
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
8218
8230
|
import { createRequire as createRequire3 } from "node:module";
|
|
8219
8231
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
8220
8232
|
import process from "node:process";
|
|
@@ -8763,6 +8775,23 @@ function generatePackageJson(templateName, mode, options = {}) {
|
|
|
8763
8775
|
}
|
|
8764
8776
|
}
|
|
8765
8777
|
}
|
|
8778
|
+
if (mode === "published") {
|
|
8779
|
+
const overrides = {};
|
|
8780
|
+
for (const [groupName, group] of Object.entries(matrix.groups || {})) {
|
|
8781
|
+
if (groupName.startsWith("@donotdev/")) {
|
|
8782
|
+
const version = group.packages?.[groupName];
|
|
8783
|
+
if (version) {
|
|
8784
|
+
overrides[groupName] = version.replace(/^\^/, "");
|
|
8785
|
+
}
|
|
8786
|
+
}
|
|
8787
|
+
}
|
|
8788
|
+
if (matrix.overrides) {
|
|
8789
|
+
Object.assign(overrides, matrix.overrides);
|
|
8790
|
+
}
|
|
8791
|
+
if (Object.keys(overrides).length > 0) {
|
|
8792
|
+
result.overrides = overrides;
|
|
8793
|
+
}
|
|
8794
|
+
}
|
|
8766
8795
|
return result;
|
|
8767
8796
|
}
|
|
8768
8797
|
|
|
@@ -822,6 +822,7 @@ __export(cli_output_exports, {
|
|
|
822
822
|
success: () => success,
|
|
823
823
|
warn: () => warn
|
|
824
824
|
});
|
|
825
|
+
import "node:os";
|
|
825
826
|
function supportsColor() {
|
|
826
827
|
if (process.env.NO_COLOR) return false;
|
|
827
828
|
if (process.platform === "win32") {
|
|
@@ -6655,7 +6656,16 @@ var init_constants = __esm({
|
|
|
6655
6656
|
},
|
|
6656
6657
|
i18n: {
|
|
6657
6658
|
eager: ["src/locales/*_*.json"],
|
|
6658
|
-
lazy: [
|
|
6659
|
+
lazy: [
|
|
6660
|
+
"src/**/locales/*_*.json",
|
|
6661
|
+
"!src/locales/*_*.json",
|
|
6662
|
+
// Auto-detect shared entity translations in monorepos (if exists, use it; if not, no problem)
|
|
6663
|
+
"../../entities/locales/*_*.json"
|
|
6664
|
+
],
|
|
6665
|
+
// Additional paths from workspace packages (e.g., shared entities)
|
|
6666
|
+
// Consumers can still configure via i18n.additionalPaths in dndev/vite config for custom paths
|
|
6667
|
+
// Example: ['../../packages/shared/locales/*_*.json']
|
|
6668
|
+
additional: [],
|
|
6659
6669
|
framework: {
|
|
6660
6670
|
eager: [`${I18N_PATHS.SOURCE_EAGER}/*_*.json`],
|
|
6661
6671
|
lazy: [`${I18N_PATHS.SOURCE_LAZY}/*_*.json`]
|
|
@@ -6748,6 +6758,7 @@ var init_constants = __esm({
|
|
|
6748
6758
|
|
|
6749
6759
|
// packages/core/config/utils/PathResolver.ts
|
|
6750
6760
|
import * as fs from "node:fs";
|
|
6761
|
+
import "node:fs";
|
|
6751
6762
|
import { createRequire } from "node:module";
|
|
6752
6763
|
import {
|
|
6753
6764
|
resolve,
|
|
@@ -8215,6 +8226,7 @@ var init_pathResolver = __esm({
|
|
|
8215
8226
|
|
|
8216
8227
|
// packages/tooling/src/bundler/utils.ts
|
|
8217
8228
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
8229
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
8218
8230
|
import { createRequire as createRequire3 } from "node:module";
|
|
8219
8231
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
8220
8232
|
import process from "node:process";
|
|
@@ -8904,6 +8916,23 @@ function generatePackageJson(templateName, mode, options = {}) {
|
|
|
8904
8916
|
}
|
|
8905
8917
|
}
|
|
8906
8918
|
}
|
|
8919
|
+
if (mode === "published") {
|
|
8920
|
+
const overrides = {};
|
|
8921
|
+
for (const [groupName, group] of Object.entries(matrix.groups || {})) {
|
|
8922
|
+
if (groupName.startsWith("@donotdev/")) {
|
|
8923
|
+
const version = group.packages?.[groupName];
|
|
8924
|
+
if (version) {
|
|
8925
|
+
overrides[groupName] = version.replace(/^\^/, "");
|
|
8926
|
+
}
|
|
8927
|
+
}
|
|
8928
|
+
}
|
|
8929
|
+
if (matrix.overrides) {
|
|
8930
|
+
Object.assign(overrides, matrix.overrides);
|
|
8931
|
+
}
|
|
8932
|
+
if (Object.keys(overrides).length > 0) {
|
|
8933
|
+
result.overrides = overrides;
|
|
8934
|
+
}
|
|
8935
|
+
}
|
|
8907
8936
|
return result;
|
|
8908
8937
|
}
|
|
8909
8938
|
|
|
@@ -797,6 +797,7 @@ ${import_picocolors2.default.gray(d2)} ${t}
|
|
|
797
797
|
});
|
|
798
798
|
|
|
799
799
|
// packages/tooling/src/utils/cli-output.ts
|
|
800
|
+
import "node:os";
|
|
800
801
|
function supportsColor() {
|
|
801
802
|
if (process.env.NO_COLOR) return false;
|
|
802
803
|
if (process.platform === "win32") {
|
|
@@ -6584,7 +6585,16 @@ var init_constants = __esm({
|
|
|
6584
6585
|
},
|
|
6585
6586
|
i18n: {
|
|
6586
6587
|
eager: ["src/locales/*_*.json"],
|
|
6587
|
-
lazy: [
|
|
6588
|
+
lazy: [
|
|
6589
|
+
"src/**/locales/*_*.json",
|
|
6590
|
+
"!src/locales/*_*.json",
|
|
6591
|
+
// Auto-detect shared entity translations in monorepos (if exists, use it; if not, no problem)
|
|
6592
|
+
"../../entities/locales/*_*.json"
|
|
6593
|
+
],
|
|
6594
|
+
// Additional paths from workspace packages (e.g., shared entities)
|
|
6595
|
+
// Consumers can still configure via i18n.additionalPaths in dndev/vite config for custom paths
|
|
6596
|
+
// Example: ['../../packages/shared/locales/*_*.json']
|
|
6597
|
+
additional: [],
|
|
6588
6598
|
framework: {
|
|
6589
6599
|
eager: [`${I18N_PATHS.SOURCE_EAGER}/*_*.json`],
|
|
6590
6600
|
lazy: [`${I18N_PATHS.SOURCE_LAZY}/*_*.json`]
|
|
@@ -6677,6 +6687,7 @@ var init_constants = __esm({
|
|
|
6677
6687
|
|
|
6678
6688
|
// packages/core/config/utils/PathResolver.ts
|
|
6679
6689
|
import * as fs from "node:fs";
|
|
6690
|
+
import "node:fs";
|
|
6680
6691
|
import { createRequire } from "node:module";
|
|
6681
6692
|
import {
|
|
6682
6693
|
resolve,
|
|
@@ -7789,6 +7800,7 @@ var init_errors = __esm({
|
|
|
7789
7800
|
});
|
|
7790
7801
|
|
|
7791
7802
|
// packages/tooling/src/utils/pathResolver.ts
|
|
7803
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
7792
7804
|
import {
|
|
7793
7805
|
join as join2,
|
|
7794
7806
|
dirname as dirname2,
|
|
@@ -7798,6 +7810,7 @@ import {
|
|
|
7798
7810
|
resolve as resolve2,
|
|
7799
7811
|
isAbsolute as pathIsAbsolute
|
|
7800
7812
|
} from "node:path";
|
|
7813
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
7801
7814
|
function readdirSync2(dirPath, options) {
|
|
7802
7815
|
return pathResolverInstance.readdirSync(dirPath, options);
|
|
7803
7816
|
}
|
|
@@ -7826,16 +7839,17 @@ var init_pathResolver = __esm({
|
|
|
7826
7839
|
|
|
7827
7840
|
// packages/tooling/src/bundler/utils.ts
|
|
7828
7841
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
7829
|
-
import {
|
|
7842
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7843
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
7830
7844
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
7831
7845
|
import process from "node:process";
|
|
7832
|
-
import { fileURLToPath as
|
|
7846
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
7833
7847
|
var require2, __filename, __dirname;
|
|
7834
7848
|
var init_utils = __esm({
|
|
7835
7849
|
"packages/tooling/src/bundler/utils.ts"() {
|
|
7836
7850
|
"use strict";
|
|
7837
|
-
require2 =
|
|
7838
|
-
__filename =
|
|
7851
|
+
require2 = createRequire3(import.meta.url);
|
|
7852
|
+
__filename = fileURLToPath3(import.meta.url);
|
|
7839
7853
|
__dirname = dirname3(__filename);
|
|
7840
7854
|
if (typeof globalThis !== "undefined") {
|
|
7841
7855
|
globalThis.require = require2;
|
package/dist/bin/commands/dev.js
CHANGED
|
@@ -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,13 +7821,14 @@ async function selectApp(projectRoot, appName) {
|
|
|
7806
7821
|
|
|
7807
7822
|
// packages/tooling/src/apps/dev.ts
|
|
7808
7823
|
init_utils();
|
|
7809
|
-
import { spawnSync } from "node:child_process";
|
|
7824
|
+
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
7810
7825
|
init_cli_output();
|
|
7811
7826
|
init_errors();
|
|
7812
7827
|
init_pathResolver();
|
|
7813
7828
|
|
|
7814
7829
|
// packages/tooling/src/utils/spawn-utils.ts
|
|
7815
7830
|
init_utils();
|
|
7831
|
+
import { spawnSync, execSync } from "node:child_process";
|
|
7816
7832
|
function createAppEnv(appPath) {
|
|
7817
7833
|
return {
|
|
7818
7834
|
...process.env,
|
|
@@ -7838,7 +7854,7 @@ async function main() {
|
|
|
7838
7854
|
log.info(`Starting dev server for ${app.name}...
|
|
7839
7855
|
`);
|
|
7840
7856
|
const turboArgs = ["dev", "--filter", app.packageName];
|
|
7841
|
-
const result =
|
|
7857
|
+
const result = spawnSync2("bunx", ["turbo", ...turboArgs], {
|
|
7842
7858
|
stdio: "inherit",
|
|
7843
7859
|
env: createAppEnv(app.path),
|
|
7844
7860
|
cwd: projectRoot
|
package/dist/bin/commands/emu.js
CHANGED
|
@@ -540,6 +540,7 @@ var init_dist = __esm({
|
|
|
540
540
|
});
|
|
541
541
|
|
|
542
542
|
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/dist/index.mjs
|
|
543
|
+
import { stripVTControlCharacters as S2 } from "node:util";
|
|
543
544
|
import y2 from "node:process";
|
|
544
545
|
function ce() {
|
|
545
546
|
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";
|
|
@@ -703,6 +704,7 @@ ${import_picocolors.default.cyan(d2)}
|
|
|
703
704
|
});
|
|
704
705
|
|
|
705
706
|
// packages/tooling/src/utils/cli-output.ts
|
|
707
|
+
import "node:os";
|
|
706
708
|
function supportsColor() {
|
|
707
709
|
if (process.env.NO_COLOR) return false;
|
|
708
710
|
if (process.platform === "win32") {
|
|
@@ -6490,7 +6492,16 @@ var init_constants = __esm({
|
|
|
6490
6492
|
},
|
|
6491
6493
|
i18n: {
|
|
6492
6494
|
eager: ["src/locales/*_*.json"],
|
|
6493
|
-
lazy: [
|
|
6495
|
+
lazy: [
|
|
6496
|
+
"src/**/locales/*_*.json",
|
|
6497
|
+
"!src/locales/*_*.json",
|
|
6498
|
+
// Auto-detect shared entity translations in monorepos (if exists, use it; if not, no problem)
|
|
6499
|
+
"../../entities/locales/*_*.json"
|
|
6500
|
+
],
|
|
6501
|
+
// Additional paths from workspace packages (e.g., shared entities)
|
|
6502
|
+
// Consumers can still configure via i18n.additionalPaths in dndev/vite config for custom paths
|
|
6503
|
+
// Example: ['../../packages/shared/locales/*_*.json']
|
|
6504
|
+
additional: [],
|
|
6494
6505
|
framework: {
|
|
6495
6506
|
eager: [`${I18N_PATHS.SOURCE_EAGER}/*_*.json`],
|
|
6496
6507
|
lazy: [`${I18N_PATHS.SOURCE_LAZY}/*_*.json`]
|
|
@@ -6583,6 +6594,7 @@ var init_constants = __esm({
|
|
|
6583
6594
|
|
|
6584
6595
|
// packages/core/config/utils/PathResolver.ts
|
|
6585
6596
|
import * as fs from "node:fs";
|
|
6597
|
+
import "node:fs";
|
|
6586
6598
|
import { createRequire } from "node:module";
|
|
6587
6599
|
import {
|
|
6588
6600
|
resolve,
|
|
@@ -7695,6 +7707,7 @@ var init_errors = __esm({
|
|
|
7695
7707
|
});
|
|
7696
7708
|
|
|
7697
7709
|
// packages/tooling/src/utils/pathResolver.ts
|
|
7710
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
7698
7711
|
import {
|
|
7699
7712
|
join as join2,
|
|
7700
7713
|
dirname as dirname2,
|
|
@@ -7704,6 +7717,7 @@ import {
|
|
|
7704
7717
|
resolve as resolve2,
|
|
7705
7718
|
isAbsolute as pathIsAbsolute
|
|
7706
7719
|
} from "node:path";
|
|
7720
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
7707
7721
|
function readdirSync2(dirPath, options) {
|
|
7708
7722
|
return pathResolverInstance.readdirSync(dirPath, options);
|
|
7709
7723
|
}
|
|
@@ -7730,16 +7744,17 @@ var init_pathResolver = __esm({
|
|
|
7730
7744
|
|
|
7731
7745
|
// packages/tooling/src/bundler/utils.ts
|
|
7732
7746
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
7733
|
-
import {
|
|
7747
|
+
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7748
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
7734
7749
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
7735
7750
|
import process from "node:process";
|
|
7736
|
-
import { fileURLToPath as
|
|
7751
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
7737
7752
|
var require2, __filename, __dirname;
|
|
7738
7753
|
var init_utils = __esm({
|
|
7739
7754
|
"packages/tooling/src/bundler/utils.ts"() {
|
|
7740
7755
|
"use strict";
|
|
7741
|
-
require2 =
|
|
7742
|
-
__filename =
|
|
7756
|
+
require2 = createRequire3(import.meta.url);
|
|
7757
|
+
__filename = fileURLToPath3(import.meta.url);
|
|
7743
7758
|
__dirname = dirname3(__filename);
|
|
7744
7759
|
if (typeof globalThis !== "undefined") {
|
|
7745
7760
|
globalThis.require = require2;
|
|
@@ -7912,6 +7927,7 @@ async function askForMultiSelection(message, choices, defaultIndices = []) {
|
|
|
7912
7927
|
|
|
7913
7928
|
// packages/tooling/src/utils/spawn-utils.ts
|
|
7914
7929
|
init_utils();
|
|
7930
|
+
import { spawnSync, execSync } from "node:child_process";
|
|
7915
7931
|
function createAppEnv(appPath) {
|
|
7916
7932
|
return {
|
|
7917
7933
|
...process.env,
|
|
@@ -7953,7 +7969,7 @@ function createEmulatorEnv(appPath, framework = "vite", options) {
|
|
|
7953
7969
|
|
|
7954
7970
|
// packages/tooling/src/apps/emu.ts
|
|
7955
7971
|
init_utils();
|
|
7956
|
-
import { spawnSync, execSync } from "node:child_process";
|
|
7972
|
+
import { spawnSync as spawnSync2, execSync as execSync2 } from "node:child_process";
|
|
7957
7973
|
init_cli_output();
|
|
7958
7974
|
init_errors();
|
|
7959
7975
|
init_pathResolver();
|
|
@@ -7977,7 +7993,7 @@ function killPorts(ports) {
|
|
|
7977
7993
|
for (const port of ports) {
|
|
7978
7994
|
try {
|
|
7979
7995
|
if (isWindows) {
|
|
7980
|
-
const findPort =
|
|
7996
|
+
const findPort = execSync2(`netstat -ano | findstr :${port}`, {
|
|
7981
7997
|
encoding: "utf-8"
|
|
7982
7998
|
});
|
|
7983
7999
|
const lines = findPort.trim().split("\n");
|
|
@@ -7990,18 +8006,18 @@ function killPorts(ports) {
|
|
|
7990
8006
|
}
|
|
7991
8007
|
for (const pid of pids) {
|
|
7992
8008
|
try {
|
|
7993
|
-
|
|
8009
|
+
execSync2(`taskkill /F /PID ${pid}`, { stdio: "ignore" });
|
|
7994
8010
|
log.debug(`Killed process ${pid} on port ${port}`);
|
|
7995
8011
|
} catch {
|
|
7996
8012
|
}
|
|
7997
8013
|
}
|
|
7998
8014
|
} else {
|
|
7999
8015
|
try {
|
|
8000
|
-
const pid =
|
|
8016
|
+
const pid = execSync2(`lsof -ti:${port}`, {
|
|
8001
8017
|
encoding: "utf-8"
|
|
8002
8018
|
}).trim();
|
|
8003
8019
|
if (pid) {
|
|
8004
|
-
|
|
8020
|
+
execSync2(`kill -9 ${pid}`, { stdio: "ignore" });
|
|
8005
8021
|
log.debug(`Killed process ${pid} on port ${port}`);
|
|
8006
8022
|
}
|
|
8007
8023
|
} catch {
|
|
@@ -8167,7 +8183,7 @@ FIREBASE_AUTH_EMULATOR_HOST=${authEmulatorHost}
|
|
|
8167
8183
|
}
|
|
8168
8184
|
}
|
|
8169
8185
|
log.info("Building functions...");
|
|
8170
|
-
const buildResult =
|
|
8186
|
+
const buildResult = spawnSync2("bun", ["run", "build"], {
|
|
8171
8187
|
cwd: functionsDir,
|
|
8172
8188
|
stdio: "pipe",
|
|
8173
8189
|
env: createEmulatorEnv(app.path, app.framework, {
|
|
@@ -8245,7 +8261,7 @@ FIREBASE_AUTH_EMULATOR_HOST=${authEmulatorHost}
|
|
|
8245
8261
|
log.info(" stripe trigger checkout.session.completed");
|
|
8246
8262
|
log.info("");
|
|
8247
8263
|
}
|
|
8248
|
-
const result =
|
|
8264
|
+
const result = spawnSync2("bunx", ["concurrently", ...concurrentlyArgs], {
|
|
8249
8265
|
stdio: "inherit",
|
|
8250
8266
|
env: createEmulatorEnv(app.path, app.framework, {
|
|
8251
8267
|
useEmulatorAuth: useAuth,
|