@webpieces/dev-config 0.2.95 → 0.2.98

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 (181) hide show
  1. package/config/eslint/base.mjs +1 -1
  2. package/executors.json +6 -91
  3. package/package.json +6 -19
  4. package/{executors → src/executors}/help/executor.d.ts +4 -2
  5. package/src/executors/help/executor.js.map +1 -0
  6. package/src/executors/validate-eslint-sync/executor.js.map +1 -0
  7. package/{executors → src/executors}/validate-versions-locked/executor.js +2 -1
  8. package/src/executors/validate-versions-locked/executor.js.map +1 -0
  9. package/src/index.d.ts +1 -1
  10. package/src/index.js +1 -1
  11. package/src/index.js.map +1 -1
  12. package/src/plugin.d.ts +86 -0
  13. package/{plugin.js → src/plugin.js} +31 -15
  14. package/src/plugin.js.map +1 -0
  15. package/src/toError.d.ts +5 -0
  16. package/src/toError.js +37 -0
  17. package/src/toError.js.map +1 -0
  18. package/templates/eslint.webpieces.config.mjs +1 -1
  19. package/architecture/executors/diff-utils.d.ts +0 -24
  20. package/architecture/executors/diff-utils.js +0 -119
  21. package/architecture/executors/diff-utils.js.map +0 -1
  22. package/architecture/executors/diff-utils.ts +0 -127
  23. package/architecture/executors/generate/executor.d.ts +0 -16
  24. package/architecture/executors/generate/executor.js +0 -44
  25. package/architecture/executors/generate/executor.js.map +0 -1
  26. package/architecture/executors/generate/executor.ts +0 -59
  27. package/architecture/executors/generate/schema.json +0 -14
  28. package/architecture/executors/validate-architecture-unchanged/executor.d.ts +0 -17
  29. package/architecture/executors/validate-architecture-unchanged/executor.js +0 -229
  30. package/architecture/executors/validate-architecture-unchanged/executor.js.map +0 -1
  31. package/architecture/executors/validate-architecture-unchanged/executor.ts +0 -251
  32. package/architecture/executors/validate-architecture-unchanged/schema.json +0 -14
  33. package/architecture/executors/validate-code/executor.d.ts +0 -78
  34. package/architecture/executors/validate-code/executor.js +0 -243
  35. package/architecture/executors/validate-code/executor.js.map +0 -1
  36. package/architecture/executors/validate-code/executor.ts +0 -406
  37. package/architecture/executors/validate-code/schema.json +0 -227
  38. package/architecture/executors/validate-dtos/executor.d.ts +0 -42
  39. package/architecture/executors/validate-dtos/executor.js +0 -561
  40. package/architecture/executors/validate-dtos/executor.js.map +0 -1
  41. package/architecture/executors/validate-dtos/executor.ts +0 -689
  42. package/architecture/executors/validate-dtos/schema.json +0 -33
  43. package/architecture/executors/validate-modified-files/executor.d.ts +0 -25
  44. package/architecture/executors/validate-modified-files/executor.js +0 -501
  45. package/architecture/executors/validate-modified-files/executor.js.map +0 -1
  46. package/architecture/executors/validate-modified-files/executor.ts +0 -571
  47. package/architecture/executors/validate-modified-files/schema.json +0 -25
  48. package/architecture/executors/validate-modified-methods/executor.d.ts +0 -31
  49. package/architecture/executors/validate-modified-methods/executor.js +0 -694
  50. package/architecture/executors/validate-modified-methods/executor.js.map +0 -1
  51. package/architecture/executors/validate-modified-methods/executor.ts +0 -797
  52. package/architecture/executors/validate-modified-methods/schema.json +0 -25
  53. package/architecture/executors/validate-new-methods/executor.d.ts +0 -28
  54. package/architecture/executors/validate-new-methods/executor.js +0 -513
  55. package/architecture/executors/validate-new-methods/executor.js.map +0 -1
  56. package/architecture/executors/validate-new-methods/executor.ts +0 -584
  57. package/architecture/executors/validate-new-methods/schema.json +0 -25
  58. package/architecture/executors/validate-no-any-unknown/executor.d.ts +0 -42
  59. package/architecture/executors/validate-no-any-unknown/executor.js +0 -462
  60. package/architecture/executors/validate-no-any-unknown/executor.js.map +0 -1
  61. package/architecture/executors/validate-no-any-unknown/executor.ts +0 -540
  62. package/architecture/executors/validate-no-any-unknown/schema.json +0 -24
  63. package/architecture/executors/validate-no-architecture-cycles/executor.d.ts +0 -16
  64. package/architecture/executors/validate-no-architecture-cycles/executor.js +0 -48
  65. package/architecture/executors/validate-no-architecture-cycles/executor.js.map +0 -1
  66. package/architecture/executors/validate-no-architecture-cycles/executor.ts +0 -60
  67. package/architecture/executors/validate-no-architecture-cycles/schema.json +0 -8
  68. package/architecture/executors/validate-no-destructure/executor.d.ts +0 -52
  69. package/architecture/executors/validate-no-destructure/executor.js +0 -491
  70. package/architecture/executors/validate-no-destructure/executor.js.map +0 -1
  71. package/architecture/executors/validate-no-destructure/executor.ts +0 -578
  72. package/architecture/executors/validate-no-destructure/schema.json +0 -24
  73. package/architecture/executors/validate-no-direct-api-resolver/executor.d.ts +0 -47
  74. package/architecture/executors/validate-no-direct-api-resolver/executor.js +0 -566
  75. package/architecture/executors/validate-no-direct-api-resolver/executor.js.map +0 -1
  76. package/architecture/executors/validate-no-direct-api-resolver/executor.ts +0 -666
  77. package/architecture/executors/validate-no-direct-api-resolver/schema.json +0 -29
  78. package/architecture/executors/validate-no-inline-types/executor.d.ts +0 -91
  79. package/architecture/executors/validate-no-inline-types/executor.js +0 -669
  80. package/architecture/executors/validate-no-inline-types/executor.js.map +0 -1
  81. package/architecture/executors/validate-no-inline-types/executor.ts +0 -775
  82. package/architecture/executors/validate-no-inline-types/schema.json +0 -24
  83. package/architecture/executors/validate-no-skiplevel-deps/executor.d.ts +0 -19
  84. package/architecture/executors/validate-no-skiplevel-deps/executor.js +0 -227
  85. package/architecture/executors/validate-no-skiplevel-deps/executor.js.map +0 -1
  86. package/architecture/executors/validate-no-skiplevel-deps/executor.ts +0 -267
  87. package/architecture/executors/validate-no-skiplevel-deps/schema.json +0 -8
  88. package/architecture/executors/validate-packagejson/executor.d.ts +0 -16
  89. package/architecture/executors/validate-packagejson/executor.js +0 -57
  90. package/architecture/executors/validate-packagejson/executor.js.map +0 -1
  91. package/architecture/executors/validate-packagejson/executor.ts +0 -74
  92. package/architecture/executors/validate-packagejson/schema.json +0 -8
  93. package/architecture/executors/validate-prisma-converters/executor.d.ts +0 -60
  94. package/architecture/executors/validate-prisma-converters/executor.js +0 -634
  95. package/architecture/executors/validate-prisma-converters/executor.js.map +0 -1
  96. package/architecture/executors/validate-prisma-converters/executor.ts +0 -822
  97. package/architecture/executors/validate-prisma-converters/schema.json +0 -38
  98. package/architecture/executors/validate-return-types/executor.d.ts +0 -29
  99. package/architecture/executors/validate-return-types/executor.js +0 -439
  100. package/architecture/executors/validate-return-types/executor.js.map +0 -1
  101. package/architecture/executors/validate-return-types/executor.ts +0 -524
  102. package/architecture/executors/validate-return-types/schema.json +0 -24
  103. package/architecture/executors/visualize/executor.d.ts +0 -17
  104. package/architecture/executors/visualize/executor.js +0 -49
  105. package/architecture/executors/visualize/executor.js.map +0 -1
  106. package/architecture/executors/visualize/executor.ts +0 -63
  107. package/architecture/executors/visualize/schema.json +0 -14
  108. package/architecture/index.d.ts +0 -19
  109. package/architecture/index.js +0 -23
  110. package/architecture/index.js.map +0 -1
  111. package/architecture/index.ts +0 -20
  112. package/architecture/lib/graph-comparator.d.ts +0 -39
  113. package/architecture/lib/graph-comparator.js +0 -100
  114. package/architecture/lib/graph-comparator.js.map +0 -1
  115. package/architecture/lib/graph-comparator.ts +0 -141
  116. package/architecture/lib/graph-generator.d.ts +0 -19
  117. package/architecture/lib/graph-generator.js +0 -84
  118. package/architecture/lib/graph-generator.js.map +0 -1
  119. package/architecture/lib/graph-generator.ts +0 -97
  120. package/architecture/lib/graph-loader.d.ts +0 -31
  121. package/architecture/lib/graph-loader.js +0 -98
  122. package/architecture/lib/graph-loader.js.map +0 -1
  123. package/architecture/lib/graph-loader.ts +0 -116
  124. package/architecture/lib/graph-sorter.d.ts +0 -37
  125. package/architecture/lib/graph-sorter.js +0 -110
  126. package/architecture/lib/graph-sorter.js.map +0 -1
  127. package/architecture/lib/graph-sorter.ts +0 -137
  128. package/architecture/lib/graph-visualizer.d.ts +0 -29
  129. package/architecture/lib/graph-visualizer.js +0 -217
  130. package/architecture/lib/graph-visualizer.js.map +0 -1
  131. package/architecture/lib/graph-visualizer.ts +0 -231
  132. package/architecture/lib/package-validator.d.ts +0 -38
  133. package/architecture/lib/package-validator.js +0 -126
  134. package/architecture/lib/package-validator.js.map +0 -1
  135. package/architecture/lib/package-validator.ts +0 -170
  136. package/eslint-plugin/__tests__/catch-error-pattern.test.ts +0 -374
  137. package/eslint-plugin/__tests__/max-file-lines.test.ts +0 -207
  138. package/eslint-plugin/__tests__/max-method-lines.test.ts +0 -258
  139. package/eslint-plugin/__tests__/no-unmanaged-exceptions.test.ts +0 -359
  140. package/eslint-plugin/index.d.ts +0 -23
  141. package/eslint-plugin/index.js +0 -30
  142. package/eslint-plugin/index.js.map +0 -1
  143. package/eslint-plugin/index.ts +0 -29
  144. package/eslint-plugin/rules/catch-error-pattern.d.ts +0 -11
  145. package/eslint-plugin/rules/catch-error-pattern.js +0 -143
  146. package/eslint-plugin/rules/catch-error-pattern.js.map +0 -1
  147. package/eslint-plugin/rules/catch-error-pattern.ts +0 -246
  148. package/eslint-plugin/rules/enforce-architecture.d.ts +0 -15
  149. package/eslint-plugin/rules/enforce-architecture.js +0 -476
  150. package/eslint-plugin/rules/enforce-architecture.js.map +0 -1
  151. package/eslint-plugin/rules/enforce-architecture.ts +0 -543
  152. package/eslint-plugin/rules/max-file-lines.d.ts +0 -12
  153. package/eslint-plugin/rules/max-file-lines.js +0 -257
  154. package/eslint-plugin/rules/max-file-lines.js.map +0 -1
  155. package/eslint-plugin/rules/max-file-lines.ts +0 -272
  156. package/eslint-plugin/rules/max-method-lines.d.ts +0 -12
  157. package/eslint-plugin/rules/max-method-lines.js +0 -240
  158. package/eslint-plugin/rules/max-method-lines.js.map +0 -1
  159. package/eslint-plugin/rules/max-method-lines.ts +0 -287
  160. package/eslint-plugin/rules/no-unmanaged-exceptions.d.ts +0 -22
  161. package/eslint-plugin/rules/no-unmanaged-exceptions.js +0 -160
  162. package/eslint-plugin/rules/no-unmanaged-exceptions.js.map +0 -1
  163. package/eslint-plugin/rules/no-unmanaged-exceptions.ts +0 -179
  164. package/executors/help/executor.js.map +0 -1
  165. package/executors/help/executor.ts +0 -61
  166. package/executors/validate-eslint-sync/executor.js.map +0 -1
  167. package/executors/validate-eslint-sync/executor.ts +0 -87
  168. package/executors/validate-versions-locked/executor.js.map +0 -1
  169. package/executors/validate-versions-locked/executor.ts +0 -368
  170. package/plugin/README.md +0 -243
  171. package/plugin/index.d.ts +0 -4
  172. package/plugin/index.js +0 -8
  173. package/plugin/index.js.map +0 -1
  174. package/plugin/index.ts +0 -4
  175. /package/{executors → src/executors}/help/executor.js +0 -0
  176. /package/{executors → src/executors}/help/schema.json +0 -0
  177. /package/{executors → src/executors}/validate-eslint-sync/executor.d.ts +0 -0
  178. /package/{executors → src/executors}/validate-eslint-sync/executor.js +0 -0
  179. /package/{executors → src/executors}/validate-eslint-sync/schema.json +0 -0
  180. /package/{executors → src/executors}/validate-versions-locked/executor.d.ts +0 -0
  181. /package/{executors → src/executors}/validate-versions-locked/schema.json +0 -0
@@ -1,7 +1,7 @@
1
1
  // @webpieces/dev-config base ESLint configuration
2
2
  // Consumer projects can extend this configuration
3
3
 
4
- import webpiecesPlugin from '../../eslint-plugin/index.js';
4
+ import webpiecesPlugin from '@webpieces/eslint-plugin';
5
5
 
6
6
  /**
7
7
  * WebPieces base ESLint configuration using flat config format.
package/executors.json CHANGED
@@ -1,104 +1,19 @@
1
1
  {
2
2
  "executors": {
3
- "generate": {
4
- "implementation": "./architecture/executors/generate/executor",
5
- "schema": "./architecture/executors/generate/schema.json",
6
- "description": "Generate the architecture dependency graph and save it"
7
- },
8
- "visualize": {
9
- "implementation": "./architecture/executors/visualize/executor",
10
- "schema": "./architecture/executors/visualize/schema.json",
11
- "description": "Generate visual representations of the architecture graph"
12
- },
13
- "validate-no-architecture-cycles": {
14
- "implementation": "./architecture/executors/validate-no-architecture-cycles/executor",
15
- "schema": "./architecture/executors/validate-no-architecture-cycles/schema.json",
16
- "description": "Validate the architecture graph has no circular project dependencies"
17
- },
18
- "validate-architecture-unchanged": {
19
- "implementation": "./architecture/executors/validate-architecture-unchanged/executor",
20
- "schema": "./architecture/executors/validate-architecture-unchanged/schema.json",
21
- "description": "Validate the architecture graph matches the saved blessed graph"
22
- },
23
- "validate-no-skiplevel-deps": {
24
- "implementation": "./architecture/executors/validate-no-skiplevel-deps/executor",
25
- "schema": "./architecture/executors/validate-no-skiplevel-deps/schema.json",
26
- "description": "Validate no project has redundant transitive dependencies"
27
- },
28
- "validate-packagejson": {
29
- "implementation": "./architecture/executors/validate-packagejson/executor",
30
- "schema": "./architecture/executors/validate-packagejson/schema.json",
31
- "description": "Validate package.json dependencies match project.json build dependencies"
32
- },
33
- "validate-new-methods": {
34
- "implementation": "./architecture/executors/validate-new-methods/executor",
35
- "schema": "./architecture/executors/validate-new-methods/schema.json",
36
- "description": "Validate new methods don't exceed max line count (only runs in affected mode)"
37
- },
38
- "validate-modified-methods": {
39
- "implementation": "./architecture/executors/validate-modified-methods/executor",
40
- "schema": "./architecture/executors/validate-modified-methods/schema.json",
41
- "description": "Validate modified methods don't exceed max line count (encourages gradual cleanup)"
42
- },
43
3
  "help": {
44
- "implementation": "./executors/help/executor",
45
- "schema": "./executors/help/schema.json",
4
+ "implementation": "./src/executors/help/executor",
5
+ "schema": "./src/executors/help/schema.json",
46
6
  "description": "Display help for @webpieces/dev-config commands and targets"
47
7
  },
48
8
  "validate-eslint-sync": {
49
- "implementation": "./executors/validate-eslint-sync/executor",
50
- "schema": "./executors/validate-eslint-sync/schema.json",
9
+ "implementation": "./src/executors/validate-eslint-sync/executor",
10
+ "schema": "./src/executors/validate-eslint-sync/schema.json",
51
11
  "description": "Validate that workspace and template eslint.webpieces.config.mjs files have identical rules"
52
12
  },
53
13
  "validate-versions-locked": {
54
- "implementation": "./executors/validate-versions-locked/executor",
55
- "schema": "./executors/validate-versions-locked/schema.json",
14
+ "implementation": "./src/executors/validate-versions-locked/executor",
15
+ "schema": "./src/executors/validate-versions-locked/schema.json",
56
16
  "description": "Validate package.json versions are locked (no semver ranges) and npm ci compatible"
57
- },
58
- "validate-modified-files": {
59
- "implementation": "./architecture/executors/validate-modified-files/executor",
60
- "schema": "./architecture/executors/validate-modified-files/schema.json",
61
- "description": "Validate modified files don't exceed max line count"
62
- },
63
- "validate-code": {
64
- "implementation": "./architecture/executors/validate-code/executor",
65
- "schema": "./architecture/executors/validate-code/schema.json",
66
- "description": "Combined validation for new methods, modified methods, and file sizes"
67
- },
68
- "validate-return-types": {
69
- "implementation": "./architecture/executors/validate-return-types/executor",
70
- "schema": "./architecture/executors/validate-return-types/schema.json",
71
- "description": "Validate methods have explicit return type annotations"
72
- },
73
- "validate-no-inline-types": {
74
- "implementation": "./architecture/executors/validate-no-inline-types/executor",
75
- "schema": "./architecture/executors/validate-no-inline-types/schema.json",
76
- "description": "Validate no inline type literals are used - prefer named types"
77
- },
78
- "validate-no-any-unknown": {
79
- "implementation": "./architecture/executors/validate-no-any-unknown/executor",
80
- "schema": "./architecture/executors/validate-no-any-unknown/schema.json",
81
- "description": "Validate no any/unknown keywords are used - use specific types instead"
82
- },
83
- "validate-dtos": {
84
- "implementation": "./architecture/executors/validate-dtos/executor",
85
- "schema": "./architecture/executors/validate-dtos/schema.json",
86
- "description": "Validate DTO fields match Prisma Dbo model fields"
87
- },
88
- "validate-prisma-converters": {
89
- "implementation": "./architecture/executors/validate-prisma-converters/executor",
90
- "schema": "./architecture/executors/validate-prisma-converters/schema.json",
91
- "description": "Validate Prisma converter method patterns and Dto creation locations"
92
- },
93
- "validate-no-destructure": {
94
- "implementation": "./architecture/executors/validate-no-destructure/executor",
95
- "schema": "./architecture/executors/validate-no-destructure/schema.json",
96
- "description": "Validate no destructuring patterns are used - use explicit property access instead"
97
- },
98
- "validate-no-direct-api-resolver": {
99
- "implementation": "./architecture/executors/validate-no-direct-api-resolver/executor",
100
- "schema": "./architecture/executors/validate-no-direct-api-resolver/schema.json",
101
- "description": "Validate resolvers use services (not APIs) and components subscribe to observables (not route.snapshot.data)"
102
17
  }
103
18
  }
104
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webpieces/dev-config",
3
- "version": "0.2.95",
3
+ "version": "0.2.98",
4
4
  "description": "Development configuration, scripts, and patterns for WebPieces projects",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -17,43 +17,30 @@
17
17
  ".": "./src/index.js",
18
18
  "./package.json": "./package.json",
19
19
  "./eslint": "./config/eslint/base.mjs",
20
- "./eslint-plugin": "./eslint-plugin/index.js",
21
20
  "./jest": "./config/jest/preset.js",
22
21
  "./tsconfig": "./config/typescript/tsconfig.base.json",
23
- "./plugin": "./plugin.js",
24
- "./plugins/circular-deps": "./plugins/circular-deps/index.js",
25
- "./architecture": "./architecture/index.js",
22
+ "./plugin": "./src/plugin.js",
26
23
  "./executors.json": "./executors.json",
27
24
  "./generators.json": "./generators.json"
28
25
  },
29
26
  "files": [
30
27
  "bin/**/*",
31
28
  "config/**/*",
32
- "eslint-plugin/**/*",
33
29
  "patterns/**/*",
34
- "plugins/**/*",
35
- "plugin/**/*",
36
- "plugin.js",
37
30
  "templates/**/*",
38
- "executors/**/*",
39
31
  "src/**/*",
40
32
  "generators.json",
41
- "architecture/**/*",
42
33
  "executors.json",
43
34
  "README.md"
44
35
  ],
36
+ "dependencies": {
37
+ "@webpieces/eslint-plugin": "0.2.98",
38
+ "@webpieces/architecture-validators": "0.2.98"
39
+ },
45
40
  "peerDependencies": {
46
41
  "eslint": ">=8.0.0",
47
42
  "@nx/devkit": ">=18.0.0"
48
43
  },
49
- "keywords": [
50
- "webpieces",
51
- "config",
52
- "eslint",
53
- "scripts",
54
- "typescript",
55
- "jest"
56
- ],
57
44
  "author": "Dean Hiller",
58
45
  "license": "Apache-2.0",
59
46
  "repository": {
@@ -1,6 +1,8 @@
1
1
  import type { ExecutorContext } from '@nx/devkit';
2
2
  export interface HelpExecutorOptions {
3
3
  }
4
- export default function helpExecutor(options: HelpExecutorOptions, context: ExecutorContext): Promise<{
4
+ type HelpExecutorResult = {
5
5
  success: true;
6
- }>;
6
+ };
7
+ export default function helpExecutor(options: HelpExecutorOptions, context: ExecutorContext): Promise<HelpExecutorResult>;
8
+ export {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../pack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AAG,CAAC,MAAM,IAAI,wBAAwB,KAAK,uCAAuC,CAAC,CAAC;IAC5F,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,iCAAiC,KAAK,6BAA6B,CAAC,CAAC;IAC3F,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC7B,CAAC","sourcesContent":["import type { ExecutorContext } from '@nx/devkit';\n\nexport interface HelpExecutorOptions {}\n\ntype HelpExecutorResult = { success: true };\n\nexport default async function helpExecutor(\n options: HelpExecutorOptions,\n context: ExecutorContext\n): Promise<HelpExecutorResult> {\n // ANSI color codes\n const GREEN = '\\x1b[32m\\x1b[1m';\n const BOLD = '\\x1b[1m';\n const RESET = '\\x1b[0m';\n\n console.log('');\n console.log(`${GREEN}💡 @webpieces/dev-config - Available Commands${RESET}`);\n console.log('');\n console.log(`${BOLD}📝 Available npm scripts (convenient shortcuts):${RESET}`);\n console.log('');\n console.log(' Architecture graph:');\n console.log(' npm run arch:generate # Generate dependency graph');\n console.log(' npm run arch:visualize # Visualize dependency graph');\n console.log('');\n console.log(' Validation:');\n console.log(' npm run arch:validate # Quick validation (no-cycles + no-skiplevel-deps)');\n console.log(' npm run arch:validate-all # Full arch validation (+ unchanged check)');\n console.log(' npm run arch:check-circular # Check all projects for circular deps');\n console.log(' npm run arch:check-circular-affected # Check affected projects only');\n console.log(' npm run arch:validate-complete # Complete validation (arch + circular)');\n console.log('');\n console.log(`${BOLD}📝 Available Nx targets:${RESET}`);\n console.log('');\n console.log(' Workspace-level architecture validation:');\n console.log(' nx run architecture:generate # Generate dependency graph');\n console.log(' nx run architecture:visualize # Visualize dependency graph');\n console.log(' nx run architecture:validate-no-architecture-cycles # Check for circular project dependencies');\n console.log(' nx run architecture:validate-no-skiplevel-deps # Check for redundant dependencies');\n console.log(' nx run architecture:validate-architecture-unchanged # Validate against blessed graph');\n console.log('');\n console.log(' Per-project file import cycle checking:');\n console.log(' nx run <project>:validate-no-file-import-cycles # Check project for file import cycles');\n console.log(' nx affected --target=validate-no-file-import-cycles # Check all affected projects');\n console.log(' nx run-many --target=validate-no-file-import-cycles --all # Check all projects');\n console.log('');\n console.log(' Per-project CI target (lint + build + test):');\n console.log(' nx run <project>:ci # Run lint, build, test together');\n console.log(' nx run-many --target=ci --all # Run ci for all projects');\n console.log('');\n console.log(' Execution order (test waits for build via targetDefaults):');\n console.log(' ci (nx:noop)');\n console.log(' ├── lint ─────────────────┐');\n console.log(' ├── build ────────────────┼── run in parallel');\n console.log(' └── test ─────────────────┘');\n console.log(' └── depends on build (waits)');\n console.log('');\n console.log(`${GREEN}💡 Quick start:${RESET}`);\n console.log(` ${BOLD}npm run arch:generate${RESET} # Generate the graph first`);\n console.log(` ${BOLD}npm run arch:validate-complete${RESET} # Run complete validation`);\n console.log('');\n\n return { success: true };\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../packages/tooling/dev-config/src/executors/validate-eslint-sync/executor.ts"],"names":[],"mappings":";;AAoBA,6CAkCC;AArDD,2BAAkC;AAClC,+BAA4B;AAC5B,mCAAoC;AAQpC,SAAS,aAAa,CAAC,OAAe;IAClC,OAAO,IAAA,mBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAe;IACrC,6CAA6C;IAC7C,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AACjD,CAAC;AAEc,KAAK,UAAU,0BAA0B,CACpD,OAAkC,EAClC,OAAwB;IAExB,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAEnC,MAAM,YAAY,GAAG,IAAA,WAAI,EAAC,aAAa,EAAE,mEAAmE,CAAC,CAAC;IAC9G,MAAM,aAAa,GAAG,I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CAAC,QAAQ,YAAY,EAAE,CAAC,CAAC;IACtC,OAAO,CAAC,KAAK,CAAC,QAAQ,aAAa,EAAE,CAAC,CAAC;IACvC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,OAAO,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;IACzE,OAAO,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC3E,OAAO,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;IACzE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACzB,OAAO,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;IACtG,OAAO,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;IAC/D,OAAO,CAAC,KAAK,CAAC,8FAA8F,CAAC,CAAC;IAC9G,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,OAAO,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;IAClF,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC;AAED,SAAS,mBAAmB,CAAC,OAAe;IACxC,mEAAmE;IACnE,wCAAwC;IACxC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAC7D,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAClF,CAAC;IAED,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3B,CAAC","sourcesContent":["import type { ExecutorContext } from '@nx/devkit';\nimport { readFileSync } from 'fs';\nimport { join } from 'path';\nimport { createHash } from 'crypto';\n\nexport interface ValidateEslintSyncOptions {}\n\nexport interface ExecutorResult {\n success: boolean;\n}\n\nfunction calculateHash(content: string): string {\n return createHash('sha256').update(content).digest('hex');\n}\n\nfunction normalizeContent(content: string): string {\n // Normalize line endings and trim whitespace\n return content.replace(/\\r\\n/g, '\\n').trim();\n}\n\nexport default async function validateEslintSyncExecutor(\n options: ValidateEslintSyncOptions,\n context: ExecutorContext\n): Promise<ExecutorResult> {\n const workspaceRoot = context.root;\n\n const templatePath = join(workspaceRoot, 'packages/tooling/dev-config/templates/eslint.webpieces.config.mjs');\n const workspacePath = join(workspaceRoot, 'eslint.webpieces.config.mjs');\n\n // eslint-disable-next-line @webpieces/no-unmanaged-exceptions\n try {\n const templateContent = readFileSync(templatePath, 'utf-8');\n const workspaceContent = readFileSync(workspacePath, 'utf-8');\n\n const templateRules = extractRulesSection(templateContent);\n const workspaceRules = extractRulesSection(workspaceContent);\n\n const templateHash = calculateHash(normalizeContent(templateRules));\n const workspaceHash = calculateHash(normalizeContent(workspaceRules));\n\n if (templateHash !== workspaceHash) {\n printValidationError(templatePath, workspacePath);\n return { success: false };\n }\n\n console.log('✅ ESLint configuration sync validated - rules match!');\n return { success: true };\n\n } catch (err: unknown) {\n // Error occurred during validation - log and fail\n // eslint-disable-next-line @webpieces/catch-error-pattern\n console.error('❌ Error validating ESLint sync:', err);\n return { success: false };\n }\n}\n\nfunction printValidationError(templatePath: string, workspacePath: string): void {\n console.error('');\n console.error('❌ ESLint configuration sync validation FAILED');\n console.error('');\n console.error('The @webpieces ESLint rules must be identical in both files:');\n console.error(` 1. ${templatePath}`);\n console.error(` 2. ${workspacePath}`);\n console.error('');\n console.error('These files must have identical rules sections so that:');\n console.error(' - External clients get the same rules we use internally');\n console.error(' - We \"eat our own dog food\" - same rules for everyone');\n console.error('');\n console.error('To fix:');\n console.error(' 1. Modify the rules in ONE file (recommend: templates/eslint.webpieces.config.mjs)');\n console.error(' 2. Copy the rules section to the other file');\n console.error(' 3. Keep import statements different (template uses npm, workspace uses loadWorkspaceRules)');\n console.error('');\n console.error('Customization for webpieces workspace goes in: eslint.config.mjs');\n console.error('');\n}\n\nfunction extractRulesSection(content: string): string {\n // Extract everything between \"export default [\" and the final \"];\"\n // This includes the rules configuration\n const match = content.match(/export default \\[([\\s\\S]*)\\];/);\n if (!match) {\n throw new Error('Could not extract rules section - export default not found');\n }\n\n return match[1].trim();\n}\n"]}
@@ -277,7 +277,8 @@ async function runExecutor(_options, context) {
277
277
  console.log('\n🔒 Validating Package Versions are LOCKED and CONSISTENT\n');
278
278
  const workspaceRoot = context.root;
279
279
  // Step 1: Check for semver ranges (FAILS if any found)
280
- const { errors: semverErrors } = checkSemverRanges(workspaceRoot);
280
+ const semverResult = checkSemverRanges(workspaceRoot);
281
+ const semverErrors = semverResult.errors;
281
282
  const packageFiles = findPackageJsonFiles(workspaceRoot);
282
283
  // Step 2: Check for version conflicts across package.json files
283
284
  const versionConflicts = checkVersionConflicts(workspaceRoot);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../packages/tooling/dev-config/src/executors/validate-versions-locked/executor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AA8TH,8BAsCC;;AAjWD,+CAAyB;AACzB,mDAA6B;AAC7B,2CAAwC;AAUxC,iGAAiG;AACjG,uEAAuE;AACvE,SAAS,oBAAoB,CAAC,GAAW,EAAE,QAAQ,GAAG,EAAE;IACpD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAElC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACtC,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAE/C,yBAAyB;QACzB,IACI,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAC/D,IAAI,CACP,EACH,CAAC;YACC,SAAS;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BAAqB,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;IACxD,OAAO,CAAC,GAAG,CAAC,yCAAyC,YAAY,EAAE,CAAC,CAAC;IACrE,OAAO,CAAC,GAAG,CAAC,yBAAyB,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC;IAEhE,iDAAiD;IACjD,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;QACnB,kCAAkC,CAAC,YAAY,CAAC,CAAC;QACjD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED,4BAA4B;IAC5B,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,kGAAkG,CAAC,CAAC;QAChH,OAAO,CAAC,GAAG,CAAC,wGAAwG,CAAC,CAAC;QACtH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;IAC9E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC7B,CAAC","sourcesContent":["/**\n * Validate Versions Locked Executor\n *\n * Validates that package.json versions are:\n * 1. LOCKED (exact versions, no semver ranges like ^, ~, *)\n * 2. CONSISTENT across all package.json files (no version conflicts)\n *\n * Why locked versions matter:\n * - Micro bugs ARE introduced via patch versions (1.4.5 → 1.4.6)\n * - git bisect fails when software changes OUTSIDE of git\n * - Library upgrades must be explicit via PR/commit, not implicit drift\n *\n * Usage:\n * nx run architecture:validate-versions-locked\n */\n\nimport type { ExecutorContext } from '@nx/devkit';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { toError } from '../../toError';\n\nexport interface ValidateVersionsLockedOptions {\n // No options needed\n}\n\nexport interface ExecutorResult {\n success: boolean;\n}\n\n// webpieces-disable max-lines-new-methods -- Existing method from renamed validate-versions file\n// Find all package.json files except node_modules, dist, .nx, .angular\nfunction findPackageJsonFiles(dir: string, basePath = ''): string[] {\n const files: string[] = [];\n const items = fs.readdirSync(dir);\n\n for (const item of items) {\n const fullPath = path.join(dir, item);\n const relativePath = path.join(basePath, item);\n\n // Skip these directories\n if (\n ['node_modules', 'dist', '.nx', '.angular', 'tmp', '.git'].includes(\n item,\n )\n ) {\n continue;\n }\n\n // Skip all hidden directories (starting with .)\n if (item.startsWith('.')) {\n continue;\n }\n\n const stat = fs.statSync(fullPath);\n if (stat.isDirectory()) {\n files.push(...findPackageJsonFiles(fullPath, relativePath));\n } else if (item === 'package.json') {\n files.push(fullPath);\n }\n }\n\n return files;\n}\n\n// Check if a version string uses semver ranges\nfunction hasSemverRange(version: string): boolean {\n // Allow workspace protocol\n if (version.startsWith('workspace:')) {\n return false;\n }\n\n // Allow file: protocol (for local packages)\n if (version.startsWith('file:')) {\n return false;\n }\n\n // Check for common semver range patterns\n const semverPatterns = [\n /^\\^/, // ^1.2.3\n /^~/, // ~1.2.3\n /^\\+/, // +1.2.3\n /^\\*/, // *\n /^>/, // >1.2.3\n /^</, // <1.2.3\n /^>=/, // >=1.2.3\n /^<=/, // <=1.2.3\n /\\|\\|/, // 1.2.3 || 2.x\n / - /, // 1.2.3 - 2.3.4\n /^\\d+\\.x/, // 1.x, 1.2.x\n /^latest$/, // latest\n /^next$/, // next\n ];\n\n return semverPatterns.some((pattern) => pattern.test(version));\n}\n\n// webpieces-disable max-lines-new-methods -- Existing method from renamed validate-versions file\n// Validate a single package.json file for semver ranges\nfunction validatePackageJson(filePath: string): string[] {\n // eslint-disable-next-line @webpieces/no-unmanaged-exceptions\n try {\n const content = fs.readFileSync(filePath, 'utf-8');\n const pkg = JSON.parse(content);\n const errors: string[] = [];\n\n // Check dependencies\n if (pkg.dependencies) {\n for (const [name, version] of Object.entries(pkg.dependencies)) {\n // Skip internal workspace packages\n if (name.startsWith('@webpieces/')) {\n continue;\n }\n\n if (hasSemverRange(version as string)) {\n errors.push(\n `dependencies.${name}: \"${version}\" uses semver range (must be locked to exact version)`,\n );\n }\n }\n }\n\n // Check devDependencies\n if (pkg.devDependencies) {\n for (const [name, version] of Object.entries(pkg.devDependencies)) {\n // Skip internal workspace packages\n if (name.startsWith('@webpieces/')) {\n continue;\n }\n\n if (hasSemverRange(version as string)) {\n errors.push(\n `devDependencies.${name}: \"${version}\" uses semver range (must be locked to exact version)`,\n );\n }\n }\n }\n\n // Check peerDependencies (these can have ranges for compatibility)\n // We don't validate peerDependencies for semver ranges since they're meant to be flexible\n\n return errors;\n } catch (err: unknown) {\n const error = toError(err);\n return [`Failed to parse ${filePath}: ${error.message}`];\n }\n}\n\n// Track all dependency versions across the monorepo\ninterface DependencyUsage {\n version: string;\n file: string;\n type: 'dependencies' | 'devDependencies';\n}\n\n// webpieces-disable max-lines-new-methods -- Collecting dependencies from all package.json files\n// Collect all dependency versions from all package.json files\nfunction collectAllDependencies(workspaceRoot: string): Map<string, DependencyUsage[]> {\n const dependencyMap = new Map<string, DependencyUsage[]>();\n const packageFiles = findPackageJsonFiles(workspaceRoot);\n\n for (const filePath of packageFiles) {\n // eslint-disable-next-line @webpieces/no-unmanaged-exceptions\n try {\n const content = fs.readFileSync(filePath, 'utf-8');\n const pkg = JSON.parse(content);\n const relativePath = path.relative(workspaceRoot, filePath);\n\n // Collect dependencies\n if (pkg.dependencies) {\n for (const [name, version] of Object.entries(pkg.dependencies)) {\n // Skip internal workspace packages\n if (name.startsWith('@webpieces/')) continue;\n\n const usage: DependencyUsage = {\n version: version as string,\n file: relativePath,\n type: 'dependencies'\n };\n\n if (!dependencyMap.has(name)) {\n dependencyMap.set(name, []);\n }\n dependencyMap.get(name)!.push(usage);\n }\n }\n\n // Collect devDependencies\n if (pkg.devDependencies) {\n for (const [name, version] of Object.entries(pkg.devDependencies)) {\n // Skip internal workspace packages\n if (name.startsWith('@webpieces/')) continue;\n\n const usage: DependencyUsage = {\n version: version as string,\n file: relativePath,\n type: 'devDependencies'\n };\n\n if (!dependencyMap.has(name)) {\n dependencyMap.set(name, []);\n }\n dependencyMap.get(name)!.push(usage);\n }\n }\n } catch (err: unknown) {\n // const error = toError(err);\n // Intentionally skip files that can't be parsed - this is expected for some package.json files\n }\n }\n\n return dependencyMap;\n}\n\n// webpieces-disable max-lines-new-methods -- Simple iteration logic, splitting would reduce clarity\n// Check for version conflicts across package.json files\nfunction checkVersionConflicts(workspaceRoot: string): string[] {\n console.log('\\n🔍 Checking for version conflicts across package.json files:');\n\n const dependencyMap = collectAllDependencies(workspaceRoot);\n const conflicts: string[] = [];\n\n for (const [packageName, usages] of dependencyMap.entries()) {\n // Get unique versions (ignoring workspace: and file: protocols)\n const versions = new Set(\n usages\n .map(u => u.version)\n .filter(v => !v.startsWith('workspace:') && !v.startsWith('file:'))\n );\n\n if (versions.size > 1) {\n const conflictDetails = usages\n .filter(u => !u.version.startsWith('workspace:') && !u.version.startsWith('file:'))\n .map(u => ` ${u.file} (${u.type}): ${u.version}`)\n .join('\\n');\n\n conflicts.push(` ❌ ${packageName} has ${versions.size} different versions:\\n${conflictDetails}`);\n }\n }\n\n if (conflicts.length === 0) {\n console.log(' ✅ No version conflicts found');\n } else {\n for (const conflict of conflicts) {\n console.log(conflict);\n }\n }\n\n return conflicts;\n}\n\n/**\n * Prints the educational message explaining why semver ranges are forbidden.\n * This helps developers understand the rationale behind locked versions.\n */\n// webpieces-disable max-lines-new-methods -- Educational message template, splitting reduces clarity\nfunction printSemverRangeEducationalMessage(semverErrors: number): void {\n console.log(`\n❌ SEMVER RANGES DETECTED - BUILD FAILED\n\nFound ${semverErrors} package(s) using semver ranges (^, ~, *, etc.) instead of locked versions.\n\nWHY THIS IS A HARD FAILURE:\n═══════════════════════════════════════════════════════════════════════════════\n\n1. MICRO BUGS ARE REAL\n Thinking that patch versions (1.4.5 → 1.4.6) don't introduce bugs is wrong.\n They do. Sometimes what looks like an \"easy fix\" breaks things in subtle ways.\n\n2. GIT BISECT BECOMES USELESS\n When you run \"git bisect\" to find when a bug was introduced, it fails if\n software changed OUTSIDE of git. You checkout an old commit, but node_modules\n has different versions than when that commit was made. The bug persists even\n in \"known good\" commits because the library versions drifted.\n\n3. THE \"MAGIC BUG\" PROBLEM\n You checkout code from 6 months ago to debug an issue. The bug is still there!\n But it wasn't there 6 months ago... The culprit: a minor version upgrade that\n happened silently without any PR or git commit. Impossible to track down.\n\n4. CHANGES OUTSIDE GIT = BAD\n Every change to your software should be tracked in version control.\n Implicit library upgrades via semver ranges violate this principle.\n\nTHE SOLUTION:\n═══════════════════════════════════════════════════════════════════════════════\n\nUse LOCKED (exact) versions for all dependencies:\n ❌ \"lodash\": \"^4.17.21\" <- BAD: allows 4.17.22, 4.18.0, etc.\n ❌ \"lodash\": \"~4.17.21\" <- BAD: allows 4.17.22, 4.17.23, etc.\n ✅ \"lodash\": \"4.17.21\" <- GOOD: locked to this exact version\n\nTo upgrade libraries, use an explicit process:\n 1. Run: npm update <package-name>\n 2. Test thoroughly\n 3. Commit the package.json AND package-lock.json changes\n 4. Create a PR so the upgrade is reviewed and tracked in git history\n\nThis way, every library change is:\n • Intentional (not accidental)\n • Reviewed (via PR)\n • Tracked (in git history)\n • Bisectable (git bisect works correctly)\n\n`);\n}\n\ntype SemverRangeResult = { errors: number };\n\n// Check semver ranges in all package.json files - FAILS if any found\nfunction checkSemverRanges(workspaceRoot: string): SemverRangeResult {\n console.log('\\n📋 Checking for unlocked versions (semver ranges):');\n const packageFiles = findPackageJsonFiles(workspaceRoot);\n let semverErrors = 0;\n\n for (const filePath of packageFiles) {\n const relativePath = path.relative(workspaceRoot, filePath);\n const errors = validatePackageJson(filePath);\n\n if (errors.length > 0) {\n console.log(` ❌ ${relativePath}:`);\n for (const error of errors) {\n console.log(` ${error}`);\n }\n semverErrors += errors.length;\n } else {\n console.log(` ✅ ${relativePath}`);\n }\n }\n\n return { errors: semverErrors };\n}\n\nexport default async function runExecutor(\n _options: ValidateVersionsLockedOptions,\n context: ExecutorContext\n): Promise<ExecutorResult> {\n console.log('\\n🔒 Validating Package Versions are LOCKED and CONSISTENT\\n');\n\n const workspaceRoot = context.root;\n\n // Step 1: Check for semver ranges (FAILS if any found)\n const semverResult = checkSemverRanges(workspaceRoot);\n const semverErrors = semverResult.errors;\n const packageFiles = findPackageJsonFiles(workspaceRoot);\n\n // Step 2: Check for version conflicts across package.json files\n const versionConflicts = checkVersionConflicts(workspaceRoot);\n\n // Summary\n console.log(`\\n📊 Summary:`);\n console.log(` Files checked: ${packageFiles.length}`);\n console.log(` Unlocked versions (semver ranges): ${semverErrors}`);\n console.log(` Version conflicts: ${versionConflicts.length}`);\n\n // Fail on semver ranges with educational message\n if (semverErrors > 0) {\n printSemverRangeEducationalMessage(semverErrors);\n return { success: false };\n }\n\n // Fail on version conflicts\n if (versionConflicts.length > 0) {\n console.log('\\n❌ VALIDATION FAILED!');\n console.log(' Fix version conflicts - all package.json files must use the same version for each dependency.');\n console.log(' This prevents \"works on my machine\" bugs where different projects use different library versions.\\n');\n return { success: false };\n }\n\n console.log('\\n✅ VALIDATION PASSED! All versions are locked and consistent.');\n return { success: true };\n}\n"]}
package/src/index.d.ts CHANGED
@@ -29,6 +29,6 @@ export declare function getProjectRoot(): string;
29
29
  */
30
30
  declare const _default: {
31
31
  name: string;
32
- createNodesV2: import("@nx/devkit").CreateNodesV2<import("../plugin").ArchitecturePluginOptions>;
32
+ createNodesV2: import("@nx/devkit").CreateNodesV2<import("./plugin").ArchitecturePluginOptions>;
33
33
  };
34
34
  export default _default;
package/src/index.js CHANGED
@@ -18,7 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.packageName = exports.version = void 0;
19
19
  exports.isWebpiecesWorkspace = isWebpiecesWorkspace;
20
20
  exports.getProjectRoot = getProjectRoot;
21
- const plugin_1 = require("../plugin");
21
+ const plugin_1 = require("./plugin");
22
22
  exports.version = '0.0.0-dev';
23
23
  exports.packageName = '@webpieces/dev-config';
24
24
  /**
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/tooling/dev-config/src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAUH,oDAEC;AAKD,wCAGC;AAlBD,sCAA0C;AAE7B,QAAA,OAAO,GAAG,WAAW,CAAC;AACtB,QAAA,WAAW,GAAG,uBAAuB,CAAC;AAEnD;;GAEG;AACH,SAAgB,oBAAoB;IAChC,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,SAAgB,cAAc;IAC1B,oEAAoE;IACpE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC;AACzB,CAAC;AAED;;;GAGG;AACH,kBAAe;IACX,IAAI,EAAE,uBAAuB;IAC7B,aAAa,EAAb,sBAAa;CAChB,CAAC","sourcesContent":["/**\n * @webpieces/dev-config\n *\n * Development configuration, scripts, and patterns for WebPieces projects.\n *\n * This package provides:\n * - Nx inference plugin for architecture validation and circular dependency checking\n * - Executable scripts (via bin commands: wp-start, wp-stop, etc.)\n * - Shareable ESLint configuration\n * - Jest preset\n * - Base TypeScript configuration\n * - Claude Code pattern documentation\n *\n * @packageDocumentation\n */\n\nimport { createNodesV2 } from '../plugin';\n\nexport const version = '0.0.0-dev';\nexport const packageName = '@webpieces/dev-config';\n\n/**\n * Check if running in webpieces-ts workspace\n */\nexport function isWebpiecesWorkspace(): boolean {\n return process.cwd().includes('webpieces-ts');\n}\n\n/**\n * Get project root directory\n */\nexport function getProjectRoot(): string {\n // This is a simple helper, actual path detection is in bash scripts\n return process.cwd();\n}\n\n/**\n * Default export for Nx plugin system\n * This is what Nx loads when the package is registered as a plugin in nx.json\n */\nexport default {\n name: '@webpieces/dev-config',\n createNodesV2,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/tooling/dev-config/src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAUH,oDAEC;AAKD,wCAGC;AAlBD,qCAAyC;AAE5B,QAAA,OAAO,GAAG,WAAW,CAAC;AACtB,QAAA,WAAW,GAAG,uBAAuB,CAAC;AAEnD;;GAEG;AACH,SAAgB,oBAAoB;IAChC,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,SAAgB,cAAc;IAC1B,oEAAoE;IACpE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC;AACzB,CAAC;AAED;;;GAGG;AACH,kBAAe;IACX,IAAI,EAAE,uBAAuB;IAC7B,aAAa,EAAb,sBAAa;CAChB,CAAC","sourcesContent":["/**\n * @webpieces/dev-config\n *\n * Development configuration, scripts, and patterns for WebPieces projects.\n *\n * This package provides:\n * - Nx inference plugin for architecture validation and circular dependency checking\n * - Executable scripts (via bin commands: wp-start, wp-stop, etc.)\n * - Shareable ESLint configuration\n * - Jest preset\n * - Base TypeScript configuration\n * - Claude Code pattern documentation\n *\n * @packageDocumentation\n */\n\nimport { createNodesV2 } from './plugin';\n\nexport const version = '0.0.0-dev';\nexport const packageName = '@webpieces/dev-config';\n\n/**\n * Check if running in webpieces-ts workspace\n */\nexport function isWebpiecesWorkspace(): boolean {\n return process.cwd().includes('webpieces-ts');\n}\n\n/**\n * Get project root directory\n */\nexport function getProjectRoot(): string {\n // This is a simple helper, actual path detection is in bash scripts\n return process.cwd();\n}\n\n/**\n * Default export for Nx plugin system\n * This is what Nx loads when the package is registered as a plugin in nx.json\n */\nexport default {\n name: '@webpieces/dev-config',\n createNodesV2,\n};\n"]}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Unified Nx Inference Plugin for @webpieces/dev-config
3
+ *
4
+ * This plugin automatically creates targets for:
5
+ * 1. Workspace-level architecture validation (generate, visualize, validate-*)
6
+ * 2. Per-project circular dependency checking
7
+ *
8
+ * Install with: nx add @webpieces/dev-config
9
+ *
10
+ * Usage:
11
+ * Add to nx.json plugins array:
12
+ * {
13
+ * "plugins": ["@webpieces/dev-config"]
14
+ * }
15
+ *
16
+ * Then all targets appear automatically without manual project.json configuration.
17
+ */
18
+ import type { CreateNodesV2 } from '@nx/devkit';
19
+ /**
20
+ * Circular dependency checking options
21
+ */
22
+ export interface CircularDepsOptions {
23
+ enabled?: boolean;
24
+ targetName?: string;
25
+ excludePatterns?: string[];
26
+ }
27
+ /**
28
+ * Validation options for architecture checks
29
+ */
30
+ export interface ValidationOptions {
31
+ noCycles?: boolean;
32
+ noSkipLevelDeps?: boolean;
33
+ architectureUnchanged?: boolean;
34
+ validatePackageJson?: boolean;
35
+ validateNewMethods?: boolean;
36
+ validateModifiedMethods?: boolean;
37
+ validateModifiedFiles?: boolean;
38
+ validateVersionsLocked?: boolean;
39
+ validateTsInSrc?: boolean;
40
+ newMethodsMaxLines?: number;
41
+ modifiedAndNewMethodsMaxLines?: number;
42
+ modifiedFilesMaxLines?: number;
43
+ /**
44
+ * Validation mode for method/file size limits:
45
+ * - STRICT: All limits enforced, disable comments ignored
46
+ * - NORMAL: Limits enforced, disable comments with dates work
47
+ * - OFF: Skip size validations entirely (for fast iteration)
48
+ */
49
+ validationMode?: 'STRICT' | 'NORMAL' | 'OFF';
50
+ }
51
+ /**
52
+ * Feature flags for workspace targets
53
+ */
54
+ export interface FeatureOptions {
55
+ generate?: boolean;
56
+ visualize?: boolean;
57
+ }
58
+ /**
59
+ * Workspace-level configuration options
60
+ */
61
+ export interface WorkspaceOptions {
62
+ enabled?: boolean;
63
+ targetPrefix?: string;
64
+ graphPath?: string;
65
+ validations?: ValidationOptions;
66
+ features?: FeatureOptions;
67
+ }
68
+ /**
69
+ * Configuration for @webpieces/dev-config Nx plugin
70
+ */
71
+ export interface ArchitecturePluginOptions {
72
+ circularDeps?: CircularDepsOptions;
73
+ workspace?: WorkspaceOptions;
74
+ }
75
+ /**
76
+ * Nx V2 Inference Plugin
77
+ * Matches project.json and package.json files to create targets
78
+ */
79
+ export declare const createNodesV2: CreateNodesV2<ArchitecturePluginOptions>;
80
+ /**
81
+ * Export plugin as default for Nx
82
+ */
83
+ declare const _default: {
84
+ createNodesV2: CreateNodesV2<ArchitecturePluginOptions>;
85
+ };
86
+ export default _default;
@@ -39,6 +39,7 @@ const DEFAULT_OPTIONS = {
39
39
  validateModifiedMethods: true,
40
40
  validateModifiedFiles: true,
41
41
  validateVersionsLocked: true,
42
+ validateTsInSrc: true,
42
43
  newMethodsMaxLines: 30,
43
44
  modifiedAndNewMethodsMaxLines: 80,
44
45
  modifiedFilesMaxLines: 900,
@@ -181,6 +182,8 @@ function buildValidationTargetsList(validations) {
181
182
  }
182
183
  if (validations.validateVersionsLocked)
183
184
  targets.push('validate-versions-locked');
185
+ if (validations.validateTsInSrc)
186
+ targets.push('validate-ts-in-src');
184
187
  return targets;
185
188
  }
186
189
  /**
@@ -221,6 +224,9 @@ function createWorkspaceTargetsWithoutPrefix(opts) {
221
224
  if (validations.validateVersionsLocked) {
222
225
  targets['validate-versions-locked'] = createValidateVersionsLockedTarget();
223
226
  }
227
+ if (validations.validateTsInSrc) {
228
+ targets['validate-ts-in-src'] = createValidateTsInSrcTarget();
229
+ }
224
230
  // Add validate-complete target that runs all enabled validations
225
231
  const validationTargets = buildValidationTargetsList(validations);
226
232
  if (validationTargets.length > 0) {
@@ -268,7 +274,7 @@ function createWorkspaceTargets(opts) {
268
274
  }
269
275
  function createGenerateTarget(graphPath) {
270
276
  return {
271
- executor: '@webpieces/dev-config:generate',
277
+ executor: '@webpieces/architecture-validators:generate',
272
278
  cache: false,
273
279
  outputs: ['{workspaceRoot}/architecture/dependencies.json'],
274
280
  options: { graphPath },
@@ -280,7 +286,7 @@ function createGenerateTarget(graphPath) {
280
286
  }
281
287
  function createVisualizeTargetWithoutPrefix(graphPath) {
282
288
  return {
283
- executor: '@webpieces/dev-config:visualize',
289
+ executor: '@webpieces/architecture-validators:visualize',
284
290
  dependsOn: ['generate'],
285
291
  options: { graphPath },
286
292
  metadata: {
@@ -291,7 +297,7 @@ function createVisualizeTargetWithoutPrefix(graphPath) {
291
297
  }
292
298
  function createVisualizeTarget(prefix, graphPath) {
293
299
  return {
294
- executor: '@webpieces/dev-config:visualize',
300
+ executor: '@webpieces/architecture-validators:visualize',
295
301
  dependsOn: [`${prefix}generate`],
296
302
  options: { graphPath },
297
303
  metadata: {
@@ -302,9 +308,9 @@ function createVisualizeTarget(prefix, graphPath) {
302
308
  }
303
309
  function createValidateNoCyclesTarget() {
304
310
  return {
305
- executor: '@webpieces/dev-config:validate-no-architecture-cycles',
311
+ executor: '@webpieces/architecture-validators:validate-no-architecture-cycles',
306
312
  cache: true,
307
- inputs: ['default'],
313
+ inputs: ['{workspaceRoot}/**/project.json', '{workspaceRoot}/architecture/dependencies.json'],
308
314
  metadata: {
309
315
  technologies: ['nx'],
310
316
  description: 'Validate the architecture has no circular project dependencies',
@@ -313,7 +319,7 @@ function createValidateNoCyclesTarget() {
313
319
  }
314
320
  function createValidateUnchangedTarget(graphPath) {
315
321
  return {
316
- executor: '@webpieces/dev-config:validate-architecture-unchanged',
322
+ executor: '@webpieces/architecture-validators:validate-architecture-unchanged',
317
323
  cache: false,
318
324
  inputs: ['default', '{workspaceRoot}/architecture/dependencies.json'],
319
325
  options: { graphPath },
@@ -325,9 +331,9 @@ function createValidateUnchangedTarget(graphPath) {
325
331
  }
326
332
  function createValidateNoSkipLevelTarget() {
327
333
  return {
328
- executor: '@webpieces/dev-config:validate-no-skiplevel-deps',
334
+ executor: '@webpieces/architecture-validators:validate-no-skiplevel-deps',
329
335
  cache: true,
330
- inputs: ['default'],
336
+ inputs: ['{workspaceRoot}/**/project.json', '{workspaceRoot}/architecture/dependencies.json'],
331
337
  metadata: {
332
338
  technologies: ['nx'],
333
339
  description: 'Validate no project has redundant transitive dependencies',
@@ -336,9 +342,9 @@ function createValidateNoSkipLevelTarget() {
336
342
  }
337
343
  function createValidatePackageJsonTarget() {
338
344
  return {
339
- executor: '@webpieces/dev-config:validate-packagejson',
345
+ executor: '@webpieces/architecture-validators:validate-packagejson',
340
346
  cache: true,
341
- inputs: ['default'],
347
+ inputs: ['{workspaceRoot}/**/project.json', '{workspaceRoot}/**/package.json'],
342
348
  metadata: {
343
349
  technologies: ['nx'],
344
350
  description: 'Validate package.json dependencies match project.json build dependencies',
@@ -347,7 +353,7 @@ function createValidatePackageJsonTarget() {
347
353
  }
348
354
  function createValidateNewMethodsTarget(maxLines, mode) {
349
355
  return {
350
- executor: '@webpieces/dev-config:validate-new-methods',
356
+ executor: '@webpieces/architecture-validators:validate-new-methods',
351
357
  cache: false, // Don't cache - depends on git state
352
358
  inputs: ['default'],
353
359
  options: { max: maxLines, mode },
@@ -359,7 +365,7 @@ function createValidateNewMethodsTarget(maxLines, mode) {
359
365
  }
360
366
  function createValidateModifiedMethodsTarget(maxLines, mode) {
361
367
  return {
362
- executor: '@webpieces/dev-config:validate-modified-methods',
368
+ executor: '@webpieces/architecture-validators:validate-modified-methods',
363
369
  cache: false, // Don't cache - depends on git state
364
370
  inputs: ['default'],
365
371
  options: { max: maxLines, mode },
@@ -371,7 +377,7 @@ function createValidateModifiedMethodsTarget(maxLines, mode) {
371
377
  }
372
378
  function createValidateModifiedFilesTarget(maxLines, mode) {
373
379
  return {
374
- executor: '@webpieces/dev-config:validate-modified-files',
380
+ executor: '@webpieces/architecture-validators:validate-modified-files',
375
381
  cache: false, // Don't cache - depends on git state
376
382
  inputs: ['default'],
377
383
  options: { max: maxLines, mode },
@@ -387,7 +393,7 @@ function createValidateModifiedFilesTarget(maxLines, mode) {
387
393
  */
388
394
  function createValidateCodeTarget() {
389
395
  return {
390
- executor: '@webpieces/dev-config:validate-code',
396
+ executor: '@webpieces/architecture-validators:validate-code',
391
397
  cache: false, // Don't cache - depends on git state
392
398
  inputs: ['default'],
393
399
  // No options here - they come from targetDefaults at runtime
@@ -401,13 +407,23 @@ function createValidateVersionsLockedTarget() {
401
407
  return {
402
408
  executor: '@webpieces/dev-config:validate-versions-locked',
403
409
  cache: true,
404
- inputs: ['default'],
410
+ inputs: ['{workspaceRoot}/**/package.json'],
405
411
  metadata: {
406
412
  technologies: ['nx'],
407
413
  description: 'Validate package.json versions are locked (no semver ranges) and consistent across projects',
408
414
  },
409
415
  };
410
416
  }
417
+ function createValidateTsInSrcTarget() {
418
+ return {
419
+ executor: '@webpieces/architecture-validators:validate-ts-in-src',
420
+ cache: false,
421
+ metadata: {
422
+ technologies: ['nx'],
423
+ description: 'Validate all .ts files in projects are inside the src/ directory',
424
+ },
425
+ };
426
+ }
411
427
  function createValidateCompleteTarget(validationTargets) {
412
428
  return {
413
429
  executor: 'nx:noop',