@theholocron/cli 5.0.0-alpha.43 → 5.0.0-alpha.431
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/README.md +553 -106
- package/dist/cli.mjs +26752 -8164
- package/dist/cli.mjs.map +1 -1
- package/dist/config-system-CijVTCFk.mjs +814 -0
- package/dist/index-BFrWaQ3Y.d.mts +4154 -0
- package/dist/index.d.mts +449 -633
- package/dist/index.mjs +494 -351
- package/dist/plugin/capabilities.d.mts +2 -807
- package/dist/plugin/capabilities.mjs +55 -4
- package/dist/presets.d.mts +221 -0
- package/dist/presets.mjs +439 -0
- package/package.json +49 -36
package/dist/index.d.mts
CHANGED
|
@@ -1,697 +1,513 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AuthError,
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { $ as DnsRecord, $n as WikiProxyConfig, $r as RepoVariablesSync, $t as NotificationsDelivery, A as Cardinality, An as Source, Ar as DevConfig, At as Issues, B as DeployFunctionConfig, Bn as SyncResult, Br as MultiEntry, Bt as MonitoringAlertSettings, C as BoardStatusCategory, Cn as ResolvedCapability, Cr as resolveConfig, Ct as Issue, D as BoardView, Dn as SecretVisibility, Dr as CapabilityConfigPackage, Dt as IssueRecord, E as BoardTemplateFile, En as SecretScope, Er as AppConfig, Et as IssuePriority, F as CiRunStatus, Fn as SourceSecurity, Fr as EslintConfig, Ft as LogsDataset, G as DeploymentProject, Gn as TrackerDoctorReport, Gr as RepoConfig, Gt as MonitoringCheckInput, H as DeployScriptConfig, Hn as TeamPermission, Hr as ProviderOptions, Ht as MonitoringAssertionComparison, I as ConnectionStringOptions, In as SourceTeamMember, Ir as GitHubAppConfig, It as Monitoring, J as DeploymentTarget, Jn as Tunnels, Jr as RepoSecrets, Jt as NormalizedAuthUser, K as DeploymentProjectSettings, Kn as TrackerUser, Kr as RepoProperties, Kt as MonitoringHttpMethod, L as CreateAuthUserInput, Ln as StatusCategory, Lr as HolocronConfig, Lt as MonitoringAlertChannelInput, M as Ci, Mn as SourceFile, Mr as DocsConfig, Mt as LifecycleResult, N as CiRun, Nn as SourceRepoInfo, Nr as DoctorConfig, Nt as LifecycleSlot, O as CapabilityImpls, On as Secrets, Or as ChromaticProjectConfig, Ot as IssueSearchFilter, P as CiRunFilter, Pn as SourceRulesetDetail, Pr as EnvConfig, Pt as Logs, Q as Dns, Qn as WikiProvisionOpts, Qr as RepoVariables, Qt as NotificationsChannelLayout, R as Credentials, Rn as Storage, Rr as IdeasConfig, Rt as MonitoringAlertChannelResult, S as BoardStatus, Sn as RepoSettings, Sr as credentialsEnvironment, St as InspectRelayInput, T as BoardTemplate, Tn as SecretAccess, Tr as resolvePluginPackage, Tt as IssueOrder, U as DeployScriptResult, Un as Tooling, Ur as RawProviderEntry, Ut as MonitoringAssertionSource, V as DeployFunctionResult, Vn as TeamEntry, Vr as OrgConfig, Vt as MonitoringAssertion, W as Deployment, Wn as ToolingDoctorReport, Wr as RawProvidersConfig, Wt as MonitoringCheck, X as DiscussionPatch, Xn as WebhookDashboardInfo, Xr as RepoSecretsSync, Xt as NotificationsAccess, Y as DeploymentTrigger, Yn as Vault, Yr as RepoSecretsDeploy, Yt as Notifications, Z as DiscussionPost, Zn as Wiki, Zr as RepoValidationConfig, Zt as NotificationsApplicationLayout, _ as BoardFieldType, _n as Projects, _r as LoadedConfig, _t as ExportInfo, a as REQUIRED_CAPABILITIES, ai as StorybookDeployProject, an as NotificationsMonitoringFeed, ar as deriveProfile, at as EnsureRelayResult, b as BoardRule, bn as RelayState, br as TaskEntry, bt as ImportOptions, c as AddedItem, ci as WorkflowWithConfig, cn as NotificationsPinnedLayout, cr as readWorkspacePackageJsons, ct as EnsureWebhookResult, d as AuthDescription, dn as NotificationsSignIn, dr as PackageJsonLike, dt as EnsuredTunnel, ei as ResolvedHolocronConfig, en as NotificationsEveryoneLayout, er as WorkerScriptState, et as DnsRecordRequest, f as AuthEvent, fn as NotificationsSignedIn, fr as StackName, ft as Environment, g as BoardField, gn as ParseWebhookInput, gr as loadConfig, gt as Errors, h as AuthUser, hn as PagesConfig, hr as defineConfig, ht as Environments, i as ProviderApiError, ii as SingleEntry, in as NotificationsMember, ir as deriveCompliance, it as EnsureRelayInput, j as CardinalityFor, jn as SourceBranch, jr as DevServeConfig, jt as LabelDef, k as CapabilityKey, kn as ServerInspection, kr as CredentialsConfig, kt as IssueSelector, l as Analytics, li as EnvironmentLayer, ln as NotificationsPrsFeed, lr as DeriveProfileInput, lt as EnsuredDiscussion, m as AuthIdentity, mn as OrganizationSecretScope, mr as compose, mt as EnvironmentReviewer, n as ElevationRequiredError, ni as ResolvedProvidersConfig, nn as NotificationsLayout, nr as KNOWN_STACK_DEPS, nt as DuplicateDiscussion, o as WebhookVerificationError, oi as TaskEntryConfig, on as NotificationsOnboardingLayout, or as deriveStack, ot as EnsureReport, p as AuthEventType, pn as NotificationsWelcomeLayout, pr as ConfigFileError, pt as EnvironmentEntry, q as DeploymentRecord, qn as TunnelRoute, qr as RepoProtection, qt as MoveReport, r as MissingTokenError, ri as ResolvedTuple, rn as NotificationsLinksLayout, rr as deriveCapabilities, rt as EnsureDiscussionInput, s as isMulti, si as TelemetryConfig, sn as NotificationsPicture, sr as missingCapabilities, st as EnsureResult, t as CARDINALITY, ti as ResolvedProviderEntry, tn as NotificationsForumTag, tr as Workers, tt as DnsRecordType, u as Auth, un as NotificationsServerLayout, ur as HolocronProfile, ut as EnsuredResource, v as BoardItem, vn as ProviderIdentity, vr as Capability, vt as IdeaRecord, w as BoardSummary, wn as Ruleset, wr as resolveEntry, wt as IssueComment, x as BoardState, xn as RepoRef, xr as ConfigError, xt as ImportResult, y as BoardItemInput, yn as PullRequest, yr as ComposedPreset, yt as Ideas, z as CredentialsInspection, zn as StorageBranch, zr as LogConfig, zt as MonitoringAlertChannelState } from "./index-BFrWaQ3Y.mjs";
|
|
2
|
+
import { AuthError, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, ResolveTokenInput as ResolveTokenInput$1, resolveValue } from "@theholocron/kyber/secrets";
|
|
3
|
+
import { CheckRow } from "@theholocron/kyber/ui";
|
|
4
|
+
import "@theholocron/env-utils/lookup";
|
|
5
|
+
import { RequestOptions, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
|
|
6
|
+
import "@theholocron/kyber/plugins";
|
|
7
|
+
import { GitExec } from "@theholocron/git-utils";
|
|
8
|
+
import { ConnectionProbeInput as ConnectionProbeInput$1 } from "@theholocron/kyber/checks";
|
|
9
|
+
import { Stats } from "node:fs";
|
|
10
|
+
import "@theholocron/observability/core";
|
|
11
|
+
import { ConfigDirArea } from "@theholocron/datapad";
|
|
12
|
+
/** A plugin's `verifyToken` result when the provider accepted the token. */
|
|
13
|
+
interface VerifyTokenSuccess {
|
|
14
|
+
/** Always `true` for an accepted token. */
|
|
15
|
+
ok: true;
|
|
16
|
+
/** "workplace: acme" / "user: cnewton@x" — surfaced in success output. */
|
|
17
|
+
subject: string;
|
|
18
|
+
/** When the token stops working, ISO 8601 in UTC, for a provider that reports it. Absent when unknown or never. */
|
|
19
|
+
expiresAt?: string;
|
|
20
|
+
}
|
|
21
|
+
/** A plugin's `verifyToken` result when the provider rejected the token. */
|
|
22
|
+
interface VerifyTokenFailure {
|
|
23
|
+
/** Always `false` for a rejected token. */
|
|
24
|
+
ok: false;
|
|
25
|
+
/** Reason the token was rejected. Surfaces to the operator. */
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
/** What a plugin's `verifyToken` returns: the token was accepted, or it was rejected with a reason. */
|
|
29
|
+
type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
|
|
30
|
+
/** What a layer's token must do about a permission: `required` it must have it, `absent` it must not. */
|
|
31
|
+
type PermissionRule = "required" | "absent";
|
|
32
|
+
/**
|
|
33
|
+
* What a token must carry, declared once next to the plugin's `tokens` list. The permission names are the plugin's own
|
|
34
|
+
* (Cloudflare: `pages`, `dns`); a layer's rules say which are `required` and which `absent`, so a laptop token might
|
|
35
|
+
* need everything while `ci` needs one permission and must have none of the rest.
|
|
36
|
+
*/
|
|
37
|
+
interface TokenExpectation {
|
|
38
|
+
/**
|
|
39
|
+
* The layers that hold this token, for a token with no permission rules (a rotation-only check). Default: the layers
|
|
40
|
+
* `permissions` names. A layer in neither has no declared expectations.
|
|
41
|
+
*/
|
|
42
|
+
layers?: readonly EnvironmentLayer[];
|
|
43
|
+
/** Per layer, each permission's rule. A layer named here holds the token. */
|
|
44
|
+
permissions?: Readonly<Partial<Record<EnvironmentLayer, Readonly<Record<string, PermissionRule>>>>>;
|
|
45
|
+
}
|
|
46
|
+
/** One token a plugin takes, and where it is looked up. */
|
|
47
|
+
interface PluginToken {
|
|
48
|
+
/** The plugin's own environment variable, e.g. `HOLOCRON_ADMIN_TOKEN`. */
|
|
49
|
+
envName: string;
|
|
50
|
+
/** The vendor's own environment variable, e.g. `CLOUDFLARE_API_TOKEN`; read after `envName` and before the keyring. */
|
|
51
|
+
vendorEnvName?: string;
|
|
52
|
+
/** The OS keyring entry, e.g. `github.admin`. */
|
|
53
|
+
keyringKey: string;
|
|
54
|
+
/**
|
|
55
|
+
* `false` when the plugin's `verifyToken` does not apply to this token (it checks a different credential, such as
|
|
56
|
+
* a webhook URL), so `holocron doctor secrets --verify` reports it as set without calling the plugin. Default `true`.
|
|
57
|
+
*/
|
|
58
|
+
verifiable?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* How to check this token when the plugin's one `verifyToken` is for a different credential (the Discord bot token,
|
|
61
|
+
* where `verifyToken` checks a webhook). Wins over the plugin's `verifyToken`.
|
|
62
|
+
*/
|
|
63
|
+
verify?: (token: string) => Promise<VerifyTokenResult>;
|
|
64
|
+
/**
|
|
65
|
+
* `true` when the plugin only falls back to this token: nothing needs it unless a call names no better source (the
|
|
66
|
+
* Discord webhook a post uses when it names no channel). The checks that expect every token a plugin lists, such as
|
|
67
|
+
* `holocron doctor secrets`, do not expect it, and `holocron export tokens` marks it as optional when it has none.
|
|
68
|
+
* Default `false`.
|
|
69
|
+
*/
|
|
70
|
+
optional?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Which layers hold this token and what it must and must not be able to do in each (#2149). One declaration that the
|
|
73
|
+
* token probes, the doctor and the docs check read through `tokenExpectations()`; see `TokenExpectation`.
|
|
74
|
+
*/
|
|
75
|
+
expect?: TokenExpectation;
|
|
76
|
+
}
|
|
77
|
+
/** Options for a token resolver, without the keyring lookup, which the CLI supplies itself. */
|
|
78
|
+
type ResolveTokenConfig = Omit<ResolveTokenConfig$1, "keyring" | "orgEnvName">;
|
|
79
|
+
/** Settings for a feature-specific token resolver: which env var and keyring entry it reads. */
|
|
11
80
|
interface FeatureResolverConfig {
|
|
12
81
|
/** Env var name for this feature, e.g. `"HOLOCRON_ISSUES_TOKEN"`. */
|
|
13
82
|
envName: string;
|
|
14
83
|
/** Keyring account key, e.g. `"github.issues"`. */
|
|
15
84
|
keyringKey: string;
|
|
85
|
+
/** The vendor named in the "no token" message. Default `GitHub`. */
|
|
86
|
+
vendor?: string;
|
|
16
87
|
}
|
|
88
|
+
/** A resolver from `createFeatureResolver`: call it for the token, or read `token` to see where it looks. */
|
|
89
|
+
type FeatureResolver = ((input?: ResolveTokenInput$1) => string) & {
|
|
90
|
+
/** The environment variable and keyring entry this resolver reads, for `holocron doctor secrets --verify`. */
|
|
91
|
+
readonly token: PluginToken;
|
|
92
|
+
};
|
|
93
|
+
/** A resolver from `createResolveToken`: call it for the token, or read `token` to see where it looks. */
|
|
94
|
+
type TokenResolver = ((input?: ResolveTokenInput$1) => string) & {
|
|
95
|
+
/** The environment variables and keyring entry this resolver reads, for `holocron doctor secrets --verify`. */
|
|
96
|
+
readonly token: PluginToken;
|
|
97
|
+
};
|
|
17
98
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* No broad-token fallback — if the feature-specific token is absent the
|
|
22
|
-
* operation fails with a message naming the exact env var to set.
|
|
99
|
+
* The holocron keyring: `get` answers `null` for "not stored" and for "keyring unavailable" alike, so callers fall
|
|
100
|
+
* through to env-var precedence, and remembers the answer for the process (`clearCache` forgets it); `set` and `delete`
|
|
101
|
+
* answer whether they did anything; `list` names the stored providers; `isAvailable` tells an outage from an empty keyring.
|
|
23
102
|
*/
|
|
24
|
-
declare
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region src/auth/keyring.d.ts
|
|
103
|
+
export declare const keyring: import("@theholocron/kyber/secrets").Keyring;
|
|
27
104
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* can talk to its vendor's API) can be stored in the OS keyring under
|
|
32
|
-
* a single reverse-DNS service scope. Managed via `holocron auth`
|
|
33
|
-
* subcommands; consulted at position 4 in every plugin's auth
|
|
34
|
-
* precedence chain (after --token / HOLOCRON_<X>_TOKEN / <native>_TOKEN).
|
|
35
|
-
*
|
|
36
|
-
* See `docs/wiki/specifications/tech-auth-bootstrap.spec.md` for the design rationale.
|
|
37
|
-
*
|
|
38
|
-
* Failure model: keyring access is best-effort. Platforms without a
|
|
39
|
-
* supported credential store (some Linux CI images, sandboxed
|
|
40
|
-
* environments) will throw from the underlying library. Every export
|
|
41
|
-
* here catches and returns a null/empty result rather than propagating
|
|
42
|
-
* — the plugin's precedence chain then falls through to
|
|
43
|
-
* env-var-only paths, which is exactly how CI is meant to work.
|
|
105
|
+
* Kyber's `createResolveToken` with the keyring, the `HOLOCRON_ORG` variable and the `token` description
|
|
106
|
+
* `holocron doctor secrets --verify` reads filled in, so a plugin stays at a one-liner call site. The chain is the flag, the
|
|
107
|
+
* plugin's variable, the vendor's variable, the `credentials` providers' variables, the keyring.
|
|
44
108
|
*/
|
|
109
|
+
export declare function createResolveToken(config: ResolveTokenConfig): TokenResolver;
|
|
45
110
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
111
|
+
* Kyber's `createFeatureResolver` for a strict, single-feature token: the flag, the feature's variable, the
|
|
112
|
+
* `credentials` providers' variable of that name, the keyring. No broad-token fallback; if the feature's token is absent
|
|
113
|
+
* the operation fails with a message naming the exact variable to set and `holocron new token`.
|
|
48
114
|
*/
|
|
49
|
-
declare function
|
|
115
|
+
export declare function createFeatureResolver(config: FeatureResolverConfig): FeatureResolver;
|
|
50
116
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* same
|
|
117
|
+
* Puts issue keys in creation order without asking the tracker: issue numbers (`#12`, `ENG-12`) rise with creation inside
|
|
118
|
+
* one repository or team, so the trailing number is the order. `oldest` is ascending, `newest` descending; keys with the
|
|
119
|
+
* same number keep their place. A key with no trailing number is an error, because nothing can be said of its age.
|
|
54
120
|
*/
|
|
55
|
-
declare function
|
|
121
|
+
export declare function orderKeys(keys: readonly string[], order: IssueOrder): string[];
|
|
56
122
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* command output makes the situation clear either way.
|
|
123
|
+
* Keeps the first or last `limit` of a listing by creation time, returned oldest first. `createdAt` reads an item's
|
|
124
|
+
* ISO timestamp; items created in the same instant keep their listed order. The cut happens on what the listing already
|
|
125
|
+
* holds, so no request is spent on an item that is dropped.
|
|
61
126
|
*/
|
|
62
|
-
declare function
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
*/
|
|
78
|
-
level?: LogLevel;
|
|
79
|
-
/**
|
|
80
|
-
* Axiom log-shipping. Set `axiom.dataset` to opt local runs into Axiom
|
|
81
|
-
* without exporting `HOLOCRON_AXIOM_DATASET` — the CLI then pairs it with
|
|
82
|
-
* the token from `HOLOCRON_AXIOM_TOKEN` / `AXIOM_TOKEN` or the OS keyring
|
|
83
|
-
* (`holocron auth set axiom[.<org>] <TOKEN>`). Env vars still win. In CI,
|
|
84
|
-
* prefer the `HOLOCRON_AXIOM_DATASET` variable.
|
|
85
|
-
*/
|
|
86
|
-
axiom?: {
|
|
87
|
-
/** Target Axiom dataset, e.g. `"holocron-local"`. */
|
|
88
|
-
dataset?: string;
|
|
89
|
-
};
|
|
127
|
+
export declare function pickByCreation<T>(items: readonly T[], createdAt: (item: T) => string, order: IssueOrder, limit: number): T[];
|
|
128
|
+
/** What {@link readKeysLimited} needs. */
|
|
129
|
+
interface ReadKeysLimitedInput<T> {
|
|
130
|
+
/** The issue keys to choose from. */
|
|
131
|
+
keys: readonly string[];
|
|
132
|
+
/** Which end of the creation order to take first. */
|
|
133
|
+
order: IssueOrder;
|
|
134
|
+
/** How many items to keep. */
|
|
135
|
+
limit: number;
|
|
136
|
+
/** The most issues fetched at once. */
|
|
137
|
+
concurrency: number;
|
|
138
|
+
/** Fetches one issue by key. */
|
|
139
|
+
fetch: (key: string) => Promise<T>;
|
|
140
|
+
/** Whether a fetched issue counts against the limit; false skips it without using the budget. */
|
|
141
|
+
keep: (item: T) => boolean;
|
|
90
142
|
}
|
|
91
143
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* default on. `enabled` never *re-enables* what the env var turned off.
|
|
144
|
+
* Reads an explicit list of issues in creation order until `limit` of them are kept. The keys are sorted by number first
|
|
145
|
+
* (see {@link orderKeys}), then fetched in small steps of at most `concurrency`, each step no bigger than the places
|
|
146
|
+
* still open, so an issue that is later skipped (a pull request, a closed one) is replaced by the next key and nothing
|
|
147
|
+
* beyond the budget is fetched unless a skip made room. Within a step the fetches run together; the results keep the key
|
|
148
|
+
* order. The kept items come back oldest first, whichever end was chosen.
|
|
98
149
|
*/
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Repo-level opt-out — the committed peer of `HOLOCRON_TELEMETRY=false`.
|
|
102
|
-
* `false` installs the no-op sinks for the whole run. Default on.
|
|
103
|
-
*/
|
|
104
|
-
enabled?: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Usage-analytics provider. `"none"` disables PostHog usage analytics while
|
|
107
|
-
* leaving error reporting (Sentry) untouched. Default `"posthog"`.
|
|
108
|
-
*/
|
|
109
|
-
analytics?: "posthog" | "none";
|
|
110
|
-
}
|
|
111
|
-
type ProviderOptions = Record<string, unknown>;
|
|
150
|
+
export declare function readKeysLimited<T>(input: ReadKeysLimitedInput<T>): Promise<T[]>;
|
|
112
151
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* repos (Level 1 of the shareable-configs story, issue #75).
|
|
152
|
+
* Calls a provider's optional `onProgress` hook with how many items are done of how many. A hook that throws is
|
|
153
|
+
* ignored, because a progress counter must never change or stop the read or write it reports on.
|
|
116
154
|
*
|
|
117
|
-
* @
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* export default {
|
|
121
|
-
* provider: '1password',
|
|
122
|
-
* options: { vault: 'acme-app' },
|
|
123
|
-
* } satisfies CapabilityConfigPackage
|
|
155
|
+
* @param onProgress - The hook from `ExportInfo` or `ImportOptions`; nothing happens when it is not given.
|
|
156
|
+
* @param done - How many items are finished.
|
|
157
|
+
* @param total - How many items there are.
|
|
124
158
|
*/
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
159
|
+
export declare function reportProgress(onProgress: ((done: number, total: number) => void) | undefined, done: number, total: number): void;
|
|
160
|
+
/** One line a probe reports: `info` for a fact, `ok` / `fail` for a result, `heading` to title the rows that follow. */
|
|
161
|
+
interface ProbeRow {
|
|
162
|
+
/** `ok` or `fail` for a result, `info` for a fact, `heading` to title the rows that follow. */
|
|
163
|
+
status: "ok" | "fail" | "info" | "heading";
|
|
164
|
+
/** The row's short title. */
|
|
165
|
+
label: string;
|
|
166
|
+
/** Further detail, when there is some. */
|
|
167
|
+
detail?: string;
|
|
128
168
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*/
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
*/
|
|
152
|
-
domain?: string;
|
|
153
|
-
/** Enforce HTTPS. Only effective once the custom domain is DNS-verified. */
|
|
154
|
-
https?: boolean;
|
|
155
|
-
}
|
|
156
|
-
interface RepoProperties {
|
|
157
|
-
lifecycle?: "active" | "experimental" | "deprecated";
|
|
158
|
-
open_source?: boolean;
|
|
159
|
-
runtime_environment?: "node" | "browser" | "universal" | "none";
|
|
160
|
-
uses_external_packages?: boolean;
|
|
169
|
+
/** What a probe is handed. Everything it prints or changes goes through this, so the runner can enforce the rules. */
|
|
170
|
+
interface ProbeContext {
|
|
171
|
+
/** What the person typed after the probe name (`probe deps who vitest` hands `["vitest"]`). */
|
|
172
|
+
args?: readonly string[];
|
|
173
|
+
/**
|
|
174
|
+
* `--lcov <path>`: where a probe that measures coverage also writes an lcov report, on top of the rows it prints.
|
|
175
|
+
* Relative to the repo root. Unset when the flag was not given.
|
|
176
|
+
*/
|
|
177
|
+
lcov?: string;
|
|
178
|
+
/** `--dry-run`: `write` calls are announced and skipped. */
|
|
179
|
+
dryRun: boolean;
|
|
180
|
+
/** Report one line. The text is scrubbed of secrets before it is printed. */
|
|
181
|
+
say(row: ProbeRow): void;
|
|
182
|
+
/**
|
|
183
|
+
* Change something on the provider. The only way to: on `--dry-run` it prints `would <label>` and does not call `fn`,
|
|
184
|
+
* and a probe that did not declare `writes: true` cannot call it.
|
|
185
|
+
*/
|
|
186
|
+
write<T>(label: string, fn: () => Promise<T>): Promise<T | undefined>;
|
|
187
|
+
/** Register how to undo something this probe made. Runs in reverse order on success, failure and Ctrl-C. */
|
|
188
|
+
cleanup(label: string, fn: () => Promise<void>): void;
|
|
189
|
+
/** Mark a value (a token, a signing secret) as one that must never be printed. */
|
|
190
|
+
secret(value: string | undefined): void;
|
|
161
191
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
192
|
+
/** A named, on-demand poke at a live provider. */
|
|
193
|
+
interface Probe {
|
|
194
|
+
/** One sentence for `holocron probe`'s listing. */
|
|
195
|
+
summary: string;
|
|
196
|
+
/** Whether it creates or changes anything on the provider. Asked about first, and needs `--yes` without a terminal. */
|
|
197
|
+
writes: boolean;
|
|
165
198
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* Required-status-check contexts for `"strict"` are derived from the task
|
|
169
|
-
* manifest — `{ required: true }` tasks + top-level `extraRequiredChecks`
|
|
170
|
-
* (see `astromech.requiredChecks()`).
|
|
199
|
+
* Where the probe's rows go. Unset, stdout. A probe whose own output is the data on stdout (a `NAME=value` stream
|
|
200
|
+
* for a pipe) sets `stderr`, so the rows never mix with it.
|
|
171
201
|
*/
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* GitHub teams granted repository access. Synced by `holocron setup`, which
|
|
175
|
-
* also writes `.github/CODEOWNERS` for teams with write-or-higher permission.
|
|
176
|
-
* String shorthand defaults to `push` (Write).
|
|
177
|
-
*/
|
|
178
|
-
teams?: TeamEntry[];
|
|
179
|
-
/** GitHub topics set on the repository. */
|
|
180
|
-
topics?: string[];
|
|
181
|
-
/** GitHub custom properties synced to the org dashboard. */
|
|
182
|
-
properties?: RepoProperties;
|
|
183
|
-
}
|
|
184
|
-
interface AppConfig {
|
|
185
|
-
name: string;
|
|
186
|
-
path: string;
|
|
187
|
-
kind?: string;
|
|
188
|
-
}
|
|
189
|
-
interface DoctorConfig {
|
|
190
|
-
checks?: string[];
|
|
191
|
-
}
|
|
192
|
-
interface EnvConfig {
|
|
202
|
+
reportsTo?: "stderr";
|
|
193
203
|
/**
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
* vars, and produce documentation.
|
|
198
|
-
*
|
|
199
|
-
* @example
|
|
200
|
-
* // Project-only prefix
|
|
201
|
-
* namespaces: ["CLI_TEMPLATE"]
|
|
202
|
-
*
|
|
203
|
-
* // Org-wide defaults + project-specific overrides
|
|
204
|
-
* namespaces: ["HOLOCRON", "MY_CLI"]
|
|
204
|
+
* Whether the probe is about a token, so `holocron probe` may point it at a different one: `--token <provider>=<value>`,
|
|
205
|
+
* `--environment <layer or name>` (the provider's token from that vault Environment), or, on a terminal with neither,
|
|
206
|
+
* a question that asks which. Unset, the probe uses the token the provider normally resolves.
|
|
205
207
|
*/
|
|
206
|
-
|
|
208
|
+
acceptsToken?: boolean;
|
|
209
|
+
/** Runs the probe, reporting and changing things only through `ctx`. */
|
|
210
|
+
run(ctx: ProbeContext): Promise<void>;
|
|
207
211
|
}
|
|
212
|
+
/** A plugin's probes by name (kebab-case), as returned from `createPlugin` next to `capabilities`. */
|
|
213
|
+
type PluginProbes = Record<string, Probe>;
|
|
208
214
|
/**
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* The `tokenName` maps to a repository secret named `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`.
|
|
213
|
-
* Additional fields correspond to chromaui/action inputs and are passed through directly.
|
|
214
|
-
*
|
|
215
|
-
* @see https://www.chromatic.com/docs/monorepos/
|
|
215
|
+
* One step of a provider's `setup` or `doctor`, in the shape the shared renderer prints (`printCheckRows`): an id, a
|
|
216
|
+
* title, `ok` / `fail` / `skip`, one line of detail and, for a failure, a line per problem.
|
|
216
217
|
*/
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
* Must be uppercase (e.g. `"WEB"`, `"UI"`).
|
|
221
|
-
*/
|
|
222
|
-
tokenName: string;
|
|
223
|
-
/**
|
|
224
|
-
* Path to run the Chromatic build from, relative to the repo root.
|
|
225
|
-
* Typically the package directory (e.g. `"apps/web"`, `"packages/ui"`).
|
|
226
|
-
*/
|
|
227
|
-
workingDir: string;
|
|
228
|
-
/**
|
|
229
|
-
* Script name to build Storybook. Defaults to `"build:storybook"`.
|
|
230
|
-
* Must accept `--output-dir` pass-through (use `turbo run … --` at root).
|
|
231
|
-
*/
|
|
232
|
-
buildScript?: string;
|
|
233
|
-
/**
|
|
234
|
-
* Path to the Storybook folder relative to `workingDir`, for TurboSnap.
|
|
235
|
-
* Tells Chromatic where to find `.storybook/` when the Storybook config
|
|
236
|
-
* is in a subdirectory. Corresponds to `--storybook-base-dir`.
|
|
237
|
-
*/
|
|
238
|
-
storybookBaseDir?: string;
|
|
239
|
-
/**
|
|
240
|
-
* Glob patterns of files/dirs that should NOT trigger a TurboSnap bailout
|
|
241
|
-
* when changed. Useful for ignoring non-UI changes in a monorepo
|
|
242
|
-
* (e.g. `"./packages/!(ui)/**"` to focus TurboSnap on the UI package).
|
|
243
|
-
* Corresponds to `--untraced`. Accepts a single glob string or array.
|
|
244
|
-
*/
|
|
245
|
-
untraced?: string | string[];
|
|
218
|
+
type ProviderRow = CheckRow;
|
|
219
|
+
/** What a provider's `setup` and `doctor` are handed. */
|
|
220
|
+
interface ProviderActionContext {
|
|
246
221
|
/**
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* Cannot be combined with `onlyStoryNames`.
|
|
222
|
+
* `--dry-run`: `setup` reports what it would change as `ok` rows and changes nothing. `doctor` never changes
|
|
223
|
+
* anything, so it ignores this.
|
|
250
224
|
*/
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Exit with code 0 even when visual changes are detected.
|
|
254
|
-
* Useful during initial setup before baselines are approved.
|
|
255
|
-
* Corresponds to `--exit-zero-on-changes`.
|
|
256
|
-
*/
|
|
257
|
-
exitZeroOnChanges?: boolean;
|
|
225
|
+
dryRun: boolean;
|
|
258
226
|
}
|
|
259
227
|
/**
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
* `
|
|
228
|
+
* Something only one provider has (a Linear team's automation, a Discord server's roles) and no provider-neutral
|
|
229
|
+
* command can express. It reports one row per step and does not stop at the first failure: a step that fails is a
|
|
230
|
+
* `fail` row and the next step still runs. It never prints a token.
|
|
263
231
|
*/
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
232
|
+
type ProviderAction = (ctx: ProviderActionContext) => Promise<ProviderRow[]>;
|
|
233
|
+
/** A provider's `setup` and `doctor`, as `holocron provider <name> setup|doctor` finds them. */
|
|
234
|
+
interface ProviderActions {
|
|
235
|
+
/** Makes what the provider's own config block declares. Optional. */
|
|
236
|
+
setup?: ProviderAction;
|
|
237
|
+
/** Compares what the provider's own config block declares with what exists, read-only. Optional. */
|
|
238
|
+
doctor?: ProviderAction;
|
|
239
|
+
}
|
|
240
|
+
/** What a connection probe needs to check a provider's host and token: kyber's input, with the plugin's `verifyToken` as `verify`. */
|
|
241
|
+
export interface ConnectionProbeInput extends Omit<ConnectionProbeInput$1, "verify"> {
|
|
242
|
+
/** The plugin's `verifyToken`: asks the provider who the token belongs to. */
|
|
243
|
+
verify: (token: string) => Promise<VerifyTokenResult>;
|
|
267
244
|
}
|
|
268
245
|
/**
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* `run-chromatic` accepts either a plain boolean (single-project) or a
|
|
272
|
-
* `ChromaticProjectConfig[]` object (multi-project monorepo).
|
|
273
|
-
*
|
|
274
|
-
* `docs` / `storybook` are high-level deploy shorthand that `holocron setup`
|
|
275
|
-
* translates to `type` / `storybook-projects` before writing the thin caller.
|
|
276
|
-
* They also drive automatic `paths:` derivation so you never need to write
|
|
277
|
-
* `paths:` manually for deploy entries.
|
|
278
|
-
*/
|
|
279
|
-
type WorkflowWithConfig = Record<string, unknown> & {
|
|
280
|
-
"run-chromatic"?: boolean | {
|
|
281
|
-
projects: ChromaticProjectConfig[];
|
|
282
|
-
};
|
|
283
|
-
/**
|
|
284
|
-
* Docs deployment shorthand. `true` uses the org-standard `docs/` directory;
|
|
285
|
-
* `{ path: "custom" }` uses a custom directory. Both derive a `paths:` entry automatically.
|
|
286
|
-
*/
|
|
287
|
-
docs?: true | {
|
|
288
|
-
path: string;
|
|
289
|
-
};
|
|
290
|
-
/** Storybook apps to deploy alongside docs. Each entry's `path` is appended to `paths:`. */
|
|
291
|
-
storybook?: StorybookDeployProject[];
|
|
292
|
-
};
|
|
293
|
-
/**
|
|
294
|
-
* A `tasks` manifest entry in object form. A bare string entry is shorthand
|
|
295
|
-
* for `{ name, ci: true, local: true }`.
|
|
246
|
+
* The `connection` probe every provider offers, for telling a network problem from a credential problem. The checks are
|
|
247
|
+
* kyber's `connectionProbe`; this types the result as the plugin system's {@link Probe} and `verify` as `VerifyTokenResult`.
|
|
296
248
|
*/
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
|
|
306
|
-
/** The task's CI check context is a required status check + part of `holocron ci`'s default run. */
|
|
307
|
-
required?: boolean;
|
|
249
|
+
export declare function connectionProbe(input: ConnectionProbeInput): Probe;
|
|
250
|
+
interface RoleSyncOutcome {
|
|
251
|
+
role: string;
|
|
252
|
+
team: string;
|
|
253
|
+
plan: RoleSyncPlan;
|
|
254
|
+
/** Members the role was given to (empty on a dry run). */
|
|
255
|
+
added: string[];
|
|
256
|
+
/** Members the role was taken from (empty on a dry run or with `keep`). */
|
|
257
|
+
removed: string[];
|
|
308
258
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
|
|
317
|
-
* tries `<service>.<org>` before the unnamespaced `<service>` fallback, so
|
|
318
|
-
* a single machine can hold credentials for multiple GitHub orgs without
|
|
319
|
-
* collision. Overridden by `--org` CLI flag or `HOLOCRON_ORG` env var.
|
|
320
|
-
*/
|
|
321
|
-
org?: string;
|
|
322
|
-
/**
|
|
323
|
-
* Org canonical domain (e.g. `"theholocron.dev"`). Subdomains are derived
|
|
324
|
-
* from this — `preview: true` on a deploy workflow resolves the preview base
|
|
325
|
-
* domain as `preview.<domain>`, giving URLs like `<repo>-pr-<n>.<domain>`.
|
|
326
|
-
*/
|
|
327
|
-
domain?: string;
|
|
328
|
-
/**
|
|
329
|
-
* Repository identity and metadata. When set, `PluginLoader` injects
|
|
330
|
-
* `repo.name` into every plugin's `RuntimeContext.repo` so plugins that
|
|
331
|
-
* need a repo (github, etc.) don't require `--repo` on every invocation.
|
|
332
|
-
* `--repo` on the command line still overrides.
|
|
333
|
-
*/
|
|
334
|
-
repo?: RepoConfig;
|
|
335
|
-
/**
|
|
336
|
-
* The task manifest — what this repo runs. Each entry is a task name
|
|
337
|
-
* (backed by a reusable workflow in `theholocron/.github`), or the object
|
|
338
|
-
* form to pass `with:` inputs. `@theholocron/astromech` reads this as the
|
|
339
|
-
* single source for `holocron run` / `holocron ci` / the generated CI
|
|
340
|
-
* workflows / `package.json` scripts.
|
|
341
|
-
*
|
|
342
|
-
* Supported values (intent-facing vocabulary — epic #672, D3):
|
|
343
|
-
* "verification.unitTests" | "verification.typeSafety" | "verification.performance" |
|
|
344
|
-
* "sourceQuality.staticAnalysis" | "sourceQuality.formatting" |
|
|
345
|
-
* "sourceQuality.structuredDataValidation" | "sourceQuality.deadCodeAnalysis" |
|
|
346
|
-
* "security.secretDetection" | "security.codeScanning" |
|
|
347
|
-
* "delivery.build" | "delivery.publish" | "delivery.deploy" | "delivery.bundleSize" |
|
|
348
|
-
* "platform.repoSync" | "platform.commitStandards" | "platform.repoValidation" |
|
|
349
|
-
* "knowledge.wiki" | "knowledge.docs" | "knowledge.components" |
|
|
350
|
-
* "review" | "tag" | "stale" | "greetings" | "dependencies" | "bookkeeping"
|
|
351
|
-
*
|
|
352
|
-
* `holocron setup` writes `.github/workflows/<name>.yml` for each entry,
|
|
353
|
-
* calling the corresponding reusable workflow in `theholocron/.github`.
|
|
354
|
-
* Files are overwritten on each run — they are generated artifacts.
|
|
355
|
-
*
|
|
356
|
-
* ### delivery.deploy / knowledge.docs / knowledge.components
|
|
357
|
-
* `delivery.deploy` uses `docs` and/or `storybook` in `with:` — setup
|
|
358
|
-
* derives `paths:` automatically. `docs: true` uses the org-standard
|
|
359
|
-
* `docs/` directory; `docs: { path: "custom" }` overrides it.
|
|
360
|
-
* `knowledge.docs` / `knowledge.components` are the same underlying
|
|
361
|
-
* mechanism, each dedicated to exactly one type — they imply the
|
|
362
|
-
* corresponding shorthand, so a repo using them never has to spell out
|
|
363
|
-
* `docs: true` / `storybook: […]` itself.
|
|
364
|
-
*
|
|
365
|
-
* ```ts
|
|
366
|
-
* // Docs only (standard layout)
|
|
367
|
-
* { name: "delivery.deploy", with: { docs: true } }
|
|
368
|
-
* // …or equivalently, the dedicated task:
|
|
369
|
-
* "knowledge.docs"
|
|
370
|
-
*
|
|
371
|
-
* // Docs + monorepo storybooks
|
|
372
|
-
* {
|
|
373
|
-
* name: "delivery.deploy",
|
|
374
|
-
* with: {
|
|
375
|
-
* docs: true,
|
|
376
|
-
* storybook: [
|
|
377
|
-
* { name: "web", path: "apps/web" },
|
|
378
|
-
* { name: "ui", path: "packages/ui" },
|
|
379
|
-
* ],
|
|
380
|
-
* },
|
|
381
|
-
* }
|
|
382
|
-
*
|
|
383
|
-
* // Non-standard docs location
|
|
384
|
-
* { name: "delivery.deploy", with: { docs: { path: "packages/site" } } }
|
|
385
|
-
* ```
|
|
386
|
-
*
|
|
387
|
-
* ### run-chromatic
|
|
388
|
-
* For a single-project repo, use `"run-chromatic": true` with a
|
|
389
|
-
* `CHROMATIC_PROJECT_TOKEN` repository secret.
|
|
390
|
-
*
|
|
391
|
-
* For monorepos with multiple Storybooks, use the object form:
|
|
392
|
-
* ```ts
|
|
393
|
-
* "run-chromatic": {
|
|
394
|
-
* projects: [
|
|
395
|
-
* { tokenName: "WEB", workingDir: "apps/web" },
|
|
396
|
-
* { tokenName: "UI", workingDir: "packages/ui" },
|
|
397
|
-
* ]
|
|
398
|
-
* }
|
|
399
|
-
* ```
|
|
400
|
-
* Each `tokenName` maps to a repository secret named
|
|
401
|
-
* `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`. `holocron setup` expands this
|
|
402
|
-
* to the flat `run-chromatic: true` + `chromatic-projects: <json>` inputs
|
|
403
|
-
* that the reusable workflow accepts.
|
|
404
|
-
*
|
|
405
|
-
* @example
|
|
406
|
-
* ["sourceQuality.staticAnalysis", { "name": "delivery.publish", "with": { "run-build": false } }]
|
|
407
|
-
* { "name": "delivery.deploy", "with": { "docs": true } }
|
|
408
|
-
*/
|
|
409
|
-
tasks?: Array<string | TaskEntryConfig>;
|
|
410
|
-
/**
|
|
411
|
-
* Opt out of `holocron sync`'s `package.json` script writes. Default `true`.
|
|
412
|
-
*/
|
|
413
|
-
syncScripts?: boolean;
|
|
414
|
-
/**
|
|
415
|
-
* The command the synced `"holocron"` `package.json` script runs. Default
|
|
416
|
-
* `"holocron"` (the installed bin). This repo overrides it to run its own
|
|
417
|
-
* build (`"node packages/cli/dist/cli.mjs"`).
|
|
418
|
-
*/
|
|
419
|
-
holocronScript?: string;
|
|
420
|
-
/**
|
|
421
|
-
* Required status-check contexts not backed by a `required` task (codecov
|
|
422
|
-
* gates, the bundle-build check, …). `holocron setup` appends these to the
|
|
423
|
-
* task-derived list from `astromech.requiredChecks()`.
|
|
424
|
-
*/
|
|
425
|
-
extraRequiredChecks?: string[];
|
|
426
|
-
/**
|
|
427
|
-
* Git hooks `holocron setup` installs. `true` / `{ prePush: true }` writes
|
|
428
|
-
* `.husky/pre-push` (runs `holocron ci` before every push); `false` /
|
|
429
|
-
* `{ prePush: false }` opts out. Omitted → on for `protection: "strict"`,
|
|
430
|
-
* off otherwise. `--hooks` / `--no-hooks` on `holocron setup` override.
|
|
431
|
-
*/
|
|
432
|
-
hooks?: boolean | {
|
|
433
|
-
prePush?: boolean;
|
|
434
|
-
};
|
|
435
|
-
providers: RawProvidersConfig;
|
|
436
|
-
apps?: AppConfig[];
|
|
437
|
-
doctor?: DoctorConfig;
|
|
438
|
-
/**
|
|
439
|
-
* Agent runtime that determines where skills are installed by `holocron setup`.
|
|
440
|
-
* Skills are installed to `.agents/skills/<name>/` (canonical) with a
|
|
441
|
-
* relative symlink at the agent-specific path:
|
|
442
|
-
* - `"claude"` → `.claude/skills/<name>` → `../../.agents/skills/<name>`
|
|
443
|
-
* - `"codex"` | `"gemini"` → logged as unsupported; skipped gracefully.
|
|
444
|
-
*/
|
|
445
|
-
agent?: "claude" | "codex" | "gemini";
|
|
446
|
-
/**
|
|
447
|
-
* Skill names from `@theholocron/skills` to install during `holocron setup`.
|
|
448
|
-
* Installed paths are gitignored and managed by setup — do not commit them.
|
|
449
|
-
*
|
|
450
|
-
* @example
|
|
451
|
-
* ["git-safety", "pr-workflow", "commit-standards"]
|
|
452
|
-
*/
|
|
453
|
-
skills?: string[];
|
|
454
|
-
/**
|
|
455
|
-
* GitHub Pages configuration. When present, `holocron setup` calls the
|
|
456
|
-
* Pages API using `HOLOCRON_DEPLOY_TOKEN` (requires `pages:write` + `repo` scope).
|
|
457
|
-
* When absent, Pages is left as-is.
|
|
458
|
-
*
|
|
459
|
-
* @example
|
|
460
|
-
* { build: "workflow", domain: "docs.theholocron.dev", https: true }
|
|
461
|
-
*/
|
|
462
|
-
docs?: DocsConfig;
|
|
463
|
-
/**
|
|
464
|
-
* Environment variable namespace configuration.
|
|
465
|
-
* Declares the prefix(es) this project uses for its env vars so that
|
|
466
|
-
* tooling can generate `.env.example`, validate required vars, and
|
|
467
|
-
* produce accurate documentation without hard-coding prefix strings.
|
|
468
|
-
*
|
|
469
|
-
* @example
|
|
470
|
-
* { namespaces: ["HOLOCRON", "MY_CLI"] }
|
|
471
|
-
*/
|
|
472
|
-
env?: EnvConfig;
|
|
473
|
-
/**
|
|
474
|
-
* Structured-logging config. Only the level belongs here — Axiom
|
|
475
|
-
* credentials come from env vars, never a committed file.
|
|
476
|
-
*
|
|
477
|
-
* @example
|
|
478
|
-
* { level: "debug" }
|
|
479
|
-
*/
|
|
480
|
-
log?: LogConfig;
|
|
481
|
-
/**
|
|
482
|
-
* CLI self-telemetry override layer. Env var (`HOLOCRON_TELEMETRY=false`)
|
|
483
|
-
* still wins; this is the committed way to opt a repo out or drop usage
|
|
484
|
-
* analytics while keeping error reporting.
|
|
485
|
-
*
|
|
486
|
-
* @example
|
|
487
|
-
* { enabled: false }
|
|
488
|
-
* { analytics: "none" }
|
|
489
|
-
*/
|
|
490
|
-
telemetry?: TelemetryConfig;
|
|
259
|
+
/** One person: their GitHub account and their member id on the notifications provider. */
|
|
260
|
+
interface MemberLink {
|
|
261
|
+
/** The GitHub user id, as a string. It survives a rename; the login does not. */
|
|
262
|
+
github: string;
|
|
263
|
+
/** The GitHub login when the link was made; for reports only. */
|
|
264
|
+
login: string;
|
|
265
|
+
/** The member's id on the notifications provider (for Discord, the user id). */
|
|
266
|
+
member: string;
|
|
491
267
|
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
|
|
496
|
-
|
|
268
|
+
/** The file that says which server member is which GitHub account. */
|
|
269
|
+
interface LinksFile {
|
|
270
|
+
/** The file format version. */
|
|
271
|
+
version: 1;
|
|
272
|
+
/** One entry per linked person. */
|
|
273
|
+
links: MemberLink[];
|
|
497
274
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
275
|
+
interface RoleSyncPlan {
|
|
276
|
+
/** Team members who are linked and do not hold the role: give it to them. */
|
|
277
|
+
add: Array<{
|
|
278
|
+
member: string;
|
|
279
|
+
login: string;
|
|
280
|
+
}>;
|
|
281
|
+
/** Holders linked to a GitHub account that is no longer on the team: take it away. */
|
|
282
|
+
remove: Array<{
|
|
283
|
+
member: string;
|
|
284
|
+
login: string;
|
|
285
|
+
}>;
|
|
286
|
+
/** Team members with no link: the role cannot reach them until they link their account. */
|
|
287
|
+
unlinked: SourceTeamMember[];
|
|
288
|
+
/** Holders with no link at all. Left alone, because nothing says they should not have it. */
|
|
289
|
+
unknownHolders: Array<{
|
|
290
|
+
member: string;
|
|
291
|
+
name?: string;
|
|
292
|
+
}>;
|
|
293
|
+
/** Linked team members who already hold the role. */
|
|
294
|
+
inSync: number;
|
|
295
|
+
}
|
|
296
|
+
/** What {@link syncRoles} needs: the providers, the links, and the roles to keep equal to their teams. */
|
|
297
|
+
interface SyncRolesInput {
|
|
298
|
+
/** The provider that lists and changes who holds a role. */
|
|
299
|
+
notifications: Notifications;
|
|
300
|
+
/** The provider that lists a team's members. */
|
|
301
|
+
source: Source;
|
|
302
|
+
/** Who is which person, from the links file. */
|
|
303
|
+
links: LinksFile;
|
|
304
|
+
/** Each role and the team it follows. */
|
|
305
|
+
roles: ReadonlyArray<{
|
|
306
|
+
name: string;
|
|
307
|
+
team: string;
|
|
308
|
+
}>;
|
|
309
|
+
/** The organisation the teams are in; defaults to the source's own. */
|
|
510
310
|
org?: string;
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
hooks?: boolean | {
|
|
518
|
-
prePush?: boolean;
|
|
519
|
-
};
|
|
520
|
-
providers: ResolvedProvidersConfig;
|
|
521
|
-
apps: AppConfig[];
|
|
522
|
-
doctor: DoctorConfig;
|
|
523
|
-
agent?: "claude" | "codex" | "gemini";
|
|
524
|
-
skills?: string[];
|
|
525
|
-
/** Resolved Pages config. `build` is guaranteed present when this field exists. */
|
|
526
|
-
docs?: PagesConfig;
|
|
527
|
-
env?: EnvConfig;
|
|
528
|
-
log?: LogConfig;
|
|
529
|
-
telemetry?: TelemetryConfig;
|
|
311
|
+
/** Report what would change without changing anything. */
|
|
312
|
+
dryRun?: boolean;
|
|
313
|
+
/** Give the role to new team members but do not take it from people who left. */
|
|
314
|
+
keep?: boolean;
|
|
315
|
+
/** Where progress lines go; nowhere when left out. */
|
|
316
|
+
print?: (line: string) => void;
|
|
530
317
|
}
|
|
531
|
-
|
|
532
|
-
|
|
318
|
+
/** What {@link syncRoles} did. */
|
|
319
|
+
interface SyncRolesResult {
|
|
320
|
+
/** One entry per role whose plan could be made. */
|
|
321
|
+
roles: RoleSyncOutcome[];
|
|
322
|
+
/** Steps that failed; the run carried on past each. */
|
|
323
|
+
failures: Array<{
|
|
324
|
+
step: string;
|
|
325
|
+
message: string;
|
|
326
|
+
}>;
|
|
327
|
+
/** Roles given or taken. */
|
|
328
|
+
ok: number;
|
|
329
|
+
/** Already in sync, left alone, or only previewed. */
|
|
330
|
+
skipped: number;
|
|
533
331
|
}
|
|
332
|
+
/** What a source provider needs to be able to do to feed a role sync, or the reason it cannot. */
|
|
333
|
+
export declare function sourceProblem(source: Source | undefined): string | undefined;
|
|
334
|
+
/** Reads the links file; a file that does not exist yet is an empty one, a damaged one throws. */
|
|
335
|
+
export declare function readLinks(source: Source, layout: NotificationsLayout, org: string | undefined, provider: string): Promise<LinksFile>;
|
|
534
336
|
/**
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
* is how third-party plugins published outside the org work.
|
|
337
|
+
* The first role the layout declares for two different teams, or undefined. Names compare ignoring case, as
|
|
338
|
+
* the server does; the role would be synced against one team and then the other, so the last would win.
|
|
538
339
|
*/
|
|
539
|
-
declare function
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
340
|
+
export declare function roleTeamProblem(layout: {
|
|
341
|
+
roles?: ReadonlyArray<{
|
|
342
|
+
name: string;
|
|
343
|
+
team?: string;
|
|
344
|
+
}>;
|
|
345
|
+
}): string | undefined;
|
|
544
346
|
/**
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
* choice, repo archetype, capability drift). See
|
|
551
|
-
* `.notes/tech-holocron-platform.spec.md` → "Custom-properties sync — field
|
|
552
|
-
* definitions (#677)" for the full design.
|
|
347
|
+
* Makes each role's holders equal its team, one role after another. This is the sync itself, with no setup in
|
|
348
|
+
* front of it: the caller has already picked the providers, read the links and checked the layout. `holocron
|
|
349
|
+
* sync roles` and Sentinel's role sync are two callers of it. A step that fails is recorded and the
|
|
350
|
+
* run goes on; nothing here throws for a provider error. Idempotent: a role that already matches changes nothing.
|
|
351
|
+
* Lines go to `input.print` when it is given, and nowhere otherwise.
|
|
553
352
|
*/
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
353
|
+
export declare function syncRoles(input: SyncRolesInput): Promise<SyncRolesResult>;
|
|
354
|
+
/**
|
|
355
|
+
* The labels every repository gets from `setup`, with their GitHub colours (hex, no `#`) and descriptions. A
|
|
356
|
+
* plugin that makes labels of its own, such as Linear's setup, takes the colour of the one with the same name.
|
|
357
|
+
*/
|
|
358
|
+
export declare const CANONICAL_LABELS: readonly [{
|
|
359
|
+
readonly name: "bug";
|
|
360
|
+
readonly color: "d73a4a";
|
|
361
|
+
readonly description: "Something isn't working";
|
|
362
|
+
}, {
|
|
363
|
+
readonly name: "chore";
|
|
364
|
+
readonly color: "ededed";
|
|
365
|
+
readonly description: "Maintenance, no user-facing change";
|
|
366
|
+
}, {
|
|
367
|
+
readonly name: "ci";
|
|
368
|
+
readonly color: "0075ca";
|
|
369
|
+
readonly description: "CI/CD pipeline changes";
|
|
370
|
+
}, {
|
|
371
|
+
readonly name: "dependencies";
|
|
372
|
+
readonly color: "0366d6";
|
|
373
|
+
readonly description: "Dependency update";
|
|
374
|
+
}, {
|
|
375
|
+
readonly name: "documentation";
|
|
376
|
+
readonly color: "0075ca";
|
|
377
|
+
readonly description: "Documentation only";
|
|
378
|
+
}, {
|
|
379
|
+
readonly name: "duplicate";
|
|
380
|
+
readonly color: "cfd3d7";
|
|
381
|
+
readonly description: "Already reported";
|
|
382
|
+
}, {
|
|
383
|
+
readonly name: "enhancement";
|
|
384
|
+
readonly color: "a2eeef";
|
|
385
|
+
readonly description: "New feature or request";
|
|
386
|
+
}, {
|
|
387
|
+
readonly name: "good first issue";
|
|
388
|
+
readonly color: "7057ff";
|
|
389
|
+
readonly description: "Good for newcomers";
|
|
390
|
+
}, {
|
|
391
|
+
readonly name: "help wanted";
|
|
392
|
+
readonly color: "008672";
|
|
393
|
+
readonly description: "Extra attention needed";
|
|
394
|
+
}, {
|
|
395
|
+
readonly name: "invalid";
|
|
396
|
+
readonly color: "e4e669";
|
|
397
|
+
readonly description: "Doesn't seem right";
|
|
398
|
+
}, {
|
|
399
|
+
readonly name: "performance";
|
|
400
|
+
readonly color: "fbca04";
|
|
401
|
+
readonly description: "Performance improvement";
|
|
402
|
+
}, {
|
|
403
|
+
readonly name: "question";
|
|
404
|
+
readonly color: "d876e3";
|
|
405
|
+
readonly description: "Further information requested";
|
|
406
|
+
}, {
|
|
407
|
+
readonly name: "refactor";
|
|
408
|
+
readonly color: "cfd3d7";
|
|
409
|
+
readonly description: "Code restructuring";
|
|
410
|
+
}, {
|
|
411
|
+
readonly name: "released";
|
|
412
|
+
readonly color: "ededed";
|
|
413
|
+
readonly description: "Included in a release";
|
|
414
|
+
}, {
|
|
415
|
+
readonly name: "test";
|
|
416
|
+
readonly color: "bfd4f2";
|
|
417
|
+
readonly description: "Test-related changes";
|
|
418
|
+
}, {
|
|
419
|
+
readonly name: "triage";
|
|
420
|
+
readonly color: "e4e669";
|
|
421
|
+
readonly description: "Needs investigation";
|
|
422
|
+
}, {
|
|
423
|
+
readonly name: "wontfix";
|
|
424
|
+
readonly color: "ffffff";
|
|
425
|
+
readonly description: "Won't be addressed";
|
|
426
|
+
}];
|
|
427
|
+
/** What one token must carry in one layer, as `tokenExpectations()` reads it from a plugin's `PluginToken.expect`. */
|
|
428
|
+
interface LayerTokenExpectation {
|
|
429
|
+
/** The token's plugin environment variable (`PluginToken.envName`), its identity in the plugin's list. */
|
|
430
|
+
envName: string;
|
|
431
|
+
/** The layer that holds it. */
|
|
432
|
+
layer: EnvironmentLayer;
|
|
433
|
+
/** Every permission with its rule. Empty for a layer that holds the token with no permission rules. */
|
|
434
|
+
rules: Readonly<Record<string, PermissionRule>>;
|
|
435
|
+
/** The permissions the token must have, in declaration order. */
|
|
436
|
+
required: readonly string[];
|
|
437
|
+
/** The permissions the token must not have, in declaration order. */
|
|
438
|
+
absent: readonly string[];
|
|
561
439
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
/**
|
|
567
|
-
|
|
440
|
+
/** Which of the declared expectations to return; both left out returns all of them. */
|
|
441
|
+
interface TokenExpectationFilter {
|
|
442
|
+
/** Only this layer. */
|
|
443
|
+
layer?: string;
|
|
444
|
+
/** Only the token with this `envName`. */
|
|
445
|
+
envName?: string;
|
|
568
446
|
}
|
|
569
447
|
/**
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
* package has `bin`) → `platform` — matches `holocron` itself: the CLI is
|
|
574
|
-
* the deliverable, the plugin packages are supporting infrastructure for
|
|
575
|
-
* it, not separate products.
|
|
576
|
-
* 3. Monorepo with no CLI but at least one non-private workspace package →
|
|
577
|
-
* `library` — matches `clients`/`configs`/`utils`/`themes`/
|
|
578
|
-
* `observability`: a family of published packages, none of them a CLI.
|
|
579
|
-
* Checked *before* falling into the root-package branch below, because
|
|
580
|
-
* these repos' own root `package.json` is private and often carries
|
|
581
|
-
* `@theholocron/astro-config` for a docs site built from the monorepo
|
|
582
|
-
* root — without this check they'd wrongly resolve to `docs` off that
|
|
583
|
-
* root-level signal alone, when the docs site is a secondary concern of
|
|
584
|
-
* a library collection, not what the repo fundamentally is.
|
|
585
|
-
* 4. Single-package repo with `package.json#bin` → `cli`.
|
|
586
|
-
* 5. Docs-only site (astro/starlight present, root package private, no
|
|
587
|
-
* publishable exports) → `docs`.
|
|
588
|
-
* 6. Private, non-publishable, non-docs → `app`.
|
|
589
|
-
* 7. Otherwise, a single publishable package → `library`.
|
|
448
|
+
* Reads what a plugin's tokens declare (`PluginToken.expect`) as one entry per token and layer that holds it, in the
|
|
449
|
+
* order of `ENVIRONMENT_LAYERS`. The one reader the token probes, the doctor and the docs check share, so none of them
|
|
450
|
+
* walks the declaration itself. A token with no `expect` yields nothing; a layer no token holds is never listed.
|
|
590
451
|
*/
|
|
591
|
-
declare function
|
|
452
|
+
export declare function tokenExpectations(tokens: readonly PluginToken[], filter?: TokenExpectationFilter): LayerTokenExpectation[];
|
|
592
453
|
/**
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
* Curated table, not exhaustive by design — add to `KNOWN_STACK_DEPS` as new
|
|
597
|
-
* frameworks show up rather than trying to detect anything on npm.
|
|
454
|
+
* What stdout is. A token is never written to a `terminal` (it would sit in scrollback) or to `other` (a redirect to
|
|
455
|
+
* a regular file, which would leave plaintext tokens on disk without the protections of the file option); only a
|
|
456
|
+
* `pipe` receives the lines. On a terminal they go to the file option instead, or the clipboard when asked.
|
|
598
457
|
*/
|
|
599
|
-
|
|
600
|
-
/** The provider capability keys actually wired in `providers: {}` — zero heuristics. */
|
|
601
|
-
declare function deriveCapabilities(providers: ResolvedProvidersConfig | undefined): string[];
|
|
602
|
-
declare function deriveCompliance(capabilities: readonly string[]): "compliant" | "non-compliant";
|
|
458
|
+
type AuthExportOutKind = "terminal" | "pipe" | "other";
|
|
603
459
|
/**
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
* table, not two independently-maintained baselines.
|
|
460
|
+
* What file descriptor `fd` (stdout) is, for deciding where tokens may go: a `terminal`, a `pipe` (a FIFO, or the
|
|
461
|
+
* socket some shells and runners use for one), or `other` (a regular file, a device, or anything that cannot be
|
|
462
|
+
* inspected). Only a pipe is safe to write the lines to, so anything unknown is `other`.
|
|
608
463
|
*/
|
|
609
|
-
declare function
|
|
464
|
+
export declare function stdoutKind(isTerminal: boolean, fd?: number, stat?: (fd: number) => Pick<Stats, "isFIFO" | "isSocket">): AuthExportOutKind;
|
|
610
465
|
/**
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
*
|
|
615
|
-
*
|
|
466
|
+
* The vault Environment `holocron sync secrets --env <environment>` reads. A layer word (`local`, `dev`, `ci`, `prod`) is the
|
|
467
|
+
* Environment of that layer of this repository, `<org/repo> - <layer>`; any other text is a literal Environment name.
|
|
468
|
+
* A literal name wins only when it is not exactly a layer word, so an Environment that is itself called `prod` cannot be
|
|
469
|
+
* addressed by that name (spec `tech-environment-layers`, #2069).
|
|
470
|
+
*
|
|
471
|
+
* @param id - The `--env` value the user gave.
|
|
472
|
+
* @param input - Where the repository is (its `origin` remote is read there), and optionally how to read it.
|
|
473
|
+
* @throws {ConfigError} For a layer word when the remote cannot be read (the message names the `environment` option).
|
|
616
474
|
*/
|
|
617
|
-
declare function
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
providers?: RawProvidersConfig;
|
|
631
|
-
/**
|
|
632
|
-
* Required status-check contexts **not** backed by a `required` task
|
|
633
|
-
* (codecov gates, `Storybook Publish`, …). Unioned across all capabilities
|
|
634
|
-
* onto the top-level `extraRequiredChecks`. Task-backed checks come from
|
|
635
|
-
* `{ required: true }` task entries via `astromech.requiredChecks()`.
|
|
636
|
-
*/
|
|
637
|
-
extraRequiredChecks?: string[];
|
|
638
|
-
/** Repo config fragment. Scalar fields: last writer wins. properties/topics/teams: merged. */
|
|
639
|
-
repo?: Partial<Omit<RepoConfig, "name">>;
|
|
640
|
-
/** Org name. Last writer wins. */
|
|
641
|
-
org?: string;
|
|
642
|
-
/** Org canonical domain. Last writer wins. */
|
|
643
|
-
domain?: string;
|
|
644
|
-
/** Docs site config. Last writer wins. */
|
|
645
|
-
docs?: DocsConfig;
|
|
646
|
-
}
|
|
647
|
-
/** The merged result of a compose() call. Spreads into defineConfig(). */
|
|
648
|
-
interface ComposedPreset {
|
|
649
|
-
tasks: TaskEntry[];
|
|
650
|
-
providers: RawProvidersConfig;
|
|
651
|
-
repo: Partial<Omit<RepoConfig, "name">>;
|
|
652
|
-
/** Non-task required-check contexts, unioned across capabilities. */
|
|
653
|
-
extraRequiredChecks: string[];
|
|
654
|
-
org?: string;
|
|
655
|
-
domain?: string;
|
|
656
|
-
docs?: DocsConfig;
|
|
475
|
+
export declare function resolveEnvironmentId(id: string, input: {
|
|
476
|
+
repoRoot: string;
|
|
477
|
+
gitExec?: GitExec;
|
|
478
|
+
}): Promise<string>;
|
|
479
|
+
/** The line that says how to fix a credentials path the version control ignore rules do not cover. */
|
|
480
|
+
export declare function ignoreAdvice(isDefault: boolean, choose: string): string;
|
|
481
|
+
/** The file `export tokens` and `new github-app` write by default, relative to the repository root. */
|
|
482
|
+
export declare const PRIVATE_CREDENTIALS_FILE = ".holocron/.private/.credentials";
|
|
483
|
+
/** Where a credentials file goes: its absolute path, and whether it is the default one in the private directory. */
|
|
484
|
+
interface CredentialsFileTarget {
|
|
485
|
+
path: string;
|
|
486
|
+
/** True when no `--file` was given, so the file is in `.holocron/.private/` and a missing ignore rule is fixed by `sync`. */
|
|
487
|
+
isDefault: boolean;
|
|
657
488
|
}
|
|
658
489
|
/**
|
|
659
|
-
*
|
|
660
|
-
*
|
|
661
|
-
*
|
|
662
|
-
* - Accepts individual capabilities or nested arrays (for bundle presets).
|
|
663
|
-
* - Deduplicates by `id` — when the same ID appears more than once, the last
|
|
664
|
-
* occurrence wins. This lets callers override bundle defaults by listing an
|
|
665
|
-
* explicit capability after the bundle.
|
|
666
|
-
* - Validates all `requires` at call time and throws `ConfigError` if any are
|
|
667
|
-
* unmet, listing every missing dependency in a single message.
|
|
668
|
-
*
|
|
669
|
-
* @example
|
|
670
|
-
* // docs-only site — no typecheck
|
|
671
|
-
* const preset = compose(node(), docs());
|
|
672
|
-
*
|
|
673
|
-
* // library with docs
|
|
674
|
-
* const preset = compose(node(), typecheck(), docs());
|
|
675
|
-
*
|
|
676
|
-
* // nextjs() is a bundle that returns Capability[]
|
|
677
|
-
* const preset = compose(node(), nextjs());
|
|
490
|
+
* The credentials file for a command: `file` (relative to `base`) when given, else `.holocron/.private/.credentials`
|
|
491
|
+
* under `base`. The default's directory is created when missing (owner-only), because the ignore check can only ask
|
|
492
|
+
* about a path whose directory exists and the file cannot be written without it.
|
|
678
493
|
*/
|
|
679
|
-
declare function
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
494
|
+
export declare function resolveCredentialsFile(base: string, file: string | undefined, makeDir?: (dir: string) => void): CredentialsFileTarget;
|
|
495
|
+
/**
|
|
496
|
+
* The closed list of area files `loadConfig` reads from `.holocron/` (the directory is `.<config name>`, set by kyber):
|
|
497
|
+
* `.holocron/notifications.*` fills `providers.notifications`' `layout`, `.holocron/repo.*` fills keys of `repo`, and `.holocron/org.*` fills provider options (`teamId`, `accountId`) a config leaves out.
|
|
498
|
+
* A file not on this list is never read.
|
|
499
|
+
*/
|
|
500
|
+
export declare const HOLOCRON_AREAS: readonly ["notifications", "repo", "org"];
|
|
501
|
+
/**
|
|
502
|
+
* The areas a config in a subdirectory also reads from the repository root's `.holocron/` (SPEC-0069): only `org`,
|
|
503
|
+
* because its values are the organization's and every config needs them. `repo` and `notifications` describe the
|
|
504
|
+
* repository itself, so an app's config does not take them from the root.
|
|
505
|
+
*/
|
|
506
|
+
export declare const SHARED_AREAS: readonly ["org"];
|
|
690
507
|
/**
|
|
691
|
-
*
|
|
692
|
-
*
|
|
693
|
-
*
|
|
508
|
+
* Put the area files of `.holocron/` into the config as loaded, before `deriveDefaults` runs: `notifications` becomes
|
|
509
|
+
* the `layout` of the notifications provider and `repo` supplies keys of `repo` and `org` fills the provider options a config leaves out. A value set both inline and in a file
|
|
510
|
+
* is a `ConfigError` naming both (no merge, no precedence). With no area files the config is returned as it was.
|
|
694
511
|
*/
|
|
695
|
-
declare function
|
|
696
|
-
|
|
697
|
-
export { Analytics, AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, Capability, CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DeriveProfileInput, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, DocsConfig, DoctorConfig, EnsureResult, EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, FeatureResolverConfig, HolocronConfig, HolocronProfile, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, LoadedConfig, LogConfig, Logs, MultiEntry, NormalizedAuthUser, Notifications, PackageJsonLike, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, RawProviderEntry, RawProvidersConfig, RepoConfig, RepoProperties, RepoProtection, RepoRef, RepoSettings, type RequestOptions, ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, ResolvedHolocronConfig, ResolvedProviderEntry, ResolvedProvidersConfig, ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, SingleEntry, Source, StatusCategory, Storage, StorageBranch, StorybookDeployProject, TaskEntryConfig, TeamEntry, TeamPermission, TelemetryConfig, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, Workers, WorkflowWithConfig, compose, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, getToken, isMulti, listStoredProviders, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
|
|
512
|
+
export declare function placeAreas(areas: ConfigDirArea[], raw: HolocronConfig): HolocronConfig;
|
|
513
|
+
export { AddedItem, Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, type AuthExportOutKind, AuthIdentity, AuthUser, BoardField, BoardFieldType, BoardItem, BoardItemInput, BoardRule, BoardState, BoardStatus, BoardStatusCategory, BoardSummary, BoardTemplate, BoardTemplateFile, BoardView, CARDINALITY, type Capability, type CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, type ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, type ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, Credentials, type CredentialsConfig, CredentialsInspection, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, type DeriveProfileInput, type DevConfig, type DevServeConfig, DiscussionPatch, DiscussionPost, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, type DocsConfig, type DoctorConfig, DuplicateDiscussion, ElevationRequiredError, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureReport, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, type EnvConfig, Environment, EnvironmentEntry, type EnvironmentLayer, EnvironmentReviewer, Environments, Errors, type EslintConfig, ExportInfo, type FeatureResolver, type FeatureResolverConfig, type GitHubAppConfig, type HolocronConfig, type HolocronProfile, IdeaRecord, Ideas, type IdeasConfig, ImportOptions, ImportResult, InspectRelayInput, Issue, IssueComment, IssueOrder, IssuePriority, IssueRecord, IssueSearchFilter, IssueSelector, Issues, KNOWN_STACK_DEPS, LabelDef, type LayerTokenExpectation, LifecycleResult, LifecycleSlot, type LinksFile, type LoadedConfig, type LogConfig, Logs, LogsDataset, type MemberLink, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAlertChannelState, MonitoringAlertSettings, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, MoveReport, type MultiEntry, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsForumTag, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsMonitoringFeed, NotificationsOnboardingLayout, NotificationsPicture, NotificationsPinnedLayout, NotificationsPrsFeed, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type OrgConfig, OrganizationSecretScope, type PackageJsonLike, PagesConfig, ParseWebhookInput, type PermissionRule, type PluginProbes, type PluginToken, type Probe, type ProbeContext, type ProbeRow, Projects, type ProviderAction, type ProviderActionContext, type ProviderActions, ProviderApiError, ProviderIdentity, type ProviderOptions, type ProviderRow, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, type ReadKeysLimitedInput, RelayState, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, type RepoSecrets, type RepoSecretsDeploy, type RepoSecretsSync, RepoSettings, type RepoValidationConfig, type RepoVariables, type RepoVariablesSync, type RequestOptions, type ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, type ResolvedHolocronConfig, type ResolvedProviderEntry, type ResolvedProvidersConfig, type ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretAccess, SecretScope, SecretVisibility, Secrets, ServerInspection, type SingleEntry, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, type StackName, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, SyncResult, type SyncRolesInput, type SyncRolesResult, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, type TokenExpectation, type TokenExpectationFilter, type TokenResolver, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, TunnelRoute, Tunnels, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, WorkerScriptState, Workers, type WorkflowWithConfig, compose, createRestClient, credentialsEnvironment, defineConfig, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, isMulti, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, resolveValue };
|