@theholocron/cli 5.0.0-alpha.351 → 5.0.0-alpha.353
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 +17 -2
- package/dist/cli.mjs +212 -16
- package/dist/cli.mjs.map +1 -1
- package/dist/{config-system-C6MsRNbo.d.mts → config-system-CTQ_I-Vm.d.mts} +44 -1
- package/dist/{config-system-5rdWyUAw.mjs → config-system-DKtlo5Pb.mjs} +99 -13
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +3 -3
- package/dist/presets.d.mts +1 -1
- package/dist/presets.mjs +1 -1
- package/package.json +12 -12
|
@@ -121,9 +121,29 @@ interface RepoVariables {
|
|
|
121
121
|
value: string;
|
|
122
122
|
visibility?: "all" | "private";
|
|
123
123
|
}>;
|
|
124
|
+
/**
|
|
125
|
+
* The vault environments `holocron secrets sync` fills variables from, so one 1Password Environment is the only
|
|
126
|
+
* place they are edited. Names only. A name here must not also be a literal value in `repo` or `org`, and `prune`
|
|
127
|
+
* cannot be combined with it; either is a config error.
|
|
128
|
+
*/
|
|
129
|
+
sync?: RepoVariablesSync[];
|
|
124
130
|
/** Delete variables that exist but are not declared here. Off by default: they are left alone. */
|
|
125
131
|
prune?: boolean;
|
|
126
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* One vault environment that `holocron secrets sync` pushes into GitHub Actions variables. Not secrets: a variable is
|
|
135
|
+
* readable in GitHub afterwards, so keep it in an environment of its own, apart from the one that fills secrets.
|
|
136
|
+
*/
|
|
137
|
+
interface RepoVariablesSync {
|
|
138
|
+
/** The vault environment id, as given to `holocron secrets sync <environmentId>`. */
|
|
139
|
+
environment: string;
|
|
140
|
+
/** The vault keys written as variables, by name. Required: a key the environment gains by mistake is never published. */
|
|
141
|
+
keys: string[];
|
|
142
|
+
/** Where the variables land: `"repo"` (the default) or `"org=<name>"`. */
|
|
143
|
+
scope?: string;
|
|
144
|
+
/** Organization variables only: which repositories can read them. `"all"` by default. */
|
|
145
|
+
visibility?: "all" | "private";
|
|
146
|
+
}
|
|
127
147
|
/**
|
|
128
148
|
* The names of the secrets that must exist for this repository's workflows to work, so `holocron doctor secrets`
|
|
129
149
|
* can say which are missing. Only names go here, never values; `holocron secrets set` and `secrets sync` write
|
|
@@ -166,6 +186,29 @@ interface RepoValidationConfig {
|
|
|
166
186
|
*/
|
|
167
187
|
docsCoverage?: DocsCoverageMode;
|
|
168
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* The `.holocron/org.*` area: the organization's non-CI constants that are provider options. The loader fills an
|
|
191
|
+
* option a provider entry leaves out from here; the same option set inline and here is a `ConfigError`. Identifiers
|
|
192
|
+
* only, never a secret, and nothing CI needs (those live in 1Password and sync to a GitHub variable). A key a provider
|
|
193
|
+
* does not use is ignored; a provider or option not listed here is an error.
|
|
194
|
+
*/
|
|
195
|
+
interface OrgConfig {
|
|
196
|
+
/** Options filled into every `cloudflare` provider entry. */
|
|
197
|
+
cloudflare?: {
|
|
198
|
+
/** The Cloudflare account id (an identifier, not a credential). */
|
|
199
|
+
accountId?: string;
|
|
200
|
+
};
|
|
201
|
+
/** Options filled into every `vercel` provider entry. */
|
|
202
|
+
vercel?: {
|
|
203
|
+
/** The Vercel team id (an identifier, not a credential). */
|
|
204
|
+
teamId?: string;
|
|
205
|
+
};
|
|
206
|
+
/** Options filled into every `checkly` provider entry. */
|
|
207
|
+
checkly?: {
|
|
208
|
+
/** The Checkly account id (an identifier, not a credential). */
|
|
209
|
+
accountId?: string;
|
|
210
|
+
};
|
|
211
|
+
}
|
|
169
212
|
/** The `repo` block: how the GitHub repository is set up and kept in sync by `holocron repo setup`. */
|
|
170
213
|
interface RepoConfig {
|
|
171
214
|
/** "owner/name" — the GitHub repository coordinate. Derived from the git remote when absent. */
|
|
@@ -845,4 +888,4 @@ declare const loadConfig: (cwd: string) => Promise<LoadedConfig>;
|
|
|
845
888
|
* const preset = compose(node(), nextjs());
|
|
846
889
|
*/
|
|
847
890
|
declare const compose: (...args: (Capability | Capability[])[]) => ComposedPreset;
|
|
848
|
-
export {
|
|
891
|
+
export { RawProvidersConfig as A, ResolvedProviderEntry as B, EslintConfig as C, OrgConfig as D, MultiEntry as E, RepoSecretsSync as F, TaskEntryConfig as G, ResolvedTuple as H, RepoValidationConfig as I, TelemetryConfig as K, RepoVariables as L, RepoProperties as M, RepoProtection as N, ProviderOptions as O, RepoSecrets as P, RepoVariablesSync as R, EnvConfig as S, LogConfig as T, SingleEntry as U, ResolvedProvidersConfig as V, StorybookDeployProject as W, CredentialsConfig as _, LoadedConfig as a, DocsConfig as b, TaskEntry as c, resolveConfig as d, resolveEntry as f, ChromaticProjectConfig as g, CapabilityConfigPackage as h, loadConfig as i, RepoConfig as j, RawProviderEntry as k, ConfigError$1 as l, AppConfig as m, compose as n, Capability as o, resolvePluginPackage as p, WorkflowWithConfig as q, defineConfig as r, ComposedPreset as s, ConfigFileError as t, credentialsEnvironment as u, DevConfig as v, HolocronConfig as w, DoctorConfig as x, DevServeConfig as y, ResolvedHolocronConfig as z };
|
|
@@ -6,6 +6,34 @@ import { readPackageJson } from "@theholocron/pkg-utils";
|
|
|
6
6
|
import { resolveTaskName } from "@theholocron/astromech";
|
|
7
7
|
import { loadTasksConfig } from "@theholocron/astromech/config";
|
|
8
8
|
import { readGitRemote } from "@theholocron/git-utils";
|
|
9
|
+
// src/config/validate-variables-sync/validate-variables-sync.ts
|
|
10
|
+
/** GitHub treats variable names as case-insensitive, so every comparison goes through this. */
|
|
11
|
+
const key = (name) => name.toUpperCase();
|
|
12
|
+
/**
|
|
13
|
+
* Check `repo.variables.sync`: each entry names a vault environment, one or more keys and a scope that is `repo` or
|
|
14
|
+
* `org=<name>`; a name may not also be a literal value of the same scope (one source per name); and `prune` cannot
|
|
15
|
+
* be combined with `sync`, because `repo setup` would delete the variables the sync wrote.
|
|
16
|
+
*
|
|
17
|
+
* @param variables - `repo.variables`, if the config has it.
|
|
18
|
+
* @throws {ConfigError} Naming the first problem found.
|
|
19
|
+
*/
|
|
20
|
+
function validateVariablesSync(variables) {
|
|
21
|
+
const entries = variables?.sync;
|
|
22
|
+
if (!entries || entries.length === 0) return;
|
|
23
|
+
if (variables?.prune === true) throw new ConfigError("`repo.variables.prune` cannot be combined with `repo.variables.sync`: pruning would delete the variables the sync writes");
|
|
24
|
+
for (const entry of entries) {
|
|
25
|
+
if (typeof entry.environment !== "string" || entry.environment.trim() === "") throw new ConfigError("a `repo.variables.sync` entry needs the name of a vault environment");
|
|
26
|
+
const label = `\`repo.variables.sync\` entry for ${JSON.stringify(entry.environment)}`;
|
|
27
|
+
if (!Array.isArray(entry.keys) || entry.keys.length === 0 || entry.keys.some((k) => typeof k !== "string" || k === "")) throw new ConfigError(`${label} needs \`keys\`, a list of variable names`);
|
|
28
|
+
const scope = entry.scope ?? "repo";
|
|
29
|
+
const org = scope.startsWith("org=") ? scope.slice(4) : void 0;
|
|
30
|
+
if (scope !== "repo" && (org === void 0 || org === "")) throw new ConfigError(`${label} has scope ${JSON.stringify(scope)}: use "repo" or "org=<name>"`);
|
|
31
|
+
if (entry.visibility !== void 0 && entry.visibility !== "all" && entry.visibility !== "private") throw new ConfigError(`${label} has visibility ${JSON.stringify(entry.visibility)}: use "all" or "private"`);
|
|
32
|
+
const literal = new Set(Object.keys((org === void 0 ? variables?.repo : variables?.org) ?? {}).map(key));
|
|
33
|
+
const both = entry.keys.filter((k) => literal.has(key(k)));
|
|
34
|
+
if (both.length > 0) throw new ConfigError(`${label} lists ${both.join(", ")}, which \`repo.variables.${org === void 0 ? "repo" : "org"}\` also gives a value: keep one source per name`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
9
37
|
// src/config/config/config.ts
|
|
10
38
|
const PLUGIN_PREFIX = "@theholocron/holocron-plugin-";
|
|
11
39
|
const COMMUNITY_PREFIX = "holocron-plugin-";
|
|
@@ -127,6 +155,7 @@ function resolveConfig(raw) {
|
|
|
127
155
|
if (typeof environment !== "string" || environment.trim() === "") throw new ConfigError$1("`credentials.environment` must be the name of an environment, got an empty value");
|
|
128
156
|
}
|
|
129
157
|
if (raw.dev !== void 0) validateDev(raw.dev);
|
|
158
|
+
validateVariablesSync(raw.repo?.variables);
|
|
130
159
|
const credentialsEntry = providers.credentials;
|
|
131
160
|
if (credentialsEntry?.cardinality === "many") for (const tuple of credentialsEntry.tuples) {
|
|
132
161
|
const own = tuple.options.environment;
|
|
@@ -163,8 +192,9 @@ function resolveConfig(raw) {
|
|
|
163
192
|
}
|
|
164
193
|
// src/config/compose/merge-sync/merge-sync.ts
|
|
165
194
|
/**
|
|
166
|
-
* Merge two lists of `repo.secrets.sync` entries. An entry is the same sync when its
|
|
167
|
-
* the keys then add up, and an entry that names no keys (every key the vault holds) stays
|
|
195
|
+
* Merge two lists of `repo.secrets.sync` (or `repo.variables.sync`) entries. An entry is the same sync when its
|
|
196
|
+
* environment and scope match; the keys then add up, and an entry that names no keys (every key the vault holds) stays
|
|
197
|
+
* that way.
|
|
168
198
|
*/
|
|
169
199
|
function mergeSync(a, b) {
|
|
170
200
|
const merged = /* @__PURE__ */ new Map();
|
|
@@ -187,7 +217,7 @@ const properties = shallowMerge();
|
|
|
187
217
|
const teamsByKey = mergeByKey((t) => typeof t === "string" ? t : t.slug);
|
|
188
218
|
/**
|
|
189
219
|
* Merge one capability's `repo` fragment onto what earlier ones gave. Scalars: last writer wins. `properties`: shallow
|
|
190
|
-
* merge. `variables`: merged per scope (`repo`, `org`). `secrets`: each name list is a union, and `sync` entries merge by
|
|
220
|
+
* merge. `variables`: merged per scope (`repo`, `org`), and `sync` entries by environment and scope. `secrets`: each name list is a union, and `sync` entries merge by
|
|
191
221
|
* environment and scope. `topics`: union. `teams`: merged by slug.
|
|
192
222
|
*/
|
|
193
223
|
function mergeRepo(prev, next) {
|
|
@@ -207,7 +237,8 @@ function mergeRepo(prev, next) {
|
|
|
207
237
|
...repo.variables?.org || variables.org ? { org: {
|
|
208
238
|
...repo.variables?.org,
|
|
209
239
|
...variables.org
|
|
210
|
-
} } : {}
|
|
240
|
+
} } : {},
|
|
241
|
+
...repo.variables?.sync || variables.sync ? { sync: mergeSync(repo.variables?.sync, variables.sync) } : {}
|
|
211
242
|
};
|
|
212
243
|
if (secrets) {
|
|
213
244
|
const environments = { ...repo.secrets?.environments };
|
|
@@ -284,19 +315,23 @@ async function deriveDefaults(found) {
|
|
|
284
315
|
// src/config/load-config/holocron-areas/holocron-areas.ts
|
|
285
316
|
/**
|
|
286
317
|
* The closed list of area files `loadConfig` reads from `.holocron/` (the directory is `.<config name>`, set by kyber):
|
|
287
|
-
* `.holocron/notifications.*` fills `providers.notifications`' `layout`,
|
|
318
|
+
* `.holocron/notifications.*` fills `providers.notifications`' `layout`, `.holocron/repo.*` fills keys of `repo`, and `.holocron/org.*` fills provider options (`teamId`, `accountId`) a config leaves out.
|
|
288
319
|
* A file not on this list is never read.
|
|
289
320
|
*/
|
|
290
|
-
const HOLOCRON_AREAS = [
|
|
321
|
+
const HOLOCRON_AREAS = [
|
|
322
|
+
"notifications",
|
|
323
|
+
"repo",
|
|
324
|
+
"org"
|
|
325
|
+
];
|
|
291
326
|
// src/config/load-config/place-notifications/place-notifications.ts
|
|
292
|
-
const isTuple = (entry) => Array.isArray(entry) && entry.length === 2 && typeof entry[0] === "string" && typeof entry[1] === "object" && entry[1] !== null && !Array.isArray(entry[1]);
|
|
293
|
-
const providerName = (entry) => isTuple(entry) ? entry[0] : entry;
|
|
327
|
+
const isTuple$1 = (entry) => Array.isArray(entry) && entry.length === 2 && typeof entry[0] === "string" && typeof entry[1] === "object" && entry[1] !== null && !Array.isArray(entry[1]);
|
|
328
|
+
const providerName = (entry) => isTuple$1(entry) ? entry[0] : entry;
|
|
294
329
|
/** Index of the entry the layout belongs to in a multi-provider list: the first `discord`. */
|
|
295
330
|
function findDiscord(entries) {
|
|
296
331
|
return entries.findIndex((entry) => providerName(entry) === "discord");
|
|
297
332
|
}
|
|
298
333
|
function withLayout(entry, layout) {
|
|
299
|
-
return isTuple(entry) ? [entry[0], {
|
|
334
|
+
return isTuple$1(entry) ? [entry[0], {
|
|
300
335
|
...entry[1],
|
|
301
336
|
layout
|
|
302
337
|
}] : [entry, { layout }];
|
|
@@ -312,14 +347,14 @@ function placeNotifications(raw, area) {
|
|
|
312
347
|
const hint = `Set it in one place: remove the inline \`layout\` or delete ${area.path}`;
|
|
313
348
|
let placed;
|
|
314
349
|
if (entry === void 0) throw new ConfigError(`${area.path} holds the notifications layout, but providers.notifications is not set. Add \`notifications: ["discord", { guildId }]\` to providers`);
|
|
315
|
-
else if (Array.isArray(entry) && !isTuple(entry)) {
|
|
350
|
+
else if (Array.isArray(entry) && !isTuple$1(entry)) {
|
|
316
351
|
const index = findDiscord(entry);
|
|
317
352
|
if (index === -1) throw new ConfigError(`${area.path} holds the notifications layout, but providers.notifications has no discord entry`);
|
|
318
353
|
const target = entry[index];
|
|
319
|
-
if (isTuple(target) && target[1].layout !== void 0) throw new ConfigError(`the notifications layout is set in providers.notifications and in ${area.path}. ${hint}`);
|
|
354
|
+
if (isTuple$1(target) && target[1].layout !== void 0) throw new ConfigError(`the notifications layout is set in providers.notifications and in ${area.path}. ${hint}`);
|
|
320
355
|
placed = entry.map((item, i) => i === index ? withLayout(item, area.value) : item);
|
|
321
356
|
} else {
|
|
322
|
-
if (isTuple(entry) && entry[1].layout !== void 0) throw new ConfigError(`the notifications layout is set in providers.notifications and in ${area.path}. ${hint}`);
|
|
357
|
+
if (isTuple$1(entry) && entry[1].layout !== void 0) throw new ConfigError(`the notifications layout is set in providers.notifications and in ${area.path}. ${hint}`);
|
|
323
358
|
placed = withLayout(entry, area.value);
|
|
324
359
|
}
|
|
325
360
|
return {
|
|
@@ -330,6 +365,56 @@ function placeNotifications(raw, area) {
|
|
|
330
365
|
}
|
|
331
366
|
};
|
|
332
367
|
}
|
|
368
|
+
// src/config/load-config/place-org/place-org.ts
|
|
369
|
+
/** The options each provider key of `.holocron/org.*` may hold. Checked against `OrgConfig` by the type. */
|
|
370
|
+
const ORG_OPTIONS = {
|
|
371
|
+
cloudflare: ["accountId"],
|
|
372
|
+
vercel: ["teamId"],
|
|
373
|
+
checkly: ["accountId"]
|
|
374
|
+
};
|
|
375
|
+
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
376
|
+
const isTuple = (entry) => Array.isArray(entry) && entry.length === 2 && typeof entry[0] === "string" && isObject(entry[1]);
|
|
377
|
+
/** Check the shape of the area file: a closed list of providers, each with a closed list of string options. */
|
|
378
|
+
function validate(area) {
|
|
379
|
+
if (!isObject(area.value)) throw new ConfigError(`${area.path} must export the org settings as an object`);
|
|
380
|
+
for (const [provider, options] of Object.entries(area.value)) {
|
|
381
|
+
const allowed = ORG_OPTIONS[provider];
|
|
382
|
+
if (allowed === void 0) throw new ConfigError(`${area.path} has an unknown provider "${provider}". Known: ${Object.keys(ORG_OPTIONS).join(", ")}`);
|
|
383
|
+
if (!isObject(options)) throw new ConfigError(`${area.path}: "${provider}" must be an object of options`);
|
|
384
|
+
for (const [option, value] of Object.entries(options)) {
|
|
385
|
+
if (!allowed.includes(option)) throw new ConfigError(`${area.path}: "${provider}.${option}" is not an org option. Known: ${allowed.join(", ")}`);
|
|
386
|
+
if (typeof value !== "string" || value === "") throw new ConfigError(`${area.path}: "${provider}.${option}" must be a non-empty string`);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
return area.value;
|
|
390
|
+
}
|
|
391
|
+
/** Fill one entry when it names a provider the area holds; throws when the config already sets one of its options. */
|
|
392
|
+
function fill(entry, org, capability, path) {
|
|
393
|
+
const [provider, options] = isTuple(entry) ? entry : [entry, {}];
|
|
394
|
+
const values = org[provider];
|
|
395
|
+
if (values === void 0 || Object.keys(values).length === 0) return entry;
|
|
396
|
+
for (const option of Object.keys(values)) if (options[option] !== void 0) throw new ConfigError(`${provider}.${option} is set in providers.${capability} and in ${path}. Set it in one place: remove the inline option or the key from ${path}`);
|
|
397
|
+
return [provider, {
|
|
398
|
+
...options,
|
|
399
|
+
...values
|
|
400
|
+
}];
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Fill the provider options of `.holocron/org.*` into the providers the config uses. A provider entry (a name, a
|
|
404
|
+
* `[name, options]` tuple, or either inside a list) that names a provider the file holds gets each option it leaves
|
|
405
|
+
* out. An option set inline and in the file is a `ConfigError` naming both (no merge, no precedence); a provider the
|
|
406
|
+
* config does not use is ignored; a provider or option the file lists but `OrgConfig` does not know is an error.
|
|
407
|
+
*/
|
|
408
|
+
function placeOrg(raw, area) {
|
|
409
|
+
const org = validate(area);
|
|
410
|
+
if (raw.providers === void 0) return raw;
|
|
411
|
+
const providers = { ...raw.providers };
|
|
412
|
+
for (const [capability, entry] of Object.entries(raw.providers)) providers[capability] = Array.isArray(entry) && !isTuple(entry) ? entry.map((item) => fill(item, org, capability, area.path)) : fill(entry, org, capability, area.path);
|
|
413
|
+
return {
|
|
414
|
+
...raw,
|
|
415
|
+
providers
|
|
416
|
+
};
|
|
417
|
+
}
|
|
333
418
|
// src/config/load-config/place-repo/place-repo.ts
|
|
334
419
|
/**
|
|
335
420
|
* Add the keys of `.holocron/repo.*` to `repo`. The keys of the two sources must differ (`repo.defaultBranch` stays
|
|
@@ -352,13 +437,14 @@ function placeRepo(raw, area) {
|
|
|
352
437
|
// src/config/load-config/place-areas/place-areas.ts
|
|
353
438
|
/**
|
|
354
439
|
* Put the area files of `.holocron/` into the config as loaded, before `deriveDefaults` runs: `notifications` becomes
|
|
355
|
-
* the `layout` of the notifications provider and `repo` supplies keys of `repo
|
|
440
|
+
* 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
|
|
356
441
|
* is a `ConfigError` naming both (no merge, no precedence). With no area files the config is returned as it was.
|
|
357
442
|
*/
|
|
358
443
|
function placeAreas(areas, raw) {
|
|
359
444
|
let result = raw;
|
|
360
445
|
for (const area of areas) if (area.area === "notifications") result = placeNotifications(result, area);
|
|
361
446
|
else if (area.area === "repo") result = placeRepo(result, area);
|
|
447
|
+
else if (area.area === "org") result = placeOrg(result, area);
|
|
362
448
|
return result;
|
|
363
449
|
}
|
|
364
450
|
// src/config/config-system.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $ as DnsRecordType, $t as ParseWebhookInput, A as Ci, An as WebhookDashboardInfo, At as MonitoringCheckInput, B as DeployScriptConfig, Bt as NotificationsForumTag, C as BoardTemplate, Cn as Tooling, Ct as MonitoringAlertChannelResult, D as CapabilityKey, Dn as TunnelRoute, Dt as MonitoringAssertionComparison, E as CapabilityImpls, En as TrackerUser, Et as MonitoringAssertion, F as CreateAuthUserInput, Fn as Workers, Ft as NotificationsAccess, G as DeploymentRecord, Gt as NotificationsOnboardingLayout, H as Deployment, Ht as NotificationsLinksLayout, I as Credentials, It as NotificationsApplicationLayout, J as DiscussionPatch, Jt as NotificationsServerLayout, K as DeploymentTarget, Kt as NotificationsPicture, L as CredentialsInspection, Lt as NotificationsChannelLayout, M as CiRunFilter, Mn as WikiProvisionOpts, Mt as MoveReport, N as CiRunStatus, Nn as WikiProxyConfig, Nt as NormalizedAuthUser, O as Cardinality, On as Tunnels, Ot as MonitoringAssertionSource, P as ConnectionStringOptions, Pn as WorkerScriptState, Pt as Notifications, Q as DnsRecordRequest, Qt as PagesConfig, R as DeployFunctionConfig, Rt as NotificationsDelivery, S as BoardSummary, Sn as TeamPermission, St as MonitoringAlertChannelInput, T as BoardView, Tn as TrackerDoctorReport, Tt as MonitoringAlertSettings, U as DeploymentProject, Ut as NotificationsMember, V as DeployScriptResult, Vt as NotificationsLayout, W as DeploymentProjectSettings, Wt as NotificationsMonitoringFeed, X as Dns, Xt as NotificationsSignedIn, Y as DiscussionPost, Yt as NotificationsSignIn, Z as DnsRecord, Zt as NotificationsWelcomeLayout, _ as BoardItem, _n as SourceTeamMember, _t as LabelDef, a as REQUIRED_CAPABILITIES, an as RepoSettings, at as EnsureWebhookResult, b as BoardStatus, bn as StorageBranch, bt as Logs, c as Analytics, cn as SecretScope, ct as EnsuredTunnel, d as AuthEvent, dn as Source, dt as Environments, en as Projects, et as EnsureDiscussionInput, f as AuthEventType, fn as SourceBranch, ft as Errors, g as BoardFieldType, gn as SourceSecurity, gt as Issues, h as BoardField, hn as SourceRulesetDetail, ht as IssueSearchFilter, i as ProviderApiError, in as RepoRef, it as EnsureResult, j as CiRun, jn as Wiki, jt as MonitoringHttpMethod, k as CardinalityFor, kn as Vault, kt as MonitoringCheck, l as Auth, ln as Secrets, lt as Environment, m as AuthUser, mn as SourceRepoInfo, mt as Issue, n as ElevationRequiredError, nn as PullRequest, nt as EnsureRelayResult, o as WebhookVerificationError, on as ResolvedCapability, ot as EnsuredDiscussion, p as AuthIdentity, pn as SourceFile, pt as InspectRelayInput, q as DeploymentTrigger, qt as NotificationsPinnedLayout, r as MissingTokenError, rn as RelayState, rt as EnsureReport, s as isMulti, sn as Ruleset, st as EnsuredResource, t as CARDINALITY, tn as ProviderIdentity, tt as EnsureRelayInput, u as AuthDescription, un as ServerInspection, ut as EnvironmentReviewer, v as BoardRule, vn as StatusCategory, vt as LifecycleResult, w as BoardTemplateFile, wn as ToolingDoctorReport, wt as MonitoringAlertChannelState, x as BoardStatusCategory, xn as TeamEntry, xt as Monitoring, y as BoardState, yn as Storage, yt as LifecycleSlot, z as DeployFunctionResult, zt as NotificationsEveryoneLayout } from "./index-CArtx6o0.mjs";
|
|
2
|
-
import { A as
|
|
3
|
-
import { AuthError, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, ResolveTokenInput as ResolveTokenInput$1 } from "@theholocron/kyber/secrets";
|
|
2
|
+
import { A as RawProvidersConfig, B as ResolvedProviderEntry, C as EslintConfig, D as OrgConfig, E as MultiEntry, F as RepoSecretsSync, G as TaskEntryConfig, H as ResolvedTuple, I as RepoValidationConfig, K as TelemetryConfig, L as RepoVariables, M as RepoProperties, N as RepoProtection, O as ProviderOptions, P as RepoSecrets, R as RepoVariablesSync, S as EnvConfig, T as LogConfig, U as SingleEntry, V as ResolvedProvidersConfig, W as StorybookDeployProject, _ as CredentialsConfig, a as LoadedConfig, b as DocsConfig, c as TaskEntry, d as resolveConfig, f as resolveEntry, g as ChromaticProjectConfig, h as CapabilityConfigPackage, i as loadConfig, j as RepoConfig, k as RawProviderEntry, l as ConfigError, m as AppConfig, n as compose, o as Capability, p as resolvePluginPackage, q as WorkflowWithConfig, r as defineConfig, s as ComposedPreset, t as ConfigFileError, u as credentialsEnvironment, v as DevConfig, w as HolocronConfig, x as DoctorConfig, y as DevServeConfig, z as ResolvedHolocronConfig } from "./config-system-CTQ_I-Vm.mjs";
|
|
3
|
+
import { AuthError, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, ResolveTokenInput as ResolveTokenInput$1, resolveValue } from "@theholocron/kyber/secrets";
|
|
4
4
|
import { RequestOptions, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
|
|
5
5
|
import "@theholocron/kyber/plugins";
|
|
6
6
|
import { PackageJson } from "@theholocron/pkg-utils";
|
|
@@ -309,13 +309,13 @@ export declare function missingCapabilities(capabilities: readonly string[]): st
|
|
|
309
309
|
export declare function readWorkspacePackageJsons(repoRoot: string, workspacePackages: readonly WorkspacePackage[]): Promise<PackageJsonLike[]>;
|
|
310
310
|
/**
|
|
311
311
|
* The closed list of area files `loadConfig` reads from `.holocron/` (the directory is `.<config name>`, set by kyber):
|
|
312
|
-
* `.holocron/notifications.*` fills `providers.notifications`' `layout`,
|
|
312
|
+
* `.holocron/notifications.*` fills `providers.notifications`' `layout`, `.holocron/repo.*` fills keys of `repo`, and `.holocron/org.*` fills provider options (`teamId`, `accountId`) a config leaves out.
|
|
313
313
|
* A file not on this list is never read.
|
|
314
314
|
*/
|
|
315
|
-
export declare const HOLOCRON_AREAS: readonly ["notifications", "repo"];
|
|
315
|
+
export declare const HOLOCRON_AREAS: readonly ["notifications", "repo", "org"];
|
|
316
316
|
/**
|
|
317
317
|
* Put the area files of `.holocron/` into the config as loaded, before `deriveDefaults` runs: `notifications` becomes
|
|
318
|
-
* the `layout` of the notifications provider and `repo` supplies keys of `repo
|
|
318
|
+
* 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
|
|
319
319
|
* is a `ConfigError` naming both (no merge, no precedence). With no area files the config is returned as it was.
|
|
320
320
|
*/
|
|
321
321
|
export declare function placeAreas(areas: ConfigDirArea[], raw: HolocronConfig): HolocronConfig;
|
|
@@ -329,4 +329,4 @@ export interface ConnectionProbeInput extends Omit<ConnectionProbeInput$1, "veri
|
|
|
329
329
|
* kyber's `connectionProbe`; this types the result as the plugin system's {@link Probe} and `verify` as `VerifyTokenResult`.
|
|
330
330
|
*/
|
|
331
331
|
export declare function connectionProbe(input: ConnectionProbeInput): Probe;
|
|
332
|
-
export { Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, BoardField, BoardFieldType, BoardItem, 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, ElevationRequiredError, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureReport, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, type EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, type EslintConfig, type FeatureResolver, type FeatureResolverConfig, type HolocronConfig, type HolocronProfile, InspectRelayInput, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, type LinksFile, type LoadedConfig, type LogConfig, Logs, 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, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type PackageJsonLike, PagesConfig, ParseWebhookInput, type PluginProbes, type PluginToken, type Probe, type ProbeContext, type ProbeRow, Projects, ProviderApiError, ProviderIdentity, type ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, RelayState, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, type RepoSecrets, type RepoSecretsSync, RepoSettings, type RepoValidationConfig, type RepoVariables, type RequestOptions, type ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, type ResolvedHolocronConfig, type ResolvedProviderEntry, type ResolvedProvidersConfig, type ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, ServerInspection, type SingleEntry, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, type SyncRolesInput, type SyncRolesResult, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, 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, isMulti, loadConfig, resolveConfig, resolveEntry, resolvePluginPackage };
|
|
332
|
+
export { Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, BoardField, BoardFieldType, BoardItem, 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, ElevationRequiredError, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureReport, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, type EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, type EslintConfig, type FeatureResolver, type FeatureResolverConfig, type HolocronConfig, type HolocronProfile, InspectRelayInput, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, type LinksFile, type LoadedConfig, type LogConfig, Logs, 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, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type OrgConfig, type PackageJsonLike, PagesConfig, ParseWebhookInput, type PluginProbes, type PluginToken, type Probe, type ProbeContext, type ProbeRow, Projects, ProviderApiError, ProviderIdentity, type ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, RelayState, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, type RepoSecrets, 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, SecretScope, Secrets, ServerInspection, type SingleEntry, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, type SyncRolesInput, type SyncRolesResult, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, 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, isMulti, loadConfig, resolveConfig, resolveEntry, resolvePluginPackage, resolveValue };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CARDINALITY, ElevationRequiredError, MissingTokenError, ProviderApiError, REQUIRED_CAPABILITIES, WebhookVerificationError, isMulti } from "./plugin/capabilities.mjs";
|
|
2
|
-
import { a as placeAreas, c as credentialsEnvironment, d as resolvePluginPackage, i as loadConfig, l as resolveConfig, n as compose, o as HOLOCRON_AREAS, r as defineConfig, s as ConfigError, t as ConfigFileError, u as resolveEntry } from "./config-system-
|
|
2
|
+
import { a as placeAreas, c as credentialsEnvironment, d as resolvePluginPackage, i as loadConfig, l as resolveConfig, n as compose, o as HOLOCRON_AREAS, r as defineConfig, s as ConfigError, t as ConfigFileError, u as resolveEntry } from "./config-system-DKtlo5Pb.mjs";
|
|
3
3
|
import { Entry, findCredentials } from "@napi-rs/keyring";
|
|
4
|
-
import { AuthError, createFeatureResolver as createFeatureResolver$1, createKeyring, createResolveToken as createResolveToken$1 } from "@theholocron/kyber/secrets";
|
|
4
|
+
import { AuthError, createFeatureResolver as createFeatureResolver$1, createKeyring, createResolveToken as createResolveToken$1, resolveValue } from "@theholocron/kyber/secrets";
|
|
5
5
|
import { describeError, style } from "@theholocron/kyber/ui";
|
|
6
6
|
import { errorMessage } from "@theholocron/misc-utils";
|
|
7
7
|
import { createRestClient } from "@theholocron/http-client";
|
|
@@ -392,4 +392,4 @@ async function readWorkspacePackageJsons(repoRoot, workspacePackages) {
|
|
|
392
392
|
function connectionProbe(input) {
|
|
393
393
|
return connectionProbe$1(input);
|
|
394
394
|
}
|
|
395
|
-
export { AuthError, CARDINALITY, ConfigError, ConfigFileError, ElevationRequiredError, HOLOCRON_AREAS, MissingTokenError, ProviderApiError, REQUIRED_CAPABILITIES, WebhookVerificationError, compose, connectionProbe, createFeatureResolver, createResolveToken, createRestClient, credentialsEnvironment, defineConfig, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, isMulti, keyring, loadConfig, missingCapabilities, placeAreas, readLinks, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, roleTeamProblem, sourceProblem, syncRoles };
|
|
395
|
+
export { AuthError, CARDINALITY, ConfigError, ConfigFileError, ElevationRequiredError, HOLOCRON_AREAS, MissingTokenError, ProviderApiError, REQUIRED_CAPABILITIES, WebhookVerificationError, compose, connectionProbe, createFeatureResolver, createResolveToken, createRestClient, credentialsEnvironment, defineConfig, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, isMulti, keyring, loadConfig, missingCapabilities, placeAreas, readLinks, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, resolveValue, roleTeamProblem, sourceProblem, syncRoles };
|
package/dist/presets.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as compose, o as Capability, s as ComposedPreset } from "./config-system-
|
|
1
|
+
import { n as compose, o as Capability, s as ComposedPreset } from "./config-system-CTQ_I-Vm.mjs";
|
|
2
2
|
/** Options for the audit capability. */
|
|
3
3
|
interface AuditOptions {
|
|
4
4
|
/** Enable Knip unused-export analysis (default: false). */
|
package/dist/presets.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/cli",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.353",
|
|
4
4
|
"description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -54,19 +54,19 @@
|
|
|
54
54
|
"posthog-node": "^5.61.1",
|
|
55
55
|
"tsx": "4.23.15",
|
|
56
56
|
"yargs": "^18.1.0",
|
|
57
|
-
"@theholocron/astromech": "5.0.0-alpha.
|
|
58
|
-
"@theholocron/
|
|
59
|
-
"@theholocron/fs-utils": "^1.17.0-alpha.1",
|
|
60
|
-
"@theholocron/datapad": "5.0.0-alpha.351",
|
|
61
|
-
"@theholocron/github-client": "^1.58.0-alpha.11",
|
|
62
|
-
"@theholocron/http-client": "^1.58.0-alpha.11",
|
|
57
|
+
"@theholocron/astromech": "5.0.0-alpha.353",
|
|
58
|
+
"@theholocron/datapad": "5.0.0-alpha.353",
|
|
63
59
|
"@theholocron/env-utils": "^1.17.0-alpha.1",
|
|
60
|
+
"@theholocron/fs-utils": "^1.17.0-alpha.1",
|
|
61
|
+
"@theholocron/dagobah": "5.0.0-alpha.353",
|
|
64
62
|
"@theholocron/git-utils": "^1.17.0-alpha.1",
|
|
63
|
+
"@theholocron/http-client": "^1.58.0-alpha.11",
|
|
64
|
+
"@theholocron/github-client": "^1.58.0-alpha.11",
|
|
65
65
|
"@theholocron/json-utils": "^1.17.0-alpha.1",
|
|
66
|
-
"@theholocron/kyber": "5.0.0-alpha.351",
|
|
67
|
-
"@theholocron/misc-utils": "^1.17.0-alpha.1",
|
|
68
66
|
"@theholocron/observability": "^0.7.0-alpha.1",
|
|
69
|
-
"@theholocron/
|
|
67
|
+
"@theholocron/misc-utils": "^1.17.0-alpha.1",
|
|
68
|
+
"@theholocron/pkg-utils": "^1.17.0-alpha.1",
|
|
69
|
+
"@theholocron/kyber": "5.0.0-alpha.353"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/node": "^26",
|
|
@@ -79,10 +79,10 @@
|
|
|
79
79
|
"tsdown": "^0.23.4",
|
|
80
80
|
"typescript": "^5.9.3",
|
|
81
81
|
"vitest": "^5.0.5",
|
|
82
|
-
"@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.8",
|
|
83
82
|
"@theholocron/eslint-config": "^8.9.0-alpha.8",
|
|
84
83
|
"@theholocron/tsconfig": "^8.9.0-alpha.8",
|
|
85
|
-
"@theholocron/vitest-config": "^8.9.0-alpha.8"
|
|
84
|
+
"@theholocron/vitest-config": "^8.9.0-alpha.8",
|
|
85
|
+
"@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.8"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
|
88
88
|
"node": ">=22.0.0"
|