@theholocron/cli 5.0.0-alpha.267 → 5.0.0-alpha.269

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.
@@ -347,7 +347,7 @@ interface HolocronConfig {
347
347
  * "verification.unitTests" | "verification.visualRegression" | "verification.typeSafety" | "verification.performance" |
348
348
  * "sourceQuality.staticAnalysis" | "sourceQuality.formatting" |
349
349
  * "sourceQuality.structuredDataValidation" | "sourceQuality.deadCodeAnalysis" |
350
- * "security.secretDetection" | "security.codeScanning" |
350
+ * "security.secretDetection" | "security.codeScanning" | "security.tokenExpiry" |
351
351
  * "delivery.build" | "delivery.publish" | "delivery.deploy" | "delivery.bundleSize" |
352
352
  * "platform.repoSync" | "platform.notifyCheck" | "platform.commitStandards" | "platform.repoValidation" |
353
353
  * "knowledge.wiki" | "knowledge.docs" | "knowledge.components" |
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
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-DbuSPIGf.mjs";
3
- import { AuthError, RequestOptions, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
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";
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";
6
6
  import "@theholocron/observability/core";
@@ -14,6 +14,14 @@ interface FeatureResolverConfig {
14
14
  /** The vendor named in the "no token" message. Default `GitHub`. */
15
15
  vendor?: string;
16
16
  }
17
+ /** A resolver from `createFeatureResolver`: call it for the token, or read `token` to see where it looks. */
18
+ type FeatureResolver = ((input?: ResolveTokenInput$1) => string) & {
19
+ /** The environment variable and keyring entry this resolver reads, for `holocron doctor tokens`. */
20
+ readonly token: {
21
+ envName: string;
22
+ keyringKey: string;
23
+ };
24
+ };
17
25
  /** Wraps `createResolveToken` from `@theholocron/http` and injects the
18
26
  * system keyring so plugins stay at a one-liner call site. */
19
27
  export declare function createResolveToken(config: ResolveTokenConfig): (input?: ResolveTokenInput) => string;
@@ -24,7 +32,7 @@ export declare function createResolveToken(config: ResolveTokenConfig): (input?:
24
32
  * No broad-token fallback — if the feature-specific token is absent the
25
33
  * operation fails with a message naming the exact env var to set.
26
34
  */
27
- export declare function createFeatureResolver(config: FeatureResolverConfig): (input?: ResolveTokenInput) => string;
35
+ export declare function createFeatureResolver(config: FeatureResolverConfig): FeatureResolver;
28
36
  /**
29
37
  * Keyring-backed bootstrap credential store.
30
38
  *
@@ -71,6 +79,8 @@ interface VerifyTokenSuccess {
71
79
  ok: true;
72
80
  /** "workplace: acme" / "user: cnewton@x" — surfaced in success output. */
73
81
  subject: string;
82
+ /** When the token stops working, ISO 8601 in UTC, for a provider that reports it. Absent when unknown or never. */
83
+ expiresAt?: string;
74
84
  }
75
85
  interface VerifyTokenFailure {
76
86
  ok: false;
@@ -78,6 +88,13 @@ interface VerifyTokenFailure {
78
88
  message: string;
79
89
  }
80
90
  type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
91
+ /** One token a plugin takes, and where it is looked up. */
92
+ interface PluginToken {
93
+ /** The environment variable, e.g. `HOLOCRON_ADMIN_TOKEN`. */
94
+ envName: string;
95
+ /** The OS keyring entry, e.g. `github.admin`. */
96
+ keyringKey: string;
97
+ }
81
98
  export declare function defineConfig(config: HolocronConfig): HolocronConfig;
82
99
  interface LoadedConfig {
83
100
  resolved: ResolvedHolocronConfig;
@@ -222,4 +239,4 @@ export declare function describeNetworkError(err: unknown, timeoutMs: number): s
222
239
  * earlier one failed is reported as not tried rather than failing a second time for the same reason.
223
240
  */
224
241
  export declare function connectionProbe(input: ConnectionProbeInput): Probe;
225
- 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 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 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, 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 };
242
+ 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, 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
@@ -106,13 +106,17 @@ function createResolveToken(config) {
106
106
  * operation fails with a message naming the exact env var to set.
107
107
  */
108
108
  function createFeatureResolver(config) {
109
- return function resolveFeatureToken(input = {}) {
109
+ const resolveFeatureToken = (input = {}) => {
110
110
  const env = makeEnv(input.env);
111
111
  const keyring = input.keyring ?? getToken;
112
112
  const token = input.cliToken || env.get(config.envName) || keyring(config.keyringKey);
113
113
  if (!token) throw new AuthError(`no ${config.vendor ?? "GitHub"} token found for this operation. Pass --token <token>, set ${config.envName}, or run: holocron auth set ${config.keyringKey} <token>`);
114
114
  return token;
115
115
  };
116
+ return Object.assign(resolveFeatureToken, { token: {
117
+ envName: config.envName,
118
+ keyringKey: config.keyringKey
119
+ } });
116
120
  }
117
121
  // src/commands/setup/derived-properties/derived-properties.ts
118
122
  /**
@@ -1,4 +1,4 @@
1
- import { n as Capability, r as ComposedPreset, t as compose } from "./index-DbuSPIGf.mjs";
1
+ import { n as Capability, r as ComposedPreset, t as compose } from "./index-CL7nYbMl.mjs";
2
2
  interface AuditOptions {
3
3
  /** Enable Knip unused-export analysis (default: false). */
4
4
  knip?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "5.0.0-alpha.267",
3
+ "version": "5.0.0-alpha.269",
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.269",
56
+ "@theholocron/datapad": "5.0.0-alpha.269",
55
57
  "@theholocron/env-utils": "^1.16.1-alpha.1",
56
58
  "@theholocron/git-utils": "^1.16.1-alpha.1",
57
59
  "@theholocron/fs-utils": "^1.16.1-alpha.1",
58
- "@theholocron/datapad": "5.0.0-alpha.267",
59
- "@theholocron/http-client": "^1.58.0-alpha.1",
60
- "@theholocron/github-client": "^1.58.0-alpha.1",
60
+ "@theholocron/github-client": "^1.58.0-alpha.2",
61
+ "@theholocron/http-client": "^1.58.0-alpha.2",
61
62
  "@theholocron/json-utils": "^1.16.1-alpha.1",
62
63
  "@theholocron/misc-utils": "^1.16.1-alpha.1",
63
- "@theholocron/observability": "^0.6.1-alpha.1",
64
64
  "@theholocron/pkg-utils": "^1.16.1-alpha.1",
65
- "@theholocron/astromech": "5.0.0-alpha.267"
65
+ "@theholocron/observability": "^0.6.1-alpha.1"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/node": "^26",
@@ -77,9 +77,9 @@
77
77
  "typescript": "^5.9.3",
78
78
  "vitest": "^5.0.5",
79
79
  "@theholocron/eslint-config": "^8.9.0-alpha.3",
80
- "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.3",
80
+ "@theholocron/vitest-config": "^8.9.0-alpha.3",
81
81
  "@theholocron/tsconfig": "^8.9.0-alpha.3",
82
- "@theholocron/vitest-config": "^8.9.0-alpha.3"
82
+ "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.3"
83
83
  },
84
84
  "engines": {
85
85
  "node": ">=22.0.0"