@telorun/analyzer 0.72.0 → 0.74.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/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +76 -20
- package/dist/artifact-axes.d.ts +14 -0
- package/dist/artifact-axes.d.ts.map +1 -0
- package/dist/artifact-axes.js +12 -0
- package/dist/artifact-layer-index.d.ts +2 -2
- package/dist/artifact-layer-index.d.ts.map +1 -1
- package/dist/artifact-layer-index.js +9 -4
- package/dist/artifact-selector.d.ts +47 -21
- package/dist/artifact-selector.d.ts.map +1 -1
- package/dist/artifact-selector.js +85 -16
- package/dist/builtins.d.ts.map +1 -1
- package/dist/builtins.js +144 -113
- package/dist/call-graph.d.ts +12 -1
- package/dist/call-graph.d.ts.map +1 -1
- package/dist/call-graph.js +22 -0
- package/dist/catch-scope.js +1 -1
- package/dist/cel-scope-query.d.ts.map +1 -1
- package/dist/cel-scope-query.js +32 -11
- package/dist/cel-scope.d.ts.map +1 -1
- package/dist/cel-scope.js +1 -0
- package/dist/eval-paths.d.ts +36 -5
- package/dist/eval-paths.d.ts.map +1 -1
- package/dist/eval-paths.js +47 -6
- package/dist/extends-resolution.d.ts +12 -0
- package/dist/extends-resolution.d.ts.map +1 -1
- package/dist/extends-resolution.js +23 -0
- package/dist/forwarded-declaration.d.ts +26 -0
- package/dist/forwarded-declaration.d.ts.map +1 -0
- package/dist/forwarded-declaration.js +31 -0
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/kernel-globals.d.ts.map +1 -1
- package/dist/kernel-globals.js +21 -5
- package/dist/module-alias-scope.d.ts +11 -0
- package/dist/module-alias-scope.d.ts.map +1 -1
- package/dist/module-alias-scope.js +10 -0
- package/dist/module-file-claims.d.ts +17 -1
- package/dist/module-file-claims.d.ts.map +1 -1
- package/dist/module-file-claims.js +38 -3
- package/dist/module-named-files.d.ts +72 -0
- package/dist/module-named-files.d.ts.map +1 -0
- package/dist/module-named-files.js +115 -0
- package/dist/native-entries.d.ts +83 -0
- package/dist/native-entries.d.ts.map +1 -0
- package/dist/native-entries.js +169 -0
- package/dist/nearest-name.d.ts +22 -0
- package/dist/nearest-name.d.ts.map +1 -0
- package/dist/nearest-name.js +43 -0
- package/dist/normalize-inline-resources.d.ts +41 -13
- package/dist/normalize-inline-resources.d.ts.map +1 -1
- package/dist/normalize-inline-resources.js +236 -54
- package/dist/reference-field-map.d.ts +59 -1
- package/dist/reference-field-map.d.ts.map +1 -1
- package/dist/reference-field-map.js +200 -34
- package/dist/release/destinations.d.ts +59 -0
- package/dist/release/destinations.d.ts.map +1 -0
- package/dist/release/destinations.js +75 -0
- package/dist/release/index.d.ts +6 -2
- package/dist/release/index.d.ts.map +1 -1
- package/dist/release/index.js +3 -1
- package/dist/release/ledger.d.ts +20 -11
- package/dist/release/ledger.d.ts.map +1 -1
- package/dist/release/ledger.js +43 -14
- package/dist/release/payload-digest.d.ts +2 -1
- package/dist/release/payload-digest.d.ts.map +1 -1
- package/dist/release/payload-digest.js +2 -1
- package/dist/release/release-plan.d.ts +3 -2
- package/dist/release/release-plan.d.ts.map +1 -1
- package/dist/release/release-plan.js +12 -19
- package/dist/release/workspace-config.d.ts +114 -34
- package/dist/release/workspace-config.d.ts.map +1 -1
- package/dist/release/workspace-config.js +322 -38
- package/dist/release/workspace-schema.d.ts +41 -0
- package/dist/release/workspace-schema.d.ts.map +1 -0
- package/dist/release/workspace-schema.js +77 -0
- package/dist/resolve-ref-sentinels.d.ts.map +1 -1
- package/dist/resolve-ref-sentinels.js +8 -5
- package/dist/resolve-throws-union.d.ts +25 -4
- package/dist/resolve-throws-union.d.ts.map +1 -1
- package/dist/resolve-throws-union.js +62 -32
- package/dist/resolve-zone-requirements.d.ts.map +1 -1
- package/dist/resolve-zone-requirements.js +2 -1
- package/dist/rewrite-synthetic-origins.d.ts +6 -1
- package/dist/rewrite-synthetic-origins.d.ts.map +1 -1
- package/dist/rewrite-synthetic-origins.js +107 -13
- package/dist/schema-compat.d.ts.map +1 -1
- package/dist/schema-compat.js +18 -5
- package/dist/schema-error-report.d.ts +7 -0
- package/dist/schema-error-report.d.ts.map +1 -1
- package/dist/schema-error-report.js +9 -4
- package/dist/schema-walk.d.ts +47 -13
- package/dist/schema-walk.d.ts.map +1 -1
- package/dist/schema-walk.js +150 -30
- package/dist/scope-declarations.d.ts +59 -0
- package/dist/scope-declarations.d.ts.map +1 -0
- package/dist/scope-declarations.js +45 -0
- package/dist/source-entries.d.ts +119 -0
- package/dist/source-entries.d.ts.map +1 -0
- package/dist/source-entries.js +349 -0
- package/dist/step-bodies.d.ts +24 -0
- package/dist/step-bodies.d.ts.map +1 -0
- package/dist/step-bodies.js +28 -0
- package/dist/telo-version.d.ts +1 -1
- package/dist/telo-version.js +1 -1
- package/dist/template-body.d.ts +10 -0
- package/dist/template-body.d.ts.map +1 -1
- package/dist/template-body.js +25 -0
- package/dist/validate-cel-context.d.ts +23 -8
- package/dist/validate-cel-context.d.ts.map +1 -1
- package/dist/validate-cel-context.js +51 -18
- package/dist/validate-exports.d.ts +28 -0
- package/dist/validate-exports.d.ts.map +1 -0
- package/dist/validate-exports.js +146 -0
- package/dist/validate-extends.d.ts.map +1 -1
- package/dist/validate-extends.js +37 -1
- package/dist/validate-module-artifact.d.ts +4 -2
- package/dist/validate-module-artifact.d.ts.map +1 -1
- package/dist/validate-module-artifact.js +43 -4
- package/dist/validate-native-entries.d.ts +15 -0
- package/dist/validate-native-entries.d.ts.map +1 -0
- package/dist/validate-native-entries.js +103 -0
- package/dist/validate-observed-state.d.ts +7 -1
- package/dist/validate-observed-state.d.ts.map +1 -1
- package/dist/validate-observed-state.js +24 -6
- package/dist/validate-provider-coherence.d.ts +4 -8
- package/dist/validate-provider-coherence.d.ts.map +1 -1
- package/dist/validate-provider-coherence.js +12 -123
- package/dist/validate-reference-forms.d.ts.map +1 -1
- package/dist/validate-reference-forms.js +2 -2
- package/dist/validate-references.d.ts.map +1 -1
- package/dist/validate-references.js +152 -65
- package/dist/validate-scope-reach.d.ts +31 -0
- package/dist/validate-scope-reach.d.ts.map +1 -0
- package/dist/validate-scope-reach.js +180 -0
- package/dist/validate-source-entries.d.ts +16 -0
- package/dist/validate-source-entries.d.ts.map +1 -0
- package/dist/validate-source-entries.js +90 -0
- package/dist/validate-template-body.d.ts +36 -0
- package/dist/validate-template-body.d.ts.map +1 -0
- package/dist/validate-template-body.js +246 -0
- package/dist/validate-throws-coverage.d.ts.map +1 -1
- package/dist/validate-throws-coverage.js +21 -39
- package/dist/value-type-keyword.d.ts +22 -5
- package/dist/value-type-keyword.d.ts.map +1 -1
- package/dist/value-type-keyword.js +16 -7
- package/package.json +4 -3
- package/src/analyzer.ts +97 -20
- package/src/artifact-axes.ts +24 -0
- package/src/artifact-layer-index.ts +9 -6
- package/src/artifact-selector.ts +110 -35
- package/src/builtins.ts +160 -113
- package/src/call-graph.ts +30 -0
- package/src/catch-scope.ts +1 -1
- package/src/cel-scope-query.ts +28 -9
- package/src/cel-scope.ts +1 -0
- package/src/eval-paths.ts +53 -6
- package/src/extends-resolution.ts +24 -0
- package/src/forwarded-declaration.ts +32 -0
- package/src/index.ts +37 -1
- package/src/kernel-globals.ts +28 -5
- package/src/migrations/CLAUDE.md +35 -0
- package/src/module-alias-scope.ts +17 -0
- package/src/module-file-claims.ts +63 -4
- package/src/module-named-files.ts +162 -0
- package/src/native-entries.ts +227 -0
- package/src/nearest-name.ts +47 -0
- package/src/normalize-inline-resources.ts +326 -70
- package/src/reference-field-map.ts +257 -52
- package/src/release/CLAUDE.md +32 -0
- package/src/release/destinations.ts +105 -0
- package/src/release/index.ts +33 -2
- package/src/release/ledger.ts +51 -21
- package/src/release/payload-digest.ts +2 -1
- package/src/release/release-plan.ts +16 -26
- package/src/release/workspace-config.ts +483 -47
- package/src/release/workspace-schema.ts +99 -0
- package/src/resolve-ref-sentinels.ts +7 -6
- package/src/resolve-throws-union.ts +87 -32
- package/src/resolve-zone-requirements.ts +2 -1
- package/src/rewrite-synthetic-origins.ts +107 -16
- package/src/schema-compat.ts +18 -4
- package/src/schema-error-report.ts +16 -4
- package/src/schema-walk.ts +162 -34
- package/src/scope-declarations.ts +98 -0
- package/src/source-entries.ts +502 -0
- package/src/step-bodies.ts +55 -0
- package/src/telo-version.ts +1 -1
- package/src/template-body.ts +25 -0
- package/src/validate-cel-context.ts +60 -18
- package/src/validate-exports.ts +185 -0
- package/src/validate-extends.ts +43 -0
- package/src/validate-module-artifact.ts +46 -3
- package/src/validate-native-entries.ts +147 -0
- package/src/validate-observed-state.ts +36 -7
- package/src/validate-provider-coherence.ts +17 -127
- package/src/validate-reference-forms.ts +2 -3
- package/src/validate-references.ts +151 -66
- package/src/validate-scope-reach.ts +213 -0
- package/src/validate-source-entries.ts +120 -0
- package/src/validate-template-body.ts +274 -0
- package/src/validate-throws-coverage.ts +24 -31
- package/src/value-type-keyword.ts +35 -9
- package/dist/validate-template-dispatch.d.ts +0 -27
- package/dist/validate-template-dispatch.d.ts.map +0 -1
- package/dist/validate-template-dispatch.js +0 -95
- package/src/validate-template-dispatch.ts +0 -99
|
@@ -49,7 +49,8 @@ export declare const LOCALLY_DERIVED_LAYERS: ReadonlySet<string>;
|
|
|
49
49
|
* `axis=value;…` form, because this string is read by a human in a ledger diff
|
|
50
50
|
* and written into a plain YAML key; the axis order is `PLATFORM_AXES`, so the
|
|
51
51
|
* rendering is deterministic rather than dependent on how the selector was
|
|
52
|
-
* built.
|
|
52
|
+
* built. An axis a selector omits renders nothing, so a new axis appended to the
|
|
53
|
+
* vocabulary leaves every existing key unchanged — reordering it would not.
|
|
53
54
|
*/
|
|
54
55
|
export declare function layerDigestKey(role: LayerRole | string, selector?: ArtifactSelector): string;
|
|
55
56
|
/** A layer whose digest differs between two readings, or that exists in only
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload-digest.d.ts","sourceRoot":"","sources":["../../src/release/payload-digest.ts"],"names":[],"m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AG,WAAW,EAAE,CAQzF"}
|
|
@@ -47,7 +47,8 @@ export const LOCALLY_DERIVED_LAYERS = new Set([MANIFEST_LAYER]);
|
|
|
47
47
|
* `axis=value;…` form, because this string is read by a human in a ledger diff
|
|
48
48
|
* and written into a plain YAML key; the axis order is `PLATFORM_AXES`, so the
|
|
49
49
|
* rendering is deterministic rather than dependent on how the selector was
|
|
50
|
-
* built.
|
|
50
|
+
* built. An axis a selector omits renders nothing, so a new axis appended to the
|
|
51
|
+
* vocabulary leaves every existing key unchanged — reordering it would not.
|
|
51
52
|
*/
|
|
52
53
|
export function layerDigestKey(role, selector) {
|
|
53
54
|
if (!selector)
|
|
@@ -58,13 +58,14 @@ export interface ModuleEvidence {
|
|
|
58
58
|
/** Whether a file under this module's own directory that reaches the artifact
|
|
59
59
|
* changed. Decides only whether a changelog line is requested. */
|
|
60
60
|
readonly ownFilesChanged: boolean;
|
|
61
|
+
/** The publish destination base THIS module's payload was built against —
|
|
62
|
+
* per module, because a workspace may declare one per subtree. */
|
|
63
|
+
readonly registry: string;
|
|
61
64
|
}
|
|
62
65
|
export interface ReleaseEvidence {
|
|
63
66
|
readonly modules: readonly ModuleEvidence[];
|
|
64
67
|
readonly ledger: Ledger;
|
|
65
68
|
readonly fragments: readonly ReleaseFragment[];
|
|
66
|
-
/** The publish destination base the digests above were built against. */
|
|
67
|
-
readonly registry?: string;
|
|
68
69
|
}
|
|
69
70
|
/** Why a module is in the plan. A module usually carries several. */
|
|
70
71
|
export type BumpReason = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-plan.d.ts","sourceRoot":"","sources":["../../src/release/release-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,KA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payload-digest.js";
|
|
|
28
28
|
export function planRelease(evidence) {
|
|
29
29
|
const diagnostics = [];
|
|
30
30
|
const byKey = new Map(evidence.modules.map((module) => [module.key, module]));
|
|
31
|
-
checkRegistryAgreement(evidence, diagnostics);
|
|
32
31
|
// What the digest says, per module. A module with no ledger entry has never
|
|
33
32
|
// been published, which is not drift — there is nothing to differ from.
|
|
34
33
|
const drift = new Map();
|
|
@@ -36,6 +35,18 @@ export function planRelease(evidence) {
|
|
|
36
35
|
const recorded = evidence.ledger.modules.get(module.key);
|
|
37
36
|
if (!recorded)
|
|
38
37
|
continue;
|
|
38
|
+
if (recorded.registry && recorded.registry !== module.registry) {
|
|
39
|
+
diagnostics.push({
|
|
40
|
+
severity: "error",
|
|
41
|
+
code: "LEDGER_REGISTRY_MISMATCH",
|
|
42
|
+
message: `${module.key}: its ledger digests were taken against '${recorded.registry}', but this ` +
|
|
43
|
+
`run built against '${module.registry}'. Publishing rewrites each relative import to ` +
|
|
44
|
+
`'<base>/<sibling>@<version>', so the manifest layers of the two are different bytes ` +
|
|
45
|
+
`and comparing them would report the module as changed. Publish to the recorded base, ` +
|
|
46
|
+
`or re-record with \`telo release verify --write\`.`,
|
|
47
|
+
});
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
39
50
|
if (recorded.version !== module.version) {
|
|
40
51
|
diagnostics.push({
|
|
41
52
|
severity: "error",
|
|
@@ -228,24 +239,6 @@ function requestMissingChangelogEntries(modules, entries, diagnostics) {
|
|
|
228
239
|
`One \`telo release add\` can name them all.`,
|
|
229
240
|
});
|
|
230
241
|
}
|
|
231
|
-
/**
|
|
232
|
-
* The base the digests were built against has to be the base they were recorded
|
|
233
|
-
* against, or the manifest layers are not comparable: canonicalization writes
|
|
234
|
-
* the destination into them.
|
|
235
|
-
*/
|
|
236
|
-
function checkRegistryAgreement(evidence, diagnostics) {
|
|
237
|
-
const recorded = evidence.ledger.registry;
|
|
238
|
-
if (!recorded || !evidence.registry || recorded === evidence.registry)
|
|
239
|
-
return;
|
|
240
|
-
diagnostics.push({
|
|
241
|
-
severity: "error",
|
|
242
|
-
code: "LEDGER_REGISTRY_MISMATCH",
|
|
243
|
-
message: `The ledger's digests were taken against '${recorded}', but this run built against ` +
|
|
244
|
-
`'${evidence.registry}'. Publishing rewrites each relative import to ` +
|
|
245
|
-
`'<base>/<sibling>@<version>', so the manifest layers of the two are different bytes ` +
|
|
246
|
-
`and comparing them would report every module as changed.`,
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
242
|
/**
|
|
250
243
|
* Dependency order over in-repo imports — a dependency before its dependents.
|
|
251
244
|
*
|
|
@@ -1,45 +1,125 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `telo-workspace.yaml` — the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
2
|
+
* `telo-workspace.yaml` — the anchor.
|
|
3
|
+
*
|
|
4
|
+
* **Its location is the anchor, and every field lives in a block scoped to what
|
|
5
|
+
* it governs.** Every path the release system names — a module key, a ledger
|
|
6
|
+
* entry, a fragment's `modules:` — is relative to this file's directory, and so
|
|
7
|
+
* is the `.telo` cache. `release:` is what `telo release` reads; `env:` is what
|
|
8
|
+
* `telo run` reads when it resolves a manifest's environment.
|
|
9
|
+
*
|
|
10
|
+
* That rule is why `modules:` sits under `release:` rather than at the top
|
|
11
|
+
* level. It is a release inventory, not an inventory of manifests: it exists so
|
|
12
|
+
* a whole-tree scan does not read every example and every cached
|
|
13
|
+
* `.telo/manifests` copy as something to version and publish, and nothing else
|
|
14
|
+
* consults it — the env walk refuses to, which is why a manifest under
|
|
15
|
+
* `examples/`, in no release subtree, still gets the full walk.
|
|
16
|
+
*
|
|
17
|
+
* The file is **optional and every block in it is optional**. A marker whose
|
|
18
|
+
* whole content is comments is valid: it anchors the cache and bounds the env
|
|
19
|
+
* walk, which is exactly what a runner seeds one for.
|
|
20
|
+
*
|
|
21
|
+
* **The reader is lenient; the diagnostics are the strict half.** It returns
|
|
22
|
+
* everything it could read plus everything it found wrong, each anchored at a
|
|
23
|
+
* key path, because an editor wants all of them and a command wants to exit on
|
|
24
|
+
* the first. Which of them are fatal is the CALLER's policy, not the file's:
|
|
25
|
+
* `telo release` refuses on any error, while `telo run` consumes `env:` alone
|
|
26
|
+
* and prints the rest — aborting every app in a workspace over a release typo is
|
|
27
|
+
* not a trade to make silently.
|
|
28
|
+
*
|
|
29
|
+
* Parsing lives here, in the browser-safe half, because the editor answers "what
|
|
30
|
+
* does changing this library bump?" from the same model. Finding the file on
|
|
31
|
+
* disk is the CLI's half — this side takes text. Gitignore matching is INJECTED
|
|
32
|
+
* (`PatternMatch`) for the same reason: the grammar belongs to the glob package,
|
|
33
|
+
* which this half does not depend on.
|
|
25
34
|
*/
|
|
35
|
+
import { DEFAULT_ENV_FILES, DEFAULT_RELEASE_IGNORE } from "./workspace-schema.js";
|
|
26
36
|
export declare const WORKSPACE_FILENAME = "telo-workspace.yaml";
|
|
37
|
+
export { DEFAULT_ENV_FILES, DEFAULT_RELEASE_IGNORE };
|
|
38
|
+
/** One `release.modules` entry. A bare string in the file normalizes to this
|
|
39
|
+
* with no overrides. */
|
|
40
|
+
export interface ModuleEntry {
|
|
41
|
+
readonly path: string;
|
|
42
|
+
readonly registry?: string;
|
|
43
|
+
readonly ignore?: readonly string[];
|
|
44
|
+
}
|
|
45
|
+
export interface ReleaseSettings {
|
|
46
|
+
readonly registry?: string;
|
|
47
|
+
readonly ignore?: readonly string[];
|
|
48
|
+
readonly modules: readonly ModuleEntry[];
|
|
49
|
+
}
|
|
50
|
+
export interface EnvSettings {
|
|
51
|
+
readonly roots?: readonly string[];
|
|
52
|
+
readonly files?: readonly string[];
|
|
53
|
+
}
|
|
27
54
|
export interface WorkspaceConfig {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
readonly
|
|
55
|
+
readonly release?: ReleaseSettings;
|
|
56
|
+
readonly env?: EnvSettings;
|
|
57
|
+
}
|
|
58
|
+
export type WorkspaceDiagnosticCode = "WORKSPACE_UNKNOWN_KEY" | "WORKSPACE_MODULES_MOVED" | "WORKSPACE_INVALID_VALUE" | "WORKSPACE_ENTRY_MATCHES_NOTHING" | "WORKSPACE_ENTRY_SHADOWED" | "WORKSPACE_MARKER_SHADOWED";
|
|
59
|
+
export interface WorkspaceDiagnostic {
|
|
60
|
+
readonly code: WorkspaceDiagnosticCode;
|
|
61
|
+
readonly severity: "error" | "warning";
|
|
62
|
+
readonly message: string;
|
|
63
|
+
/** Key path from the document root (`["release", "modules", 2, "registry"]`),
|
|
64
|
+
* so a host can anchor a squiggle without re-deriving where it came from. */
|
|
65
|
+
readonly path: readonly (string | number)[];
|
|
66
|
+
}
|
|
67
|
+
export interface WorkspaceRead {
|
|
68
|
+
readonly config: WorkspaceConfig;
|
|
69
|
+
readonly diagnostics: readonly WorkspaceDiagnostic[];
|
|
34
70
|
}
|
|
35
71
|
export declare class WorkspaceConfigError extends Error {
|
|
36
72
|
}
|
|
37
73
|
/**
|
|
38
|
-
*
|
|
74
|
+
* Read the marker's text.
|
|
75
|
+
*
|
|
76
|
+
* Never throws: unreadable YAML is itself a diagnostic, because the one caller
|
|
77
|
+
* that must not abort on it is the run path.
|
|
78
|
+
*/
|
|
79
|
+
export declare function readWorkspaceConfig(text: string, where: string): WorkspaceRead;
|
|
80
|
+
/** The diagnostics anchored inside one top-level block, plus the ones anchored
|
|
81
|
+
* at the document itself (unreadable YAML, a non-mapping root) — those are
|
|
82
|
+
* every block's problem. */
|
|
83
|
+
export declare function diagnosticsFor(diagnostics: readonly WorkspaceDiagnostic[], block: string): readonly WorkspaceDiagnostic[];
|
|
84
|
+
export declare function hasError(diagnostics: readonly WorkspaceDiagnostic[]): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* The release settings, or a throw naming what is missing.
|
|
87
|
+
*
|
|
88
|
+
* `telo release` is the one caller for which any error is fatal, and for which
|
|
89
|
+
* an absent block is itself one: a marker with no `release:` anchors a cache and
|
|
90
|
+
* declares no release scope, which is exactly the state a runner's seeded marker
|
|
91
|
+
* is in.
|
|
92
|
+
*/
|
|
93
|
+
export declare function requireReleaseSettings(read: WorkspaceRead, where: string): ReleaseSettings;
|
|
94
|
+
/**
|
|
95
|
+
* Gitignore-style matching over one authored list.
|
|
96
|
+
*
|
|
97
|
+
* Injected rather than imported: the grammar is the glob package's, and this
|
|
98
|
+
* half is browser-safe. Returns the index of the LAST pattern matching `path`,
|
|
99
|
+
* or `-1` — which is what makes a decision attributable to the entry that made
|
|
100
|
+
* it (the `buildImportUpgrades` environment precedent).
|
|
101
|
+
*/
|
|
102
|
+
export type PatternMatch = (path: string, patterns: readonly string[]) => number;
|
|
103
|
+
export interface ModuleSettings {
|
|
104
|
+
/** Index into `release.modules` of the entry that decided this module. */
|
|
105
|
+
readonly entry: number;
|
|
106
|
+
readonly registry?: string;
|
|
107
|
+
readonly ignore: readonly string[];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Which entry claims `key`, and what it therefore settles.
|
|
111
|
+
*
|
|
112
|
+
* **The last matching entry supplies them** — the rule the list already has,
|
|
113
|
+
* since it is one gitignore-style list evaluated last-match-wins. A negation
|
|
114
|
+
* entry is an exclusion and therefore supplies nothing: a module the last match
|
|
115
|
+
* excludes is not a module of this workspace at all, which is why this returns
|
|
116
|
+
* `undefined` rather than a settings object for it.
|
|
39
117
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* module and every gate would silently pass over a whole repo.
|
|
118
|
+
* The cascade is key-wise and each key's value replaces whole, so an entry
|
|
119
|
+
* naming only `registry:` keeps the block's `ignore:`.
|
|
43
120
|
*/
|
|
44
|
-
export declare function
|
|
121
|
+
export declare function settingsForModule(release: ReleaseSettings, key: string, match: PatternMatch): ModuleSettings | undefined;
|
|
122
|
+
/** Whether `path` is matched by an authored pattern list, negations honoured.
|
|
123
|
+
* `env.roots` and a resolved `ignore` list are both read through this. */
|
|
124
|
+
export declare function matchesPatterns(path: string, patterns: readonly string[], match: PatternMatch): boolean;
|
|
45
125
|
//# sourceMappingURL=workspace-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-config.d.ts","sourceRoot":"","sources":["../../src/release/workspace-config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"workspace-config.d.ts","sourceRoot":"","sources":["../../src/release/workspace-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EAKvB,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;AAErD;yBACyB;AACzB,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CA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