@theholocron/cli 5.0.0-alpha.267 → 5.0.0-alpha.268
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 +14 -13
- package/dist/cli.mjs +118 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +18 -3
- package/dist/index.mjs +5 -1
- package/package.json +7 -7
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
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";
|
|
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):
|
|
35
|
+
export declare function createFeatureResolver(config: FeatureResolverConfig): FeatureResolver;
|
|
28
36
|
/**
|
|
29
37
|
* Keyring-backed bootstrap credential store.
|
|
30
38
|
*
|
|
@@ -78,6 +86,13 @@ interface VerifyTokenFailure {
|
|
|
78
86
|
message: string;
|
|
79
87
|
}
|
|
80
88
|
type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
|
|
89
|
+
/** One token a plugin takes, and where it is looked up. */
|
|
90
|
+
interface PluginToken {
|
|
91
|
+
/** The environment variable, e.g. `HOLOCRON_ADMIN_TOKEN`. */
|
|
92
|
+
envName: string;
|
|
93
|
+
/** The OS keyring entry, e.g. `github.admin`. */
|
|
94
|
+
keyringKey: string;
|
|
95
|
+
}
|
|
81
96
|
export declare function defineConfig(config: HolocronConfig): HolocronConfig;
|
|
82
97
|
interface LoadedConfig {
|
|
83
98
|
resolved: ResolvedHolocronConfig;
|
|
@@ -222,4 +237,4 @@ export declare function describeNetworkError(err: unknown, timeoutMs: number): s
|
|
|
222
237
|
* earlier one failed is reported as not tried rather than failing a second time for the same reason.
|
|
223
238
|
*/
|
|
224
239
|
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 };
|
|
240
|
+
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
|
-
|
|
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
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/cli",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.268",
|
|
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.268",
|
|
56
|
+
"@theholocron/datapad": "5.0.0-alpha.268",
|
|
55
57
|
"@theholocron/env-utils": "^1.16.1-alpha.1",
|
|
56
|
-
"@theholocron/git-utils": "^1.16.1-alpha.1",
|
|
57
58
|
"@theholocron/fs-utils": "^1.16.1-alpha.1",
|
|
58
|
-
"@theholocron/
|
|
59
|
-
"@theholocron/http-client": "^1.58.0-alpha.1",
|
|
59
|
+
"@theholocron/git-utils": "^1.16.1-alpha.1",
|
|
60
60
|
"@theholocron/github-client": "^1.58.0-alpha.1",
|
|
61
|
-
"@theholocron/
|
|
61
|
+
"@theholocron/http-client": "^1.58.0-alpha.1",
|
|
62
62
|
"@theholocron/misc-utils": "^1.16.1-alpha.1",
|
|
63
|
-
"@theholocron/
|
|
63
|
+
"@theholocron/json-utils": "^1.16.1-alpha.1",
|
|
64
64
|
"@theholocron/pkg-utils": "^1.16.1-alpha.1",
|
|
65
|
-
"@theholocron/
|
|
65
|
+
"@theholocron/observability": "^0.6.1-alpha.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/node": "^26",
|