@theholocron/cli 5.0.0-alpha.271 → 5.0.0-alpha.272

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.
@@ -112,6 +112,25 @@ function taskName(e) {
112
112
  return typeof e === "string" ? e : e.name;
113
113
  }
114
114
  /**
115
+ * Merge two lists of `repo.secrets.sync` entries. An entry is the same sync when its environment and scope match;
116
+ * the keys then add up, and an entry that names no keys (every key the vault holds) stays that way.
117
+ */
118
+ function mergeSync(a, b) {
119
+ const merged = /* @__PURE__ */ new Map();
120
+ for (const entry of [...a ?? [], ...b ?? []]) {
121
+ const id = `${entry.environment}\0${entry.scope ?? "repo"}`;
122
+ const have = merged.get(id);
123
+ merged.set(id, have ? {
124
+ ...have,
125
+ ...have.keys && entry.keys ? { keys: [.../* @__PURE__ */ new Set([...have.keys, ...entry.keys])] } : { keys: void 0 }
126
+ } : { ...entry });
127
+ }
128
+ return [...merged.values()].map(({ keys, ...rest }) => keys ? {
129
+ ...rest,
130
+ keys
131
+ } : rest);
132
+ }
133
+ /**
115
134
  * Merge any number of capability fragments into a single preset object that
116
135
  * spreads directly into `defineConfig()`.
117
136
  *
@@ -185,7 +204,8 @@ function compose(...args) {
185
204
  repo.secrets = {
186
205
  ...repo.secrets?.repo || secrets.repo ? { repo: union(repo.secrets?.repo, secrets.repo) } : {},
187
206
  ...repo.secrets?.org || secrets.org ? { org: union(repo.secrets?.org, secrets.org) } : {},
188
- ...Object.keys(environments).length > 0 ? { environments } : {}
207
+ ...Object.keys(environments).length > 0 ? { environments } : {},
208
+ ...repo.secrets?.sync || secrets.sync ? { sync: mergeSync(repo.secrets?.sync, secrets.sync) } : {}
189
209
  };
190
210
  }
191
211
  if (topics) {
@@ -122,6 +122,23 @@ interface RepoSecrets {
122
122
  org?: string[];
123
123
  /** Environment secrets, by environment name. */
124
124
  environments?: Record<string, string[]>;
125
+ /**
126
+ * The vault environments `holocron secrets sync` fills secrets from. `holocron doctor secrets` expects the
127
+ * keys each one holds (or lists) at its scope. Names only; the doctor never reads or prints a value.
128
+ */
129
+ sync?: RepoSecretsSync[];
130
+ }
131
+ /** One vault environment that `holocron secrets sync` pushes into GitHub secrets, declared so the doctor can check them. */
132
+ interface RepoSecretsSync {
133
+ /** The vault environment id, as given to `holocron secrets sync <environmentId>`. */
134
+ environment: string;
135
+ /**
136
+ * The vault keys pushed to GitHub (the `--github-secret` allowlist). Omit it for every key the vault
137
+ * environment holds, which the doctor then asks the `vault` provider to list.
138
+ */
139
+ keys?: string[];
140
+ /** Where the secrets land, as `--github-secret-scope` words it: `"repo"` (the default), `"env=<name>"` or `"org=<name>"`. */
141
+ scope?: string;
125
142
  }
126
143
  interface RepoConfig {
127
144
  /** "owner/name" — the GitHub repository coordinate. Derived from the git remote when absent. */
@@ -641,4 +658,4 @@ interface ComposedPreset {
641
658
  * const preset = compose(node(), nextjs());
642
659
  */
643
660
  declare function compose(...args: (Capability | Capability[])[]): ComposedPreset;
644
- export { ResolvedTuple as A, RepoProperties as C, ResolvedHolocronConfig as D, RepoVariables as E, WorkflowWithConfig as F, StorybookDeployProject as M, TaskEntryConfig as N, ResolvedProviderEntry as O, TelemetryConfig as P, RepoConfig as S, RepoSecrets as T, LogConfig as _, ConfigError as a, RawProviderEntry as b, resolvePluginPackage as c, ChromaticProjectConfig as d, DocsConfig as f, HolocronConfig as g, EslintConfig as h, TaskEntry as i, SingleEntry as j, ResolvedProvidersConfig as k, AppConfig as l, EnvConfig as m, Capability as n, resolveConfig as o, DoctorConfig as p, ComposedPreset as r, resolveEntry as s, compose as t, CapabilityConfigPackage as u, MultiEntry as v, RepoProtection as w, RawProvidersConfig as x, ProviderOptions as y };
661
+ export { ResolvedProvidersConfig as A, RepoProperties as C, RepoVariables as D, RepoSecretsSync as E, TelemetryConfig as F, WorkflowWithConfig as I, SingleEntry as M, StorybookDeployProject as N, ResolvedHolocronConfig as O, TaskEntryConfig as P, RepoConfig as S, RepoSecrets as T, LogConfig as _, ConfigError as a, RawProviderEntry as b, resolvePluginPackage as c, ChromaticProjectConfig as d, DocsConfig as f, HolocronConfig as g, EslintConfig as h, TaskEntry as i, ResolvedTuple as j, ResolvedProviderEntry as k, AppConfig as l, EnvConfig as m, Capability as n, resolveConfig as o, DoctorConfig as p, ComposedPreset as r, resolveEntry as s, compose as t, CapabilityConfigPackage as u, MultiEntry as v, RepoProtection as w, RawProvidersConfig as x, ProviderOptions as y };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { $ as LifecycleSlot, $t as WikiProvisionOpts, A as DeploymentProject, At as RepoRef, B as EnsureRelayResult, Bt as SourceTeamMember, C as ConnectionStringOptions, Ct as NotificationsSignIn, D as DeployScriptConfig, Dt as ParseWebhookInput, E as DeployFunctionResult, Et as PagesConfig, F as Dns, Ft as Secrets, G as EnvironmentReviewer, Gt as TeamPermission, H as EnsureWebhookResult, Ht as Storage, I as DnsRecord, It as ServerInspection, J as Issue, Jt as TrackerDoctorReport, K as Environments, Kt as Tooling, L as DnsRecordRequest, Lt as Source, M as DeploymentRecord, Mt as ResolvedCapability, N as DeploymentTarget, Nt as Ruleset, O as DeployScriptResult, Ot as ProviderIdentity, P as DeploymentTrigger, Pt as SecretScope, Q as LifecycleResult, Qt as Wiki, R as DnsRecordType, Rt as SourceBranch, S as CiRunStatus, St as NotificationsServerLayout, T as DeployFunctionConfig, Tt as NotificationsWelcomeLayout, U as EnsuredResource, Ut as StorageBranch, V as EnsureResult, Vt as StatusCategory, W as Environment, Wt as TeamEntry, X as Issues, Xt as Vault, Y as IssueSearchFilter, Yt as TrackerUser, Z as LabelDef, Zt as WebhookDashboardInfo, _ as Cardinality, _t as NotificationsLayout, a as REQUIRED_CAPABILITIES, at as MonitoringAssertionComparison, b as CiRun, bt as NotificationsOnboardingLayout, c as Analytics, ct as MonitoringCheckInput, d as AuthEvent, dt as Notifications, en as WikiProxyConfig, et as Logs, f as AuthEventType, ft as NotificationsAccess, g as CapabilityKey, gt as NotificationsEveryoneLayout, h as CapabilityImpls, ht as NotificationsDelivery, i as ProviderApiError, it as MonitoringAssertion, j as DeploymentProjectSettings, jt as RepoSettings, k as Deployment, kt as PullRequest, l as Auth, lt as MonitoringHttpMethod, m as AuthUser, mt as NotificationsChannelLayout, n as ElevationRequiredError, nt as MonitoringAlertChannelInput, o as WebhookVerificationError, ot as MonitoringAssertionSource, p as AuthIdentity, pt as NotificationsApplicationLayout, q as Errors, qt as ToolingDoctorReport, r as MissingTokenError, rt as MonitoringAlertChannelResult, s as isMulti, st as MonitoringCheck, t as CARDINALITY, tn as Workers, tt as Monitoring, u as AuthDescription, ut as NormalizedAuthUser, v as CardinalityFor, vt as NotificationsLinksLayout, w as CreateAuthUserInput, wt as NotificationsSignedIn, x as CiRunFilter, xt as NotificationsPinnedLayout, y as Ci, yt as NotificationsMember, z as EnsureRelayInput, zt as SourceFile } from "./index-CwxYoWzS.mjs";
2
- import { A as ResolvedTuple, C as RepoProperties, D as ResolvedHolocronConfig, E as RepoVariables, F as WorkflowWithConfig, M as StorybookDeployProject, N as TaskEntryConfig, O as ResolvedProviderEntry, P as TelemetryConfig, S as RepoConfig, T as RepoSecrets, _ as LogConfig, a as ConfigError, b as RawProviderEntry, c as resolvePluginPackage, d as ChromaticProjectConfig, f as DocsConfig, g as HolocronConfig, h as EslintConfig, i as TaskEntry, j as SingleEntry, k as ResolvedProvidersConfig, l as AppConfig, m as EnvConfig, n as Capability, o as resolveConfig, p as DoctorConfig, r as ComposedPreset, s as resolveEntry, t as compose, u as CapabilityConfigPackage, v as MultiEntry, w as RepoProtection, x as RawProvidersConfig, y as ProviderOptions } from "./index-CL7nYbMl.mjs";
2
+ import { A as ResolvedProvidersConfig, C as RepoProperties, D as RepoVariables, E as RepoSecretsSync, F as TelemetryConfig, I as WorkflowWithConfig, M as SingleEntry, N as StorybookDeployProject, O as ResolvedHolocronConfig, P as TaskEntryConfig, S as RepoConfig, T as RepoSecrets, _ as LogConfig, a as ConfigError, b as RawProviderEntry, c as resolvePluginPackage, d as ChromaticProjectConfig, f as DocsConfig, g as HolocronConfig, h as EslintConfig, i as TaskEntry, j as ResolvedTuple, k as ResolvedProviderEntry, l as AppConfig, m as EnvConfig, n as Capability, o as resolveConfig, p as DoctorConfig, r as ComposedPreset, s as resolveEntry, t as compose, u as CapabilityConfigPackage, v as MultiEntry, w as RepoProtection, x as RawProvidersConfig, y as ProviderOptions } from "./index-DSzAZQdK.mjs";
3
3
  import { AuthError, RequestOptions, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, ResolveTokenInput as ResolveTokenInput$1, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
4
4
  import { PackageJson } from "@theholocron/pkg-utils";
5
5
  import { ConfigFileError } from "@theholocron/datapad";
@@ -248,4 +248,4 @@ export declare function describeNetworkError(err: unknown, timeoutMs: number): s
248
248
  * earlier one failed is reported as not tried rather than failing a second time for the same reason.
249
249
  */
250
250
  export declare function connectionProbe(input: ConnectionProbeInput): Probe;
251
- export { Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, type Capability, type CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, type ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, type ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, type DeriveProfileInput, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, type DocsConfig, type DoctorConfig, ElevationRequiredError, EnsureRelayInput, EnsureRelayResult, EnsureResult, EnsureWebhookResult, EnsuredResource, type EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, type EslintConfig, type FeatureResolver, type FeatureResolverConfig, type HolocronConfig, type HolocronProfile, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, type LoadedConfig, type LogConfig, Logs, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, type MultiEntry, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsOnboardingLayout, NotificationsPinnedLayout, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type PackageJsonLike, PagesConfig, ParseWebhookInput, type PluginProbes, type PluginToken, type Probe, type ProbeContext, type ProbeRow, ProviderApiError, ProviderIdentity, type ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, type RepoSecrets, RepoSettings, type RepoVariables, type RequestOptions, type ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, type ResolvedHolocronConfig, type ResolvedProviderEntry, type ResolvedProvidersConfig, type ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, ServerInspection, type SingleEntry, Source, SourceBranch, SourceFile, SourceTeamMember, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, type TokenResolver, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, Workers, type WorkflowWithConfig, compose, createRestClient, isMulti, resolveConfig, resolveEntry, resolvePluginPackage };
251
+ export { Analytics, type AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, type Capability, type CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, type ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, type ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, type DeriveProfileInput, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, type DocsConfig, type DoctorConfig, ElevationRequiredError, EnsureRelayInput, EnsureRelayResult, EnsureResult, EnsureWebhookResult, EnsuredResource, type EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, type EslintConfig, type FeatureResolver, type FeatureResolverConfig, type HolocronConfig, type HolocronProfile, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, type LoadedConfig, type LogConfig, Logs, MissingTokenError, Monitoring, MonitoringAlertChannelInput, MonitoringAlertChannelResult, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, type MultiEntry, NormalizedAuthUser, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsLayout, NotificationsLinksLayout, NotificationsMember, NotificationsOnboardingLayout, NotificationsPinnedLayout, NotificationsServerLayout, NotificationsSignIn, NotificationsSignedIn, NotificationsWelcomeLayout, type PackageJsonLike, PagesConfig, ParseWebhookInput, type PluginProbes, type PluginToken, type Probe, type ProbeContext, type ProbeRow, ProviderApiError, ProviderIdentity, type ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, type RepoSecrets, type RepoSecretsSync, RepoSettings, type RepoVariables, type RequestOptions, type ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, type ResolvedHolocronConfig, type ResolvedProviderEntry, type ResolvedProvidersConfig, type ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, ServerInspection, type SingleEntry, Source, SourceBranch, SourceFile, SourceTeamMember, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, type TokenResolver, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, Workers, type WorkflowWithConfig, compose, createRestClient, isMulti, resolveConfig, resolveEntry, resolvePluginPackage };
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 resolvePluginPackage, i as resolveEntry, n as ConfigError, r as resolveConfig, t as compose } from "./compose-CDyegVKe.mjs";
2
+ import { a as resolvePluginPackage, i as resolveEntry, n as ConfigError, r as resolveConfig, t as compose } from "./compose-8k8KP396.mjs";
3
3
  import { AuthError, createResolveToken as createResolveToken$1, createRestClient } from "@theholocron/http-client";
4
4
  import { createEnvLookup, withEnvPrefix } from "@theholocron/env-utils";
5
5
  import { Entry, findCredentials } from "@napi-rs/keyring";
@@ -1,4 +1,4 @@
1
- import { n as Capability, r as ComposedPreset, t as compose } from "./index-CL7nYbMl.mjs";
1
+ import { n as Capability, r as ComposedPreset, t as compose } from "./index-DSzAZQdK.mjs";
2
2
  interface AuditOptions {
3
3
  /** Enable Knip unused-export analysis (default: false). */
4
4
  knip?: boolean;
package/dist/presets.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as compose } from "./compose-CDyegVKe.mjs";
1
+ import { t as compose } from "./compose-8k8KP396.mjs";
2
2
  // src/presets/capabilities/audit.ts
3
3
  /**
4
4
  * Adds BundleWatch + optional Knip and Lighthouse auditing. Marked `required` —
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "5.0.0-alpha.271",
3
+ "version": "5.0.0-alpha.272",
4
4
  "description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "keywords": [
6
6
  "cli",
@@ -52,17 +52,17 @@
52
52
  "pino-pretty": "^13.1.3",
53
53
  "posthog-node": "^5.57.2",
54
54
  "yargs": "^18.1.0",
55
- "@theholocron/astromech": "5.0.0-alpha.271",
56
- "@theholocron/datapad": "5.0.0-alpha.271",
57
- "@theholocron/git-utils": "^1.16.1-alpha.1",
58
- "@theholocron/http-client": "^1.58.0-alpha.2",
55
+ "@theholocron/astromech": "5.0.0-alpha.272",
56
+ "@theholocron/datapad": "5.0.0-alpha.272",
57
+ "@theholocron/env-utils": "^1.16.1-alpha.1",
59
58
  "@theholocron/fs-utils": "^1.16.1-alpha.1",
60
59
  "@theholocron/github-client": "^1.58.0-alpha.2",
61
- "@theholocron/json-utils": "^1.16.1-alpha.1",
62
- "@theholocron/pkg-utils": "^1.16.1-alpha.1",
60
+ "@theholocron/http-client": "^1.58.0-alpha.2",
63
61
  "@theholocron/misc-utils": "^1.16.1-alpha.1",
62
+ "@theholocron/json-utils": "^1.16.1-alpha.1",
63
+ "@theholocron/git-utils": "^1.16.1-alpha.1",
64
64
  "@theholocron/observability": "^0.6.1-alpha.1",
65
- "@theholocron/env-utils": "^1.16.1-alpha.1"
65
+ "@theholocron/pkg-utils": "^1.16.1-alpha.1"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/node": "^26",