@donotdev/cli 0.0.21 → 0.0.22

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.
@@ -327,7 +327,6 @@
327
327
  },
328
328
  "vite-deps": {
329
329
  "packages": {
330
- "@vitejs/plugin-react": "^5.1.4",
331
330
  "react-refresh": "^0.18.0",
332
331
  "@vitejs/plugin-basic-ssl": "^2.1.4",
333
332
  "vite-tsconfig-paths": "^6.1.1",
@@ -393,6 +392,7 @@
393
392
  "core-vite-config": {
394
393
  "description": "Vite config deps bundled into @donotdev/core/vite (externalized by esbuild, must be in dependencies for publish)",
395
394
  "packages": {
395
+ "@vitejs/plugin-react": "^5.1.4",
396
396
  "@rollup/plugin-strip": "^3.0.4",
397
397
  "@vitejs/plugin-basic-ssl": "^2.1.4",
398
398
  "rollup-plugin-visualizer": "^6.0.5",
@@ -819,7 +819,9 @@
819
819
  "zustand",
820
820
  "validation",
821
821
  "lucide-react",
822
- "routing"
822
+ "routing",
823
+ "shiki",
824
+ "tiptap"
823
825
  ],
824
826
  "devDependencies": [
825
827
  "vite",
@@ -849,7 +851,9 @@
849
851
  "react",
850
852
  "zustand",
851
853
  "validation",
852
- "lucide-react"
854
+ "lucide-react",
855
+ "shiki",
856
+ "tiptap"
853
857
  ],
854
858
  "devDependencies": [
855
859
  "next",
@@ -907,7 +911,9 @@
907
911
  "lucide-react",
908
912
  "routing",
909
913
  "i18n",
910
- "react-query"
914
+ "react-query",
915
+ "shiki",
916
+ "tiptap"
911
917
  ],
912
918
  "devDependencies": [
913
919
  "vite",
@@ -937,7 +943,9 @@
937
943
  "validation",
938
944
  "lucide-react",
939
945
  "i18n",
940
- "react-query"
946
+ "react-query",
947
+ "shiki",
948
+ "tiptap"
941
949
  ],
942
950
  "devDependencies": [
943
951
  "next",
@@ -1051,7 +1059,9 @@
1051
1059
  "routing",
1052
1060
  "i18n",
1053
1061
  "react-query",
1054
- "styling"
1062
+ "styling",
1063
+ "shiki",
1064
+ "tiptap"
1055
1065
  ],
1056
1066
  "devDependencies": [
1057
1067
  "postcss",
@@ -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 = await askForConfirmation(
9747
- "Would you like to install the demo app? (component showcase)",
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 = await askForConfirmation(
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.21" : "0.0.0";
861
+ var CLI_VERSION = true ? "0.0.22" : "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/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 = await askForConfirmation(
21086
- "Would you like to install the demo app? (component showcase)",
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 = await askForConfirmation(
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donotdev/cli",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Command-line interface for DoNotDev Framework",
5
5
  "type": "module",
6
6
  "private": false,
@@ -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
- connectTab(activeTab);
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 env TERMINAL_SHELL or edit defaults below
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 default
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
- // Default: WSL (Linux shell inside Windows)
45
- // To use PowerShell instead, uncomment ONE of:
46
- // return 'pwsh.exe'; // PowerShell 7+ (recommended)
47
- // return 'powershell.exe'; // Windows PowerShell 5.1 (legacy)
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';