@donotdev/cli 0.0.21 → 0.0.23
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 +24 -29
- package/dist/bin/commands/create-project.js +3 -12
- package/dist/bin/dndev.js +5 -1
- package/dist/bin/donotdev.js +61 -1
- package/dist/index.js +3 -12
- package/package.json +1 -1
- package/templates/app-dndev/src/components/TerminalPanel.css.example +24 -0
- package/templates/app-dndev/src/components/TerminalPanel.tsx.example +24 -1
- package/templates/app-dndev/terminal-sidecar.cjs.example +27 -13
package/dependencies-matrix.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@donotdev/auth": {
|
|
18
18
|
"description": "Authentication package",
|
|
19
19
|
"packages": {
|
|
20
|
-
"@donotdev/auth": "^0.0.
|
|
20
|
+
"@donotdev/auth": "^0.0.15"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"@donotdev/billing": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@donotdev/firebase": {
|
|
48
48
|
"description": "Firebase provider package",
|
|
49
49
|
"packages": {
|
|
50
|
-
"@donotdev/firebase": "^0.0.
|
|
50
|
+
"@donotdev/firebase": "^0.0.17"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"@donotdev/functions": {
|
|
@@ -325,22 +325,6 @@
|
|
|
325
325
|
"vite": "^7.3.1"
|
|
326
326
|
}
|
|
327
327
|
},
|
|
328
|
-
"vite-deps": {
|
|
329
|
-
"packages": {
|
|
330
|
-
"@vitejs/plugin-react": "^5.1.4",
|
|
331
|
-
"react-refresh": "^0.18.0",
|
|
332
|
-
"@vitejs/plugin-basic-ssl": "^2.1.4",
|
|
333
|
-
"vite-tsconfig-paths": "^6.1.1",
|
|
334
|
-
"@rollup/plugin-strip": "^3.0.4",
|
|
335
|
-
"rollup-plugin-visualizer": "^6.0.5",
|
|
336
|
-
"vite-plugin-pwa": "1.2.0"
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
"vite-deps-minimal": {
|
|
340
|
-
"packages": {
|
|
341
|
-
"vite-tsconfig-paths": "^6.1.1"
|
|
342
|
-
}
|
|
343
|
-
},
|
|
344
328
|
"next": {
|
|
345
329
|
"packages": {
|
|
346
330
|
"next": "^16.1.6"
|
|
@@ -393,6 +377,7 @@
|
|
|
393
377
|
"core-vite-config": {
|
|
394
378
|
"description": "Vite config deps bundled into @donotdev/core/vite (externalized by esbuild, must be in dependencies for publish)",
|
|
395
379
|
"packages": {
|
|
380
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
396
381
|
"@rollup/plugin-strip": "^3.0.4",
|
|
397
382
|
"@vitejs/plugin-basic-ssl": "^2.1.4",
|
|
398
383
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
@@ -433,7 +418,7 @@
|
|
|
433
418
|
"@donotdev/cli": {
|
|
434
419
|
"description": "Cli package",
|
|
435
420
|
"packages": {
|
|
436
|
-
"@donotdev/cli": "^0.0.
|
|
421
|
+
"@donotdev/cli": "^0.0.23"
|
|
437
422
|
}
|
|
438
423
|
},
|
|
439
424
|
"@donotdev/mcp-server": {
|
|
@@ -768,7 +753,7 @@
|
|
|
768
753
|
"vite",
|
|
769
754
|
"typescript",
|
|
770
755
|
"types",
|
|
771
|
-
"vite-
|
|
756
|
+
"core-vite-config"
|
|
772
757
|
]
|
|
773
758
|
},
|
|
774
759
|
"@donotdev/expo": {
|
|
@@ -819,7 +804,9 @@
|
|
|
819
804
|
"zustand",
|
|
820
805
|
"validation",
|
|
821
806
|
"lucide-react",
|
|
822
|
-
"routing"
|
|
807
|
+
"routing",
|
|
808
|
+
"shiki",
|
|
809
|
+
"tiptap"
|
|
823
810
|
],
|
|
824
811
|
"devDependencies": [
|
|
825
812
|
"vite",
|
|
@@ -827,7 +814,7 @@
|
|
|
827
814
|
"types",
|
|
828
815
|
"i18n",
|
|
829
816
|
"react-query",
|
|
830
|
-
"vite-
|
|
817
|
+
"core-vite-config",
|
|
831
818
|
"postcss"
|
|
832
819
|
],
|
|
833
820
|
"conditional": {
|
|
@@ -849,7 +836,9 @@
|
|
|
849
836
|
"react",
|
|
850
837
|
"zustand",
|
|
851
838
|
"validation",
|
|
852
|
-
"lucide-react"
|
|
839
|
+
"lucide-react",
|
|
840
|
+
"shiki",
|
|
841
|
+
"tiptap"
|
|
853
842
|
],
|
|
854
843
|
"devDependencies": [
|
|
855
844
|
"next",
|
|
@@ -907,13 +896,15 @@
|
|
|
907
896
|
"lucide-react",
|
|
908
897
|
"routing",
|
|
909
898
|
"i18n",
|
|
910
|
-
"react-query"
|
|
899
|
+
"react-query",
|
|
900
|
+
"shiki",
|
|
901
|
+
"tiptap"
|
|
911
902
|
],
|
|
912
903
|
"devDependencies": [
|
|
913
904
|
"vite",
|
|
914
905
|
"typescript",
|
|
915
906
|
"types",
|
|
916
|
-
"vite-
|
|
907
|
+
"core-vite-config",
|
|
917
908
|
"postcss"
|
|
918
909
|
],
|
|
919
910
|
"conditional": {
|
|
@@ -937,7 +928,9 @@
|
|
|
937
928
|
"validation",
|
|
938
929
|
"lucide-react",
|
|
939
930
|
"i18n",
|
|
940
|
-
"react-query"
|
|
931
|
+
"react-query",
|
|
932
|
+
"shiki",
|
|
933
|
+
"tiptap"
|
|
941
934
|
],
|
|
942
935
|
"devDependencies": [
|
|
943
936
|
"next",
|
|
@@ -1051,14 +1044,16 @@
|
|
|
1051
1044
|
"routing",
|
|
1052
1045
|
"i18n",
|
|
1053
1046
|
"react-query",
|
|
1054
|
-
"styling"
|
|
1047
|
+
"styling",
|
|
1048
|
+
"shiki",
|
|
1049
|
+
"tiptap"
|
|
1055
1050
|
],
|
|
1056
1051
|
"devDependencies": [
|
|
1057
1052
|
"postcss",
|
|
1058
1053
|
"vite",
|
|
1059
1054
|
"typescript",
|
|
1060
1055
|
"types",
|
|
1061
|
-
"vite-
|
|
1056
|
+
"core-vite-config"
|
|
1062
1057
|
]
|
|
1063
1058
|
},
|
|
1064
1059
|
"dndev": {
|
|
@@ -1085,7 +1080,7 @@
|
|
|
1085
1080
|
"vite",
|
|
1086
1081
|
"typescript",
|
|
1087
1082
|
"types",
|
|
1088
|
-
"vite-
|
|
1083
|
+
"core-vite-config",
|
|
1089
1084
|
"ws-types"
|
|
1090
1085
|
]
|
|
1091
1086
|
}
|
|
@@ -9743,14 +9743,8 @@ async function main(options) {
|
|
|
9743
9743
|
if (config.backend !== "none" || config.functions !== "none")
|
|
9744
9744
|
anyAppNeedsBackend = true;
|
|
9745
9745
|
}
|
|
9746
|
-
let installDemoApp =
|
|
9747
|
-
|
|
9748
|
-
false
|
|
9749
|
-
);
|
|
9750
|
-
let installCockpitApp = await askForConfirmation(
|
|
9751
|
-
"Would you like to install the cockpit app? (AI development dashboard)",
|
|
9752
|
-
false
|
|
9753
|
-
);
|
|
9746
|
+
let installDemoApp = true;
|
|
9747
|
+
let installCockpitApp = true;
|
|
9754
9748
|
let allAppNames = [...appNames];
|
|
9755
9749
|
let appsToCreate = [];
|
|
9756
9750
|
let appsToSkip = [];
|
|
@@ -9832,10 +9826,7 @@ async function main(options) {
|
|
|
9832
9826
|
};
|
|
9833
9827
|
}
|
|
9834
9828
|
}
|
|
9835
|
-
const setupGithubActions =
|
|
9836
|
-
"Set up GitHub Actions CI/CD?",
|
|
9837
|
-
true
|
|
9838
|
-
);
|
|
9829
|
+
const setupGithubActions = true;
|
|
9839
9830
|
const s = Y2();
|
|
9840
9831
|
if (!isMergeMode) {
|
|
9841
9832
|
s.start("Creating project structure...");
|
package/dist/bin/dndev.js
CHANGED
|
@@ -858,7 +858,7 @@ function registerCommand(program2, def, action) {
|
|
|
858
858
|
}
|
|
859
859
|
|
|
860
860
|
// packages/cli/src/bin/dndev.mjs
|
|
861
|
-
var CLI_VERSION = true ? "0.0.
|
|
861
|
+
var CLI_VERSION = true ? "0.0.23" : "0.0.0";
|
|
862
862
|
var args = process.argv.slice(2);
|
|
863
863
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v")) {
|
|
864
864
|
console.log(CLI_VERSION);
|
|
@@ -969,6 +969,10 @@ var ACTION_OVERRIDES = {
|
|
|
969
969
|
"agent-setup": async (options) => {
|
|
970
970
|
const { main } = await import("./commands/agent-setup.js");
|
|
971
971
|
await main(options);
|
|
972
|
+
},
|
|
973
|
+
"init": async (options, name) => {
|
|
974
|
+
const { main } = await import("./commands/create-project.js");
|
|
975
|
+
await main({ ...options, projectName: name || options.projectName });
|
|
972
976
|
}
|
|
973
977
|
};
|
|
974
978
|
for (const def of getPublicCommands()) {
|
package/dist/bin/donotdev.js
CHANGED
|
@@ -581,6 +581,54 @@ var init_command_registry = __esm({
|
|
|
581
581
|
exportName: "doctor"
|
|
582
582
|
},
|
|
583
583
|
// ---------------------------------------------------------------------------
|
|
584
|
+
// Database
|
|
585
|
+
// ---------------------------------------------------------------------------
|
|
586
|
+
{
|
|
587
|
+
name: "seed [app]",
|
|
588
|
+
description: "Generate and insert sample data into your database",
|
|
589
|
+
category: "deployment",
|
|
590
|
+
public: true,
|
|
591
|
+
appCommand: true,
|
|
592
|
+
options: [
|
|
593
|
+
{
|
|
594
|
+
flags: "-n, --count <number>",
|
|
595
|
+
description: "Rows per entity (default: 10)"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
flags: "--clean",
|
|
599
|
+
description: "Truncate tables before seeding"
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
flags: "--only <entities>",
|
|
603
|
+
description: "Comma-separated entity names to seed"
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
flags: "--seed <number>",
|
|
607
|
+
description: "Random seed for reproducible output (default: 42)"
|
|
608
|
+
}
|
|
609
|
+
],
|
|
610
|
+
loader: "../cli/seed/seed.ts",
|
|
611
|
+
exportName: "seed"
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
name: "db [script]",
|
|
615
|
+
description: "Run a custom database script with injected DbContext",
|
|
616
|
+
category: "deployment",
|
|
617
|
+
public: true,
|
|
618
|
+
options: [
|
|
619
|
+
{
|
|
620
|
+
flags: "-l, --list",
|
|
621
|
+
description: "List available scripts in .dndev/scripts/"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
flags: "-a, --app <app>",
|
|
625
|
+
description: "App name (for multi-app monorepos)"
|
|
626
|
+
}
|
|
627
|
+
],
|
|
628
|
+
loader: "../cli/db/db.ts",
|
|
629
|
+
exportName: "db"
|
|
630
|
+
},
|
|
631
|
+
// ---------------------------------------------------------------------------
|
|
584
632
|
// Content
|
|
585
633
|
// ---------------------------------------------------------------------------
|
|
586
634
|
{
|
|
@@ -648,6 +696,14 @@ var init_command_registry = __esm({
|
|
|
648
696
|
],
|
|
649
697
|
loader: "../quality/grill-review.ts"
|
|
650
698
|
},
|
|
699
|
+
{
|
|
700
|
+
name: "sync-app-templates",
|
|
701
|
+
description: "Copy live apps/demo and apps/dndev to CLI templates (with .example suffix)",
|
|
702
|
+
alias: "sat",
|
|
703
|
+
category: "internal",
|
|
704
|
+
loader: "../internal/sync-app-templates.ts",
|
|
705
|
+
exportName: "syncAppTemplates"
|
|
706
|
+
},
|
|
651
707
|
{
|
|
652
708
|
name: "generate sql",
|
|
653
709
|
description: "Generate PostgreSQL CREATE TABLE + RLS + trigger from entity definitions",
|
|
@@ -802,7 +858,7 @@ function registerCommand(program2, def, action) {
|
|
|
802
858
|
}
|
|
803
859
|
|
|
804
860
|
// packages/cli/src/bin/dndev.mjs
|
|
805
|
-
var CLI_VERSION = true ? "0.0.
|
|
861
|
+
var CLI_VERSION = true ? "0.0.23" : "0.0.0";
|
|
806
862
|
var args = process.argv.slice(2);
|
|
807
863
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v")) {
|
|
808
864
|
console.log(CLI_VERSION);
|
|
@@ -913,6 +969,10 @@ var ACTION_OVERRIDES = {
|
|
|
913
969
|
"agent-setup": async (options) => {
|
|
914
970
|
const { main } = await import("./commands/agent-setup.js");
|
|
915
971
|
await main(options);
|
|
972
|
+
},
|
|
973
|
+
"init": async (options, name) => {
|
|
974
|
+
const { main } = await import("./commands/create-project.js");
|
|
975
|
+
await main({ ...options, projectName: name || options.projectName });
|
|
916
976
|
}
|
|
917
977
|
};
|
|
918
978
|
for (const def of getPublicCommands()) {
|
package/dist/index.js
CHANGED
|
@@ -21082,14 +21082,8 @@ async function main9(options) {
|
|
|
21082
21082
|
if (config.backend !== "none" || config.functions !== "none")
|
|
21083
21083
|
anyAppNeedsBackend = true;
|
|
21084
21084
|
}
|
|
21085
|
-
let installDemoApp =
|
|
21086
|
-
|
|
21087
|
-
false
|
|
21088
|
-
);
|
|
21089
|
-
let installCockpitApp = await askForConfirmation(
|
|
21090
|
-
"Would you like to install the cockpit app? (AI development dashboard)",
|
|
21091
|
-
false
|
|
21092
|
-
);
|
|
21085
|
+
let installDemoApp = true;
|
|
21086
|
+
let installCockpitApp = true;
|
|
21093
21087
|
let allAppNames = [...appNames];
|
|
21094
21088
|
let appsToCreate = [];
|
|
21095
21089
|
let appsToSkip = [];
|
|
@@ -21171,10 +21165,7 @@ async function main9(options) {
|
|
|
21171
21165
|
};
|
|
21172
21166
|
}
|
|
21173
21167
|
}
|
|
21174
|
-
const setupGithubActions =
|
|
21175
|
-
"Set up GitHub Actions CI/CD?",
|
|
21176
|
-
true
|
|
21177
|
-
);
|
|
21168
|
+
const setupGithubActions = true;
|
|
21178
21169
|
const s = Y2();
|
|
21179
21170
|
if (!isMergeMode) {
|
|
21180
21171
|
s.start("Creating project structure...");
|
package/package.json
CHANGED
|
@@ -157,6 +157,30 @@
|
|
|
157
157
|
position: relative;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
/* Loader overlay — shown during initial ConPTY spawn delay */
|
|
161
|
+
.dndev-terminal-loader {
|
|
162
|
+
position: absolute;
|
|
163
|
+
inset: 0;
|
|
164
|
+
z-index: 1;
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
gap: 8px;
|
|
169
|
+
background: #0a0a0a;
|
|
170
|
+
color: var(--muted-foreground);
|
|
171
|
+
font-size: 13px;
|
|
172
|
+
font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.dndev-terminal-loader svg {
|
|
176
|
+
animation: dndev-terminal-pulse 1.5s ease-in-out infinite;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@keyframes dndev-terminal-pulse {
|
|
180
|
+
0%, 100% { opacity: 0.4; }
|
|
181
|
+
50% { opacity: 1; }
|
|
182
|
+
}
|
|
183
|
+
|
|
160
184
|
/* xterm container — fills content area */
|
|
161
185
|
.dndev-terminal-xterm-host {
|
|
162
186
|
position: absolute;
|
|
@@ -54,6 +54,11 @@ const WS_MAX_RECONNECT_DELAY = 8000;
|
|
|
54
54
|
/** @type {number} Base reconnect delay in ms */
|
|
55
55
|
const WS_BASE_RECONNECT_DELAY = 500;
|
|
56
56
|
|
|
57
|
+
/** Delay first PTY spawn to let Windows ConPTY settle (avoids AttachConsole race) */
|
|
58
|
+
const INITIAL_SPAWN_DELAY_MS = 1000;
|
|
59
|
+
/** Tracks which tabs have completed their initial spawn delay */
|
|
60
|
+
const spawnDelayDone = new Set<string>();
|
|
61
|
+
|
|
57
62
|
/** Client-side crash recovery: auto-reconnect tabs that exit with non-zero code */
|
|
58
63
|
const TAB_RECONNECT_MAX = 3;
|
|
59
64
|
const TAB_RECONNECT_DELAY = 800;
|
|
@@ -425,6 +430,7 @@ export function TerminalPanel({ embedded, direction = 'vertical' }: TerminalPane
|
|
|
425
430
|
const pendingTab = useDoNotDashStore((s) => s.pendingTab);
|
|
426
431
|
|
|
427
432
|
const xtermRef = useRef<HTMLDivElement>(null);
|
|
433
|
+
const [spawning, setSpawning] = useState(false);
|
|
428
434
|
|
|
429
435
|
// fullscreen: always visible (CSS overlays everything)
|
|
430
436
|
// otherwise: store-controlled expand/collapse (works in embedded too — collapses to tabbar)
|
|
@@ -481,7 +487,18 @@ export function TerminalPanel({ embedded, direction = 'vertical' }: TerminalPane
|
|
|
481
487
|
|
|
482
488
|
// Auto-connect if not already running
|
|
483
489
|
if (!getConnectedTabs().has(activeTab)) {
|
|
484
|
-
|
|
490
|
+
if (spawnDelayDone.has(activeTab)) {
|
|
491
|
+
connectTab(activeTab);
|
|
492
|
+
} else {
|
|
493
|
+
// Delay first spawn to let ConPTY settle (Windows AttachConsole race)
|
|
494
|
+
setSpawning(true);
|
|
495
|
+
const timer = setTimeout(() => {
|
|
496
|
+
spawnDelayDone.add(activeTab);
|
|
497
|
+
setSpawning(false);
|
|
498
|
+
connectTab(activeTab);
|
|
499
|
+
}, INITIAL_SPAWN_DELAY_MS);
|
|
500
|
+
return () => clearTimeout(timer);
|
|
501
|
+
}
|
|
485
502
|
}
|
|
486
503
|
|
|
487
504
|
scheduleFit(activeTab, entry);
|
|
@@ -706,6 +723,12 @@ export function TerminalPanel({ embedded, direction = 'vertical' }: TerminalPane
|
|
|
706
723
|
|
|
707
724
|
{effectiveExpanded && (
|
|
708
725
|
<div className="dndev-terminal-content">
|
|
726
|
+
{spawning && (
|
|
727
|
+
<div className="dndev-terminal-loader">
|
|
728
|
+
<Terminal size={16} />
|
|
729
|
+
<span>Starting terminal…</span>
|
|
730
|
+
</div>
|
|
731
|
+
)}
|
|
709
732
|
<div ref={xtermRef} className="dndev-terminal-xterm-host" />
|
|
710
733
|
</div>
|
|
711
734
|
)}
|
|
@@ -24,28 +24,42 @@ const pty = appRequire('node-pty');
|
|
|
24
24
|
const { WebSocketServer } = appRequire('ws');
|
|
25
25
|
|
|
26
26
|
// ============================================================================
|
|
27
|
-
// SHELL CONFIG — override via
|
|
27
|
+
// SHELL CONFIG — override via TERMINAL_SHELL env
|
|
28
28
|
// ============================================================================
|
|
29
29
|
|
|
30
|
+
/** Windows fallback chain: WSL (best dev UX) > PowerShell 7 > PowerShell 5 > cmd */
|
|
31
|
+
const WIN_SHELL_CHAIN = ['wsl.exe', 'pwsh.exe', 'powershell.exe', 'cmd.exe'];
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Check if a shell binary is available on the system.
|
|
35
|
+
* @param {string} binary
|
|
36
|
+
* @returns {boolean}
|
|
37
|
+
*/
|
|
38
|
+
function shellExists(binary) {
|
|
39
|
+
try {
|
|
40
|
+
require('child_process').execSync(
|
|
41
|
+
process.platform === 'win32' ? `where ${binary}` : `which ${binary}`,
|
|
42
|
+
{ stdio: 'ignore', timeout: 3000 }
|
|
43
|
+
);
|
|
44
|
+
return true;
|
|
45
|
+
} catch {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
30
50
|
/**
|
|
31
51
|
* Resolve the shell binary to spawn.
|
|
32
|
-
* Priority: TERMINAL_SHELL env > platform
|
|
33
|
-
*
|
|
34
|
-
* Platform defaults:
|
|
35
|
-
* Windows → wsl.exe (Linux shell inside Windows via WSL)
|
|
36
|
-
* macOS → zsh
|
|
37
|
-
* Linux → $SHELL or bash
|
|
38
|
-
* @returns {string} Shell binary path or name
|
|
52
|
+
* Priority: TERMINAL_SHELL env > platform auto-detect
|
|
53
|
+
* @returns {string}
|
|
39
54
|
*/
|
|
40
55
|
function resolveShell() {
|
|
41
56
|
if (process.env.TERMINAL_SHELL) return process.env.TERMINAL_SHELL;
|
|
42
57
|
|
|
43
58
|
if (process.platform === 'win32') {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return 'wsl.exe';
|
|
59
|
+
for (const shell of WIN_SHELL_CHAIN) {
|
|
60
|
+
if (shellExists(shell)) return shell;
|
|
61
|
+
}
|
|
62
|
+
return 'cmd.exe';
|
|
49
63
|
}
|
|
50
64
|
|
|
51
65
|
return process.env.SHELL || '/bin/bash';
|