@theholocron/cli 5.0.0-alpha.422 → 5.0.0-alpha.424
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 +93 -91
- package/dist/cli.mjs +25069 -24942
- package/dist/cli.mjs.map +1 -1
- package/dist/{config-system-BFlPXyU2.mjs → config-system-B_K14uij.mjs} +2 -2
- package/dist/{index-8QnGZze1.d.mts → index-CBiPFCUp.d.mts} +55 -47
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +10 -10
- package/dist/plugin/capabilities.d.mts +1 -1
- package/dist/presets.d.mts +1 -1
- package/dist/presets.mjs +1 -1
- package/package.json +15 -15
|
@@ -77,7 +77,7 @@ function isUnsyncedLayer(layer) {
|
|
|
77
77
|
/**
|
|
78
78
|
* The text of the error for an Environment of an unsynced layer, shared by the command and the config checks.
|
|
79
79
|
*
|
|
80
|
-
* @param what - What names the layer, e.g. "`secrets
|
|
80
|
+
* @param what - What names the layer, e.g. "`sync secrets dev`" or "a `repo.secrets.sync` entry".
|
|
81
81
|
* @param layer - The unsynced layer.
|
|
82
82
|
*/
|
|
83
83
|
function unsyncedLayerMessage(what, layer) {
|
|
@@ -151,7 +151,7 @@ const key = (name) => name.toUpperCase();
|
|
|
151
151
|
/**
|
|
152
152
|
* Check `repo.variables.sync`: each entry names a vault environment, one or more keys and a scope that is `repo` or
|
|
153
153
|
* `org=<name>`; a name may not also be a literal value of the same scope (one source per name); and `prune` cannot
|
|
154
|
-
* be combined with `sync`, because `
|
|
154
|
+
* be combined with `sync`, because `setup` would delete the variables the sync wrote.
|
|
155
155
|
*
|
|
156
156
|
* @param variables - `repo.variables`, if the config has it.
|
|
157
157
|
* @throws {ConfigError} Naming the first problem found.
|
|
@@ -20,7 +20,7 @@ interface LogConfig {
|
|
|
20
20
|
* `HOLOCRON_AXIOM_DATASET` variable (`holocron`, synced from 1Password) with no config at all.
|
|
21
21
|
* Set `axiom.dataset` only for a repo that keeps its own dataset: the CLI
|
|
22
22
|
* pairs it with the token from `HOLOCRON_AXIOM_TOKEN` / `AXIOM_TOKEN` or the
|
|
23
|
-
* OS keyring (`holocron
|
|
23
|
+
* OS keyring (`holocron new token axiom[.<org>] <TOKEN>`). Env vars still
|
|
24
24
|
* win, and a `global`-context command ignores it.
|
|
25
25
|
*/
|
|
26
26
|
axiom?: {
|
|
@@ -89,7 +89,7 @@ interface DocsConfig {
|
|
|
89
89
|
* GitHub Pages build source.
|
|
90
90
|
* "workflow" → GitHub Actions (PUT { build_type: "workflow" })
|
|
91
91
|
* "branch" → classic gh-pages branch (PUT { build_type: "legacy", source: { branch: "gh-pages", path: "/" } })
|
|
92
|
-
* When absent, Pages is not managed by `holocron
|
|
92
|
+
* When absent, Pages is not managed by `holocron setup`.
|
|
93
93
|
*/
|
|
94
94
|
build?: "workflow" | "branch";
|
|
95
95
|
/**
|
|
@@ -128,7 +128,7 @@ interface RepoVariables {
|
|
|
128
128
|
visibility?: "all" | "private";
|
|
129
129
|
}>;
|
|
130
130
|
/**
|
|
131
|
-
* The vault environments `holocron secrets
|
|
131
|
+
* The vault environments `holocron sync secrets` fills variables from, so one 1Password Environment is the only
|
|
132
132
|
* place they are edited. Names only. A name here must not also be a literal value in `repo` or `org`, and `prune`
|
|
133
133
|
* cannot be combined with it; either is a config error.
|
|
134
134
|
*/
|
|
@@ -137,11 +137,11 @@ interface RepoVariables {
|
|
|
137
137
|
prune?: boolean;
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
|
-
* One vault environment that `holocron secrets
|
|
140
|
+
* One vault environment that `holocron sync secrets` pushes into GitHub Actions variables. Not secrets: a variable is
|
|
141
141
|
* readable in GitHub afterwards, so keep it in an environment of its own, apart from the one that fills secrets.
|
|
142
142
|
*/
|
|
143
143
|
interface RepoVariablesSync {
|
|
144
|
-
/** The vault environment id, as given to `holocron secrets
|
|
144
|
+
/** The vault environment id, as given to `holocron sync secrets <environmentId>`. */
|
|
145
145
|
environment?: string;
|
|
146
146
|
/**
|
|
147
147
|
* The layer to name instead of `environment`: the Environment is `<org/repo> - <layer>`, from the repository's
|
|
@@ -157,7 +157,7 @@ interface RepoVariablesSync {
|
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
159
|
* The names of the secrets that must exist for this repository's workflows to work, so `holocron doctor secrets`
|
|
160
|
-
* can say which are missing. Only names go here, never values; `holocron
|
|
160
|
+
* can say which are missing. Only names go here, never values; `holocron new secret` and `sync secrets` write
|
|
161
161
|
* them. The secrets the config already implies (the notification layout's webhooks and roles, a Chromatic project
|
|
162
162
|
* token) are expected without being listed again. A secret that exists but is not listed is never a problem.
|
|
163
163
|
*/
|
|
@@ -169,12 +169,12 @@ interface RepoSecrets {
|
|
|
169
169
|
/** Environment secrets, by environment name. */
|
|
170
170
|
environments?: Record<string, string[]>;
|
|
171
171
|
/**
|
|
172
|
-
* The vault environments `holocron secrets
|
|
172
|
+
* The vault environments `holocron sync secrets` fills secrets from. `holocron doctor secrets` expects the
|
|
173
173
|
* keys each one holds (or lists) at its scope. Names only; the doctor never reads or prints a value.
|
|
174
174
|
*/
|
|
175
175
|
sync?: RepoSecretsSync[];
|
|
176
176
|
/**
|
|
177
|
-
* The names `holocron secrets
|
|
177
|
+
* The names `holocron sync secrets` may send to a deployment (`--project-id`) or a Worker (`--worker`), per vault
|
|
178
178
|
* environment. Required for such a sync: an environment with no entry sends nothing and the command stops with a
|
|
179
179
|
* `ConfigError`. Names and prefixes only (spec `tech-deployment-key-allowlist`, #2061).
|
|
180
180
|
*/
|
|
@@ -186,7 +186,7 @@ interface RepoSecrets {
|
|
|
186
186
|
* `ConfigError`: there is no "all keys".
|
|
187
187
|
*/
|
|
188
188
|
interface RepoSecretsDeploy {
|
|
189
|
-
/** The vault environment id, as given to `holocron secrets
|
|
189
|
+
/** The vault environment id, as given to `holocron sync secrets <environmentId>`. */
|
|
190
190
|
environment?: string;
|
|
191
191
|
/**
|
|
192
192
|
* The layer to name instead of `environment`: the Environment is `<org/repo> - <layer>`, from the repository's
|
|
@@ -198,9 +198,9 @@ interface RepoSecretsDeploy {
|
|
|
198
198
|
/** A name prefix to send, such as `SENTINEL_` or `COMLINK_`. Case-sensitive. */
|
|
199
199
|
prefix?: string;
|
|
200
200
|
}
|
|
201
|
-
/** One vault environment that `holocron secrets
|
|
201
|
+
/** One vault environment that `holocron sync secrets` pushes into GitHub secrets, declared so the doctor can check them. */
|
|
202
202
|
interface RepoSecretsSync {
|
|
203
|
-
/** The vault environment id, as given to `holocron secrets
|
|
203
|
+
/** The vault environment id, as given to `holocron sync secrets <environmentId>`. */
|
|
204
204
|
environment?: string;
|
|
205
205
|
/**
|
|
206
206
|
* The layer to name instead of `environment`: the Environment is `<org/repo> - <layer>`, from the repository's
|
|
@@ -271,7 +271,7 @@ interface OrgConfig {
|
|
|
271
271
|
org?: string;
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
-
/** The `repo` block: how the GitHub repository is set up and kept in sync by `holocron
|
|
274
|
+
/** The `repo` block: how the GitHub repository is set up and kept in sync by `holocron setup`. */
|
|
275
275
|
interface RepoConfig {
|
|
276
276
|
/** "owner/name" — the GitHub repository coordinate. Derived from the git remote when absent. */
|
|
277
277
|
name?: string;
|
|
@@ -281,7 +281,7 @@ interface RepoConfig {
|
|
|
281
281
|
* Sentinel's `validateConfig()` reads (D6: the App only ever reads config
|
|
282
282
|
* from the repo's default branch, never a PR ref, as a security boundary
|
|
283
283
|
* — never widen that to read PR branches instead of fixing this field).
|
|
284
|
-
* Synced by `holocron
|
|
284
|
+
* Synced by `holocron setup`. Omit to leave GitHub's current setting
|
|
285
285
|
* untouched — most repos never need this. Exists for a repo using a
|
|
286
286
|
* `main`/`alpha` prerelease-channel split (CLAUDE.md's Releases section)
|
|
287
287
|
* where active development happens on a non-`main` branch: set this to
|
|
@@ -291,7 +291,7 @@ interface RepoConfig {
|
|
|
291
291
|
*/
|
|
292
292
|
defaultBranch?: string;
|
|
293
293
|
/**
|
|
294
|
-
* Branch protection preset applied by `holocron
|
|
294
|
+
* Branch protection preset applied by `holocron setup`. When omitted,
|
|
295
295
|
* no protection is applied and no `branch_protection_level` property is set.
|
|
296
296
|
* Required-status-check contexts for `"strict"` are derived from the task
|
|
297
297
|
* manifest — `{ required: true }` tasks + top-level `extraRequiredChecks`
|
|
@@ -299,7 +299,7 @@ interface RepoConfig {
|
|
|
299
299
|
*/
|
|
300
300
|
protection?: RepoProtection;
|
|
301
301
|
/**
|
|
302
|
-
* GitHub teams granted repository access. Synced by `holocron
|
|
302
|
+
* GitHub teams granted repository access. Synced by `holocron setup`, which
|
|
303
303
|
* also writes `.github/CODEOWNERS` for teams with write-or-higher permission.
|
|
304
304
|
* String shorthand defaults to `push` (Write).
|
|
305
305
|
*/
|
|
@@ -308,7 +308,7 @@ interface RepoConfig {
|
|
|
308
308
|
topics?: string[];
|
|
309
309
|
/** GitHub custom properties synced to the org dashboard. */
|
|
310
310
|
properties?: RepoProperties;
|
|
311
|
-
/** GitHub Actions variables reconciled by `holocron
|
|
311
|
+
/** GitHub Actions variables reconciled by `holocron setup`. */
|
|
312
312
|
variables?: RepoVariables;
|
|
313
313
|
/** The secrets that must exist, checked by `holocron doctor secrets`. Names only; nothing writes them. */
|
|
314
314
|
secrets?: RepoSecrets;
|
|
@@ -520,7 +520,7 @@ interface StorybookDeployProject {
|
|
|
520
520
|
* `ChromaticProjectConfig[]` directly; each entry's `untraced` glob list may
|
|
521
521
|
* be authored as an array and is newline-joined for you.
|
|
522
522
|
*
|
|
523
|
-
* `docs` / `storybook` are high-level deploy shorthand that `holocron
|
|
523
|
+
* `docs` / `storybook` are high-level deploy shorthand that `holocron setup`
|
|
524
524
|
* translates to `type` / `storybook-projects` before writing the thin caller.
|
|
525
525
|
* They also drive automatic `paths:` derivation so you never need to write
|
|
526
526
|
* `paths:` manually for deploy entries.
|
|
@@ -584,7 +584,7 @@ interface HolocronConfig {
|
|
|
584
584
|
name?: string;
|
|
585
585
|
/** A one-line description of the project. */
|
|
586
586
|
description?: string;
|
|
587
|
-
/** Project homepage URL. Synced to package.json#homepage and the GitHub repo's website field by `holocron
|
|
587
|
+
/** Project homepage URL. Synced to package.json#homepage and the GitHub repo's website field by `holocron sync`. */
|
|
588
588
|
homepage?: string;
|
|
589
589
|
/**
|
|
590
590
|
* Active org name for namespaced keyring lookup. When set, token resolution
|
|
@@ -625,7 +625,7 @@ interface HolocronConfig {
|
|
|
625
625
|
* "knowledge.wiki" | "knowledge.docs" | "knowledge.components" |
|
|
626
626
|
* "review" | "tag" | "stale" | "greetings" | "dependencies" | "bookkeeping"
|
|
627
627
|
*
|
|
628
|
-
* `holocron
|
|
628
|
+
* `holocron setup` writes `.github/workflows/<name>.yml` for each entry,
|
|
629
629
|
* calling the corresponding reusable workflow in `theholocron/.github`.
|
|
630
630
|
* Files are overwritten on each run — they are generated artifacts.
|
|
631
631
|
*
|
|
@@ -698,7 +698,7 @@ interface HolocronConfig {
|
|
|
698
698
|
*/
|
|
699
699
|
tasks?: Array<string | TaskEntryConfig>;
|
|
700
700
|
/**
|
|
701
|
-
* Opt out of `holocron
|
|
701
|
+
* Opt out of `holocron sync`'s `package.json` script writes. Default `true`.
|
|
702
702
|
*/
|
|
703
703
|
syncScripts?: boolean;
|
|
704
704
|
/**
|
|
@@ -709,15 +709,15 @@ interface HolocronConfig {
|
|
|
709
709
|
holocronScript?: string;
|
|
710
710
|
/**
|
|
711
711
|
* Required status-check contexts not backed by a `required` task (codecov
|
|
712
|
-
* gates, the bundle-build check, …). `holocron
|
|
712
|
+
* gates, the bundle-build check, …). `holocron setup` appends these to the
|
|
713
713
|
* task-derived list from `astromech.requiredChecks()`.
|
|
714
714
|
*/
|
|
715
715
|
extraRequiredChecks?: string[];
|
|
716
716
|
/**
|
|
717
|
-
* Git hooks `holocron
|
|
717
|
+
* Git hooks `holocron setup` installs. `true` / `{ prePush: true }` writes
|
|
718
718
|
* `.husky/pre-push` (runs `holocron run ci` before every push); `false` /
|
|
719
719
|
* `{ prePush: false }` opts out. Omitted → on for `protection: "strict"`,
|
|
720
|
-
* off otherwise. `--hooks` / `--no-hooks` on `holocron
|
|
720
|
+
* off otherwise. `--hooks` / `--no-hooks` on `holocron setup` override.
|
|
721
721
|
*/
|
|
722
722
|
hooks?: boolean | {
|
|
723
723
|
prePush?: boolean;
|
|
@@ -729,7 +729,7 @@ interface HolocronConfig {
|
|
|
729
729
|
/** Settings for `holocron doctor`. */
|
|
730
730
|
doctor?: DoctorConfig;
|
|
731
731
|
/**
|
|
732
|
-
* Agent runtime that determines where skills are installed by `holocron
|
|
732
|
+
* Agent runtime that determines where skills are installed by `holocron setup`.
|
|
733
733
|
* Skills are installed to `.agents/skills/<name>/` (canonical) with a
|
|
734
734
|
* relative symlink at the agent-specific path:
|
|
735
735
|
* - `"claude"` → `.claude/skills/<name>` → `../../.agents/skills/<name>`
|
|
@@ -737,7 +737,7 @@ interface HolocronConfig {
|
|
|
737
737
|
*/
|
|
738
738
|
agent?: "claude" | "codex" | "gemini";
|
|
739
739
|
/**
|
|
740
|
-
* Skill names from `@theholocron/skills` to install during `holocron
|
|
740
|
+
* Skill names from `@theholocron/skills` to install during `holocron setup`.
|
|
741
741
|
* Installed paths are gitignored and managed by setup — do not commit them.
|
|
742
742
|
*
|
|
743
743
|
* @example
|
|
@@ -745,7 +745,7 @@ interface HolocronConfig {
|
|
|
745
745
|
*/
|
|
746
746
|
skills?: string[];
|
|
747
747
|
/**
|
|
748
|
-
* GitHub Pages configuration. When present, `holocron
|
|
748
|
+
* GitHub Pages configuration. When present, `holocron setup` calls the
|
|
749
749
|
* Pages API using `HOLOCRON_DEPLOY_TOKEN` (requires `pages:write` + `repo` scope).
|
|
750
750
|
* When absent, Pages is left as-is.
|
|
751
751
|
*
|
|
@@ -791,7 +791,7 @@ interface HolocronConfig {
|
|
|
791
791
|
*/
|
|
792
792
|
githubApps?: GitHubAppConfig[];
|
|
793
793
|
/**
|
|
794
|
-
* The state that files an idea as an issue, for `holocron ideas
|
|
794
|
+
* The state that files an idea as an issue, for `holocron sync ideas`. Where the ideas are kept is
|
|
795
795
|
* `providers.ideas`; the older `ideas.dir` is deprecated and still read when `providers.ideas` is absent.
|
|
796
796
|
*
|
|
797
797
|
* @example
|
|
@@ -884,7 +884,7 @@ interface ResolvedHolocronConfig {
|
|
|
884
884
|
holocronScript?: string;
|
|
885
885
|
/** Required status checks not backed by a task. */
|
|
886
886
|
extraRequiredChecks?: string[];
|
|
887
|
-
/** Git hooks `holocron
|
|
887
|
+
/** Git hooks `holocron setup` installs. */
|
|
888
888
|
hooks?: boolean | {
|
|
889
889
|
prePush?: boolean;
|
|
890
890
|
};
|
|
@@ -1576,7 +1576,7 @@ interface OrganizationSecretScope {
|
|
|
1576
1576
|
name: string;
|
|
1577
1577
|
/**
|
|
1578
1578
|
* Who can read the secret. `selected` needs `repos`. Left out, the provider keeps its older default (every
|
|
1579
|
-
* repository), which `holocron secrets
|
|
1579
|
+
* repository), which `holocron sync secrets` never relies on: it always names the readers (spec
|
|
1580
1580
|
* `tech-org-secret-visibility`, #2062).
|
|
1581
1581
|
*/
|
|
1582
1582
|
visibility?: SecretVisibility;
|
|
@@ -1599,7 +1599,7 @@ interface SecretAccess {
|
|
|
1599
1599
|
/** The repository names that can read it, when `visibility` is `selected`. */
|
|
1600
1600
|
repos?: string[];
|
|
1601
1601
|
}
|
|
1602
|
-
/** A destination for secrets (CI or platform secrets) that `holocron secrets
|
|
1602
|
+
/** A destination for secrets (CI or platform secrets) that `holocron sync secrets` writes into. */
|
|
1603
1603
|
interface Secrets extends ProviderIdentity {
|
|
1604
1604
|
/** Identifies this provider as the `secrets` capability. */
|
|
1605
1605
|
readonly key: "secrets";
|
|
@@ -1963,7 +1963,7 @@ interface Deployment extends ProviderIdentity {
|
|
|
1963
1963
|
readonly key: "deployment";
|
|
1964
1964
|
/**
|
|
1965
1965
|
* Custom domain declared in the deployment provider's configuration.
|
|
1966
|
-
* `holocron
|
|
1966
|
+
* `holocron setup` attaches it to the configured project and hands any
|
|
1967
1967
|
* returned verification record to the `dns` capability.
|
|
1968
1968
|
*/
|
|
1969
1969
|
readonly domain?: string;
|
|
@@ -2197,7 +2197,7 @@ interface EnvironmentEntry {
|
|
|
2197
2197
|
/** Whether the vault holds it concealed (a secret), as against visible. */
|
|
2198
2198
|
concealed: boolean;
|
|
2199
2199
|
}
|
|
2200
|
-
/** A secret store, the source of truth that `holocron secrets
|
|
2200
|
+
/** A secret store, the source of truth that `holocron sync secrets` reads from. */
|
|
2201
2201
|
interface Vault extends ProviderIdentity {
|
|
2202
2202
|
/** Identifies this provider as the `vault` capability. */
|
|
2203
2203
|
readonly key: "vault";
|
|
@@ -2224,7 +2224,7 @@ interface Vault extends ProviderIdentity {
|
|
|
2224
2224
|
environments?(): Promise<string[]>;
|
|
2225
2225
|
/**
|
|
2226
2226
|
* Optional bulk read of an environment's KEY=VALUE pairs. Powers
|
|
2227
|
-
* the `holocron secrets
|
|
2227
|
+
* the `holocron sync secrets` flow where the orchestrator pulls a
|
|
2228
2228
|
* whole environment from the vault then fans the values out to
|
|
2229
2229
|
* destinations (CI secrets, deployment env vars, local .env).
|
|
2230
2230
|
*/
|
|
@@ -2514,7 +2514,7 @@ interface MonitoringCheckInput {
|
|
|
2514
2514
|
/**
|
|
2515
2515
|
* Route this check to specific alert channels, by their names (the `feeds.monitoring` name of a notifications channel,
|
|
2516
2516
|
* `Message to #uptime` by default). Absent, the check alerts through every alert channel; given, only through the
|
|
2517
|
-
* ones named. A name no alert channel carries is refused by `notifications
|
|
2517
|
+
* ones named. A name no alert channel carries is refused by `setup notifications`.
|
|
2518
2518
|
*/
|
|
2519
2519
|
alertChannels?: string[];
|
|
2520
2520
|
}
|
|
@@ -2598,7 +2598,7 @@ interface Monitoring extends ProviderIdentity {
|
|
|
2598
2598
|
/**
|
|
2599
2599
|
* Checks this provider is configured to ensure exist — populated from
|
|
2600
2600
|
* the provider's own config (`holocron.config.ts`'s provider tuple),
|
|
2601
|
-
* the same place `Deployment.domain` comes from. `holocron
|
|
2601
|
+
* the same place `Deployment.domain` comes from. `holocron setup`
|
|
2602
2602
|
* loops this list and calls `ensureCheck` for each; empty when none
|
|
2603
2603
|
* are configured.
|
|
2604
2604
|
*/
|
|
@@ -3011,7 +3011,7 @@ interface NotificationsApplicationLayout {
|
|
|
3011
3011
|
/** `https://` link the provider calls to verify linked roles. */
|
|
3012
3012
|
roleConnectionsUrl?: string;
|
|
3013
3013
|
/**
|
|
3014
|
-
* Privileged intents the bot needs. `members` lets it list who is in the server, which `sync
|
|
3014
|
+
* Privileged intents the bot needs. `members` lets it list who is in the server, which `sync roles` needs to
|
|
3015
3015
|
* find who holds a role. `true` switches it on from code; `false` switches it off.
|
|
3016
3016
|
*/
|
|
3017
3017
|
intents?: {
|
|
@@ -3019,7 +3019,7 @@ interface NotificationsApplicationLayout {
|
|
|
3019
3019
|
members?: boolean;
|
|
3020
3020
|
};
|
|
3021
3021
|
/**
|
|
3022
|
-
* OAuth2 redirect URIs that must be registered, for `
|
|
3022
|
+
* OAuth2 redirect URIs that must be registered, for `link account`. The provider's API does not allow
|
|
3023
3023
|
* setting them, so these are only checked: `setup` and the doctor say what to add and where.
|
|
3024
3024
|
*/
|
|
3025
3025
|
redirectUris?: string[];
|
|
@@ -3034,11 +3034,11 @@ interface NotificationsEveryoneLayout {
|
|
|
3034
3034
|
/** Permissions to take away. */
|
|
3035
3035
|
deny?: string[];
|
|
3036
3036
|
}
|
|
3037
|
-
/** Where the person-to-member links live: one file in a repo, written by the sign-in flow and read by `sync
|
|
3037
|
+
/** Where the person-to-member links live: one file in a repo, written by the sign-in flow and read by `sync roles`. */
|
|
3038
3038
|
interface NotificationsLinksLayout {
|
|
3039
3039
|
/**
|
|
3040
3040
|
* The base URL of the hosted sign-in service (Sentinel), for example `https://sentinel.theholocron.dev`.
|
|
3041
|
-
* `
|
|
3041
|
+
* `link account` asks it for `/api/link`; when it answers, sign-in happens there, and when it does not
|
|
3042
3042
|
* (down, out of quota, no route yet) the command signs in on this machine instead.
|
|
3043
3043
|
*/
|
|
3044
3044
|
hostedUrl?: string;
|
|
@@ -3049,15 +3049,23 @@ interface NotificationsLinksLayout {
|
|
|
3049
3049
|
/** Defaults to `notifications/<provider>-links.json`. */
|
|
3050
3050
|
path?: string;
|
|
3051
3051
|
}
|
|
3052
|
-
/** A declared server layout, applied idempotently by `holocron notifications
|
|
3052
|
+
/** A declared server layout, applied idempotently by `holocron setup notifications`. */
|
|
3053
3053
|
interface NotificationsLayout {
|
|
3054
|
+
/**
|
|
3055
|
+
* The repositories (`owner/repo`) that can read the organization secrets this layout fills (the webhook URLs and
|
|
3056
|
+
* role ids). Setup and `new channel` write them with visibility `selected` for these repositories only, and
|
|
3057
|
+
* refuse to write an organization secret when the list is missing or empty, so a webhook is never readable by
|
|
3058
|
+
* every repository (#2131). `holocron doctor secrets` compares it with who can read them. Not used for a
|
|
3059
|
+
* repository or environment scope.
|
|
3060
|
+
*/
|
|
3061
|
+
readers?: string[];
|
|
3054
3062
|
/**
|
|
3055
3063
|
* The channel set aside for test posts, by name. It must declare a webhook. `holocron doctor notifications`
|
|
3056
3064
|
* leaves one labelled test message there through its webhook (read back to prove delivery works) for a
|
|
3057
3065
|
* person to look at; the real channels are never given one unless `--deliver` posts and removes it.
|
|
3058
3066
|
*/
|
|
3059
3067
|
testChannel?: string;
|
|
3060
|
-
/** Where `sync
|
|
3068
|
+
/** Where `sync roles` finds which server member is which GitHub account. Only used by roles with a `team`. */
|
|
3061
3069
|
links?: NotificationsLinksLayout;
|
|
3062
3070
|
/** The bot's own application settings, applied with the server's. */
|
|
3063
3071
|
application?: NotificationsApplicationLayout;
|
|
@@ -3072,7 +3080,7 @@ interface NotificationsLayout {
|
|
|
3072
3080
|
webhookAvatar?: NotificationsPicture;
|
|
3073
3081
|
/**
|
|
3074
3082
|
* The Worker that carries other services' alerts into the channels with a `feeds.errors`: built beforehand
|
|
3075
|
-
* (`apps/comlink`), deployed by `notifications
|
|
3083
|
+
* (`apps/comlink`), deployed by `setup notifications` with each channel's webhook URL as a secret, and served at
|
|
3076
3084
|
* `host`. Secrets set some other way (the service's signing secret) are kept across deploys.
|
|
3077
3085
|
*/
|
|
3078
3086
|
relay?: {
|
|
@@ -3132,7 +3140,7 @@ interface NotificationsLayout {
|
|
|
3132
3140
|
permissions?: string[];
|
|
3133
3141
|
/**
|
|
3134
3142
|
* Keep this role's members equal to a team of the `source` provider (for GitHub, a team slug in
|
|
3135
|
-
* the org): `holocron
|
|
3143
|
+
* the org): `holocron sync roles` gives the role to every team member who has linked
|
|
3136
3144
|
* their account, and takes it from linked people who have left the team.
|
|
3137
3145
|
*/
|
|
3138
3146
|
team?: string;
|
|
@@ -3306,7 +3314,7 @@ interface Notifications extends ProviderIdentity {
|
|
|
3306
3314
|
send(channel: string, message: string): Promise<void>;
|
|
3307
3315
|
/**
|
|
3308
3316
|
* The server layout the owner declared for this provider, if any. Read by
|
|
3309
|
-
* `holocron notifications
|
|
3317
|
+
* `holocron setup notifications`; the provider just carries it from its options.
|
|
3310
3318
|
*/
|
|
3311
3319
|
readonly layout?: NotificationsLayout;
|
|
3312
3320
|
/**
|
|
@@ -3622,7 +3630,7 @@ interface Workers extends ProviderIdentity {
|
|
|
3622
3630
|
deployScript(name: string, config: DeployScriptConfig): Promise<DeployScriptResult>;
|
|
3623
3631
|
/**
|
|
3624
3632
|
* Set one secret binding on a script that is already deployed, leaving its code and every other binding alone.
|
|
3625
|
-
* The value is write-only. `holocron secrets
|
|
3633
|
+
* The value is write-only. `holocron sync secrets --worker` uses it to fan a vault out to a Worker.
|
|
3626
3634
|
*/
|
|
3627
3635
|
setSecret?(script: string, name: string, value: string): Promise<void>;
|
|
3628
3636
|
/** The names (never the values) of the secrets bound to a deployed script. `holocron probe` uses it to see what a Worker has. */
|
|
@@ -3689,7 +3697,7 @@ interface Tunnels extends ProviderIdentity {
|
|
|
3689
3697
|
/**
|
|
3690
3698
|
* A place this machine reads its own tokens from, as named variables (`HOLOCRON_ORG_TOKEN`, ...).
|
|
3691
3699
|
*
|
|
3692
|
-
* Not the same job as {@link Vault}, the source of truth `holocron secrets
|
|
3700
|
+
* Not the same job as {@link Vault}, the source of truth `holocron sync secrets` fans out to other services. A
|
|
3693
3701
|
* credentials provider answers a plugin asking "where do I get my token?" before it can talk to anything, so it must
|
|
3694
3702
|
* authenticate without a token of its own: 1Password does (the desktop app and Touch ID on a laptop, a service
|
|
3695
3703
|
* account in CI). A provider that needs a stored token to be read cannot be one.
|
|
@@ -3964,7 +3972,7 @@ interface IdeaRecord {
|
|
|
3964
3972
|
}
|
|
3965
3973
|
/**
|
|
3966
3974
|
* Where ideas are kept before they are issues: an inbox the process starts from (`idea -> issue -> spec -> ...`). A
|
|
3967
|
-
* folder of notes, a forum or a database is one provider, so `holocron ideas
|
|
3975
|
+
* folder of notes, a forum or a database is one provider, so `holocron sync ideas` reads through this and files through
|
|
3968
3976
|
* `issues`, and a change of place is a provider entry and a plugin and nothing else. Optional: a repo with no `ideas`
|
|
3969
3977
|
* provider is not affected.
|
|
3970
3978
|
*/
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, 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-
|
|
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, 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-CBiPFCUp.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";
|
|
@@ -47,7 +47,7 @@ interface PluginToken {
|
|
|
47
47
|
/**
|
|
48
48
|
* `true` when the plugin only falls back to this token: nothing needs it unless a call names no better source (the
|
|
49
49
|
* Discord webhook a post uses when it names no channel). The checks that expect every token a plugin lists, such as
|
|
50
|
-
* `holocron doctor credentials`, do not expect it, and `holocron
|
|
50
|
+
* `holocron doctor credentials`, do not expect it, and `holocron export tokens` marks it as optional when it has none.
|
|
51
51
|
* Default `false`.
|
|
52
52
|
*/
|
|
53
53
|
optional?: boolean;
|
|
@@ -88,7 +88,7 @@ export declare function createResolveToken(config: ResolveTokenConfig): TokenRes
|
|
|
88
88
|
/**
|
|
89
89
|
* Kyber's `createFeatureResolver` for a strict, single-feature token: the flag, the feature's variable, the
|
|
90
90
|
* `credentials` providers' variable of that name, the keyring. No broad-token fallback; if the feature's token is absent
|
|
91
|
-
* the operation fails with a message naming the exact variable to set and `holocron
|
|
91
|
+
* the operation fails with a message naming the exact variable to set and `holocron new token`.
|
|
92
92
|
*/
|
|
93
93
|
export declare function createFeatureResolver(config: FeatureResolverConfig): FeatureResolver;
|
|
94
94
|
/**
|
|
@@ -318,13 +318,13 @@ export declare function roleTeamProblem(layout: {
|
|
|
318
318
|
/**
|
|
319
319
|
* Makes each role's holders equal its team, one role after another. This is the sync itself, with no setup in
|
|
320
320
|
* front of it: the caller has already picked the providers, read the links and checked the layout. `holocron
|
|
321
|
-
*
|
|
321
|
+
* sync roles` and Sentinel's role sync are two callers of it. A step that fails is recorded and the
|
|
322
322
|
* run goes on; nothing here throws for a provider error. Idempotent: a role that already matches changes nothing.
|
|
323
323
|
* Lines go to `input.print` when it is given, and nowhere otherwise.
|
|
324
324
|
*/
|
|
325
325
|
export declare function syncRoles(input: SyncRolesInput): Promise<SyncRolesResult>;
|
|
326
326
|
/**
|
|
327
|
-
* The labels every repository gets from `
|
|
327
|
+
* The labels every repository gets from `setup`, with their GitHub colours (hex, no `#`) and descriptions. A
|
|
328
328
|
* plugin that makes labels of its own, such as Linear's setup, takes the colour of the one with the same name.
|
|
329
329
|
*/
|
|
330
330
|
export declare const CANONICAL_LABELS: readonly [{
|
|
@@ -409,7 +409,7 @@ type AuthExportOutKind = "terminal" | "pipe" | "other";
|
|
|
409
409
|
*/
|
|
410
410
|
export declare function stdoutKind(isTerminal: boolean, fd?: number, stat?: (fd: number) => Pick<Stats, "isFIFO" | "isSocket">): AuthExportOutKind;
|
|
411
411
|
/**
|
|
412
|
-
* The vault Environment `holocron secrets
|
|
412
|
+
* The vault Environment `holocron sync secrets <environmentId>` reads. A layer word (`local`, `dev`, `ci`, `prod`) is the
|
|
413
413
|
* Environment of that layer of this repository, `<org/repo> - <layer>`; any other text is a literal Environment name.
|
|
414
414
|
* A literal name wins only when it is not exactly a layer word, so an Environment that is itself called `prod` cannot be
|
|
415
415
|
* addressed by that name (spec `tech-environment-layers`, #2069).
|
|
@@ -424,12 +424,12 @@ export declare function resolveEnvironmentId(id: string, input: {
|
|
|
424
424
|
}): Promise<string>;
|
|
425
425
|
/** The line that says how to fix a credentials path the version control ignore rules do not cover. */
|
|
426
426
|
export declare function ignoreAdvice(isDefault: boolean, choose: string): string;
|
|
427
|
-
/** The file `
|
|
427
|
+
/** The file `export tokens` and `new github-app` write by default, relative to the repository root. */
|
|
428
428
|
export declare const PRIVATE_CREDENTIALS_FILE = ".holocron/.private/.credentials";
|
|
429
429
|
/** Where a credentials file goes: its absolute path, and whether it is the default one in the private directory. */
|
|
430
430
|
interface CredentialsFileTarget {
|
|
431
431
|
path: string;
|
|
432
|
-
/** True when no `--file` was given, so the file is in `.holocron/.private/` and a missing ignore rule is fixed by `
|
|
432
|
+
/** True when no `--file` was given, so the file is in `.holocron/.private/` and a missing ignore rule is fixed by `sync`. */
|
|
433
433
|
isDefault: boolean;
|
|
434
434
|
}
|
|
435
435
|
/**
|
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, h as layerEnvironment, i as loadConfig, l as credentialsEnvironment, m as isEnvironmentLayer, n as compose, o as HOLOCRON_AREAS, p as repoSlug, 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, h as layerEnvironment, i as loadConfig, l as credentialsEnvironment, m as isEnvironmentLayer, n as compose, o as HOLOCRON_AREAS, p as repoSlug, r as defineConfig, s as SHARED_AREAS, t as ConfigFileError, u as resolveConfig } from "./config-system-B_K14uij.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";
|
|
@@ -15,7 +15,7 @@ import { fstatSync, mkdirSync } from "node:fs";
|
|
|
15
15
|
* it. Both are public, so a plugin's `src/auth.ts` is a one-line call.
|
|
16
16
|
*
|
|
17
17
|
* The keyring itself, with its best-effort failure model and its per-process cache, is `createKeyring` in
|
|
18
|
-
* `@theholocron/kyber/secrets`; this file only names the service. Managed via `holocron
|
|
18
|
+
* `@theholocron/kyber/secrets`; this file only names the service. Managed via `holocron check token` subcommands and consulted
|
|
19
19
|
* last in every plugin's precedence chain (after --token / HOLOCRON_<X>_TOKEN / <native>_TOKEN). See
|
|
20
20
|
* `docs/wiki/specifications/tech-auth-bootstrap.spec.md`.
|
|
21
21
|
*/
|
|
@@ -50,13 +50,13 @@ function createResolveToken(config) {
|
|
|
50
50
|
/**
|
|
51
51
|
* Kyber's `createFeatureResolver` for a strict, single-feature token: the flag, the feature's variable, the
|
|
52
52
|
* `credentials` providers' variable of that name, the keyring. No broad-token fallback; if the feature's token is absent
|
|
53
|
-
* the operation fails with a message naming the exact variable to set and `holocron
|
|
53
|
+
* the operation fails with a message naming the exact variable to set and `holocron new token`.
|
|
54
54
|
*/
|
|
55
55
|
function createFeatureResolver(config) {
|
|
56
56
|
return Object.assign(createFeatureResolver$1({
|
|
57
57
|
...config,
|
|
58
58
|
vendor: config.vendor ?? "GitHub",
|
|
59
|
-
setCommand: (key) => `holocron
|
|
59
|
+
setCommand: (key) => `holocron new token ${key} <token>`,
|
|
60
60
|
keyring: keyring.get
|
|
61
61
|
}), { token: {
|
|
62
62
|
envName: config.envName,
|
|
@@ -256,7 +256,7 @@ async function planForRole(args) {
|
|
|
256
256
|
/**
|
|
257
257
|
* Makes each role's holders equal its team, one role after another. This is the sync itself, with no setup in
|
|
258
258
|
* front of it: the caller has already picked the providers, read the links and checked the layout. `holocron
|
|
259
|
-
*
|
|
259
|
+
* sync roles` and Sentinel's role sync are two callers of it. A step that fails is recorded and the
|
|
260
260
|
* run goes on; nothing here throws for a provider error. Idempotent: a role that already matches changes nothing.
|
|
261
261
|
* Lines go to `input.print` when it is given, and nowhere otherwise.
|
|
262
262
|
*/
|
|
@@ -426,7 +426,7 @@ function deriveCapabilities(providers) {
|
|
|
426
426
|
return Object.keys(providers ?? {}).sort();
|
|
427
427
|
}
|
|
428
428
|
/**
|
|
429
|
-
* `source` + `ci` are the minimal baseline every repo `holocron
|
|
429
|
+
* `source` + `ci` are the minimal baseline every repo `holocron setup`
|
|
430
430
|
* touches wires — every `holocron.config.ts` in this org already satisfies
|
|
431
431
|
* this, so `non-compliant` here means drift (a provider manually removed
|
|
432
432
|
* after setup), not an unmet aspirational policy. Deliberately not a richer
|
|
@@ -464,7 +464,7 @@ async function readWorkspacePackageJsons(repoRoot, workspacePackages) {
|
|
|
464
464
|
}
|
|
465
465
|
// src/commands/setup/labels.ts
|
|
466
466
|
/**
|
|
467
|
-
* The labels every repository gets from `
|
|
467
|
+
* The labels every repository gets from `setup`, with their GitHub colours (hex, no `#`) and descriptions. A
|
|
468
468
|
* plugin that makes labels of its own, such as Linear's setup, takes the colour of the one with the same name.
|
|
469
469
|
*/
|
|
470
470
|
const CANONICAL_LABELS = [
|
|
@@ -571,7 +571,7 @@ function stdoutKind(isTerminal, fd = 1, stat = fstatSync) {
|
|
|
571
571
|
}
|
|
572
572
|
// src/commands/secrets-sync/resolve-environment-id/resolve-environment-id.ts
|
|
573
573
|
/**
|
|
574
|
-
* The vault Environment `holocron secrets
|
|
574
|
+
* The vault Environment `holocron sync secrets <environmentId>` reads. A layer word (`local`, `dev`, `ci`, `prod`) is the
|
|
575
575
|
* Environment of that layer of this repository, `<org/repo> - <layer>`; any other text is a literal Environment name.
|
|
576
576
|
* A literal name wins only when it is not exactly a layer word, so an Environment that is itself called `prod` cannot be
|
|
577
577
|
* addressed by that name (spec `tech-environment-layers`, #2069).
|
|
@@ -587,9 +587,9 @@ async function resolveEnvironmentId(id, input) {
|
|
|
587
587
|
// src/private-dir/ignore-advice/ignore-advice.ts
|
|
588
588
|
/** The line that says how to fix a credentials path the version control ignore rules do not cover. */
|
|
589
589
|
function ignoreAdvice(isDefault, choose) {
|
|
590
|
-
return isDefault ? "the private directory's ignore rule is missing: run `holocron
|
|
590
|
+
return isDefault ? "the private directory's ignore rule is missing: run `holocron sync` to add it" : `add it to .gitignore, or ${choose}`;
|
|
591
591
|
}
|
|
592
|
-
/** The file `
|
|
592
|
+
/** The file `export tokens` and `new github-app` write by default, relative to the repository root. */
|
|
593
593
|
const PRIVATE_CREDENTIALS_FILE = `.holocron/.private/.credentials`;
|
|
594
594
|
// src/private-dir/resolve-credentials-file/resolve-credentials-file.ts
|
|
595
595
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as DnsRecord, $n as WikiProxyConfig, $t as NotificationsDelivery, A as Cardinality, An as Source, At as Issues, B as DeployFunctionConfig, Bn as SyncResult, Bt as MonitoringAlertSettings, C as BoardStatusCategory, Cn as ResolvedCapability, Ct as Issue, D as BoardView, Dn as SecretVisibility, Dt as IssueRecord, E as BoardTemplateFile, En as SecretScope, Et as IssuePriority, F as CiRunStatus, Fn as SourceSecurity, Ft as LogsDataset, G as DeploymentProject, Gn as TrackerDoctorReport, Gt as MonitoringCheckInput, H as DeployScriptConfig, Hn as TeamPermission, Ht as MonitoringAssertionComparison, I as ConnectionStringOptions, In as SourceTeamMember, It as Monitoring, J as DeploymentTarget, Jn as Tunnels, Jt as NormalizedAuthUser, K as DeploymentProjectSettings, Kn as TrackerUser, Kt as MonitoringHttpMethod, L as CreateAuthUserInput, Ln as StatusCategory, Lt as MonitoringAlertChannelInput, M as Ci, Mn as SourceFile, Mt as LifecycleResult, N as CiRun, Nn as SourceRepoInfo, Nt as LifecycleSlot, O as CapabilityImpls, On as Secrets, Ot as IssueSearchFilter, P as CiRunFilter, Pn as SourceRulesetDetail, Pt as Logs, Q as Dns, Qn as WikiProvisionOpts, Qt as NotificationsChannelLayout, R as Credentials, Rn as Storage, Rt as MonitoringAlertChannelResult, S as BoardStatus, Sn as RepoSettings, St as InspectRelayInput, T as BoardTemplate, Tn as SecretAccess, Tt as IssueOrder, U as DeployScriptResult, Un as Tooling, Ut as MonitoringAssertionSource, V as DeployFunctionResult, Vn as TeamEntry, Vt as MonitoringAssertion, W as Deployment, Wn as ToolingDoctorReport, Wt as MonitoringCheck, X as DiscussionPatch, Xn as WebhookDashboardInfo, Xt as NotificationsAccess, Y as DeploymentTrigger, Yn as Vault, Yt as Notifications, Z as DiscussionPost, Zn as Wiki, Zt as NotificationsApplicationLayout, _ as BoardFieldType, _n as Projects, _t as ExportInfo, a as REQUIRED_CAPABILITIES, an as NotificationsMonitoringFeed, at as EnsureRelayResult, b as BoardRule, bn as RelayState, bt as ImportOptions, c as AddedItem, cn as NotificationsPinnedLayout, ct as EnsureWebhookResult, d as AuthDescription, dn as NotificationsSignIn, dt as EnsuredTunnel, en as NotificationsEveryoneLayout, er as WorkerScriptState, et as DnsRecordRequest, f as AuthEvent, fn as NotificationsSignedIn, ft as Environment, g as BoardField, gn as ParseWebhookInput, gt as Errors, h as AuthUser, hn as PagesConfig, ht as Environments, i as ProviderApiError, in as NotificationsMember, it as EnsureRelayInput, j as CardinalityFor, jn as SourceBranch, jt as LabelDef, k as CapabilityKey, kn as ServerInspection, kt as IssueSelector, l as Analytics, ln as NotificationsPrsFeed, lt as EnsuredDiscussion, m as AuthIdentity, mn as OrganizationSecretScope, mt as EnvironmentReviewer, n as ElevationRequiredError, nn as NotificationsLayout, nt as DuplicateDiscussion, o as WebhookVerificationError, on as NotificationsOnboardingLayout, ot as EnsureReport, p as AuthEventType, pn as NotificationsWelcomeLayout, pt as EnvironmentEntry, q as DeploymentRecord, qn as TunnelRoute, qt as MoveReport, r as MissingTokenError, rn as NotificationsLinksLayout, rt as EnsureDiscussionInput, s as isMulti, sn as NotificationsPicture, st as EnsureResult, t as CARDINALITY, tn as NotificationsForumTag, tr as Workers, tt as DnsRecordType, u as Auth, un as NotificationsServerLayout, ut as EnsuredResource, v as BoardItem, vn as ProviderIdentity, vt as IdeaRecord, w as BoardSummary, wn as Ruleset, wt as IssueComment, x as BoardState, xn as RepoRef, xt as ImportResult, y as BoardItemInput, yn as PullRequest, yt as Ideas, z as CredentialsInspection, zn as StorageBranch, zt as MonitoringAlertChannelState } from "../index-
|
|
1
|
+
import { $ as DnsRecord, $n as WikiProxyConfig, $t as NotificationsDelivery, A as Cardinality, An as Source, At as Issues, B as DeployFunctionConfig, Bn as SyncResult, Bt as MonitoringAlertSettings, C as BoardStatusCategory, Cn as ResolvedCapability, Ct as Issue, D as BoardView, Dn as SecretVisibility, Dt as IssueRecord, E as BoardTemplateFile, En as SecretScope, Et as IssuePriority, F as CiRunStatus, Fn as SourceSecurity, Ft as LogsDataset, G as DeploymentProject, Gn as TrackerDoctorReport, Gt as MonitoringCheckInput, H as DeployScriptConfig, Hn as TeamPermission, Ht as MonitoringAssertionComparison, I as ConnectionStringOptions, In as SourceTeamMember, It as Monitoring, J as DeploymentTarget, Jn as Tunnels, Jt as NormalizedAuthUser, K as DeploymentProjectSettings, Kn as TrackerUser, Kt as MonitoringHttpMethod, L as CreateAuthUserInput, Ln as StatusCategory, Lt as MonitoringAlertChannelInput, M as Ci, Mn as SourceFile, Mt as LifecycleResult, N as CiRun, Nn as SourceRepoInfo, Nt as LifecycleSlot, O as CapabilityImpls, On as Secrets, Ot as IssueSearchFilter, P as CiRunFilter, Pn as SourceRulesetDetail, Pt as Logs, Q as Dns, Qn as WikiProvisionOpts, Qt as NotificationsChannelLayout, R as Credentials, Rn as Storage, Rt as MonitoringAlertChannelResult, S as BoardStatus, Sn as RepoSettings, St as InspectRelayInput, T as BoardTemplate, Tn as SecretAccess, Tt as IssueOrder, U as DeployScriptResult, Un as Tooling, Ut as MonitoringAssertionSource, V as DeployFunctionResult, Vn as TeamEntry, Vt as MonitoringAssertion, W as Deployment, Wn as ToolingDoctorReport, Wt as MonitoringCheck, X as DiscussionPatch, Xn as WebhookDashboardInfo, Xt as NotificationsAccess, Y as DeploymentTrigger, Yn as Vault, Yt as Notifications, Z as DiscussionPost, Zn as Wiki, Zt as NotificationsApplicationLayout, _ as BoardFieldType, _n as Projects, _t as ExportInfo, a as REQUIRED_CAPABILITIES, an as NotificationsMonitoringFeed, at as EnsureRelayResult, b as BoardRule, bn as RelayState, bt as ImportOptions, c as AddedItem, cn as NotificationsPinnedLayout, ct as EnsureWebhookResult, d as AuthDescription, dn as NotificationsSignIn, dt as EnsuredTunnel, en as NotificationsEveryoneLayout, er as WorkerScriptState, et as DnsRecordRequest, f as AuthEvent, fn as NotificationsSignedIn, ft as Environment, g as BoardField, gn as ParseWebhookInput, gt as Errors, h as AuthUser, hn as PagesConfig, ht as Environments, i as ProviderApiError, in as NotificationsMember, it as EnsureRelayInput, j as CardinalityFor, jn as SourceBranch, jt as LabelDef, k as CapabilityKey, kn as ServerInspection, kt as IssueSelector, l as Analytics, ln as NotificationsPrsFeed, lt as EnsuredDiscussion, m as AuthIdentity, mn as OrganizationSecretScope, mt as EnvironmentReviewer, n as ElevationRequiredError, nn as NotificationsLayout, nt as DuplicateDiscussion, o as WebhookVerificationError, on as NotificationsOnboardingLayout, ot as EnsureReport, p as AuthEventType, pn as NotificationsWelcomeLayout, pt as EnvironmentEntry, q as DeploymentRecord, qn as TunnelRoute, qt as MoveReport, r as MissingTokenError, rn as NotificationsLinksLayout, rt as EnsureDiscussionInput, s as isMulti, sn as NotificationsPicture, st as EnsureResult, t as CARDINALITY, tn as NotificationsForumTag, tr as Workers, tt as DnsRecordType, u as Auth, un as NotificationsServerLayout, ut as EnsuredResource, v as BoardItem, vn as ProviderIdentity, vt as IdeaRecord, w as BoardSummary, wn as Ruleset, wt as IssueComment, x as BoardState, xn as RepoRef, xt as ImportResult, y as BoardItemInput, yn as PullRequest, yt as Ideas, z as CredentialsInspection, zn as StorageBranch, zt as MonitoringAlertChannelState } from "../index-CBiPFCUp.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, EnvironmentEntry, 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, OrganizationSecretScope, PagesConfig, ParseWebhookInput, Projects, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RelayState, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretAccess, SecretScope, SecretVisibility, 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 { mr as compose, vr as Capability, yr as ComposedPreset } from "./index-
|
|
1
|
+
import { mr as compose, vr as Capability, yr as ComposedPreset } from "./index-CBiPFCUp.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