@endora-commerce/cli 0.100.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/LICENSE +21 -0
- package/README.md +37 -0
- package/dist/bin/endora.d.ts +28 -0
- package/dist/bin/endora.d.ts.map +1 -0
- package/dist/bin/endora.js +926 -0
- package/dist/bin/endora.js.map +1 -0
- package/dist/check/estate.d.ts +189 -0
- package/dist/check/estate.d.ts.map +1 -0
- package/dist/check/estate.js +1037 -0
- package/dist/check/estate.js.map +1 -0
- package/dist/check/hosts.d.ts +25 -0
- package/dist/check/hosts.d.ts.map +1 -0
- package/dist/check/hosts.js +1347 -0
- package/dist/check/hosts.js.map +1 -0
- package/dist/check/index.d.ts +60 -0
- package/dist/check/index.d.ts.map +1 -0
- package/dist/check/index.js +111 -0
- package/dist/check/index.js.map +1 -0
- package/dist/check/layout.d.ts +136 -0
- package/dist/check/layout.d.ts.map +1 -0
- package/dist/check/layout.js +262 -0
- package/dist/check/layout.js.map +1 -0
- package/dist/check/ledger.d.ts +98 -0
- package/dist/check/ledger.d.ts.map +1 -0
- package/dist/check/ledger.js +173 -0
- package/dist/check/ledger.js.map +1 -0
- package/dist/check/peer-owners.d.ts +116 -0
- package/dist/check/peer-owners.d.ts.map +1 -0
- package/dist/check/peer-owners.js +225 -0
- package/dist/check/peer-owners.js.map +1 -0
- package/dist/check/report.d.ts +33 -0
- package/dist/check/report.d.ts.map +1 -0
- package/dist/check/report.js +107 -0
- package/dist/check/report.js.map +1 -0
- package/dist/check/run.d.ts +147 -0
- package/dist/check/run.d.ts.map +1 -0
- package/dist/check/run.js +111 -0
- package/dist/check/run.js.map +1 -0
- package/dist/checks.d.ts +17 -0
- package/dist/checks.d.ts.map +1 -0
- package/dist/checks.js +17 -0
- package/dist/checks.js.map +1 -0
- package/dist/dev/index.d.ts +83 -0
- package/dist/dev/index.d.ts.map +1 -0
- package/dist/dev/index.js +298 -0
- package/dist/dev/index.js.map +1 -0
- package/dist/generate/divergence.d.ts +38 -0
- package/dist/generate/divergence.d.ts.map +1 -0
- package/dist/generate/divergence.js +237 -0
- package/dist/generate/divergence.js.map +1 -0
- package/dist/generate/index.d.ts +90 -0
- package/dist/generate/index.d.ts.map +1 -0
- package/dist/generate/index.js +369 -0
- package/dist/generate/index.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/inputs/declaration.d.ts +18 -0
- package/dist/inputs/declaration.d.ts.map +1 -0
- package/dist/inputs/declaration.js +64 -0
- package/dist/inputs/declaration.js.map +1 -0
- package/dist/inputs/env-file.d.ts +73 -0
- package/dist/inputs/env-file.d.ts.map +1 -0
- package/dist/inputs/env-file.js +134 -0
- package/dist/inputs/env-file.js.map +1 -0
- package/dist/inputs/prompt.d.ts +21 -0
- package/dist/inputs/prompt.d.ts.map +1 -0
- package/dist/inputs/prompt.js +59 -0
- package/dist/inputs/prompt.js.map +1 -0
- package/dist/inputs/resolve.d.ts +163 -0
- package/dist/inputs/resolve.d.ts.map +1 -0
- package/dist/inputs/resolve.js +290 -0
- package/dist/inputs/resolve.js.map +1 -0
- package/dist/install/host.d.ts +27 -0
- package/dist/install/host.d.ts.map +1 -0
- package/dist/install/host.js +90 -0
- package/dist/install/host.js.map +1 -0
- package/dist/install/index.d.ts +173 -0
- package/dist/install/index.d.ts.map +1 -0
- package/dist/install/index.js +793 -0
- package/dist/install/index.js.map +1 -0
- package/dist/install/wizard.d.ts +144 -0
- package/dist/install/wizard.d.ts.map +1 -0
- package/dist/install/wizard.js +362 -0
- package/dist/install/wizard.js.map +1 -0
- package/dist/lib/admin-artefacts.d.ts +70 -0
- package/dist/lib/admin-artefacts.d.ts.map +1 -0
- package/dist/lib/admin-artefacts.js +354 -0
- package/dist/lib/admin-artefacts.js.map +1 -0
- package/dist/lib/admin-surfaces.d.ts +298 -0
- package/dist/lib/admin-surfaces.d.ts.map +1 -0
- package/dist/lib/admin-surfaces.js +669 -0
- package/dist/lib/admin-surfaces.js.map +1 -0
- package/dist/lib/delegated-composer.d.ts +85 -0
- package/dist/lib/delegated-composer.d.ts.map +1 -0
- package/dist/lib/delegated-composer.js +241 -0
- package/dist/lib/delegated-composer.js.map +1 -0
- package/dist/lib/divergence-artefacts.d.ts +305 -0
- package/dist/lib/divergence-artefacts.d.ts.map +1 -0
- package/dist/lib/divergence-artefacts.js +828 -0
- package/dist/lib/divergence-artefacts.js.map +1 -0
- package/dist/lib/divergence.d.ts +337 -0
- package/dist/lib/divergence.d.ts.map +1 -0
- package/dist/lib/divergence.js +1005 -0
- package/dist/lib/divergence.js.map +1 -0
- package/dist/lib/docs-artefacts.d.ts +395 -0
- package/dist/lib/docs-artefacts.d.ts.map +1 -0
- package/dist/lib/docs-artefacts.js +781 -0
- package/dist/lib/docs-artefacts.js.map +1 -0
- package/dist/lib/emitted-exports.d.ts +21 -0
- package/dist/lib/emitted-exports.d.ts.map +1 -0
- package/dist/lib/emitted-exports.js +96 -0
- package/dist/lib/emitted-exports.js.map +1 -0
- package/dist/lib/emitted-freshness.d.ts +112 -0
- package/dist/lib/emitted-freshness.d.ts.map +1 -0
- package/dist/lib/emitted-freshness.js +288 -0
- package/dist/lib/emitted-freshness.js.map +1 -0
- package/dist/lib/entity-index-artefact.d.ts +95 -0
- package/dist/lib/entity-index-artefact.d.ts.map +1 -0
- package/dist/lib/entity-index-artefact.js +210 -0
- package/dist/lib/entity-index-artefact.js.map +1 -0
- package/dist/lib/instance-build-inputs.d.ts +108 -0
- package/dist/lib/instance-build-inputs.d.ts.map +1 -0
- package/dist/lib/instance-build-inputs.js +165 -0
- package/dist/lib/instance-build-inputs.js.map +1 -0
- package/dist/lib/module-docs.d.ts +473 -0
- package/dist/lib/module-docs.d.ts.map +1 -0
- package/dist/lib/module-docs.js +711 -0
- package/dist/lib/module-docs.js.map +1 -0
- package/dist/lib/module-package-subpaths.d.ts +56 -0
- package/dist/lib/module-package-subpaths.d.ts.map +1 -0
- package/dist/lib/module-package-subpaths.js +223 -0
- package/dist/lib/module-package-subpaths.js.map +1 -0
- package/dist/lib/module-packages.d.ts +200 -0
- package/dist/lib/module-packages.d.ts.map +1 -0
- package/dist/lib/module-packages.js +580 -0
- package/dist/lib/module-packages.js.map +1 -0
- package/dist/lib/module-population.d.ts +129 -0
- package/dist/lib/module-population.d.ts.map +1 -0
- package/dist/lib/module-population.js +172 -0
- package/dist/lib/module-population.js.map +1 -0
- package/dist/lib/module-roots.d.ts +337 -0
- package/dist/lib/module-roots.d.ts.map +1 -0
- package/dist/lib/module-roots.js +586 -0
- package/dist/lib/module-roots.js.map +1 -0
- package/dist/lib/nested-checkouts.d.ts +33 -0
- package/dist/lib/nested-checkouts.d.ts.map +1 -0
- package/dist/lib/nested-checkouts.js +160 -0
- package/dist/lib/nested-checkouts.js.map +1 -0
- package/dist/lib/platform-root.d.ts +43 -0
- package/dist/lib/platform-root.d.ts.map +1 -0
- package/dist/lib/platform-root.js +134 -0
- package/dist/lib/platform-root.js.map +1 -0
- package/dist/lib/platform-surface.d.ts +235 -0
- package/dist/lib/platform-surface.d.ts.map +1 -0
- package/dist/lib/platform-surface.js +393 -0
- package/dist/lib/platform-surface.js.map +1 -0
- package/dist/lib/port-registrations.d.ts +223 -0
- package/dist/lib/port-registrations.d.ts.map +1 -0
- package/dist/lib/port-registrations.js +532 -0
- package/dist/lib/port-registrations.js.map +1 -0
- package/dist/lib/read-size.d.ts +154 -0
- package/dist/lib/read-size.d.ts.map +1 -0
- package/dist/lib/read-size.js +182 -0
- package/dist/lib/read-size.js.map +1 -0
- package/dist/lib/registration-owners.d.ts +79 -0
- package/dist/lib/registration-owners.d.ts.map +1 -0
- package/dist/lib/registration-owners.js +77 -0
- package/dist/lib/registration-owners.js.map +1 -0
- package/dist/lib/release-index.d.ts +53 -0
- package/dist/lib/release-index.d.ts.map +1 -0
- package/dist/lib/release-index.js +162 -0
- package/dist/lib/release-index.js.map +1 -0
- package/dist/lib/repeating-timers.d.ts +79 -0
- package/dist/lib/repeating-timers.d.ts.map +1 -0
- package/dist/lib/repeating-timers.js +189 -0
- package/dist/lib/repeating-timers.js.map +1 -0
- package/dist/lib/source-text.d.ts +34 -0
- package/dist/lib/source-text.d.ts.map +1 -0
- package/dist/lib/source-text.js +80 -0
- package/dist/lib/source-text.js.map +1 -0
- package/dist/lib/specifiers.d.ts +20 -0
- package/dist/lib/specifiers.d.ts.map +1 -0
- package/dist/lib/specifiers.js +130 -0
- package/dist/lib/specifiers.js.map +1 -0
- package/dist/lib/sql-tables.d.ts +166 -0
- package/dist/lib/sql-tables.d.ts.map +1 -0
- package/dist/lib/sql-tables.js +464 -0
- package/dist/lib/sql-tables.js.map +1 -0
- package/dist/lib/switchable-modules.d.ts +54 -0
- package/dist/lib/switchable-modules.d.ts.map +1 -0
- package/dist/lib/switchable-modules.js +104 -0
- package/dist/lib/switchable-modules.js.map +1 -0
- package/dist/lib/tailwind-sources.d.ts +136 -0
- package/dist/lib/tailwind-sources.d.ts.map +1 -0
- package/dist/lib/tailwind-sources.js +307 -0
- package/dist/lib/tailwind-sources.js.map +1 -0
- package/dist/lib/ui-layer.d.ts +54 -0
- package/dist/lib/ui-layer.d.ts.map +1 -0
- package/dist/lib/ui-layer.js +57 -0
- package/dist/lib/ui-layer.js.map +1 -0
- package/dist/lib/workspace-packages.d.ts +186 -0
- package/dist/lib/workspace-packages.d.ts.map +1 -0
- package/dist/lib/workspace-packages.js +351 -0
- package/dist/lib/workspace-packages.js.map +1 -0
- package/dist/new-instance/deploy.d.ts +211 -0
- package/dist/new-instance/deploy.d.ts.map +1 -0
- package/dist/new-instance/deploy.js +1381 -0
- package/dist/new-instance/deploy.js.map +1 -0
- package/dist/new-instance/docs-toolchain.d.ts +66 -0
- package/dist/new-instance/docs-toolchain.d.ts.map +1 -0
- package/dist/new-instance/docs-toolchain.js +69 -0
- package/dist/new-instance/docs-toolchain.js.map +1 -0
- package/dist/new-instance/host.d.ts +124 -0
- package/dist/new-instance/host.d.ts.map +1 -0
- package/dist/new-instance/host.js +276 -0
- package/dist/new-instance/host.js.map +1 -0
- package/dist/new-instance/index.d.ts +118 -0
- package/dist/new-instance/index.d.ts.map +1 -0
- package/dist/new-instance/index.js +567 -0
- package/dist/new-instance/index.js.map +1 -0
- package/dist/new-instance/modules.d.ts +188 -0
- package/dist/new-instance/modules.d.ts.map +1 -0
- package/dist/new-instance/modules.js +392 -0
- package/dist/new-instance/modules.js.map +1 -0
- package/dist/new-instance/template.d.ts +505 -0
- package/dist/new-instance/template.d.ts.map +1 -0
- package/dist/new-instance/template.js +1886 -0
- package/dist/new-instance/template.js.map +1 -0
- package/dist/new-module/emit.d.ts +67 -0
- package/dist/new-module/emit.d.ts.map +1 -0
- package/dist/new-module/emit.js +1393 -0
- package/dist/new-module/emit.js.map +1 -0
- package/dist/new-module/host.d.ts +67 -0
- package/dist/new-module/host.d.ts.map +1 -0
- package/dist/new-module/host.js +224 -0
- package/dist/new-module/host.js.map +1 -0
- package/dist/new-module/index.d.ts +32 -0
- package/dist/new-module/index.d.ts.map +1 -0
- package/dist/new-module/index.js +193 -0
- package/dist/new-module/index.js.map +1 -0
- package/dist/new-module/spec.d.ts +188 -0
- package/dist/new-module/spec.d.ts.map +1 -0
- package/dist/new-module/spec.js +404 -0
- package/dist/new-module/spec.js.map +1 -0
- package/dist/new-module/text.d.ts +15 -0
- package/dist/new-module/text.d.ts.map +1 -0
- package/dist/new-module/text.js +22 -0
- package/dist/new-module/text.js.map +1 -0
- package/dist/new-storefront/dockerfile.d.ts +20 -0
- package/dist/new-storefront/dockerfile.d.ts.map +1 -0
- package/dist/new-storefront/dockerfile.js +131 -0
- package/dist/new-storefront/dockerfile.js.map +1 -0
- package/dist/new-storefront/gitignore.d.ts +23 -0
- package/dist/new-storefront/gitignore.d.ts.map +1 -0
- package/dist/new-storefront/gitignore.js +39 -0
- package/dist/new-storefront/gitignore.js.map +1 -0
- package/dist/new-storefront/index.d.ts +93 -0
- package/dist/new-storefront/index.d.ts.map +1 -0
- package/dist/new-storefront/index.js +329 -0
- package/dist/new-storefront/index.js.map +1 -0
- package/dist/new-storefront/npmrc.d.ts +98 -0
- package/dist/new-storefront/npmrc.d.ts.map +1 -0
- package/dist/new-storefront/npmrc.js +217 -0
- package/dist/new-storefront/npmrc.js.map +1 -0
- package/dist/new-storefront/reference.d.ts +189 -0
- package/dist/new-storefront/reference.d.ts.map +1 -0
- package/dist/new-storefront/reference.js +430 -0
- package/dist/new-storefront/reference.js.map +1 -0
- package/dist/new-storefront/rewrite.d.ts +171 -0
- package/dist/new-storefront/rewrite.d.ts.map +1 -0
- package/dist/new-storefront/rewrite.js +701 -0
- package/dist/new-storefront/rewrite.js.map +1 -0
- package/dist/release-index.json +284 -0
- package/dist/rules/action-route-permissions.d.ts +141 -0
- package/dist/rules/action-route-permissions.d.ts.map +1 -0
- package/dist/rules/action-route-permissions.js +556 -0
- package/dist/rules/action-route-permissions.js.map +1 -0
- package/dist/rules/bundle-pairing.d.ts +74 -0
- package/dist/rules/bundle-pairing.d.ts.map +1 -0
- package/dist/rules/bundle-pairing.js +281 -0
- package/dist/rules/bundle-pairing.js.map +1 -0
- package/dist/rules/channel-resolution.d.ts +17 -0
- package/dist/rules/channel-resolution.d.ts.map +1 -0
- package/dist/rules/channel-resolution.js +382 -0
- package/dist/rules/channel-resolution.js.map +1 -0
- package/dist/rules/command-coverage.d.ts +210 -0
- package/dist/rules/command-coverage.d.ts.map +1 -0
- package/dist/rules/command-coverage.js +714 -0
- package/dist/rules/command-coverage.js.map +1 -0
- package/dist/rules/container-imports.d.ts +60 -0
- package/dist/rules/container-imports.d.ts.map +1 -0
- package/dist/rules/container-imports.js +158 -0
- package/dist/rules/container-imports.js.map +1 -0
- package/dist/rules/default-language-prose.d.ts +212 -0
- package/dist/rules/default-language-prose.d.ts.map +1 -0
- package/dist/rules/default-language-prose.js +710 -0
- package/dist/rules/default-language-prose.js.map +1 -0
- package/dist/rules/diacritic-folds.d.ts +238 -0
- package/dist/rules/diacritic-folds.d.ts.map +1 -0
- package/dist/rules/diacritic-folds.js +681 -0
- package/dist/rules/diacritic-folds.js.map +1 -0
- package/dist/rules/entity-tenant-classification.d.ts +171 -0
- package/dist/rules/entity-tenant-classification.d.ts.map +1 -0
- package/dist/rules/entity-tenant-classification.js +323 -0
- package/dist/rules/entity-tenant-classification.js.map +1 -0
- package/dist/rules/entry-presence.d.ts +142 -0
- package/dist/rules/entry-presence.d.ts.map +1 -0
- package/dist/rules/entry-presence.js +339 -0
- package/dist/rules/entry-presence.js.map +1 -0
- package/dist/rules/entry-scope.d.ts +91 -0
- package/dist/rules/entry-scope.d.ts.map +1 -0
- package/dist/rules/entry-scope.js +404 -0
- package/dist/rules/entry-scope.js.map +1 -0
- package/dist/rules/env-inputs.d.ts +222 -0
- package/dist/rules/env-inputs.d.ts.map +1 -0
- package/dist/rules/env-inputs.js +951 -0
- package/dist/rules/env-inputs.js.map +1 -0
- package/dist/rules/kernel-boundary.d.ts +37 -0
- package/dist/rules/kernel-boundary.d.ts.map +1 -0
- package/dist/rules/kernel-boundary.js +195 -0
- package/dist/rules/kernel-boundary.js.map +1 -0
- package/dist/rules/nul-bytes.d.ts +233 -0
- package/dist/rules/nul-bytes.d.ts.map +1 -0
- package/dist/rules/nul-bytes.js +332 -0
- package/dist/rules/nul-bytes.js.map +1 -0
- package/dist/rules/platform-surface.d.ts +479 -0
- package/dist/rules/platform-surface.d.ts.map +1 -0
- package/dist/rules/platform-surface.js +749 -0
- package/dist/rules/platform-surface.js.map +1 -0
- package/dist/rules/port-catches.d.ts +225 -0
- package/dist/rules/port-catches.d.ts.map +1 -0
- package/dist/rules/port-catches.js +1374 -0
- package/dist/rules/port-catches.js.map +1 -0
- package/dist/rules/port-shape.d.ts +213 -0
- package/dist/rules/port-shape.d.ts.map +1 -0
- package/dist/rules/port-shape.js +670 -0
- package/dist/rules/port-shape.js.map +1 -0
- package/dist/rules/queue-names.d.ts +108 -0
- package/dist/rules/queue-names.d.ts.map +1 -0
- package/dist/rules/queue-names.js +395 -0
- package/dist/rules/queue-names.js.map +1 -0
- package/dist/rules/singleton-identity.d.ts +205 -0
- package/dist/rules/singleton-identity.d.ts.map +1 -0
- package/dist/rules/singleton-identity.js +830 -0
- package/dist/rules/singleton-identity.js.map +1 -0
- package/dist/rules/subscribe-seam.d.ts +121 -0
- package/dist/rules/subscribe-seam.d.ts.map +1 -0
- package/dist/rules/subscribe-seam.js +594 -0
- package/dist/rules/subscribe-seam.js.map +1 -0
- package/dist/rules/transaction-context.d.ts +40 -0
- package/dist/rules/transaction-context.d.ts.map +1 -0
- package/dist/rules/transaction-context.js +294 -0
- package/dist/rules/transaction-context.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
import { type BarrelUnreadable, type HostPackage, type PlatformSurface } from '../lib/platform-surface.js';
|
|
2
|
+
import { type ReadCoverage } from '../lib/read-size.js';
|
|
3
|
+
/** The symbol token recorded for a reach that names no symbol at all. */
|
|
4
|
+
export declare const WHOLE_FILE = "*";
|
|
5
|
+
/** The symbol token recorded for a finding that is about the file, not a name. */
|
|
6
|
+
export declare const NO_SYMBOL = "?";
|
|
7
|
+
/** The target token recorded for a source file no module owns. */
|
|
8
|
+
export declare const NO_MODULE = "(unattributed)";
|
|
9
|
+
export type PlatformSurfaceFindingKind = 'unpublished-symbol' | 'whole-file-reach' | 'unresolvable-reach' | 'unattributed-source' | 'unpublished-subpath' | 'host-internal-subpath' | 'relative-host-reach';
|
|
10
|
+
export interface PlatformSurfaceFinding {
|
|
11
|
+
readonly kind: PlatformSurfaceFindingKind;
|
|
12
|
+
/** The module file, keyed relative to the source root. */
|
|
13
|
+
readonly file: string;
|
|
14
|
+
readonly line: number;
|
|
15
|
+
/** The module that owns {@link file}, or `null` when nothing does. */
|
|
16
|
+
readonly moduleId: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* The platform file reached, keyed relative to the source root — or, for an
|
|
19
|
+
* `unresolvable-reach`, the specifier as written, and for an
|
|
20
|
+
* `unattributed-source`, {@link NO_MODULE}.
|
|
21
|
+
*/
|
|
22
|
+
readonly target: string;
|
|
23
|
+
/** The name reached, {@link WHOLE_FILE}, or {@link NO_SYMBOL}. */
|
|
24
|
+
readonly symbol: string;
|
|
25
|
+
/** The specifier as written, for the failure message. */
|
|
26
|
+
readonly specifier: string;
|
|
27
|
+
/**
|
|
28
|
+
* The **bare specifier** that carries {@link PlatformSurfaceFinding.target} —
|
|
29
|
+
* `@endora-commerce/platform/kernel` — or `null` when no barrel carries the
|
|
30
|
+
* file at all. A `relative-host-reach`'s remedy, and nothing else's.
|
|
31
|
+
*
|
|
32
|
+
* It is derived in the analysis rather than in {@link remedyOf} because the
|
|
33
|
+
* derivation needs the barrels and the `exports` map and a remedy sentence has
|
|
34
|
+
* neither: {@link PlatformSurface.publishedBy} says which barrel publishes the
|
|
35
|
+
* file, {@link HostPackage.subpathTargets} says which subpath that barrel is,
|
|
36
|
+
* and {@link HostPackage.name} says what a consumer writes. All three are read
|
|
37
|
+
* off the package, so a sixth published directory changes the sentence in the
|
|
38
|
+
* same run rather than when somebody remembers — which is the property
|
|
39
|
+
* host-reach-check.md §3 asks for.
|
|
40
|
+
*/
|
|
41
|
+
readonly publishedAs?: string | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* One ledgered reach: which unpublished names this file may take from that
|
|
45
|
+
* platform file, and why.
|
|
46
|
+
*
|
|
47
|
+
* **The symbols are named rather than counted**, which is where this ledger
|
|
48
|
+
* differs from `check:module-boundary`'s omittable `{ sites, reason }`. There a
|
|
49
|
+
* count is enough because the verdict is per *target* — a file either may name
|
|
50
|
+
* another module's directory or it may not, and how often says nothing a
|
|
51
|
+
* reviewer needs. Here the verdict is per *symbol*: a **P** file publishes some
|
|
52
|
+
* of its exports and withholds others, so an entry that did not name the symbol
|
|
53
|
+
* could not be checked against the barrel it disagrees with, and a reach that
|
|
54
|
+
* swapped one unpublished name for another would inherit the entry in silence.
|
|
55
|
+
*/
|
|
56
|
+
export interface LedgeredReach {
|
|
57
|
+
/** Every unpublished name this file takes from that target. Order is not read. */
|
|
58
|
+
readonly symbols: readonly string[];
|
|
59
|
+
/** Why it stands, and what would retire it. */
|
|
60
|
+
readonly reason: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The reaches into unpublished platform surface that stand today.
|
|
64
|
+
*
|
|
65
|
+
* Keyed `<module file>|<platform file>`, both relative to the repository root —
|
|
66
|
+
* so moving code inside a file does not invalidate an entry, and re-opening a
|
|
67
|
+
* closed reach does not silently inherit one.
|
|
68
|
+
*
|
|
69
|
+
* The platform half is spelled at `packages/platform/src/…` since the
|
|
70
|
+
* relocation, which is where the file is. A module still writes the old relative
|
|
71
|
+
* specifier and still lands on a re-export shim at `backend/src/<subpath>/…`;
|
|
72
|
+
* {@link PlatformSurfaceInput.canonicalTargetOf} follows the shim, because a
|
|
73
|
+
* shim publishes nothing and judging one would refuse every reach in the tree.
|
|
74
|
+
* Forty of these keys were re-spelled by the move and not one entry, symbol or
|
|
75
|
+
* count moved with them.
|
|
76
|
+
*
|
|
77
|
+
* **Two-way and draining**, in the idiom of `PORT_CATCHES_TO_DRAIN`: an
|
|
78
|
+
* unledgered reach fails the build, a key that no longer describes one fails it,
|
|
79
|
+
* and a listed symbol the walk no longer sees fails it too. Every entry names
|
|
80
|
+
* the contract paragraph that classified it and the event that retires it — an
|
|
81
|
+
* entry is debt with a due date, not a permission.
|
|
82
|
+
*
|
|
83
|
+
* **What is left is four files, and none of them is a module's.** The ledger
|
|
84
|
+
* held 33 keys; 29 of them were `_lifecycle`'s, under five reasons that each
|
|
85
|
+
* said the same thing in a different register — the ORM bootstrap a
|
|
86
|
+
* container-less CLI has no other way to reach, the `ModulePlugin` type, the
|
|
87
|
+
* worker-pause pair, the twelve unpublished targets it was the only consumer
|
|
88
|
+
* of. All 29 retired together, and **not one of them by editing an import**,
|
|
89
|
+
* which is what every one of those reasons predicted: D-160.11's second half
|
|
90
|
+
* moved `_lifecycle`'s platform-safe files into the host package, where the
|
|
91
|
+
* same specifier crosses no boundary
|
|
92
|
+
* ({@link PlatformSurfaceInput.platformSourceRoot}), and left its host half —
|
|
93
|
+
* the manifest registry, the divergence reader and the five `module:*`
|
|
94
|
+
* commands — outside the module walk, where it is host code like `src/db` and
|
|
95
|
+
* `src/overlay` and was never this check's subject.
|
|
96
|
+
*
|
|
97
|
+
* So no module is blocked by this check, and none is ledgered by it. The three
|
|
98
|
+
* entries that were questions rather than repairs are all answered:
|
|
99
|
+
* `REGISTRY_CACHE` went with D-174 — `admin_actions` registers an
|
|
100
|
+
* `InProcessCacheLayer` and the platform's own state-changed subscriber drops
|
|
101
|
+
* it, so the module names no channel and no new symbol was published — and the
|
|
102
|
+
* TOTP shim entry went by **deletion**: its premise turned out to be false (§8's
|
|
103
|
+
* one-hop rule is scoped to *port* methods, and the barrel applies it that way
|
|
104
|
+
* in both directions), the two backup-code functions had zero call sites and
|
|
105
|
+
* zero tests, and the shim itself had zero importers. Nothing was published for
|
|
106
|
+
* any of them.
|
|
107
|
+
*
|
|
108
|
+
* A new entry is therefore a real finding, not a queue position: it is a module
|
|
109
|
+
* the F4 sweep cannot convert, and the group header it needs has to be written
|
|
110
|
+
* before it is added.
|
|
111
|
+
*/
|
|
112
|
+
export interface PlatformSurfaceInput {
|
|
113
|
+
/**
|
|
114
|
+
* The module sources to judge, keyed relative to the source root.
|
|
115
|
+
*
|
|
116
|
+
* Everything the walk opened, including a file no module owns — attributing
|
|
117
|
+
* it is the analysis' job and failing to is a finding.
|
|
118
|
+
*/
|
|
119
|
+
readonly sources: ReadonlyMap<string, string>;
|
|
120
|
+
/** Every file key that exists under the source root, for resolving a specifier. */
|
|
121
|
+
readonly files: ReadonlySet<string>;
|
|
122
|
+
/** The published surface, from `lib/platform-surface.ts`. */
|
|
123
|
+
readonly surface: PlatformSurface;
|
|
124
|
+
/**
|
|
125
|
+
* Which module a key belongs to. Defaults to the `modules/<id>/` segment,
|
|
126
|
+
* which is what the application tree and an overlay tree both carry; a run
|
|
127
|
+
* over a tree that holds module **packages** passes the layout's own
|
|
128
|
+
* attribution, which reads a package's declared id instead.
|
|
129
|
+
*/
|
|
130
|
+
readonly moduleIdOf?: (key: string) => string | null;
|
|
131
|
+
/**
|
|
132
|
+
* A resolved target's canonical key — the file a specifier really lands on.
|
|
133
|
+
*
|
|
134
|
+
* Identity for every reach but one: the platform relocation left a re-export
|
|
135
|
+
* shim at each old `backend/src/{kernel,http,tenancy,commands,events}/…` path,
|
|
136
|
+
* so a module's relative specifier resolves to a file whose whole content is
|
|
137
|
+
* `export * from` the platform's own. Judging the shim would compare a module's
|
|
138
|
+
* symbol against a barrel that lives one tree over and publish nothing, turning
|
|
139
|
+
* all 1642 reaches into findings. Judging the file the shim forwards to is the
|
|
140
|
+
* effective truth and keeps this check's answer the same across the move — the
|
|
141
|
+
* ledger's platform half is spelled at the platform, which is where it is.
|
|
142
|
+
*/
|
|
143
|
+
readonly canonicalTargetOf?: (key: string) => string;
|
|
144
|
+
/**
|
|
145
|
+
* The host package, so a **bare** specifier into it is judged like a relative
|
|
146
|
+
* one (feature 080, T060).
|
|
147
|
+
*
|
|
148
|
+
* `null` — the default — is "this workspace declares no platform", which is
|
|
149
|
+
* true of every fixture workspace and of nothing else. It is not a way to
|
|
150
|
+
* switch the population off: a run whose workspace *has* a platform passes it,
|
|
151
|
+
* and `main` exits 2 when it cannot find one.
|
|
152
|
+
*/
|
|
153
|
+
readonly host?: HostPackage | null;
|
|
154
|
+
/**
|
|
155
|
+
* The platform's own source root, repo-relative — so a module whose sources
|
|
156
|
+
* live **inside** the host package is not judged for reaching it (feature
|
|
157
|
+
* 080, D-160.11).
|
|
158
|
+
*
|
|
159
|
+
* `_lifecycle` merged into `@endora-commerce/platform`, and its files go on
|
|
160
|
+
* naming `../../kernel/lifecycle/registry-cache.js` exactly as they did in
|
|
161
|
+
* `backend/src/lifecycle/`. The specifier is unchanged and its meaning is
|
|
162
|
+
* not: it is now a reach from one directory of a package into another
|
|
163
|
+
* directory of the *same* package, which crosses no boundary and which no
|
|
164
|
+
* `exports` map is asked about. This check's whole subject is the reach a
|
|
165
|
+
* packaged module could not write — D-160.8, and the reason the sixteen
|
|
166
|
+
* `LIFECYCLE_HOST_HALF` entries said they would *"retire with the merge, not
|
|
167
|
+
* by editing the import"*. Judging them here would publish twelve kernel and
|
|
168
|
+
* `http` symbols for one consumer forever, which is what D-160.11 refused.
|
|
169
|
+
*
|
|
170
|
+
* It exempts the **reaches**, never the file: the walk still opens it, still
|
|
171
|
+
* counts it in `read: files=`, and still reports it as `unattributed-source`
|
|
172
|
+
* if no module owns it — so a module file inside the platform that stopped
|
|
173
|
+
* resolving to its id is a finding rather than a silence (#215 one layer in).
|
|
174
|
+
* Every other file in the platform is outside this check's population
|
|
175
|
+
* already, for the same reason: none of them is a module's.
|
|
176
|
+
*
|
|
177
|
+
* `null` — the default — is "this workspace has no platform", which is true
|
|
178
|
+
* of every fixture and of nothing else; `main` exits 2 before it gets here.
|
|
179
|
+
*/
|
|
180
|
+
readonly platformSourceRoot?: string | null;
|
|
181
|
+
}
|
|
182
|
+
/** One module package's answer to "does your manifest declare the host?". */
|
|
183
|
+
export interface ModulePackageDeclaration {
|
|
184
|
+
readonly moduleId: string;
|
|
185
|
+
/** True when its `dependencies` or `peerDependencies` name the host package. */
|
|
186
|
+
readonly dependsOnHost: boolean;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* The floor that follows the sweep: every module package whose manifest
|
|
190
|
+
* declares the host must have contributed a host reach to this walk.
|
|
191
|
+
*
|
|
192
|
+
* This is issue #215's predicate over the population T060 restored, and it is
|
|
193
|
+
* the one derivation that would have caught the defect. The other two cannot:
|
|
194
|
+
* `manifest-index` counts modules that produced a **file**, and a packaged
|
|
195
|
+
* module produces plenty; `platform-barrels` counts barrels, which the move
|
|
196
|
+
* does not touch. What fell was the *reaches*, and the number that recorded
|
|
197
|
+
* them was a snapshot in `test/helpers/check-read-sizes.ts` whose −10% floor
|
|
198
|
+
* absorbed one module's worth of the fall without a word.
|
|
199
|
+
*
|
|
200
|
+
* The declaration is a second author's, which is what makes it worth
|
|
201
|
+
* reconciling against: `manifests:generate` renders a module package's
|
|
202
|
+
* `peerDependencies` from the bare specifiers its sources import, and
|
|
203
|
+
* `manifests:check` fails on drift. So "the manifest says this package reaches
|
|
204
|
+
* the host" and "the walk read a reach from this package" are two derivations
|
|
205
|
+
* of one fact, and a walk that stopped reading bare specifiers makes them
|
|
206
|
+
* disagree in the same run.
|
|
207
|
+
*
|
|
208
|
+
* `null` rather than `expected: 0` for a tree with no module package that
|
|
209
|
+
* declares the host — every tree in this repository until !910, and every
|
|
210
|
+
* fixture workspace. An expectation of zero is itself a refusal in this
|
|
211
|
+
* grammar, and rightly: a floor that expects nothing is switched off.
|
|
212
|
+
*/
|
|
213
|
+
export declare function hostDependentCoverage(packages: readonly ModulePackageDeclaration[], hostReachModules: ReadonlySet<string>): ReadCoverage | null;
|
|
214
|
+
/** `<module file>|<platform file>` — the ledger key and the identity of a reach. */
|
|
215
|
+
export declare function keyOf(finding: PlatformSurfaceFinding): string;
|
|
216
|
+
/** The file a specifier names, or `null` when the walk found no such file. */
|
|
217
|
+
/**
|
|
218
|
+
* A specifier's target file, or `null`. Exported because both hosts build the
|
|
219
|
+
* platform's published surface with it and a second resolver would be a second
|
|
220
|
+
* answer to "which file does this name".
|
|
221
|
+
*/
|
|
222
|
+
export declare function resolveTarget(fromKey: string, specifier: string, files: ReadonlySet<string>): string | null;
|
|
223
|
+
export interface PlatformSurfaceScan {
|
|
224
|
+
/** Every (specifier, symbol) reach into the platform the walk judged. */
|
|
225
|
+
readonly reaches: number;
|
|
226
|
+
readonly findings: readonly PlatformSurfaceFinding[];
|
|
227
|
+
/**
|
|
228
|
+
* Modules that named the host package by its **bare** specifier at least once
|
|
229
|
+
* — published subpath or not.
|
|
230
|
+
*
|
|
231
|
+
* The numerator of {@link hostDependentCoverage}. A reach at a subpath the
|
|
232
|
+
* host does not publish counts here: the question is whether the walk *read*
|
|
233
|
+
* the package's host specifiers, and a finding is the loudest possible yes.
|
|
234
|
+
*/
|
|
235
|
+
readonly hostReachModules: ReadonlySet<string>;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Every module reach into the platform, judged against the published surface.
|
|
239
|
+
*
|
|
240
|
+
* Pure over source text, file keys and barrel-derived surface, so a fixture
|
|
241
|
+
* enters exactly where a run does — including the specifier extraction and the
|
|
242
|
+
* `.js` → `.ts` resolution, which is where a resolution bug would hide (issue
|
|
243
|
+
* #130).
|
|
244
|
+
*/
|
|
245
|
+
export declare function scanPlatformSurface(input: PlatformSurfaceInput): PlatformSurfaceScan;
|
|
246
|
+
export interface CheckResult {
|
|
247
|
+
/** (specifier, symbol) reaches into the platform judged — the `sites=` number. */
|
|
248
|
+
readonly reaches: number;
|
|
249
|
+
readonly findings: readonly PlatformSurfaceFinding[];
|
|
250
|
+
readonly violations: readonly PlatformSurfaceFinding[];
|
|
251
|
+
readonly ledgered: readonly PlatformSurfaceFinding[];
|
|
252
|
+
/** Ledger keys that describe no reach at all. */
|
|
253
|
+
readonly staleKeys: readonly string[];
|
|
254
|
+
/** `<key>#<symbol>` an entry names and the walk no longer sees. */
|
|
255
|
+
readonly staleSymbols: readonly string[];
|
|
256
|
+
/** Barrels the parse could not read in full — a caller exits 2 on any. */
|
|
257
|
+
readonly unreadable: readonly BarrelUnreadable[];
|
|
258
|
+
/** Modules that named the host package's own specifier — see the scan. */
|
|
259
|
+
readonly hostReachModules: ReadonlySet<string>;
|
|
260
|
+
}
|
|
261
|
+
export declare function checkPlatformSurface(input: PlatformSurfaceInput, ledger: Readonly<Record<string, LedgeredReach>>): CheckResult;
|
|
262
|
+
/**
|
|
263
|
+
* One ledgered application reach into the platform by relative path.
|
|
264
|
+
*
|
|
265
|
+
* Keyed `<application file>|<canonical platform file>` — the *canonical* file
|
|
266
|
+
* and never the specifier, which is the one way this repair could regress in
|
|
267
|
+
* silence: re-spelling `../../packages/platform/dist/x.js` as
|
|
268
|
+
* `../../packages/platform/src/x.ts` is the same reach and must not clear an
|
|
269
|
+
* entry (host-reach-check.md §4).
|
|
270
|
+
*
|
|
271
|
+
* `retiredBy` is a field rather than a sentence inside {@link
|
|
272
|
+
* LedgeredHostReach.reason} because R4.1 requires every entry to name the phase
|
|
273
|
+
* that retires it, and a requirement carried only by prose is one an author can
|
|
274
|
+
* satisfy by writing anything. The companion test holds both to being non-empty.
|
|
275
|
+
*
|
|
276
|
+
* **No `permanent` member, deliberately** (R4.2/R4.5). Every entry has an
|
|
277
|
+
* available remedy — a subpath the map already declares, or one this feature
|
|
278
|
+
* adds — so an entry saying "this reach is correct" would mean the predicate has
|
|
279
|
+
* outgrown its population. Narrow the predicate; never add the entry.
|
|
280
|
+
*/
|
|
281
|
+
export interface LedgeredHostReach {
|
|
282
|
+
/** Why it stands. */
|
|
283
|
+
readonly reason: string;
|
|
284
|
+
/** The phase or feature that retires it. */
|
|
285
|
+
readonly retiredBy: string;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* The application's own reaches into the platform, and what they resolve to.
|
|
289
|
+
*
|
|
290
|
+
* A second **consumer population** on this check's own rule — *a reach into the
|
|
291
|
+
* host names a published subpath or a declared host-internal one, never a file
|
|
292
|
+
* inside the package by relative path* — and not a second rule
|
|
293
|
+
* (host-reach-check.md §1.1). The four inputs it needs are the four this check
|
|
294
|
+
* already derives: where the platform's sources are, the name it publishes
|
|
295
|
+
* under, the subpaths its `exports` map declares, and the barrels. A separate
|
|
296
|
+
* script would re-derive all four, which is two answers to one population
|
|
297
|
+
* (D-100).
|
|
298
|
+
*/
|
|
299
|
+
export interface ApplicationReachInput {
|
|
300
|
+
/**
|
|
301
|
+
* The application's own sources, keyed relative to the repository root: every
|
|
302
|
+
* file the layout attributes to no module and that is not inside the platform.
|
|
303
|
+
*
|
|
304
|
+
* Module-attributed files stay in {@link PlatformSurfaceInput.sources} and are
|
|
305
|
+
* judged by the existing rules; nothing about a module reach changes.
|
|
306
|
+
*/
|
|
307
|
+
readonly sources: ReadonlyMap<string, string>;
|
|
308
|
+
/**
|
|
309
|
+
* The platform member's own directory, repo-relative — `packages/platform`,
|
|
310
|
+
* the directory holding its `package.json`.
|
|
311
|
+
*
|
|
312
|
+
* The target side is *anything inside the member*, which is both spellings at
|
|
313
|
+
* once: `src/**` is what a well-meaning cleanup would write and `dist/**` is
|
|
314
|
+
* what the tree writes today. Neither directory name appears in this analysis
|
|
315
|
+
* — see {@link canonicalPlatformFile}.
|
|
316
|
+
*/
|
|
317
|
+
readonly platformMemberRoot: string;
|
|
318
|
+
/** The platform's source root, repo-relative — `packages/platform/src`. */
|
|
319
|
+
readonly platformSourceRoot: string;
|
|
320
|
+
/** Every source-file key the walk found, for the `.js` → `.ts` resolution. */
|
|
321
|
+
readonly files: ReadonlySet<string>;
|
|
322
|
+
/** The published surface, so a remedy can name the subpath that carries a file. */
|
|
323
|
+
readonly surface: PlatformSurface;
|
|
324
|
+
/** The host package — its `exports` map is what turns a barrel into a subpath. */
|
|
325
|
+
readonly host: HostPackage;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* The platform **source** file a specifier landing inside the member names, or
|
|
329
|
+
* `null`.
|
|
330
|
+
*
|
|
331
|
+
* The canonicalisation drops the member-relative path's **first segment** —
|
|
332
|
+
* whatever it is — and re-roots the remainder at the platform's source root. So
|
|
333
|
+
* `dist/lifecycle/manifest.js` and `src/lifecycle/manifest.ts` both canonicalise
|
|
334
|
+
* to `packages/platform/src/lifecycle/manifest.ts`, and the word `dist` appears
|
|
335
|
+
* nowhere: a build directory renamed in the package's own `tsconfig.build.json`
|
|
336
|
+
* arrives here by being renamed, not by anybody remembering this file (D-100).
|
|
337
|
+
*
|
|
338
|
+
* `null` for a specifier that lands inside the member and resolves to no source
|
|
339
|
+
* file. That is deliberate and is the contract's own ruling (§3): a relative
|
|
340
|
+
* specifier resolving to nothing inside the platform is not a host reach at all,
|
|
341
|
+
* and reporting it here would be this check answering `tsc`'s question. The
|
|
342
|
+
* risk it carries — a canonicalisation bug silently resolving everything to
|
|
343
|
+
* `null` — is not silent: the ledger is two-way, so a walk that stopped
|
|
344
|
+
* resolving reports every entry it holds as stale and exits 1.
|
|
345
|
+
*/
|
|
346
|
+
export declare function canonicalPlatformFile(joined: string, input: Pick<ApplicationReachInput, 'platformMemberRoot' | 'platformSourceRoot' | 'files'>): string | null;
|
|
347
|
+
/** What the application-reach walk read, beside what it found. */
|
|
348
|
+
export interface ApplicationReachScan {
|
|
349
|
+
/** Relative reaches into the platform judged — this half's `sites=` addend. */
|
|
350
|
+
readonly reaches: number;
|
|
351
|
+
readonly findings: readonly PlatformSurfaceFinding[];
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Every application reach into the platform written as a relative path.
|
|
355
|
+
*
|
|
356
|
+
* Pure over source text, file keys, barrel-derived surface and the two platform
|
|
357
|
+
* roots — so a fixture enters exactly where a run does, specifier extraction and
|
|
358
|
+
* `.js` → `.ts` resolution included (issue #130, and the `check-entry-scope`
|
|
359
|
+
* fixture that entered below its own classifier is the cautionary example).
|
|
360
|
+
*
|
|
361
|
+
* **A bare specifier into the host produces no finding here, and that is the
|
|
362
|
+
* discrimination the rule turns on.** `@endora-commerce/platform/kernel` and
|
|
363
|
+
* `@endora-commerce/platform/composition` are both correct from the application:
|
|
364
|
+
* the first is published and the second is the host-internal address the host is
|
|
365
|
+
* entitled to (D-160.14). The three-way answer for a bare specifier is a
|
|
366
|
+
* *module's* — `resolveHostSpecifier` in {@link scanPlatformSurface} — and asking
|
|
367
|
+
* it twice, with two populations and two verdicts, is two answers waiting to
|
|
368
|
+
* disagree.
|
|
369
|
+
*/
|
|
370
|
+
export declare function scanApplicationReaches(input: ApplicationReachInput): ApplicationReachScan;
|
|
371
|
+
export interface ApplicationReachResult extends ApplicationReachScan {
|
|
372
|
+
readonly violations: readonly PlatformSurfaceFinding[];
|
|
373
|
+
readonly ledgered: readonly PlatformSurfaceFinding[];
|
|
374
|
+
/** Ledger keys that describe no reach the walk found. */
|
|
375
|
+
readonly staleKeys: readonly string[];
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* The application's reaches, judged against the ledger — both directions
|
|
379
|
+
* (host-reach-check.md §4 R4.3).
|
|
380
|
+
*
|
|
381
|
+
* One reach may appear twice under one key when a file names the same platform
|
|
382
|
+
* file from two specifiers; the ledger is keyed `(file, target)` and covers
|
|
383
|
+
* both, which is right: the entry's subject is the coupling, not the line.
|
|
384
|
+
*/
|
|
385
|
+
export declare function checkApplicationReaches(input: ApplicationReachInput, ledger: Readonly<Record<string, LedgeredHostReach>>): ApplicationReachResult;
|
|
386
|
+
/**
|
|
387
|
+
* The coverage floor for the application half: the ledger's own still-on-disk
|
|
388
|
+
* file set, against what the walk opened of it.
|
|
389
|
+
*
|
|
390
|
+
* host-reach-check.md §5's fourth refusal, and it is `check:module-boundary`'s
|
|
391
|
+
* admin-host floor one package over — a floor derived from *the ledger* rather
|
|
392
|
+
* than from a count, so a walk that stopped reaching the files it is ledgered
|
|
393
|
+
* over is a refusal rather than a drained ledger. The ledger is a second
|
|
394
|
+
* author's answer to "which application files reach the platform": it was
|
|
395
|
+
* written by whoever measured the debt, and it goes stale loudly rather than
|
|
396
|
+
* quietly.
|
|
397
|
+
*
|
|
398
|
+
* `null` rather than `expected: 0` once the ledger empties, which is what this
|
|
399
|
+
* ledger is for: an expectation of zero is itself a refusal in this grammar
|
|
400
|
+
* (`readSizeRefusal`'s `no-expectation`), and rightly — a floor that expects
|
|
401
|
+
* nothing is switched off.
|
|
402
|
+
*/
|
|
403
|
+
export declare function hostReachCoverage(ledger: Readonly<Record<string, LedgeredHostReach>>, onDisk: (file: string) => boolean, opened: ReadonlySet<string>): ReadCoverage | null;
|
|
404
|
+
/**
|
|
405
|
+
* Why this run may not report on the application's reaches, or `null`.
|
|
406
|
+
*
|
|
407
|
+
* Two of host-reach-check.md §5's four refusals — the two that are facts about
|
|
408
|
+
* *this* half's inputs. The first ("no platform root") is already this check's
|
|
409
|
+
* own first refusal and stays there; the fourth is the ledger-derived coverage
|
|
410
|
+
* floor and belongs to `read-size.ts`, which is the one place in the estate that
|
|
411
|
+
* owns a short walk.
|
|
412
|
+
*
|
|
413
|
+
* Both fail in the direction that produces a **clean** result, which is why they
|
|
414
|
+
* are exit 2 and not a finding. An empty canonical-target map reports every
|
|
415
|
+
* relative reach as reaching nothing; an application walk that opened no file
|
|
416
|
+
* reports no reach at all — and this check's module half would go on printing
|
|
417
|
+
* `files=2069` beside it, because 1364 of `backend/src`'s files are a module's
|
|
418
|
+
* and a broken *application* walk leaves every one of those numbers healthy
|
|
419
|
+
* (issue #215's shape over this population).
|
|
420
|
+
*/
|
|
421
|
+
export declare function applicationReachRefusal(input: {
|
|
422
|
+
readonly canonicalTargets: number;
|
|
423
|
+
readonly applicationFiles: number;
|
|
424
|
+
}): string | null;
|
|
425
|
+
/**
|
|
426
|
+
* Why this run may not judge a reach against the surface it read, or `null`.
|
|
427
|
+
*
|
|
428
|
+
* Pure over the two things that can be silently missing — a barrel that is not
|
|
429
|
+
* there, and a re-export the parse cannot enumerate — because both fail in the
|
|
430
|
+
* same direction and it is the wrong one: a **short** published set turns
|
|
431
|
+
* correct reaches into findings, and the obvious repair for one of those is to
|
|
432
|
+
* widen the barrel. So it is exit 2, in the idiom of `readSizeRefusal`, and a
|
|
433
|
+
* proof enters where a run enters (issue #130).
|
|
434
|
+
*/
|
|
435
|
+
export declare function platformSurfaceRefusal(input: {
|
|
436
|
+
readonly missingBarrels: readonly string[];
|
|
437
|
+
readonly surface: PlatformSurface;
|
|
438
|
+
}): string | null;
|
|
439
|
+
/**
|
|
440
|
+
* Every TypeScript source under `dir`, with the rule's own prunes applied.
|
|
441
|
+
*
|
|
442
|
+
* Exported because the population is part of the rule: two hosts computing
|
|
443
|
+
* "which files this check reads" two ways is the shape that lets one of them go
|
|
444
|
+
* half-blind.
|
|
445
|
+
*/
|
|
446
|
+
export declare function collectPlatformSurfaceSources(dir: string, out?: string[]): string[];
|
|
447
|
+
/**
|
|
448
|
+
* A module package's own tooling configuration, which is not module source.
|
|
449
|
+
*
|
|
450
|
+
* `vitest.config.ts` is the first `.ts` file a module package holds that its
|
|
451
|
+
* build does not compile (feature 089, Phase 1): `tsconfig.build.json` roots the
|
|
452
|
+
* emit at `src/`, and the manifest's `files` ships `dist` and the asset
|
|
453
|
+
* directories, so nothing a consumer installs contains it and no `exports`
|
|
454
|
+
* subpath can name it. The other configurations a package carries are `.json`
|
|
455
|
+
* and were therefore never in this walk at all.
|
|
456
|
+
*
|
|
457
|
+
* It has to leave the population rather than be made to resolve, because the
|
|
458
|
+
* file exists to `mergeConfig` the repository root's `vitest.config.base.ts` —
|
|
459
|
+
* which is where issue #255's foreign-workspace-link refusal lives, so the reach
|
|
460
|
+
* is mandatory — and that root is in no module walk root and no source root. A
|
|
461
|
+
* reach the walk cannot resolve is `unresolvable-reach`, deliberately fail-closed
|
|
462
|
+
* (#215 one layer in), and the honest answer here is that this file is not a
|
|
463
|
+
* module reach at all.
|
|
464
|
+
*
|
|
465
|
+
* Narrow on purpose: only a `*.config.ts` sitting **directly** at a module walk
|
|
466
|
+
* root, which is a package's own root or a module directory. A `config.ts` under
|
|
467
|
+
* `src/` stays module source, and a directory named `config/` is untouched.
|
|
468
|
+
*/
|
|
469
|
+
export declare function isPackageToolingConfig(root: string, file: string): boolean;
|
|
470
|
+
/** The remedy sentence a finding gets, by kind. */
|
|
471
|
+
/**
|
|
472
|
+
* The remedy paragraph for a finding.
|
|
473
|
+
*
|
|
474
|
+
* Exported because the remedy is part of the rule and not part of a host: an
|
|
475
|
+
* author outside this checkout reads the same sentence this repository's run
|
|
476
|
+
* prints.
|
|
477
|
+
*/
|
|
478
|
+
export declare function remedyOf(finding: PlatformSurfaceFinding): string;
|
|
479
|
+
//# sourceMappingURL=platform-surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-surface.d.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