@webpieces/nx-webpieces-rules 0.4.1010 → 0.4.1011

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependency-workspace.js","sourceRoot":"","sources":["../../../../../../packages/tooling/nx-webpieces-rules/src/lib/dependency-workspace.ts"],"names":[],"mappings":";;;;AAAA,oDAA8B;AAC9B,wDAAkC;AAClC,yCAAsC;AACtC,+BAA6B;AAE7B,MAAa,kBAAkB;IAC3B,IAAI,CAAU;IACd,OAAO,CAAW;IAClB,KAAK,CAAU;IACf,YAAY,CAA0B;IACtC,eAAe,CAA0B;IACzC,oBAAoB,CAA0B;IAC9C,gBAAgB,CAA0B;CAC7C;AARD,gDAQC;AAED,MAAa,gBAAgB;IACzB,QAAQ,CAAY;IACpB,OAAO,CAA0B;IACjC,QAAQ,CAA0C;CACrD;AAJD,4CAIC;AAED,MAAa,eAAe;IAEX;IACA;IAFb,YACa,SAAiB,EACjB,QAAwC;QADxC,cAAS,GAAT,SAAS,CAAQ;QACjB,aAAQ,GAAR,QAAQ,CAAgC;IAClD,CAAC;CACP;AALD,0CAKC;AAED,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC;IACrB,cAAc;IACd,MAAM;IACN,OAAO;IACP,UAAU;IACV,KAAK;IACL,SAAS;IACT,SAAS;IACT,KAAK;CACR,CAAC,CAAC;AAEH,4FAA4F;AAC5F,MAAa,mBAAmB;IAMP;IALZ,KAAK,GAAa,EAAE,CAAC;IACrB,MAAM,GAAsB,EAAE,CAAC;IAC/B,OAAO,CAAmB;IAC1B,YAAY,CAAqB;IAE1C,YAAqB,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;QAC7B,IAAI,CAAC,OAAO,GAAG,IAAA,YAAK,EAChB,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,qBAAqB,CAAC,EAAE,MAAM,CAAC,CAC9C,C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I,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjD,IAAI,QAAQ,KAAK,GAAG,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAAE,OAAO;QAC5E,KAAK,MAAM,KAAK,IAAI,EAAE,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;YACrE,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,SAAS;YACrE,MAAM,IAAI,GAAG,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,GAAG,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC;YACzE,IAAI,KAAK,CAAC,WAAW,EAAE;gBAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACpC,IAAI,KAAK,CAAC,MAAM,EAAE;gBAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnD,CAAC;IACL,CAAC;CACJ;AAzED,kDAyEC","sourcesContent":["import * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport { minimatch } from 'minimatch';\nimport { parse } from 'yaml';\n\nexport class DependencyManifest {\n name?: string;\n private?: boolean;\n types?: string;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n optionalDependencies?: Record<string, string>;\n peerDependencies?: Record<string, string>;\n}\n\nexport class WorkspaceCatalog {\n packages?: string[];\n catalog?: Record<string, string>;\n catalogs?: Record<string, Record<string, string>>;\n}\n\nexport class DependencyOwner {\n constructor(\n readonly directory: string,\n readonly manifest: DependencyManifest | undefined,\n ) {}\n}\n\nconst EXCLUDED = new Set([\n 'node_modules',\n 'dist',\n 'build',\n 'coverage',\n 'tmp',\n 'out-tsc',\n 'android',\n 'ios',\n]);\n\n/** One bounded workspace traversal; nested repositories and symlinks are never governed. */\nexport class DependencyWorkspace {\n readonly files: string[] = [];\n readonly owners: DependencyOwner[] = [];\n readonly catalog: WorkspaceCatalog;\n readonly rootManifest: DependencyManifest;\n\n constructor(readonly root: string) {\n this.catalog = parse(\n fs.readFileSync(path.join(root, 'pnpm-workspace.yaml'), 'utf8'),\n ) as WorkspaceCatalog;\n this.rootManifest = this.manifest('.');\n this.walk('.');\n this.loadOwners();\n }\n\n matches(file: string, patterns: readonly string[]): boolean {\n let included = false;\n for (const pattern of patterns) {\n if (pattern.startsWith('!')) {\n if (minimatch(file, pattern.slice(1), { dot: true })) included = false;\n } else if (minimatch(file, pattern, { dot: true })) included = true;\n }\n return included;\n }\n\n owner(file: string): DependencyOwner {\n const owner = this.owners.find((entry: DependencyOwner) =>\n file.startsWith(entry.directory + '/'),\n );\n return owner ?? new DependencyOwner('.', this.rootManifest);\n }\n\n manifest(directory: string): DependencyManifest {\n return JSON.parse(\n fs.readFileSync(path.join(this.root, directory, 'package.json'), 'utf8'),\n ) as DependencyManifest;\n }\n\n private loadOwners(): void {\n const directories = new Set<string>();\n for (const file of this.files) {\n if (path.basename(file) === 'project.json') directories.add(path.dirname(file));\n if (\n path.basename(file) === 'package.json' &&\n this.matches(path.dirname(file), this.catalog.packages ?? [])\n )\n directories.add(path.dirname(file));\n }\n for (const directory of directories) {\n const managed = this.matches(directory, this.catalog.packages ?? []);\n const exists = fs.existsSync(path.join(this.root, directory, 'package.json'));\n this.owners.push(\n new DependencyOwner(\n directory,\n managed && exists ? this.manifest(directory) : undefined,\n ),\n );\n }\n this.owners.sort(\n (a: DependencyOwner, b: DependencyOwner) => b.directory.length - a.directory.length,\n );\n }\n\n private walk(relative: string): void {\n const directory = path.join(this.root, relative);\n if (relative !== '.' && fs.existsSync(path.join(directory, '.git'))) return;\n for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {\n if (entry.name.startsWith('.') || EXCLUDED.has(entry.name)) continue;\n const file = relative === '.' ? entry.name : relative + '/' + entry.name;\n if (entry.isDirectory()) this.walk(file);\n else if (entry.isFile()) this.files.push(file);\n }\n }\n}\n"]}
@@ -9,6 +9,7 @@ export declare class NativeAction {
9
9
  }
10
10
  /** Metadata holds lazy imports only; importing the pack never imports an executor or the Nx runtime. */
11
11
  export declare class NativeActions {
12
+ readonly dependencies: NativeAction;
12
13
  readonly wiringFormat: NativeAction;
13
14
  readonly fileCycles: NativeAction;
14
15
  readonly runtime: NativeAction;
@@ -49,6 +49,10 @@ class NativeAction {
49
49
  exports.NativeAction = NativeAction;
50
50
  /** Metadata holds lazy imports only; importing the pack never imports an executor or the Nx runtime. */
51
51
  class NativeActions {
52
+ dependencies = new NativeAction('dependency-policies', 'workspace', async (context) => {
53
+ const feature = await Promise.resolve().then(() => __importStar(require('./lib/dependency-policies')));
54
+ return new feature.ConfiguredDependencyPolicies().run(context.root);
55
+ });
52
56
  wiringFormat = new NativeAction('wiring-format', 'workspace', async (context) => {
53
57
  const format = await Promise.resolve().then(() => __importStar(require('./lib/runtime-wiring/workspace-format')));
54
58
  const metadata = await Promise.resolve().then(() => __importStar(require('./lib/graph-metadata')));
@@ -1 +1 @@
1
- {"version":3,"file":"native-actions.js","sourceRoot":"","sources":["../../../../../packages/tooling/nx-webpieces-rules/src/native-actions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAAyD;AAEzD,oGAAoG;AACpG,MAAa,YAAY;IAER;IACA;IACA;IAHb,YACa,IAAY,EACZ,KAA+B,EAC/B,OAAiE;QAFjE,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAA0B;QAC/B,YAAO,GAAP,OAAO,CAA0D;IAC3E,CAAC;CACP;AAND,oCAMC;AAED,wGAAwG;AACxG,MAAa,aAAa;IACb,YAAY,GAAG,IAAI,YAAY,CAAC,eAAe,EAAE,WAAW,EAAE,KAAK,EAAE,OAAwB,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CAAC;CACL;AAtED,sCAsEC","sourcesContent":["import type { ExecutorContext } from '@nx/devkit';\nimport { BuildPolicyResult } from '@webpieces/rules-sdk';\n\n/** Native owner actions are shared where one existing scan enforces several configured policies. */\nexport class NativeAction {\n constructor(\n readonly name: string,\n readonly scope: 'workspace' | 'projects',\n readonly execute: (context: ExecutorContext) => Promise<BuildPolicyResult>,\n ) {}\n}\n\n/** Metadata holds lazy imports only; importing the pack never imports an executor or the Nx runtime. */\nexport class NativeActions {\n readonly wiringFormat = new NativeAction('wiring-format', 'workspace', async (context: ExecutorContext) => {\n const format = await import('./lib/runtime-wiring/workspace-format');\n const metadata = await import('./lib/graph-metadata');\n new format.WorkspaceWiringFormat().run(context.root, await metadata.collectProjectInfo());\n return new BuildPolicyResult(true);\n });\n readonly fileCycles = new NativeAction(\n 'file-cycles',\n 'projects',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-no-file-import-cycles/executor')).default(\n {},\n context,\n ),\n );\n readonly runtime = new NativeAction('runtime', 'workspace', async (context: ExecutorContext) =>\n (await import('./executors/validate-runtime-architecture/executor')).default({}, context),\n );\n readonly wiring = new NativeAction('wiring', 'workspace', async (context: ExecutorContext) =>\n (await import('./executors/validate-nx-wiring/executor')).default({}, context),\n );\n readonly design = new NativeAction('design', 'projects', async (context: ExecutorContext) =>\n (await import('./executors/di-graph-generate/executor')).default({}, context),\n );\n readonly architecture = new NativeAction(\n 'architecture',\n 'workspace',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-architecture-unchanged/executor')).default(\n {},\n context,\n ),\n );\n readonly cycles = new NativeAction('cycles', 'workspace', async (context: ExecutorContext) =>\n (await import('./executors/validate-no-architecture-cycles/executor')).default({}, context),\n );\n readonly packageJson = new NativeAction(\n 'package-json',\n 'workspace',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-packagejson/executor')).default({}, context),\n );\n readonly versions = new NativeAction(\n 'versions',\n 'workspace',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-versions-locked/executor')).default({}, context),\n );\n readonly eslintSync = new NativeAction(\n 'eslint-sync',\n 'workspace',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-eslint-sync/executor')).default({}, context),\n );\n readonly tsInSrc = new NativeAction(\n 'ts-in-src',\n 'workspace',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-ts-in-src/executor')).default({}, context),\n );\n readonly graphPolicies = new NativeAction(\n 'graph-policies',\n 'workspace',\n async (context: ExecutorContext) => {\n const graph = await import('./lib/current-architecture');\n await new graph.CurrentGraphBuilder().build(context.root);\n return new BuildPolicyResult(true);\n },\n );\n}\n"]}
1
+ {"version":3,"file":"native-actions.js","sourceRoot":"","sources":["../../../../../packages/tooling/nx-webpieces-rules/src/native-actions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAAyD;AAEzD,oGAAoG;AACpG,MAAa,YAAY;IAER;IACA;IACA;IAHb,YACa,IAAY,EACZ,KAA+B,EAC/B,OAAiE;QAFjE,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAA0B;QAC/B,YAAO,GAAP,OAAO,CAA0D;IAC3E,CAAC;CACP;AAND,oCAMC;AAED,wGAAwG;AACxG,MAAa,aAAa;IACb,YAAY,GAAG,IAAI,YAAY,CACpC,qBAAqB,EACrB,WAAW,EACX,KAAK,EAAE,OAAwB,EAAE,EAAE;QAC/B,MAAM,OAAO,GAAG,wDAAa,2BAA2B,GAAC,CAAC;QAC1D,OAAO,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACxE,CAAC,CACJ,CAAC;IACO,YAAY,GAAG,IAAI,YAAY,CACpC,eAAe,EACf,WAAW,EACX,KAAK,EAAE,OAAwB,EAAE,EAAE;QAC/B,MAAM,MAAM,GAAG,wDAAa,uCAAuC,GAAC,CAAC;QACrE,MAAM,QAAQ,GAAG,wDAAa,sBAAsB,GAAC,CAAC;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sD,GAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAC9F,CAAC;IACO,WAAW,GAAG,IAAI,YAAY,CACnC,cAAc,EACd,WAAW,EACX,KAAK,EAAE,OAAwB,EAAE,EAAE,CAC/B,CAAC,wDAAa,2CAA2C,GAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CACvF,CAAC;IACO,QAAQ,GAAG,IAAI,YAAY,CAChC,UAAU,EACV,WAAW,EACX,KAAK,EAAE,OAAwB,EAAE,EAAE,CAC/B,CAAC,wDAAa,+CAA+C,GAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAC3F,CAAC;IACO,UAAU,GAAG,IAAI,YAAY,CAClC,aAAa,EACb,WAAW,EACX,KAAK,EAAE,OAAwB,EAAE,EAAE,CAC/B,CAAC,wDAAa,2CAA2C,GAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CACvF,CAAC;IACO,OAAO,GAAG,IAAI,YAAY,CAC/B,WAAW,EACX,WAAW,EACX,KAAK,EAAE,OAAwB,EAAE,EAAE,CAC/B,CAAC,wDAAa,yCAAyC,GAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CACrF,CAAC;IACO,aAAa,GAAG,IAAI,YAAY,CACrC,gBAAgB,EAChB,WAAW,EACX,KAAK,EAAE,OAAwB,EAAE,EAAE;QAC/B,MAAM,KAAK,GAAG,wDAAa,4BAA4B,GAAC,CAAC;QACzD,MAAM,IAAI,KAAK,CAAC,mBAAmB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1D,OAAO,IAAI,6BAAiB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC,CACJ,CAAC;CACL;AArFD,sCAqFC","sourcesContent":["import type { ExecutorContext } from '@nx/devkit';\nimport { BuildPolicyResult } from '@webpieces/rules-sdk';\n\n/** Native owner actions are shared where one existing scan enforces several configured policies. */\nexport class NativeAction {\n constructor(\n readonly name: string,\n readonly scope: 'workspace' | 'projects',\n readonly execute: (context: ExecutorContext) => Promise<BuildPolicyResult>,\n ) {}\n}\n\n/** Metadata holds lazy imports only; importing the pack never imports an executor or the Nx runtime. */\nexport class NativeActions {\n readonly dependencies = new NativeAction(\n 'dependency-policies',\n 'workspace',\n async (context: ExecutorContext) => {\n const feature = await import('./lib/dependency-policies');\n return new feature.ConfiguredDependencyPolicies().run(context.root);\n },\n );\n readonly wiringFormat = new NativeAction(\n 'wiring-format',\n 'workspace',\n async (context: ExecutorContext) => {\n const format = await import('./lib/runtime-wiring/workspace-format');\n const metadata = await import('./lib/graph-metadata');\n new format.WorkspaceWiringFormat().run(\n context.root,\n await metadata.collectProjectInfo(),\n );\n return new BuildPolicyResult(true);\n },\n );\n readonly fileCycles = new NativeAction(\n 'file-cycles',\n 'projects',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-no-file-import-cycles/executor')).default(\n {},\n context,\n ),\n );\n readonly runtime = new NativeAction('runtime', 'workspace', async (context: ExecutorContext) =>\n (await import('./executors/validate-runtime-architecture/executor')).default({}, context),\n );\n readonly wiring = new NativeAction('wiring', 'workspace', async (context: ExecutorContext) =>\n (await import('./executors/validate-nx-wiring/executor')).default({}, context),\n );\n readonly design = new NativeAction('design', 'projects', async (context: ExecutorContext) =>\n (await import('./executors/di-graph-generate/executor')).default({}, context),\n );\n readonly architecture = new NativeAction(\n 'architecture',\n 'workspace',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-architecture-unchanged/executor')).default(\n {},\n context,\n ),\n );\n readonly cycles = new NativeAction('cycles', 'workspace', async (context: ExecutorContext) =>\n (await import('./executors/validate-no-architecture-cycles/executor')).default({}, context),\n );\n readonly packageJson = new NativeAction(\n 'package-json',\n 'workspace',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-packagejson/executor')).default({}, context),\n );\n readonly versions = new NativeAction(\n 'versions',\n 'workspace',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-versions-locked/executor')).default({}, context),\n );\n readonly eslintSync = new NativeAction(\n 'eslint-sync',\n 'workspace',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-eslint-sync/executor')).default({}, context),\n );\n readonly tsInSrc = new NativeAction(\n 'ts-in-src',\n 'workspace',\n async (context: ExecutorContext) =>\n (await import('./executors/validate-ts-in-src/executor')).default({}, context),\n );\n readonly graphPolicies = new NativeAction(\n 'graph-policies',\n 'workspace',\n async (context: ExecutorContext) => {\n const graph = await import('./lib/current-architecture');\n await new graph.CurrentGraphBuilder().build(context.root);\n return new BuildPolicyResult(true);\n },\n );\n}\n"]}
@@ -10,6 +10,7 @@ const api_doc_rules_config_1 = require("./configs/api-doc-rules-config");
10
10
  const tag_truth_configs_1 = require("./configs/tag-truth-configs");
11
11
  const native_actions_1 = require("./native-actions");
12
12
  const wiring_format_config_1 = require("./configs/wiring-format-config");
13
+ const dependency_policy_config_1 = require("./configs/dependency-policy-config");
13
14
  class NxPolicy {
14
15
  definition;
15
16
  action;
@@ -21,6 +22,9 @@ class NxPolicy {
21
22
  exports.NxPolicy = NxPolicy;
22
23
  const actions = new native_actions_1.NativeActions();
23
24
  exports.NX_POLICIES = [
25
+ new NxPolicy(new rules_sdk_1.OwnedRuleDefinition('dependency-catalog', dependency_policy_config_1.DependencyCatalogConfig.SCHEMA, rules_sdk_1.RULE_SCHEMA_API_VERSION, rule_settings_1.optionalTuning['dependency-catalog'], rule_settings_1.recommendedSeeds['dependency-catalog'], 'rules', rule_help_1.ruleHelp['dependency-catalog']), actions.dependencies),
26
+ new NxPolicy(new rules_sdk_1.OwnedRuleDefinition('root-runtime-freeze', dependency_policy_config_1.RootRuntimeFreezeConfig.SCHEMA, rules_sdk_1.RULE_SCHEMA_API_VERSION, rule_settings_1.optionalTuning['root-runtime-freeze'], rule_settings_1.recommendedSeeds['root-runtime-freeze'], 'rules', rule_help_1.ruleHelp['root-runtime-freeze']), actions.dependencies),
27
+ new NxPolicy(new rules_sdk_1.OwnedRuleDefinition('dependency-ownership', dependency_policy_config_1.DependencyOwnershipConfig.SCHEMA, rules_sdk_1.RULE_SCHEMA_API_VERSION, rule_settings_1.optionalTuning['dependency-ownership'], rule_settings_1.recommendedSeeds['dependency-ownership'], 'rules', rule_help_1.ruleHelp['dependency-ownership']), actions.dependencies),
24
28
  new NxPolicy(new rules_sdk_1.OwnedRuleDefinition('wiring-format', wiring_format_config_1.WiringFormatConfig.SCHEMA, rules_sdk_1.RULE_SCHEMA_API_VERSION, rule_settings_1.optionalTuning['wiring-format'], rule_settings_1.recommendedSeeds['wiring-format'], 'rules', rule_help_1.ruleHelp['wiring-format']), actions.wiringFormat),
25
29
  new NxPolicy(new rules_sdk_1.OwnedRuleDefinition('no-file-import-cycles', rule_configs_1.NoFileImportCyclesConfig.SCHEMA, rules_sdk_1.RULE_SCHEMA_API_VERSION, rule_settings_1.optionalTuning['no-file-import-cycles'], rule_settings_1.recommendedSeeds['no-file-import-cycles'], 'rules', rule_help_1.ruleHelp['no-file-import-cycles']), actions.fileCycles),
26
30
  new NxPolicy(new rules_sdk_1.OwnedRuleDefinition('runtime-architecture', rule_configs_1.RuntimeArchitectureConfig.SCHEMA, rules_sdk_1.RULE_SCHEMA_API_VERSION, rule_settings_1.optionalTuning['runtime-architecture'], rule_settings_1.recommendedSeeds['runtime-architecture'], 'rules', rule_help_1.ruleHelp['runtime-architecture']), actions.runtime),
@@ -1 +1 @@
1
- {"version":3,"file":"nx-policy-registry.js","sourceRoot":"","sources":["../../../../../packages/tooling/nx-webpieces-rules/src/nx-policy-registry.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,mDAAmE;AACnE,oDAAoF;AACpF,yDAWgC;AAChC,yEAA0E;AAC1E,yEAAgG;AAChG,mEAKqC;AACrC,qDAA+D;AAC/D,yEAAoE;AAEpE,MAAa,QAAQ;IAEJ;IACA;IAFb,YACa,UAA+B,EAC/B,MAAoB;QADpB,eAAU,GAAV,UAAU,CAAqB;QA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AAQ,CAAC,sBAAsB,CAAC,CACnC,EACD,OAAO,CAAC,aAAa,CACxB;IACD,IAAI,QAAQ,CACR,IAAI,+BAAmB,CACnB,cAAc,EACd,oCAAgB,CAAC,MAAM,EACvB,mCAAuB,EACvB,8BAAc,CAAC,cAAc,CAAC,EAC9B,gCAAgB,CAAC,cAAc,CAAC,EAChC,OAAO,EACP,oBAAQ,CAAC,cAAc,CAAC,CAC3B,EACD,OAAO,CAAC,aAAa,CACxB;IACD,IAAI,QAAQ,CACR,IAAI,+BAAmB,CACnB,kBAAkB,EAClB,yCAAqB,CAAC,MAAM,EAC5B,mCAAuB,EACvB,8BAAc,CAAC,kBAAkB,CAAC,EAClC,gCAAgB,CAAC,kBAAkB,CAAC,EACpC,OAAO,EACP,oBAAQ,CAAC,kBAAkB,CAAC,CAC/B,EACD,OAAO,CAAC,aAAa,CACxB;IACD,IAAI,QAAQ,CACR,IAAI,+BAAmB,CACnB,cAAc,EACd,qCAAiB,CAAC,MAAM,EACxB,mCAAuB,EACvB,8BAAc,CAAC,cAAc,CAAC,EAC9B,gCAAgB,CAAC,cAAc,CAAC,EAChC,OAAO,EACP,oBAAQ,CAAC,cAAc,CAAC,CAC3B,EACD,OAAO,CAAC,aAAa,CACxB;CACJ,CAAC","sourcesContent":["import { ruleHelp } from './rule-help';\nimport { optionalTuning, recommendedSeeds } from './rule-settings';\nimport { OwnedRuleDefinition, RULE_SCHEMA_API_VERSION } from '@webpieces/rules-sdk';\nimport {\n NoFileImportCyclesConfig,\n RuntimeArchitectureConfig,\n NxWiringConfig,\n DiGraphConfig,\n MissingDesignAnnotationConfig,\n ValidateArchitectureUnchangedConfig,\n ValidateNoArchitectureCyclesConfig,\n ValidatePackageJsonConfig,\n ValidateVersionsLockedConfig,\n ValidateEslintSyncConfig,\n} from './configs/rule-configs';\nimport { NoRootUnionApiTypeConfig } from './configs/no-root-union-config';\nimport { ApiRulesForOpenApiConfig, ApiRulesForMcpConfig } from './configs/api-doc-rules-config';\nimport {\n ApiLibDependenciesConfig,\n ApiLibPathConfig,\n FrameworkFolderConfig,\n ProductTagsConfig,\n} from './configs/tag-truth-configs';\nimport { NativeActions, NativeAction } from './native-actions';\nimport { WiringFormatConfig } from './configs/wiring-format-config';\n\nexport class NxPolicy {\n constructor(\n readonly definition: OwnedRuleDefinition,\n readonly action: NativeAction,\n ) {}\n}\n\nconst actions = new NativeActions();\nexport const NX_POLICIES: readonly NxPolicy[] = [\n new NxPolicy(\n new OwnedRuleDefinition('wiring-format', WiringFormatConfig.SCHEMA, RULE_SCHEMA_API_VERSION,\n optionalTuning['wiring-format'], recommendedSeeds['wiring-format'], 'rules', ruleHelp['wiring-format']),\n actions.wiringFormat,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'no-file-import-cycles',\n NoFileImportCyclesConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['no-file-import-cycles'],\n recommendedSeeds['no-file-import-cycles'],\n 'rules',\n ruleHelp['no-file-import-cycles'],\n ),\n actions.fileCycles,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'runtime-architecture',\n RuntimeArchitectureConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['runtime-architecture'],\n recommendedSeeds['runtime-architecture'],\n 'rules',\n ruleHelp['runtime-architecture'],\n ),\n actions.runtime,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'nx-wiring',\n NxWiringConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['nx-wiring'],\n recommendedSeeds['nx-wiring'],\n 'rules',\n ruleHelp['nx-wiring'],\n ),\n actions.wiring,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'di-graph',\n DiGraphConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['di-graph'],\n recommendedSeeds['di-graph'],\n 'rules',\n ruleHelp['di-graph'],\n ),\n actions.design,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'missing-design-annotation',\n MissingDesignAnnotationConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['missing-design-annotation'],\n recommendedSeeds['missing-design-annotation'],\n 'rules',\n ruleHelp['missing-design-annotation'],\n ),\n actions.design,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'validate-architecture-unchanged',\n ValidateArchitectureUnchangedConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['validate-architecture-unchanged'],\n recommendedSeeds['validate-architecture-unchanged'],\n 'rules',\n ruleHelp['validate-architecture-unchanged'],\n ),\n actions.architecture,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'validate-no-architecture-cycles',\n ValidateNoArchitectureCyclesConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['validate-no-architecture-cycles'],\n recommendedSeeds['validate-no-architecture-cycles'],\n 'rules',\n ruleHelp['validate-no-architecture-cycles'],\n ),\n actions.cycles,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'validate-packagejson',\n ValidatePackageJsonConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['validate-packagejson'],\n recommendedSeeds['validate-packagejson'],\n 'rules',\n ruleHelp['validate-packagejson'],\n ),\n actions.packageJson,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'validate-versions-locked',\n ValidateVersionsLockedConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['validate-versions-locked'],\n recommendedSeeds['validate-versions-locked'],\n 'rules',\n ruleHelp['validate-versions-locked'],\n ),\n actions.versions,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'validate-eslint-sync',\n ValidateEslintSyncConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['validate-eslint-sync'],\n recommendedSeeds['validate-eslint-sync'],\n 'rules',\n ruleHelp['validate-eslint-sync'],\n ),\n actions.eslintSync,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'no-root-union-api-type',\n NoRootUnionApiTypeConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['no-root-union-api-type'],\n recommendedSeeds['no-root-union-api-type'],\n 'rules',\n ruleHelp['no-root-union-api-type'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'api-rules-for-openapi',\n ApiRulesForOpenApiConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['api-rules-for-openapi'],\n recommendedSeeds['api-rules-for-openapi'],\n 'rules',\n ruleHelp['api-rules-for-openapi'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'api-rules-for-mcp',\n ApiRulesForMcpConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['api-rules-for-mcp'],\n recommendedSeeds['api-rules-for-mcp'],\n 'rules',\n ruleHelp['api-rules-for-mcp'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'api-lib-dependencies',\n ApiLibDependenciesConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['api-lib-dependencies'],\n recommendedSeeds['api-lib-dependencies'],\n 'rules',\n ruleHelp['api-lib-dependencies'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'api-lib-path',\n ApiLibPathConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['api-lib-path'],\n recommendedSeeds['api-lib-path'],\n 'rules',\n ruleHelp['api-lib-path'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'framework-folder',\n FrameworkFolderConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['framework-folder'],\n recommendedSeeds['framework-folder'],\n 'rules',\n ruleHelp['framework-folder'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'product-tags',\n ProductTagsConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['product-tags'],\n recommendedSeeds['product-tags'],\n 'rules',\n ruleHelp['product-tags'],\n ),\n actions.graphPolicies,\n ),\n];\n"]}
1
+ {"version":3,"file":"nx-policy-registry.js","sourceRoot":"","sources":["../../../../../packages/tooling/nx-webpieces-rules/src/nx-policy-registry.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,mDAAmE;AACnE,oDAAoF;AACpF,yDAWgC;AAChC,yEAA0E;AAC1E,yEAAgG;AAChG,mEAKqC;AACrC,qDAA+D;AAC/D,yEAAoE;AACpE,iFAI4C;AAE5C,MAAa,QAAQ;IAEJ;IACA;IAFb,YACa,UAA+B,EAC/B,MAAoB;QADpB,eAAU,GAAV,UAAU,CAAqB;QAC/B,WAAM,GAAN,MAAM,CAAc;IAC9B,CAAC;CACP;AALD,4BAKC;AAED,MAAM,OAAO,GAAG,IAAI,8BAAa,EAAE,CAAC;AACvB,QAAA,WAAW,GAAwB;IAC5C,IAAI,QAAQ,CACR,IAAI,+BAAmB,CACnB,oBAAoB,EACpB,kDAAuB,CAAC,MAAM,EAC9B,mCAAuB,EACvB,8BAAc,CAAC,oBAAoB,CAAC,EACpC,gCAAgB,CAAC,oBAAoB,CAAC,EACtC,OAAO,EACP,oBAAQ,CAAC,oBAAoB,CAAC,CACjC,EACD,OAAO,CAAC,YAAY,CACvB;IACD,IAAI,QAAQ,CACR,IAAI,+BAAmB,CACnB,qBAAqB,EACrB,kDAAuB,CAAC,MAAM,EAC9B,mCAAuB,EACvB,8BAAc,CAAC,qBAAqB,CAAC,EACrC,gCAAgB,CAAC,qBAAqB,CAAC,EACvC,OAAO,EACP,oBAAQ,CAAC,qBAAqB,CAAC,CAClC,EACD,OAAO,CAAC,YAAY,CACvB;IACD,IAAI,QAAQ,CACR,IAAI,+BAAmB,CACnB,sBAAsB,EACtB,oDAAyB,CAAC,MAAM,EAChC,mCAAuB,EACvB,8BAAc,CAAC,sBAAsB,CAAC,EACtC,gCAAgB,CA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AAO,CAAC,aAAa,CACxB;IACD,IAAI,QAAQ,CACR,IAAI,+BAAmB,CACnB,cAAc,EACd,oCAAgB,CAAC,MAAM,EACvB,mCAAuB,EACvB,8BAAc,CAAC,cAAc,CAAC,EAC9B,gCAAgB,CAAC,cAAc,CAAC,EAChC,OAAO,EACP,oBAAQ,CAAC,cAAc,CAAC,CAC3B,EACD,OAAO,CAAC,aAAa,CACxB;IACD,IAAI,QAAQ,CACR,IAAI,+BAAmB,CACnB,kBAAkB,EAClB,yCAAqB,CAAC,MAAM,EAC5B,mCAAuB,EACvB,8BAAc,CAAC,kBAAkB,CAAC,EAClC,gCAAgB,CAAC,kBAAkB,CAAC,EACpC,OAAO,EACP,oBAAQ,CAAC,kBAAkB,CAAC,CAC/B,EACD,OAAO,CAAC,aAAa,CACxB;IACD,IAAI,QAAQ,CACR,IAAI,+BAAmB,CACnB,cAAc,EACd,qCAAiB,CAAC,MAAM,EACxB,mCAAuB,EACvB,8BAAc,CAAC,cAAc,CAAC,EAC9B,gCAAgB,CAAC,cAAc,CAAC,EAChC,OAAO,EACP,oBAAQ,CAAC,cAAc,CAAC,CAC3B,EACD,OAAO,CAAC,aAAa,CACxB;CACJ,CAAC","sourcesContent":["import { ruleHelp } from './rule-help';\nimport { optionalTuning, recommendedSeeds } from './rule-settings';\nimport { OwnedRuleDefinition, RULE_SCHEMA_API_VERSION } from '@webpieces/rules-sdk';\nimport {\n NoFileImportCyclesConfig,\n RuntimeArchitectureConfig,\n NxWiringConfig,\n DiGraphConfig,\n MissingDesignAnnotationConfig,\n ValidateArchitectureUnchangedConfig,\n ValidateNoArchitectureCyclesConfig,\n ValidatePackageJsonConfig,\n ValidateVersionsLockedConfig,\n ValidateEslintSyncConfig,\n} from './configs/rule-configs';\nimport { NoRootUnionApiTypeConfig } from './configs/no-root-union-config';\nimport { ApiRulesForOpenApiConfig, ApiRulesForMcpConfig } from './configs/api-doc-rules-config';\nimport {\n ApiLibDependenciesConfig,\n ApiLibPathConfig,\n FrameworkFolderConfig,\n ProductTagsConfig,\n} from './configs/tag-truth-configs';\nimport { NativeActions, NativeAction } from './native-actions';\nimport { WiringFormatConfig } from './configs/wiring-format-config';\nimport {\n DependencyCatalogConfig,\n RootRuntimeFreezeConfig,\n DependencyOwnershipConfig,\n} from './configs/dependency-policy-config';\n\nexport class NxPolicy {\n constructor(\n readonly definition: OwnedRuleDefinition,\n readonly action: NativeAction,\n ) {}\n}\n\nconst actions = new NativeActions();\nexport const NX_POLICIES: readonly NxPolicy[] = [\n new NxPolicy(\n new OwnedRuleDefinition(\n 'dependency-catalog',\n DependencyCatalogConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['dependency-catalog'],\n recommendedSeeds['dependency-catalog'],\n 'rules',\n ruleHelp['dependency-catalog'],\n ),\n actions.dependencies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'root-runtime-freeze',\n RootRuntimeFreezeConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['root-runtime-freeze'],\n recommendedSeeds['root-runtime-freeze'],\n 'rules',\n ruleHelp['root-runtime-freeze'],\n ),\n actions.dependencies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'dependency-ownership',\n DependencyOwnershipConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['dependency-ownership'],\n recommendedSeeds['dependency-ownership'],\n 'rules',\n ruleHelp['dependency-ownership'],\n ),\n actions.dependencies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'wiring-format',\n WiringFormatConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['wiring-format'],\n recommendedSeeds['wiring-format'],\n 'rules',\n ruleHelp['wiring-format'],\n ),\n actions.wiringFormat,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'no-file-import-cycles',\n NoFileImportCyclesConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['no-file-import-cycles'],\n recommendedSeeds['no-file-import-cycles'],\n 'rules',\n ruleHelp['no-file-import-cycles'],\n ),\n actions.fileCycles,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'runtime-architecture',\n RuntimeArchitectureConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['runtime-architecture'],\n recommendedSeeds['runtime-architecture'],\n 'rules',\n ruleHelp['runtime-architecture'],\n ),\n actions.runtime,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'nx-wiring',\n NxWiringConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['nx-wiring'],\n recommendedSeeds['nx-wiring'],\n 'rules',\n ruleHelp['nx-wiring'],\n ),\n actions.wiring,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'di-graph',\n DiGraphConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['di-graph'],\n recommendedSeeds['di-graph'],\n 'rules',\n ruleHelp['di-graph'],\n ),\n actions.design,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'missing-design-annotation',\n MissingDesignAnnotationConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['missing-design-annotation'],\n recommendedSeeds['missing-design-annotation'],\n 'rules',\n ruleHelp['missing-design-annotation'],\n ),\n actions.design,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'validate-architecture-unchanged',\n ValidateArchitectureUnchangedConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['validate-architecture-unchanged'],\n recommendedSeeds['validate-architecture-unchanged'],\n 'rules',\n ruleHelp['validate-architecture-unchanged'],\n ),\n actions.architecture,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'validate-no-architecture-cycles',\n ValidateNoArchitectureCyclesConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['validate-no-architecture-cycles'],\n recommendedSeeds['validate-no-architecture-cycles'],\n 'rules',\n ruleHelp['validate-no-architecture-cycles'],\n ),\n actions.cycles,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'validate-packagejson',\n ValidatePackageJsonConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['validate-packagejson'],\n recommendedSeeds['validate-packagejson'],\n 'rules',\n ruleHelp['validate-packagejson'],\n ),\n actions.packageJson,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'validate-versions-locked',\n ValidateVersionsLockedConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['validate-versions-locked'],\n recommendedSeeds['validate-versions-locked'],\n 'rules',\n ruleHelp['validate-versions-locked'],\n ),\n actions.versions,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'validate-eslint-sync',\n ValidateEslintSyncConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['validate-eslint-sync'],\n recommendedSeeds['validate-eslint-sync'],\n 'rules',\n ruleHelp['validate-eslint-sync'],\n ),\n actions.eslintSync,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'no-root-union-api-type',\n NoRootUnionApiTypeConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['no-root-union-api-type'],\n recommendedSeeds['no-root-union-api-type'],\n 'rules',\n ruleHelp['no-root-union-api-type'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'api-rules-for-openapi',\n ApiRulesForOpenApiConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['api-rules-for-openapi'],\n recommendedSeeds['api-rules-for-openapi'],\n 'rules',\n ruleHelp['api-rules-for-openapi'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'api-rules-for-mcp',\n ApiRulesForMcpConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['api-rules-for-mcp'],\n recommendedSeeds['api-rules-for-mcp'],\n 'rules',\n ruleHelp['api-rules-for-mcp'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'api-lib-dependencies',\n ApiLibDependenciesConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['api-lib-dependencies'],\n recommendedSeeds['api-lib-dependencies'],\n 'rules',\n ruleHelp['api-lib-dependencies'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'api-lib-path',\n ApiLibPathConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['api-lib-path'],\n recommendedSeeds['api-lib-path'],\n 'rules',\n ruleHelp['api-lib-path'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'framework-folder',\n FrameworkFolderConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['framework-folder'],\n recommendedSeeds['framework-folder'],\n 'rules',\n ruleHelp['framework-folder'],\n ),\n actions.graphPolicies,\n ),\n new NxPolicy(\n new OwnedRuleDefinition(\n 'product-tags',\n ProductTagsConfig.SCHEMA,\n RULE_SCHEMA_API_VERSION,\n optionalTuning['product-tags'],\n recommendedSeeds['product-tags'],\n 'rules',\n ruleHelp['product-tags'],\n ),\n actions.graphPolicies,\n ),\n];\n"]}
package/src/rule-help.js CHANGED
@@ -4,13 +4,16 @@ exports.ruleHelp = void 0;
4
4
  const rules_sdk_1 = require("@webpieces/rules-sdk");
5
5
  /** Owner-authored guidance consumed by the registry catalog. */
6
6
  exports.ruleHelp = {
7
- 'wiring-format': new rules_sdk_1.RuleHelp('Check every canonical wiring.ts: its Wiring/AppWiring class plus the BindModule/RouteModule classes it selects, with their actual registrations.', 'Declare each owner\'s Wiring/AppWiring class beside its named BindModule/RouteModule classes and their registrations (binder.createRpcClientAndBind, binder.createPubSubClientAndBind, binder.bindExternal, binder.bind chains, browser binder.provide recipes, addRoutes, addFilter) in its src/wiring.ts; select them with literal getBindModules/getRouteModules/getWirings return arrays. An AppWiring may also select a BindModule declared in a library owner\'s canonical src/wiring.ts, and only an AppWiring selects library Wirings. Keep constructors as prepared-input storage, keep configuration building, environment discovery and initializer/factory bodies in imported implementations, use direct service strings and explicit WiringPolicy declarations. Set maxLines explicitly (agreed upstream limit: 400).'),
7
+ 'dependency-catalog': new rules_sdk_1.RuleHelp('Centralize directly authored external versions in the pnpm catalogue.', 'Declare each external dependency with catalog: and an exact version in pnpm-workspace.yaml. Internal owners use workspace:*. This policy never overrides third-party transitive dependencies.'),
8
+ 'root-runtime-freeze': new rules_sdk_1.RuleHelp('Prevent growth of root runtime dependency names.', 'Keep the reviewed allowedNames baseline for root dependencies, optionalDependencies and peerDependencies. New build/admin tools belong in root devDependencies; runtime imports belong to their module.'),
9
+ 'dependency-ownership': new rules_sdk_1.RuleHelp('Require declarations at the importing source owner.', 'Declare emitted production imports in owner dependencies, optionalDependencies or peers. Test/build/erased-type imports may use owner devDependencies. Explicitly classify root tool files and artifact probes; toolProviders records exact umbrella-provided imports. Review dynamicImports as file::normalized expression::package-list mappings; an empty list means a verified local/artifact expression. Root hoisting never excuses a runtime owner.'),
10
+ 'wiring-format': new rules_sdk_1.RuleHelp('Check every canonical wiring.ts: its Wiring/AppWiring class plus the BindModule/RouteModule classes it selects, with their actual registrations.', "Declare each owner's Wiring/AppWiring class beside its named BindModule/RouteModule classes and their registrations (binder.createRpcClientAndBind, binder.createPubSubClientAndBind, binder.bindExternal, binder.bind chains, browser binder.provide recipes, addRoutes, addFilter) in its src/wiring.ts; select them with literal getBindModules/getRouteModules/getWirings return arrays. An AppWiring may also select a BindModule declared in a library owner's canonical src/wiring.ts, and only an AppWiring selects library Wirings. Keep constructors as prepared-input storage, keep configuration building, environment discovery and initializer/factory bodies in imported implementations, use direct service strings and explicit WiringPolicy declarations. Set maxLines explicitly (agreed upstream limit: 400)."),
8
11
  'no-file-import-cycles': new rules_sdk_1.RuleHelp('Keep each project free of circular file imports.', 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.'),
9
12
  'runtime-architecture': new rules_sdk_1.RuleHelp('Validate runtime service and API dependency declarations.', 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.'),
10
13
  'nx-wiring': new rules_sdk_1.RuleHelp('Wire the required validation targets into the Nx execution graph.', 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.'),
11
14
  'di-graph': new rules_sdk_1.RuleHelp('Generate and validate dependency-injection design graphs.', 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.'),
12
15
  'missing-design-annotation': new rules_sdk_1.RuleHelp('Declare the application design roots required for DI analysis.', 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.'),
13
- 'validate-architecture-unchanged': new rules_sdk_1.RuleHelp('Keep the committed architecture graph aligned with current dependencies.', 'In src/wiring.ts register clients through the BindModule\'s Binder: binder.createRpcClientAndBind(Api, deployment, new ClientBindOptions(token?, filters?)) and binder.createPubSubClientAndBind(Api, deployment, new PubSubBindOptions(token?)) from @webpieces/http-routing, binder.bindExternal(Api, VendorImpl) for vendor contracts, and the browser binder.createRpcClientAndBind(Api, deployment) and binder.bindExternal(Api, new UseClass(Vendor) | new UseExisting(Token)) from @webpieces/http-client-browser. wiring-format checks canonical wiring.ts in all participating owners; preserve tokens and filters. Review graph changes and runtime-deps.json candidates explicitly.'),
16
+ 'validate-architecture-unchanged': new rules_sdk_1.RuleHelp('Keep the committed architecture graph aligned with current dependencies.', "In src/wiring.ts register clients through the BindModule's Binder: binder.createRpcClientAndBind(Api, deployment, new ClientBindOptions(token?, filters?)) and binder.createPubSubClientAndBind(Api, deployment, new PubSubBindOptions(token?)) from @webpieces/http-routing, binder.bindExternal(Api, VendorImpl) for vendor contracts, and the browser binder.createRpcClientAndBind(Api, deployment) and binder.bindExternal(Api, new UseClass(Vendor) | new UseExisting(Token)) from @webpieces/http-client-browser. wiring-format checks canonical wiring.ts in all participating owners; preserve tokens and filters. Review graph changes and runtime-deps.json candidates explicitly."),
14
17
  'validate-no-architecture-cycles': new rules_sdk_1.RuleHelp('Keep the project dependency architecture free of cycles.', 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.'),
15
18
  'validate-packagejson': new rules_sdk_1.RuleHelp('Align package dependencies with declared project dependencies.', 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.'),
16
19
  'validate-versions-locked': new rules_sdk_1.RuleHelp('Pin dependency versions consistently across governed projects.', 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.'),
@@ -1 +1 @@
1
- {"version":3,"file":"rule-help.js","sourceRoot":"","sources":["../../../../../packages/tooling/nx-webpieces-rules/src/rule-help.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAEhD,gEAAgE;AACnD,QAAA,QAAQ,GAAuC;IACxD,eAAe,EAAE,IAAI,oBAAQ,CAAC,kJAAkJ,EAAE,qyBAAqyB,CAAC;IACx9B,uBAAuB,EAAE,IAAI,oBAAQ,CACjC,kDAAkD,EAClD,sIAAsI,CACzI;IACD,sBAAsB,EAAE,IAAI,oBAAQ,CAChC,2DAA2D,EAC3D,sIAAsI,CACzI;IACD,WAAW,EAAE,IAAI,oBAAQ,CACrB,mEAAmE,EACnE,sIAAsI,CACzI;IACD,UAAU,EAAE,IAAI,oBAAQ,CACpB,2DAA2D,EAC3D,sIAAsI,CACzI;IACD,2BAA2B,EAAE,IAAI,oBAAQ,CACrC,gEAAgE,EAChE,sIAAsI,CACzI;IACD,iCAAiC,EAAE,IAAI,oBAAQ,CAC3C,0EAA0E,EAC1E,gqBAAgqB,CACnqB;IACD,iCAAiC,EAAE,IAAI,oBAAQ,CAC3C,0DAA0D,EAC1D,sIAAsI,CACzI;IACD,sBAAsB,EAAE,IAAI,oBAAQ,CAChC,gEAAgE,EAChE,sIAAsI,CACzI;IACD,0BAA0B,EAAE,IAAI,oBAAQ,CACpC,gEAAgE,EAChE,sIAAsI,CACzI;IACD,sBAAsB,EAAE,IAAI,oBAAQ,CAChC,8EAA8E,EAC9E,sIAAsI,CACzI;IACD,wBAAwB,EAAE,IAAI,oBAAQ,CAClC,qEAAqE,EACrE,sIAAsI,CACzI;IACD,uBAAuB,EAAE,IAAI,oBAAQ,CACjC,uEAAuE,EACvE,sIAAsI,CACzI;IACD,mBAAmB,EAAE,IAAI,oBAAQ,CAC7B,mEAAmE,EACnE,sIAAsI,CACzI;IACD,sBAAsB,EAAE,IAAI,oBAAQ,CAChC,+DAA+D,EAC/D,sIAAsI,CACzI;IACD,cAAc,EAAE,IAAI,oBAAQ,CACxB,sDAAsD,EACtD,sIAAsI,CACzI;IACD,kBAAkB,EAAE,IAAI,oBAAQ,CAC5B,gEAAgE,EAChE,sIAAsI,CACzI;IACD,cAAc,EAAE,IAAI,oBAAQ,CACxB,sNAAsN,EACtN,uSAAuS,CAC1S;CACJ,CAAC","sourcesContent":["import { RuleHelp } from '@webpieces/rules-sdk';\n\n/** Owner-authored guidance consumed by the registry catalog. */\nexport const ruleHelp: Readonly<Record<string, RuleHelp>> = {\n 'wiring-format': new RuleHelp('Check every canonical wiring.ts: its Wiring/AppWiring class plus the BindModule/RouteModule classes it selects, with their actual registrations.', 'Declare each owner\\'s Wiring/AppWiring class beside its named BindModule/RouteModule classes and their registrations (binder.createRpcClientAndBind, binder.createPubSubClientAndBind, binder.bindExternal, binder.bind chains, browser binder.provide recipes, addRoutes, addFilter) in its src/wiring.ts; select them with literal getBindModules/getRouteModules/getWirings return arrays. An AppWiring may also select a BindModule declared in a library owner\\'s canonical src/wiring.ts, and only an AppWiring selects library Wirings. Keep constructors as prepared-input storage, keep configuration building, environment discovery and initializer/factory bodies in imported implementations, use direct service strings and explicit WiringPolicy declarations. Set maxLines explicitly (agreed upstream limit: 400).'),\n 'no-file-import-cycles': new RuleHelp(\n 'Keep each project free of circular file imports.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'runtime-architecture': new RuleHelp(\n 'Validate runtime service and API dependency declarations.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'nx-wiring': new RuleHelp(\n 'Wire the required validation targets into the Nx execution graph.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'di-graph': new RuleHelp(\n 'Generate and validate dependency-injection design graphs.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'missing-design-annotation': new RuleHelp(\n 'Declare the application design roots required for DI analysis.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'validate-architecture-unchanged': new RuleHelp(\n 'Keep the committed architecture graph aligned with current dependencies.',\n 'In src/wiring.ts register clients through the BindModule\\'s Binder: binder.createRpcClientAndBind(Api, deployment, new ClientBindOptions(token?, filters?)) and binder.createPubSubClientAndBind(Api, deployment, new PubSubBindOptions(token?)) from @webpieces/http-routing, binder.bindExternal(Api, VendorImpl) for vendor contracts, and the browser binder.createRpcClientAndBind(Api, deployment) and binder.bindExternal(Api, new UseClass(Vendor) | new UseExisting(Token)) from @webpieces/http-client-browser. wiring-format checks canonical wiring.ts in all participating owners; preserve tokens and filters. Review graph changes and runtime-deps.json candidates explicitly.',\n ),\n 'validate-no-architecture-cycles': new RuleHelp(\n 'Keep the project dependency architecture free of cycles.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'validate-packagejson': new RuleHelp(\n 'Align package dependencies with declared project dependencies.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'validate-versions-locked': new RuleHelp(\n 'Pin dependency versions consistently across governed projects.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'validate-eslint-sync': new RuleHelp(\n 'Keep managed ESLint configuration synchronized with its installed templates.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'no-root-union-api-type': new RuleHelp(\n 'Use a stable named root API contract rather than a root union type.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'api-rules-for-openapi': new RuleHelp(\n 'Validate API contracts against their configured OpenAPI requirements.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'api-rules-for-mcp': new RuleHelp(\n 'Validate API contracts against their configured MCP requirements.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'api-lib-dependencies': new RuleHelp(\n 'Validate the configured API library dependency relationships.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'api-lib-path': new RuleHelp(\n 'Use the configured paths for API contract libraries.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'framework-folder': new RuleHelp(\n 'Align framework declarations with their project folder layout.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'product-tags': new RuleHelp(\n 'Require a product:<name> nx tag on every project whose role is listed, so the architecture graphs can show one product, and refuse a dependency edge that crosses into a product productDependencies does not allow.',\n 'Add \"product:<name>\" to the tags in the named project.json; for a refused edge, move the code so the dependency stays inside an allowed product, or add the product to that entry\\'s allowedToDependOn in productDependencies in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n};\n"]}
1
+ {"version":3,"file":"rule-help.js","sourceRoot":"","sources":["../../../../../packages/tooling/nx-webpieces-rules/src/rule-help.ts"],"names":[],"mappings":";;;AAAA,oDAAgD;AAEhD,gEAAgE;AACnD,QAAA,QAAQ,GAAuC;IACxD,oBAAoB,EAAE,IAAI,oBAAQ,CAC9B,uEAAuE,EACvE,+LAA+L,CAClM;IACD,qBAAqB,EAAE,IAAI,oBAA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AAE,IAAI,oBAAQ,CAC5B,gEAAgE,EAChE,sIAAsI,CACzI;IACD,cAAc,EAAE,IAAI,oBAAQ,CACxB,sNAAsN,EACtN,uSAAuS,CAC1S;CACJ,CAAC","sourcesContent":["import { RuleHelp } from '@webpieces/rules-sdk';\n\n/** Owner-authored guidance consumed by the registry catalog. */\nexport const ruleHelp: Readonly<Record<string, RuleHelp>> = {\n 'dependency-catalog': new RuleHelp(\n 'Centralize directly authored external versions in the pnpm catalogue.',\n 'Declare each external dependency with catalog: and an exact version in pnpm-workspace.yaml. Internal owners use workspace:*. This policy never overrides third-party transitive dependencies.',\n ),\n 'root-runtime-freeze': new RuleHelp(\n 'Prevent growth of root runtime dependency names.',\n 'Keep the reviewed allowedNames baseline for root dependencies, optionalDependencies and peerDependencies. New build/admin tools belong in root devDependencies; runtime imports belong to their module.',\n ),\n 'dependency-ownership': new RuleHelp(\n 'Require declarations at the importing source owner.',\n 'Declare emitted production imports in owner dependencies, optionalDependencies or peers. Test/build/erased-type imports may use owner devDependencies. Explicitly classify root tool files and artifact probes; toolProviders records exact umbrella-provided imports. Review dynamicImports as file::normalized expression::package-list mappings; an empty list means a verified local/artifact expression. Root hoisting never excuses a runtime owner.',\n ),\n 'wiring-format': new RuleHelp(\n 'Check every canonical wiring.ts: its Wiring/AppWiring class plus the BindModule/RouteModule classes it selects, with their actual registrations.',\n \"Declare each owner's Wiring/AppWiring class beside its named BindModule/RouteModule classes and their registrations (binder.createRpcClientAndBind, binder.createPubSubClientAndBind, binder.bindExternal, binder.bind chains, browser binder.provide recipes, addRoutes, addFilter) in its src/wiring.ts; select them with literal getBindModules/getRouteModules/getWirings return arrays. An AppWiring may also select a BindModule declared in a library owner's canonical src/wiring.ts, and only an AppWiring selects library Wirings. Keep constructors as prepared-input storage, keep configuration building, environment discovery and initializer/factory bodies in imported implementations, use direct service strings and explicit WiringPolicy declarations. Set maxLines explicitly (agreed upstream limit: 400).\",\n ),\n 'no-file-import-cycles': new RuleHelp(\n 'Keep each project free of circular file imports.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'runtime-architecture': new RuleHelp(\n 'Validate runtime service and API dependency declarations.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'nx-wiring': new RuleHelp(\n 'Wire the required validation targets into the Nx execution graph.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'di-graph': new RuleHelp(\n 'Generate and validate dependency-injection design graphs.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'missing-design-annotation': new RuleHelp(\n 'Declare the application design roots required for DI analysis.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'validate-architecture-unchanged': new RuleHelp(\n 'Keep the committed architecture graph aligned with current dependencies.',\n \"In src/wiring.ts register clients through the BindModule's Binder: binder.createRpcClientAndBind(Api, deployment, new ClientBindOptions(token?, filters?)) and binder.createPubSubClientAndBind(Api, deployment, new PubSubBindOptions(token?)) from @webpieces/http-routing, binder.bindExternal(Api, VendorImpl) for vendor contracts, and the browser binder.createRpcClientAndBind(Api, deployment) and binder.bindExternal(Api, new UseClass(Vendor) | new UseExisting(Token)) from @webpieces/http-client-browser. wiring-format checks canonical wiring.ts in all participating owners; preserve tokens and filters. Review graph changes and runtime-deps.json candidates explicitly.\",\n ),\n 'validate-no-architecture-cycles': new RuleHelp(\n 'Keep the project dependency architecture free of cycles.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'validate-packagejson': new RuleHelp(\n 'Align package dependencies with declared project dependencies.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'validate-versions-locked': new RuleHelp(\n 'Pin dependency versions consistently across governed projects.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'validate-eslint-sync': new RuleHelp(\n 'Keep managed ESLint configuration synchronized with its installed templates.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'no-root-union-api-type': new RuleHelp(\n 'Use a stable named root API contract rather than a root union type.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'api-rules-for-openapi': new RuleHelp(\n 'Validate API contracts against their configured OpenAPI requirements.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'api-rules-for-mcp': new RuleHelp(\n 'Validate API contracts against their configured MCP requirements.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'api-lib-dependencies': new RuleHelp(\n 'Validate the configured API library dependency relationships.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'api-lib-path': new RuleHelp(\n 'Use the configured paths for API contract libraries.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'framework-folder': new RuleHelp(\n 'Align framework declarations with their project folder layout.',\n 'Apply this policy in source, or review its explicit settings in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n 'product-tags': new RuleHelp(\n 'Require a product:<name> nx tag on every project whose role is listed, so the architecture graphs can show one product, and refuse a dependency edge that crosses into a product productDependencies does not allow.',\n 'Add \"product:<name>\" to the tags in the named project.json; for a refused edge, move the code so the dependency stays inside an allowed product, or add the product to that entry\\'s allowedToDependOn in productDependencies in {configFile}. An intentional opt-out requires complete OFF settings.',\n ),\n};\n"]}