@theholocron/cli 5.0.0-alpha.209 → 5.0.0-alpha.210

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/index.d.mts CHANGED
@@ -175,6 +175,24 @@ interface RepoProperties {
175
175
  runtime_environment?: "node" | "browser" | "universal" | "none";
176
176
  uses_external_packages?: boolean;
177
177
  }
178
+ /**
179
+ * GitHub Actions variables, declared so a workflow that reads `vars.NAME` finds it. Values are plain text, so
180
+ * never put a secret here; secrets go through the `secrets` capability.
181
+ */
182
+ interface RepoVariables {
183
+ /** Repository-level variables. */
184
+ repo?: Record<string, string>;
185
+ /**
186
+ * Organization-level variables. A bare string is visible to every repository; `visibility: "private"` limits it
187
+ * to private ones. Declare these in one repo only (the one that owns the org's configuration).
188
+ */
189
+ org?: Record<string, string | {
190
+ value: string;
191
+ visibility?: "all" | "private";
192
+ }>;
193
+ /** Delete variables that exist but are not declared here. Off by default: they are left alone. */
194
+ prune?: boolean;
195
+ }
178
196
  interface RepoConfig {
179
197
  /** "owner/name" — the GitHub repository coordinate. Derived from the git remote when absent. */
180
198
  name?: string;
@@ -211,6 +229,8 @@ interface RepoConfig {
211
229
  topics?: string[];
212
230
  /** GitHub custom properties synced to the org dashboard. */
213
231
  properties?: RepoProperties;
232
+ /** GitHub Actions variables reconciled by `holocron repo setup`. */
233
+ variables?: RepoVariables;
214
234
  }
215
235
  interface AppConfig {
216
236
  name: string;
@@ -789,4 +809,4 @@ declare function missingCapabilities(capabilities: readonly string[]): string[];
789
809
  */
790
810
  declare function readWorkspacePackageJsons(repoRoot: string, workspacePackages: readonly WorkspacePackage[]): Promise<PackageJsonLike[]>;
791
811
  //#endregion
792
- 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, EnsureResult, EnsureWebhookResult, EnsuredResource, type EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, type EslintConfig, type FeatureResolverConfig, type HolocronConfig, type HolocronProfile, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, type LoadedConfig, type LogConfig, Logs, Monitoring, 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, ProviderApiError, ProviderIdentity, type ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, RepoSettings, 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, SourceFile, SourceTeamMember, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, Workers, type WorkflowWithConfig, compose, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, getToken, isMulti, listStoredProviders, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
812
+ 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, EnsureResult, EnsureWebhookResult, EnsuredResource, type EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, type EslintConfig, type FeatureResolverConfig, type HolocronConfig, type HolocronProfile, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, type LoadedConfig, type LogConfig, Logs, Monitoring, 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, ProviderApiError, ProviderIdentity, type ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, type RawProviderEntry, type RawProvidersConfig, type RepoConfig, type RepoProperties, type RepoProtection, RepoRef, 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, SourceFile, SourceTeamMember, StatusCategory, Storage, StorageBranch, type StorybookDeployProject, type TaskEntry, type TaskEntryConfig, TeamEntry, TeamPermission, type TelemetryConfig, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, Workers, type WorkflowWithConfig, compose, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, getToken, isMulti, listStoredProviders, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
package/dist/index.mjs CHANGED
@@ -381,7 +381,7 @@ function compose(...args) {
381
381
  let repo = {};
382
382
  for (const cap of caps) {
383
383
  if (!cap.repo) continue;
384
- const { properties, topics, teams, ...scalars } = cap.repo;
384
+ const { properties, topics, teams, variables, ...scalars } = cap.repo;
385
385
  repo = {
386
386
  ...repo,
387
387
  ...scalars
@@ -390,6 +390,18 @@ function compose(...args) {
390
390
  ...repo.properties,
391
391
  ...properties
392
392
  };
393
+ if (variables) repo.variables = {
394
+ ...repo.variables,
395
+ ...variables,
396
+ ...repo.variables?.repo || variables.repo ? { repo: {
397
+ ...repo.variables?.repo,
398
+ ...variables.repo
399
+ } } : {},
400
+ ...repo.variables?.org || variables.org ? { org: {
401
+ ...repo.variables?.org,
402
+ ...variables.org
403
+ } } : {}
404
+ };
393
405
  if (topics) {
394
406
  const merged = /* @__PURE__ */ new Set([...repo.topics ?? [], ...topics]);
395
407
  repo.topics = [...merged];
@@ -134,6 +134,27 @@ interface Source extends ProviderIdentity {
134
134
  * Optional — providers that don't support topics omit this.
135
135
  */
136
136
  syncTopics?(topics: string[]): Promise<string>;
137
+ /**
138
+ * Bring the repository's Actions variables in line with the declared ones: create what is missing, update what
139
+ * differs, leave the rest. With `prune`, also delete the ones the declaration does not name. With `dryRun`, read the current
140
+ * state and report what would change without writing. Returns a summary.
141
+ * Optional — providers without Actions variables omit this.
142
+ */
143
+ syncVariables?(variables: Record<string, string>, opts?: {
144
+ prune?: boolean;
145
+ dryRun?: boolean;
146
+ }): Promise<string>;
147
+ /**
148
+ * The same for the organization's variables, each with the repositories that can read it (`all` or `private`).
149
+ * Optional — providers without organization variables omit this.
150
+ */
151
+ syncOrgVariables?(org: string, variables: Record<string, {
152
+ value: string;
153
+ visibility: "all" | "private";
154
+ }>, opts?: {
155
+ prune?: boolean;
156
+ dryRun?: boolean;
157
+ }): Promise<string>;
137
158
  /**
138
159
  * Sync GitHub team repository access. String shorthand defaults to `push`.
139
160
  * Optional — providers without a team concept omit this.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "5.0.0-alpha.209",
3
+ "version": "5.0.0-alpha.210",
4
4
  "description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "keywords": [
6
6
  "cli",
@@ -49,7 +49,7 @@
49
49
  "@theholocron/env-utils": "^1.16.0",
50
50
  "@theholocron/fs-utils": "^1.16.0",
51
51
  "@theholocron/git-utils": "^1.16.0",
52
- "@theholocron/github-client": "^1.47.1",
52
+ "@theholocron/github-client": "^1.51.0",
53
53
  "@theholocron/http-client": "^1.43.1",
54
54
  "@theholocron/json-utils": "^1.16.0",
55
55
  "@theholocron/misc-utils": "^1.16.0",
@@ -63,8 +63,8 @@
63
63
  "pino-pretty": "^13.1.3",
64
64
  "posthog-node": "^5.51.6",
65
65
  "yargs": "^18.1.0",
66
- "@theholocron/astromech": "5.0.0-alpha.209",
67
- "@theholocron/datapad": "5.0.0-alpha.209"
66
+ "@theholocron/astromech": "5.0.0-alpha.210",
67
+ "@theholocron/datapad": "5.0.0-alpha.210"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@theholocron/eslint-config": "^8.8.2",