@vivswan/github-settings-as-code 0.0.0 → 2.0.1-main.658.20260922.gdcb742f
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.md +561 -1
- package/README.md +101 -2
- package/lib/pkg/cli.js +722 -0
- package/lib/pkg/index.d.ts +157 -0
- package/lib/pkg/index.js +3 -0
- package/lib/pkg/inputs-BOuUCdpl.js +15883 -0
- package/lib/pkg/internal-la_KkjCS.js +1 -0
- package/lib/pkg/internal.d.ts +49 -0
- package/lib/pkg/internal.js +3 -0
- package/lib/pkg/layers-MA87H-hC.d.ts +9786 -0
- package/lib/pkg/src-C2gb8QkD.js +160 -0
- package/lib/settings.schema.json +4128 -0
- package/package.json +91 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { $ as toPublicView, $t as Tolerance, C as parseSnapshotFileConfig, Ct as preflightProbe, E as SNAPSHOT_SCHEMA_URL, En as VISIBILITY_FILTERS, Et as validateSettingsDoc, F as DEFAULT_SETTINGS_FILE, Gt as writeGatedReads, H as RunFlowConfig, Ht as readGating, In as SECRET_RESPONSE_WITHHELD, It as SectionMeta, J as PublicTargetView, K as PRIVATE_REPOS_POLICIES, L as ResolvedTargets, Ln as SECRET_TRANSPORT_WITHHELD, Nn as GitHubClient, On as ApiError, Pt as KeyedListLayering, Q as publicDetail, R as TargetsConfig, Rn as TraceIo, Tn as FORKS_FILTERS, Tt as skippedSectionKeys, Vt as denialPosture, Wt as sectionOperations, X as capturingIo, Xt as PlannedOpBase, Z as planRedaction, _n as MustBeNever, a as DEFAULT_PRIVATE_REPOS, b as SNAPSHOT_REJECTED_INPUTS, bn as AFFILIATIONS, bt as RepoRunResult, c as InputDecl, ct as RepoVisibility, d as MODES, dn as grantFor, en as Unverifiable, et as PRIVATE_REPORT_CHANNELS, f as Mode, fr as quoteList, ft as SnapshotResult, gn as mergeLayers, h as RENDER_REJECTED_INPUTS, ir as LayerProblem, l as InputName, ln as PatResource, lr as SettingsProblem, lt as createVisibilityResolver, m as RENDER_ONLY_INPUTS, mr as PROBOT_PARITY_KEYS, mt as renderSnapshotYaml, n as foldLayers, nt as applyMarkerInjection, o as FILTER_INPUTS, or as ProblemOf, p as RENDER_INPUTS, pr as DOCUMENT_DIRECTIVE_KEYS, pt as SnapshotRunOptions, q as PrivateReposPolicy, qt as Justification, rr as CentralFileProblem, s as INPUT_DECLS, sr as RERUN_ADVICE, t as FoldedLayers, un as SectionPermission, ur as TopLevelShape, ut as RenderableSnapshot, v as SNAPSHOT_INPUTS, vn as UndeclaredPolicy, vt as RepoResult, w as snapshotFileDestination, wn as DiscoveryProblem, wt as runForRepo, x as SnapshotFileConfig, xn as ARCHIVED_FILTERS, y as SNAPSHOT_ONLY_INPUTS, yn as UndeclaredPolicyList, yt as RepoRunOptions, z as resolveTargets } from "./layers-MA87H-hC.js";
|
|
2
|
+
import { Result } from "neverthrow";
|
|
3
|
+
//#region src/engine/canonical.d.ts
|
|
4
|
+
/** The document as a fresh tree in the canonical order; the input is left as it was. */
|
|
5
|
+
export declare function canonicalDocument(document: Readonly<Record<string, unknown>>): Record<string, unknown>;
|
|
6
|
+
/**
|
|
7
|
+
* The document's YAML, the one rendering the snapshot file and the merged file share. The walk rebuilds every node,
|
|
8
|
+
* so the writer meets no shared object and emits no alias (an alias would trip the reader's cap on the next run).
|
|
9
|
+
*/
|
|
10
|
+
export declare function renderCanonicalYaml(document: Readonly<Record<string, unknown>>): string;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/flows/settings-write.d.ts
|
|
13
|
+
/**
|
|
14
|
+
* The error is the filesystem's own reason; each caller names the input that chose the path. The staging file sits in
|
|
15
|
+
* the destination's directory, spelled as the caller spelled it up to the leaf (a `link/..` segment is the OS's to
|
|
16
|
+
* resolve, the same way for both names; a drive-relative `C:x` stays on that drive's current directory, which dirname
|
|
17
|
+
* or join would turn into the drive root), under a short name of its own (the destination's leaf may already be at
|
|
18
|
+
* NAME_MAX), and takes an existing regular destination's mode, so a replaced 0600 file stays 0600.
|
|
19
|
+
*/
|
|
20
|
+
export declare function writeReplacing(path: string, text: string): Result<void, string>;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/github/repo-file.d.ts
|
|
23
|
+
export declare function getRepoFile(api: GitHubClient, slug: string, filePath: string): Promise<{
|
|
24
|
+
content: string;
|
|
25
|
+
} | {
|
|
26
|
+
missing: true;
|
|
27
|
+
} | {
|
|
28
|
+
unproven: string;
|
|
29
|
+
} | {
|
|
30
|
+
error: ApiError;
|
|
31
|
+
} | {
|
|
32
|
+
failed: string;
|
|
33
|
+
}>;
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/report/issue-report.d.ts
|
|
36
|
+
/** The lookup key: one exact-titled report issue per repo, forever reused. */
|
|
37
|
+
export declare const ISSUE_TITLE = "[automated] settings-as-code: private settings report";
|
|
38
|
+
/** Makes the lookup one indexed request; the search API is eventually consistent and separately throttled, so it is never used. */
|
|
39
|
+
export declare const MARKER_LABEL = "settings-as-code-report";
|
|
40
|
+
export declare const MARKER_LABEL_CONFIG: {
|
|
41
|
+
readonly name: "settings-as-code-report";
|
|
42
|
+
readonly color: "0e2a47";
|
|
43
|
+
readonly description: "managed by settings-as-code private reporting - do not remove";
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/text.d.ts
|
|
47
|
+
export declare function countNoun(count: number, one: string, many: string): string;
|
|
48
|
+
//#endregion
|
|
49
|
+
export { AFFILIATIONS, ARCHIVED_FILTERS, type CentralFileProblem, DEFAULT_PRIVATE_REPOS, DEFAULT_SETTINGS_FILE, DOCUMENT_DIRECTIVE_KEYS, type DiscoveryProblem, FILTER_INPUTS, FORKS_FILTERS, type FoldedLayers, INPUT_DECLS, type InputDecl, type InputName, type Justification, type KeyedListLayering, type LayerProblem, MODES, type Mode, type MustBeNever, PRIVATE_REPORT_CHANNELS, PRIVATE_REPOS_POLICIES, PROBOT_PARITY_KEYS, type PatResource, type PlannedOpBase, type PrivateReposPolicy, type ProblemOf, type PublicTargetView, RENDER_INPUTS, RENDER_ONLY_INPUTS, RENDER_REJECTED_INPUTS, RERUN_ADVICE, type RenderableSnapshot, type RepoResult, type RepoRunOptions, type RepoRunResult, type RepoVisibility, type ResolvedTargets, type RunFlowConfig, SECRET_RESPONSE_WITHHELD, SECRET_TRANSPORT_WITHHELD, SNAPSHOT_INPUTS, SNAPSHOT_ONLY_INPUTS, SNAPSHOT_REJECTED_INPUTS, SNAPSHOT_SCHEMA_URL, type SectionMeta, type SectionPermission, type SettingsProblem, type SnapshotFileConfig, type SnapshotResult, type SnapshotRunOptions, type TargetsConfig, type Tolerance, type TopLevelShape, type TraceIo, type UndeclaredPolicy, type UndeclaredPolicyList, type Unverifiable, VISIBILITY_FILTERS, applyMarkerInjection, capturingIo, createVisibilityResolver, denialPosture, foldLayers, grantFor, mergeLayers, parseSnapshotFileConfig, planRedaction, preflightProbe, publicDetail, quoteList, readGating, renderSnapshotYaml, resolveTargets, runForRepo, sectionOperations, skippedSectionKeys, snapshotFileDestination, toPublicView, validateSettingsDoc, writeGatedReads };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { $ as RERUN_ADVICE, A as getRepoFile, At as ARCHIVED_FILTERS, B as applyMarkerInjection, Bt as SECRET_TRANSPORT_WITHHELD, C as foldLayers, Ct as sectionOperations, E as resolveTargets, F as capturingIo, Ft as countNoun, H as ISSUE_TITLE, I as planRedaction, It as createVisibilityResolver, L as publicDetail, Mt as FORKS_FILTERS, Nt as VISIBILITY_FILTERS, P as PRIVATE_REPOS_POLICIES, Q as validateSettingsDoc, R as toPublicView, S as writeReplacing, T as DEFAULT_SETTINGS_FILE, Tt as grantFor, U as MARKER_LABEL, W as MARKER_LABEL_CONFIG, X as runForRepo, Y as preflightProbe, Z as skippedSectionKeys, _ as renderSnapshotYaml, a as RENDER_INPUTS, bt as denialPosture, c as SNAPSHOT_INPUTS, dt as canonicalDocument, f as parseSnapshotFileConfig, ft as renderCanonicalYaml, gt as PROBOT_PARITY_KEYS, ht as DOCUMENT_DIRECTIVE_KEYS, i as MODES, kt as AFFILIATIONS, l as SNAPSHOT_ONLY_INPUTS, m as SNAPSHOT_SCHEMA_URL, n as FILTER_INPUTS, o as RENDER_ONLY_INPUTS, ot as mergeLayers, p as snapshotFileDestination, r as INPUT_DECLS, s as RENDER_REJECTED_INPUTS, t as DEFAULT_PRIVATE_REPOS, tt as quoteList, u as SNAPSHOT_REJECTED_INPUTS, wt as writeGatedReads, xt as readGating, z as PRIVATE_REPORT_CHANNELS, zt as SECRET_RESPONSE_WITHHELD } from "./inputs-BOuUCdpl.js";
|
|
2
|
+
import "./internal-la_KkjCS.js";
|
|
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 };
|