@donotdev/cli 0.0.11 → 0.0.13
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 +30 -116
- package/dist/bin/commands/bump.js +137 -104
- package/dist/bin/commands/create-app.js +20 -0
- package/dist/bin/commands/create-project.js +63 -7
- package/dist/bin/commands/deploy.js +7606 -17
- package/dist/bin/commands/firebase-setup.d.ts +6 -0
- package/dist/bin/commands/firebase-setup.d.ts.map +1 -0
- package/dist/bin/commands/firebase-setup.js +7 -0
- package/dist/bin/commands/firebase-setup.js.map +1 -0
- package/dist/bin/commands/staging.d.ts +11 -0
- package/dist/bin/commands/staging.d.ts.map +1 -0
- package/dist/bin/commands/staging.js +12 -0
- package/dist/bin/commands/staging.js.map +1 -0
- package/dist/bin/dndev.js +28 -3
- package/dist/bin/donotdev.js +28 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7714 -62
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/app-demo/src/pages/DetailPage.tsx.example +1 -1
- package/templates/app-demo/src/pages/FullPage.tsx.example +3 -3
- package/templates/app-demo/src/pages/HomePage.tsx.example +1 -1
- package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +5 -5
- package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +3 -3
- package/templates/app-next/.env.example +2 -0
- package/templates/app-next/src/pages/HomePage.tsx.example +2 -2
- package/templates/app-vite/.env.example +2 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +163 -73
- package/templates/functions-firebase/build.mjs.example +26 -10
- package/templates/functions-firebase/functions-firebase/build.mjs.example +26 -10
- package/templates/functions-firebase/functions.config.js.example +11 -15
- package/templates/github-consumer/.github/workflows/ci.yml.example +36 -0
- package/templates/root-consumer/.claude/agents/architect.md.example +2 -2
- package/templates/root-consumer/.claude/agents/builder.md.example +2 -2
- package/templates/root-consumer/.claude/agents/coder.md.example +2 -2
- package/templates/root-consumer/.claude/agents/extractor.md.example +2 -3
- package/templates/root-consumer/.claude/agents/polisher.md.example +67 -291
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +4 -4
- package/templates/root-consumer/.claude/commands/build.md.example +2 -2
- package/templates/root-consumer/.claude/commands/polish.md.example +65 -81
- package/templates/root-consumer/.env.example +13 -13
- package/templates/root-consumer/.gemini/settings.json.example +9 -0
- package/templates/root-consumer/.gitignore.example +3 -1
- package/templates/root-consumer/AI.md.example +139 -0
- package/templates/root-consumer/CLAUDE.md.example +13 -104
- package/templates/root-consumer/README.md.example +81 -255
- package/templates/root-consumer/entities/Contact.ts.example +126 -0
- package/templates/root-consumer/entities/index.ts.example +6 -3
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +41 -342
- package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +2 -1
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +144 -9
- package/templates/root-consumer/guides/dndev/INDEX.md.example +9 -0
- package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +13 -16
- package/templates/root-consumer/guides/dndev/SETUP_BLOG.md.example +263 -0
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +1 -1
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +168 -0
- package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +5 -12
- package/templates/root-consumer/guides/dndev/SETUP_TESTING.md.example +184 -0
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +134 -69
- package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +66 -44
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +18 -1
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +1 -0
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +2 -1
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +2 -1
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +180 -108
- package/templates/root-consumer/guides/wai-way/context_map.json.example +8 -7
- package/templates/root-consumer/guides/wai-way/page_patterns.md.example +4 -4
|
@@ -8027,6 +8027,26 @@ function getTemplatesRoot() {
|
|
|
8027
8027
|
const repoRoot = getRepoRoot();
|
|
8028
8028
|
return normalizePath(repoRoot, PACKAGE_PATHS.CLI, "templates");
|
|
8029
8029
|
} else {
|
|
8030
|
+
try {
|
|
8031
|
+
const cliRoot2 = resolveFrameworkPackage("@donotdev/cli");
|
|
8032
|
+
if (cliRoot2) {
|
|
8033
|
+
const templatesPath = normalizePath(cliRoot2, "templates");
|
|
8034
|
+
if (pathExists(templatesPath)) {
|
|
8035
|
+
return templatesPath;
|
|
8036
|
+
}
|
|
8037
|
+
}
|
|
8038
|
+
} catch {
|
|
8039
|
+
}
|
|
8040
|
+
try {
|
|
8041
|
+
const req = createRequire2(import.meta.url);
|
|
8042
|
+
const cliPackageJsonPath = req.resolve("@donotdev/cli/package.json");
|
|
8043
|
+
const cliRoot2 = normalizePath(dirname2(cliPackageJsonPath));
|
|
8044
|
+
const templatesPath = normalizePath(cliRoot2, "templates");
|
|
8045
|
+
if (pathExists(templatesPath)) {
|
|
8046
|
+
return templatesPath;
|
|
8047
|
+
}
|
|
8048
|
+
} catch {
|
|
8049
|
+
}
|
|
8030
8050
|
const cliRoot = getCliRootFromBundle();
|
|
8031
8051
|
return normalizePath(cliRoot, "templates");
|
|
8032
8052
|
}
|
|
@@ -9247,6 +9267,17 @@ function detectExecutionMode2() {
|
|
|
9247
9267
|
async function main(options) {
|
|
9248
9268
|
try {
|
|
9249
9269
|
Ie("\u{1F680} DoNotDev Project Creator");
|
|
9270
|
+
try {
|
|
9271
|
+
const { execSync } = await import("node:child_process");
|
|
9272
|
+
execSync("bun --version", { stdio: "ignore" });
|
|
9273
|
+
} catch {
|
|
9274
|
+
log.error("bun is required but not installed.");
|
|
9275
|
+
Me(
|
|
9276
|
+
"Install bun:\n\n curl -fsSL https://bun.sh/install | bash\n\nThen re-run: dndev init",
|
|
9277
|
+
"Missing dependency"
|
|
9278
|
+
);
|
|
9279
|
+
process.exit(1);
|
|
9280
|
+
}
|
|
9250
9281
|
if (SHOW_WIP2) {
|
|
9251
9282
|
Me("WIP mode enabled - showing experimental features", "\u{1F527} Debug");
|
|
9252
9283
|
}
|
|
@@ -9497,6 +9528,10 @@ async function main(options) {
|
|
|
9497
9528
|
};
|
|
9498
9529
|
}
|
|
9499
9530
|
}
|
|
9531
|
+
const setupGithubActions = await askForConfirmation(
|
|
9532
|
+
"Set up GitHub Actions CI/CD?",
|
|
9533
|
+
true
|
|
9534
|
+
);
|
|
9500
9535
|
const s = Y2();
|
|
9501
9536
|
if (!isMergeMode) {
|
|
9502
9537
|
s.start("Creating project structure...");
|
|
@@ -9508,6 +9543,21 @@ async function main(options) {
|
|
|
9508
9543
|
joinPath(entitiesDir, "index.ts"),
|
|
9509
9544
|
"// entities/index.ts\n// Add your entity files here\n// Entities are shared between frontend and backend\n"
|
|
9510
9545
|
);
|
|
9546
|
+
const geminiDir = joinPath(projectDirNormalized, ".gemini");
|
|
9547
|
+
await ensureDir(geminiDir);
|
|
9548
|
+
const geminiSettings = {
|
|
9549
|
+
mcpServers: {
|
|
9550
|
+
donotdev: {
|
|
9551
|
+
command: "npx",
|
|
9552
|
+
args: ["-y", "@donotdev/mcp-server@latest"],
|
|
9553
|
+
trust: true
|
|
9554
|
+
}
|
|
9555
|
+
}
|
|
9556
|
+
};
|
|
9557
|
+
await write(joinPath(geminiDir, "settings.json"), geminiSettings, {
|
|
9558
|
+
format: "json",
|
|
9559
|
+
overwrite: true
|
|
9560
|
+
});
|
|
9511
9561
|
const entitiesPackageJson = generatePackageJson(
|
|
9512
9562
|
"entities",
|
|
9513
9563
|
executionMode
|
|
@@ -9537,7 +9587,7 @@ async function main(options) {
|
|
|
9537
9587
|
projectName,
|
|
9538
9588
|
appNames: isMergeMode ? allAppNames : appNames,
|
|
9539
9589
|
includeFunctions: anyAppNeedsBackend,
|
|
9540
|
-
setupGithubActions
|
|
9590
|
+
setupGithubActions,
|
|
9541
9591
|
monorepoRelativePath: relativeMonorepoPath,
|
|
9542
9592
|
appTemplate: "vite",
|
|
9543
9593
|
isNextjs: false,
|
|
@@ -9577,6 +9627,10 @@ async function main(options) {
|
|
|
9577
9627
|
await replacePlaceholders(destPath, rootReplacements);
|
|
9578
9628
|
}
|
|
9579
9629
|
}
|
|
9630
|
+
if (setupGithubActions) {
|
|
9631
|
+
const ciTemplateDir = joinPath(templatesRoot, "github-consumer");
|
|
9632
|
+
await copyTemplateFiles(ciTemplateDir, projectDirNormalized, rootReplacements);
|
|
9633
|
+
}
|
|
9580
9634
|
s.stop("Project structure created");
|
|
9581
9635
|
} else {
|
|
9582
9636
|
s.start("Merging root files...");
|
|
@@ -9684,14 +9738,16 @@ async function main(options) {
|
|
|
9684
9738
|
Se("\u{1F389} Project created successfully!");
|
|
9685
9739
|
const cdCommand = executionMode === "development" ? `cd ../${projectName}` : `cd ${projectName}`;
|
|
9686
9740
|
Me(
|
|
9687
|
-
`
|
|
9688
|
-
|
|
9689
|
-
1. ${cdCommand}
|
|
9741
|
+
`1. ${cdCommand}
|
|
9690
9742
|
2. bun install
|
|
9691
|
-
3.
|
|
9692
|
-
|
|
9743
|
+
3. Open the project in your IDE (Cursor, VS Code, etc.)
|
|
9744
|
+
4. Tell your AI agent: "Read AI.md and build my app"
|
|
9745
|
+
|
|
9746
|
+
That's it. The agent handles the rest.
|
|
9693
9747
|
|
|
9694
|
-
`
|
|
9748
|
+
` + (anyAppNeedsBackend ? `Dev server: dndev dev | With emulators: dndev emu
|
|
9749
|
+
` : `Dev server: dndev dev
|
|
9750
|
+
`) + `AI setup: dndev agent (re-configure MCP if needed)`,
|
|
9695
9751
|
"\u{1F4CB} Next Steps"
|
|
9696
9752
|
);
|
|
9697
9753
|
} catch (error2) {
|