@clearlydev/nx-archweave 0.5.1 → 0.5.3

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.
Files changed (36) hide show
  1. package/README.md +6 -4
  2. package/dist/generators/_chunks/{chunk-ILICA6LC.js → chunk-23NN76E3.js} +1 -1
  3. package/dist/generators/_chunks/{chunk-624F6DEP.js → chunk-7EDJKUY4.js} +4 -106
  4. package/dist/generators/_chunks/chunk-AMOOSD5Q.js +79 -0
  5. package/dist/generators/_chunks/{chunk-M7OQWSNF.js → chunk-C2WELXMV.js} +11 -3
  6. package/dist/generators/_chunks/{chunk-WVMTOWLM.js → chunk-FBCIELXS.js} +4 -93
  7. package/dist/generators/_chunks/chunk-FZGN5NEP.js +31 -0
  8. package/dist/generators/_chunks/chunk-LJRFVE6B.js +55 -0
  9. package/dist/generators/_chunks/{chunk-Q7IYHKT3.js → chunk-M7UBCSYL.js} +5 -3
  10. package/dist/generators/_chunks/{chunk-ERCX7F6K.js → chunk-OEEWCZCO.js} +7 -7
  11. package/dist/generators/_chunks/chunk-SHKQSTV2.js +110 -0
  12. package/dist/generators/_chunks/{chunk-TJ6SCQLI.js → chunk-VCLVE4EQ.js} +10 -79
  13. package/dist/generators/_chunks/{chunk-ZNTGYYLU.js → chunk-VI7U5HS5.js} +5 -55
  14. package/dist/generators/_chunks/{chunk-AON4KGZT.js → chunk-WQDJYSOD.js} +13 -6
  15. package/dist/generators/_chunks/{chunk-N6B6VBHG.js → chunk-XXXON43Z.js} +205 -2
  16. package/dist/generators/_chunks/chunk-YEMQFSL6.js +95 -0
  17. package/dist/generators/_chunks/chunk-ZFCK3KMO.js +396 -0
  18. package/dist/generators/_chunks/{chunk-3ZHRZK5M.js → chunk-ZRHIFPUC.js} +4 -32
  19. package/dist/generators/add-agent-rules/generator.js +4 -3
  20. package/dist/generators/add-backend/generator.js +3 -2
  21. package/dist/generators/add-fsd-lite/generator.js +7 -5
  22. package/dist/generators/add-github-templates/generator.js +3 -2
  23. package/dist/generators/add-integration/generator.js +2 -2
  24. package/dist/generators/add-review/generator.js +3 -3
  25. package/dist/generators/doctor/generator.js +35 -21
  26. package/dist/generators/entity/generator.js +4 -3
  27. package/dist/generators/feature/generator.js +4 -3
  28. package/dist/generators/init/generator.js +30 -358
  29. package/dist/generators/install-integration/generator.js +2 -2
  30. package/dist/generators/page/generator.js +4 -3
  31. package/dist/generators/shared/generator.js +4 -3
  32. package/dist/generators/widget/generator.js +4 -3
  33. package/dist/migrations/update-0.5.3/add-toolkit-config-lint-input.js +62 -0
  34. package/generators.json +1 -1
  35. package/migrations.json +9 -0
  36. package/package.json +22 -9
@@ -18,8 +18,8 @@ import {
18
18
  import "../_chunks/chunk-34V6HAJT.js";
19
19
  import {
20
20
  diskRunNx
21
- } from "../_chunks/chunk-ILICA6LC.js";
22
- import "../_chunks/chunk-M7OQWSNF.js";
21
+ } from "../_chunks/chunk-23NN76E3.js";
22
+ import "../_chunks/chunk-C2WELXMV.js";
23
23
  import "../_chunks/chunk-5Z7VZPES.js";
24
24
 
25
25
  // ../integrations/dist/config/declare-enabled-integration.js
@@ -3,8 +3,9 @@ import {
3
3
  } from "../_chunks/chunk-H222FPLK.js";
4
4
  import {
5
5
  runFsdSlice
6
- } from "../_chunks/chunk-Q7IYHKT3.js";
7
- import "../_chunks/chunk-WVMTOWLM.js";
6
+ } from "../_chunks/chunk-M7UBCSYL.js";
7
+ import "../_chunks/chunk-FBCIELXS.js";
8
+ import "../_chunks/chunk-YEMQFSL6.js";
8
9
  import "../_chunks/chunk-TXAQ2GJC.js";
9
10
  import "../_chunks/chunk-6ZTIUBB2.js";
10
11
  import "../_chunks/chunk-YNMLB4DL.js";
@@ -12,7 +13,7 @@ import "../_chunks/chunk-JPS6XKYK.js";
12
13
  import {
13
14
  resolveDryRun
14
15
  } from "../_chunks/chunk-TUN34LAQ.js";
15
- import "../_chunks/chunk-M7OQWSNF.js";
16
+ import "../_chunks/chunk-C2WELXMV.js";
16
17
  import "../_chunks/chunk-5Z7VZPES.js";
17
18
 
18
19
  // src/generators/page/generator.ts
@@ -3,8 +3,9 @@ import {
3
3
  } from "../_chunks/chunk-H222FPLK.js";
4
4
  import {
5
5
  runFsdSlice
6
- } from "../_chunks/chunk-Q7IYHKT3.js";
7
- import "../_chunks/chunk-WVMTOWLM.js";
6
+ } from "../_chunks/chunk-M7UBCSYL.js";
7
+ import "../_chunks/chunk-FBCIELXS.js";
8
+ import "../_chunks/chunk-YEMQFSL6.js";
8
9
  import "../_chunks/chunk-TXAQ2GJC.js";
9
10
  import "../_chunks/chunk-6ZTIUBB2.js";
10
11
  import "../_chunks/chunk-YNMLB4DL.js";
@@ -12,7 +13,7 @@ import "../_chunks/chunk-JPS6XKYK.js";
12
13
  import {
13
14
  resolveDryRun
14
15
  } from "../_chunks/chunk-TUN34LAQ.js";
15
- import "../_chunks/chunk-M7OQWSNF.js";
16
+ import "../_chunks/chunk-C2WELXMV.js";
16
17
  import "../_chunks/chunk-5Z7VZPES.js";
17
18
 
18
19
  // src/generators/shared/generator.ts
@@ -3,8 +3,9 @@ import {
3
3
  } from "../_chunks/chunk-H222FPLK.js";
4
4
  import {
5
5
  runFsdSlice
6
- } from "../_chunks/chunk-Q7IYHKT3.js";
7
- import "../_chunks/chunk-WVMTOWLM.js";
6
+ } from "../_chunks/chunk-M7UBCSYL.js";
7
+ import "../_chunks/chunk-FBCIELXS.js";
8
+ import "../_chunks/chunk-YEMQFSL6.js";
8
9
  import "../_chunks/chunk-TXAQ2GJC.js";
9
10
  import "../_chunks/chunk-6ZTIUBB2.js";
10
11
  import "../_chunks/chunk-YNMLB4DL.js";
@@ -12,7 +13,7 @@ import "../_chunks/chunk-JPS6XKYK.js";
12
13
  import {
13
14
  resolveDryRun
14
15
  } from "../_chunks/chunk-TUN34LAQ.js";
15
- import "../_chunks/chunk-M7OQWSNF.js";
16
+ import "../_chunks/chunk-C2WELXMV.js";
16
17
  import "../_chunks/chunk-5Z7VZPES.js";
17
18
 
18
19
  // src/generators/widget/generator.ts
@@ -0,0 +1,62 @@
1
+ import {
2
+ applyLintInputs,
3
+ renderLintInputs
4
+ } from "../../generators/_chunks/chunk-ZFCK3KMO.js";
5
+ import "../../generators/_chunks/chunk-LJRFVE6B.js";
6
+ import "../../generators/_chunks/chunk-WQDJYSOD.js";
7
+ import "../../generators/_chunks/chunk-SHKQSTV2.js";
8
+ import "../../generators/_chunks/chunk-AMOOSD5Q.js";
9
+ import {
10
+ classifyFsdEslintConfig
11
+ } from "../../generators/_chunks/chunk-XXXON43Z.js";
12
+ import "../../generators/_chunks/chunk-YEMQFSL6.js";
13
+ import {
14
+ ESLINT_CONFIG_CANDIDATES
15
+ } from "../../generators/_chunks/chunk-6ZTIUBB2.js";
16
+ import "../../generators/_chunks/chunk-FZGN5NEP.js";
17
+ import "../../generators/_chunks/chunk-JPS6XKYK.js";
18
+ import {
19
+ readToolkitConfig,
20
+ treePackageManager
21
+ } from "../../generators/_chunks/chunk-C2WELXMV.js";
22
+ import {
23
+ runNxCommand
24
+ } from "../../generators/_chunks/chunk-5Z7VZPES.js";
25
+
26
+ // src/migrations/update-0.5.3/add-toolkit-config-lint-input.ts
27
+ import { getProjects } from "@nx/devkit";
28
+ async function addToolkitConfigLintInput(tree) {
29
+ const config = readToolkitConfig(tree);
30
+ if (config === null) return [];
31
+ const fsdProjects = [...getProjects(tree)].filter(([, project]) => wiresFsdRule(tree, project.root)).map(([name]) => name);
32
+ if (fsdProjects.length === 0) return [];
33
+ const outcome = applyLintInputs(tree, {
34
+ firstRun: true,
35
+ fsdProjects,
36
+ dryRun: false,
37
+ runNx: runNxCommand(treePackageManager(tree, config))
38
+ });
39
+ if (outcome === void 0 || outcome.action !== "snippet") return [];
40
+ return asNextSteps(renderLintInputs(outcome, false));
41
+ }
42
+ function asNextSteps(report) {
43
+ const reason = report.filter((line) => /^ {2}\S/.test(line)).map((line) => line.trim()).join(" ");
44
+ const steps = [];
45
+ for (const line of report.filter((entry) => entry.startsWith(" ")).map((entry) => entry.slice(4).trimEnd())) {
46
+ const previous = steps.at(-1);
47
+ const continues = previous !== void 0 && !/^\s/.test(previous) && !/^\s/.test(line) && !/[.:]$/.test(previous);
48
+ if (continues) steps[steps.length - 1] = `${previous} ${line}`;
49
+ else steps.push(line);
50
+ }
51
+ return [reason, ...steps];
52
+ }
53
+ function wiresFsdRule(tree, root) {
54
+ const prefix = root === "" || root === "." ? "" : `${root}/`;
55
+ return ESLINT_CONFIG_CANDIDATES.some((name) => {
56
+ const text = tree.read(`${prefix}${name}`, "utf-8");
57
+ return text !== null && classifyFsdEslintConfig(text) === "applied";
58
+ });
59
+ }
60
+ export {
61
+ addToolkitConfigLintInput as default
62
+ };
package/generators.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "add-review": {
20
20
  "factory": "./dist/generators/add-review/generator",
21
21
  "schema": "./src/generators/add-review/schema.json",
22
- "description": "Install the Claude PR review workflow"
22
+ "description": "Add an AI PR review workflow (beta)"
23
23
  },
24
24
  "add-backend": {
25
25
  "factory": "./dist/generators/add-backend/generator",
@@ -0,0 +1,9 @@
1
+ {
2
+ "generators": {
3
+ "add-toolkit-config-lint-input": {
4
+ "version": "0.5.3",
5
+ "description": "Add toolkit.config.json to the inputs of the lint targets @nx/eslint/plugin infers, so Nx re-runs lint after the FSD policy changes",
6
+ "implementation": "./dist/migrations/update-0.5.3/add-toolkit-config-lint-input"
7
+ }
8
+ }
9
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@clearlydev/nx-archweave",
3
- "version": "0.5.1",
4
- "description": "Nx generators for an FSD Lite lint rule, frontend/backend boundaries, AI agent rules, GitHub templates and optional AI PR review",
3
+ "version": "0.5.3",
4
+ "description": "Nx plugin and CLI that set up Feature-Sliced Design (FSD) import linting, frontend/backend module boundaries and AI agent rule files. AI PR review is optional (beta).",
5
5
  "license": "MIT",
6
6
  "author": "clearlydev (https://github.com/clearlydev)",
7
7
  "engines": {
@@ -19,17 +19,25 @@
19
19
  "keywords": [
20
20
  "nx",
21
21
  "nx-plugin",
22
- "generators",
23
22
  "monorepo",
24
- "scaffolding",
25
23
  "feature-sliced-design",
26
24
  "fsd",
27
- "ai",
25
+ "eslint",
26
+ "eslint-rule",
27
+ "module-boundaries",
28
+ "frontend-architecture",
29
+ "steiger",
30
+ "generators",
31
+ "ai-agents",
32
+ "agents-md",
33
+ "claude-md",
28
34
  "code-review",
29
- "claude",
30
- "gemini",
31
- "gpt",
32
- "cursor"
35
+ "github-actions",
36
+ "react",
37
+ "nextjs",
38
+ "nestjs",
39
+ "express",
40
+ "typescript"
33
41
  ],
34
42
  "sideEffects": false,
35
43
  "publishConfig": {
@@ -44,6 +52,9 @@
44
52
  "module": "./dist/index.js",
45
53
  "types": "./dist/index.d.ts",
46
54
  "generators": "./generators.json",
55
+ "nx-migrations": {
56
+ "migrations": "./migrations.json"
57
+ },
47
58
  "bin": {
48
59
  "archweave-review-verdict": "dist/bin/review-verdict.js"
49
60
  },
@@ -65,10 +76,12 @@
65
76
  "files": [
66
77
  "dist",
67
78
  "generators.json",
79
+ "migrations.json",
68
80
  "src/generators/*/schema.json",
69
81
  "!**/*.tsbuildinfo",
70
82
  "!**/*.d.ts.map",
71
83
  "!dist/generators/**/*.d.ts",
84
+ "!dist/migrations/**/*.d.ts",
72
85
  "!dist/runtime/**/*.d.ts",
73
86
  "!dist/bin/**/*.d.ts"
74
87
  ],