@vivswan/github-settings-as-code 2.0.1-main.699.20261005.g2b5d2ff → 2.0.1-main.703.20261005.g009d788
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/lib/pkg/cli.js +2 -2
- package/lib/pkg/index.d.ts +2 -2
- package/lib/pkg/index.js +3 -3
- package/lib/pkg/internal.d.ts +1 -1
- package/lib/pkg/internal.js +1 -1
- package/lib/pkg/{layers-DcnaJxRg.d.ts → layers-Ha0DTLXD.d.ts} +222 -137
- package/lib/pkg/{inputs-ClH-MkXs.js → run-config-D5tGjVQP.js} +371 -342
- package/lib/pkg/{src-Gr_Qvisc.js → src-C3hEOTns.js} +1 -1
- package/package.json +1 -1
package/lib/pkg/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { F as failRun, Ht as countNoun, Q as maskRegistry,
|
|
3
|
-
import { a as snapshotRepository, o as validateSettings, s as executeRun } from "./src-
|
|
2
|
+
import { F as failRun, Ht as countNoun, Q as maskRegistry, c as RENDER_INPUTS, d as SNAPSHOT_INPUTS, et as redactRanges, f as SNAPSHOT_ONLY_INPUTS, h as GitHubApi, it as skippedSectionKeys, j as readSettingsFile, kt as sectionGrant, l as RENDER_ONLY_INPUTS, mt as SECTIONS, n as parseSnapshotFileConfig, o as INPUT_DECLS, r as snapshotFileDestination, st as describeProblem, t as parseConfig, w as writeReplacing } from "./run-config-D5tGjVQP.js";
|
|
3
|
+
import { a as snapshotRepository, o as validateSettings, s as executeRun } from "./src-C3hEOTns.js";
|
|
4
4
|
import { appendFileSync, existsSync } from "node:fs";
|
|
5
5
|
import { ResultAsync, err } from "neverthrow";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
package/lib/pkg/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $n as
|
|
1
|
+
import { $n as CentralTarget, An as GitHubApi, At as TaggedEndpoint, Bn as OutputName, Bt as ValidatedInput, Cn as DiscoveryFilters, Dn as discoverRepos, Dt as SectionSelection, E as ConfigEnv, Ft as SectionInput, G as failRun, Gn as silentIo, Hn as maskRegistry, In as AnnotationLevel, Jt as OnMissingPermission, Kn as ApiError, Kt as DenialPolicy, Ln as CollectedLine, Lt as SectionModule, M as InputReader, Mn as GitHubClient, Mt as allGraphqlOps, Nn as GraphqlOp, Nt as sectionModule, On as ClientAnswer, Ot as SettingsSource, Pn as RequestMark, Qn as isRateLimitError, Qt as SnapshotContext, Rn as Io, Rt as SectionSnapshot, Sn as DEFAULT_DISCOVERY_FILTERS, Sr as Layering, St as ValidatedSettings, T as runMulti, U as concludeRender, Un as prefixedIo, Ut as sectionGrant, V as FinishedRender, Vn as collectingIo, W as concludeRun, Wn as redactRanges, Xn as classifyApiError, Y as TargetOutcome, Yt as PlanContext, Zn as isPermissionError, Zt as SectionPlan, _ as runSingle, _r as SECTION_KEYS, _t as worstOf, a as RunConfig, an as EndpointDecl, at as deliverArtifactReport, br as UNDECLARED_POLICY_SECTIONS, bt as RepoRunResult, cn as endpointPath, cr as ProblemOf, dr as SettingsProblem, dt as SectionSnapshotOutcome, er as RemoteTarget, f as SnapshotConfig, fn as FoldOptions, ft as SnapshotResult, g as SingleOutcome, gt as RunOutcome, h as SingleConfig, hn as describeRemoval, ht as RUN_RESULTS, i as RunCapabilities, in as SectionFailure, ir as parseRepoSlug, it as ArtifactUploader, jn as GitHubApiOptions, jt as allEndpoints, kn as DEFAULT_API_VERSION, kt as SECTIONS, m as runSnapshot, mn as RemovalNotice, nn as snapshotContext, nr as Target, on as Route, or as LayerProblem, ot as encryptReport, p as concludeSnapshot, pn as Layer, pr as describeProblem, qn as ApiErrorKind, r as readLayerFiles, rn as GraphqlOpDecl, rr as dedupeTargets, rt as openReportChannel, s as parseConfig, sn as endpointMethod, sr as Problem, st as parseRecipient, tn as planContext, tr as RepoRef, tt as PrivateReportChannel, u as FinishedSnapshot, ur as SettingsFileRole, ut as RenderableSnapshot, v as RenderConfig, vn as UndeclaredPolicy, vr as SectionKey, x as MultiConfig, xr as UndeclaredPolicySection, xt as SectionOutcome, y as runRender, yr as SettingsFile, yt as RepoRunOptions, zn as MaskPair, zt as ValidatedBrand } from "./layers-Ha0DTLXD.js";
|
|
2
2
|
import { Result } from "neverthrow";
|
|
3
3
|
//#region src/discovery/central.d.ts
|
|
4
4
|
export declare function resolveCentralTargets(reposDir: string, adminOwner: string): Result<{
|
|
@@ -154,4 +154,4 @@ interface ReportInput {
|
|
|
154
154
|
}
|
|
155
155
|
export declare function composeReport(input: ReportInput): string;
|
|
156
156
|
//#endregion
|
|
157
|
-
export { type AnnotationLevel, type ApiError, type ApplyOptions, type ApplyReport, type ArtifactUploader, type CentralTarget, type CheckOptions, type CheckReport, type ClientAnswer, type CollectedLine, type ConfigEnv, DEFAULT_API_VERSION, DEFAULT_DISCOVERY_FILTERS, type DenialPolicy, type DiscoveryFilters, type EndpointDecl, type FinishedRender, type FinishedSnapshot, GitHubApi, type GitHubApiOptions, type GitHubClient, type GraphqlOp, type GraphqlOpDecl, type InputReader, type Io, type Layer, type Layering, type MaskPair, type MergeOptions, type MergeReport, type MultiConfig, type OnMissingPermission, type OutputName, type PlanContext, type PrivateReportChannel, type Problem, RUN_RESULTS, type RemoteTarget, type RemovalNotice, type RenderConfig, type RepoRef, type ReportInput, type RequestMark, type Route, type RunCapabilities, type RunConfig, type RunDeps, type RunEnd, type RunOutcome, SECTIONS, SECTION_KEYS, type SectionFailure, type SectionInput, type SectionKey, type SectionModule, type SectionOutcome, type SectionPlan, SectionSelection, type SectionSnapshot, type SectionSnapshotOutcome, SettingsFile, type SettingsFileRole, type SingleConfig, type SingleOutcome, type SnapshotConfig, type SnapshotContext, type SnapshotOptions, type SnapshotReport, type TaggedEndpoint, type Target, type TargetOutcome, UNDECLARED_POLICY_SECTIONS, type UndeclaredPolicySection, type ValidateOptions, type ValidateReport, type ValidatedBrand, type ValidatedInput, type ValidatedSettings, allEndpoints, allGraphqlOps, collectingIo, concludeRender, concludeRun, concludeSnapshot, dedupeTargets, deliverArtifactReport, describeProblem, describeRemoval, discoverRepos, encryptReport, endpointMethod, endpointPath, failRun, isPermissionError, isRateLimitError, maskRegistry, openReportChannel, parseConfig, parseRecipient, parseRepoSlug, planContext, prefixedIo, readLayerFiles, redactRanges, runMulti, runRender, runSingle, runSnapshot, sectionGrant, sectionModule, silentIo, snapshotContext, worstOf };
|
|
157
|
+
export { type AnnotationLevel, type ApiError, type ApiErrorKind, type ApplyOptions, type ApplyReport, type ArtifactUploader, type CentralTarget, type CheckOptions, type CheckReport, type ClientAnswer, type CollectedLine, type ConfigEnv, DEFAULT_API_VERSION, DEFAULT_DISCOVERY_FILTERS, type DenialPolicy, type DiscoveryFilters, type EndpointDecl, type FinishedRender, type FinishedSnapshot, GitHubApi, type GitHubApiOptions, type GitHubClient, type GraphqlOp, type GraphqlOpDecl, type InputReader, type Io, type Layer, type Layering, type MaskPair, type MergeOptions, type MergeReport, type MultiConfig, type OnMissingPermission, type OutputName, type PlanContext, type PrivateReportChannel, type Problem, RUN_RESULTS, type RemoteTarget, type RemovalNotice, type RenderConfig, type RepoRef, type ReportInput, type RequestMark, type Route, type RunCapabilities, type RunConfig, type RunDeps, type RunEnd, type RunOutcome, SECTIONS, SECTION_KEYS, type SectionFailure, type SectionInput, type SectionKey, type SectionModule, type SectionOutcome, type SectionPlan, SectionSelection, type SectionSnapshot, type SectionSnapshotOutcome, SettingsFile, type SettingsFileRole, type SingleConfig, type SingleOutcome, type SnapshotConfig, type SnapshotContext, type SnapshotOptions, type SnapshotReport, type TaggedEndpoint, type Target, type TargetOutcome, UNDECLARED_POLICY_SECTIONS, type UndeclaredPolicySection, type ValidateOptions, type ValidateReport, type ValidatedBrand, type ValidatedInput, type ValidatedSettings, allEndpoints, allGraphqlOps, classifyApiError, collectingIo, concludeRender, concludeRun, concludeSnapshot, dedupeTargets, deliverArtifactReport, describeProblem, describeRemoval, discoverRepos, encryptReport, endpointMethod, endpointPath, failRun, isPermissionError, isRateLimitError, maskRegistry, openReportChannel, parseConfig, parseRecipient, parseRepoSlug, planContext, prefixedIo, readLayerFiles, redactRanges, runMulti, runRender, runSingle, runSnapshot, sectionGrant, sectionModule, silentIo, snapshotContext, worstOf };
|
package/lib/pkg/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as prefixedIo, A as parseSettingsDoc, E as readLayerFiles, Et as UNDECLARED_POLICY_SECTIONS, F as failRun, Ft as parseReposInput, J as deliverArtifactReport, Jt as
|
|
2
|
-
import { a as snapshotRepository, c as runRender, i as snapshotRepositories, n as checkRepository, o as validateSettings, r as mergeSettings, s as executeRun, t as applyRepository } from "./src-
|
|
3
|
-
export { DEFAULT_API_VERSION, DEFAULT_DISCOVERY_FILTERS, GitHubApi, RUN_RESULTS, SECTIONS, SECTION_KEYS, SectionSelection, SettingsFile, UNDECLARED_POLICY_SECTIONS, allEndpoints, allGraphqlOps, applyRepository, checkRepository, collectingIo, composeReport, concludeRender, concludeRun, concludeSnapshot, dedupeTargets, deliverArtifactReport, describeProblem, describeRemoval, discoverRepos, encryptReport, endpointMethod, endpointPath, executeRun, failRun, isPermissionError, isRateLimitError, maskRegistry, mergeSettings, openReportChannel, parseConfig, parseRecipient, parseRepoSlug, parseReposInput, parseSettingsDoc, planContext, prefixedIo, readLayerFiles, readSettingsFile, redactRanges, resolveCentralTargets, runMulti, runRender, runSingle, runSnapshot, sectionGrant, sectionModule, silentIo, snapshotContext, snapshotRepositories, snapshotRepository, validateSettings, worstOf };
|
|
1
|
+
import { $ as prefixedIo, A as parseSettingsDoc, E as readLayerFiles, Et as UNDECLARED_POLICY_SECTIONS, F as failRun, Ft as parseReposInput, J as deliverArtifactReport, Jt as isRateLimitError, Kt as classifyApiError, N as concludeRender, Nt as endpointMethod, P as concludeRun, Pt as endpointPath, Q as maskRegistry, Rt as DEFAULT_DISCOVERY_FILTERS, Tt as SettingsFile, U as openReportChannel, Vt as discoverRepos, X as parseRecipient, Xt as dedupeTargets, Y as encryptReport, Yt as resolveCentralTargets, Z as collectingIo, Zt as parseRepoSlug, _ as concludeSnapshot, _t as sectionModule, bt as planContext, dt as worstOf, et as redactRanges, ft as describeRemoval, gt as allGraphqlOps, h as GitHubApi, ht as allEndpoints, j as readSettingsFile, k as runMulti, kt as sectionGrant, lt as SectionSelection, m as DEFAULT_API_VERSION, mt as SECTIONS, q as composeReport, qt as isPermissionError, st as describeProblem, t as parseConfig, tt as silentIo, ut as RUN_RESULTS, v as runSnapshot, wt as SECTION_KEYS, x as runSingle, xt as snapshotContext } from "./run-config-D5tGjVQP.js";
|
|
2
|
+
import { a as snapshotRepository, c as runRender, i as snapshotRepositories, n as checkRepository, o as validateSettings, r as mergeSettings, s as executeRun, t as applyRepository } from "./src-C3hEOTns.js";
|
|
3
|
+
export { DEFAULT_API_VERSION, DEFAULT_DISCOVERY_FILTERS, GitHubApi, RUN_RESULTS, SECTIONS, SECTION_KEYS, SectionSelection, SettingsFile, UNDECLARED_POLICY_SECTIONS, allEndpoints, allGraphqlOps, applyRepository, checkRepository, classifyApiError, collectingIo, composeReport, concludeRender, concludeRun, concludeSnapshot, dedupeTargets, deliverArtifactReport, describeProblem, describeRemoval, discoverRepos, encryptReport, endpointMethod, endpointPath, executeRun, failRun, isPermissionError, isRateLimitError, maskRegistry, mergeSettings, openReportChannel, parseConfig, parseRecipient, parseRepoSlug, parseReposInput, parseSettingsDoc, planContext, prefixedIo, readLayerFiles, readSettingsFile, redactRanges, resolveCentralTargets, runMulti, runRender, runSingle, runSnapshot, sectionGrant, sectionModule, silentIo, snapshotContext, snapshotRepositories, snapshotRepository, validateSettings, worstOf };
|
package/lib/pkg/internal.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as toPublicView, $t as Tolerance, C as
|
|
1
|
+
import { $ as toPublicView, $t as Tolerance, A as InputDecl, B as SNAPSHOT_REJECTED_INPUTS, C as TargetsConfig, Ct as preflightProbe, D as DEFAULT_PRIVATE_REPOS, En as VISIBILITY_FILTERS, Et as validateSettingsDoc, F as RENDER_INPUTS, Fn as TraceIo, Gt as writeGatedReads, H as RunFlowConfig, Ht as readGating, I as RENDER_ONLY_INPUTS, It as SectionMeta, J as PublicTargetView, Jn as SECRET_RESPONSE_WITHHELD, K as PRIVATE_REPOS_POLICIES, Kn as ApiError, L as RENDER_REJECTED_INPUTS, Mn as GitHubClient, N as MODES, O as FILTER_INPUTS, P as Mode, Pt as KeyedListLayering, Q as publicDetail, R as SNAPSHOT_INPUTS, S as ResolvedTargets, Tn as FORKS_FILTERS, Tt as skippedSectionKeys, Vt as denialPosture, Wt as sectionOperations, X as capturingIo, Xt as PlannedOpBase, Yn as SECRET_TRANSPORT_WITHHELD, Z as planRedaction, _n as MustBeNever, ar as CentralFileProblem, b as DEFAULT_SETTINGS_FILE, bn as AFFILIATIONS, bt as RepoRunResult, c as parseSnapshotFileConfig, cr as ProblemOf, ct as RepoVisibility, d as SNAPSHOT_SCHEMA_URL, dn as grantFor, dr as SettingsProblem, en as Unverifiable, et as PRIVATE_REPORT_CHANNELS, fr as TopLevelShape, ft as SnapshotResult, gn as mergeLayers, gr as PROBOT_PARITY_KEYS, hr as DOCUMENT_DIRECTIVE_KEYS, j as InputName, k as INPUT_DECLS, l as snapshotFileDestination, ln as PatResource, lr as RERUN_ADVICE, lt as createVisibilityResolver, mr as quoteList, mt as renderSnapshotYaml, n as foldLayers, nt as applyMarkerInjection, o as SnapshotFileConfig, or as LayerProblem, pt as SnapshotRunOptions, q as PrivateReposPolicy, qt as Justification, t as FoldedLayers, un as SectionPermission, ut as RenderableSnapshot, vn as UndeclaredPolicy, vt as RepoResult, w as resolveTargets, wn as DiscoveryProblem, wt as runForRepo, xn as ARCHIVED_FILTERS, yn as UndeclaredPolicyList, yt as RepoRunOptions, z as SNAPSHOT_ONLY_INPUTS } from "./layers-Ha0DTLXD.js";
|
|
2
2
|
import { Result } from "neverthrow";
|
|
3
3
|
//#region src/engine/canonical.d.ts
|
|
4
4
|
/** The document as a fresh tree in the canonical order; the input is left as it was. */
|
package/lib/pkg/internal.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { At as sectionOperations, B as toPublicView, Bt as VISIBILITY_FILTERS, Ct as PROBOT_PARITY_KEYS, D as DEFAULT_SETTINGS_FILE, Dt as denialPosture, G as MARKER_LABEL, Gt as SECRET_TRANSPORT_WITHHELD, H as applyMarkerInjection, Ht as countNoun, I as PRIVATE_REPOS_POLICIES, It as AFFILIATIONS, K as MARKER_LABEL_CONFIG, L as capturingIo, Lt as ARCHIVED_FILTERS, M as getRepoFile, Mt as grantFor, O as resolveTargets, Ot as readGating, R as planRedaction, St as DOCUMENT_DIRECTIVE_KEYS, T as foldLayers, Ut as createVisibilityResolver, V as PRIVATE_REPORT_CHANNELS, W as ISSUE_TITLE, Wt as SECRET_RESPONSE_WITHHELD, a as
|
|
1
|
+
import { At as sectionOperations, B as toPublicView, Bt as VISIBILITY_FILTERS, Ct as PROBOT_PARITY_KEYS, D as DEFAULT_SETTINGS_FILE, Dt as denialPosture, G as MARKER_LABEL, Gt as SECRET_TRANSPORT_WITHHELD, H as applyMarkerInjection, Ht as countNoun, I as PRIVATE_REPOS_POLICIES, It as AFFILIATIONS, K as MARKER_LABEL_CONFIG, L as capturingIo, Lt as ARCHIVED_FILTERS, M as getRepoFile, Mt as grantFor, O as resolveTargets, Ot as readGating, R as planRedaction, St as DOCUMENT_DIRECTIVE_KEYS, T as foldLayers, Ut as createVisibilityResolver, V as PRIVATE_REPORT_CHANNELS, W as ISSUE_TITLE, Wt as SECRET_RESPONSE_WITHHELD, a as FILTER_INPUTS, at as validateSettingsDoc, c as RENDER_INPUTS, ct as quoteList, d as SNAPSHOT_INPUTS, f as SNAPSHOT_ONLY_INPUTS, g as SNAPSHOT_SCHEMA_URL, i as DEFAULT_PRIVATE_REPOS, it as skippedSectionKeys, jt as writeGatedReads, l as RENDER_ONLY_INPUTS, n as parseSnapshotFileConfig, nt as preflightProbe, o as INPUT_DECLS, ot as RERUN_ADVICE, p as SNAPSHOT_REJECTED_INPUTS, pt as mergeLayers, r as snapshotFileDestination, rt as runForRepo, s as MODES, u as RENDER_REJECTED_INPUTS, vt as canonicalDocument, w as writeReplacing, y as renderSnapshotYaml, yt as renderCanonicalYaml, z as publicDetail, zt as FORKS_FILTERS } from "./run-config-D5tGjVQP.js";
|
|
2
2
|
import "./internal-la_KkjCS.js";
|
|
3
3
|
export { AFFILIATIONS, ARCHIVED_FILTERS, DEFAULT_PRIVATE_REPOS, DEFAULT_SETTINGS_FILE, DOCUMENT_DIRECTIVE_KEYS, FILTER_INPUTS, FORKS_FILTERS, INPUT_DECLS, ISSUE_TITLE, MARKER_LABEL, MARKER_LABEL_CONFIG, MODES, PRIVATE_REPORT_CHANNELS, PRIVATE_REPOS_POLICIES, PROBOT_PARITY_KEYS, RENDER_INPUTS, RENDER_ONLY_INPUTS, RENDER_REJECTED_INPUTS, RERUN_ADVICE, SECRET_RESPONSE_WITHHELD, SECRET_TRANSPORT_WITHHELD, SNAPSHOT_INPUTS, SNAPSHOT_ONLY_INPUTS, SNAPSHOT_REJECTED_INPUTS, SNAPSHOT_SCHEMA_URL, VISIBILITY_FILTERS, applyMarkerInjection, canonicalDocument, capturingIo, countNoun, createVisibilityResolver, denialPosture, foldLayers, getRepoFile, grantFor, mergeLayers, parseSnapshotFileConfig, planRedaction, preflightProbe, publicDetail, quoteList, readGating, renderCanonicalYaml, renderSnapshotYaml, resolveTargets, runForRepo, sectionOperations, skippedSectionKeys, snapshotFileDestination, toPublicView, validateSettingsDoc, writeGatedReads, writeReplacing };
|
|
@@ -1778,6 +1778,13 @@ interface ApiError {
|
|
|
1778
1778
|
*/
|
|
1779
1779
|
declare const SECRET_RESPONSE_WITHHELD = "response body withheld: the request carried a secret field and an error body may echo its value";
|
|
1780
1780
|
declare const SECRET_TRANSPORT_WITHHELD = "the transport failed before an HTTP response arrived (details withheld: the request carried a secret field)";
|
|
1781
|
+
/**
|
|
1782
|
+
* Decided in classifyApiError alone; consumers switch on it and never re-read the status or message for the answer.
|
|
1783
|
+
* A 404 folds into "permission" because fine-grained tokens answer 404 on an endpoint they deny, so an absent
|
|
1784
|
+
* resource lands there too (failureFor's prose says so).
|
|
1785
|
+
*/
|
|
1786
|
+
type ApiErrorKind = "rate-limit" | "permission" | "other";
|
|
1787
|
+
declare function classifyApiError(error: ApiError): ApiErrorKind;
|
|
1781
1788
|
/** The library's named views of classifyApiError (src/index.ts, docs/reference/library.md); internal code switches on the kind itself. */
|
|
1782
1789
|
declare function isRateLimitError(error: ApiError): boolean;
|
|
1783
1790
|
declare function isPermissionError(error: ApiError): boolean;
|
|
@@ -3709,7 +3716,7 @@ declare const ENDPOINTS: {
|
|
|
3709
3716
|
};
|
|
3710
3717
|
};
|
|
3711
3718
|
//#endregion
|
|
3712
|
-
//#region src/sections/branches/graphql-
|
|
3719
|
+
//#region src/sections/branches/graphql-ops.d.ts
|
|
3713
3720
|
declare const GRAPHQL: {
|
|
3714
3721
|
readonly rulesQuery: {
|
|
3715
3722
|
readonly name: "BranchProtectionRules";
|
|
@@ -6909,7 +6916,58 @@ declare const byKey: {
|
|
|
6909
6916
|
};
|
|
6910
6917
|
};
|
|
6911
6918
|
};
|
|
6912
|
-
shape: z.
|
|
6919
|
+
shape: z.ZodObject<{
|
|
6920
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
6921
|
+
allowed_actions: z.ZodOptional<z.ZodEnum<{
|
|
6922
|
+
all: "all";
|
|
6923
|
+
local_only: "local_only";
|
|
6924
|
+
selected: "selected";
|
|
6925
|
+
}>>;
|
|
6926
|
+
sha_pinning_required: z.ZodOptional<z.ZodBoolean>;
|
|
6927
|
+
selected_actions: z.ZodOptional<z.ZodObject<{
|
|
6928
|
+
github_owned_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
6929
|
+
verified_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
6930
|
+
patterns_allowed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6931
|
+
}, z.core.$strict>>;
|
|
6932
|
+
default_workflow_permissions: z.ZodOptional<z.ZodEnum<{
|
|
6933
|
+
read: "read";
|
|
6934
|
+
write: "write";
|
|
6935
|
+
}>>;
|
|
6936
|
+
can_approve_pull_request_reviews: z.ZodOptional<z.ZodBoolean>;
|
|
6937
|
+
access_level: z.ZodOptional<z.ZodEnum<{
|
|
6938
|
+
none: "none";
|
|
6939
|
+
organization: "organization";
|
|
6940
|
+
user: "user";
|
|
6941
|
+
}>>;
|
|
6942
|
+
artifact_and_log_retention: z.ZodOptional<z.ZodObject<{
|
|
6943
|
+
days: z.ZodInt;
|
|
6944
|
+
}, z.core.$strip>>;
|
|
6945
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
6946
|
+
max_cache_retention_days: z.ZodOptional<z.ZodInt>;
|
|
6947
|
+
max_cache_size_gb: z.ZodOptional<z.ZodInt>;
|
|
6948
|
+
}, z.core.$strict>>;
|
|
6949
|
+
oidc_customization_sub: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6950
|
+
use_default: z.ZodLiteral<true>;
|
|
6951
|
+
use_immutable_subject: z.ZodOptional<z.ZodBoolean>;
|
|
6952
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6953
|
+
use_default: z.ZodLiteral<false>;
|
|
6954
|
+
include_claim_keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6955
|
+
use_immutable_subject: z.ZodOptional<z.ZodBoolean>;
|
|
6956
|
+
}, z.core.$strip>], "use_default">>;
|
|
6957
|
+
fork_pr_contributor_approval: z.ZodOptional<z.ZodObject<{
|
|
6958
|
+
approval_policy: z.ZodEnum<{
|
|
6959
|
+
all_external_contributors: "all_external_contributors";
|
|
6960
|
+
first_time_contributors: "first_time_contributors";
|
|
6961
|
+
first_time_contributors_new_to_github: "first_time_contributors_new_to_github";
|
|
6962
|
+
}>;
|
|
6963
|
+
}, z.core.$strip>>;
|
|
6964
|
+
fork_pr_workflows_private_repos: z.ZodOptional<z.ZodObject<{
|
|
6965
|
+
run_workflows_from_fork_pull_requests: z.ZodBoolean;
|
|
6966
|
+
send_write_tokens_to_workflows: z.ZodOptional<z.ZodBoolean>;
|
|
6967
|
+
send_secrets_and_variables: z.ZodOptional<z.ZodBoolean>;
|
|
6968
|
+
require_approval_for_fork_pr_workflows: z.ZodOptional<z.ZodBoolean>;
|
|
6969
|
+
}, z.core.$strip>>;
|
|
6970
|
+
}, z.core.$strip>;
|
|
6913
6971
|
plan(ctx: PlanContext<{
|
|
6914
6972
|
readonly getPermissions: {
|
|
6915
6973
|
readonly route: "GET /repos/{owner}/{repo}/actions/permissions";
|
|
@@ -7557,7 +7615,12 @@ declare const byKey: {
|
|
|
7557
7615
|
readonly alwaysRewrite: true;
|
|
7558
7616
|
};
|
|
7559
7617
|
};
|
|
7560
|
-
shape: z.
|
|
7618
|
+
shape: z.ZodObject<{
|
|
7619
|
+
auto_trigger_checks: z.ZodArray<z.ZodObject<{
|
|
7620
|
+
app_id: z.ZodInt;
|
|
7621
|
+
setting: z.ZodBoolean;
|
|
7622
|
+
}, z.core.$strip>>;
|
|
7623
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
7561
7624
|
plan(_ctx: PlanContext<{
|
|
7562
7625
|
readonly update: {
|
|
7563
7626
|
readonly route: "PATCH /repos/{owner}/{repo}/check-suites/preferences";
|
|
@@ -7622,7 +7685,22 @@ declare const byKey: {
|
|
|
7622
7685
|
};
|
|
7623
7686
|
};
|
|
7624
7687
|
};
|
|
7625
|
-
shape: z.
|
|
7688
|
+
shape: z.ZodNullable<z.ZodObject<{
|
|
7689
|
+
build_type: z.ZodOptional<z.ZodEnum<{
|
|
7690
|
+
legacy: "legacy";
|
|
7691
|
+
workflow: "workflow";
|
|
7692
|
+
}>>;
|
|
7693
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
7694
|
+
branch: z.ZodString;
|
|
7695
|
+
path: z.ZodOptional<z.ZodEnum<{
|
|
7696
|
+
"/": "/";
|
|
7697
|
+
"/docs": "/docs";
|
|
7698
|
+
}>>;
|
|
7699
|
+
}, z.core.$strip>>;
|
|
7700
|
+
cname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7701
|
+
https_enforced: z.ZodOptional<z.ZodBoolean>;
|
|
7702
|
+
public: z.ZodOptional<z.ZodBoolean>;
|
|
7703
|
+
}, z.core.$strip>>;
|
|
7626
7704
|
plan(ctx: PlanContext<{
|
|
7627
7705
|
readonly get: {
|
|
7628
7706
|
readonly route: "GET /repos/{owner}/{repo}/pages";
|
|
@@ -9380,126 +9458,12 @@ interface FinishedRender {
|
|
|
9380
9458
|
}
|
|
9381
9459
|
declare function concludeRender(io: Io, run: FinishedRender): number;
|
|
9382
9460
|
//#endregion
|
|
9383
|
-
//#region src/flows/
|
|
9384
|
-
/** The single source for the action.yml `settings-file` default, the multi-repo override guard in src/flows/inputs.ts, and the prose below. */
|
|
9385
|
-
declare const DEFAULT_SETTINGS_FILE = ".github/settings.yml";
|
|
9386
|
-
/**
|
|
9387
|
-
* Where a multi-repo run's targets come from and how their slugs may appear:
|
|
9388
|
-
* the inputs resolveTargets reads. Apply, check, and snapshot share it, so
|
|
9389
|
-
* the three modes name the same fleet from the same inputs.
|
|
9390
|
-
*/
|
|
9391
|
-
interface TargetsConfig extends Pick<RunFlowConfig, "privateRepos" | "selfSlug"> {
|
|
9392
|
-
reposDir: string;
|
|
9393
|
-
reposInput: string;
|
|
9394
|
-
/** The owner a bare `<name>.yml` file under repos-dir belongs to. */
|
|
9395
|
-
adminOwner: string;
|
|
9396
|
-
discoveryFilters: DiscoveryFilters;
|
|
9397
|
-
/** Filter inputs the user explicitly set, for the misuse rejections. */
|
|
9398
|
-
discoveryFiltersSet: string[];
|
|
9399
|
-
}
|
|
9400
|
-
interface MultiConfig extends RunFlowConfig, TargetsConfig {
|
|
9401
|
-
defaultsFile: string;
|
|
9402
|
-
}
|
|
9403
|
-
/** The fleet a run acts on, with the redaction decision every target reports under. */
|
|
9404
|
-
interface ResolvedTargets {
|
|
9405
|
-
/** Deduped, central first, in the order the run processes them. */
|
|
9406
|
-
targets: Target[];
|
|
9407
|
-
plan: RedactionPlan;
|
|
9408
|
-
/** A slug's resolved visibility; "unknown" for a slug never resolved. */
|
|
9409
|
-
visibilityOf: (slug: string) => RepoVisibility;
|
|
9410
|
-
}
|
|
9411
|
-
/**
|
|
9412
|
-
* Resolve the run's targets (repos-dir files, explicit repos, "*" discovery),
|
|
9413
|
-
* decide redaction, and register every masked slug BEFORE the first line is
|
|
9414
|
-
* emitted. A config problem (bad repos input, discovery failure, misplaced
|
|
9415
|
-
* filters, no targets) comes back as the error; nothing has been emitted about
|
|
9416
|
-
* a target when it does.
|
|
9417
|
-
*/
|
|
9418
|
-
declare function resolveTargets(api: GitHubClient, cfg: TargetsConfig, io: Io): ResultAsync<ResolvedTargets, Problem>;
|
|
9419
|
-
/**
|
|
9420
|
-
* Multi-repo orchestration. Config-level problems (bad defaults file, no
|
|
9421
|
-
* targets, duplicate definitions, discovery failure) come back as the error
|
|
9422
|
-
* before any target executes; per-target problems mark that target failed or
|
|
9423
|
-
* skipped and never stop the others.
|
|
9424
|
-
*/
|
|
9425
|
-
declare function runMulti(api: GitHubClient, cfg: MultiConfig, io: Io, uploader?: ArtifactUploader): ResultAsync<TargetOutcome[], Problem>;
|
|
9426
|
-
//#endregion
|
|
9427
|
-
//#region src/flows/render.d.ts
|
|
9428
|
-
interface RenderConfig extends FoldOptions {
|
|
9429
|
-
settingsFiles: string[];
|
|
9430
|
-
renderedFile: string;
|
|
9431
|
-
}
|
|
9432
|
-
declare function runRender(cfg: RenderConfig, io: Io): Result<FinishedRender, Problem>;
|
|
9433
|
-
//#endregion
|
|
9434
|
-
//#region src/flows/single.d.ts
|
|
9435
|
-
interface SingleConfig extends RunFlowConfig {
|
|
9436
|
-
repo: RepoRef;
|
|
9437
|
-
settingsFile: string;
|
|
9438
|
-
}
|
|
9439
|
-
type SingleOutcome = Omit<TargetOutcome, "source">;
|
|
9440
|
-
declare function runSingle(api: GitHubClient, cfg: SingleConfig, io: Io, uploader?: ArtifactUploader): ResultAsync<SingleOutcome, Problem>;
|
|
9441
|
-
//#endregion
|
|
9442
|
-
//#region src/flows/snapshot.d.ts
|
|
9443
|
-
/**
|
|
9444
|
-
* The schema the written file's editor hint points at: the schema of this
|
|
9445
|
-
* release line, spelled as the README's quick start spells it. The marker
|
|
9446
|
-
* lets a major release rewrite the tag here (release-please-config.json lists
|
|
9447
|
-
* this file); test/docs/readme.test.ts pins it to the README's hint.
|
|
9448
|
-
*/
|
|
9449
|
-
declare const SNAPSHOT_SCHEMA_URL = "https://raw.githubusercontent.com/Vivswan/github-settings-as-code/v2/lib/settings.schema.json";
|
|
9450
|
-
interface SnapshotConfigBase {
|
|
9451
|
-
onMissingPermission: "fail" | "warn";
|
|
9452
|
-
/** The allowlist; its required set is unused, since a snapshot never writes. */
|
|
9453
|
-
sections: SectionSelection;
|
|
9454
|
-
/** Whether to hide private/internal targets from the public view. */
|
|
9455
|
-
privateRepos: PrivateReposPolicy;
|
|
9456
|
-
/** The repository the run acts for; a target equal to it is never redacted. */
|
|
9457
|
-
selfSlug: string;
|
|
9458
|
-
}
|
|
9459
|
-
/**
|
|
9460
|
-
* A mode: snapshot run: one repository written to `snapshotFile`, or the
|
|
9461
|
-
* multi-repo targets (resolved exactly as apply resolves them) written under
|
|
9462
|
-
* `snapshotDir` as `<owner>/<name>.yml` each. No settings file, no report
|
|
9463
|
-
* channel: a snapshot reads and writes a file, and the type carries that.
|
|
9464
|
-
*/
|
|
9465
|
-
type SnapshotConfig = (SnapshotConfigBase & {
|
|
9466
|
-
form: "file";
|
|
9467
|
-
repo: RepoRef;
|
|
9468
|
-
snapshotFile: string;
|
|
9469
|
-
}) | (SnapshotConfigBase & TargetsConfig & {
|
|
9470
|
-
form: "dir";
|
|
9471
|
-
snapshotDir: string;
|
|
9472
|
-
});
|
|
9473
|
-
/**
|
|
9474
|
-
* A finished mode: snapshot run as runSnapshot hands it over: every target
|
|
9475
|
-
* closed through its channel, so a redacted one is sealed with its transcript
|
|
9476
|
-
* and concludeSnapshot opens only the public view. `takenAt` is the run's one
|
|
9477
|
-
* moment (an ISO-8601 UTC instant), which the summary states and no file carries.
|
|
9478
|
-
*/
|
|
9479
|
-
type FinishedSnapshot = {
|
|
9480
|
-
form: "file";
|
|
9481
|
-
takenAt: string;
|
|
9482
|
-
target: Omit<TargetOutcome, "source">;
|
|
9483
|
-
} | {
|
|
9484
|
-
form: "dir";
|
|
9485
|
-
takenAt: string;
|
|
9486
|
-
snapshotDir: string;
|
|
9487
|
-
targets: TargetOutcome[];
|
|
9488
|
-
};
|
|
9461
|
+
//#region src/flows/inputs.d.ts
|
|
9489
9462
|
/**
|
|
9490
|
-
*
|
|
9491
|
-
*
|
|
9492
|
-
*
|
|
9493
|
-
* concludeSnapshot turns into the summary, the outputs, and the exit code.
|
|
9463
|
+
* The input declarations: INPUT_DECLS is the single source action.yml and the inputs reference are generated from,
|
|
9464
|
+
* and the per-mode lists beside it say which declared inputs each mode reads, so a CLI reads the same declarations
|
|
9465
|
+
* the action does.
|
|
9494
9466
|
*/
|
|
9495
|
-
declare function runSnapshot(api: GitHubClient, cfg: SnapshotConfig, io: Io): ResultAsync<FinishedSnapshot, Problem>;
|
|
9496
|
-
/**
|
|
9497
|
-
* A finished mode: snapshot run: the public view is projected first, so nothing below carries a redacted slug; then
|
|
9498
|
-
* the summary, the outputs, the result line, and the exit code as every mode ends.
|
|
9499
|
-
*/
|
|
9500
|
-
declare function concludeSnapshot(io: Io, finished: FinishedSnapshot): number;
|
|
9501
|
-
//#endregion
|
|
9502
|
-
//#region src/flows/inputs.d.ts
|
|
9503
9467
|
/** Default `private-repos`, pinned against action.yml by the contract test. */
|
|
9504
9468
|
declare const DEFAULT_PRIVATE_REPOS = "redact";
|
|
9505
9469
|
/**
|
|
@@ -9655,20 +9619,6 @@ type Mode = (typeof MODES)[number];
|
|
|
9655
9619
|
*/
|
|
9656
9620
|
declare const RENDER_ONLY_INPUTS: readonly ["rendered-file", "layering"];
|
|
9657
9621
|
declare const SNAPSHOT_ONLY_INPUTS: readonly ["snapshot-file", "snapshot-dir"];
|
|
9658
|
-
/** selfSlug (GITHUB_REPOSITORY) and runUrl are read from the environment once here, so the run flows stay env-free. */
|
|
9659
|
-
interface CommonConfig extends RunFlowConfig {
|
|
9660
|
-
token: string;
|
|
9661
|
-
apiVersion: string;
|
|
9662
|
-
}
|
|
9663
|
-
type RunConfig = (CommonConfig & (({
|
|
9664
|
-
kind: "single";
|
|
9665
|
-
} & SingleConfig) | ({
|
|
9666
|
-
kind: "multi";
|
|
9667
|
-
} & MultiConfig))) | ({
|
|
9668
|
-
kind: "render";
|
|
9669
|
-
} & RenderConfig) | ({
|
|
9670
|
-
kind: "snapshot";
|
|
9671
|
-
} & Pick<CommonConfig, "token" | "apiVersion"> & SnapshotConfig);
|
|
9672
9622
|
/**
|
|
9673
9623
|
* `token` is tolerated unread (a workflow commonly sets it on every step). Every declared input NOT listed here is an
|
|
9674
9624
|
* apply/check control, so the merge rejects it unless it holds its declared default, which the runner supplies whether
|
|
@@ -9690,6 +9640,141 @@ declare const SNAPSHOT_INPUTS: readonly ["token", "repository", "mode", "snapsho
|
|
|
9690
9640
|
* exported so the snapshot guide's table is pinned to the whole set.
|
|
9691
9641
|
*/
|
|
9692
9642
|
declare const SNAPSHOT_REJECTED_INPUTS: readonly InputName[];
|
|
9643
|
+
//#endregion
|
|
9644
|
+
//#region src/flows/multi.d.ts
|
|
9645
|
+
/** The single source for the action.yml `settings-file` default, the multi-repo override guard in src/flows/run-config.ts, and the prose below. */
|
|
9646
|
+
declare const DEFAULT_SETTINGS_FILE = ".github/settings.yml";
|
|
9647
|
+
/**
|
|
9648
|
+
* Where a multi-repo run's targets come from and how their slugs may appear:
|
|
9649
|
+
* the inputs resolveTargets reads. Apply, check, and snapshot share it, so
|
|
9650
|
+
* the three modes name the same fleet from the same inputs.
|
|
9651
|
+
*/
|
|
9652
|
+
interface TargetsConfig extends Pick<RunFlowConfig, "privateRepos" | "selfSlug"> {
|
|
9653
|
+
reposDir: string;
|
|
9654
|
+
reposInput: string;
|
|
9655
|
+
/** The owner a bare `<name>.yml` file under repos-dir belongs to. */
|
|
9656
|
+
adminOwner: string;
|
|
9657
|
+
discoveryFilters: DiscoveryFilters;
|
|
9658
|
+
/** Filter inputs the user explicitly set, for the misuse rejections. */
|
|
9659
|
+
discoveryFiltersSet: string[];
|
|
9660
|
+
}
|
|
9661
|
+
interface MultiConfig extends RunFlowConfig, TargetsConfig {
|
|
9662
|
+
defaultsFile: string;
|
|
9663
|
+
}
|
|
9664
|
+
/** The fleet a run acts on, with the redaction decision every target reports under. */
|
|
9665
|
+
interface ResolvedTargets {
|
|
9666
|
+
/** Deduped, central first, in the order the run processes them. */
|
|
9667
|
+
targets: Target[];
|
|
9668
|
+
plan: RedactionPlan;
|
|
9669
|
+
/** A slug's resolved visibility; "unknown" for a slug never resolved. */
|
|
9670
|
+
visibilityOf: (slug: string) => RepoVisibility;
|
|
9671
|
+
}
|
|
9672
|
+
/**
|
|
9673
|
+
* Resolve the run's targets (repos-dir files, explicit repos, "*" discovery),
|
|
9674
|
+
* decide redaction, and register every masked slug BEFORE the first line is
|
|
9675
|
+
* emitted. A config problem (bad repos input, discovery failure, misplaced
|
|
9676
|
+
* filters, no targets) comes back as the error; nothing has been emitted about
|
|
9677
|
+
* a target when it does.
|
|
9678
|
+
*/
|
|
9679
|
+
declare function resolveTargets(api: GitHubClient, cfg: TargetsConfig, io: Io): ResultAsync<ResolvedTargets, Problem>;
|
|
9680
|
+
/**
|
|
9681
|
+
* Multi-repo orchestration. Config-level problems (bad defaults file, no
|
|
9682
|
+
* targets, duplicate definitions, discovery failure) come back as the error
|
|
9683
|
+
* before any target executes; per-target problems mark that target failed or
|
|
9684
|
+
* skipped and never stop the others.
|
|
9685
|
+
*/
|
|
9686
|
+
declare function runMulti(api: GitHubClient, cfg: MultiConfig, io: Io, uploader?: ArtifactUploader): ResultAsync<TargetOutcome[], Problem>;
|
|
9687
|
+
//#endregion
|
|
9688
|
+
//#region src/flows/render.d.ts
|
|
9689
|
+
interface RenderConfig extends FoldOptions {
|
|
9690
|
+
settingsFiles: string[];
|
|
9691
|
+
renderedFile: string;
|
|
9692
|
+
}
|
|
9693
|
+
declare function runRender(cfg: RenderConfig, io: Io): Result<FinishedRender, Problem>;
|
|
9694
|
+
//#endregion
|
|
9695
|
+
//#region src/flows/single.d.ts
|
|
9696
|
+
interface SingleConfig extends RunFlowConfig {
|
|
9697
|
+
repo: RepoRef;
|
|
9698
|
+
settingsFile: string;
|
|
9699
|
+
}
|
|
9700
|
+
type SingleOutcome = Omit<TargetOutcome, "source">;
|
|
9701
|
+
declare function runSingle(api: GitHubClient, cfg: SingleConfig, io: Io, uploader?: ArtifactUploader): ResultAsync<SingleOutcome, Problem>;
|
|
9702
|
+
//#endregion
|
|
9703
|
+
//#region src/flows/snapshot.d.ts
|
|
9704
|
+
/**
|
|
9705
|
+
* The schema the written file's editor hint points at: the schema of this
|
|
9706
|
+
* release line, spelled as the README's quick start spells it. The marker
|
|
9707
|
+
* lets a major release rewrite the tag here (release-please-config.json lists
|
|
9708
|
+
* this file); test/docs/readme.test.ts pins it to the README's hint.
|
|
9709
|
+
*/
|
|
9710
|
+
declare const SNAPSHOT_SCHEMA_URL = "https://raw.githubusercontent.com/Vivswan/github-settings-as-code/v2/lib/settings.schema.json";
|
|
9711
|
+
interface SnapshotConfigBase {
|
|
9712
|
+
onMissingPermission: "fail" | "warn";
|
|
9713
|
+
/** The allowlist; its required set is unused, since a snapshot never writes. */
|
|
9714
|
+
sections: SectionSelection;
|
|
9715
|
+
/** Whether to hide private/internal targets from the public view. */
|
|
9716
|
+
privateRepos: PrivateReposPolicy;
|
|
9717
|
+
/** The repository the run acts for; a target equal to it is never redacted. */
|
|
9718
|
+
selfSlug: string;
|
|
9719
|
+
}
|
|
9720
|
+
/**
|
|
9721
|
+
* A mode: snapshot run: one repository written to `snapshotFile`, or the
|
|
9722
|
+
* multi-repo targets (resolved exactly as apply resolves them) written under
|
|
9723
|
+
* `snapshotDir` as `<owner>/<name>.yml` each. No settings file, no report
|
|
9724
|
+
* channel: a snapshot reads and writes a file, and the type carries that.
|
|
9725
|
+
*/
|
|
9726
|
+
type SnapshotConfig = (SnapshotConfigBase & {
|
|
9727
|
+
form: "file";
|
|
9728
|
+
repo: RepoRef;
|
|
9729
|
+
snapshotFile: string;
|
|
9730
|
+
}) | (SnapshotConfigBase & TargetsConfig & {
|
|
9731
|
+
form: "dir";
|
|
9732
|
+
snapshotDir: string;
|
|
9733
|
+
});
|
|
9734
|
+
/**
|
|
9735
|
+
* A finished mode: snapshot run as runSnapshot hands it over: every target
|
|
9736
|
+
* closed through its channel, so a redacted one is sealed with its transcript
|
|
9737
|
+
* and concludeSnapshot opens only the public view. `takenAt` is the run's one
|
|
9738
|
+
* moment (an ISO-8601 UTC instant), which the summary states and no file carries.
|
|
9739
|
+
*/
|
|
9740
|
+
type FinishedSnapshot = {
|
|
9741
|
+
form: "file";
|
|
9742
|
+
takenAt: string;
|
|
9743
|
+
target: Omit<TargetOutcome, "source">;
|
|
9744
|
+
} | {
|
|
9745
|
+
form: "dir";
|
|
9746
|
+
takenAt: string;
|
|
9747
|
+
snapshotDir: string;
|
|
9748
|
+
targets: TargetOutcome[];
|
|
9749
|
+
};
|
|
9750
|
+
/**
|
|
9751
|
+
* Execute a mode: snapshot run. A destination that would overwrite an authored
|
|
9752
|
+
* file, or a fleet that cannot be resolved, comes back as the error before any
|
|
9753
|
+
* target is read; otherwise every target's closed outcome, which
|
|
9754
|
+
* concludeSnapshot turns into the summary, the outputs, and the exit code.
|
|
9755
|
+
*/
|
|
9756
|
+
declare function runSnapshot(api: GitHubClient, cfg: SnapshotConfig, io: Io): ResultAsync<FinishedSnapshot, Problem>;
|
|
9757
|
+
/**
|
|
9758
|
+
* A finished mode: snapshot run: the public view is projected first, so nothing below carries a redacted slug; then
|
|
9759
|
+
* the summary, the outputs, the result line, and the exit code as every mode ends.
|
|
9760
|
+
*/
|
|
9761
|
+
declare function concludeSnapshot(io: Io, finished: FinishedSnapshot): number;
|
|
9762
|
+
//#endregion
|
|
9763
|
+
//#region src/flows/run-config.d.ts
|
|
9764
|
+
/** selfSlug (GITHUB_REPOSITORY) and runUrl are read from the environment once here, so the run flows stay env-free. */
|
|
9765
|
+
interface CommonConfig extends RunFlowConfig {
|
|
9766
|
+
token: string;
|
|
9767
|
+
apiVersion: string;
|
|
9768
|
+
}
|
|
9769
|
+
type RunConfig = (CommonConfig & (({
|
|
9770
|
+
kind: "single";
|
|
9771
|
+
} & SingleConfig) | ({
|
|
9772
|
+
kind: "multi";
|
|
9773
|
+
} & MultiConfig))) | ({
|
|
9774
|
+
kind: "render";
|
|
9775
|
+
} & RenderConfig) | ({
|
|
9776
|
+
kind: "snapshot";
|
|
9777
|
+
} & Pick<CommonConfig, "token" | "apiVersion"> & SnapshotConfig);
|
|
9693
9778
|
/** The file form of a mode: snapshot run: one repository written to snapshotFile. */
|
|
9694
9779
|
type SnapshotFileConfig = Extract<RunConfig, {
|
|
9695
9780
|
kind: "snapshot";
|
|
@@ -9732,4 +9817,4 @@ interface FoldedLayers {
|
|
|
9732
9817
|
*/
|
|
9733
9818
|
declare function foldLayers(layers: readonly Layer[], sourceLabel: string, options: FoldOptions, io: Io): Result<FoldedLayers, SettingsProblem | LayerProblem>;
|
|
9734
9819
|
//#endregion
|
|
9735
|
-
export { toPublicView as $,
|
|
9820
|
+
export { toPublicView as $, CentralTarget as $n, Tolerance as $t, InputDecl as A, GitHubApi as An, TaggedEndpoint as At, SNAPSHOT_REJECTED_INPUTS as B, OutputName as Bn, ValidatedInput as Bt, TargetsConfig as C, DiscoveryFilters as Cn, preflightProbe as Ct, DEFAULT_PRIVATE_REPOS as D, discoverRepos as Dn, SectionSelection as Dt, ConfigEnv as E, VISIBILITY_FILTERS as En, validateSettingsDoc as Et, RENDER_INPUTS as F, TraceIo as Fn, SectionInput as Ft, failRun as G, silentIo as Gn, writeGatedReads as Gt, RunFlowConfig as H, maskRegistry as Hn, readGating as Ht, RENDER_ONLY_INPUTS as I, AnnotationLevel as In, SectionMeta as It, PublicTargetView as J, SECRET_RESPONSE_WITHHELD as Jn, OnMissingPermission as Jt, PRIVATE_REPOS_POLICIES as K, ApiError as Kn, DenialPolicy as Kt, RENDER_REJECTED_INPUTS as L, CollectedLine as Ln, SectionModule as Lt, InputReader as M, GitHubClient as Mn, allGraphqlOps as Mt, MODES as N, GraphqlOp as Nn, sectionModule as Nt, FILTER_INPUTS as O, ClientAnswer as On, SettingsSource as Ot, Mode as P, RequestMark as Pn, KeyedListLayering as Pt, publicDetail as Q, isRateLimitError as Qn, SnapshotContext as Qt, SNAPSHOT_INPUTS as R, Io as Rn, SectionSnapshot as Rt, ResolvedTargets as S, DEFAULT_DISCOVERY_FILTERS as Sn, Layering as Sr, ValidatedSettings as St, runMulti as T, FORKS_FILTERS as Tn, skippedSectionKeys as Tt, concludeRender as U, prefixedIo as Un, sectionGrant as Ut, FinishedRender as V, collectingIo as Vn, denialPosture as Vt, concludeRun as W, redactRanges as Wn, sectionOperations as Wt, capturingIo as X, classifyApiError as Xn, PlannedOpBase as Xt, TargetOutcome as Y, SECRET_TRANSPORT_WITHHELD as Yn, PlanContext as Yt, planRedaction as Z, isPermissionError as Zn, SectionPlan as Zt, runSingle as _, MustBeNever as _n, SECTION_KEYS as _r, worstOf as _t, RunConfig as a, EndpointDecl as an, CentralFileProblem as ar, deliverArtifactReport as at, DEFAULT_SETTINGS_FILE as b, AFFILIATIONS as bn, UNDECLARED_POLICY_SECTIONS as br, RepoRunResult as bt, parseSnapshotFileConfig as c, endpointPath as cn, ProblemOf as cr, RepoVisibility as ct, SNAPSHOT_SCHEMA_URL as d, grantFor as dn, SettingsProblem as dr, SectionSnapshotOutcome as dt, Unverifiable as en, RemoteTarget as er, PRIVATE_REPORT_CHANNELS as et, SnapshotConfig as f, FoldOptions as fn, TopLevelShape as fr, SnapshotResult as ft, SingleOutcome as g, mergeLayers as gn, PROBOT_PARITY_KEYS as gr, RunOutcome as gt, SingleConfig as h, describeRemoval as hn, DOCUMENT_DIRECTIVE_KEYS as hr, RUN_RESULTS as ht, RunCapabilities as i, SectionFailure as in, parseRepoSlug as ir, ArtifactUploader as it, InputName as j, GitHubApiOptions as jn, allEndpoints as jt, INPUT_DECLS as k, DEFAULT_API_VERSION as kn, SECTIONS as kt, snapshotFileDestination as l, PatResource as ln, RERUN_ADVICE as lr, createVisibilityResolver as lt, runSnapshot as m, RemovalNotice as mn, quoteList as mr, renderSnapshotYaml as mt, foldLayers as n, snapshotContext as nn, Target as nr, applyMarkerInjection as nt, SnapshotFileConfig as o, Route as on, LayerProblem as or, encryptReport as ot, concludeSnapshot as p, Layer as pn, describeProblem as pr, SnapshotRunOptions as pt, PrivateReposPolicy as q, ApiErrorKind as qn, Justification as qt, readLayerFiles as r, GraphqlOpDecl as rn, dedupeTargets as rr, openReportChannel as rt, parseConfig as s, endpointMethod as sn, Problem as sr, parseRecipient as st, FoldedLayers as t, planContext as tn, RepoRef as tr, PrivateReportChannel as tt, FinishedSnapshot as u, SectionPermission as un, SettingsFileRole as ur, RenderableSnapshot as ut, RenderConfig as v, UndeclaredPolicy as vn, SectionKey as vr, RepoResult as vt, resolveTargets as w, DiscoveryProblem as wn, runForRepo as wt, MultiConfig as x, ARCHIVED_FILTERS as xn, UndeclaredPolicySection as xr, SectionOutcome as xt, runRender as y, UndeclaredPolicyList as yn, SettingsFile as yr, RepoRunOptions as yt, SNAPSHOT_ONLY_INPUTS as z, MaskPair as zn, ValidatedBrand as zt };
|