@webpieces/nx-webpieces-rules 0.0.1 → 0.2.113

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 (119) hide show
  1. package/package.json +5 -4
  2. package/src/executor-result.d.ts +4 -0
  3. package/src/executor-result.js +10 -0
  4. package/src/executor-result.js.map +1 -0
  5. package/src/executors/generate/executor.d.ts +16 -0
  6. package/src/executors/generate/{executor.ts → executor.js} +15 -30
  7. package/src/executors/generate/executor.js.map +1 -0
  8. package/src/executors/help/executor.d.ts +8 -0
  9. package/src/executors/help/{executor.ts → executor.js} +5 -12
  10. package/src/executors/help/executor.js.map +1 -0
  11. package/src/executors/validate-architecture-unchanged/executor.d.ts +17 -0
  12. package/src/executors/validate-architecture-unchanged/{executor.ts → executor.js} +24 -46
  13. package/src/executors/validate-architecture-unchanged/executor.js.map +1 -0
  14. package/src/executors/validate-catch-error-pattern/executor.d.ts +3 -0
  15. package/src/executors/validate-catch-error-pattern/executor.js +10 -0
  16. package/src/executors/validate-catch-error-pattern/executor.js.map +1 -0
  17. package/src/executors/validate-code/executor.d.ts +3 -0
  18. package/src/executors/validate-code/executor.js +10 -0
  19. package/src/executors/validate-code/executor.js.map +1 -0
  20. package/src/executors/validate-dtos/executor.d.ts +3 -0
  21. package/src/executors/validate-dtos/executor.js +10 -0
  22. package/src/executors/validate-dtos/executor.js.map +1 -0
  23. package/src/executors/validate-eslint-sync/executor.d.ts +7 -0
  24. package/src/executors/validate-eslint-sync/{executor.ts → executor.js} +19 -37
  25. package/src/executors/validate-eslint-sync/executor.js.map +1 -0
  26. package/src/executors/validate-modified-files/executor.d.ts +3 -0
  27. package/src/executors/validate-modified-files/executor.js +10 -0
  28. package/src/executors/validate-modified-files/executor.js.map +1 -0
  29. package/src/executors/validate-modified-methods/executor.d.ts +3 -0
  30. package/src/executors/validate-modified-methods/executor.js +10 -0
  31. package/src/executors/validate-modified-methods/executor.js.map +1 -0
  32. package/src/executors/validate-new-methods/executor.d.ts +3 -0
  33. package/src/executors/validate-new-methods/executor.js +10 -0
  34. package/src/executors/validate-new-methods/executor.js.map +1 -0
  35. package/src/executors/validate-no-any-unknown/executor.d.ts +3 -0
  36. package/src/executors/validate-no-any-unknown/executor.js +10 -0
  37. package/src/executors/validate-no-any-unknown/executor.js.map +1 -0
  38. package/src/executors/validate-no-architecture-cycles/executor.d.ts +16 -0
  39. package/src/executors/validate-no-architecture-cycles/{executor.ts → executor.js} +16 -28
  40. package/src/executors/validate-no-architecture-cycles/executor.js.map +1 -0
  41. package/src/executors/validate-no-destructure/executor.d.ts +3 -0
  42. package/src/executors/validate-no-destructure/executor.js +10 -0
  43. package/src/executors/validate-no-destructure/executor.js.map +1 -0
  44. package/src/executors/validate-no-direct-api-resolver/executor.d.ts +3 -0
  45. package/src/executors/validate-no-direct-api-resolver/executor.js +10 -0
  46. package/src/executors/validate-no-direct-api-resolver/executor.js.map +1 -0
  47. package/src/executors/validate-no-implicit-any/executor.d.ts +3 -0
  48. package/src/executors/validate-no-implicit-any/executor.js +10 -0
  49. package/src/executors/validate-no-implicit-any/executor.js.map +1 -0
  50. package/src/executors/validate-no-inline-types/executor.d.ts +3 -0
  51. package/src/executors/validate-no-inline-types/executor.js +10 -0
  52. package/src/executors/validate-no-inline-types/executor.js.map +1 -0
  53. package/src/executors/validate-no-skiplevel-deps/executor.d.ts +19 -0
  54. package/src/executors/validate-no-skiplevel-deps/{executor.ts → executor.js} +23 -63
  55. package/src/executors/validate-no-skiplevel-deps/executor.js.map +1 -0
  56. package/src/executors/validate-no-unmanaged-exceptions/executor.d.ts +3 -0
  57. package/src/executors/validate-no-unmanaged-exceptions/executor.js +10 -0
  58. package/src/executors/validate-no-unmanaged-exceptions/executor.js.map +1 -0
  59. package/src/executors/validate-packagejson/executor.d.ts +16 -0
  60. package/src/executors/validate-packagejson/{executor.ts → executor.js} +15 -32
  61. package/src/executors/validate-packagejson/executor.js.map +1 -0
  62. package/src/executors/validate-prisma-converters/executor.d.ts +3 -0
  63. package/src/executors/validate-prisma-converters/executor.js +10 -0
  64. package/src/executors/validate-prisma-converters/executor.js.map +1 -0
  65. package/src/executors/validate-return-types/executor.d.ts +3 -0
  66. package/src/executors/validate-return-types/executor.js +10 -0
  67. package/src/executors/validate-return-types/executor.js.map +1 -0
  68. package/src/executors/validate-ts-in-src/executor.d.ts +32 -0
  69. package/src/executors/validate-ts-in-src/{executor.ts → executor.js} +80 -135
  70. package/src/executors/validate-ts-in-src/executor.js.map +1 -0
  71. package/src/executors/validate-versions-locked/executor.d.ts +22 -0
  72. package/src/executors/validate-versions-locked/{executor.ts → executor.js} +49 -116
  73. package/src/executors/validate-versions-locked/executor.js.map +1 -0
  74. package/src/executors/visualize/executor.d.ts +17 -0
  75. package/src/executors/visualize/{executor.ts → executor.js} +16 -30
  76. package/src/executors/visualize/executor.js.map +1 -0
  77. package/src/{index.ts → index.d.ts} +5 -1
  78. package/src/index.js +14 -0
  79. package/src/index.js.map +1 -0
  80. package/src/lib/graph-comparator.d.ts +39 -0
  81. package/src/lib/{graph-comparator.ts → graph-comparator.js} +18 -67
  82. package/src/lib/graph-comparator.js.map +1 -0
  83. package/src/lib/graph-generator.d.ts +19 -0
  84. package/src/lib/{graph-generator.ts → graph-generator.js} +17 -30
  85. package/src/lib/graph-generator.js.map +1 -0
  86. package/src/lib/graph-loader.d.ts +31 -0
  87. package/src/lib/{graph-loader.ts → graph-loader.js} +24 -42
  88. package/src/lib/graph-loader.js.map +1 -0
  89. package/src/lib/graph-sorter.d.ts +37 -0
  90. package/src/lib/{graph-sorter.ts → graph-sorter.js} +26 -53
  91. package/src/lib/graph-sorter.js.map +1 -0
  92. package/src/lib/graph-visualizer.d.ts +31 -0
  93. package/src/lib/{graph-visualizer.ts → graph-visualizer.js} +32 -56
  94. package/src/lib/graph-visualizer.js.map +1 -0
  95. package/src/lib/package-validator.d.ts +40 -0
  96. package/src/lib/{package-validator.ts → package-validator.js} +28 -88
  97. package/src/lib/package-validator.js.map +1 -0
  98. package/src/plugin.d.ts +86 -0
  99. package/src/{plugin.ts → plugin.js} +100 -255
  100. package/src/plugin.js.map +1 -0
  101. package/src/toError.d.ts +5 -0
  102. package/src/{toError.ts → toError.js} +7 -6
  103. package/src/toError.js.map +1 -0
  104. package/LICENSE +0 -373
  105. package/src/executor-result.ts +0 -7
  106. package/src/executors/validate-catch-error-pattern/executor.ts +0 -11
  107. package/src/executors/validate-code/executor.ts +0 -11
  108. package/src/executors/validate-dtos/executor.ts +0 -11
  109. package/src/executors/validate-modified-files/executor.ts +0 -11
  110. package/src/executors/validate-modified-methods/executor.ts +0 -11
  111. package/src/executors/validate-new-methods/executor.ts +0 -11
  112. package/src/executors/validate-no-any-unknown/executor.ts +0 -11
  113. package/src/executors/validate-no-destructure/executor.ts +0 -11
  114. package/src/executors/validate-no-direct-api-resolver/executor.ts +0 -11
  115. package/src/executors/validate-no-implicit-any/executor.ts +0 -11
  116. package/src/executors/validate-no-inline-types/executor.ts +0 -11
  117. package/src/executors/validate-no-unmanaged-exceptions/executor.ts +0 -11
  118. package/src/executors/validate-prisma-converters/executor.ts +0 -11
  119. package/src/executors/validate-return-types/executor.ts +0 -11
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../../packages/tooling/nx-webpieces-rules/src/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAEH,+BAAqC;AACrC,2BAAgC;AAsEhC,MAAM,eAAe,GAAwC;IACzD,YAAY,EAAE;QACV,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,gCAAgC;QAC5C,eAAe,EAAE,EAAE;KACtB;IACD,SAAS,EAAE;QACP,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,OAAO;QACrB,SAAS,EAAE,gCAAgC;QAC3C,WAAW,EAAE;YACT,QAAQ,EAAE,IAAI;YACd,eAAe,EAAE,IAAI;YACrB,qBAAqB,EAAE,IAAI;YAC3B,mBAAmB,EAAE,IAAI;Y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E,EAAc;QACvB,OAAO,EAAE;YACL,OAAO,EAAE,4CAA4C;YACrD,GAAG,EAAE,WAAW;SACnB;QACD,QAAQ,EAAE;YACN,YAAY,EAAE,CAAC,OAAO,CAAC;YACvB,WAAW,EAAE,6CAA6C;SAC7D;KACJ,CAAC;AACN,CAAC;AAED;;GAEG;AACH,SAAS,UAAU,CAAC,WAAmB,EAAE,eAAyB;IAC9D,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,oEAAoE;IACpE,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;QACpC,gCAAgC;QAChC,MAAM,YAAY,GAAG,OAAO;aACvB,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,sBAAsB;aAC7C,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,gCAAgC;QAE9D,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,IAAI,YAAY,GAAG,CAAC,CAAC;QAC9C,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;GAEG;AACH,kBAAe,EAAE,aAAa,EAAb,qBAAa,EAAE,CAAC","sourcesContent":["/**\n * Unified Nx Inference Plugin for @webpieces/nx-webpieces-rules\n *\n * This plugin automatically creates targets for:\n * 1. Workspace-level architecture validation (generate, visualize, validate-*)\n * 2. Per-project circular dependency checking\n *\n * Install with: nx add @webpieces/nx-webpieces-rules\n *\n * Usage:\n * Add to nx.json plugins array:\n * {\n * \"plugins\": [\"@webpieces/nx-webpieces-rules\"]\n * }\n *\n * Then all targets appear automatically without manual project.json configuration.\n */\n\nimport { dirname, join } from 'path';\nimport { existsSync } from 'fs';\nimport type {\n CreateNodesV2,\n CreateNodesContextV2,\n CreateNodesResultV2,\n CreateNodesResult,\n TargetConfiguration,\n} from '@nx/devkit';\n\n/**\n * Circular dependency checking options\n */\nexport interface CircularDepsOptions {\n enabled?: boolean;\n targetName?: string;\n excludePatterns?: string[];\n}\n\n/**\n * Validation options for architecture checks\n */\nexport interface ValidationOptions {\n noCycles?: boolean;\n noSkipLevelDeps?: boolean;\n architectureUnchanged?: boolean;\n validatePackageJson?: boolean;\n validateNewMethods?: boolean;\n validateModifiedMethods?: boolean;\n validateModifiedFiles?: boolean;\n validateVersionsLocked?: boolean;\n validateTsInSrc?: boolean;\n newMethodsMaxLines?: number;\n modifiedAndNewMethodsMaxLines?: number;\n modifiedFilesMaxLines?: number;\n /**\n * Validation mode for method/file size limits:\n * - STRICT: All limits enforced, disable comments ignored\n * - NORMAL: Limits enforced, disable comments with dates work\n * - OFF: Skip size validations entirely (for fast iteration)\n */\n validationMode?: 'STRICT' | 'NORMAL' | 'OFF';\n}\n\n/**\n * Feature flags for workspace targets\n */\nexport interface FeatureOptions {\n generate?: boolean;\n visualize?: boolean;\n}\n\n/**\n * Workspace-level configuration options\n */\nexport interface WorkspaceOptions {\n enabled?: boolean;\n targetPrefix?: string;\n graphPath?: string;\n validations?: ValidationOptions;\n features?: FeatureOptions;\n}\n\n/**\n * Configuration for @webpieces/nx-webpieces-rules Nx plugin\n */\nexport interface ArchitecturePluginOptions {\n circularDeps?: CircularDepsOptions;\n workspace?: WorkspaceOptions;\n}\n\nconst DEFAULT_OPTIONS: Required<ArchitecturePluginOptions> = {\n circularDeps: {\n enabled: true,\n targetName: 'validate-no-file-import-cycles',\n excludePatterns: [],\n },\n workspace: {\n enabled: true,\n targetPrefix: 'arch:',\n graphPath: 'architecture/dependencies.json',\n validations: {\n noCycles: true,\n noSkipLevelDeps: true,\n architectureUnchanged: true,\n validatePackageJson: true,\n validateNewMethods: true,\n validateModifiedMethods: true,\n validateModifiedFiles: true,\n validateVersionsLocked: true,\n validateTsInSrc: true,\n newMethodsMaxLines: 30,\n modifiedAndNewMethodsMaxLines: 80,\n modifiedFilesMaxLines: 900,\n validationMode: 'NORMAL',\n },\n features: {\n generate: true,\n visualize: true,\n },\n },\n};\n\nfunction normalizeOptions(\n options: ArchitecturePluginOptions | undefined,\n): Required<ArchitecturePluginOptions> {\n const circularDeps = {\n ...DEFAULT_OPTIONS.circularDeps,\n ...options?.circularDeps,\n };\n\n const workspace = {\n ...DEFAULT_OPTIONS.workspace,\n ...options?.workspace,\n validations: {\n ...DEFAULT_OPTIONS.workspace.validations,\n ...options?.workspace?.validations,\n },\n features: {\n ...DEFAULT_OPTIONS.workspace.features,\n ...options?.workspace?.features,\n },\n };\n\n return {\n circularDeps,\n workspace,\n } as Required<ArchitecturePluginOptions>;\n}\n\nasync function createNodesFunction(\n projectFiles: readonly string[],\n options: ArchitecturePluginOptions | undefined,\n context: CreateNodesContextV2,\n): Promise<CreateNodesResultV2> {\n const opts = normalizeOptions(options);\n const results: CreateNodesResultV2 = [];\n\n // Add workspace-level architecture targets\n addArchitectureProject(results, projectFiles, opts, context);\n\n // Add per-project targets (circular-deps, ci)\n addPerProjectTargets(results, projectFiles, opts, context);\n\n return results;\n}\n\nfunction addArchitectureProject(\n results: CreateNodesResultV2,\n projectFiles: readonly string[],\n opts: Required<ArchitecturePluginOptions>,\n context: CreateNodesContextV2,\n): void {\n if (!opts.workspace.enabled) return;\n\n const archDirPath = join(context.workspaceRoot, 'architecture');\n if (!existsSync(archDirPath)) return;\n\n const workspaceTargets = createWorkspaceTargetsWithoutPrefix(opts);\n if (Object.keys(workspaceTargets).length === 0) return;\n\n const result: CreateNodesResult = {\n projects: {\n architecture: {\n name: 'architecture',\n root: 'architecture',\n targets: workspaceTargets,\n },\n },\n };\n\n const firstProjectFile = projectFiles[0];\n if (firstProjectFile) {\n results.push([firstProjectFile, result] as const);\n }\n}\n\nfunction addPerProjectTargets(\n results: CreateNodesResultV2,\n projectFiles: readonly string[],\n opts: Required<ArchitecturePluginOptions>,\n context: CreateNodesContextV2,\n): void {\n // Track processed project roots to avoid duplicates when both files exist\n const processedRoots = new Set<string>();\n\n for (const projectFile of projectFiles) {\n const isProjectJson = projectFile.endsWith('project.json');\n const isPackageJson = projectFile.endsWith('package.json');\n\n if (!isProjectJson && !isPackageJson) continue;\n\n const projectRoot = dirname(projectFile);\n\n // Skip root (workspace manifest, not a project)\n if (projectRoot === '.') continue;\n\n // Skip if we've already processed this project root\n if (processedRoots.has(projectRoot)) continue;\n\n // For package.json, skip if project.json also exists in same directory\n // (prefer project.json - it will be processed separately)\n if (isPackageJson) {\n const projectJsonPath = join(context.workspaceRoot, projectRoot, 'project.json');\n if (existsSync(projectJsonPath)) continue;\n }\n\n processedRoots.add(projectRoot);\n\n const targets: Record<string, TargetConfiguration> = {};\n\n // Add circular-deps target ONLY for project.json projects\n // (package.json-only projects may not have TypeScript source)\n if (isProjectJson && opts.circularDeps.enabled) {\n if (!isExcluded(projectRoot, opts.circularDeps.excludePatterns!)) {\n const targetName = opts.circularDeps.targetName!;\n targets[targetName] = createCircularDepsTarget(projectRoot, targetName);\n }\n }\n\n // Add ci target to ALL projects (both project.json and package.json)\n targets['ci'] = createCiTarget();\n\n if (Object.keys(targets).length === 0) continue;\n\n const result: CreateNodesResult = {\n projects: {\n [projectRoot]: {\n targets,\n },\n },\n };\n\n results.push([projectFile, result] as const);\n }\n}\n\n/**\n * Nx V2 Inference Plugin\n * Matches project.json and package.json files to create targets\n */\nexport const createNodesV2: CreateNodesV2<ArchitecturePluginOptions> = [\n // Pattern to match project.json and package.json files\n '**/{project,package}.json',\n\n // Inference function\n createNodesFunction,\n];\n\n/**\n * Build list of enabled validation target names for validate-complete dependency chain\n */\nfunction buildValidationTargetsList(\n validations: Required<ArchitecturePluginOptions>['workspace']['validations'],\n): string[] {\n const targets: string[] = [];\n if (validations!.noCycles) targets.push('validate-no-architecture-cycles');\n if (validations!.architectureUnchanged) targets.push('validate-architecture-unchanged');\n if (validations!.noSkipLevelDeps) targets.push('validate-no-skiplevel-deps');\n if (validations!.validatePackageJson) targets.push('validate-packagejson');\n // Use combined validate-code instead of 3 separate targets\n if (\n validations!.validateNewMethods ||\n validations!.validateModifiedMethods ||\n validations!.validateModifiedFiles\n ) {\n targets.push('validate-code');\n }\n if (validations!.validateVersionsLocked) targets.push('validate-versions-locked');\n if (validations!.validateTsInSrc) targets.push('validate-ts-in-src');\n return targets;\n}\n\n/**\n * Create workspace-level architecture validation targets WITHOUT prefix\n * Used for virtual 'architecture' project\n */\nfunction createWorkspaceTargetsWithoutPrefix(\n opts: Required<ArchitecturePluginOptions>,\n): Record<string, TargetConfiguration> {\n const targets: Record<string, TargetConfiguration> = {};\n const graphPath = opts.workspace.graphPath!;\n const validations = opts.workspace.validations!;\n\n // Add help target (always available)\n targets['help'] = createHelpTarget();\n\n if (opts.workspace.features!.generate) {\n targets['generate'] = createGenerateTarget(graphPath);\n }\n if (opts.workspace.features!.visualize) {\n targets['visualize'] = createVisualizeTargetWithoutPrefix(graphPath);\n }\n if (validations.noCycles) {\n targets['validate-no-architecture-cycles'] = createValidateNoCyclesTarget();\n }\n if (validations.architectureUnchanged) {\n targets['validate-architecture-unchanged'] = createValidateUnchangedTarget(graphPath);\n }\n if (validations.noSkipLevelDeps) {\n targets['validate-no-skiplevel-deps'] = createValidateNoSkipLevelTarget();\n }\n if (validations.validatePackageJson) {\n targets['validate-packagejson'] = createValidatePackageJsonTarget();\n }\n // Use combined validate-code instead of 3 separate targets\n // Options come from webpieces.config.json at the workspace root\n // (loaded via @webpieces/rules-config; same source of truth as @webpieces/ai-hook-rules)\n if (\n validations.validateNewMethods ||\n validations.validateModifiedMethods ||\n validations.validateModifiedFiles\n ) {\n targets['validate-code'] = createValidateCodeTarget();\n }\n if (validations.validateVersionsLocked) {\n targets['validate-versions-locked'] = createValidateVersionsLockedTarget();\n }\n if (validations.validateTsInSrc) {\n targets['validate-ts-in-src'] = createValidateTsInSrcTarget();\n }\n\n // Add validate-complete target that runs all enabled validations\n const validationTargets = buildValidationTargetsList(validations);\n if (validationTargets.length > 0) {\n targets['validate-complete'] = createValidateCompleteTarget(validationTargets);\n }\n\n return targets;\n}\n\n/**\n * Create workspace-level architecture validation targets (DEPRECATED - keeping for backward compat)\n * Used when root project.json exists (old style with '.' project)\n */\nfunction createWorkspaceTargets(\n opts: Required<ArchitecturePluginOptions>,\n): Record<string, TargetConfiguration> {\n const targets: Record<string, TargetConfiguration> = {};\n const prefix = opts.workspace.targetPrefix!;\n const graphPath = opts.workspace.graphPath!;\n\n // Add help target (always available)\n targets[`${prefix}help`] = createHelpTarget();\n\n if (opts.workspace.features!.generate) {\n targets[`${prefix}generate`] = createGenerateTarget(graphPath);\n }\n\n if (opts.workspace.features!.visualize) {\n targets[`${prefix}visualize`] = createVisualizeTarget(prefix, graphPath);\n }\n\n if (opts.workspace.validations!.noCycles) {\n targets[`${prefix}validate-no-architecture-cycles`] = createValidateNoCyclesTarget();\n }\n\n if (opts.workspace.validations!.architectureUnchanged) {\n targets[`${prefix}validate-architecture-unchanged`] =\n createValidateUnchangedTarget(graphPath);\n }\n\n if (opts.workspace.validations!.noSkipLevelDeps) {\n targets[`${prefix}validate-no-skiplevel-deps`] = createValidateNoSkipLevelTarget();\n }\n\n if (opts.workspace.validations!.validatePackageJson) {\n targets[`${prefix}validate-packagejson`] = createValidatePackageJsonTarget();\n }\n\n // Use combined validate-code instead of 3 separate targets\n // Options come from webpieces.config.json at the workspace root\n // (loaded via @webpieces/rules-config; same source of truth as @webpieces/ai-hook-rules)\n if (\n opts.workspace.validations!.validateNewMethods ||\n opts.workspace.validations!.validateModifiedMethods ||\n opts.workspace.validations!.validateModifiedFiles\n ) {\n targets[`${prefix}validate-code`] = createValidateCodeTarget();\n }\n\n return targets;\n}\n\nfunction createGenerateTarget(graphPath: string): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:generate',\n cache: false,\n outputs: ['{workspaceRoot}/architecture/dependencies.json'],\n options: { graphPath },\n metadata: {\n technologies: ['nx'],\n description: 'Generate the architecture dependency graph from project.json files',\n },\n };\n}\n\nfunction createVisualizeTargetWithoutPrefix(graphPath: string): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:visualize',\n dependsOn: ['generate'],\n options: { graphPath },\n metadata: {\n technologies: ['nx'],\n description: 'Generate visual representations of the architecture graph',\n },\n };\n}\n\nfunction createVisualizeTarget(prefix: string, graphPath: string): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:visualize',\n dependsOn: [`${prefix}generate`],\n options: { graphPath },\n metadata: {\n technologies: ['nx'],\n description: 'Generate visual representations of the architecture graph',\n },\n };\n}\n\nfunction createValidateNoCyclesTarget(): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:validate-no-architecture-cycles',\n cache: true,\n inputs: ['{workspaceRoot}/**/project.json', '{workspaceRoot}/architecture/dependencies.json'],\n metadata: {\n technologies: ['nx'],\n description: 'Validate the architecture has no circular project dependencies',\n },\n };\n}\n\nfunction createValidateUnchangedTarget(graphPath: string): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:validate-architecture-unchanged',\n cache: false,\n inputs: ['default', '{workspaceRoot}/architecture/dependencies.json'],\n options: { graphPath },\n metadata: {\n technologies: ['nx'],\n description: 'Validate the architecture matches the saved blessed graph',\n },\n };\n}\n\nfunction createValidateNoSkipLevelTarget(): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:validate-no-skiplevel-deps',\n cache: true,\n inputs: ['{workspaceRoot}/**/project.json', '{workspaceRoot}/architecture/dependencies.json'],\n metadata: {\n technologies: ['nx'],\n description: 'Validate no project has redundant transitive dependencies',\n },\n };\n}\n\nfunction createValidatePackageJsonTarget(): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:validate-packagejson',\n cache: true,\n inputs: ['{workspaceRoot}/**/project.json', '{workspaceRoot}/**/package.json'],\n metadata: {\n technologies: ['nx'],\n description: 'Validate package.json dependencies match project.json build dependencies',\n },\n };\n}\n\nfunction createValidateNewMethodsTarget(\n maxLines: number,\n mode: 'STRICT' | 'NORMAL' | 'OFF',\n): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:validate-new-methods',\n cache: false, // Don't cache - depends on git state\n inputs: ['default'],\n options: { max: maxLines, mode },\n metadata: {\n technologies: ['nx'],\n description: `Validate new methods do not exceed ${maxLines} lines (only runs in affected mode)`,\n },\n };\n}\n\nfunction createValidateModifiedMethodsTarget(\n maxLines: number,\n mode: 'STRICT' | 'NORMAL' | 'OFF',\n): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:validate-modified-methods',\n cache: false, // Don't cache - depends on git state\n inputs: ['default'],\n options: { max: maxLines, mode },\n metadata: {\n technologies: ['nx'],\n description: `Validate new and modified methods do not exceed ${maxLines} lines (encourages gradual cleanup)`,\n },\n };\n}\n\nfunction createValidateModifiedFilesTarget(\n maxLines: number,\n mode: 'STRICT' | 'NORMAL' | 'OFF',\n): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:validate-modified-files',\n cache: false, // Don't cache - depends on git state\n inputs: ['default'],\n options: { max: maxLines, mode },\n metadata: {\n technologies: ['nx'],\n description: `Validate modified files do not exceed ${maxLines} lines (encourages keeping files small)`,\n },\n };\n}\n\n/**\n * Create combined validate-code target\n * Options come from webpieces.config.json at the workspace root\n * (loaded by the executor via @webpieces/rules-config — same source of truth as @webpieces/ai-hook-rules)\n */\nfunction createValidateCodeTarget(): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:validate-code',\n cache: false, // Don't cache - depends on git state\n inputs: ['default', '{workspaceRoot}/webpieces.config.json'],\n // No options here - they come from webpieces.config.json at runtime\n metadata: {\n technologies: ['nx'],\n description: 'Combined validation for new methods, modified methods, and file sizes',\n },\n };\n}\n\nfunction createValidateVersionsLockedTarget(): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:validate-versions-locked',\n cache: true,\n inputs: ['{workspaceRoot}/**/package.json'],\n metadata: {\n technologies: ['nx'],\n description:\n 'Validate package.json versions are locked (no semver ranges) and consistent across projects',\n },\n };\n}\n\nfunction createValidateTsInSrcTarget(): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:validate-ts-in-src',\n cache: false,\n inputs: ['default', '{workspaceRoot}/webpieces.config.json'],\n metadata: {\n technologies: ['nx'],\n description: 'Validate all .ts files in projects are inside the src/ directory',\n },\n };\n}\n\nfunction createValidateCompleteTarget(validationTargets: string[]): TargetConfiguration {\n return {\n executor: 'nx:noop',\n cache: true,\n dependsOn: validationTargets,\n metadata: {\n technologies: ['nx'],\n description: 'Run all architecture validations (cycles, unchanged, skip-level deps)',\n },\n };\n}\n\n/**\n * Create per-project ci target - Gradle-style composite target\n * Runs lint, build, and test in parallel\n * (with test depending on build via targetDefaults)\n *\n * NOTE: Type checking is done by the build target (@nx/js:tsc) during compilation.\n */\nfunction createCiTarget(): TargetConfiguration {\n return {\n executor: 'nx:noop',\n cache: true,\n dependsOn: ['lint', 'build', 'test'],\n metadata: {\n technologies: ['nx'],\n description: 'Run all CI checks: lint, build, and test (Gradle-style composite target)',\n },\n };\n}\n\nfunction createHelpTarget(): TargetConfiguration {\n return {\n executor: '@webpieces/nx-webpieces-rules:help',\n cache: false, // Never cache - always show help output\n metadata: {\n technologies: ['nx'],\n description: 'Display help for @webpieces/nx-webpieces-rules commands and targets',\n },\n };\n}\n\n/**\n * Create per-project circular dependency checking target\n * Runs on project root (.) to check ALL TypeScript files in the project\n */\nfunction createCircularDepsTarget(projectRoot: string, targetName: string): TargetConfiguration {\n return {\n executor: 'nx:run-commands',\n cache: true,\n inputs: ['default'],\n outputs: [] as string[],\n options: {\n command: 'npx madge --circular --extensions ts,tsx .',\n cwd: projectRoot,\n },\n metadata: {\n technologies: ['madge'],\n description: 'Check for circular dependencies using madge',\n },\n };\n}\n\n/**\n * Check if a project should be excluded based on patterns\n */\nfunction isExcluded(projectRoot: string, excludePatterns: string[]): boolean {\n if (excludePatterns.length === 0) {\n return false;\n }\n\n // Simple glob matching (could be enhanced with minimatch if needed)\n return excludePatterns.some((pattern) => {\n // Convert glob pattern to regex\n const regexPattern = pattern\n .replace(/\\*\\*/g, '.*') // ** matches any path\n .replace(/\\*/g, '[^/]*'); // * matches any string except /\n\n const regex = new RegExp(`^${regexPattern}$`);\n return regex.test(projectRoot);\n });\n}\n\n/**\n * Export plugin as default for Nx\n */\nexport default { createNodesV2 };\n"]}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Lightweight duplicate of @webpieces/core-util toError for use in dev-config.
3
+ * dev-config is Level 0 and cannot depend on core-util (also Level 0).
4
+ */
5
+ export declare function toError(err: unknown): Error;
@@ -1,17 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toError = toError;
1
4
  /**
2
5
  * Lightweight duplicate of @webpieces/core-util toError for use in dev-config.
3
6
  * dev-config is Level 0 and cannot depend on core-util (also Level 0).
4
7
  */
5
8
  // webpieces-disable no-any-unknown -- toError intentionally accepts unknown to safely convert any thrown value to Error
6
- export function toError(err: unknown): Error {
9
+ function toError(err) {
7
10
  if (err instanceof Error) {
8
11
  return err;
9
12
  }
10
-
11
13
  if (err && typeof err === 'object') {
12
14
  if ('message' in err) {
13
15
  const error = new Error(String(err.message));
14
-
15
16
  if ('stack' in err && typeof err.stack === 'string') {
16
17
  error.stack = err.stack;
17
18
  }
@@ -20,17 +21,17 @@ export function toError(err: unknown): Error {
20
21
  }
21
22
  return error;
22
23
  }
23
-
24
24
  // eslint-disable-next-line @webpieces/no-unmanaged-exceptions -- must handle circular references without recursion
25
25
  try {
26
26
  return new Error(`Non-Error object thrown: ${JSON.stringify(err)}`);
27
- } catch (err: unknown) {
27
+ }
28
+ catch (err) {
28
29
  //const error = toError(err);
29
30
  void err;
30
31
  return new Error('Non-Error object thrown (unable to stringify)');
31
32
  }
32
33
  }
33
-
34
34
  const message = err == null ? 'Null or undefined thrown' : String(err);
35
35
  return new Error(message);
36
36
  }
37
+ //# sourceMappingURL=toError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toError.js","sourceRoot":"","sources":["../../../../../packages/tooling/nx-webpieces-rules/src/toError.ts"],"names":[],"mappings":";;AAKA,0BA8BC;AAnCD;;;GAGG;AACH,wHAAwH;AACxH,SAAgB,OAAO,CAAC,GAAY;IAChC,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;QACvB,OAAO,GAAG,CAAC;IACf,CAAC;IAED,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QACjC,IAAI,SAAS,IAAI,GAAG,EAAE,CAAC;YACnB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;YAE7C,IAAI,OAAO,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAClD,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;YAC5B,CAAC;YACD,IAAI,MAAM,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAChD,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YAC1B,CAAC;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,mHAAmH;QACnH,IAAI,CAAC;YACD,OAAO,IAAI,KAAK,CAAC,4BAA4B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACxE,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACpB,6BAA6B;YAC7B,KAAK,GAAG,CAAC;YACT,OAAO,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACtE,CAAC;IACL,CAAC;IAED,MAAM,OAAO,GAAG,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACvE,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/**\n * Lightweight duplicate of @webpieces/core-util toError for use in dev-config.\n * dev-config is Level 0 and cannot depend on core-util (also Level 0).\n */\n// webpieces-disable no-any-unknown -- toError intentionally accepts unknown to safely convert any thrown value to Error\nexport function toError(err: unknown): Error {\n if (err instanceof Error) {\n return err;\n }\n\n if (err && typeof err === 'object') {\n if ('message' in err) {\n const error = new Error(String(err.message));\n\n if ('stack' in err && typeof err.stack === 'string') {\n error.stack = err.stack;\n }\n if ('name' in err && typeof err.name === 'string') {\n error.name = err.name;\n }\n return error;\n }\n\n // eslint-disable-next-line @webpieces/no-unmanaged-exceptions -- must handle circular references without recursion\n try {\n return new Error(`Non-Error object thrown: ${JSON.stringify(err)}`);\n } catch (err: unknown) {\n //const error = toError(err);\n void err;\n return new Error('Non-Error object thrown (unable to stringify)');\n }\n }\n\n const message = err == null ? 'Null or undefined thrown' : String(err);\n return new Error(message);\n}\n"]}
package/LICENSE DELETED
@@ -1,373 +0,0 @@
1
- Mozilla Public License Version 2.0
2
- ==================================
3
-
4
- 1. Definitions
5
- --------------
6
-
7
- 1.1. "Contributor"
8
- means each individual or legal entity that creates, contributes to
9
- the creation of, or owns Covered Software.
10
-
11
- 1.2. "Contributor Version"
12
- means the combination of the Contributions of others (if any) used
13
- by a Contributor and that particular Contributor's Contribution.
14
-
15
- 1.3. "Contribution"
16
- means Covered Software of a particular Contributor.
17
-
18
- 1.4. "Covered Software"
19
- means Source Code Form to which the initial Contributor has attached
20
- the notice in Exhibit A, the Executable Form of such Source Code
21
- Form, and Modifications of such Source Code Form, in each case
22
- including portions thereof.
23
-
24
- 1.5. "Incompatible With Secondary Licenses"
25
- means
26
-
27
- (a) that the initial Contributor has attached the notice described
28
- in Exhibit B to the Covered Software; or
29
-
30
- (b) that the Covered Software was made available under the terms of
31
- version 1.1 or earlier of the License, but not also under the
32
- terms of a Secondary License.
33
-
34
- 1.6. "Executable Form"
35
- means any form of the work other than Source Code Form.
36
-
37
- 1.7. "Larger Work"
38
- means a work that combines Covered Software with other material, in
39
- a separate file or files, that is not Covered Software.
40
-
41
- 1.8. "License"
42
- means this document.
43
-
44
- 1.9. "Licensable"
45
- means having the right to grant, to the maximum extent possible,
46
- whether at the time of the initial grant or subsequently, any and
47
- all of the rights conveyed by this License.
48
-
49
- 1.10. "Modifications"
50
- means any of the following:
51
-
52
- (a) any file in Source Code Form that results from an addition to,
53
- deletion from, or modification of the contents of Covered
54
- Software; or
55
-
56
- (b) any new file in Source Code Form that contains any Covered
57
- Software.
58
-
59
- 1.11. "Patent Claims" of a Contributor
60
- means any patent claim(s), including without limitation, method,
61
- process, and apparatus claims, in any patent Licensable by such
62
- Contributor that would be infringed, but for the grant of the
63
- License, by the making, using, selling, offering for sale, having
64
- made, import, or transfer of either its Contributions or its
65
- Contributor Version.
66
-
67
- 1.12. "Secondary License"
68
- means either the GNU General Public License, Version 2.0, the GNU
69
- Lesser General Public License, Version 2.1, the GNU Affero General
70
- Public License, Version 3.0, or any later versions of those
71
- licenses.
72
-
73
- 1.13. "Source Code Form"
74
- means the form of the work preferred for making modifications.
75
-
76
- 1.14. "You" (or "Your")
77
- means an individual or a legal entity exercising rights under this
78
- License. For legal entities, "You" includes any entity that
79
- controls, is controlled by, or is under common control with You. For
80
- purposes of this definition, "control" means (a) the power, direct
81
- or indirect, to cause the direction or management of such entity,
82
- whether by contract or otherwise, or (b) ownership of more than
83
- fifty percent (50%) of the outstanding shares or beneficial
84
- ownership of such entity.
85
-
86
- 2. License Grants and Conditions
87
- --------------------------------
88
-
89
- 2.1. Grants
90
-
91
- Each Contributor hereby grants You a world-wide, royalty-free,
92
- non-exclusive license:
93
-
94
- (a) under intellectual property rights (other than patent or trademark)
95
- Licensable by such Contributor to use, reproduce, make available,
96
- modify, display, perform, distribute, and otherwise exploit its
97
- Contributions, either on an unmodified basis, with Modifications, or
98
- as part of a Larger Work; and
99
-
100
- (b) under Patent Claims of such Contributor to make, use, sell, offer
101
- for sale, have made, import, and otherwise transfer either its
102
- Contributions or its Contributor Version.
103
-
104
- 2.2. Effective Date
105
-
106
- The licenses granted in Section 2.1 with respect to any Contribution
107
- become effective for each Contribution on the date the Contributor first
108
- distributes such Contribution.
109
-
110
- 2.3. Limitations on Grant Scope
111
-
112
- The licenses granted in this Section 2 are the only rights granted under
113
- this License. No additional rights or licenses will be implied from the
114
- distribution or licensing of Covered Software under this License.
115
- Notwithstanding Section 2.1(b) above, no patent license is granted by a
116
- Contributor:
117
-
118
- (a) for any code that a Contributor has removed from Covered Software;
119
- or
120
-
121
- (b) for infringements caused by: (i) Your and any other third party's
122
- modifications of Covered Software, or (ii) the combination of its
123
- Contributions with other software (except as part of its Contributor
124
- Version); or
125
-
126
- (c) under Patent Claims infringed by Covered Software in the absence of
127
- its Contributions.
128
-
129
- This License does not grant any rights in the trademarks, service marks,
130
- or logos of any Contributor (except as may be necessary to comply with
131
- the notice requirements in Section 3.4).
132
-
133
- 2.4. Subsequent Licenses
134
-
135
- No Contributor makes additional grants as a result of Your choice to
136
- distribute the Covered Software under a subsequent version of this
137
- License (see Section 10.2) or under the terms of a Secondary License (if
138
- permitted under the terms of Section 3.3).
139
-
140
- 2.5. Representation
141
-
142
- Each Contributor represents that the Contributor believes its
143
- Contributions are its original creation(s) or it has sufficient rights
144
- to grant the rights to its Contributions conveyed by this License.
145
-
146
- 2.6. Fair Use
147
-
148
- This License is not intended to limit any rights You have under
149
- applicable copyright doctrines of fair use, fair dealing, or other
150
- equivalents.
151
-
152
- 2.7. Conditions
153
-
154
- Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
155
- in Section 2.1.
156
-
157
- 3. Responsibilities
158
- -------------------
159
-
160
- 3.1. Distribution of Source Form
161
-
162
- All distribution of Covered Software in Source Code Form, including any
163
- Modifications that You create or to which You contribute, must be under
164
- the terms of this License. You must inform recipients that the Source
165
- Code Form of the Covered Software is governed by the terms of this
166
- License, and how they can obtain a copy of this License. You may not
167
- attempt to alter or restrict the recipients' rights in the Source Code
168
- Form.
169
-
170
- 3.2. Distribution of Executable Form
171
-
172
- If You distribute Covered Software in Executable Form then:
173
-
174
- (a) such Covered Software must also be made available in Source Code
175
- Form, as described in Section 3.1, and You must inform recipients of
176
- the Executable Form how they can obtain a copy of such Source Code
177
- Form by reasonable means in a timely manner, at a charge no more
178
- than the cost of distribution to the recipient; and
179
-
180
- (b) You may distribute such Executable Form under the terms of this
181
- License, or sublicense it under different terms, provided that the
182
- license for the Executable Form does not attempt to limit or alter
183
- the recipients' rights in the Source Code Form under this License.
184
-
185
- 3.3. Distribution of a Larger Work
186
-
187
- You may create and distribute a Larger Work under terms of Your choice,
188
- provided that You also comply with the requirements of this License for
189
- the Covered Software. If the Larger Work is a combination of Covered
190
- Software with a work governed by one or more Secondary Licenses, and the
191
- Covered Software is not Incompatible With Secondary Licenses, this
192
- License permits You to additionally distribute such Covered Software
193
- under the terms of such Secondary License(s), so that the recipient of
194
- the Larger Work may, at their option, further distribute the Covered
195
- Software under the terms of either this License or such Secondary
196
- License(s).
197
-
198
- 3.4. Notices
199
-
200
- You may not remove or alter the substance of any license notices
201
- (including copyright notices, patent notices, disclaimers of warranty,
202
- or limitations of liability) contained within the Source Code Form of
203
- the Covered Software, except that You may alter any license notices to
204
- the extent required to remedy known factual inaccuracies.
205
-
206
- 3.5. Application of Additional Terms
207
-
208
- You may choose to offer, and to charge a fee for, warranty, support,
209
- indemnity or liability obligations to one or more recipients of Covered
210
- Software. However, You may do so only on Your own behalf, and not on
211
- behalf of any Contributor. You must make it absolutely clear that any
212
- such warranty, support, indemnity, or liability obligation is offered by
213
- You alone, and You hereby agree to indemnify every Contributor for any
214
- liability incurred by such Contributor as a result of warranty, support,
215
- indemnity or liability terms You offer. You may include additional
216
- disclaimers of warranty and limitations of liability specific to any
217
- jurisdiction.
218
-
219
- 4. Inability to Comply Due to Statute or Regulation
220
- ---------------------------------------------------
221
-
222
- If it is impossible for You to comply with any of the terms of this
223
- License with respect to some or all of the Covered Software due to
224
- statute, judicial order, or regulation then You must: (a) comply with
225
- the terms of this License to the maximum extent possible; and (b)
226
- describe the limitations and the code they affect. Such description must
227
- be placed in a text file included with all distributions of the Covered
228
- Software under this License. Except to the extent prohibited by statute
229
- or regulation, such description must be sufficiently detailed for a
230
- recipient of ordinary skill to be able to understand it.
231
-
232
- 5. Termination
233
- --------------
234
-
235
- 5.1. The rights granted under this License will terminate automatically
236
- if You fail to comply with any of its terms. However, if You become
237
- compliant, then the rights granted under this License from a particular
238
- Contributor are reinstated (a) provisionally, unless and until such
239
- Contributor explicitly and finally terminates Your grants, and (b) on an
240
- ongoing basis, if such Contributor fails to notify You of the
241
- non-compliance by some reasonable means prior to 60 days after You have
242
- come back into compliance. Moreover, Your grants from a particular
243
- Contributor are reinstated on an ongoing basis if such Contributor
244
- notifies You of the non-compliance by some reasonable means, this is the
245
- first time You have received notice of non-compliance with this License
246
- from such Contributor, and You become compliant prior to 30 days after
247
- Your receipt of the notice.
248
-
249
- 5.2. If You initiate litigation against any entity by asserting a patent
250
- infringement claim (excluding declaratory judgment actions,
251
- counter-claims, and cross-claims) alleging that a Contributor Version
252
- directly or indirectly infringes any patent, then the rights granted to
253
- You by any and all Contributors for the Covered Software under Section
254
- 2.1 of this License shall terminate.
255
-
256
- 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
257
- end user license agreements (excluding distributors and resellers) which
258
- have been validly granted by You or Your distributors under this License
259
- prior to termination shall survive termination.
260
-
261
- ************************************************************************
262
- * *
263
- * 6. Disclaimer of Warranty *
264
- * ------------------------- *
265
- * *
266
- * Covered Software is provided under this License on an "as is" *
267
- * basis, without warranty of any kind, either expressed, implied, or *
268
- * statutory, including, without limitation, warranties that the *
269
- * Covered Software is free of defects, merchantable, fit for a *
270
- * particular purpose or non-infringing. The entire risk as to the *
271
- * quality and performance of the Covered Software is with You. *
272
- * Should any Covered Software prove defective in any respect, You *
273
- * (not any Contributor) assume the cost of any necessary servicing, *
274
- * repair, or correction. This disclaimer of warranty constitutes an *
275
- * essential part of this License. No use of any Covered Software is *
276
- * authorized under this License except under this disclaimer. *
277
- * *
278
- ************************************************************************
279
-
280
- ************************************************************************
281
- * *
282
- * 7. Limitation of Liability *
283
- * -------------------------- *
284
- * *
285
- * Under no circumstances and under no legal theory, whether tort *
286
- * (including negligence), contract, or otherwise, shall any *
287
- * Contributor, or anyone who distributes Covered Software as *
288
- * permitted above, be liable to You for any direct, indirect, *
289
- * special, incidental, or consequential damages of any character *
290
- * including, without limitation, damages for lost profits, loss of *
291
- * goodwill, work stoppage, computer failure or malfunction, or any *
292
- * and all other commercial damages or losses, even if such party *
293
- * shall have been informed of the possibility of such damages. This *
294
- * limitation of liability shall not apply to liability for death or *
295
- * personal injury resulting from such party's negligence to the *
296
- * extent applicable law prohibits such limitation. Some *
297
- * jurisdictions do not allow the exclusion or limitation of *
298
- * incidental or consequential damages, so this exclusion and *
299
- * limitation may not apply to You. *
300
- * *
301
- ************************************************************************
302
-
303
- 8. Litigation
304
- -------------
305
-
306
- Any litigation relating to this License may be brought only in the
307
- courts of a jurisdiction where the defendant maintains its principal
308
- place of business and such litigation shall be governed by laws of that
309
- jurisdiction, without reference to its conflict-of-law provisions.
310
- Nothing in this Section shall prevent a party's ability to bring
311
- cross-claims or counter-claims.
312
-
313
- 9. Miscellaneous
314
- ----------------
315
-
316
- This License represents the complete agreement concerning the subject
317
- matter hereof. If any provision of this License is held to be
318
- unenforceable, such provision shall be reformed only to the extent
319
- necessary to make it enforceable. Any law or regulation which provides
320
- that the language of a contract shall be construed against the drafter
321
- shall not be used to construe this License against a Contributor.
322
-
323
- 10. Versions of the License
324
- ---------------------------
325
-
326
- 10.1. New Versions
327
-
328
- Mozilla Foundation is the license steward. Except as provided in Section
329
- 10.3, no one other than the license steward has the right to modify or
330
- publish new versions of this License. Each version will be given a
331
- distinguishing version number.
332
-
333
- 10.2. Effect of New Versions
334
-
335
- You may distribute the Covered Software under the terms of the version
336
- of the License under which You originally received the Covered Software,
337
- or under the terms of any subsequent version published by the license
338
- steward.
339
-
340
- 10.3. Modified Versions
341
-
342
- If you create software not governed by this License, and you want to
343
- create a new license for such software, you may create and use a
344
- modified version of this License if you rename the license and remove
345
- any references to the name of the license steward (except to note that
346
- such modified license differs from this License).
347
-
348
- 10.4. Distributing Source Code Form that is Incompatible With Secondary
349
- Licenses
350
-
351
- If You choose to distribute Source Code Form that is Incompatible With
352
- Secondary Licenses under the terms of this version of the License, the
353
- notice described in Exhibit B of this License must be attached.
354
-
355
- Exhibit A - Source Code Form License Notice
356
- -------------------------------------------
357
-
358
- This Source Code Form is subject to the terms of the Mozilla Public
359
- License, v. 2.0. If a copy of the MPL was not distributed with this
360
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
361
-
362
- If it is not possible or desirable to put the notice in a particular
363
- file, then You may include the notice in a location (such as a LICENSE
364
- file in a relevant directory) where a recipient would be likely to look
365
- for such a notice.
366
-
367
- You may add additional accurate notices of copyright ownership.
368
-
369
- Exhibit B - "Incompatible With Secondary Licenses" Notice
370
- ---------------------------------------------------------
371
-
372
- This Source Code Form is "Incompatible With Secondary Licenses", as
373
- defined by the Mozilla Public License, v. 2.0.
@@ -1,7 +0,0 @@
1
- export class ExecutorResult {
2
- success: boolean;
3
-
4
- constructor(success: boolean) {
5
- this.success = success;
6
- }
7
- }
@@ -1,11 +0,0 @@
1
- import type { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResult } from '../../executor-result';
3
- import { validateCatchErrorPattern } from '@webpieces/code-rules';
4
-
5
- export default async function runExecutor(
6
- // webpieces-disable no-any-unknown -- options are passed through to code-rules validators
7
- options: Record<string, unknown>,
8
- context: ExecutorContext,
9
- ): Promise<ExecutorResult> {
10
- return validateCatchErrorPattern(options, context.root);
11
- }
@@ -1,11 +0,0 @@
1
- import type { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResult } from '../../executor-result';
3
- import { validateCode } from '@webpieces/code-rules';
4
-
5
- export default async function runExecutor(
6
- // webpieces-disable no-any-unknown -- options are passed through to code-rules validators
7
- options: Record<string, unknown>,
8
- context: ExecutorContext,
9
- ): Promise<ExecutorResult> {
10
- return validateCode(options, context.root);
11
- }
@@ -1,11 +0,0 @@
1
- import type { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResult } from '../../executor-result';
3
- import { validateDtos } from '@webpieces/code-rules';
4
-
5
- export default async function runExecutor(
6
- // webpieces-disable no-any-unknown -- options are passed through to code-rules validators
7
- options: Record<string, unknown>,
8
- context: ExecutorContext,
9
- ): Promise<ExecutorResult> {
10
- return validateDtos(options, context.root);
11
- }
@@ -1,11 +0,0 @@
1
- import type { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResult } from '../../executor-result';
3
- import { validateModifiedFiles } from '@webpieces/code-rules';
4
-
5
- export default async function runExecutor(
6
- // webpieces-disable no-any-unknown -- options are passed through to code-rules validators
7
- options: Record<string, unknown>,
8
- context: ExecutorContext,
9
- ): Promise<ExecutorResult> {
10
- return validateModifiedFiles(options, context.root);
11
- }
@@ -1,11 +0,0 @@
1
- import type { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResult } from '../../executor-result';
3
- import { validateModifiedMethods } from '@webpieces/code-rules';
4
-
5
- export default async function runExecutor(
6
- // webpieces-disable no-any-unknown -- options are passed through to code-rules validators
7
- options: Record<string, unknown>,
8
- context: ExecutorContext,
9
- ): Promise<ExecutorResult> {
10
- return validateModifiedMethods(options, context.root);
11
- }
@@ -1,11 +0,0 @@
1
- import type { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResult } from '../../executor-result';
3
- import { validateNewMethods } from '@webpieces/code-rules';
4
-
5
- export default async function runExecutor(
6
- // webpieces-disable no-any-unknown -- options are passed through to code-rules validators
7
- options: Record<string, unknown>,
8
- context: ExecutorContext,
9
- ): Promise<ExecutorResult> {
10
- return validateNewMethods(options, context.root);
11
- }
@@ -1,11 +0,0 @@
1
- import type { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResult } from '../../executor-result';
3
- import { validateNoAnyUnknown } from '@webpieces/code-rules';
4
-
5
- export default async function runExecutor(
6
- // webpieces-disable no-any-unknown -- options are passed through to code-rules validators
7
- options: Record<string, unknown>,
8
- context: ExecutorContext,
9
- ): Promise<ExecutorResult> {
10
- return validateNoAnyUnknown(options, context.root);
11
- }
@@ -1,11 +0,0 @@
1
- import type { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResult } from '../../executor-result';
3
- import { validateNoDestructure } from '@webpieces/code-rules';
4
-
5
- export default async function runExecutor(
6
- // webpieces-disable no-any-unknown -- options are passed through to code-rules validators
7
- options: Record<string, unknown>,
8
- context: ExecutorContext,
9
- ): Promise<ExecutorResult> {
10
- return validateNoDestructure(options, context.root);
11
- }
@@ -1,11 +0,0 @@
1
- import type { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResult } from '../../executor-result';
3
- import { validateNoDirectApiResolver } from '@webpieces/code-rules';
4
-
5
- export default async function runExecutor(
6
- // webpieces-disable no-any-unknown -- options are passed through to code-rules validators
7
- options: Record<string, unknown>,
8
- context: ExecutorContext,
9
- ): Promise<ExecutorResult> {
10
- return validateNoDirectApiResolver(options, context.root);
11
- }
@@ -1,11 +0,0 @@
1
- import type { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResult } from '../../executor-result';
3
- import { validateNoImplicitAny } from '@webpieces/code-rules';
4
-
5
- export default async function runExecutor(
6
- // webpieces-disable no-any-unknown -- options are passed through to code-rules validators
7
- options: Record<string, unknown>,
8
- context: ExecutorContext,
9
- ): Promise<ExecutorResult> {
10
- return validateNoImplicitAny(options, context.root);
11
- }