archprint 0.12.3 → 0.13.0
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.
- package/CHANGELOG.md +24 -0
- package/README.md +43 -31
- package/dist/cli/adopted-rules.d.ts +8 -1
- package/dist/cli/adopted-rules.d.ts.map +1 -1
- package/dist/cli/adopted-rules.js +19 -0
- package/dist/cli/adopted-rules.js.map +1 -1
- package/dist/cli/allow.d.ts.map +1 -1
- package/dist/cli/allow.js +3 -2
- package/dist/cli/allow.js.map +1 -1
- package/dist/cli/allowed-evidence.d.ts.map +1 -1
- package/dist/cli/allowed-evidence.js +23 -1
- package/dist/cli/allowed-evidence.js.map +1 -1
- package/dist/cli/check-evaluate.d.ts.map +1 -1
- package/dist/cli/check-evaluate.js +17 -0
- package/dist/cli/check-evaluate.js.map +1 -1
- package/dist/cli/generate.d.ts +6 -0
- package/dist/cli/generate.d.ts.map +1 -1
- package/dist/cli/generate.js +93 -43
- package/dist/cli/generate.js.map +1 -1
- package/dist/cli/layout.d.ts +3 -0
- package/dist/cli/layout.d.ts.map +1 -1
- package/dist/cli/layout.js +21 -4
- package/dist/cli/layout.js.map +1 -1
- package/dist/cli/migrate.d.ts.map +1 -1
- package/dist/cli/migrate.js +2 -2
- package/dist/cli/migrate.js.map +1 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +10 -7
- package/dist/cli/program.js.map +1 -1
- package/dist/cli/recommend.d.ts.map +1 -1
- package/dist/cli/recommend.js +3 -1
- package/dist/cli/recommend.js.map +1 -1
- package/dist/cli/report.d.ts.map +1 -1
- package/dist/cli/report.js +4 -2
- package/dist/cli/report.js.map +1 -1
- package/dist/cli/scan.d.ts +3 -0
- package/dist/cli/scan.d.ts.map +1 -1
- package/dist/cli/scan.js +7 -6
- package/dist/cli/scan.js.map +1 -1
- package/dist/detector/cycle-detector.d.ts +3 -0
- package/dist/detector/cycle-detector.d.ts.map +1 -1
- package/dist/detector/cycle-detector.js +25 -2
- package/dist/detector/cycle-detector.js.map +1 -1
- package/dist/detector/layer-detector.d.ts +11 -0
- package/dist/detector/layer-detector.d.ts.map +1 -1
- package/dist/detector/layer-detector.js +44 -56
- package/dist/detector/layer-detector.js.map +1 -1
- package/dist/detector/layer-paths.d.ts +17 -0
- package/dist/detector/layer-paths.d.ts.map +1 -0
- package/dist/detector/layer-paths.js +41 -0
- package/dist/detector/layer-paths.js.map +1 -0
- package/dist/detector/marker-inference.d.ts.map +1 -1
- package/dist/detector/marker-inference.js +46 -4
- package/dist/detector/marker-inference.js.map +1 -1
- package/dist/generator/depcruise-exempt.d.ts.map +1 -1
- package/dist/generator/depcruise-exempt.js +4 -1
- package/dist/generator/depcruise-exempt.js.map +1 -1
- package/dist/generator/eslint-layer-emitter.d.ts +29 -0
- package/dist/generator/eslint-layer-emitter.d.ts.map +1 -0
- package/dist/generator/eslint-layer-emitter.js +121 -0
- package/dist/generator/eslint-layer-emitter.js.map +1 -0
- package/dist/generator/eslint-plugin-emitter.d.ts +1 -0
- package/dist/generator/eslint-plugin-emitter.d.ts.map +1 -1
- package/dist/generator/eslint-plugin-emitter.js +2 -1
- package/dist/generator/eslint-plugin-emitter.js.map +1 -1
- package/dist/generator/eslint-preset-emitter.d.ts +2 -0
- package/dist/generator/eslint-preset-emitter.d.ts.map +1 -1
- package/dist/generator/eslint-preset-emitter.js +14 -5
- package/dist/generator/eslint-preset-emitter.js.map +1 -1
- package/dist/generator/layer-emitters.d.ts +7 -1
- package/dist/generator/layer-emitters.d.ts.map +1 -1
- package/dist/generator/layer-emitters.js +20 -5
- package/dist/generator/layer-emitters.js.map +1 -1
- package/dist/generator/ui-data-isolation-emitters.js +1 -1
- package/dist/generator/ui-data-isolation-emitters.js.map +1 -1
- package/dist/scanner/file-walker.d.ts +15 -0
- package/dist/scanner/file-walker.d.ts.map +1 -1
- package/dist/scanner/file-walker.js +50 -11
- package/dist/scanner/file-walker.js.map +1 -1
- package/dist/scanner/source-paths.d.ts +9 -0
- package/dist/scanner/source-paths.d.ts.map +1 -0
- package/dist/scanner/source-paths.js +13 -0
- package/dist/scanner/source-paths.js.map +1 -0
- package/dist/scanner/workspace-resolver.d.ts.map +1 -1
- package/dist/scanner/workspace-resolver.js +2 -1
- package/dist/scanner/workspace-resolver.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# archprint
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Layer boundaries can now be enforced with plain ESLint. When your repo does not use dependency-cruiser, `generate --include-structural` writes each layer boundary into `.archprint/eslint.mjs` as its own rule, such as `archprint/no-lib-to-app`, with no extra plugin, and `recommend` names ESLint as its enforcer. The rule checks `.ts` and `.tsx` files and reads imports the way the scan counted them: relative paths and tsconfig aliases, side-effect and dynamic imports, but not type-only imports, test files, or the folders the scan skips (`build`, dot-folders, and the ones your `.gitignore` excluded when you generated). It exempts the files that already broke the boundary, so it passes on the code it was generated from. Layer rules are now adopted: `archprint check` reports a new break, and `archprint allow` accepts one, whether ESLint or dependency-cruiser enforces it. Older archprint versions do not recognize adopted layer rules, so update archprint in CI (for example the GitHub Action's `archprint-version`) before you generate with `--include-structural`.
|
|
8
|
+
|
|
9
|
+
`--rules` now selects any generated rule, not only `AP-` rules: an `AP-` id or the name ESLint prints for it, a family rule such as `import-style` or `test-isolation`, or a layer rule by its id (`no-lib-to-app`) or by the label `scan` prints (`lib !-> app`). It keeps only the rules it names, so `--rules AP-002` no longer also writes the other families. A name that matches no rule the run would generate is an error that lists the ones it would, and nothing is changed.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Layer boundaries written for dependency-cruiser no longer fail on their first run. A rule such as `lib` must not import `app` used to flag the few existing exceptions it was generated with, test files, and type-only imports, none of which the scan counts. It also matched every folder with the layer's name at any depth, so a `lib/` folder inside a route like `app/(dashboard)/lib/` counted as the `lib` layer. The rule now matches only the folders the layer was found in, and in a monorepo it matches paths the way dependency-cruiser reports them from the folder where you ran archprint.
|
|
14
|
+
|
|
15
|
+
Layer boundaries are now found from imports as written in every scan mode, which is how dependency-cruiser, ESLint and ts-arch read them. A full scan used to follow re-exporting index files and could find a boundary its own rule then contradicted. Exceptions to other dependency-cruiser rules also match on a folder boundary now, so an exception for `lib/legacy.ts` no longer exempts `mylib/legacy.ts`.
|
|
16
|
+
|
|
17
|
+
## 0.12.4
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Three fixes found by reviewing archprint's output on popular open-source repos before writing about them:
|
|
22
|
+
|
|
23
|
+
- Circular dependencies are now shown as a real import loop, for example `a.ts -> b.ts -> a.ts`, plus how many other files are in the same cycle. Before, the files of a cycle were listed in alphabetical order with arrows between them, which read like an import chain that did not exist.
|
|
24
|
+
- The rule that request handlers must not import the database client directly now recognises Supabase (`@supabase/supabase-js`, `@supabase/ssr`, `@supabase/postgrest-js` and the older auth helpers) and your own modules that create a Supabase client, so an app that reaches its database through Supabase is no longer told its handlers avoid the database. Database client modules created with a type argument, such as `new Kysely<DB>(...)` or `createServerClient<Database>(...)`, are recognised too.
|
|
25
|
+
- The UI and data rule now says what it measures: components that never import the data layer directly. It no longer claims they go "through services", which it does not check.
|
|
26
|
+
|
|
3
27
|
## 0.12.3
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -253,29 +253,32 @@ ecosystem actually does rather than hand-picked defaults.
|
|
|
253
253
|
|
|
254
254
|
## What it writes to your project
|
|
255
255
|
|
|
256
|
-
`archprint generate` (and `init`) writes
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
a tool you do not have. `--emit <eslint|dependency-cruiser|all>` forces the
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
256
|
+
`archprint generate` (and `init`) writes `.archprint/config.json` plus one file for each linter your repo already
|
|
257
|
+
runs that has rules to enforce. A typical ESLint project gets two files, `config.json` and `eslint.mjs`; a repo
|
|
258
|
+
whose dependency-cruiser rules are adopted too gets a third. archprint detects ESLint and dependency-cruiser, so
|
|
259
|
+
you are never left with config for a tool you do not have. `--emit <eslint|dependency-cruiser|all>` forces the
|
|
260
|
+
format.
|
|
261
|
+
|
|
262
|
+
- **`.archprint/config.json`** (always): the exact definition of each rule you adopted, with the
|
|
263
|
+
evidence recorded at adoption and the resolution mode it was generated in (`archprint check` reads it, so a check
|
|
264
|
+
never re-infers a rule), the exceptions you allowed with a reason, what is enforced, followed but only reported,
|
|
265
|
+
held for review, and worth adopting, and the list of managed outputs `eject` removes.
|
|
266
|
+
- **`.archprint/eslint.mjs`** (when ESLint is present): one self-contained ESLint flat-config file that inlines
|
|
267
|
+
every inferred ESLint rule (marker-based forbidden imports, `no-restricted-imports` import-style boundaries,
|
|
268
|
+
console isolation, and layer boundaries when you include structural rules and do not use dependency-cruiser)
|
|
269
|
+
and needs no extra plugins: it adds rules to your existing ESLint setup, which already parses your TypeScript.
|
|
270
|
+
So you can commit it, publish it, or hand it to another repo and adopt it in one line
|
|
271
|
+
(`import archprint from './.archprint/eslint.mjs'`). Layer boundaries are the exception: they find your app
|
|
272
|
+
relative to the file, so they only apply where it was generated. It self-ignores `**/.archprint/**`. The
|
|
273
|
+
forbidden-import (AP-) and layer rules ship as a generated local eslint plugin inside it, so wiring the eslint
|
|
274
|
+
config enforces them too, no extra install.
|
|
268
275
|
- **`.archprint/dependency-cruiser.json`** (when dependency-cruiser is present): one `forbidden` ruleset with the
|
|
269
276
|
mechanical boundaries (public-API deep-import, test-isolation); the review-held ones (layer, role-layering,
|
|
270
277
|
feature-slice, app-isolation, entry-purity, dependency-internals, phantom deps) are added only with
|
|
271
278
|
`--include-structural`, after you review them.
|
|
272
|
-
- **`.archprint/config.json`**: the exact definition of each mechanical rule you adopted, with the evidence
|
|
273
|
-
recorded at adoption and the resolution mode it was generated in (`archprint check` reads it, so a check never
|
|
274
|
-
re-infers a rule), the exceptions you allowed with a reason, what is enforced, followed but only reported, held
|
|
275
|
-
for review, and worth adopting, and the list of managed outputs `eject` removes.
|
|
276
279
|
- **A managed section in your `README.md`** summarizing what is enforced now, followed but only reported, held for
|
|
277
|
-
review, and worth adopting (written by `init`, or `generate --readme`), plus a managed `.prettierignore` entry so
|
|
278
|
-
out of your formatter.
|
|
280
|
+
review, and worth adopting (written by `init`, or `generate --readme`), plus a managed `.prettierignore` entry so
|
|
281
|
+
the generated files stay out of your formatter.
|
|
279
282
|
|
|
280
283
|
`--expand` additionally writes the granular artifacts inside `.archprint/`: the per-family ESLint and
|
|
281
284
|
dependency-cruiser JSON, per-rule cards (`.md`) with passing and failing fixtures, the eslint-plugin-boundaries
|
|
@@ -341,14 +344,15 @@ jobs:
|
|
|
341
344
|
violation, then mark the job a required status check in your branch protection so a pull request that adds one
|
|
342
345
|
can't merge.
|
|
343
346
|
- **Only adopted rules.** `check` reads the adopted rules in `.archprint/config.json`, written by `init` and
|
|
344
|
-
`generate`, and checks only the
|
|
345
|
-
|
|
347
|
+
`generate`, and checks only the rules recorded there: the mechanical rules, plus layer boundaries once you adopt
|
|
348
|
+
them with `--include-structural`. Rules adopted in the same
|
|
349
|
+
pull request are listed but never counted against it.
|
|
346
350
|
- **A justified exception needs a reason.** When a file has a real reason to break a rule, record it:
|
|
347
|
-
`npx archprint allow AP-001 app/api/health/route.ts --reason "Health check queries the database directly"`.
|
|
348
|
-
goes in the `allowed` list of `.archprint/config.json`, `check` stops counting it and lists it with its reason
|
|
349
|
-
the next `archprint generate` stops
|
|
350
|
-
code no longer needs is pointed out. Rules enforced through dependency-cruiser (public
|
|
351
|
-
that side yet.
|
|
351
|
+
`npx archprint allow AP-001 app/api/health/route.ts --reason "Health check queries the database directly"`.
|
|
352
|
+
It goes in the `allowed` list of `.archprint/config.json`, `check` stops counting it and lists it with its reason
|
|
353
|
+
in the pull request, and the next `archprint generate` stops the generated rules flagging it. An entry without a reason is
|
|
354
|
+
rejected, and an entry the code no longer needs is pointed out. Rules enforced through dependency-cruiser (public
|
|
355
|
+
API) are not covered on that side yet.
|
|
352
356
|
- **Removing rules is never silent.** If a pull request deletes `.archprint/config.json`, or the rules in it,
|
|
353
357
|
that the base branch has, `check` warns and lists every rule that stops being checked. It does not
|
|
354
358
|
fail the job, because dropping a rule can be a deliberate team decision. To make that decision need a reviewer,
|
|
@@ -474,7 +478,8 @@ reachability) and knip (dead code); rather than compete, it writes the rules it
|
|
|
474
478
|
fresh repo too), and names the installed tool that will enforce each rule it can write.
|
|
475
479
|
- **`archprint generate [path]`**: writes the auto-trusted mechanical rules to `.archprint/` for the linters your
|
|
476
480
|
repo uses; structural rules are held for review. `--emit <eslint|dependency-cruiser|all>` forces the format,
|
|
477
|
-
`--only <family>` and `--rules <ids>` narrow the output
|
|
481
|
+
`--only <family>` and `--rules <ids>` narrow the output (`--rules` keeps only the rules it names, such as
|
|
482
|
+
`AP-002`, `import-style` or the layer rule `no-lib-to-app`), `--check` runs the generated rules against your repo,
|
|
478
483
|
`--readme` adds the README section, `--expand` also writes the per-family files, cards, fixtures and graph, and
|
|
479
484
|
`--rule <id>` emits one reviewed rule. Also `--include-structural`, `--no-graph`, `--out <dir>`, `--fast`.
|
|
480
485
|
- **`archprint check [path]`**: reports the violations of your adopted rules that a change introduces, compared
|
|
@@ -482,7 +487,7 @@ reachability) and knip (dead code); rather than compete, it writes the rules it
|
|
|
482
487
|
`--out <dir>`. See [Use in CI](#use-in-ci).
|
|
483
488
|
- **`archprint allow <rule> <file> --reason "..."`**: accepts one adopted rule being broken in one file, with a
|
|
484
489
|
reason, recorded in `.archprint/config.json`. `check` stops counting it and lists it in the pull request;
|
|
485
|
-
`generate` stops
|
|
490
|
+
`generate` stops the generated rules flagging it. `--remove` takes it back out.
|
|
486
491
|
- **`archprint wire`**: references the generated rules from the enforcement tools your repo uses (flat eslint
|
|
487
492
|
config, `.dependency-cruiser.json`) through a managed, reversible reference. `--out <dir>`, `--dry-run`.
|
|
488
493
|
- **`archprint eject`**: removes Archprint's generated files, its config, the managed README section, and any
|
|
@@ -499,7 +504,8 @@ codes are the contract: `0` on success, `1` on error (for `check`: new violation
|
|
|
499
504
|
|
|
500
505
|
## Example on a real repo
|
|
501
506
|
|
|
502
|
-
A real scan of [inbox-zero](https://github.com/elie222/inbox-zero) (`apps/web`, 2,232 TypeScript
|
|
507
|
+
A real scan of [inbox-zero](https://github.com/elie222/inbox-zero) (`apps/web` at commit `11281be`, 2,232 TypeScript
|
|
508
|
+
files), trimmed to the first rules of each section:
|
|
503
509
|
|
|
504
510
|
```
|
|
505
511
|
Scanned 2,232 TypeScript files
|
|
@@ -514,6 +520,10 @@ GENERATED RULES
|
|
|
514
520
|
LAYER BOUNDARIES (review before enforcing)
|
|
515
521
|
utils !-> app layer boundary confidence 99%
|
|
516
522
|
Evidence: 650/653 utils files conform (99.5%); 451 app file(s) depend on utils
|
|
523
|
+
Exceptions: 3
|
|
524
|
+
utils !-> components layer boundary confidence 99%
|
|
525
|
+
Evidence: 650/653 utils files conform (99.5%); 160 components file(s) depend on utils
|
|
526
|
+
Exceptions: 3
|
|
517
527
|
hooks !-> app layer boundary confidence 94%
|
|
518
528
|
Evidence: 65/65 hooks files conform (100%); 121 app file(s) depend on hooks
|
|
519
529
|
```
|
|
@@ -539,9 +549,11 @@ Published on npm and safe to run on your real repo. Every rule is review-gated b
|
|
|
539
549
|
command (`archprint eject`), and deterministic, and generated rules are green by construction on the code they
|
|
540
550
|
were inferred from.
|
|
541
551
|
|
|
542
|
-
- **Validated at scale:**
|
|
543
|
-
|
|
544
|
-
|
|
552
|
+
- **Validated at scale:** the latest census (archprint 0.12.2, October 2026) ran `scan` over 92,861 public
|
|
553
|
+
TypeScript repositories with no crashes; 494 (0.5%) could not be fetched or timed out, most of them deleted or very
|
|
554
|
+
large repositories. The full workflow (`init`, `check`, `allow`, `generate`, `check`, `wire`, `eject`) ran on a
|
|
555
|
+
2,019-repo stratified sample: it found one bug, exceptions in route folders like Next.js `[id]`, fixed in 0.12.3, and
|
|
556
|
+
all 2,012 repositories it ran on came back exactly as they were after `eject`.
|
|
545
557
|
- **Production-ready today:** `scan` and `recommend`, `check` for pull requests, and auto-enforcement of the
|
|
546
558
|
mechanical families, with a self-consistency check at generate time, an `init` scaffolder for fresh repos, and
|
|
547
559
|
framework coverage across React, Angular, Vue, and Svelte. The engine (twenty detectors, the confidence gate, and
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Role } from '../scanner/role-classifier.js';
|
|
2
|
+
import type { LayerBoundary } from '../detector/layer-detector.js';
|
|
2
3
|
import type { ScannedPattern, ScanResult } from './scan.js';
|
|
3
4
|
/** Where 0.9.0 to 0.11.x kept the adopted rules, before they moved into config.json. */
|
|
4
5
|
export declare const LEGACY_RULES_FILE = "rules.json";
|
|
@@ -29,12 +30,18 @@ export interface PublicApiRule extends RuleBase {
|
|
|
29
30
|
export interface SingleFamilyRule extends RuleBase {
|
|
30
31
|
family: 'test-isolation' | 'console-isolation' | 'import-style';
|
|
31
32
|
}
|
|
32
|
-
export
|
|
33
|
+
export interface LayerRule extends RuleBase {
|
|
34
|
+
family: 'layer';
|
|
35
|
+
from: string;
|
|
36
|
+
to: string;
|
|
37
|
+
}
|
|
38
|
+
export type AdoptedRule = ForbiddenImportRule | PublicApiRule | LayerRule | SingleFamilyRule;
|
|
33
39
|
export declare function forbiddenImportRule(pattern: ScannedPattern, mode: ResolutionMode): AdoptedRule;
|
|
34
40
|
export declare function testIsolationRule(scan: ScanResult): AdoptedRule;
|
|
35
41
|
export declare function consoleIsolationRule(scan: ScanResult): AdoptedRule;
|
|
36
42
|
export declare function importStyleRule(scan: ScanResult): AdoptedRule;
|
|
37
43
|
export declare function publicApiRules(scan: ScanResult): AdoptedRule[];
|
|
44
|
+
export declare function layerRule(boundary: LayerBoundary): LayerRule;
|
|
38
45
|
export declare const byRuleId: (a: AdoptedRule, b: AdoptedRule) => number;
|
|
39
46
|
export declare class InvalidRulesError extends Error {
|
|
40
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adopted-rules.d.ts","sourceRoot":"","sources":["../../src/cli/adopted-rules.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"adopted-rules.d.ts","sourceRoot":"","sources":["../../src/cli/adopted-rules.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAKnE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5D,wFAAwF;AACxF,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAG9C,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAoB,SAAQ,QAAQ;IACnD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAChD;AAED,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C,MAAM,EAAE,YAAY,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAiB,SAAQ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|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import * as path from 'node:path';
|
|
3
|
+
import { layerRuleName } from '../generator/layer-emitters.js';
|
|
3
4
|
import { publicApiRuleName } from '../generator/public-api-emitters.js';
|
|
4
5
|
import { configPath, configSection, readConfigSection } from './archprint-config.js';
|
|
5
6
|
import { FAMILY_STATEMENTS } from './rule-statements.js';
|
|
@@ -65,12 +66,24 @@ export function publicApiRules(scan) {
|
|
|
65
66
|
evidence: evidenceOf(group.gate, group.consumerCount, group.deepImporterCount),
|
|
66
67
|
}));
|
|
67
68
|
}
|
|
69
|
+
export function layerRule(boundary) {
|
|
70
|
+
return {
|
|
71
|
+
id: layerRuleName(boundary),
|
|
72
|
+
family: 'layer',
|
|
73
|
+
from: boundary.from,
|
|
74
|
+
to: boundary.to,
|
|
75
|
+
statement: `the ${boundary.from} layer must not import the ${boundary.to} layer`,
|
|
76
|
+
mode: 'fast',
|
|
77
|
+
evidence: evidenceOf(boundary.gate, boundary.stats.roleFileCount, boundary.stats.violatingFileCount),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
68
80
|
export const byRuleId = (a, b) => a.id.localeCompare(b.id);
|
|
69
81
|
export class InvalidRulesError extends Error {
|
|
70
82
|
}
|
|
71
83
|
const FAMILIES = new Set([
|
|
72
84
|
'forbidden-imports',
|
|
73
85
|
'public-api',
|
|
86
|
+
'layer',
|
|
74
87
|
'test-isolation',
|
|
75
88
|
'console-isolation',
|
|
76
89
|
'import-style',
|
|
@@ -114,6 +127,10 @@ function validateRule(rule, file) {
|
|
|
114
127
|
if (candidate.family === 'public-api' && typeof candidate.dir !== 'string') {
|
|
115
128
|
return invalid(`rule ${candidate.id} has no directory`);
|
|
116
129
|
}
|
|
130
|
+
if (candidate.family === 'layer' &&
|
|
131
|
+
(typeof candidate.from !== 'string' || typeof candidate.to !== 'string')) {
|
|
132
|
+
return invalid(`rule ${candidate.id} has no layers`);
|
|
133
|
+
}
|
|
117
134
|
return rule;
|
|
118
135
|
}
|
|
119
136
|
function parseRuleList(rules, file) {
|
|
@@ -157,6 +174,8 @@ export function ruleDefinitionKey(rule) {
|
|
|
157
174
|
]);
|
|
158
175
|
case 'public-api':
|
|
159
176
|
return JSON.stringify([...common, rule.dir]);
|
|
177
|
+
case 'layer':
|
|
178
|
+
return JSON.stringify([...common, rule.from, rule.to]);
|
|
160
179
|
default:
|
|
161
180
|
return JSON.stringify(common);
|
|
162
181
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adopted-rules.js","sourceRoot":"","sources":["../../src/cli/adopted-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"adopted-rules.js","sourceRoot":"","sources":["../../src/cli/adopted-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,wFAAwF;AACxF,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAC9C,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAwC9B,MAAM,UAAU,GAAG,CAAC,IAAgB,EAAE,KAAa,EAAE,SAAiB,EAAoB,EAAE,CAAC,CAAC;IAC5F,UAAU,EAAE,KAAK,GAAG,SAAS;IAC7B,KAAK;IACL,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,UAAU,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I,CAAC,SAAS,CAAC,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QACzD;YACE,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;AACH,CAAC"}
|
package/dist/cli/allow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allow.d.ts","sourceRoot":"","sources":["../../src/cli/allow.ts"],"names":[],"mappings":"AAaA,qBAAa,UAAW,SAAQ,KAAK;CAAG;AAExC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"allow.d.ts","sourceRoot":"","sources":["../../src/cli/allow.ts"],"names":[],"mappings":"AAaA,qBAAa,UAAW,SAAQ,KAAK;CAAG;AAExC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAOD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAiDtD"}
|
package/dist/cli/allow.js
CHANGED
|
@@ -7,6 +7,7 @@ import { readConfig } from './archprint-config.js';
|
|
|
7
7
|
import { evaluateRules } from './check-evaluate.js';
|
|
8
8
|
export class AllowError extends Error {
|
|
9
9
|
}
|
|
10
|
+
const regenerateHint = (rule) => `Run archprint generate to update the ${rule.family === 'layer' ? 'generated' : 'ESLint'} rules.`;
|
|
10
11
|
const toPosix = (value) => value.split(path.sep).join('/');
|
|
11
12
|
export function runAllow(options) {
|
|
12
13
|
const outDir = path.resolve(options.cwd, options.out);
|
|
@@ -38,7 +39,7 @@ export function runAllow(options) {
|
|
|
38
39
|
throw new AllowError(`There is no allowed exception for ${rule.id} in ${file}.`);
|
|
39
40
|
}
|
|
40
41
|
writeAllowed(outDir, others);
|
|
41
|
-
return `Removed the exception for ${rule.id} in ${file}.
|
|
42
|
+
return `Removed the exception for ${rule.id} in ${file}. ${regenerateHint(rule)}`;
|
|
42
43
|
}
|
|
43
44
|
const reason = options.reason?.trim() ?? '';
|
|
44
45
|
if (reason === '') {
|
|
@@ -52,7 +53,7 @@ export function runAllow(options) {
|
|
|
52
53
|
writeAllowed(outDir, [...others, entry]);
|
|
53
54
|
const lint = rule.family === 'public-api'
|
|
54
55
|
? ' dependency-cruiser does not read this list, so add the exception there too if you use it.'
|
|
55
|
-
:
|
|
56
|
+
: ` ${regenerateHint(rule)}`;
|
|
56
57
|
return `Allowed ${rule.id} in ${file}. archprint check accepts it now.${lint}`;
|
|
57
58
|
}
|
|
58
59
|
//# sourceMappingURL=allow.js.map
|
package/dist/cli/allow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allow.js","sourceRoot":"","sources":["../../src/cli/allow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"allow.js","sourceRoot":"","sources":["../../src/cli/allow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AA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I,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;IACjC,OAAO,WAAW,IAAI,CAAC,EAAE,OAAO,IAAI,oCAAoC,IAAI,EAAE,CAAC;AACjF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowed-evidence.d.ts","sourceRoot":"","sources":["../../src/cli/allowed-evidence.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"allowed-evidence.d.ts","sourceRoot":"","sources":["../../src/cli/allowed-evidence.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,KAAK,aAAa,GAAG,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;AA0B5D,gHAAgH;AAChH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAU/D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,GAAG,UAAU,CAuHnF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { evaluateGate } from '../detector/confidence-gate.js';
|
|
1
|
+
import { evaluateGate, wilsonLowerBound } from '../detector/confidence-gate.js';
|
|
2
|
+
import { layerRuleName } from '../generator/layer-emitters.js';
|
|
2
3
|
import { publicApiRuleName } from '../generator/public-api-emitters.js';
|
|
3
4
|
import { readAdoptedRules } from './adopted-rules.js';
|
|
4
5
|
import { allowedFilesByRule, readAllowed } from './allowed-exceptions.js';
|
|
@@ -111,6 +112,27 @@ export function excludeAllowed(scan, allowed) {
|
|
|
111
112
|
};
|
|
112
113
|
}),
|
|
113
114
|
},
|
|
115
|
+
layerBoundaries: scan.layerBoundaries.map((boundary) => {
|
|
116
|
+
const layer = exclude(boundary.violations, allowedFor(layerRuleName(boundary)));
|
|
117
|
+
if (layer.removedFiles === 0)
|
|
118
|
+
return boundary;
|
|
119
|
+
const roleFileCount = boundary.stats.roleFileCount - layer.removedFiles;
|
|
120
|
+
const directional = wilsonLowerBound(boundary.reverseFlow, layer.keptFiles + boundary.reverseFlow);
|
|
121
|
+
const gate = regate(roleFileCount, layer.keptFiles, directional);
|
|
122
|
+
return {
|
|
123
|
+
...boundary,
|
|
124
|
+
violations: layer.kept,
|
|
125
|
+
gate,
|
|
126
|
+
stats: {
|
|
127
|
+
...boundary.stats,
|
|
128
|
+
roleFileCount,
|
|
129
|
+
conformingFileCount: roleFileCount - layer.keptFiles,
|
|
130
|
+
violatingFileCount: layer.keptFiles,
|
|
131
|
+
ratio: gate.observedConformance,
|
|
132
|
+
roleConfidence: directional,
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
}),
|
|
114
136
|
};
|
|
115
137
|
}
|
|
116
138
|
//# sourceMappingURL=allowed-evidence.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allowed-evidence.js","sourceRoot":"","sources":["../../src/cli/allowed-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"allowed-evidence.js","sourceRoot":"","sources":["../../src/cli/allowed-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAW1E,SAAS,OAAO,CACd,UAAwB,EACxB,YAA+B;IAE/B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAA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,UAAU,EAAE,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAChF,IAAI,KAAK,CAAC,YAAY,KAAK,CAAC;gBAAE,OAAO,QAAQ,CAAC;YAC9C,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,YAAY,CAAC;YACxE,MAAM,WAAW,GAAG,gBAAgB,CAClC,QAAQ,CAAC,WAAW,EACpB,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC,WAAW,CACvC,CAAC;YACF,MAAM,IAAI,GAAG,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;YACjE,OAAO;gBACL,GAAG,QAAQ;gBACX,UAAU,EAAE,KAAK,CAAC,IAAI;gBACtB,IAAI;gBACJ,KAAK,EAAE;oBACL,GAAG,QAAQ,CAAC,KAAK;oBACjB,aAAa;oBACb,mBAAmB,EAAE,aAAa,GAAG,KAAK,CAAC,SAAS;oBACpD,kBAAkB,EAAE,KAAK,CAAC,SAAS;oBACnC,KAAK,EAAE,IAAI,CAAC,mBAAmB;oBAC/B,cAAc,EAAE,WAAW;iBAC5B;aACF,CAAC;QACJ,CAAC,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-evaluate.d.ts","sourceRoot":"","sources":["../../src/cli/check-evaluate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check-evaluate.d.ts","sourceRoot":"","sources":["../../src/cli/check-evaluate.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAuC,MAAM,oBAAoB,CAAC;AAE3F,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;CACnB;AAiCD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,WAAW,EAAE,GAAG,OAAO,EAAE,CAiEtF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { detectConsoleIsolation } from '../detector/console-isolation-detector.js';
|
|
2
2
|
import { detectDeepRelativeImports } from '../detector/deep-relative-detector.js';
|
|
3
|
+
import { layerImports } from '../detector/layer-detector.js';
|
|
3
4
|
import { detectForbiddenImports } from '../detector/pattern-detector.js';
|
|
4
5
|
import { detectPublicApiBoundaries } from '../detector/public-api-detector.js';
|
|
5
6
|
import { detectTestIsolation } from '../detector/test-isolation-detector.js';
|
|
@@ -61,6 +62,22 @@ export function evaluateRules(appDir, rules) {
|
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
}
|
|
65
|
+
const layers = byFamily('layer');
|
|
66
|
+
if (layers.length > 0) {
|
|
67
|
+
const importsAcross = layerImports(appDir);
|
|
68
|
+
for (const rule of layers) {
|
|
69
|
+
if (rule.family !== 'layer')
|
|
70
|
+
continue;
|
|
71
|
+
for (const edge of importsAcross(rule.from, rule.to)) {
|
|
72
|
+
findings.push({
|
|
73
|
+
ruleId: rule.id,
|
|
74
|
+
file: edge.file,
|
|
75
|
+
subject: edge.specifier,
|
|
76
|
+
kind: 'specifier',
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
64
81
|
const publicApi = byFamily('public-api');
|
|
65
82
|
if (publicApi.length > 0) {
|
|
66
83
|
const groups = detectPublicApiBoundaries(appDir).groups;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-evaluate.js","sourceRoot":"","sources":["../../src/cli/check-evaluate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,C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,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC;QACxD,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;YAC7B,IAAI,IAAI,CAAC,MAAM,KAAK,YAAY;gBAAE,SAAS;YAC3C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC;YACrE,KAAK,MAAM,SAAS,IAAI,KAAK,EAAE,UAAU,IAAI,EAAE,EAAE,CAAC;gBAChD,QAAQ,CAAC,IAAI,CAAC;oBACZ,MAAM,EAAE,IAAI,CAAC,EAAE;oBACf,IAAI,EAAE,SAAS,CAAC,IAAI;oBACpB,OAAO,EAAE,SAAS,CAAC,MAAM;oBACzB,IAAI,EAAE,QAAQ;iBACf,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/cli/generate.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type EslintLayers } from '../generator/eslint-layer-emitter.js';
|
|
1
2
|
import type { InstalledEnforcers } from '../scanner/enforcers.js';
|
|
2
3
|
import { type BoundaryRule } from '../generator/tsarch-emitter.js';
|
|
3
4
|
import { type ForbiddenImportSpec } from '../generator/eslint-plugin-emitter.js';
|
|
@@ -20,12 +21,16 @@ interface DependencyCruiserFamily {
|
|
|
20
21
|
}
|
|
21
22
|
export interface CollectedEnforcement {
|
|
22
23
|
eslintSpecs: ForbiddenImportSpec[];
|
|
24
|
+
eslintLayers: EslintLayers | null;
|
|
23
25
|
eslintBlocks: EslintFamilyBlock[];
|
|
24
26
|
depcruise: DependencyCruiserFamily[];
|
|
25
27
|
boundaries: unknown | null;
|
|
26
28
|
tsArchRules: BoundaryRule[];
|
|
27
29
|
hasGraph: boolean;
|
|
28
30
|
adopted: AdoptedRule[];
|
|
31
|
+
/** The rule ids this run could emit, and the --rules entries that named none of them. */
|
|
32
|
+
availableRules: string[];
|
|
33
|
+
unknownRules: string[];
|
|
29
34
|
}
|
|
30
35
|
export interface CollectOptions {
|
|
31
36
|
structural?: boolean;
|
|
@@ -37,6 +42,7 @@ export interface CollectOptions {
|
|
|
37
42
|
appPath?: string;
|
|
38
43
|
}
|
|
39
44
|
export declare function collectEnforcement(scan: ScanResult, options: CollectOptions): CollectedEnforcement;
|
|
45
|
+
export declare const writesEslint: ({ eslintSpecs, eslintBlocks, eslintLayers, }: CollectedEnforcement) => boolean;
|
|
40
46
|
export declare function writeArchprintEslint(collected: CollectedEnforcement, outDir: string): string | null;
|
|
41
47
|
export declare function writeArchprintDepcruise(collected: CollectedEnforcement, outDir: string): string | null;
|
|
42
48
|
export interface EmitResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/cli/generate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/cli/generate.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,sCAAsC,CAAC;AAY9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AASlE,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEtF,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAC;AAO/C,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAQL,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAE5B,eAAO,MAAM,WAAW,eAAe,CAAC;AACxC,eAAO,MAAM,cAAc,4BAA4B,CAAC;AACxD,e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