@donotdev/cli 0.0.20 → 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.
- package/README.md +31 -0
- package/dependencies-matrix.json +102 -25
- package/dist/bin/commands/agent-setup.js +2 -2
- package/dist/bin/commands/build.js +6 -6
- package/dist/bin/commands/bump.js +491 -69
- package/dist/bin/commands/cacheout.js +6 -6
- package/dist/bin/commands/coach.js +6 -6
- package/dist/bin/commands/create-app.js +23 -15
- package/dist/bin/commands/create-project.js +100 -24
- package/dist/bin/commands/db.js +142136 -0
- package/dist/bin/commands/deploy.js +336 -126
- package/dist/bin/commands/dev.js +6 -6
- package/dist/bin/commands/doctor.js +140 -33
- package/dist/bin/commands/emu.js +6 -6
- package/dist/bin/commands/format.js +6 -6
- package/dist/bin/commands/get-demo.js +11 -6
- package/dist/bin/commands/make-admin.js +14210 -13770
- package/dist/bin/commands/preview.js +6 -6
- package/dist/bin/commands/seed.js +142426 -0
- package/dist/bin/commands/setup-cicd.js +8904 -0
- package/dist/bin/commands/setup.js +256 -212
- package/dist/bin/commands/staging.js +343 -127
- package/dist/bin/commands/sync-secrets.js +55 -33
- package/dist/bin/commands/type-check.js +6 -6
- package/dist/bin/commands/wai.js +6 -6
- package/dist/bin/dndev.js +80 -11
- package/dist/bin/donotdev.js +21 -12
- package/dist/index.js +436 -150
- package/package.json +1 -1
- package/templates/app-demo/.env.example +1 -0
- package/templates/{root-consumer → app-demo}/entities/ExampleEntity.ts.example +15 -9
- package/templates/app-demo/index.html.example +1 -1
- package/templates/app-dndev/index.html.example +164 -0
- package/templates/app-dndev/public/logo.svg.example +1 -0
- package/templates/app-dndev/public/manifest.json.example +10 -0
- package/templates/app-dndev/src/App.tsx.example +35 -0
- package/templates/app-dndev/src/components/CockpitLayout.css.example +181 -0
- package/templates/app-dndev/src/components/CockpitLayout.tsx.example +209 -0
- package/templates/app-dndev/src/components/Kanban.css.example +385 -0
- package/templates/app-dndev/src/components/ModeToggle.tsx.example +32 -0
- package/templates/app-dndev/src/components/OverlaySlot.tsx.example +68 -0
- package/templates/app-dndev/src/components/TerminalPanel.css.example +252 -0
- package/templates/app-dndev/src/components/TerminalPanel.tsx.example +737 -0
- package/templates/app-dndev/src/components/markdown-prose.css.example +49 -0
- package/templates/app-dndev/src/components/phases/CaptainLog.tsx.example +107 -0
- package/templates/app-dndev/src/components/phases/ContextTabs.tsx.example +352 -0
- package/templates/app-dndev/src/components/phases/PhaseCard.tsx.example +126 -0
- package/templates/app-dndev/src/components/phases/PhaseDetail.tsx.example +147 -0
- package/templates/app-dndev/src/components/phases/ReviewPanel.tsx.example +115 -0
- package/templates/app-dndev/src/components/phases/phaseData.ts.example +366 -0
- package/templates/app-dndev/src/config/app.ts.example +103 -0
- package/templates/app-dndev/src/config/commands.ts.example +171 -0
- package/templates/app-dndev/src/config/legal.ts.example +170 -0
- package/templates/app-dndev/src/config/providers.ts.example +7 -0
- package/templates/app-dndev/src/globals.css.example +10 -0
- package/templates/app-dndev/src/hooks/useDndevFile.ts.example +144 -0
- package/templates/app-dndev/src/main.tsx.example +21 -0
- package/templates/app-dndev/src/pages/BoardPage.tsx.example +640 -0
- package/templates/app-dndev/src/pages/GrillPage.tsx.example +658 -0
- package/templates/app-dndev/src/pages/HomePage.tsx.example +347 -0
- package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +33 -0
- package/templates/app-dndev/src/pages/PhasesPage.tsx.example +137 -0
- package/templates/app-dndev/src/pages/SettingsPage.tsx.example +64 -0
- package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +75 -0
- package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +69 -0
- package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +71 -0
- package/templates/app-dndev/src/stores/dndevStore.ts.example +386 -0
- package/templates/app-dndev/src/themes.css.example +161 -0
- package/templates/app-dndev/terminal-sidecar.cjs.example +355 -0
- package/templates/app-dndev/tsconfig.json.example +9 -0
- package/templates/app-dndev/vite.config.ts.example +24 -0
- package/templates/app-next/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/index.html.example +1 -1
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/functions-supabase/supabase/functions/.env.example +0 -2
- package/templates/root-consumer/.claude/commands/grill.md.example +86 -8
- package/templates/root-consumer/.dndev.secrets.example +32 -0
- package/templates/root-consumer/.gitignore.example +3 -0
- package/templates/root-consumer/AI.md.example +4 -0
- package/templates/root-consumer/entities/index.ts.example +2 -5
- package/templates/root-consumer/guides/dndev/COMPONENTS_ATOMIC.md.example +4 -0
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +23 -20
- package/templates/root-consumer/guides/dndev/INDEX.md.example +1 -0
- package/templates/root-consumer/guides/dndev/SETUP_BILLING.md.example +3 -7
- package/templates/root-consumer/guides/dndev/SETUP_CICD.md.example +115 -0
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +41 -0
- package/templates/root-consumer/guides/dndev/SETUP_SUPABASE.md.example +13 -18
- package/templates/root-consumer/guides/dndev/SETUP_VERCEL.md.example +17 -12
- package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +252 -252
- package/templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example +174 -174
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +185 -251
- package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +26 -8
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +66 -49
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +6 -5
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +9 -9
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +1 -1
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +7 -6
- package/templates/root-consumer/guides/wai-way/context_map.json.example +51 -20
- package/templates/root-consumer/guides/wai-way/hld_template.md.example +138 -0
- package/templates/root-consumer/guides/wai-way/lld_template.md.example +103 -0
- package/templates/root-consumer/guides/wai-way/prd_template.md.example +140 -0
- /package/templates/{root-consumer → app-demo}/entities/Contact.ts.example +0 -0
- /package/templates/{root-consumer → app-demo}/entities/demo.ts.example +0 -0
package/README.md
CHANGED
|
@@ -155,6 +155,37 @@ dndev sync-secrets --platform=vercel --vercel-project my-vercel-app
|
|
|
155
155
|
dndev sync-secrets --dry-run
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
+
### `dndev setup-cicd`
|
|
159
|
+
|
|
160
|
+
Set up CI/CD: detect providers, upload GitHub secrets, and generate GitHub Actions workflow YAML.
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
dndev setup-cicd
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Features:**
|
|
167
|
+
|
|
168
|
+
- Auto-detects providers (Firebase, Vercel, Supabase) from app config
|
|
169
|
+
- Collects all required secrets and uploads to GitHub
|
|
170
|
+
- Generates `ci.yml`, `deploy.yml`, and optionally `deploy-staging.yml`
|
|
171
|
+
- Handles service account files (base64-encoded)
|
|
172
|
+
- Reads secrets from `.dndev.secrets` (GH_PAT, VERCEL_TOKEN, etc.)
|
|
173
|
+
- Staging support via `.firebaserc` staging alias
|
|
174
|
+
|
|
175
|
+
**Options:**
|
|
176
|
+
|
|
177
|
+
- `--app <app>` - Target app (auto-detected if single app)
|
|
178
|
+
- `--staging` - Include staging workflow generation
|
|
179
|
+
- `--dry-run` - Preview secrets and YAML without uploading or writing
|
|
180
|
+
|
|
181
|
+
**Examples:**
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
dndev setup-cicd # auto-detect app and providers
|
|
185
|
+
dndev setup-cicd --app web # target specific app
|
|
186
|
+
dndev setup-cicd --dry-run # preview only
|
|
187
|
+
```
|
|
188
|
+
|
|
158
189
|
### `dndev format [files]`
|
|
159
190
|
|
|
160
191
|
Format code using Prettier.
|
package/dependencies-matrix.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "./dependencies-matrix.schema.json",
|
|
3
3
|
"version": "0.0.6",
|
|
4
4
|
"description": "Centralized dependency versions for DoNotDev framework. Single source of truth for all external dependencies. ⚠️ SYNC REQUIRED: When adding/removing @donotdev/* feature packages (auth, billing, crud, oauth), also update packages/core/config/constants.js BUNDLING.optionalFeatures array.",
|
|
5
|
-
"lastUpdated": "2026-
|
|
5
|
+
"lastUpdated": "2026-03-03",
|
|
6
6
|
"migrationGuides": {
|
|
7
7
|
"0.0→0.1": {
|
|
8
8
|
"path": "docs/migration/v0.0-to-v0.1.md",
|
|
@@ -17,73 +17,73 @@
|
|
|
17
17
|
"@donotdev/auth": {
|
|
18
18
|
"description": "Authentication package",
|
|
19
19
|
"packages": {
|
|
20
|
-
"@donotdev/auth": "^0.0.
|
|
20
|
+
"@donotdev/auth": "^0.0.14"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"@donotdev/billing": {
|
|
24
24
|
"description": "Billing package",
|
|
25
25
|
"packages": {
|
|
26
|
-
"@donotdev/billing": "^0.0.
|
|
26
|
+
"@donotdev/billing": "^0.0.13"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"@donotdev/components": {
|
|
30
30
|
"description": "UI components package",
|
|
31
31
|
"packages": {
|
|
32
|
-
"@donotdev/components": "^0.0.
|
|
32
|
+
"@donotdev/components": "^0.0.24"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"@donotdev/core": {
|
|
36
36
|
"description": "Core framework package",
|
|
37
37
|
"packages": {
|
|
38
|
-
"@donotdev/core": "^0.0.
|
|
38
|
+
"@donotdev/core": "^0.0.30"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"@donotdev/crud": {
|
|
42
42
|
"description": "CRUD operations package",
|
|
43
43
|
"packages": {
|
|
44
|
-
"@donotdev/crud": "^0.0.
|
|
44
|
+
"@donotdev/crud": "^0.0.21"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"@donotdev/firebase": {
|
|
48
48
|
"description": "Firebase provider package",
|
|
49
49
|
"packages": {
|
|
50
|
-
"@donotdev/firebase": "^0.0.
|
|
50
|
+
"@donotdev/firebase": "^0.0.16"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"@donotdev/functions": {
|
|
54
54
|
"description": "Firebase Functions package",
|
|
55
55
|
"packages": {
|
|
56
|
-
"@donotdev/functions": "^0.0.
|
|
56
|
+
"@donotdev/functions": "^0.0.17"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"@donotdev/oauth": {
|
|
60
60
|
"description": "OAuth package",
|
|
61
61
|
"packages": {
|
|
62
|
-
"@donotdev/oauth": "^0.0.
|
|
62
|
+
"@donotdev/oauth": "^0.0.13"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"@donotdev/templates": {
|
|
66
66
|
"description": "Page templates package",
|
|
67
67
|
"packages": {
|
|
68
|
-
"@donotdev/templates": "^0.0.
|
|
68
|
+
"@donotdev/templates": "^0.0.16"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"@donotdev/ui": {
|
|
72
72
|
"description": "UI and routing package",
|
|
73
73
|
"packages": {
|
|
74
|
-
"@donotdev/ui": "^0.0.
|
|
74
|
+
"@donotdev/ui": "^0.0.20"
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"@donotdev/expo": {
|
|
78
78
|
"description": "Expo/React Native components package",
|
|
79
79
|
"packages": {
|
|
80
|
-
"@donotdev/expo": "^0.0.
|
|
80
|
+
"@donotdev/expo": "^0.0.7"
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@donotdev/supabase": {
|
|
84
84
|
"description": "Supabase provider package",
|
|
85
85
|
"packages": {
|
|
86
|
-
"@donotdev/supabase": "^0.0.
|
|
86
|
+
"@donotdev/supabase": "^0.0.6"
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
"supabase-js": {
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"lucide-react": {
|
|
156
156
|
"description": "Icons - consumers install and use directly",
|
|
157
157
|
"packages": {
|
|
158
|
-
"lucide-react": "^0.
|
|
158
|
+
"lucide-react": "^0.575.0"
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
"react-day-picker": {
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
},
|
|
243
243
|
"routing": {
|
|
244
244
|
"packages": {
|
|
245
|
-
"react-router-dom": "^7.13.
|
|
245
|
+
"react-router-dom": "^7.13.1"
|
|
246
246
|
}
|
|
247
247
|
},
|
|
248
248
|
"firebase": {
|
|
@@ -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",
|
|
@@ -387,12 +386,13 @@
|
|
|
387
386
|
"postcss": "^8.5.6",
|
|
388
387
|
"postcss-import": "^16.1.1",
|
|
389
388
|
"postcss-nesting": "^14.0.0",
|
|
390
|
-
"autoprefixer": "^10.4.
|
|
389
|
+
"autoprefixer": "^10.4.27"
|
|
391
390
|
}
|
|
392
391
|
},
|
|
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",
|
|
@@ -433,13 +433,13 @@
|
|
|
433
433
|
"@donotdev/cli": {
|
|
434
434
|
"description": "Cli package",
|
|
435
435
|
"packages": {
|
|
436
|
-
"@donotdev/cli": "^0.0.
|
|
436
|
+
"@donotdev/cli": "^0.0.21"
|
|
437
437
|
}
|
|
438
438
|
},
|
|
439
439
|
"@donotdev/mcp-server": {
|
|
440
440
|
"description": "MCP server for component type lookups",
|
|
441
441
|
"packages": {
|
|
442
|
-
"@donotdev/mcp-server": "^0.0.
|
|
442
|
+
"@donotdev/mcp-server": "^0.0.11"
|
|
443
443
|
}
|
|
444
444
|
},
|
|
445
445
|
"mcp-sdk": {
|
|
@@ -465,7 +465,46 @@
|
|
|
465
465
|
"@donotdev/security": {
|
|
466
466
|
"description": "Security package",
|
|
467
467
|
"packages": {
|
|
468
|
-
"@donotdev/security": "^0.0.
|
|
468
|
+
"@donotdev/security": "^0.0.7"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"xterm": {
|
|
472
|
+
"description": "Terminal emulator for cockpit app",
|
|
473
|
+
"packages": {
|
|
474
|
+
"@xterm/xterm": "^6.0.0",
|
|
475
|
+
"@xterm/addon-fit": "^0.11.0",
|
|
476
|
+
"@xterm/addon-web-links": "^0.12.0"
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"node-pty": {
|
|
480
|
+
"description": "PTY for terminal sidecar",
|
|
481
|
+
"packages": {
|
|
482
|
+
"node-pty": "^1.0.0"
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
"react-markdown-cockpit": {
|
|
486
|
+
"description": "Markdown rendering for cockpit (phase details, captain log)",
|
|
487
|
+
"packages": {
|
|
488
|
+
"react-markdown": "^10.1.0",
|
|
489
|
+
"remark-gfm": "^4.0.1"
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
"react-resizable-panels": {
|
|
493
|
+
"description": "Resizable panel layout for cockpit",
|
|
494
|
+
"packages": {
|
|
495
|
+
"react-resizable-panels": "^4.7.0"
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
"ws": {
|
|
499
|
+
"description": "WebSocket client for terminal sidecar communication",
|
|
500
|
+
"packages": {
|
|
501
|
+
"ws": "^8.18.0"
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
"ws-types": {
|
|
505
|
+
"description": "TypeScript types for ws",
|
|
506
|
+
"packages": {
|
|
507
|
+
"@types/ws": "^8.18.1"
|
|
469
508
|
}
|
|
470
509
|
}
|
|
471
510
|
},
|
|
@@ -780,7 +819,9 @@
|
|
|
780
819
|
"zustand",
|
|
781
820
|
"validation",
|
|
782
821
|
"lucide-react",
|
|
783
|
-
"routing"
|
|
822
|
+
"routing",
|
|
823
|
+
"shiki",
|
|
824
|
+
"tiptap"
|
|
784
825
|
],
|
|
785
826
|
"devDependencies": [
|
|
786
827
|
"vite",
|
|
@@ -810,7 +851,9 @@
|
|
|
810
851
|
"react",
|
|
811
852
|
"zustand",
|
|
812
853
|
"validation",
|
|
813
|
-
"lucide-react"
|
|
854
|
+
"lucide-react",
|
|
855
|
+
"shiki",
|
|
856
|
+
"tiptap"
|
|
814
857
|
],
|
|
815
858
|
"devDependencies": [
|
|
816
859
|
"next",
|
|
@@ -868,7 +911,9 @@
|
|
|
868
911
|
"lucide-react",
|
|
869
912
|
"routing",
|
|
870
913
|
"i18n",
|
|
871
|
-
"react-query"
|
|
914
|
+
"react-query",
|
|
915
|
+
"shiki",
|
|
916
|
+
"tiptap"
|
|
872
917
|
],
|
|
873
918
|
"devDependencies": [
|
|
874
919
|
"vite",
|
|
@@ -898,7 +943,9 @@
|
|
|
898
943
|
"validation",
|
|
899
944
|
"lucide-react",
|
|
900
945
|
"i18n",
|
|
901
|
-
"react-query"
|
|
946
|
+
"react-query",
|
|
947
|
+
"shiki",
|
|
948
|
+
"tiptap"
|
|
902
949
|
],
|
|
903
950
|
"devDependencies": [
|
|
904
951
|
"next",
|
|
@@ -1012,7 +1059,9 @@
|
|
|
1012
1059
|
"routing",
|
|
1013
1060
|
"i18n",
|
|
1014
1061
|
"react-query",
|
|
1015
|
-
"styling"
|
|
1062
|
+
"styling",
|
|
1063
|
+
"shiki",
|
|
1064
|
+
"tiptap"
|
|
1016
1065
|
],
|
|
1017
1066
|
"devDependencies": [
|
|
1018
1067
|
"postcss",
|
|
@@ -1021,6 +1070,34 @@
|
|
|
1021
1070
|
"types",
|
|
1022
1071
|
"vite-deps-minimal"
|
|
1023
1072
|
]
|
|
1073
|
+
},
|
|
1074
|
+
"dndev": {
|
|
1075
|
+
"description": "Cockpit app template (AI development dashboard)",
|
|
1076
|
+
"dependencies": [
|
|
1077
|
+
"@donotdev/components",
|
|
1078
|
+
"@donotdev/core",
|
|
1079
|
+
"@donotdev/ui",
|
|
1080
|
+
"@dnd-kit",
|
|
1081
|
+
"xterm",
|
|
1082
|
+
"node-pty",
|
|
1083
|
+
"react-markdown-cockpit",
|
|
1084
|
+
"react-resizable-panels",
|
|
1085
|
+
"ws",
|
|
1086
|
+
"react",
|
|
1087
|
+
"zustand",
|
|
1088
|
+
"lucide-react",
|
|
1089
|
+
"routing"
|
|
1090
|
+
],
|
|
1091
|
+
"devDependencies": [
|
|
1092
|
+
"react-query",
|
|
1093
|
+
"i18n",
|
|
1094
|
+
"postcss",
|
|
1095
|
+
"vite",
|
|
1096
|
+
"typescript",
|
|
1097
|
+
"types",
|
|
1098
|
+
"vite-deps-minimal",
|
|
1099
|
+
"ws-types"
|
|
1100
|
+
]
|
|
1024
1101
|
}
|
|
1025
1102
|
},
|
|
1026
1103
|
"notes": {
|
|
@@ -491,7 +491,7 @@ var init_cli_output = __esm({
|
|
|
491
491
|
});
|
|
492
492
|
|
|
493
493
|
// packages/tooling/src/bundler/utils.ts
|
|
494
|
-
import { Buffer
|
|
494
|
+
import { Buffer } from "node:buffer";
|
|
495
495
|
import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
|
|
496
496
|
import { createRequire } from "node:module";
|
|
497
497
|
import { dirname, resolve } from "node:path";
|
|
@@ -508,7 +508,7 @@ var init_utils = __esm({
|
|
|
508
508
|
globalThis.require = require2;
|
|
509
509
|
globalThis.__filename = __filename;
|
|
510
510
|
globalThis.__dirname = __dirname;
|
|
511
|
-
globalThis.Buffer =
|
|
511
|
+
globalThis.Buffer = Buffer;
|
|
512
512
|
globalThis.process = process;
|
|
513
513
|
if (typeof global === "undefined") {
|
|
514
514
|
globalThis.global = globalThis;
|
|
@@ -6989,7 +6989,7 @@ var init_PathResolver = __esm({
|
|
|
6989
6989
|
}
|
|
6990
6990
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
6991
6991
|
let writeContent;
|
|
6992
|
-
if (
|
|
6992
|
+
if (Buffer.isBuffer(content)) {
|
|
6993
6993
|
writeContent = content;
|
|
6994
6994
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
6995
6995
|
writeContent = JSON.stringify(content, null, 2);
|
|
@@ -6998,7 +6998,7 @@ var init_PathResolver = __esm({
|
|
|
6998
6998
|
}
|
|
6999
6999
|
try {
|
|
7000
7000
|
return await safeExecuteAsync(async () => {
|
|
7001
|
-
if (
|
|
7001
|
+
if (Buffer.isBuffer(writeContent)) {
|
|
7002
7002
|
await fs.promises.writeFile(normalizedPath, writeContent);
|
|
7003
7003
|
} else {
|
|
7004
7004
|
await fs.promises.writeFile(normalizedPath, writeContent, "utf8");
|
|
@@ -7050,7 +7050,7 @@ var init_PathResolver = __esm({
|
|
|
7050
7050
|
}
|
|
7051
7051
|
const detectedFormat = this._detectFormat(filePath, format);
|
|
7052
7052
|
let writeContent;
|
|
7053
|
-
if (
|
|
7053
|
+
if (Buffer.isBuffer(content)) {
|
|
7054
7054
|
writeContent = content;
|
|
7055
7055
|
} else if (detectedFormat === "json" && typeof content === "object") {
|
|
7056
7056
|
writeContent = JSON.stringify(content, null, 2);
|
|
@@ -7058,7 +7058,7 @@ var init_PathResolver = __esm({
|
|
|
7058
7058
|
writeContent = String(content);
|
|
7059
7059
|
}
|
|
7060
7060
|
try {
|
|
7061
|
-
if (
|
|
7061
|
+
if (Buffer.isBuffer(writeContent)) {
|
|
7062
7062
|
fs.writeFileSync(normalizedPath, writeContent);
|
|
7063
7063
|
} else {
|
|
7064
7064
|
fs.writeFileSync(normalizedPath, writeContent, "utf8");
|
|
@@ -7826,7 +7826,7 @@ var init_typed_file_operations = __esm({
|
|
|
7826
7826
|
});
|
|
7827
7827
|
|
|
7828
7828
|
// packages/tooling/src/bundler/utils.ts
|
|
7829
|
-
import { Buffer
|
|
7829
|
+
import { Buffer } from "node:buffer";
|
|
7830
7830
|
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
7831
7831
|
import { createRequire as createRequire3 } from "node:module";
|
|
7832
7832
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
@@ -7843,7 +7843,7 @@ var init_utils = __esm({
|
|
|
7843
7843
|
globalThis.require = require2;
|
|
7844
7844
|
globalThis.__filename = __filename;
|
|
7845
7845
|
globalThis.__dirname = __dirname;
|
|
7846
|
-
globalThis.Buffer =
|
|
7846
|
+
globalThis.Buffer = Buffer;
|
|
7847
7847
|
globalThis.process = process;
|
|
7848
7848
|
if (typeof global === "undefined") {
|
|
7849
7849
|
globalThis.global = globalThis;
|