@donotdev/cli 0.3.6 → 0.3.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/dependencies-matrix.json +41 -21
- package/dist/bin/commands/agent-setup.js +927 -132
- package/dist/bin/commands/build.js +30 -33
- package/dist/bin/commands/bump.js +450 -329
- package/dist/bin/commands/create-project.js +61 -15
- package/dist/bin/commands/db-check.js +443 -222
- package/dist/bin/commands/db.js +443 -222
- package/dist/bin/commands/deploy.js +8487 -8064
- package/dist/bin/commands/dev.js +230 -2
- package/dist/bin/commands/make-admin.js +30 -33
- package/dist/bin/commands/seed.js +454 -229
- package/dist/bin/commands/setup-cicd.js +43 -209
- package/dist/bin/commands/setup.js +6382 -2851
- package/dist/bin/commands/staging.js +8087 -7816
- package/dist/bin/commands/sync-secrets.js +117 -116
- package/dist/bin/commands/type-check.js +30 -33
- package/dist/bin/commands/uat.js +26340 -0
- package/dist/bin/dndev.js +48 -37
- package/dist/index.js +9630 -8218
- package/package.json +1 -1
- package/templates/app-vite/src/pages/HomePage.tsx.example +0 -12
- package/templates/root-consumer/.claude/agents/coder.md.example +1 -1
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +1 -1
- package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +11 -2
- package/templates/root-consumer/.claude/hooks/session-start.sh.example +33 -42
- package/templates/root-consumer/.claude/settings.json.example +11 -0
- package/templates/root-consumer/README.md.example +1 -3
|
@@ -10897,6 +10897,61 @@ Happy coding!`,
|
|
|
10897
10897
|
|
|
10898
10898
|
// packages/tooling/src/scaffolding/create-project.ts
|
|
10899
10899
|
init_utils2();
|
|
10900
|
+
|
|
10901
|
+
// packages/tooling/src/maintenance/template-sync.ts
|
|
10902
|
+
init_utils2();
|
|
10903
|
+
init_pathResolver();
|
|
10904
|
+
var PROJECT_MANIFEST = [
|
|
10905
|
+
// Documentation: the framework's instructions and rules for any agent
|
|
10906
|
+
{ pattern: "AGENTS.md.example", kind: "docs", strategy: "replace" },
|
|
10907
|
+
{ pattern: "CLAUDE.md.example", kind: "docs", strategy: "create-if-missing" },
|
|
10908
|
+
{
|
|
10909
|
+
pattern: ".claude/rules/**/*.md.example",
|
|
10910
|
+
ignore: [".claude/rules/consumer-ux.md.example"],
|
|
10911
|
+
kind: "docs",
|
|
10912
|
+
strategy: "replace"
|
|
10913
|
+
},
|
|
10914
|
+
{ pattern: ".cursor/rules/**/*.mdc.example", kind: "docs", strategy: "replace" },
|
|
10915
|
+
{ pattern: ".dndev/args.json.example", kind: "docs", strategy: "create-if-missing" },
|
|
10916
|
+
// AI harness: agents, skills, hooks, their registration, the MCP servers
|
|
10917
|
+
{ pattern: ".claude/agents/**/*.md.example", kind: "harness", strategy: "replace" },
|
|
10918
|
+
{ pattern: ".claude/skills/**/*", kind: "harness", strategy: "replace" },
|
|
10919
|
+
{ pattern: ".claude/hooks/**/*.example", kind: "harness", strategy: "replace" },
|
|
10920
|
+
{ pattern: ".claude/settings.json.example", kind: "harness", strategy: "merge-settings" },
|
|
10921
|
+
{ pattern: ".claude/rules/consumer-ux.md.example", kind: "harness", strategy: "replace" },
|
|
10922
|
+
{ pattern: ".mcp.json.example", kind: "harness", strategy: "merge-mcp" },
|
|
10923
|
+
{ pattern: ".cursor/mcp.json.example", kind: "harness", strategy: "merge-mcp" },
|
|
10924
|
+
{ pattern: ".gemini/settings.json.example", kind: "harness", strategy: "merge-mcp" }
|
|
10925
|
+
];
|
|
10926
|
+
function isGlobalHarness() {
|
|
10927
|
+
return process.env.DNDEV_HARNESS === "global";
|
|
10928
|
+
}
|
|
10929
|
+
function toDest(relativeTemplatePath) {
|
|
10930
|
+
return relativeTemplatePath.endsWith(".example") ? relativeTemplatePath.slice(0, -".example".length) : relativeTemplatePath;
|
|
10931
|
+
}
|
|
10932
|
+
async function listTemplateFiles(sourceRoot, kind) {
|
|
10933
|
+
const root = normalizePath(sourceRoot);
|
|
10934
|
+
const files = [];
|
|
10935
|
+
for (const entry of PROJECT_MANIFEST) {
|
|
10936
|
+
if (entry.kind !== kind) continue;
|
|
10937
|
+
const matches = await glob(entry.pattern, {
|
|
10938
|
+
cwd: root,
|
|
10939
|
+
onlyFiles: true,
|
|
10940
|
+
ignore: entry.ignore
|
|
10941
|
+
});
|
|
10942
|
+
for (const match of matches) {
|
|
10943
|
+
const relativeTemplatePath = normalizePath(match);
|
|
10944
|
+
files.push({
|
|
10945
|
+
sourceFile: joinPath(root, relativeTemplatePath),
|
|
10946
|
+
relativeDest: toDest(relativeTemplatePath),
|
|
10947
|
+
strategy: entry.strategy
|
|
10948
|
+
});
|
|
10949
|
+
}
|
|
10950
|
+
}
|
|
10951
|
+
return files;
|
|
10952
|
+
}
|
|
10953
|
+
|
|
10954
|
+
// packages/tooling/src/scaffolding/create-project.ts
|
|
10900
10955
|
init_cli_input();
|
|
10901
10956
|
init_cli_output();
|
|
10902
10957
|
init_create_utils();
|
|
@@ -11179,21 +11234,6 @@ async function main(_options, name) {
|
|
|
11179
11234
|
joinPath(entitiesDir, "index.ts"),
|
|
11180
11235
|
"// entities/index.ts\n// Add your entity files here\n// Entities are shared between frontend and backend\n// Next.js builds import this module (sitemap, llms.txt): keep it a module while empty.\nexport {};\n"
|
|
11181
11236
|
);
|
|
11182
|
-
const geminiDir = joinPath(projectDirNormalized, ".gemini");
|
|
11183
|
-
await ensureDir(geminiDir);
|
|
11184
|
-
const geminiSettings = {
|
|
11185
|
-
mcpServers: {
|
|
11186
|
-
donotdev: {
|
|
11187
|
-
command: "npx",
|
|
11188
|
-
args: ["-y", "@donotdev/mcp-server@latest"],
|
|
11189
|
-
trust: true
|
|
11190
|
-
}
|
|
11191
|
-
}
|
|
11192
|
-
};
|
|
11193
|
-
await write(joinPath(geminiDir, "settings.json"), geminiSettings, {
|
|
11194
|
-
format: "json",
|
|
11195
|
-
overwrite: true
|
|
11196
|
-
});
|
|
11197
11237
|
const entitiesPackageJson = generatePackageJson(
|
|
11198
11238
|
"entities",
|
|
11199
11239
|
executionMode
|
|
@@ -11260,6 +11300,11 @@ async function main(_options, name) {
|
|
|
11260
11300
|
dot: true,
|
|
11261
11301
|
onlyFiles: true
|
|
11262
11302
|
});
|
|
11303
|
+
const skippedHarness = new Set(
|
|
11304
|
+
isGlobalHarness() ? (await listTemplateFiles(rootTemplateDir, "harness")).map(
|
|
11305
|
+
(f) => f.relativeDest
|
|
11306
|
+
) : []
|
|
11307
|
+
);
|
|
11263
11308
|
for (const file of files) {
|
|
11264
11309
|
if (file === "package.json.example") continue;
|
|
11265
11310
|
const sourcePath = joinPath(rootTemplateDir, file);
|
|
@@ -11267,6 +11312,7 @@ async function main(_options, name) {
|
|
|
11267
11312
|
if (destFileName.endsWith(".example")) {
|
|
11268
11313
|
destFileName = destFileName.slice(0, -8);
|
|
11269
11314
|
}
|
|
11315
|
+
if (skippedHarness.has(destFileName)) continue;
|
|
11270
11316
|
const destPath = joinPath(projectDirNormalized, destFileName);
|
|
11271
11317
|
await ensureDir(getDirname(destPath));
|
|
11272
11318
|
await copy(sourcePath, destPath);
|