@domain-first/project-structure 8.1.1 → 8.3.0
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 +17 -2
- package/dist/201.js +1 -1
- package/dist/287.js +278 -9
- package/dist/38.js +268 -0
- package/dist/561.js +22 -5
- package/dist/agent-cli.d.ts +17 -0
- package/dist/agent-requests.d.ts +34 -0
- package/dist/backend-module-move.d.ts +16 -0
- package/dist/graph.cjs +933 -0
- package/dist/graph.d.ts +2 -0
- package/dist/graph.js +337 -0
- package/dist/index.cjs +300 -12
- package/dist/index.js +4 -2
- package/dist/init.cjs +111 -57
- package/dist/integration.cjs +297 -11
- package/dist/interaction.d.ts +9 -0
- package/dist/interaction.spec.d.ts +1 -0
- package/dist/lint.js +8 -273
- package/dist/project-graph.d.ts +53 -0
- package/dist/project-graph.spec.d.ts +1 -0
- package/dist/project-lint.d.ts +10 -0
- package/dist/react-module-move.d.ts +21 -0
- package/dist/react.cjs +304 -12
- package/dist/react.js +8 -2
- package/dist/use-cases/delete-backend-unit.d.ts +6 -0
- package/dist/use-cases/delete-react-module.d.ts +8 -0
- package/dist/use-cases/index.d.ts +2 -0
- package/package.json +3 -2
- package/skills/df-ps-plan-feature/SKILL.md +2 -0
- package/skills/df-ps-react/SKILL.md +5 -3
- package/skills/df-ps-react/references/generators.md +4 -0
- package/skills/df-ps-scaffold/SKILL.md +5 -4
- package/skills/df-ps-scaffold/references/agent-mode.md +1 -0
- package/skills/df-ps-scaffold/references/agent-operations.md +3 -0
- package/skills/df-ps-scaffold/references/units/delete.md +19 -0
- package/skills/df-ps-scaffold/scripts/drive.mjs +5 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Delete
|
|
2
|
+
|
|
3
|
+
When: a module is no longer needed. Never delete module files by hand: the CLI removes every file of the module and what the generators added for it elsewhere, and refuses while anything still uses it.
|
|
4
|
+
|
|
5
|
+
## Generate (context and Shared Kernel)
|
|
6
|
+
|
|
7
|
+
Prompts: `Module to delete:` (select, grouped by kind as in Move or rename) → `Delete?` (default No).
|
|
8
|
+
|
|
9
|
+
`… "pick:Delete" pick:orders yes`
|
|
10
|
+
|
|
11
|
+
JSON: `{ "operation": "delete", "context": "sales", "module": "query:orders" }`.
|
|
12
|
+
|
|
13
|
+
Deleted: the files of the unit, as Move or rename moves them (an aggregate with its whole folder, entities and value objects inside included). Cleaned up: an entity's or value object's `export *` in its aggregate's `index.ts`, and an aggregate's in-memory DB section with its import.
|
|
14
|
+
|
|
15
|
+
Refused while other files import the module: other modules, their wires and specs, or importers of the aggregate barrel that name an entity or value object. The CLI prints `Nothing was deleted: these files still use it.` with each `file → import` (JSON: `DELETE_NOT_ALLOWED` with `details.usedBy`) and changes nothing. Remove the uses first: delete the dependent module first, or remove the dependency from its wire and constructor together, which needs the approved plan (rule 3 exception).
|
|
16
|
+
|
|
17
|
+
## In the plan
|
|
18
|
+
|
|
19
|
+
A delete is a row of its owner: Type `delete`, Name the module, Why the reason it goes. List the uses that have to go first under Writing by hand.
|
|
@@ -222,6 +222,7 @@ const created = [...after.keys()].filter((p) => !before.has(p)).map(rel);
|
|
|
222
222
|
const changed = [...after.keys()]
|
|
223
223
|
.filter((p) => before.has(p) && before.get(p) !== after.get(p))
|
|
224
224
|
.map(rel);
|
|
225
|
+
const deleted = [...before.keys()].filter((p) => !after.has(p)).map(rel);
|
|
225
226
|
|
|
226
227
|
const plain = stripAnsi(output);
|
|
227
228
|
const answered = [...plain.matchAll(/✔\s*([^\n]*)/g)].map((m) => m[1].trim());
|
|
@@ -240,6 +241,10 @@ console.log('\ncreated:');
|
|
|
240
241
|
for (const file of created) console.log(` + ${file}`);
|
|
241
242
|
console.log('\nchanged:');
|
|
242
243
|
for (const file of changed) console.log(` ~ ${file}`);
|
|
244
|
+
if (deleted.length) {
|
|
245
|
+
console.log('\ndeleted:');
|
|
246
|
+
for (const file of deleted) console.log(` - ${file}`);
|
|
247
|
+
}
|
|
243
248
|
if (code !== 0 || unansweredPrompt || aborted) {
|
|
244
249
|
console.log('\nraw output (tail):');
|
|
245
250
|
console.log(plain.split('\n').slice(-15).join('\n'));
|