@webpieces/rules-config 0.4.832 → 0.4.833

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,175 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FrameworkPackagesConfig = exports.FrameworkPackagesEntry = exports.FrameworkTsconfigConfig = exports.FrameworkFolderConfig = exports.FrameworkFolderEntry = exports.ApiLibPathConfig = exports.ApiLibDependenciesConfig = exports.ApiClientPackagesEntry = exports.PROJECT_SCAN_MODES = void 0;
4
+ const field_def_1 = require("./field-def");
5
+ const rule_configs_1 = require("./rule-configs");
6
+ /**
7
+ * The five rules that make an nx `framework:*` / `role:*` tag TRUE (#1064). Before them a tag was a
8
+ * promise only the dependency graph checked; the code inside a library, the folder it lives in and the
9
+ * packages it imports were never compared with it.
10
+ *
11
+ * Three are GRAPH rules (they read the whole nx project graph, so they run in `architecture:generate`
12
+ * and `validate-architecture-unchanged` beside `library-types-match-client`): `api-lib-dependencies`,
13
+ * `api-lib-path` and `framework-folder`. Two are PROJECT rules in `@webpieces/code-rules`:
14
+ * `framework-tsconfig` and `framework-packages`.
15
+ *
16
+ * Every field that decides behaviour is REQUIRED with no default (`.claude/rules/no-rule-defaults.md`):
17
+ * which packages an api library may import, which folders hold which runtimes, and which framework
18
+ * packages belong to which runtime are the CONSUMER's layout, never webpieces'. The recommended values
19
+ * are SEEDED into a fresh config (seed-entry.ts) and documented in `.claude/rules/framework-tags.md`.
20
+ */
21
+ /**
22
+ * The modes of the two PROJECT rules: OFF, MODIFIED_PROJECTS (every project owning a changed file) or
23
+ * RUN_EVERY_TIME (every project in the repo — the migration sweep).
24
+ */
25
+ exports.PROJECT_SCAN_MODES = ['OFF', 'MODIFIED_PROJECTS', 'RUN_EVERY_TIME'];
26
+ /** One `role:api-client` project and the outside packages it may import (its SDK, inversify, …). Data-only. */
27
+ class ApiClientPackagesEntry {
28
+ /** The nx project name of the `role:api-client` library, e.g. `gmail-client`. */
29
+ project;
30
+ /** Package names (globs allowed, e.g. `@google-cloud/*`) it may import beyond `apiLibPackages`. */
31
+ packages;
32
+ static SCHEMA = {
33
+ project: new field_def_1.FieldDef('string'),
34
+ packages: new field_def_1.FieldDef('string[]'),
35
+ };
36
+ }
37
+ exports.ApiClientPackagesEntry = ApiClientPackagesEntry;
38
+ /**
39
+ * `api-lib-dependencies` (D2) — a `role:api-lib` may depend only on other `role:api-lib` projects plus
40
+ * the outside packages in `apiLibPackages`; a `role:api-client` may ALSO import the packages its own
41
+ * `apiClients` entry names (its SDK, `inversify`, `@webpieces/core-context`, …).
42
+ *
43
+ * - `mode` — OFF | RUN_EVERY_TIME (a graph rule: it reads every project, every run).
44
+ * - `apiLibPackages` — required; may be empty (an api library then imports nothing from outside), e.g.
45
+ * `["@webpieces/core-util", "tslib"]`. A workspace project whose name or package name is listed here
46
+ * is allowed too, so a repo whose `core-util` is a workspace project states it the same way.
47
+ * - `apiClients` — required; one entry per `role:api-client` project. A `role:api-client` with no
48
+ * entry is itself a violation: what it may talk to is stated, never inferred.
49
+ */
50
+ class ApiLibDependenciesConfig extends rule_configs_1.BaseRuleConfig {
51
+ apiLibPackages;
52
+ apiClients;
53
+ static SCHEMA = {
54
+ mode: new field_def_1.FieldDef('string', rule_configs_1.STRUCTURAL_MODES),
55
+ apiLibPackages: new field_def_1.FieldDef('string[]'),
56
+ apiClients: field_def_1.FieldDef.objects(ApiClientPackagesEntry.SCHEMA),
57
+ ...rule_configs_1.BASE_RULE_SCHEMA,
58
+ };
59
+ }
60
+ exports.ApiLibDependenciesConfig = ApiLibDependenciesConfig;
61
+ /**
62
+ * `api-lib-path` (D10) — both directions: every `role:api-lib` / `role:api-client` project lives under
63
+ * one of `paths`, and every project under `paths` carries one of those two roles.
64
+ *
65
+ * - `mode` — OFF | RUN_EVERY_TIME.
66
+ * - `paths` — required, non-empty globs over project ROOTS, e.g. `["libraries/apis/**"]`.
67
+ */
68
+ class ApiLibPathConfig extends rule_configs_1.BaseRuleConfig {
69
+ paths;
70
+ static SCHEMA = {
71
+ mode: new field_def_1.FieldDef('string', rule_configs_1.STRUCTURAL_MODES),
72
+ paths: field_def_1.FieldDef.nonEmptyStrings(),
73
+ ...rule_configs_1.BASE_RULE_SCHEMA,
74
+ };
75
+ }
76
+ exports.ApiLibPathConfig = ApiLibPathConfig;
77
+ /**
78
+ * One folder of the runtime layout: the project roots it covers, the framework SETS a project there may
79
+ * carry, and the roles it may have. Data-only.
80
+ *
81
+ * A framework set is written as its tags joined by `+`, in any order: `"browser+node+react-native"`.
82
+ * Listing two sets means EITHER — `["node", "express"]` is a node library or an express one.
83
+ */
84
+ class FrameworkFolderEntry {
85
+ /** Globs over project ROOTS, e.g. `["libraries/universal/**"]`. Non-empty. */
86
+ paths;
87
+ /** The accepted framework sets, each `+`-joined, e.g. `["browser+node+react-native"]`. Non-empty. */
88
+ frameworkSets;
89
+ /** The accepted roles, e.g. `["lib", "designed-lib"]`. Non-empty. */
90
+ roles;
91
+ static SCHEMA = {
92
+ paths: field_def_1.FieldDef.nonEmptyStrings(),
93
+ frameworkSets: field_def_1.FieldDef.nonEmptyStrings(),
94
+ roles: field_def_1.FieldDef.nonEmptyStrings(),
95
+ };
96
+ }
97
+ exports.FrameworkFolderEntry = FrameworkFolderEntry;
98
+ /**
99
+ * `framework-folder` (D9) — the folder a library lives in and the tags it carries say the same thing,
100
+ * both directions:
101
+ * - a project under an entry's `paths` (the FIRST entry whose glob matches, in `entries` order) must
102
+ * carry one of that entry's `frameworkSets`, exactly, and one of its `roles`;
103
+ * - a LIBRARY (any role but server/app/client/bundle) carrying a framework set and role that some entry
104
+ * lists must live under one of the entries that list them.
105
+ *
106
+ * - `mode` — OFF | RUN_EVERY_TIME.
107
+ * - `entries` — required, non-empty. The recommended layout is in `.claude/rules/framework-tags.md`.
108
+ */
109
+ class FrameworkFolderConfig extends rule_configs_1.BaseRuleConfig {
110
+ entries;
111
+ static SCHEMA = {
112
+ mode: new field_def_1.FieldDef('string', rule_configs_1.STRUCTURAL_MODES),
113
+ entries: field_def_1.FieldDef.nonEmptyObjects(FrameworkFolderEntry.SCHEMA),
114
+ ...rule_configs_1.BASE_RULE_SCHEMA,
115
+ };
116
+ }
117
+ exports.FrameworkFolderConfig = FrameworkFolderConfig;
118
+ /**
119
+ * `framework-tsconfig` (D7) — the COMPILER enforces the runtime a library's framework tags promise. Its
120
+ * `tsconfig.lib.json` (with everything it `extends`) must resolve to:
121
+ * - every env a browser one (browser / angular / react): `lib` includes `dom`, `types` excludes `node`;
122
+ * - every env a node one (node / express): `lib` excludes `dom`, `types` includes `node`;
123
+ * - anything else (universal, browser + react-native, react-native): `lib` excludes `dom`, `types`
124
+ * excludes `node` — pure TypeScript.
125
+ * An unset `lib` resolves to TypeScript's default, which includes `dom`; an unset `types` includes every
126
+ * installed `@types/*`, so it counts as including `node`. Both must therefore be stated.
127
+ *
128
+ * - `mode` — OFF | MODIFIED_PROJECTS | RUN_EVERY_TIME.
129
+ * - `allowedPaths` — optional globs over project roots this rule skips.
130
+ */
131
+ class FrameworkTsconfigConfig extends rule_configs_1.BaseRuleConfig {
132
+ allowedPaths;
133
+ static SCHEMA = {
134
+ mode: new field_def_1.FieldDef('string', exports.PROJECT_SCAN_MODES),
135
+ allowedPaths: field_def_1.FieldDef.optional('string[]'),
136
+ ...rule_configs_1.BASE_RULE_SCHEMA,
137
+ };
138
+ }
139
+ exports.FrameworkTsconfigConfig = FrameworkTsconfigConfig;
140
+ /** Framework packages and the runtimes that may import them. Data-only. */
141
+ class FrameworkPackagesEntry {
142
+ /** Package-name globs, e.g. `["@angular/*"]` or `["react", "react-native", "expo*"]`. Non-empty. */
143
+ packages;
144
+ /** The framework tags allowed to import them, e.g. `["angular"]`. Non-empty. */
145
+ frameworks;
146
+ static SCHEMA = {
147
+ packages: field_def_1.FieldDef.nonEmptyStrings(),
148
+ frameworks: field_def_1.FieldDef.nonEmptyStrings(),
149
+ };
150
+ }
151
+ exports.FrameworkPackagesEntry = FrameworkPackagesEntry;
152
+ /**
153
+ * `framework-packages` (D8) — a framework package is imported only by a project whose EVERY framework
154
+ * tag is one its entry allows. A `browser+node` library importing `firebase-admin` is refused (its
155
+ * browser env cannot run it); a `react` library importing `react` is not.
156
+ *
157
+ * Only production source is read (specs and test setup are not the runtime). A package no entry names
158
+ * is not judged.
159
+ *
160
+ * - `mode` — OFF | MODIFIED_PROJECTS | RUN_EVERY_TIME.
161
+ * - `entries` — required, non-empty. The recommended list is in `.claude/rules/framework-tags.md`.
162
+ * - `allowedPaths` — optional globs over project roots this rule skips.
163
+ */
164
+ class FrameworkPackagesConfig extends rule_configs_1.BaseRuleConfig {
165
+ entries;
166
+ allowedPaths;
167
+ static SCHEMA = {
168
+ mode: new field_def_1.FieldDef('string', exports.PROJECT_SCAN_MODES),
169
+ entries: field_def_1.FieldDef.nonEmptyObjects(FrameworkPackagesEntry.SCHEMA),
170
+ allowedPaths: field_def_1.FieldDef.optional('string[]'),
171
+ ...rule_configs_1.BASE_RULE_SCHEMA,
172
+ };
173
+ }
174
+ exports.FrameworkPackagesConfig = FrameworkPackagesConfig;
175
+ //# sourceMappingURL=tag-truth-configs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-truth-configs.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/tag-truth-configs.ts"],"names":[],"mappings":"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","sourcesContent":["import { FieldDef, SchemaShape } from './field-def';\nimport { BaseRuleConfig, BASE_RULE_SCHEMA, StructuralMode, STRUCTURAL_MODES } from './rule-configs';\n\n/**\n * The five rules that make an nx `framework:*` / `role:*` tag TRUE (#1064). Before them a tag was a\n * promise only the dependency graph checked; the code inside a library, the folder it lives in and the\n * packages it imports were never compared with it.\n *\n * Three are GRAPH rules (they read the whole nx project graph, so they run in `architecture:generate`\n * and `validate-architecture-unchanged` beside `library-types-match-client`): `api-lib-dependencies`,\n * `api-lib-path` and `framework-folder`. Two are PROJECT rules in `@webpieces/code-rules`:\n * `framework-tsconfig` and `framework-packages`.\n *\n * Every field that decides behaviour is REQUIRED with no default (`.claude/rules/no-rule-defaults.md`):\n * which packages an api library may import, which folders hold which runtimes, and which framework\n * packages belong to which runtime are the CONSUMER's layout, never webpieces'. The recommended values\n * are SEEDED into a fresh config (seed-entry.ts) and documented in `.claude/rules/framework-tags.md`.\n */\n\n/**\n * The modes of the two PROJECT rules: OFF, MODIFIED_PROJECTS (every project owning a changed file) or\n * RUN_EVERY_TIME (every project in the repo — the migration sweep).\n */\nexport const PROJECT_SCAN_MODES = ['OFF', 'MODIFIED_PROJECTS', 'RUN_EVERY_TIME'] as const;\nexport type ProjectScanMode = typeof PROJECT_SCAN_MODES[number];\n\n/** One `role:api-client` project and the outside packages it may import (its SDK, inversify, …). Data-only. */\nexport class ApiClientPackagesEntry {\n /** The nx project name of the `role:api-client` library, e.g. `gmail-client`. */\n project!: string;\n /** Package names (globs allowed, e.g. `@google-cloud/*`) it may import beyond `apiLibPackages`. */\n packages!: string[];\n\n static readonly SCHEMA: SchemaShape<ApiClientPackagesEntry> = {\n project: new FieldDef('string'),\n packages: new FieldDef('string[]'),\n };\n}\n\n/**\n * `api-lib-dependencies` (D2) — a `role:api-lib` may depend only on other `role:api-lib` projects plus\n * the outside packages in `apiLibPackages`; a `role:api-client` may ALSO import the packages its own\n * `apiClients` entry names (its SDK, `inversify`, `@webpieces/core-context`, …).\n *\n * - `mode` — OFF | RUN_EVERY_TIME (a graph rule: it reads every project, every run).\n * - `apiLibPackages` — required; may be empty (an api library then imports nothing from outside), e.g.\n * `[\"@webpieces/core-util\", \"tslib\"]`. A workspace project whose name or package name is listed here\n * is allowed too, so a repo whose `core-util` is a workspace project states it the same way.\n * - `apiClients` — required; one entry per `role:api-client` project. A `role:api-client` with no\n * entry is itself a violation: what it may talk to is stated, never inferred.\n */\nexport class ApiLibDependenciesConfig extends BaseRuleConfig {\n declare mode?: StructuralMode;\n apiLibPackages!: string[];\n apiClients!: ApiClientPackagesEntry[];\n\n static readonly SCHEMA: SchemaShape<ApiLibDependenciesConfig> = {\n mode: new FieldDef('string', STRUCTURAL_MODES),\n apiLibPackages: new FieldDef('string[]'),\n apiClients: FieldDef.objects(ApiClientPackagesEntry.SCHEMA),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n/**\n * `api-lib-path` (D10) — both directions: every `role:api-lib` / `role:api-client` project lives under\n * one of `paths`, and every project under `paths` carries one of those two roles.\n *\n * - `mode` — OFF | RUN_EVERY_TIME.\n * - `paths` — required, non-empty globs over project ROOTS, e.g. `[\"libraries/apis/**\"]`.\n */\nexport class ApiLibPathConfig extends BaseRuleConfig {\n declare mode?: StructuralMode;\n paths!: string[];\n\n static readonly SCHEMA: SchemaShape<ApiLibPathConfig> = {\n mode: new FieldDef('string', STRUCTURAL_MODES),\n paths: FieldDef.nonEmptyStrings(),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n/**\n * One folder of the runtime layout: the project roots it covers, the framework SETS a project there may\n * carry, and the roles it may have. Data-only.\n *\n * A framework set is written as its tags joined by `+`, in any order: `\"browser+node+react-native\"`.\n * Listing two sets means EITHER — `[\"node\", \"express\"]` is a node library or an express one.\n */\nexport class FrameworkFolderEntry {\n /** Globs over project ROOTS, e.g. `[\"libraries/universal/**\"]`. Non-empty. */\n paths!: string[];\n /** The accepted framework sets, each `+`-joined, e.g. `[\"browser+node+react-native\"]`. Non-empty. */\n frameworkSets!: string[];\n /** The accepted roles, e.g. `[\"lib\", \"designed-lib\"]`. Non-empty. */\n roles!: string[];\n\n static readonly SCHEMA: SchemaShape<FrameworkFolderEntry> = {\n paths: FieldDef.nonEmptyStrings(),\n frameworkSets: FieldDef.nonEmptyStrings(),\n roles: FieldDef.nonEmptyStrings(),\n };\n}\n\n/**\n * `framework-folder` (D9) — the folder a library lives in and the tags it carries say the same thing,\n * both directions:\n * - a project under an entry's `paths` (the FIRST entry whose glob matches, in `entries` order) must\n * carry one of that entry's `frameworkSets`, exactly, and one of its `roles`;\n * - a LIBRARY (any role but server/app/client/bundle) carrying a framework set and role that some entry\n * lists must live under one of the entries that list them.\n *\n * - `mode` — OFF | RUN_EVERY_TIME.\n * - `entries` — required, non-empty. The recommended layout is in `.claude/rules/framework-tags.md`.\n */\nexport class FrameworkFolderConfig extends BaseRuleConfig {\n declare mode?: StructuralMode;\n entries!: FrameworkFolderEntry[];\n\n static readonly SCHEMA: SchemaShape<FrameworkFolderConfig> = {\n mode: new FieldDef('string', STRUCTURAL_MODES),\n entries: FieldDef.nonEmptyObjects(FrameworkFolderEntry.SCHEMA),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n/**\n * `framework-tsconfig` (D7) — the COMPILER enforces the runtime a library's framework tags promise. Its\n * `tsconfig.lib.json` (with everything it `extends`) must resolve to:\n * - every env a browser one (browser / angular / react): `lib` includes `dom`, `types` excludes `node`;\n * - every env a node one (node / express): `lib` excludes `dom`, `types` includes `node`;\n * - anything else (universal, browser + react-native, react-native): `lib` excludes `dom`, `types`\n * excludes `node` — pure TypeScript.\n * An unset `lib` resolves to TypeScript's default, which includes `dom`; an unset `types` includes every\n * installed `@types/*`, so it counts as including `node`. Both must therefore be stated.\n *\n * - `mode` — OFF | MODIFIED_PROJECTS | RUN_EVERY_TIME.\n * - `allowedPaths` — optional globs over project roots this rule skips.\n */\nexport class FrameworkTsconfigConfig extends BaseRuleConfig {\n declare mode?: ProjectScanMode;\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<FrameworkTsconfigConfig> = {\n mode: new FieldDef('string', PROJECT_SCAN_MODES),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n/** Framework packages and the runtimes that may import them. Data-only. */\nexport class FrameworkPackagesEntry {\n /** Package-name globs, e.g. `[\"@angular/*\"]` or `[\"react\", \"react-native\", \"expo*\"]`. Non-empty. */\n packages!: string[];\n /** The framework tags allowed to import them, e.g. `[\"angular\"]`. Non-empty. */\n frameworks!: string[];\n\n static readonly SCHEMA: SchemaShape<FrameworkPackagesEntry> = {\n packages: FieldDef.nonEmptyStrings(),\n frameworks: FieldDef.nonEmptyStrings(),\n };\n}\n\n/**\n * `framework-packages` (D8) — a framework package is imported only by a project whose EVERY framework\n * tag is one its entry allows. A `browser+node` library importing `firebase-admin` is refused (its\n * browser env cannot run it); a `react` library importing `react` is not.\n *\n * Only production source is read (specs and test setup are not the runtime). A package no entry names\n * is not judged.\n *\n * - `mode` — OFF | MODIFIED_PROJECTS | RUN_EVERY_TIME.\n * - `entries` — required, non-empty. The recommended list is in `.claude/rules/framework-tags.md`.\n * - `allowedPaths` — optional globs over project roots this rule skips.\n */\nexport class FrameworkPackagesConfig extends BaseRuleConfig {\n declare mode?: ProjectScanMode;\n entries!: FrameworkPackagesEntry[];\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<FrameworkPackagesConfig> = {\n mode: new FieldDef('string', PROJECT_SCAN_MODES),\n entries: FieldDef.nonEmptyObjects(FrameworkPackagesEntry.SCHEMA),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n"]}