@starci/eslint-canon-be 3.18.4 → 3.19.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 +4 -0
- package/dist/comments.js +1 -1
- package/dist/explicit-surface.js +1 -1
- package/dist/index.js +1 -1
- package/dist/jwt-alg.js +1 -1
- package/dist/lib/edition.d.ts +1 -1
- package/dist/lib/edition.js +1 -1
- package/dist/lib/hfs.d.ts +0 -6
- package/dist/lib/hfs.js +7 -5
- package/dist/lib/runtime-root.d.ts +6 -1
- package/dist/lib/runtime-root.js +8 -2
- package/dist/lib/subject-values.js +1 -1
- package/dist/module-layering.js +2 -2
- package/dist/project-graph.js +1 -1
- package/dist/third-party-owner.js +1 -1
- package/package.json +3 -1
- package/runtime/bundle.json +1 -190
- package/runtime/scripts/api/git/recorded-lines.mjs +5 -5
- package/runtime/scripts/hfs/project-graph.mjs +6 -6
- package/runtime/scripts/hfs/project-rule.mjs +3 -3
- package/runtime/config.example.yaml +0 -194
- package/runtime/engine/by-code-unit.mjs +0 -12
- package/runtime/engine/config.mjs +0 -461
- package/runtime/engine/invalid-config.mjs +0 -15
- package/runtime/engine/model-config.mjs +0 -112
- package/runtime/engine/orca-config.mjs +0 -34
- package/runtime/engine/plain-object.mjs +0 -5
- package/runtime/engine/release-config.mjs +0 -32
- package/runtime/engine/removed-vocabulary.mjs +0 -27
- package/runtime/engine/resources-config.mjs +0 -59
- package/runtime/engine/runtime-root.mjs +0 -138
- package/runtime/engine/secrets.mjs +0 -202
- package/runtime/engine/sonar-config.mjs +0 -24
- package/runtime/engine/temp-root.mjs +0 -26
- package/runtime/engine/yaml.mjs +0 -161
- package/runtime/knowledge/grammars/index.yaml +0 -114
- package/runtime/knowledge/hfs/canon-pins.yaml +0 -720
- package/runtime/knowledge/hfs/fe-stack.yaml +0 -272
- package/runtime/knowledge/hfs/rules.yaml +0 -6760
- package/runtime/knowledge/hfs/slots.yaml +0 -2783
- package/runtime/knowledge/patterns/fe/folder.yaml +0 -425
- package/runtime/knowledge/sonar-gate.yaml +0 -151
- package/runtime/modules/kernel/removed-vocabulary.yaml +0 -458
- package/runtime/modules/models/registry.yaml +0 -221
- package/runtime/modules/models/runtimes.yaml +0 -556
- package/runtime/modules/models/tiers.yaml +0 -66
- package/runtime/scripts/api/git/cat-file.mjs +0 -4
- package/runtime/scripts/api/git/config-get.mjs +0 -9
- package/runtime/scripts/api/git/diff.mjs +0 -4
- package/runtime/scripts/api/git/lib.mjs +0 -80
- package/runtime/scripts/api/git/ls-files.mjs +0 -5
- package/runtime/scripts/api/git/ls-tree.mjs +0 -4
- package/runtime/scripts/api/git/merge-base.mjs +0 -8
- package/runtime/scripts/api/git/remote.mjs +0 -4
- package/runtime/scripts/api/git/rev-parse-query.mjs +0 -4
- package/runtime/scripts/api/git/show.mjs +0 -5
- package/runtime/scripts/api/git/tag.mjs +0 -4
- package/runtime/scripts/hfs/allows.mjs +0 -77
- package/runtime/scripts/hfs/architecture/ast-walks.mjs +0 -250
- package/runtime/scripts/hfs/architecture/automatic-gates.mjs +0 -103
- package/runtime/scripts/hfs/architecture/backend-app-files.mjs +0 -114
- package/runtime/scripts/hfs/architecture/backend.mjs +0 -462
- package/runtime/scripts/hfs/architecture/background-unowned.mjs +0 -254
- package/runtime/scripts/hfs/architecture/canon-clones.mjs +0 -291
- package/runtime/scripts/hfs/architecture/canon-jsx-clones.mjs +0 -224
- package/runtime/scripts/hfs/architecture/client-reaches-server.mjs +0 -102
- package/runtime/scripts/hfs/architecture/clones.mjs +0 -287
- package/runtime/scripts/hfs/architecture/component-tiers.mjs +0 -161
- package/runtime/scripts/hfs/architecture/config-unread.mjs +0 -16
- package/runtime/scripts/hfs/architecture/config.mjs +0 -407
- package/runtime/scripts/hfs/architecture/connection-map.mjs +0 -350
- package/runtime/scripts/hfs/architecture/constructor-deps.mjs +0 -115
- package/runtime/scripts/hfs/architecture/context-coupling.mjs +0 -117
- package/runtime/scripts/hfs/architecture/context-map.mjs +0 -355
- package/runtime/scripts/hfs/architecture/context-owner.mjs +0 -102
- package/runtime/scripts/hfs/architecture/context-platform-tables.mjs +0 -65
- package/runtime/scripts/hfs/architecture/context-transaction.mjs +0 -75
- package/runtime/scripts/hfs/architecture/contract-bounds.mjs +0 -72
- package/runtime/scripts/hfs/architecture/contract-fixture-guard.mjs +0 -177
- package/runtime/scripts/hfs/architecture/contracts-readonly.mjs +0 -360
- package/runtime/scripts/hfs/architecture/contracts.mjs +0 -489
- package/runtime/scripts/hfs/architecture/cross-app-duplicate.mjs +0 -81
- package/runtime/scripts/hfs/architecture/dead-exports-bindings.mjs +0 -173
- package/runtime/scripts/hfs/architecture/dead-exports.mjs +0 -420
- package/runtime/scripts/hfs/architecture/default-deny.mjs +0 -175
- package/runtime/scripts/hfs/architecture/doc-language.mjs +0 -45
- package/runtime/scripts/hfs/architecture/entity-registry.mjs +0 -51
- package/runtime/scripts/hfs/architecture/entrypoint.mjs +0 -75
- package/runtime/scripts/hfs/architecture/error-codes.mjs +0 -54
- package/runtime/scripts/hfs/architecture/error-masked.mjs +0 -78
- package/runtime/scripts/hfs/architecture/fe-slot-allows.mjs +0 -44
- package/runtime/scripts/hfs/architecture/feature-shape.mjs +0 -60
- package/runtime/scripts/hfs/architecture/framework-pinned.mjs +0 -41
- package/runtime/scripts/hfs/architecture/frontend-block-render.mjs +0 -112
- package/runtime/scripts/hfs/architecture/frontend-grammar.mjs +0 -193
- package/runtime/scripts/hfs/architecture/frontend-routing.mjs +0 -198
- package/runtime/scripts/hfs/architecture/frontend-world-render.mjs +0 -368
- package/runtime/scripts/hfs/architecture/frontend-world.mjs +0 -374
- package/runtime/scripts/hfs/architecture/frontend.mjs +0 -248
- package/runtime/scripts/hfs/architecture/function-spec-providers.mjs +0 -185
- package/runtime/scripts/hfs/architecture/hfs-graph.mjs +0 -77
- package/runtime/scripts/hfs/architecture/hfs.mjs +0 -394
- package/runtime/scripts/hfs/architecture/hooks-are-hooks.mjs +0 -118
- package/runtime/scripts/hfs/architecture/i18n-keys.mjs +0 -213
- package/runtime/scripts/hfs/architecture/identity.mjs +0 -121
- package/runtime/scripts/hfs/architecture/index.mjs +0 -402
- package/runtime/scripts/hfs/architecture/injection-token-exported.mjs +0 -69
- package/runtime/scripts/hfs/architecture/jwt-ast.mjs +0 -231
- package/runtime/scripts/hfs/architecture/machine-ast.mjs +0 -232
- package/runtime/scripts/hfs/architecture/managed-scripts.mjs +0 -32
- package/runtime/scripts/hfs/architecture/module-per-transport.mjs +0 -237
- package/runtime/scripts/hfs/architecture/next-data-contract.mjs +0 -126
- package/runtime/scripts/hfs/architecture/next-data-inference.mjs +0 -192
- package/runtime/scripts/hfs/architecture/next-data-key.mjs +0 -374
- package/runtime/scripts/hfs/architecture/next-data-symbols.mjs +0 -26
- package/runtime/scripts/hfs/architecture/next-data.mjs +0 -425
- package/runtime/scripts/hfs/architecture/operation-contract-roots.mjs +0 -55
- package/runtime/scripts/hfs/architecture/owners.mjs +0 -142
- package/runtime/scripts/hfs/architecture/package-shape.mjs +0 -92
- package/runtime/scripts/hfs/architecture/presentation.mjs +0 -173
- package/runtime/scripts/hfs/architecture/reachability.mjs +0 -330
- package/runtime/scripts/hfs/architecture/register-once.mjs +0 -212
- package/runtime/scripts/hfs/architecture/registration.mjs +0 -372
- package/runtime/scripts/hfs/architecture/render-graph.mjs +0 -449
- package/runtime/scripts/hfs/architecture/render-prop-across-server.mjs +0 -58
- package/runtime/scripts/hfs/architecture/required-files.mjs +0 -237
- package/runtime/scripts/hfs/architecture/root-packages.mjs +0 -78
- package/runtime/scripts/hfs/architecture/route-files-thin.mjs +0 -133
- package/runtime/scripts/hfs/architecture/schema-owner.mjs +0 -288
- package/runtime/scripts/hfs/architecture/server-action.mjs +0 -78
- package/runtime/scripts/hfs/architecture/side-boundary.mjs +0 -13
- package/runtime/scripts/hfs/architecture/source-names-shape.mjs +0 -320
- package/runtime/scripts/hfs/architecture/source-names.mjs +0 -393
- package/runtime/scripts/hfs/architecture/sql-keys.mjs +0 -344
- package/runtime/scripts/hfs/architecture/sql-owner.mjs +0 -291
- package/runtime/scripts/hfs/architecture/sql-returning.mjs +0 -76
- package/runtime/scripts/hfs/architecture/sql-token-forms.mjs +0 -117
- package/runtime/scripts/hfs/architecture/sql-tokens.mjs +0 -587
- package/runtime/scripts/hfs/architecture/staged-consumers.mjs +0 -42
- package/runtime/scripts/hfs/architecture/surface-nesting.mjs +0 -127
- package/runtime/scripts/hfs/architecture/surface.mjs +0 -88
- package/runtime/scripts/hfs/architecture/symbols.mjs +0 -273
- package/runtime/scripts/hfs/architecture/test-world-files.mjs +0 -263
- package/runtime/scripts/hfs/architecture/tiers.mjs +0 -256
- package/runtime/scripts/hfs/architecture/transport-owner.mjs +0 -248
- package/runtime/scripts/hfs/architecture/type-context.mjs +0 -335
- package/runtime/scripts/hfs/architecture/typescript.mjs +0 -477
- package/runtime/scripts/hfs/architecture/unit-spec-providers.mjs +0 -165
- package/runtime/scripts/hfs/declaration-shape.mjs +0 -196
- package/runtime/scripts/hfs/declaration-slots.mjs +0 -89
- package/runtime/scripts/hfs/edition-slots.mjs +0 -80
- package/runtime/scripts/hfs/explicit-surface-rule.mjs +0 -59
- package/runtime/scripts/hfs/linear-text.mjs +0 -30
- package/runtime/scripts/hfs/manifest-shape.mjs +0 -474
- package/runtime/scripts/hfs/param-names.mjs +0 -13
- package/runtime/scripts/hfs/path-findings.mjs +0 -167
- package/runtime/scripts/hfs/repo-identity.mjs +0 -89
- package/runtime/scripts/hfs/rule-catalog.mjs +0 -458
- package/runtime/scripts/hfs/rule-params-shape.mjs +0 -103
- package/runtime/scripts/hfs/rules/database-constants.mjs +0 -25
- package/runtime/scripts/hfs/rules/database-migrations.mjs +0 -684
- package/runtime/scripts/hfs/rules/fe-no-tests.mjs +0 -68
- package/runtime/scripts/hfs/rules/read.mjs +0 -45
- package/runtime/scripts/hfs/rules/secrets.mjs +0 -79
- package/runtime/scripts/hfs/rules/spec-placement.mjs +0 -28
- package/runtime/scripts/hfs/slot-app-view.mjs +0 -97
- package/runtime/scripts/hfs/slot-classify.mjs +0 -69
- package/runtime/scripts/hfs/slot-errors.mjs +0 -12
- package/runtime/scripts/hfs/slot-imports.mjs +0 -98
- package/runtime/scripts/hfs/slot-manifest-shape.mjs +0 -111
- package/runtime/scripts/hfs/slot-match.mjs +0 -164
- package/runtime/scripts/hfs/slot-path.mjs +0 -6
- package/runtime/scripts/hfs/slot-required.mjs +0 -95
- package/runtime/scripts/hfs/slot-semantic-problems.mjs +0 -175
- package/runtime/scripts/hfs/slot-side-problems.mjs +0 -32
- package/runtime/scripts/hfs/slots.mjs +0 -306
- package/runtime/scripts/hfs/test-world-slot.mjs +0 -5
- package/runtime/scripts/hfs/trailing-slashes.mjs +0 -8
- package/runtime/scripts/hfs/typescript-programs.mjs +0 -95
- package/runtime/scripts/hfs/view.mjs +0 -180
- package/runtime/scripts/lib/declaration-surface.mjs +0 -166
- package/runtime/scripts/lib/dockerfile.mjs +0 -164
- package/runtime/scripts/lib/env.mjs +0 -18
- package/runtime/scripts/lib/event-contract.mjs +0 -102
- package/runtime/scripts/lib/git-hooks-dir.mjs +0 -30
- package/runtime/scripts/lib/git.mjs +0 -35
- package/runtime/scripts/lib/glob.mjs +0 -32
- package/runtime/scripts/lib/grammar-lint.mjs +0 -57
- package/runtime/scripts/lib/i18n.mjs +0 -82
- package/runtime/scripts/lib/in-order.mjs +0 -90
- package/runtime/scripts/lib/json-clone.mjs +0 -70
- package/runtime/scripts/lib/json.mjs +0 -44
- package/runtime/scripts/lib/language.mjs +0 -233
- package/runtime/scripts/lib/list.mjs +0 -26
- package/runtime/scripts/lib/mutation-fence.mjs +0 -20
- package/runtime/scripts/lib/package-at.mjs +0 -62
- package/runtime/scripts/lib/path-key.mjs +0 -124
- package/runtime/scripts/lib/read-text.mjs +0 -47
- package/runtime/scripts/lib/regex.mjs +0 -3
- package/runtime/scripts/lib/rule-packs.mjs +0 -243
- package/runtime/scripts/lib/same-text.mjs +0 -4
- package/runtime/scripts/lib/secret-patterns.mjs +0 -230
- package/runtime/scripts/lib/sops-envelope.mjs +0 -212
- package/runtime/scripts/lib/stack-services.mjs +0 -191
- package/runtime/scripts/lib/ts-analysis.mjs +0 -39
- package/runtime/scripts/lib/ts-ast.mjs +0 -63
- package/runtime/scripts/lib/walk.mjs +0 -45
- package/runtime/scripts/lib/yaml-cached.mjs +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.19.0 - 2026-11-05
|
|
4
|
+
|
|
5
|
+
- Changed (decision release-only-what-changed): the canon reads the @starci/hfs runtime (slots, rule catalog, canon pins, failure codes, the architecture machine) from the installed hfs at run time, which it peers by `~5.13.0`, and bundles no copy; `runtime/` keeps only the project graph rule, the jsdoc and sonar helpers and the package-scripts template. The stale forks it kept (slots 3.13.0) are gone, so it lints with the manifest hfs ships.
|
|
6
|
+
|
|
3
7
|
## 3.18.4 - 2026-11-05
|
|
4
8
|
|
|
5
9
|
- Changed: the runtime copy of the canon pins gives the Grammar family its same-minor range (decision grammar-patch-range) and names `@starci/hfs` 5.12.0 and the Grammar family 0.22.0; the runtime copy of R15 reads the range.
|
package/dist/comments.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import { nameOrValue } from "./lib/ast.js";
|
|
26
26
|
import { hfsOf } from "./lib/hfs.js";
|
|
27
27
|
import { normalizePath } from "./lib/path.js";
|
|
28
|
-
import { hasSecondLanguage } from "
|
|
28
|
+
import { hasSecondLanguage } from "@starci/hfs/runtime/scripts/lib/language.mjs";
|
|
29
29
|
import { jsdocBefore, jsdocDescription } from "../runtime/scripts/lib/jsdoc.mjs";
|
|
30
30
|
/** The slots of the per-owner message catalogs: the only source files that may hold Vietnamese. */
|
|
31
31
|
const CATALOG_SLOTS = new Set(["be.domain.messages", "be.feature.messages"]);
|
package/dist/explicit-surface.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* cache reads (`declarationSurface` of the bundled runtime), so the rule reports exactly the files the cache counts as open.
|
|
9
9
|
*/
|
|
10
10
|
import ts from "typescript";
|
|
11
|
-
import { explicitSurfaceRule } from "
|
|
11
|
+
import { explicitSurfaceRule } from "@starci/hfs/runtime/scripts/hfs/explicit-surface-rule.mjs";
|
|
12
12
|
/** The rules this law contributes to the plugin. */
|
|
13
13
|
export const rules = {
|
|
14
14
|
"explicit-export-surface": explicitSurfaceRule({ ts }),
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* every conversation about the failure. Aliasing one here to match a target's older spelling would
|
|
17
17
|
* leave two names for one rule and no way to tell which a message came from.
|
|
18
18
|
*/
|
|
19
|
-
import { packEslintConfigs } from "
|
|
19
|
+
import { packEslintConfigs } from "@starci/hfs/runtime/scripts/lib/rule-packs.mjs";
|
|
20
20
|
import { buildBeConfig, buildBePackagesConfig } from "./lib/config.js";
|
|
21
21
|
import { pluginForEdition } from "./lib/edition.js";
|
|
22
22
|
import { recommended as aiGatewayRecommended, rules as aiGatewayRules } from "./ai-gateway.js";
|
package/dist/jwt-alg.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import ts from "typescript";
|
|
3
3
|
import { typed } from "./lib/types.js";
|
|
4
4
|
import { isDeclarationFile } from "./lib/path.js";
|
|
5
|
-
import { jwtPolicyProblems } from "
|
|
5
|
+
import { jwtPolicyProblems } from "@starci/hfs/runtime/scripts/hfs/architecture/jwt-ast.mjs";
|
|
6
6
|
/** The text of a module specifier (a string literal), or undefined for any other expression. */
|
|
7
7
|
const specifierText = (specifier) => ("text" in specifier ? specifier.text : undefined);
|
|
8
8
|
/** Recognize jose imports and aliases through their declarations, including namespace imports. */
|
package/dist/lib/edition.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* returns no listeners. The plugin wiring therefore has one generic gate instead of edition checks
|
|
7
7
|
* scattered through rule bodies.
|
|
8
8
|
*/
|
|
9
|
-
import { type RuleCatalog } from "
|
|
9
|
+
import { type RuleCatalog } from "@starci/hfs/runtime/scripts/hfs/rule-catalog.mjs";
|
|
10
10
|
import type { CanonPlugin } from "./config.js";
|
|
11
11
|
/**
|
|
12
12
|
* The plugin view for one HFS edition.
|
package/dist/lib/edition.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* returns no listeners. The plugin wiring therefore has one generic gate instead of edition checks
|
|
7
7
|
* scattered through rule bodies.
|
|
8
8
|
*/
|
|
9
|
-
import { loadRuleCatalog } from "
|
|
9
|
+
import { loadRuleCatalog } from "@starci/hfs/runtime/scripts/hfs/rule-catalog.mjs";
|
|
10
10
|
import { RUNTIME_ROOT as RUNTIME } from "./runtime-root.js";
|
|
11
11
|
let catalogCache;
|
|
12
12
|
/** The bundled rule catalog, loaded once per lint process. */
|
package/dist/lib/hfs.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import type { HfsView } from "./hfs-view.js";
|
|
2
2
|
import type { Context } from "./rule.js";
|
|
3
3
|
export type { HfsAllowsVerdict, HfsApp, HfsClassification, HfsConnection, HfsPackageContract, HfsPackageDeclaredType, HfsParamName, HfsRuleParams, HfsSlot, HfsSpecDouble, HfsUnitRole, HfsView, } from "./hfs-view.js";
|
|
4
|
-
/**
|
|
5
|
-
* The HFS view of the side whose `eslint.config.mjs` (in be/) calls this.
|
|
6
|
-
*
|
|
7
|
-
* @param configUrl - `import.meta.url` of the repository's `eslint.config.mjs`.
|
|
8
|
-
* @returns The frozen HFS view (profile, apps, connections, ruleParams, slotOf, tierOf, ownerOf).
|
|
9
|
-
*/
|
|
10
4
|
export declare const loadHfs: (configUrl: string) => HfsView;
|
|
11
5
|
/**
|
|
12
6
|
* The HFS view of the root workspace packages of an app, judged by the laws of the be side: the managed root `eslint.config.mjs`
|
package/dist/lib/hfs.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { dirname } from "node:path";
|
|
15
15
|
import { fileURLToPath } from "node:url";
|
|
16
|
-
import { declaredHfsView, declaredPackagesHfsView, openHfsView, openPackagesHfsView } from "
|
|
16
|
+
import { declaredHfsView, declaredPackagesHfsView, openHfsView, openPackagesHfsView } from "@starci/hfs/runtime/scripts/hfs/view.mjs";
|
|
17
17
|
import { RUNTIME_ROOT as RUNTIME } from "./runtime-root.js";
|
|
18
18
|
/**
|
|
19
19
|
* The HFS view of the side whose `eslint.config.mjs` (in be/) calls this.
|
|
@@ -21,7 +21,9 @@ import { RUNTIME_ROOT as RUNTIME } from "./runtime-root.js";
|
|
|
21
21
|
* @param configUrl - `import.meta.url` of the repository's `eslint.config.mjs`.
|
|
22
22
|
* @returns The frozen HFS view (profile, apps, connections, ruleParams, slotOf, tierOf, ownerOf).
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
/** The view @starci/hfs returns, read through this package's own HfsView type (the runtime object is the same; the types are declared here). */
|
|
25
|
+
const asView = (view) => view;
|
|
26
|
+
export const loadHfs = (configUrl) => asView(openHfsView({ runtimeRoot: RUNTIME, repoRoot: dirname(fileURLToPath(configUrl)) }));
|
|
25
27
|
/**
|
|
26
28
|
* The HFS view of the root workspace packages of an app, judged by the laws of the be side: the managed root `eslint.config.mjs`
|
|
27
29
|
* (`packages/*` of the app root) calls this. Paths are the app's own; a package file is of the tier `package` and its owner is its folder.
|
|
@@ -29,7 +31,7 @@ export const loadHfs = (configUrl) => openHfsView({ runtimeRoot: RUNTIME, repoRo
|
|
|
29
31
|
* @param configUrl - `import.meta.url` of the app root's `eslint.config.mjs`.
|
|
30
32
|
* @returns The frozen HFS view (profile be over the paths of the app root).
|
|
31
33
|
*/
|
|
32
|
-
export const loadPackagesHfs = (configUrl) => openPackagesHfsView({ runtimeRoot: RUNTIME, repoRoot: dirname(fileURLToPath(configUrl)), side: "be" });
|
|
34
|
+
export const loadPackagesHfs = (configUrl) => asView(openPackagesHfsView({ runtimeRoot: RUNTIME, repoRoot: dirname(fileURLToPath(configUrl)), side: "be" }));
|
|
33
35
|
/**
|
|
34
36
|
* The HFS view of the root packages of an in-memory app declaration, for rule tests.
|
|
35
37
|
*
|
|
@@ -37,7 +39,7 @@ export const loadPackagesHfs = (configUrl) => openPackagesHfsView({ runtimeRoot:
|
|
|
37
39
|
* @param repoRoot - The absolute app root the linted filenames live under.
|
|
38
40
|
* @returns The frozen HFS view.
|
|
39
41
|
*/
|
|
40
|
-
export const packagesHfsFromDeclaration = (declaration, repoRoot) => declaredPackagesHfsView({ runtimeRoot: RUNTIME, declaration, repoRoot, side: "be" });
|
|
42
|
+
export const packagesHfsFromDeclaration = (declaration, repoRoot) => asView(declaredPackagesHfsView({ runtimeRoot: RUNTIME, declaration, repoRoot, side: "be" }));
|
|
41
43
|
/**
|
|
42
44
|
* The HFS view of the be side of an in-memory app declaration, for rule tests: no file is read except the shipped manifest.
|
|
43
45
|
*
|
|
@@ -45,7 +47,7 @@ export const packagesHfsFromDeclaration = (declaration, repoRoot) => declaredPac
|
|
|
45
47
|
* @param repoRoot - The absolute be side folder the linted filenames live under.
|
|
46
48
|
* @returns The frozen HFS view.
|
|
47
49
|
*/
|
|
48
|
-
export const hfsFromDeclaration = (declaration, repoRoot) => declaredHfsView({ runtimeRoot: RUNTIME, declaration, repoRoot, side: "be" });
|
|
50
|
+
export const hfsFromDeclaration = (declaration, repoRoot) => asView(declaredHfsView({ runtimeRoot: RUNTIME, declaration, repoRoot, side: "be" }));
|
|
49
51
|
/** Whether a settings value is an HFS view (it answers `slotOf`). */
|
|
50
52
|
const isHfsView = (value) => typeof value === "object" && value !== null && "slotOf" in value && typeof value.slotOf === "function";
|
|
51
53
|
/** The `settings.starci.hfs` value of a rule context, if any. */
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
/** The package root: the folder holding package.json, runtime/ and fixtures/. */
|
|
2
2
|
export declare const PACKAGE_ROOT: string;
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* The runtime of the installed @starci/hfs (its peer, a same-minor range): the slot manifest, the rule catalog, the canon pins and the architecture
|
|
5
|
+
* machine are read from it at run time, never from a copy bundled here, so an hfs data change releases hfs alone (decision release-only-what-changed).
|
|
6
|
+
*/
|
|
4
7
|
export declare const RUNTIME_ROOT: string;
|
|
8
|
+
/** The files this package keeps of its own in runtime/ (the project graph rule, the jsdoc and sonar helpers, the package-scripts template). */
|
|
9
|
+
export declare const OWN_RUNTIME_ROOT: string;
|
package/dist/lib/runtime-root.js
CHANGED
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
* The package root and its bundled `runtime/` folder. `src/` (run by the specs) and `dist/` (published) both sit one level below the
|
|
3
3
|
* package root, so the same relative step finds the runtime from either.
|
|
4
4
|
*/
|
|
5
|
+
import { createRequire } from "node:module";
|
|
5
6
|
import { dirname, join } from "node:path";
|
|
6
7
|
import { fileURLToPath } from "node:url";
|
|
7
8
|
/** The package root: the folder holding package.json, runtime/ and fixtures/. */
|
|
8
9
|
export const PACKAGE_ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
9
|
-
/**
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* The runtime of the installed @starci/hfs (its peer, a same-minor range): the slot manifest, the rule catalog, the canon pins and the architecture
|
|
12
|
+
* machine are read from it at run time, never from a copy bundled here, so an hfs data change releases hfs alone (decision release-only-what-changed).
|
|
13
|
+
*/
|
|
14
|
+
export const RUNTIME_ROOT = join(dirname(createRequire(import.meta.url).resolve("@starci/hfs/package.json")), "runtime");
|
|
15
|
+
/** The files this package keeps of its own in runtime/ (the project graph rule, the jsdoc and sonar helpers, the package-scripts template). */
|
|
16
|
+
export const OWN_RUNTIME_ROOT = join(PACKAGE_ROOT, "runtime");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import ts from "typescript";
|
|
4
|
-
import { functionSubjectExports, valueObjectSubjects } from "
|
|
4
|
+
import { functionSubjectExports, valueObjectSubjects } from "@starci/hfs/runtime/scripts/hfs/architecture/function-spec-providers.mjs";
|
|
5
5
|
import { importOf } from "./import-source.js";
|
|
6
6
|
import { typed } from "./types.js";
|
|
7
7
|
/** The exported real function of a function-only sibling subject, with aliases resolved by TypeScript. */
|
package/dist/module-layering.js
CHANGED
|
@@ -25,7 +25,7 @@ import { posix } from "node:path";
|
|
|
25
25
|
import { hfsOf } from "./lib/hfs.js";
|
|
26
26
|
import { baseName } from "./lib/ports.js";
|
|
27
27
|
import { resolveAlias } from "./lib/specifier.js";
|
|
28
|
-
import { ENTITY_REGISTRY_ROLE, registryImporter } from "
|
|
28
|
+
import { ENTITY_REGISTRY_ROLE, registryImporter } from "@starci/hfs/runtime/scripts/hfs/architecture/entity-registry.mjs";
|
|
29
29
|
/** The tiers whose files belong to an owner with a root `index.ts`. */
|
|
30
30
|
const OWNER_TIERS = new Set(["feature", "domain", "platform", "integrations"]);
|
|
31
31
|
/**
|
|
@@ -71,7 +71,7 @@ const indexExportBudget = (hfs, filename) => [hfs.slotOf(filename), `be.${hfs.ti
|
|
|
71
71
|
const importsRegistry = (hfs, filename, target) => {
|
|
72
72
|
const id = hfs.slotOf(`${target}.ts`);
|
|
73
73
|
const slot = id ? hfs.slot(id) : undefined;
|
|
74
|
-
return slot?.role === ENTITY_REGISTRY_ROLE && registryImporter(null, slot, hfs.relative(filename));
|
|
74
|
+
return slot?.role === ENTITY_REGISTRY_ROLE && registryImporter(null, { ...slot, importedBy: [...(slot.importedBy ?? [])] }, hfs.relative(filename));
|
|
75
75
|
};
|
|
76
76
|
/**
|
|
77
77
|
* A cross-owner import targets the owner's public entry: the alias and the owner, nothing deeper. A same-owner import
|
package/dist/project-graph.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* rules and their codes is `LINT_ENFORCERS` of the machine (scripts/hfs/architecture/surface.mjs); `starci app check` keeps the
|
|
8
8
|
* findings that have no TypeScript file to sit on. A graph that cannot be built stops the run with the machine's message.
|
|
9
9
|
*/
|
|
10
|
-
import { LINT_ENFORCERS, belongsTo, codeOf } from "
|
|
10
|
+
import { LINT_ENFORCERS, belongsTo, codeOf } from "@starci/hfs/runtime/scripts/hfs/architecture/surface.mjs";
|
|
11
11
|
import { projectGraph as buildProjectGraph, resetProjectGraphs } from "../runtime/scripts/hfs/project-graph.mjs";
|
|
12
12
|
import { projectRule } from "../runtime/scripts/hfs/project-rule.mjs";
|
|
13
13
|
import { hfsOf } from "./lib/hfs.js";
|
|
@@ -10,7 +10,7 @@ import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
|
10
10
|
import { isBuiltin } from "node:module";
|
|
11
11
|
import { dirname, join, resolve } from "node:path";
|
|
12
12
|
import ts from "typescript";
|
|
13
|
-
import { rootPackageNames } from "
|
|
13
|
+
import { rootPackageNames } from "@starci/hfs/runtime/scripts/hfs/architecture/root-packages.mjs";
|
|
14
14
|
import { hfsOf, inTestWorld } from "./lib/hfs.js";
|
|
15
15
|
import { moduleReferences } from "./lib/import-source.js";
|
|
16
16
|
import { isSpecFile } from "./lib/path.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starci/eslint-canon-be",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.0",
|
|
4
4
|
"description": "The StarCi back-end lint canon: every rule its laws publish, gathered as one flat-config plugin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"node": ">=22.13.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
+
"@starci/hfs": "~5.13.0",
|
|
43
44
|
"eslint": ">=9",
|
|
44
45
|
"typescript": ">=5.9"
|
|
45
46
|
},
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
"eslint-plugin-unicorn": "65.0.0"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
70
|
+
"@starci/hfs": "file:../hfs",
|
|
69
71
|
"@starci/tsconfig": "file:../tsconfig",
|
|
70
72
|
"@types/node": "24.19.2",
|
|
71
73
|
"eslint": "^9.18.0",
|
package/runtime/bundle.json
CHANGED
|
@@ -1,201 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generated": [
|
|
3
|
-
"config.example.yaml",
|
|
4
|
-
"engine/by-code-unit.mjs",
|
|
5
|
-
"engine/model-config.mjs",
|
|
6
|
-
"engine/orca-config.mjs",
|
|
7
|
-
"engine/plain-object.mjs",
|
|
8
|
-
"engine/release-config.mjs",
|
|
9
|
-
"engine/removed-vocabulary.mjs",
|
|
10
|
-
"engine/resources-config.mjs",
|
|
11
|
-
"engine/runtime-root.mjs",
|
|
12
|
-
"engine/secrets.mjs",
|
|
13
|
-
"engine/sonar-config.mjs",
|
|
14
|
-
"engine/temp-root.mjs",
|
|
15
|
-
"engine/yaml.mjs",
|
|
16
|
-
"knowledge/grammars/index.yaml",
|
|
17
|
-
"knowledge/hfs/canon-pins.yaml",
|
|
18
|
-
"knowledge/hfs/fe-stack.yaml",
|
|
19
|
-
"knowledge/hfs/rules.yaml",
|
|
20
|
-
"knowledge/patterns/fe/folder.yaml",
|
|
21
|
-
"knowledge/sonar-gate.yaml",
|
|
22
|
-
"modules/kernel/removed-vocabulary.yaml",
|
|
23
|
-
"modules/models/registry.yaml",
|
|
24
|
-
"modules/models/runtimes.yaml",
|
|
25
|
-
"modules/models/tiers.yaml",
|
|
26
|
-
"scripts/api/git/cat-file.mjs",
|
|
27
|
-
"scripts/api/git/config-get.mjs",
|
|
28
|
-
"scripts/api/git/diff.mjs",
|
|
29
|
-
"scripts/api/git/lib.mjs",
|
|
30
|
-
"scripts/api/git/ls-files.mjs",
|
|
31
|
-
"scripts/api/git/ls-tree.mjs",
|
|
32
|
-
"scripts/api/git/merge-base.mjs",
|
|
33
|
-
"scripts/api/git/remote.mjs",
|
|
34
|
-
"scripts/api/git/rev-parse-query.mjs",
|
|
35
|
-
"scripts/api/git/show.mjs",
|
|
36
|
-
"scripts/api/git/tag.mjs",
|
|
37
|
-
"scripts/hfs/allows.mjs",
|
|
38
|
-
"scripts/hfs/architecture/ast-walks.mjs",
|
|
39
|
-
"scripts/hfs/architecture/automatic-gates.mjs",
|
|
40
|
-
"scripts/hfs/architecture/backend-app-files.mjs",
|
|
41
|
-
"scripts/hfs/architecture/backend.mjs",
|
|
42
|
-
"scripts/hfs/architecture/background-unowned.mjs",
|
|
43
|
-
"scripts/hfs/architecture/canon-clones.mjs",
|
|
44
|
-
"scripts/hfs/architecture/canon-jsx-clones.mjs",
|
|
45
|
-
"scripts/hfs/architecture/client-reaches-server.mjs",
|
|
46
|
-
"scripts/hfs/architecture/clones.mjs",
|
|
47
|
-
"scripts/hfs/architecture/component-tiers.mjs",
|
|
48
|
-
"scripts/hfs/architecture/config-unread.mjs",
|
|
49
|
-
"scripts/hfs/architecture/config.mjs",
|
|
50
|
-
"scripts/hfs/architecture/connection-map.mjs",
|
|
51
|
-
"scripts/hfs/architecture/constructor-deps.mjs",
|
|
52
|
-
"scripts/hfs/architecture/context-coupling.mjs",
|
|
53
|
-
"scripts/hfs/architecture/context-map.mjs",
|
|
54
|
-
"scripts/hfs/architecture/context-owner.mjs",
|
|
55
|
-
"scripts/hfs/architecture/context-platform-tables.mjs",
|
|
56
|
-
"scripts/hfs/architecture/context-transaction.mjs",
|
|
57
|
-
"scripts/hfs/architecture/contract-bounds.mjs",
|
|
58
|
-
"scripts/hfs/architecture/contract-fixture-guard.mjs",
|
|
59
|
-
"scripts/hfs/architecture/contracts-readonly.mjs",
|
|
60
|
-
"scripts/hfs/architecture/contracts.mjs",
|
|
61
|
-
"scripts/hfs/architecture/cross-app-duplicate.mjs",
|
|
62
|
-
"scripts/hfs/architecture/dead-exports-bindings.mjs",
|
|
63
|
-
"scripts/hfs/architecture/dead-exports.mjs",
|
|
64
|
-
"scripts/hfs/architecture/default-deny.mjs",
|
|
65
|
-
"scripts/hfs/architecture/doc-language.mjs",
|
|
66
|
-
"scripts/hfs/architecture/entity-registry.mjs",
|
|
67
|
-
"scripts/hfs/architecture/entrypoint.mjs",
|
|
68
|
-
"scripts/hfs/architecture/error-codes.mjs",
|
|
69
|
-
"scripts/hfs/architecture/error-masked.mjs",
|
|
70
|
-
"scripts/hfs/architecture/fe-slot-allows.mjs",
|
|
71
|
-
"scripts/hfs/architecture/feature-shape.mjs",
|
|
72
|
-
"scripts/hfs/architecture/framework-pinned.mjs",
|
|
73
|
-
"scripts/hfs/architecture/frontend-block-render.mjs",
|
|
74
|
-
"scripts/hfs/architecture/frontend-grammar.mjs",
|
|
75
|
-
"scripts/hfs/architecture/frontend-routing.mjs",
|
|
76
|
-
"scripts/hfs/architecture/frontend-world-render.mjs",
|
|
77
|
-
"scripts/hfs/architecture/frontend-world.mjs",
|
|
78
|
-
"scripts/hfs/architecture/frontend.mjs",
|
|
79
|
-
"scripts/hfs/architecture/function-spec-providers.mjs",
|
|
80
|
-
"scripts/hfs/architecture/hfs-graph.mjs",
|
|
81
|
-
"scripts/hfs/architecture/hooks-are-hooks.mjs",
|
|
82
|
-
"scripts/hfs/architecture/i18n-keys.mjs",
|
|
83
|
-
"scripts/hfs/architecture/identity.mjs",
|
|
84
|
-
"scripts/hfs/architecture/index.mjs",
|
|
85
|
-
"scripts/hfs/architecture/injection-token-exported.mjs",
|
|
86
|
-
"scripts/hfs/architecture/jwt-ast.mjs",
|
|
87
|
-
"scripts/hfs/architecture/machine-ast.mjs",
|
|
88
|
-
"scripts/hfs/architecture/managed-scripts.mjs",
|
|
89
|
-
"scripts/hfs/architecture/module-per-transport.mjs",
|
|
90
|
-
"scripts/hfs/architecture/next-data-contract.mjs",
|
|
91
|
-
"scripts/hfs/architecture/next-data-inference.mjs",
|
|
92
|
-
"scripts/hfs/architecture/next-data-key.mjs",
|
|
93
|
-
"scripts/hfs/architecture/next-data-symbols.mjs",
|
|
94
|
-
"scripts/hfs/architecture/next-data.mjs",
|
|
95
|
-
"scripts/hfs/architecture/operation-contract-roots.mjs",
|
|
96
|
-
"scripts/hfs/architecture/owners.mjs",
|
|
97
|
-
"scripts/hfs/architecture/package-shape.mjs",
|
|
98
|
-
"scripts/hfs/architecture/presentation.mjs",
|
|
99
|
-
"scripts/hfs/architecture/reachability.mjs",
|
|
100
|
-
"scripts/hfs/architecture/register-once.mjs",
|
|
101
|
-
"scripts/hfs/architecture/registration.mjs",
|
|
102
|
-
"scripts/hfs/architecture/render-graph.mjs",
|
|
103
|
-
"scripts/hfs/architecture/render-prop-across-server.mjs",
|
|
104
|
-
"scripts/hfs/architecture/required-files.mjs",
|
|
105
|
-
"scripts/hfs/architecture/root-packages.mjs",
|
|
106
|
-
"scripts/hfs/architecture/route-files-thin.mjs",
|
|
107
|
-
"scripts/hfs/architecture/schema-owner.mjs",
|
|
108
|
-
"scripts/hfs/architecture/server-action.mjs",
|
|
109
|
-
"scripts/hfs/architecture/side-boundary.mjs",
|
|
110
|
-
"scripts/hfs/architecture/source-names-shape.mjs",
|
|
111
|
-
"scripts/hfs/architecture/source-names.mjs",
|
|
112
|
-
"scripts/hfs/architecture/sql-keys.mjs",
|
|
113
|
-
"scripts/hfs/architecture/sql-owner.mjs",
|
|
114
|
-
"scripts/hfs/architecture/sql-returning.mjs",
|
|
115
|
-
"scripts/hfs/architecture/sql-token-forms.mjs",
|
|
116
|
-
"scripts/hfs/architecture/sql-tokens.mjs",
|
|
117
|
-
"scripts/hfs/architecture/staged-consumers.mjs",
|
|
118
|
-
"scripts/hfs/architecture/surface-nesting.mjs",
|
|
119
|
-
"scripts/hfs/architecture/surface.mjs",
|
|
120
|
-
"scripts/hfs/architecture/symbols.mjs",
|
|
121
|
-
"scripts/hfs/architecture/test-world-files.mjs",
|
|
122
|
-
"scripts/hfs/architecture/tiers.mjs",
|
|
123
|
-
"scripts/hfs/architecture/transport-owner.mjs",
|
|
124
|
-
"scripts/hfs/architecture/type-context.mjs",
|
|
125
|
-
"scripts/hfs/architecture/typescript.mjs",
|
|
126
|
-
"scripts/hfs/architecture/unit-spec-providers.mjs",
|
|
127
|
-
"scripts/hfs/declaration-shape.mjs",
|
|
128
|
-
"scripts/hfs/declaration-slots.mjs",
|
|
129
|
-
"scripts/hfs/edition-slots.mjs",
|
|
130
|
-
"scripts/hfs/explicit-surface-rule.mjs",
|
|
131
|
-
"scripts/hfs/linear-text.mjs",
|
|
132
|
-
"scripts/hfs/param-names.mjs",
|
|
133
|
-
"scripts/hfs/path-findings.mjs",
|
|
134
|
-
"scripts/hfs/repo-identity.mjs",
|
|
135
|
-
"scripts/hfs/rule-catalog.mjs",
|
|
136
|
-
"scripts/hfs/rule-params-shape.mjs",
|
|
137
|
-
"scripts/hfs/rules/database-migrations.mjs",
|
|
138
|
-
"scripts/hfs/rules/fe-no-tests.mjs",
|
|
139
|
-
"scripts/hfs/rules/read.mjs",
|
|
140
|
-
"scripts/hfs/rules/spec-placement.mjs",
|
|
141
|
-
"scripts/hfs/slot-app-view.mjs",
|
|
142
|
-
"scripts/hfs/slot-classify.mjs",
|
|
143
|
-
"scripts/hfs/slot-errors.mjs",
|
|
144
|
-
"scripts/hfs/slot-imports.mjs",
|
|
145
|
-
"scripts/hfs/slot-manifest-shape.mjs",
|
|
146
|
-
"scripts/hfs/slot-match.mjs",
|
|
147
|
-
"scripts/hfs/slot-path.mjs",
|
|
148
|
-
"scripts/hfs/slot-required.mjs",
|
|
149
|
-
"scripts/hfs/slot-semantic-problems.mjs",
|
|
150
|
-
"scripts/hfs/slot-side-problems.mjs",
|
|
151
|
-
"scripts/hfs/slots.mjs",
|
|
152
|
-
"scripts/hfs/test-world-slot.mjs",
|
|
153
|
-
"scripts/hfs/trailing-slashes.mjs",
|
|
154
|
-
"scripts/hfs/typescript-programs.mjs",
|
|
155
|
-
"scripts/hfs/view.mjs",
|
|
156
|
-
"scripts/lib/declaration-surface.mjs",
|
|
157
|
-
"scripts/lib/dockerfile.mjs",
|
|
158
|
-
"scripts/lib/env.mjs",
|
|
159
|
-
"scripts/lib/event-contract.mjs",
|
|
160
|
-
"scripts/lib/git.mjs",
|
|
161
|
-
"scripts/lib/glob.mjs",
|
|
162
|
-
"scripts/lib/grammar-lint.mjs",
|
|
163
|
-
"scripts/lib/i18n.mjs",
|
|
164
|
-
"scripts/lib/in-order.mjs",
|
|
165
|
-
"scripts/lib/json-clone.mjs",
|
|
166
|
-
"scripts/lib/json.mjs",
|
|
167
|
-
"scripts/lib/language.mjs",
|
|
168
|
-
"scripts/lib/list.mjs",
|
|
169
|
-
"scripts/lib/mutation-fence.mjs",
|
|
170
|
-
"scripts/lib/path-key.mjs",
|
|
171
|
-
"scripts/lib/read-text.mjs",
|
|
172
|
-
"scripts/lib/regex.mjs",
|
|
173
|
-
"scripts/lib/rule-packs.mjs",
|
|
174
|
-
"scripts/lib/same-text.mjs",
|
|
175
|
-
"scripts/lib/sops-envelope.mjs",
|
|
176
|
-
"scripts/lib/stack-services.mjs",
|
|
177
|
-
"scripts/lib/ts-analysis.mjs",
|
|
178
|
-
"scripts/lib/ts-ast.mjs",
|
|
179
|
-
"scripts/lib/walk.mjs",
|
|
180
|
-
"scripts/lib/yaml-cached.mjs"
|
|
181
|
-
],
|
|
2
|
+
"generated": [],
|
|
182
3
|
"own": [
|
|
183
|
-
"engine/config.mjs",
|
|
184
|
-
"engine/invalid-config.mjs",
|
|
185
|
-
"knowledge/hfs/slots.yaml",
|
|
186
4
|
"packages/hfs/templates/app/package-scripts/package.json",
|
|
187
5
|
"scripts/api/git/recorded-lines.mjs",
|
|
188
|
-
"scripts/hfs/architecture/hfs.mjs",
|
|
189
|
-
"scripts/hfs/manifest-shape.mjs",
|
|
190
6
|
"scripts/hfs/project-graph.mjs",
|
|
191
7
|
"scripts/hfs/project-rule.mjs",
|
|
192
|
-
"scripts/hfs/rules/database-constants.mjs",
|
|
193
|
-
"scripts/hfs/rules/secrets.mjs",
|
|
194
|
-
"scripts/lib/git-hooks-dir.mjs",
|
|
195
8
|
"scripts/lib/jsdoc.mjs",
|
|
196
9
|
"scripts/lib/line-count.mjs",
|
|
197
|
-
"scripts/lib/package-at.mjs",
|
|
198
|
-
"scripts/lib/secret-patterns.mjs",
|
|
199
10
|
"scripts/lib/sonar-syntax-rules.mjs",
|
|
200
11
|
"scripts/lib/sonar-way.mjs"
|
|
201
12
|
]
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// size-growth rule compares the working file with.
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { existsSync } from 'node:fs';
|
|
5
|
-
import { runGit } from '
|
|
6
|
-
import { mergeBase } from '
|
|
7
|
-
import { withoutGitLocalEnv } from '
|
|
5
|
+
import { runGit } from '@starci/hfs/runtime/scripts/api/git/lib.mjs';
|
|
6
|
+
import { mergeBase } from '@starci/hfs/runtime/scripts/api/git/merge-base.mjs';
|
|
7
|
+
import { withoutGitLocalEnv } from '@starci/hfs/runtime/scripts/lib/git.mjs';
|
|
8
8
|
import { lineCount } from '../../lib/line-count.mjs';
|
|
9
|
-
import { readEnv } from '
|
|
10
|
-
import { folded } from '
|
|
9
|
+
import { readEnv } from '@starci/hfs/runtime/scripts/lib/env.mjs';
|
|
10
|
+
import { folded } from '@starci/hfs/runtime/scripts/lib/event-contract.mjs';
|
|
11
11
|
|
|
12
12
|
const ok = (result) => !result.error && result.status === 0;
|
|
13
13
|
const pathKey = (value) => process.platform === 'win32' ? value.toLowerCase() : value;
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
// A graph that cannot be built (no tsconfig, unresolvable import, invalid declaration) is an error: a check that cannot run is
|
|
14
14
|
// never a pass, so `projectGraph` throws the machine's own message and the lint run stops.
|
|
15
15
|
import fs from 'node:fs';
|
|
16
|
-
import { checkArchitecture } from '
|
|
17
|
-
import { openHfs } from '
|
|
18
|
-
import { pathFindings } from '
|
|
19
|
-
import { lsFiles } from '
|
|
20
|
-
import { posixPath } from '
|
|
21
|
-
import { onLintSurface } from '
|
|
16
|
+
import { checkArchitecture } from '@starci/hfs/runtime/scripts/hfs/architecture/index.mjs';
|
|
17
|
+
import { openHfs } from '@starci/hfs/runtime/scripts/hfs/slots.mjs';
|
|
18
|
+
import { pathFindings } from '@starci/hfs/runtime/scripts/hfs/path-findings.mjs';
|
|
19
|
+
import { lsFiles } from '@starci/hfs/runtime/scripts/api/git/ls-files.mjs';
|
|
20
|
+
import { posixPath } from '@starci/hfs/runtime/scripts/lib/path-key.mjs';
|
|
21
|
+
import { onLintSurface } from '@starci/hfs/runtime/scripts/hfs/architecture/surface.mjs';
|
|
22
22
|
|
|
23
23
|
const cache = new Map();
|
|
24
24
|
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
// Both lint canons ship a byte copy of this file in runtime/ and build their rules with it.
|
|
9
9
|
import path from 'node:path';
|
|
10
10
|
import { projectGraph } from './project-graph.mjs';
|
|
11
|
-
import { posixPath } from '
|
|
12
|
-
import { belongsTo, codeOf } from '
|
|
11
|
+
import { posixPath } from '@starci/hfs/runtime/scripts/lib/path-key.mjs';
|
|
12
|
+
import { belongsTo, codeOf } from '@starci/hfs/runtime/scripts/hfs/architecture/surface.mjs';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* A rule reporting the graph findings of `codes` on the linted file.
|
|
@@ -23,7 +23,7 @@ export const projectRule = ({ enforcer, runtimeRoot, hfsOf }) => {
|
|
|
23
23
|
create(context) {
|
|
24
24
|
const hfs = hfsOf(context);
|
|
25
25
|
const rel = posixPath(path.relative(hfs.repoRoot, context.filename));
|
|
26
|
-
if (rel.startsWith('
|
|
26
|
+
if (rel.startsWith('@starci/hfs/runtime/scripts')) return {};
|
|
27
27
|
const { byFile } = projectGraph({ repoRoot: hfs.repoRoot, runtimeRoot: context.settings?.starci?.injectedRuntimeRoot ?? runtimeRoot, injectedTypeScript: context.settings?.starci?.injectedTypeScript?.() });
|
|
28
28
|
const mine = (byFile.get(rel) ?? []).filter((finding) => belongsTo(enforcer, finding));
|
|
29
29
|
return {
|