@theholocron/cli 5.0.0-alpha.270 → 5.0.0-alpha.271
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 -27
- package/dist/cli.mjs +8 -7
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +35 -26
- package/dist/index.mjs +6 -2
- package/package.json +11 -11
package/dist/index.d.mts
CHANGED
|
@@ -5,6 +5,33 @@ import { PackageJson } from "@theholocron/pkg-utils";
|
|
|
5
5
|
import { ConfigFileError } from "@theholocron/datapad";
|
|
6
6
|
import "@theholocron/observability/core";
|
|
7
7
|
import { WorkspacePackage } from "@theholocron/astromech";
|
|
8
|
+
interface VerifyTokenSuccess {
|
|
9
|
+
ok: true;
|
|
10
|
+
/** "workplace: acme" / "user: cnewton@x" — surfaced in success output. */
|
|
11
|
+
subject: string;
|
|
12
|
+
/** When the token stops working, ISO 8601 in UTC, for a provider that reports it. Absent when unknown or never. */
|
|
13
|
+
expiresAt?: string;
|
|
14
|
+
}
|
|
15
|
+
interface VerifyTokenFailure {
|
|
16
|
+
ok: false;
|
|
17
|
+
/** Reason the token was rejected. Surfaces to the operator. */
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
|
|
21
|
+
/** One token a plugin takes, and where it is looked up. */
|
|
22
|
+
interface PluginToken {
|
|
23
|
+
/** The plugin's own environment variable, e.g. `HOLOCRON_ADMIN_TOKEN`. */
|
|
24
|
+
envName: string;
|
|
25
|
+
/** The vendor's own environment variable, e.g. `CLOUDFLARE_API_TOKEN`; read after `envName` and before the keyring. */
|
|
26
|
+
vendorEnvName?: string;
|
|
27
|
+
/** The OS keyring entry, e.g. `github.admin`. */
|
|
28
|
+
keyringKey: string;
|
|
29
|
+
/**
|
|
30
|
+
* `false` when the plugin's `verifyToken` does not apply to this token (it checks a different credential, such as
|
|
31
|
+
* a webhook URL), so `holocron doctor tokens` reports it as set without calling the plugin. Default `true`.
|
|
32
|
+
*/
|
|
33
|
+
verifiable?: boolean;
|
|
34
|
+
}
|
|
8
35
|
type ResolveTokenConfig = Omit<ResolveTokenConfig$1, "getKeyringToken">;
|
|
9
36
|
interface FeatureResolverConfig {
|
|
10
37
|
/** Env var name for this feature, e.g. `"HOLOCRON_ISSUES_TOKEN"`. */
|
|
@@ -17,14 +44,16 @@ interface FeatureResolverConfig {
|
|
|
17
44
|
/** A resolver from `createFeatureResolver`: call it for the token, or read `token` to see where it looks. */
|
|
18
45
|
type FeatureResolver = ((input?: ResolveTokenInput$1) => string) & {
|
|
19
46
|
/** The environment variable and keyring entry this resolver reads, for `holocron doctor tokens`. */
|
|
20
|
-
readonly token:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
47
|
+
readonly token: PluginToken;
|
|
48
|
+
};
|
|
49
|
+
/** A resolver from `createResolveToken`: call it for the token, or read `token` to see where it looks. */
|
|
50
|
+
type TokenResolver = ((input?: ResolveTokenInput$1) => string) & {
|
|
51
|
+
/** The environment variables and keyring entry this resolver reads, for `holocron doctor tokens`. */
|
|
52
|
+
readonly token: PluginToken;
|
|
24
53
|
};
|
|
25
54
|
/** Wraps `createResolveToken` from `@theholocron/http` and injects the
|
|
26
55
|
* system keyring so plugins stay at a one-liner call site. */
|
|
27
|
-
export declare function createResolveToken(config: ResolveTokenConfig):
|
|
56
|
+
export declare function createResolveToken(config: ResolveTokenConfig): TokenResolver;
|
|
28
57
|
/**
|
|
29
58
|
* Build a strict, single-feature token resolver.
|
|
30
59
|
*
|
|
@@ -75,26 +104,6 @@ export declare function deleteToken(provider: string): boolean;
|
|
|
75
104
|
* platforms the underlying credential store supports.
|
|
76
105
|
*/
|
|
77
106
|
export declare function listStoredProviders(): string[];
|
|
78
|
-
interface VerifyTokenSuccess {
|
|
79
|
-
ok: true;
|
|
80
|
-
/** "workplace: acme" / "user: cnewton@x" — surfaced in success output. */
|
|
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;
|
|
84
|
-
}
|
|
85
|
-
interface VerifyTokenFailure {
|
|
86
|
-
ok: false;
|
|
87
|
-
/** Reason the token was rejected. Surfaces to the operator. */
|
|
88
|
-
message: string;
|
|
89
|
-
}
|
|
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
|
-
}
|
|
98
107
|
export declare function defineConfig(config: HolocronConfig): HolocronConfig;
|
|
99
108
|
interface LoadedConfig {
|
|
100
109
|
resolved: ResolvedHolocronConfig;
|
|
@@ -239,4 +248,4 @@ export declare function describeNetworkError(err: unknown, timeoutMs: number): s
|
|
|
239
248
|
* earlier one failed is reported as not tried rather than failing a second time for the same reason.
|
|
240
249
|
*/
|
|
241
250
|
export declare function connectionProbe(input: ConnectionProbeInput): Probe;
|
|
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 };
|
|
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 };
|
package/dist/index.mjs
CHANGED
|
@@ -93,10 +93,14 @@ function listStoredProviders() {
|
|
|
93
93
|
/** Wraps `createResolveToken` from `@theholocron/http` and injects the
|
|
94
94
|
* system keyring so plugins stay at a one-liner call site. */
|
|
95
95
|
function createResolveToken(config) {
|
|
96
|
-
return createResolveToken$1({
|
|
96
|
+
return Object.assign(createResolveToken$1({
|
|
97
97
|
...config,
|
|
98
98
|
getKeyringToken: getToken
|
|
99
|
-
})
|
|
99
|
+
}), { token: {
|
|
100
|
+
envName: config.envName,
|
|
101
|
+
vendorEnvName: config.vendorEnvName,
|
|
102
|
+
keyringKey: config.keyringService
|
|
103
|
+
} });
|
|
100
104
|
}
|
|
101
105
|
/**
|
|
102
106
|
* Build a strict, single-feature token resolver.
|
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.271",
|
|
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.
|
|
56
|
-
"@theholocron/datapad": "5.0.0-alpha.
|
|
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",
|
|
57
59
|
"@theholocron/fs-utils": "^1.16.1-alpha.1",
|
|
58
|
-
"@theholocron/env-utils": "^1.16.1-alpha.1",
|
|
59
|
-
"@theholocron/json-utils": "^1.16.1-alpha.1",
|
|
60
60
|
"@theholocron/github-client": "^1.58.0-alpha.2",
|
|
61
|
-
"@theholocron/
|
|
62
|
-
"@theholocron/git-utils": "^1.16.1-alpha.1",
|
|
63
|
-
"@theholocron/observability": "^0.6.1-alpha.1",
|
|
61
|
+
"@theholocron/json-utils": "^1.16.1-alpha.1",
|
|
64
62
|
"@theholocron/pkg-utils": "^1.16.1-alpha.1",
|
|
65
|
-
"@theholocron/misc-utils": "^1.16.1-alpha.1"
|
|
63
|
+
"@theholocron/misc-utils": "^1.16.1-alpha.1",
|
|
64
|
+
"@theholocron/observability": "^0.6.1-alpha.1",
|
|
65
|
+
"@theholocron/env-utils": "^1.16.1-alpha.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/node": "^26",
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
"tsx": "4.23.15",
|
|
77
77
|
"typescript": "^5.9.3",
|
|
78
78
|
"vitest": "^5.0.5",
|
|
79
|
+
"@theholocron/eslint-config": "^8.9.0-alpha.3",
|
|
79
80
|
"@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.3",
|
|
80
81
|
"@theholocron/tsconfig": "^8.9.0-alpha.3",
|
|
81
|
-
"@theholocron/vitest-config": "^8.9.0-alpha.3"
|
|
82
|
-
"@theholocron/eslint-config": "^8.9.0-alpha.3"
|
|
82
|
+
"@theholocron/vitest-config": "^8.9.0-alpha.3"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": ">=22.0.0"
|