@theholocron/cli 5.0.0-alpha.413 → 5.0.0-alpha.415
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +296 -130
- package/dist/cli.mjs.map +1 -1
- package/dist/{config-system-DYqb53Rd.mjs → config-system-CZVj19gs.mjs} +160 -13
- package/dist/{index-D39ic8yM.d.mts → index-C4pFARzT.d.mts} +43 -5
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/plugin/capabilities.d.mts +1 -1
- package/dist/presets.d.mts +4 -4
- package/dist/presets.mjs +5 -5
- package/package.json +8 -8
|
@@ -13,9 +13,53 @@ const DERIVING = /* @__PURE__ */ new Set(["1password"]);
|
|
|
13
13
|
function derivesEnvironment(provider) {
|
|
14
14
|
return DERIVING.has(provider);
|
|
15
15
|
}
|
|
16
|
+
// src/credentials-environments/layer-environment/layer-environment.ts
|
|
17
|
+
/** The layer words, in the order the docs list them. */
|
|
18
|
+
const ENVIRONMENT_LAYERS = [
|
|
19
|
+
"local",
|
|
20
|
+
"dev",
|
|
21
|
+
"ci",
|
|
22
|
+
"prod"
|
|
23
|
+
];
|
|
24
|
+
/** Whether `value` is exactly one of the layer words (case-sensitive: `Prod` is a literal Environment name). */
|
|
25
|
+
function isEnvironmentLayer(value) {
|
|
26
|
+
return typeof value === "string" && ENVIRONMENT_LAYERS.includes(value);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The Environment a layer of a repository is kept in: `<org/repo> - <layer>`. The one place the name is built, for the
|
|
30
|
+
* `credentials` providers (`environmentLayers()`) and for the config entries that name a `layer`.
|
|
31
|
+
*/
|
|
32
|
+
function layerEnvironment(slug, layer) {
|
|
33
|
+
return `${slug} - ${layer}`;
|
|
34
|
+
}
|
|
35
|
+
// src/config/validate-environment-choice/validate-environment-choice.ts
|
|
36
|
+
/**
|
|
37
|
+
* Check that an entry names its vault Environment one way: a literal `environment`, or a `layer` the name is derived
|
|
38
|
+
* from (spec `tech-environment-layers`, #2069). Both together are an error, and so is a `layer` that is not a layer word
|
|
39
|
+
* or an `environment` that is blank. With neither, the entry is an error unless `required` is false.
|
|
40
|
+
*
|
|
41
|
+
* @param entry - The `environment` and `layer` the entry sets.
|
|
42
|
+
* @param what - How a message names the entry, e.g. "a `repo.secrets.deploy` entry".
|
|
43
|
+
* @param required - Whether the entry must name one of the two. Default true.
|
|
44
|
+
* @returns What the entry names (the environment, else the layer), for the rest of its messages; `undefined` for neither.
|
|
45
|
+
* @throws {ConfigError} Naming the entry and the problem.
|
|
46
|
+
*/
|
|
47
|
+
function validateEnvironmentChoice(entry, what, required = true) {
|
|
48
|
+
const { environment, layer } = entry;
|
|
49
|
+
if (environment !== void 0 && layer !== void 0) throw new ConfigError(`${what} sets both \`layer\` and \`environment\`: name the Environment one way`);
|
|
50
|
+
if (layer !== void 0) {
|
|
51
|
+
if (!isEnvironmentLayer(layer)) throw new ConfigError(`${what} has \`layer\` ${JSON.stringify(layer)}: use ${ENVIRONMENT_LAYERS.map((l) => `"${l}"`).join(", ")}, or \`environment\` for a literal name`);
|
|
52
|
+
return layer;
|
|
53
|
+
}
|
|
54
|
+
if (environment !== void 0) {
|
|
55
|
+
if (typeof environment !== "string" || environment.trim() === "") throw new ConfigError(`${what} needs the name of a vault environment, got an empty \`environment\``);
|
|
56
|
+
return environment;
|
|
57
|
+
}
|
|
58
|
+
if (required) throw new ConfigError(`${what} needs the name of a vault environment (\`environment\`) or a \`layer\``);
|
|
59
|
+
}
|
|
16
60
|
// src/config/validate-secrets-deploy/validate-secrets-deploy.ts
|
|
17
61
|
/**
|
|
18
|
-
* Check `repo.secrets.deploy`: each entry names a vault environment and at least one of a non-empty `keys` list and a
|
|
62
|
+
* Check `repo.secrets.deploy`: each entry names a vault environment (or a `layer`) and at least one of a non-empty `keys` list and a
|
|
19
63
|
* non-empty `prefix`. An entry with neither would mean "all keys", which a deployment never gets (spec
|
|
20
64
|
* `tech-deployment-key-allowlist`, #2061), so it is an error here and not a silent skip.
|
|
21
65
|
*
|
|
@@ -24,14 +68,25 @@ function derivesEnvironment(provider) {
|
|
|
24
68
|
*/
|
|
25
69
|
function validateSecretsDeploy(secrets) {
|
|
26
70
|
for (const entry of secrets?.deploy ?? []) {
|
|
27
|
-
|
|
28
|
-
const label = `\`repo.secrets.deploy\` entry for ${JSON.stringify(
|
|
71
|
+
const named = validateEnvironmentChoice(entry, "a `repo.secrets.deploy` entry");
|
|
72
|
+
const label = `\`repo.secrets.deploy\` entry for ${JSON.stringify(named)}`;
|
|
29
73
|
const { keys, prefix } = entry;
|
|
30
74
|
if (keys !== void 0 && (!Array.isArray(keys) || keys.some((k) => typeof k !== "string" || k === ""))) throw new ConfigError(`${label} has \`keys\` that is not a list of key names`);
|
|
31
75
|
if (prefix !== void 0 && (typeof prefix !== "string" || prefix === "")) throw new ConfigError(`${label} has an empty \`prefix\``);
|
|
32
76
|
if ((keys === void 0 || keys.length === 0) && prefix === void 0) throw new ConfigError(`${label} needs \`keys\` (a list of names) or \`prefix\` (such as "SENTINEL_"): a deployment never receives every key`);
|
|
33
77
|
}
|
|
34
78
|
}
|
|
79
|
+
// src/config/validate-secrets-sync/validate-secrets-sync.ts
|
|
80
|
+
/**
|
|
81
|
+
* Check `repo.secrets.sync`: each entry names its vault environment one way, a literal `environment` or a `layer`
|
|
82
|
+
* (spec `tech-environment-layers`, #2069).
|
|
83
|
+
*
|
|
84
|
+
* @param secrets - `repo.secrets`, if the config has it.
|
|
85
|
+
* @throws {ConfigError} Naming the first problem found.
|
|
86
|
+
*/
|
|
87
|
+
function validateSecretsSync(secrets) {
|
|
88
|
+
for (const entry of secrets?.sync ?? []) validateEnvironmentChoice(entry, "a `repo.secrets.sync` entry");
|
|
89
|
+
}
|
|
35
90
|
// src/config/validate-variables-sync/validate-variables-sync.ts
|
|
36
91
|
/** GitHub treats variable names as case-insensitive, so every comparison goes through this. */
|
|
37
92
|
const key = (name) => name.toUpperCase();
|
|
@@ -48,8 +103,8 @@ function validateVariablesSync(variables) {
|
|
|
48
103
|
if (!entries || entries.length === 0) return;
|
|
49
104
|
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");
|
|
50
105
|
for (const entry of entries) {
|
|
51
|
-
|
|
52
|
-
const label = `\`repo.variables.sync\` entry for ${JSON.stringify(
|
|
106
|
+
const named = validateEnvironmentChoice(entry, "a `repo.variables.sync` entry");
|
|
107
|
+
const label = `\`repo.variables.sync\` entry for ${JSON.stringify(named)}`;
|
|
53
108
|
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`);
|
|
54
109
|
const scope = entry.scope ?? "repo";
|
|
55
110
|
const org = scope.startsWith("org=") ? scope.slice(4) : void 0;
|
|
@@ -130,14 +185,11 @@ const HOSTNAME = /^[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0
|
|
|
130
185
|
function validateGitHubApps(apps) {
|
|
131
186
|
if (!Array.isArray(apps)) throw new ConfigError$1("`githubApps` must be a list of { name, manifest, environment }");
|
|
132
187
|
apps.forEach((app, idx) => {
|
|
133
|
-
for (const key of [
|
|
134
|
-
"name",
|
|
135
|
-
"manifest",
|
|
136
|
-
"environment"
|
|
137
|
-
]) {
|
|
188
|
+
for (const key of ["name", "manifest"]) {
|
|
138
189
|
const value = app?.[key];
|
|
139
190
|
if (typeof value !== "string" || value.trim() === "") throw new ConfigError$1(`\`githubApps[${idx}].${key}\` must be a non-empty string`);
|
|
140
191
|
}
|
|
192
|
+
validateEnvironmentChoice(app, `\`githubApps[${idx}]\``);
|
|
141
193
|
});
|
|
142
194
|
}
|
|
143
195
|
/** Throws a {@link ConfigError} naming the first thing wrong with the `ideas` block. */
|
|
@@ -154,7 +206,7 @@ function validateIdeas(ideas) {
|
|
|
154
206
|
/** Throws a {@link ConfigError} naming the first thing wrong with the `dev` block. */
|
|
155
207
|
function validateDev(dev) {
|
|
156
208
|
const nonEmpty = (value) => typeof value === "string" && value.trim() !== "";
|
|
157
|
-
|
|
209
|
+
validateEnvironmentChoice(dev, "`dev`", false);
|
|
158
210
|
if (dev.tunnel !== void 0) {
|
|
159
211
|
if (!nonEmpty(dev.tunnel.name)) throw new ConfigError$1("`dev.tunnel.name` must be a name, got an empty value");
|
|
160
212
|
if (typeof dev.tunnel.hostname !== "string" || !HOSTNAME.test(dev.tunnel.hostname)) throw new ConfigError$1(`\`dev.tunnel.hostname\` must be a hostname such as sentinel-dev.example.dev (no scheme or path), got ${JSON.stringify(dev.tunnel.hostname)}`);
|
|
@@ -169,6 +221,11 @@ function validateDev(dev) {
|
|
|
169
221
|
if (serve.logging !== void 0 && !(nonEmpty(serve.logging.tokenVar) && nonEmpty(serve.logging.datasetVar))) throw new ConfigError$1("`dev.serve.logging` needs a `tokenVar` and a `datasetVar`, both variable names");
|
|
170
222
|
}
|
|
171
223
|
}
|
|
224
|
+
/** Throws a {@link ConfigError} when the `vault` entry's options name an Environment two ways, or a `layer` that is no layer word. */
|
|
225
|
+
function validateVaultLayer(entry) {
|
|
226
|
+
if (entry?.cardinality !== "single") return;
|
|
227
|
+
validateEnvironmentChoice(entry.tuple.options, "the `vault` provider's options", false);
|
|
228
|
+
}
|
|
172
229
|
/** The values `repoValidation.docsCoverage` accepts. */
|
|
173
230
|
const DOCS_COVERAGE_MODES = [
|
|
174
231
|
"off",
|
|
@@ -210,6 +267,8 @@ function resolveConfig(raw) {
|
|
|
210
267
|
if (raw.ideas !== void 0) validateIdeas(raw.ideas);
|
|
211
268
|
validateVariablesSync(raw.repo?.variables);
|
|
212
269
|
validateSecretsDeploy(raw.repo?.secrets);
|
|
270
|
+
validateSecretsSync(raw.repo?.secrets);
|
|
271
|
+
validateVaultLayer(providers.vault);
|
|
213
272
|
const credentialsEntry = providers.credentials;
|
|
214
273
|
if (credentialsEntry?.cardinality === "many") for (const tuple of credentialsEntry.tuples) {
|
|
215
274
|
const own = tuple.options.environment;
|
|
@@ -246,6 +305,16 @@ function resolveConfig(raw) {
|
|
|
246
305
|
eslint: raw.eslint
|
|
247
306
|
};
|
|
248
307
|
}
|
|
308
|
+
// src/credentials-environments/repo-slug/repo-slug.ts
|
|
309
|
+
/**
|
|
310
|
+
* The `<org>/<repo>` of the repository at `cwd`, from its `origin` remote. A remote that is missing or cannot be
|
|
311
|
+
* parsed is a `ConfigError` that names the `environment` option as the fix.
|
|
312
|
+
*/
|
|
313
|
+
async function repoSlug(cwd, exec) {
|
|
314
|
+
const remote = await readGitRemote(cwd, exec ? { exec } : {});
|
|
315
|
+
if (!remote) throw new ConfigError(`cannot derive the 1Password Environment name: the \`origin\` remote of ${cwd} is missing or not an owner/repo URL. Give the \`credentials\` provider an \`environment\` option to name it.`);
|
|
316
|
+
return remote.slug;
|
|
317
|
+
}
|
|
249
318
|
// src/config/compose/merge-sync/merge-sync.ts
|
|
250
319
|
/**
|
|
251
320
|
* Merge two lists of `repo.secrets.sync` (or `repo.variables.sync`) entries. An entry is the same sync when its
|
|
@@ -255,7 +324,11 @@ function resolveConfig(raw) {
|
|
|
255
324
|
function mergeSync(a, b) {
|
|
256
325
|
const merged = /* @__PURE__ */ new Map();
|
|
257
326
|
for (const entry of [...a ?? [], ...b ?? []]) {
|
|
258
|
-
const id =
|
|
327
|
+
const id = JSON.stringify([
|
|
328
|
+
entry.environment,
|
|
329
|
+
entry.layer,
|
|
330
|
+
entry.scope ?? "repo"
|
|
331
|
+
]);
|
|
259
332
|
const have = merged.get(id);
|
|
260
333
|
merged.set(id, have ? {
|
|
261
334
|
...have,
|
|
@@ -558,6 +631,68 @@ function placeAreas(areas, raw) {
|
|
|
558
631
|
else if (area.area === "org") result = placeOrg(result, area);
|
|
559
632
|
return result;
|
|
560
633
|
}
|
|
634
|
+
// src/config/resolve-layers/resolve-layers.ts
|
|
635
|
+
/**
|
|
636
|
+
* Turns every `layer` in a loaded config into the `environment` it names (spec `tech-environment-layers`, #2069), so
|
|
637
|
+
* the commands and doctors that read Environments see one literal name and none of them derives it again. The name is
|
|
638
|
+
* `layerEnvironment()` over the `origin` remote of `input.repoRoot`, read at most once and only when an entry names a
|
|
639
|
+
* layer. A remote that cannot be read is a `ConfigError` naming the `environment` option (`repoSlug()`); nothing is
|
|
640
|
+
* guessed. Covers `repo.secrets.sync`, `repo.secrets.deploy`, `repo.variables.sync`, `githubApps`, `dev` and the
|
|
641
|
+
* `vault` provider's `layer` option. Returns a new config; the one passed in is not changed.
|
|
642
|
+
*
|
|
643
|
+
* @param config - The resolved config, validated by `resolveConfig()`.
|
|
644
|
+
* @param input - Where to read the remote, and how.
|
|
645
|
+
* @returns The config with each `layer` replaced by its `environment`.
|
|
646
|
+
*/
|
|
647
|
+
async function resolveLayers(config, input) {
|
|
648
|
+
let slug;
|
|
649
|
+
const named = async (entry) => {
|
|
650
|
+
if (entry.layer === void 0) return entry;
|
|
651
|
+
const { layer, ...rest } = entry;
|
|
652
|
+
slug ??= repoSlug(input.repoRoot, input.gitExec);
|
|
653
|
+
return {
|
|
654
|
+
...rest,
|
|
655
|
+
environment: layerEnvironment(await slug, layer)
|
|
656
|
+
};
|
|
657
|
+
};
|
|
658
|
+
const all = (list) => Promise.all(list.map(named));
|
|
659
|
+
const out = { ...config };
|
|
660
|
+
const { repo } = config;
|
|
661
|
+
if (repo) {
|
|
662
|
+
const next = { ...repo };
|
|
663
|
+
if (repo.secrets) {
|
|
664
|
+
next.secrets = { ...repo.secrets };
|
|
665
|
+
if (repo.secrets.sync) next.secrets.sync = await all(repo.secrets.sync);
|
|
666
|
+
if (repo.secrets.deploy) next.secrets.deploy = await all(repo.secrets.deploy);
|
|
667
|
+
}
|
|
668
|
+
if (repo.variables?.sync) next.variables = {
|
|
669
|
+
...repo.variables,
|
|
670
|
+
sync: await all(repo.variables.sync)
|
|
671
|
+
};
|
|
672
|
+
out.repo = next;
|
|
673
|
+
}
|
|
674
|
+
if (config.githubApps) out.githubApps = await all(config.githubApps);
|
|
675
|
+
if (config.dev) out.dev = await named(config.dev);
|
|
676
|
+
const vault = config.providers.vault;
|
|
677
|
+
if (vault?.cardinality === "single" && vault.tuple.options.layer !== void 0) {
|
|
678
|
+
const { layer, ...options } = vault.tuple.options;
|
|
679
|
+
const resolved = await named({ layer });
|
|
680
|
+
out.providers = {
|
|
681
|
+
...config.providers,
|
|
682
|
+
vault: {
|
|
683
|
+
cardinality: "single",
|
|
684
|
+
tuple: {
|
|
685
|
+
...vault.tuple,
|
|
686
|
+
options: {
|
|
687
|
+
...options,
|
|
688
|
+
environment: resolved.environment
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
}
|
|
694
|
+
return out;
|
|
695
|
+
}
|
|
561
696
|
// src/config/config-system.ts
|
|
562
697
|
/**
|
|
563
698
|
* Holocron's config system: `defineConfig`, `loadConfig` and `compose`, all built from one
|
|
@@ -592,8 +727,20 @@ const defineConfig = system.defineConfig;
|
|
|
592
727
|
* `@theholocron/datapad`'s own doc comment for the stop conditions).
|
|
593
728
|
* Throws `ConfigFileError` when nothing is found or a file cannot
|
|
594
729
|
* be loaded, or `ConfigError` when the config fails schema checks.
|
|
730
|
+
*
|
|
731
|
+
* Every `layer` an entry names becomes the `environment` it stands for (`resolveLayers()`, spec
|
|
732
|
+
* `tech-environment-layers`, #2069), read from the `origin` remote at `cwd`; `input` lets a test pass a fake remote.
|
|
595
733
|
*/
|
|
596
|
-
|
|
734
|
+
async function loadConfig(cwd, input = {}) {
|
|
735
|
+
const loaded = await system.loadConfig(cwd);
|
|
736
|
+
return {
|
|
737
|
+
...loaded,
|
|
738
|
+
resolved: await resolveLayers(loaded.resolved, {
|
|
739
|
+
repoRoot: cwd,
|
|
740
|
+
...input
|
|
741
|
+
})
|
|
742
|
+
};
|
|
743
|
+
}
|
|
597
744
|
/**
|
|
598
745
|
* Merge any number of capability fragments into a single preset object that
|
|
599
746
|
* spreads directly into `defineConfig()`.
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ProviderApiError } from "@theholocron/http-client";
|
|
2
2
|
import { ConfigError as ConfigError$1, ConfigFileError } from "@theholocron/kyber/config";
|
|
3
|
+
import { GitExec } from "@theholocron/git-utils";
|
|
3
4
|
import { PackageJson } from "@theholocron/pkg-utils";
|
|
4
5
|
import { DocsCoverageMode, WorkspacePackage } from "@theholocron/astromech";
|
|
5
6
|
import { LogLevel } from "@theholocron/observability/core";
|
|
7
|
+
/** The layer words a config entry may name instead of an Environment (spec `tech-environment-layers`, #2069). */
|
|
8
|
+
type EnvironmentLayer = "local" | "dev" | "ci" | "prod";
|
|
6
9
|
/** Structured-logging config. The Axiom **token** never lives here — only in
|
|
7
10
|
* env vars or the OS keyring — but the non-secret dataset name may. */
|
|
8
11
|
interface LogConfig {
|
|
@@ -139,7 +142,12 @@ interface RepoVariables {
|
|
|
139
142
|
*/
|
|
140
143
|
interface RepoVariablesSync {
|
|
141
144
|
/** The vault environment id, as given to `holocron secrets sync <environmentId>`. */
|
|
142
|
-
environment
|
|
145
|
+
environment?: string;
|
|
146
|
+
/**
|
|
147
|
+
* The layer to name instead of `environment`: the Environment is `<org/repo> - <layer>`, from the repository's
|
|
148
|
+
* `origin` remote (spec `tech-environment-layers`, #2069). Set one of `layer` and `environment`, never both.
|
|
149
|
+
*/
|
|
150
|
+
layer?: EnvironmentLayer;
|
|
143
151
|
/** The vault keys written as variables, by name. Required: a key the environment gains by mistake is never published. */
|
|
144
152
|
keys: string[];
|
|
145
153
|
/** Where the variables land: `"repo"` (the default) or `"org=<name>"`. */
|
|
@@ -179,7 +187,12 @@ interface RepoSecrets {
|
|
|
179
187
|
*/
|
|
180
188
|
interface RepoSecretsDeploy {
|
|
181
189
|
/** The vault environment id, as given to `holocron secrets sync <environmentId>`. */
|
|
182
|
-
environment
|
|
190
|
+
environment?: string;
|
|
191
|
+
/**
|
|
192
|
+
* The layer to name instead of `environment`: the Environment is `<org/repo> - <layer>`, from the repository's
|
|
193
|
+
* `origin` remote (spec `tech-environment-layers`, #2069). Set one of `layer` and `environment`, never both.
|
|
194
|
+
*/
|
|
195
|
+
layer?: EnvironmentLayer;
|
|
183
196
|
/** Exact key names to send. */
|
|
184
197
|
keys?: string[];
|
|
185
198
|
/** A name prefix to send, such as `SENTINEL_` or `COMLINK_`. Case-sensitive. */
|
|
@@ -188,7 +201,12 @@ interface RepoSecretsDeploy {
|
|
|
188
201
|
/** One vault environment that `holocron secrets sync` pushes into GitHub secrets, declared so the doctor can check them. */
|
|
189
202
|
interface RepoSecretsSync {
|
|
190
203
|
/** The vault environment id, as given to `holocron secrets sync <environmentId>`. */
|
|
191
|
-
environment
|
|
204
|
+
environment?: string;
|
|
205
|
+
/**
|
|
206
|
+
* The layer to name instead of `environment`: the Environment is `<org/repo> - <layer>`, from the repository's
|
|
207
|
+
* `origin` remote (spec `tech-environment-layers`, #2069). Set one of `layer` and `environment`, never both.
|
|
208
|
+
*/
|
|
209
|
+
layer?: EnvironmentLayer;
|
|
192
210
|
/**
|
|
193
211
|
* The vault keys pushed to GitHub (the `--github-secret` allowlist). Omit it for every key the vault
|
|
194
212
|
* environment holds, which the doctor then asks the `vault` provider to list.
|
|
@@ -332,7 +350,12 @@ interface GitHubAppConfig {
|
|
|
332
350
|
* The vault environment (a 1Password Environment) that holds the instance's `SENTINEL_GITHUB_APP_ID` and
|
|
333
351
|
* `SENTINEL_GITHUB_APP_PRIVATE_KEY` (or the older bare `GITHUB_APP_ID` and `GITHUB_APP_PRIVATE_KEY`). A name, not a secret, so it is committed.
|
|
334
352
|
*/
|
|
335
|
-
environment
|
|
353
|
+
environment?: string;
|
|
354
|
+
/**
|
|
355
|
+
* The layer to name instead of `environment`: the Environment is `<org/repo> - <layer>`, from the repository's
|
|
356
|
+
* `origin` remote (spec `tech-environment-layers`, #2069). Set one of `layer` and `environment`, never both.
|
|
357
|
+
*/
|
|
358
|
+
layer?: EnvironmentLayer;
|
|
336
359
|
}
|
|
337
360
|
/**
|
|
338
361
|
* The `ideas` block: the state that files an idea as an issue. Where the ideas are kept is the `ideas` provider's
|
|
@@ -360,6 +383,11 @@ interface DevConfig {
|
|
|
360
383
|
* secret, so it is committed.
|
|
361
384
|
*/
|
|
362
385
|
environment?: string;
|
|
386
|
+
/**
|
|
387
|
+
* The layer to name instead of `environment`: the Environment is `<org/repo> - <layer>`, from the repository's
|
|
388
|
+
* `origin` remote (spec `tech-environment-layers`, #2069). Set one of `layer` and `environment`, never both.
|
|
389
|
+
*/
|
|
390
|
+
layer?: EnvironmentLayer;
|
|
363
391
|
/** The named tunnel to the application: its name, and the public hostname it serves (not a secret). */
|
|
364
392
|
tunnel?: {
|
|
365
393
|
/** The tunnel's name. A second run finds the first one's tunnel by it. */
|
|
@@ -947,6 +975,13 @@ interface LoadedConfig {
|
|
|
947
975
|
/** Absolute path to the file the config was read from. */
|
|
948
976
|
filepath: string;
|
|
949
977
|
}
|
|
978
|
+
/** What `resolveLayers()` reads besides the config. */
|
|
979
|
+
interface ResolveLayersInput {
|
|
980
|
+
/** Where the repository (or a directory inside it) is: its `origin` remote is read here. */
|
|
981
|
+
repoRoot: string;
|
|
982
|
+
/** Reads the remote. Defaults to `git` itself; a test passes a fake. */
|
|
983
|
+
gitExec?: GitExec;
|
|
984
|
+
}
|
|
950
985
|
/** Returns the config unchanged; it exists to type and autocomplete a `holocron.config.ts`. */
|
|
951
986
|
declare const defineConfig: (config: HolocronConfig) => HolocronConfig;
|
|
952
987
|
/**
|
|
@@ -957,8 +992,11 @@ declare const defineConfig: (config: HolocronConfig) => HolocronConfig;
|
|
|
957
992
|
* `@theholocron/datapad`'s own doc comment for the stop conditions).
|
|
958
993
|
* Throws `ConfigFileError` when nothing is found or a file cannot
|
|
959
994
|
* be loaded, or `ConfigError` when the config fails schema checks.
|
|
995
|
+
*
|
|
996
|
+
* Every `layer` an entry names becomes the `environment` it stands for (`resolveLayers()`, spec
|
|
997
|
+
* `tech-environment-layers`, #2069), read from the `origin` remote at `cwd`; `input` lets a test pass a fake remote.
|
|
960
998
|
*/
|
|
961
|
-
declare
|
|
999
|
+
declare function loadConfig(cwd: string, input?: Omit<ResolveLayersInput, "repoRoot">): Promise<LoadedConfig>;
|
|
962
1000
|
/**
|
|
963
1001
|
* Merge any number of capability fragments into a single preset object that
|
|
964
1002
|
* spreads directly into `defineConfig()`.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as DnsRecord, $n as deriveCapabilities, $r as ResolvedTuple, $t as NotificationsEveryoneLayout, A as Cardinality, An as SourceRulesetDetail, Ar as EnvConfig, At as LabelDef, B as DeployFunctionConfig, Bn as ToolingDoctorReport, Br as RawProvidersConfig, Bt as MonitoringAssertion, C as BoardStatusCategory, Cn as SecretScope, Cr as CapabilityConfigPackage, Ct as IssueComment, D as BoardView, Dn as SourceBranch, Dr as DevServeConfig, Dt as IssueSearchFilter, E as BoardTemplateFile, En as Source, Er as DevConfig, Et as IssueRecord, F as CiRunStatus, Fn as StorageBranch, Fr as LogConfig, Ft as Monitoring, G as DeploymentProject, Gn as Vault, Gr as RepoSecretsDeploy, Gt as MonitoringHttpMethod, H as DeployScriptConfig, Hn as TrackerUser, Hr as RepoProperties, Ht as MonitoringAssertionSource, I as ConnectionStringOptions, In as SyncResult, Ir as MultiEntry, It as MonitoringAlertChannelInput, J as DeploymentTarget, Jn as WikiProvisionOpts, Jr as RepoVariables, Jt as Notifications, K as DeploymentProjectSettings, Kn as WebhookDashboardInfo, Kr as RepoSecretsSync, Kt as MoveReport, L as CreateAuthUserInput, Ln as TeamEntry, Lr as OrgConfig, Lt as MonitoringAlertChannelResult, M as Ci, Mn as SourceTeamMember, Mr as GitHubAppConfig, Mt as LifecycleSlot, N as CiRun, Nn as StatusCategory, Nr as HolocronConfig, Nt as Logs, O as CapabilityImpls, On as SourceFile, Or as DocsConfig, Ot as IssueSelector, P as CiRunFilter, Pn as Storage, Pr as IdeasConfig, Pt as LogsDataset, Q as Dns, Qn as KNOWN_STACK_DEPS, Qr as ResolvedProvidersConfig, Qt as NotificationsDelivery, R as Credentials, Rn as TeamPermission, Rr as ProviderOptions, Rt as MonitoringAlertChannelState, S as BoardStatus, Sn as Ruleset, Sr as AppConfig, St as Issue, T as BoardTemplate, Tn as ServerInspection, Tr as CredentialsConfig, Tt as IssuePriority, U as DeployScriptResult, Un as TunnelRoute, Ur as RepoProtection, Ut as MonitoringCheck, V as DeployFunctionResult, Vn as TrackerDoctorReport, Vr as RepoConfig, Vt as MonitoringAssertionComparison, W as Deployment, Wn as Tunnels, Wr as RepoSecrets, Wt as MonitoringCheckInput, X as DiscussionPatch, Xn as WorkerScriptState, Xr as ResolvedHolocronConfig, Xt as NotificationsApplicationLayout, Y as DeploymentTrigger, Yn as WikiProxyConfig, Yr as RepoVariablesSync, Yt as NotificationsAccess, Z as DiscussionPost, Zn as Workers, Zr as ResolvedProviderEntry, Zt as NotificationsChannelLayout, _ as BoardFieldType, _n as PullRequest, _r as ConfigError, _t as IdeaRecord, a as REQUIRED_CAPABILITIES, an as NotificationsOnboardingLayout, ar as DeriveProfileInput, at as EnsureRelayResult, b as BoardRule, bn as RepoSettings, br as resolveEntry, bt as ImportResult, c as AddedItem, cn as NotificationsPrsFeed, cr as StackName, ct as EnsureWebhookResult, d as AuthDescription, dn as NotificationsSignedIn, dr as defineConfig, dt as EnsuredTunnel, ei as SingleEntry, en as NotificationsForumTag, er as deriveCompliance, et as DnsRecordRequest, f as AuthEvent, fn as NotificationsWelcomeLayout, fr as loadConfig, ft as Environment, g as BoardField, gn as ProviderIdentity, gr as TaskEntry, gt as ExportInfo, h as AuthUser, hn as Projects, hr as ComposedPreset, ht as Errors, i as ProviderApiError, ii as WorkflowWithConfig, in as NotificationsMonitoringFeed, ir as readWorkspacePackageJsons, it as EnsureRelayInput, j as CardinalityFor, jn as SourceSecurity, jr as EslintConfig, jt as LifecycleResult, k as CapabilityKey, kn as SourceRepoInfo, kr as DoctorConfig, kt as Issues, l as Analytics, ln as NotificationsServerLayout, lr as ConfigFileError, lt as EnsuredDiscussion, m as AuthIdentity, mn as ParseWebhookInput, mr as Capability, mt as Environments, n as ElevationRequiredError, ni as TaskEntryConfig, nn as NotificationsLinksLayout, nr as deriveStack, nt as DuplicateDiscussion, o as WebhookVerificationError, on as NotificationsPicture, or as HolocronProfile, ot as EnsureReport, p as AuthEventType, pn as PagesConfig, pr as LoadedConfig, pt as EnvironmentReviewer, q as DeploymentRecord, qn as Wiki, qr as RepoValidationConfig, qt as NormalizedAuthUser, r as MissingTokenError, ri as TelemetryConfig, rn as NotificationsMember, rr as missingCapabilities, rt as EnsureDiscussionInput, s as isMulti, sn as NotificationsPinnedLayout, sr as PackageJsonLike, st as EnsureResult, t as CARDINALITY, ti as StorybookDeployProject, tn as NotificationsLayout, tr as deriveProfile, tt as DnsRecordType, u as Auth, un as NotificationsSignIn, ur as compose, ut as EnsuredResource, v as BoardItem, vn as RelayState, vr as credentialsEnvironment, vt as Ideas, w as BoardSummary, wn as Secrets, wr as ChromaticProjectConfig, wt as IssueOrder, x as BoardState, xn as ResolvedCapability, xr as resolvePluginPackage, xt as InspectRelayInput, y as BoardItemInput, yn as RepoRef, yr as resolveConfig, yt as ImportOptions, z as CredentialsInspection, zn as Tooling, zr as RawProviderEntry, zt as MonitoringAlertSettings } from "./index-
|
|
1
|
+
import { $ as DnsRecord, $n as deriveCapabilities, $r as ResolvedTuple, $t as NotificationsEveryoneLayout, A as Cardinality, An as SourceRulesetDetail, Ar as EnvConfig, At as LabelDef, B as DeployFunctionConfig, Bn as ToolingDoctorReport, Br as RawProvidersConfig, Bt as MonitoringAssertion, C as BoardStatusCategory, Cn as SecretScope, Cr as CapabilityConfigPackage, Ct as IssueComment, D as BoardView, Dn as SourceBranch, Dr as DevServeConfig, Dt as IssueSearchFilter, E as BoardTemplateFile, En as Source, Er as DevConfig, Et as IssueRecord, F as CiRunStatus, Fn as StorageBranch, Fr as LogConfig, Ft as Monitoring, G as DeploymentProject, Gn as Vault, Gr as RepoSecretsDeploy, Gt as MonitoringHttpMethod, H as DeployScriptConfig, Hn as TrackerUser, Hr as RepoProperties, Ht as MonitoringAssertionSource, I as ConnectionStringOptions, In as SyncResult, Ir as MultiEntry, It as MonitoringAlertChannelInput, J as DeploymentTarget, Jn as WikiProvisionOpts, Jr as RepoVariables, Jt as Notifications, K as DeploymentProjectSettings, Kn as WebhookDashboardInfo, Kr as RepoSecretsSync, Kt as MoveReport, L as CreateAuthUserInput, Ln as TeamEntry, Lr as OrgConfig, Lt as MonitoringAlertChannelResult, M as Ci, Mn as SourceTeamMember, Mr as GitHubAppConfig, Mt as LifecycleSlot, N as CiRun, Nn as StatusCategory, Nr as HolocronConfig, Nt as Logs, O as CapabilityImpls, On as SourceFile, Or as DocsConfig, Ot as IssueSelector, P as CiRunFilter, Pn as Storage, Pr as IdeasConfig, Pt as LogsDataset, Q as Dns, Qn as KNOWN_STACK_DEPS, Qr as ResolvedProvidersConfig, Qt as NotificationsDelivery, R as Credentials, Rn as TeamPermission, Rr as ProviderOptions, Rt as MonitoringAlertChannelState, S as BoardStatus, Sn as Ruleset, Sr as AppConfig, St as Issue, T as BoardTemplate, Tn as ServerInspection, Tr as CredentialsConfig, Tt as IssuePriority, U as DeployScriptResult, Un as TunnelRoute, Ur as RepoProtection, Ut as MonitoringCheck, V as DeployFunctionResult, Vn as TrackerDoctorReport, Vr as RepoConfig, Vt as MonitoringAssertionComparison, W as Deployment, Wn as Tunnels, Wr as RepoSecrets, Wt as MonitoringCheckInput, X as DiscussionPatch, Xn as WorkerScriptState, Xr as ResolvedHolocronConfig, Xt as NotificationsApplicationLayout, Y as DeploymentTrigger, Yn as WikiProxyConfig, Yr as RepoVariablesSync, Yt as NotificationsAccess, Z as DiscussionPost, Zn as Workers, Zr as ResolvedProviderEntry, Zt as NotificationsChannelLayout, _ as BoardFieldType, _n as PullRequest, _r as ConfigError, _t as IdeaRecord, a as REQUIRED_CAPABILITIES, an as NotificationsOnboardingLayout, ar as DeriveProfileInput, at as EnsureRelayResult, b as BoardRule, bn as RepoSettings, br as resolveEntry, bt as ImportResult, c as AddedItem, cn as NotificationsPrsFeed, cr as StackName, ct as EnsureWebhookResult, d as AuthDescription, dn as NotificationsSignedIn, dr as defineConfig, dt as EnsuredTunnel, ei as SingleEntry, en as NotificationsForumTag, er as deriveCompliance, et as DnsRecordRequest, f as AuthEvent, fn as NotificationsWelcomeLayout, fr as loadConfig, ft as Environment, g as BoardField, gn as ProviderIdentity, gr as TaskEntry, gt as ExportInfo, h as AuthUser, hn as Projects, hr as ComposedPreset, ht as Errors, i as ProviderApiError, ii as WorkflowWithConfig, in as NotificationsMonitoringFeed, ir as readWorkspacePackageJsons, it as EnsureRelayInput, j as CardinalityFor, jn as SourceSecurity, jr as EslintConfig, jt as LifecycleResult, k as CapabilityKey, kn as SourceRepoInfo, kr as DoctorConfig, kt as Issues, l as Analytics, ln as NotificationsServerLayout, lr as ConfigFileError, lt as EnsuredDiscussion, m as AuthIdentity, mn as ParseWebhookInput, mr as Capability, mt as Environments, n as ElevationRequiredError, ni as TaskEntryConfig, nn as NotificationsLinksLayout, nr as deriveStack, nt as DuplicateDiscussion, o as WebhookVerificationError, on as NotificationsPicture, or as HolocronProfile, ot as EnsureReport, p as AuthEventType, pn as PagesConfig, pr as LoadedConfig, pt as EnvironmentReviewer, q as DeploymentRecord, qn as Wiki, qr as RepoValidationConfig, qt as NormalizedAuthUser, r as MissingTokenError, ri as TelemetryConfig, rn as NotificationsMember, rr as missingCapabilities, rt as EnsureDiscussionInput, s as isMulti, sn as NotificationsPinnedLayout, sr as PackageJsonLike, st as EnsureResult, t as CARDINALITY, ti as StorybookDeployProject, tn as NotificationsLayout, tr as deriveProfile, tt as DnsRecordType, u as Auth, un as NotificationsSignIn, ur as compose, ut as EnsuredResource, v as BoardItem, vn as RelayState, vr as credentialsEnvironment, vt as Ideas, w as BoardSummary, wn as Secrets, wr as ChromaticProjectConfig, wt as IssueOrder, x as BoardState, xn as ResolvedCapability, xr as resolvePluginPackage, xt as InspectRelayInput, y as BoardItemInput, yn as RepoRef, yr as resolveConfig, yt as ImportOptions, z as CredentialsInspection, zn as Tooling, zr as RawProviderEntry, zt as MonitoringAlertSettings } from "./index-C4pFARzT.mjs";
|
|
2
2
|
import { AuthError, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, ResolveTokenInput as ResolveTokenInput$1, resolveValue } from "@theholocron/kyber/secrets";
|
|
3
3
|
import { CheckRow } from "@theholocron/kyber/ui";
|
|
4
4
|
import { RequestOptions, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
|
|
5
5
|
import "@theholocron/kyber/plugins";
|
|
6
|
-
import "@theholocron/git-utils";
|
|
6
|
+
import { GitExec } from "@theholocron/git-utils";
|
|
7
7
|
import { ConnectionProbeInput as ConnectionProbeInput$1 } from "@theholocron/kyber/checks";
|
|
8
8
|
import "@theholocron/observability/core";
|
|
9
9
|
import { ConfigDirArea } from "@theholocron/datapad";
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CARDINALITY, ElevationRequiredError, MissingTokenError, ProviderApiError, REQUIRED_CAPABILITIES, WebhookVerificationError, isMulti } from "./plugin/capabilities.mjs";
|
|
2
|
-
import { a as placeAreas, c as ConfigError, d as resolveEntry, f as resolvePluginPackage, i as loadConfig, l as credentialsEnvironment, n as compose, o as HOLOCRON_AREAS, r as defineConfig, s as SHARED_AREAS, t as ConfigFileError, u as resolveConfig } from "./config-system-
|
|
2
|
+
import { a as placeAreas, c as ConfigError, d as resolveEntry, f as resolvePluginPackage, i as loadConfig, l as credentialsEnvironment, n as compose, o as HOLOCRON_AREAS, r as defineConfig, s as SHARED_AREAS, t as ConfigFileError, u as resolveConfig } from "./config-system-CZVj19gs.mjs";
|
|
3
3
|
import { Entry, findCredentials } from "@napi-rs/keyring";
|
|
4
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";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as DnsRecord, $t as NotificationsEveryoneLayout, A as Cardinality, An as SourceRulesetDetail, At as LabelDef, B as DeployFunctionConfig, Bn as ToolingDoctorReport, Bt as MonitoringAssertion, C as BoardStatusCategory, Cn as SecretScope, Ct as IssueComment, D as BoardView, Dn as SourceBranch, Dt as IssueSearchFilter, E as BoardTemplateFile, En as Source, Et as IssueRecord, F as CiRunStatus, Fn as StorageBranch, Ft as Monitoring, G as DeploymentProject, Gn as Vault, Gt as MonitoringHttpMethod, H as DeployScriptConfig, Hn as TrackerUser, Ht as MonitoringAssertionSource, I as ConnectionStringOptions, In as SyncResult, It as MonitoringAlertChannelInput, J as DeploymentTarget, Jn as WikiProvisionOpts, Jt as Notifications, K as DeploymentProjectSettings, Kn as WebhookDashboardInfo, Kt as MoveReport, L as CreateAuthUserInput, Ln as TeamEntry, Lt as MonitoringAlertChannelResult, M as Ci, Mn as SourceTeamMember, Mt as LifecycleSlot, N as CiRun, Nn as StatusCategory, Nt as Logs, O as CapabilityImpls, On as SourceFile, Ot as IssueSelector, P as CiRunFilter, Pn as Storage, Pt as LogsDataset, Q as Dns, Qt as NotificationsDelivery, R as Credentials, Rn as TeamPermission, Rt as MonitoringAlertChannelState, S as BoardStatus, Sn as Ruleset, St as Issue, T as BoardTemplate, Tn as ServerInspection, Tt as IssuePriority, U as DeployScriptResult, Un as TunnelRoute, Ut as MonitoringCheck, V as DeployFunctionResult, Vn as TrackerDoctorReport, Vt as MonitoringAssertionComparison, W as Deployment, Wn as Tunnels, Wt as MonitoringCheckInput, X as DiscussionPatch, Xn as WorkerScriptState, Xt as NotificationsApplicationLayout, Y as DeploymentTrigger, Yn as WikiProxyConfig, Yt as NotificationsAccess, Z as DiscussionPost, Zn as Workers, Zt as NotificationsChannelLayout, _ as BoardFieldType, _n as PullRequest, _t as IdeaRecord, a as REQUIRED_CAPABILITIES, an as NotificationsOnboardingLayout, at as EnsureRelayResult, b as BoardRule, bn as RepoSettings, bt as ImportResult, c as AddedItem, cn as NotificationsPrsFeed, ct as EnsureWebhookResult, d as AuthDescription, dn as NotificationsSignedIn, dt as EnsuredTunnel, en as NotificationsForumTag, et as DnsRecordRequest, f as AuthEvent, fn as NotificationsWelcomeLayout, ft as Environment, g as BoardField, gn as ProviderIdentity, gt as ExportInfo, h as AuthUser, hn as Projects, ht as Errors, i as ProviderApiError, in as NotificationsMonitoringFeed, it as EnsureRelayInput, j as CardinalityFor, jn as SourceSecurity, jt as LifecycleResult, k as CapabilityKey, kn as SourceRepoInfo, kt as Issues, l as Analytics, ln as NotificationsServerLayout, lt as EnsuredDiscussion, m as AuthIdentity, mn as ParseWebhookInput, mt as Environments, n as ElevationRequiredError, nn as NotificationsLinksLayout, nt as DuplicateDiscussion, o as WebhookVerificationError, on as NotificationsPicture, ot as EnsureReport, p as AuthEventType, pn as PagesConfig, pt as EnvironmentReviewer, q as DeploymentRecord, qn as Wiki, qt as NormalizedAuthUser, r as MissingTokenError, rn as NotificationsMember, rt as EnsureDiscussionInput, s as isMulti, sn as NotificationsPinnedLayout, st as EnsureResult, t as CARDINALITY, tn as NotificationsLayout, tt as DnsRecordType, u as Auth, un as NotificationsSignIn, ut as EnsuredResource, v as BoardItem, vn as RelayState, vt as Ideas, w as BoardSummary, wn as Secrets, wt as IssueOrder, x as BoardState, xn as ResolvedCapability, xt as InspectRelayInput, y as BoardItemInput, yn as RepoRef, yt as ImportOptions, z as CredentialsInspection, zn as Tooling, zt as MonitoringAlertSettings } from "../index-
|
|
1
|
+
import { $ as DnsRecord, $t as NotificationsEveryoneLayout, A as Cardinality, An as SourceRulesetDetail, At as LabelDef, B as DeployFunctionConfig, Bn as ToolingDoctorReport, Bt as MonitoringAssertion, C as BoardStatusCategory, Cn as SecretScope, Ct as IssueComment, D as BoardView, Dn as SourceBranch, Dt as IssueSearchFilter, E as BoardTemplateFile, En as Source, Et as IssueRecord, F as CiRunStatus, Fn as StorageBranch, Ft as Monitoring, G as DeploymentProject, Gn as Vault, Gt as MonitoringHttpMethod, H as DeployScriptConfig, Hn as TrackerUser, Ht as MonitoringAssertionSource, I as ConnectionStringOptions, In as SyncResult, It as MonitoringAlertChannelInput, J as DeploymentTarget, Jn as WikiProvisionOpts, Jt as Notifications, K as DeploymentProjectSettings, Kn as WebhookDashboardInfo, Kt as MoveReport, L as CreateAuthUserInput, Ln as TeamEntry, Lt as MonitoringAlertChannelResult, M as Ci, Mn as SourceTeamMember, Mt as LifecycleSlot, N as CiRun, Nn as StatusCategory, Nt as Logs, O as CapabilityImpls, On as SourceFile, Ot as IssueSelector, P as CiRunFilter, Pn as Storage, Pt as LogsDataset, Q as Dns, Qt as NotificationsDelivery, R as Credentials, Rn as TeamPermission, Rt as MonitoringAlertChannelState, S as BoardStatus, Sn as Ruleset, St as Issue, T as BoardTemplate, Tn as ServerInspection, Tt as IssuePriority, U as DeployScriptResult, Un as TunnelRoute, Ut as MonitoringCheck, V as DeployFunctionResult, Vn as TrackerDoctorReport, Vt as MonitoringAssertionComparison, W as Deployment, Wn as Tunnels, Wt as MonitoringCheckInput, X as DiscussionPatch, Xn as WorkerScriptState, Xt as NotificationsApplicationLayout, Y as DeploymentTrigger, Yn as WikiProxyConfig, Yt as NotificationsAccess, Z as DiscussionPost, Zn as Workers, Zt as NotificationsChannelLayout, _ as BoardFieldType, _n as PullRequest, _t as IdeaRecord, a as REQUIRED_CAPABILITIES, an as NotificationsOnboardingLayout, at as EnsureRelayResult, b as BoardRule, bn as RepoSettings, bt as ImportResult, c as AddedItem, cn as NotificationsPrsFeed, ct as EnsureWebhookResult, d as AuthDescription, dn as NotificationsSignedIn, dt as EnsuredTunnel, en as NotificationsForumTag, et as DnsRecordRequest, f as AuthEvent, fn as NotificationsWelcomeLayout, ft as Environment, g as BoardField, gn as ProviderIdentity, gt as ExportInfo, h as AuthUser, hn as Projects, ht as Errors, i as ProviderApiError, in as NotificationsMonitoringFeed, it as EnsureRelayInput, j as CardinalityFor, jn as SourceSecurity, jt as LifecycleResult, k as CapabilityKey, kn as SourceRepoInfo, kt as Issues, l as Analytics, ln as NotificationsServerLayout, lt as EnsuredDiscussion, m as AuthIdentity, mn as ParseWebhookInput, mt as Environments, n as ElevationRequiredError, nn as NotificationsLinksLayout, nt as DuplicateDiscussion, o as WebhookVerificationError, on as NotificationsPicture, ot as EnsureReport, p as AuthEventType, pn as PagesConfig, pt as EnvironmentReviewer, q as DeploymentRecord, qn as Wiki, qt as NormalizedAuthUser, r as MissingTokenError, rn as NotificationsMember, rt as EnsureDiscussionInput, s as isMulti, sn as NotificationsPinnedLayout, st as EnsureResult, t as CARDINALITY, tn as NotificationsLayout, tt as DnsRecordType, u as Auth, un as NotificationsSignIn, ut as EnsuredResource, v as BoardItem, vn as RelayState, vt as Ideas, w as BoardSummary, wn as Secrets, wt as IssueOrder, x as BoardState, xn as ResolvedCapability, xt as InspectRelayInput, y as BoardItemInput, yn as RepoRef, yt as ImportOptions, z as CredentialsInspection, zn as Tooling, zt as MonitoringAlertSettings } from "../index-C4pFARzT.mjs";
|
|
2
2
|
export { AddedItem, Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, BoardField, BoardFieldType, BoardItem, BoardItemInput, BoardRule, BoardState, BoardStatus, BoardStatusCategory, BoardSummary, BoardTemplate, BoardTemplateFile, BoardView, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, Credentials, CredentialsInspection, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DiscussionPatch, DiscussionPost, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, DuplicateDiscussion, ElevationRequiredError, EnsureDiscussionInput, EnsureRelayInput, EnsureRelayResult, EnsureReport, EnsureResult, EnsureWebhookResult, EnsuredDiscussion, EnsuredResource, EnsuredTunnel, Environment, EnvironmentReviewer, Environments, Errors, ExportInfo, IdeaRecord, Ideas, ImportOptions, ImportResult, InspectRelayInput, Issue, IssueComment, IssueOrder, IssuePriority, IssueRecord, IssueSearchFilter, IssueSelector, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, LogsDataset, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAlertChannelState, MonitoringAlertSettings, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, MoveReport, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsForumTag, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsMonitoringFeed, NotificationsOnboardingLayout, NotificationsPicture, NotificationsPinnedLayout, NotificationsPrsFeed, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, PagesConfig, ParseWebhookInput, Projects, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RelayState, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, ServerInspection, Source, SourceBranch, SourceFile, SourceRepoInfo, SourceRulesetDetail, SourceSecurity, SourceTeamMember, StatusCategory, Storage, StorageBranch, SyncResult, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, TunnelRoute, Tunnels, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, WorkerScriptState, Workers, isMulti };
|
package/dist/presets.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hr as ComposedPreset, mr as Capability, ur as compose } from "./index-
|
|
1
|
+
import { hr as ComposedPreset, mr as Capability, ur as compose } from "./index-C4pFARzT.mjs";
|
|
2
2
|
/** Options for the audit capability. */
|
|
3
3
|
interface AuditOptions {
|
|
4
4
|
/** Enable Knip unused-export analysis (default: false). */
|
|
@@ -9,7 +9,7 @@ interface AuditOptions {
|
|
|
9
9
|
lighthouseConfig?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Adds bundle-size measuring (`measure
|
|
12
|
+
* Adds bundle-size measuring (`measure:bundle`) + optional Knip (`lint:unused`) and
|
|
13
13
|
* Lighthouse (`test:perf`) auditing. Each task is marked `required` — `holocron setup`
|
|
14
14
|
* derives the branch-protection checks from the manifest.
|
|
15
15
|
* Requires: node
|
|
@@ -109,7 +109,7 @@ type DocsSitePreset = ComposedPreset;
|
|
|
109
109
|
* Includes the "audit / Conclusion" check in `extraRequiredChecks` so branch
|
|
110
110
|
* protection works for repos that add the audit workflow explicitly. The
|
|
111
111
|
* tasks are intentionally left repo-specific — add the ones you want as flat ids:
|
|
112
|
-
* tasks: [...preset.tasks, { name: "measure
|
|
112
|
+
* tasks: [...preset.tasks, { name: "measure:bundle", required: true }, "lint:unused", ...]
|
|
113
113
|
*
|
|
114
114
|
* For docs-only sites without TypeScript source, use docsSitePreset() instead.
|
|
115
115
|
*
|
|
@@ -120,7 +120,7 @@ type DocsSitePreset = ComposedPreset;
|
|
|
120
120
|
* description: "...",
|
|
121
121
|
* homepage: "https://docs.theholocron.dev/my-lib/",
|
|
122
122
|
* repo: { ...preset.repo, name: "theholocron/my-lib", topics: ["typescript"] },
|
|
123
|
-
* tasks: [...preset.tasks, { name: "measure
|
|
123
|
+
* tasks: [...preset.tasks, { name: "measure:bundle", required: true }, { name: "release", with: { "run-build": true } }, "sync-repo"],
|
|
124
124
|
* providers: { ...preset.providers, secrets: "github" },
|
|
125
125
|
* });
|
|
126
126
|
*/
|
package/dist/presets.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as compose } from "./config-system-
|
|
1
|
+
import { n as compose } from "./config-system-CZVj19gs.mjs";
|
|
2
2
|
import { DEFAULT_ORG } from "@theholocron/astromech";
|
|
3
3
|
// src/presets/capabilities/audit.ts
|
|
4
4
|
/**
|
|
5
|
-
* Adds bundle-size measuring (`measure
|
|
5
|
+
* Adds bundle-size measuring (`measure:bundle`) + optional Knip (`lint:unused`) and
|
|
6
6
|
* Lighthouse (`test:perf`) auditing. Each task is marked `required` — `holocron setup`
|
|
7
7
|
* derives the branch-protection checks from the manifest.
|
|
8
8
|
* Requires: node
|
|
@@ -13,7 +13,7 @@ function audit({ knip = false, performance = false, lighthouseConfig } = {}) {
|
|
|
13
13
|
requires: ["node"],
|
|
14
14
|
tasks: [
|
|
15
15
|
{
|
|
16
|
-
name: "measure
|
|
16
|
+
name: "measure:bundle",
|
|
17
17
|
required: true
|
|
18
18
|
},
|
|
19
19
|
...knip ? [{
|
|
@@ -297,7 +297,7 @@ function wiki() {
|
|
|
297
297
|
* Includes the "audit / Conclusion" check in `extraRequiredChecks` so branch
|
|
298
298
|
* protection works for repos that add the audit workflow explicitly. The
|
|
299
299
|
* tasks are intentionally left repo-specific — add the ones you want as flat ids:
|
|
300
|
-
* tasks: [...preset.tasks, { name: "measure
|
|
300
|
+
* tasks: [...preset.tasks, { name: "measure:bundle", required: true }, "lint:unused", ...]
|
|
301
301
|
*
|
|
302
302
|
* For docs-only sites without TypeScript source, use docsSitePreset() instead.
|
|
303
303
|
*
|
|
@@ -308,7 +308,7 @@ function wiki() {
|
|
|
308
308
|
* description: "...",
|
|
309
309
|
* homepage: "https://docs.theholocron.dev/my-lib/",
|
|
310
310
|
* repo: { ...preset.repo, name: "theholocron/my-lib", topics: ["typescript"] },
|
|
311
|
-
* tasks: [...preset.tasks, { name: "measure
|
|
311
|
+
* tasks: [...preset.tasks, { name: "measure:bundle", required: true }, { name: "release", with: { "run-build": true } }, "sync-repo"],
|
|
312
312
|
* providers: { ...preset.providers, secrets: "github" },
|
|
313
313
|
* });
|
|
314
314
|
*/
|
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.415",
|
|
4
4
|
"description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -59,19 +59,19 @@
|
|
|
59
59
|
"posthog-node": "^5.61.2",
|
|
60
60
|
"tsx": "4.23.15",
|
|
61
61
|
"yargs": "^18.1.0",
|
|
62
|
-
"@theholocron/
|
|
63
|
-
"@theholocron/
|
|
62
|
+
"@theholocron/astromech": "5.0.0-alpha.415",
|
|
63
|
+
"@theholocron/dagobah": "5.0.0-alpha.415",
|
|
64
|
+
"@theholocron/datapad": "5.0.0-alpha.415",
|
|
64
65
|
"@theholocron/env-utils": "^1.17.0-alpha.4",
|
|
65
66
|
"@theholocron/fs-utils": "^1.17.0-alpha.4",
|
|
67
|
+
"@theholocron/git-utils": "^1.17.0-alpha.4",
|
|
66
68
|
"@theholocron/github-client": "^1.58.0-alpha.27",
|
|
67
69
|
"@theholocron/json-utils": "^1.17.0-alpha.4",
|
|
68
|
-
"@theholocron/misc-utils": "^1.17.0-alpha.4",
|
|
69
|
-
"@theholocron/kyber": "5.0.0-alpha.413",
|
|
70
|
-
"@theholocron/git-utils": "^1.17.0-alpha.4",
|
|
71
70
|
"@theholocron/http-client": "^1.58.0-alpha.27",
|
|
72
|
-
"@theholocron/
|
|
71
|
+
"@theholocron/kyber": "5.0.0-alpha.415",
|
|
72
|
+
"@theholocron/misc-utils": "^1.17.0-alpha.4",
|
|
73
73
|
"@theholocron/pkg-utils": "^1.17.0-alpha.4",
|
|
74
|
-
"@theholocron/
|
|
74
|
+
"@theholocron/observability": "^0.7.0-alpha.4"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@types/node": "^26",
|