@theholocron/cli 5.0.0-alpha.18 → 5.0.0-alpha.20
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 +6 -0
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +9 -2
- package/dist/index.mjs +10 -1
- package/dist/plugin/capabilities.d.mts +29 -5
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, EnsureResult, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, NormalizedAuthUser, Notifications, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiDnsRecord, WikiProvisionOpts, WikiProxyConfig, Workers, isMulti } from "./plugin/capabilities.mjs";
|
|
1
|
+
import { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, EnsureResult, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, NormalizedAuthUser, Notifications, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiDnsRecord, WikiProvisionOpts, WikiProxyConfig, Workers, isMulti } from "./plugin/capabilities.mjs";
|
|
2
2
|
import { AuthError, RequestOptions, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
|
|
3
3
|
import { ConfigFileError } from "@theholocron/datapad";
|
|
4
4
|
import { WorkspacePackage } from "@theholocron/astromech";
|
|
@@ -600,6 +600,13 @@ declare function deriveStack(pkg: PackageJsonLike | null): string[];
|
|
|
600
600
|
/** The provider capability keys actually wired in `providers: {}` — zero heuristics. */
|
|
601
601
|
declare function deriveCapabilities(providers: ResolvedProvidersConfig | undefined): string[];
|
|
602
602
|
declare function deriveCompliance(capabilities: readonly string[]): "compliant" | "non-compliant";
|
|
603
|
+
/**
|
|
604
|
+
* The Phase B refinement `deriveCompliance()`'s own doc comment names —
|
|
605
|
+
* *why* a repo is non-compliant, not just that it is. `[]` when compliant.
|
|
606
|
+
* Same `REQUIRED_BASELINE` `deriveCompliance()` checks against — one
|
|
607
|
+
* table, not two independently-maintained baselines.
|
|
608
|
+
*/
|
|
609
|
+
declare function missingCapabilities(capabilities: readonly string[]): string[];
|
|
603
610
|
/**
|
|
604
611
|
* Reads each workspace package's actual `package.json` content (not just
|
|
605
612
|
* `readWorkspacePackages()`'s `{ slug, name, dir }` — `deriveProfile()`'s
|
|
@@ -687,4 +694,4 @@ interface LoadedConfig {
|
|
|
687
694
|
*/
|
|
688
695
|
declare function loadConfig(cwd: string): Promise<LoadedConfig>;
|
|
689
696
|
//#endregion
|
|
690
|
-
export { Analytics, AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, Capability, CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DeriveProfileInput, Dns, DnsRecord, DnsRecordType, DocsConfig, DoctorConfig, EnsureResult, EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, FeatureResolverConfig, HolocronConfig, HolocronProfile, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, LoadedConfig, LogConfig, Logs, MultiEntry, NormalizedAuthUser, Notifications, PackageJsonLike, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, RawProviderEntry, RawProvidersConfig, RepoConfig, RepoProperties, RepoProtection, RepoRef, RepoSettings, type RequestOptions, ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, ResolvedHolocronConfig, ResolvedProviderEntry, ResolvedProvidersConfig, ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, SingleEntry, Source, StatusCategory, Storage, StorageBranch, StorybookDeployProject, TaskEntryConfig, TeamEntry, TeamPermission, TelemetryConfig, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiDnsRecord, WikiProvisionOpts, WikiProxyConfig, Workers, WorkflowWithConfig, compose, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, getToken, isMulti, listStoredProviders, loadConfig, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
|
|
697
|
+
export { Analytics, AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, Capability, CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DeriveProfileInput, Dns, DnsRecord, DnsRecordType, DocsConfig, DoctorConfig, EnsureResult, EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, FeatureResolverConfig, HolocronConfig, HolocronProfile, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, LoadedConfig, LogConfig, Logs, MultiEntry, NormalizedAuthUser, Notifications, PackageJsonLike, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, ProviderOptions, PullRequest, REQUIRED_CAPABILITIES, RawProviderEntry, RawProvidersConfig, RepoConfig, RepoProperties, RepoProtection, RepoRef, RepoSettings, type RequestOptions, ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, ResolvedHolocronConfig, ResolvedProviderEntry, ResolvedProvidersConfig, ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, SingleEntry, Source, StatusCategory, Storage, StorageBranch, StorybookDeployProject, TaskEntryConfig, TeamEntry, TeamPermission, TelemetryConfig, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiDnsRecord, WikiProvisionOpts, WikiProxyConfig, Workers, 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
|
@@ -196,6 +196,15 @@ function deriveCompliance(capabilities) {
|
|
|
196
196
|
return REQUIRED_BASELINE.every((key) => capabilities.includes(key)) ? "compliant" : "non-compliant";
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
|
+
* The Phase B refinement `deriveCompliance()`'s own doc comment names —
|
|
200
|
+
* *why* a repo is non-compliant, not just that it is. `[]` when compliant.
|
|
201
|
+
* Same `REQUIRED_BASELINE` `deriveCompliance()` checks against — one
|
|
202
|
+
* table, not two independently-maintained baselines.
|
|
203
|
+
*/
|
|
204
|
+
function missingCapabilities(capabilities) {
|
|
205
|
+
return REQUIRED_BASELINE.filter((key) => !capabilities.includes(key));
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
199
208
|
* Reads each workspace package's actual `package.json` content (not just
|
|
200
209
|
* `readWorkspacePackages()`'s `{ slug, name, dir }` — `deriveProfile()`'s
|
|
201
210
|
* `platform` detection needs `bin`, which that helper doesn't carry).
|
|
@@ -487,4 +496,4 @@ function parseGitRemoteUrl(url) {
|
|
|
487
496
|
if (sshMatch) return sshMatch[1];
|
|
488
497
|
}
|
|
489
498
|
//#endregion
|
|
490
|
-
export { AuthError, CARDINALITY, ConfigError, ConfigFileError, ProviderApiError, REQUIRED_CAPABILITIES, WebhookVerificationError, compose, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, getToken, isMulti, listStoredProviders, loadConfig, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
|
|
499
|
+
export { AuthError, CARDINALITY, ConfigError, ConfigFileError, ProviderApiError, REQUIRED_CAPABILITIES, WebhookVerificationError, compose, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, getToken, isMulti, listStoredProviders, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
|
|
@@ -699,12 +699,34 @@ interface Wiki extends ProviderIdentity {
|
|
|
699
699
|
*/
|
|
700
700
|
proxyConfig?(): WikiProxyConfig | null;
|
|
701
701
|
}
|
|
702
|
+
/** Config for `Workers.deployScript()` — an arbitrary Worker, not a generated reverse-proxy. */
|
|
703
|
+
interface DeployScriptConfig {
|
|
704
|
+
/** The full Worker script source — a single ES module (`export default { fetch(...) {...} }`). */
|
|
705
|
+
code: string;
|
|
706
|
+
/**
|
|
707
|
+
* Secret bindings — `env.<name>` in the deployed Worker. Values are
|
|
708
|
+
* write-only; the provider never echoes them back, here or anywhere else.
|
|
709
|
+
*/
|
|
710
|
+
secrets?: Record<string, string>;
|
|
711
|
+
/**
|
|
712
|
+
* Route pattern(s) this Worker should serve (e.g.
|
|
713
|
+
* `"sentinel.theholocron.dev/*"`). Omit for a Worker reached only via
|
|
714
|
+
* its `*.workers.dev` URL.
|
|
715
|
+
*/
|
|
716
|
+
routes?: string[];
|
|
717
|
+
}
|
|
718
|
+
interface DeployScriptResult {
|
|
719
|
+
/** The deployed script's name at the provider. */
|
|
720
|
+
scriptName: string;
|
|
721
|
+
}
|
|
702
722
|
/**
|
|
703
|
-
* Edge Worker
|
|
723
|
+
* Edge Worker management capability.
|
|
704
724
|
*
|
|
705
|
-
* Deploys and manages Worker scripts
|
|
706
|
-
*
|
|
707
|
-
*
|
|
725
|
+
* Deploys and manages Worker scripts. `upsertProxy` is the existing,
|
|
726
|
+
* narrower case `setup` uses to wire wiki custom-domain reverse-proxies;
|
|
727
|
+
* `deployScript` is the general case — any Worker, any code, its own
|
|
728
|
+
* secrets — for a consumer that isn't a reverse-proxy (a webhook
|
|
729
|
+
* receiver, for instance).
|
|
708
730
|
*/
|
|
709
731
|
interface Workers extends ProviderIdentity {
|
|
710
732
|
readonly key: "workers";
|
|
@@ -714,6 +736,8 @@ interface Workers extends ProviderIdentity {
|
|
|
714
736
|
* `config.headers` on each request.
|
|
715
737
|
*/
|
|
716
738
|
upsertProxy(hostname: string, config: WikiProxyConfig): Promise<void>;
|
|
739
|
+
/** Deploy (or update) an arbitrary Worker script, optionally with secrets and routes. */
|
|
740
|
+
deployScript(name: string, config: DeployScriptConfig): Promise<DeployScriptResult>;
|
|
717
741
|
}
|
|
718
742
|
interface CapabilityImpls {
|
|
719
743
|
source: Source;
|
|
@@ -739,4 +763,4 @@ type CardinalityFor<K extends CapabilityKey> = (typeof CARDINALITY)[K];
|
|
|
739
763
|
type ResolvedCapability<K extends CapabilityKey> = CardinalityFor<K> extends "many" ? CapabilityImpls[K][] : CapabilityImpls[K];
|
|
740
764
|
declare function isMulti<K extends CapabilityKey>(key: K): CardinalityFor<K> extends "many" ? true : false;
|
|
741
765
|
//#endregion
|
|
742
|
-
export { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, EnsureResult, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, NormalizedAuthUser, Notifications, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiDnsRecord, WikiProvisionOpts, WikiProxyConfig, Workers, isMulti };
|
|
766
|
+
export { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, EnsureResult, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, NormalizedAuthUser, Notifications, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiDnsRecord, WikiProvisionOpts, WikiProxyConfig, Workers, isMulti };
|
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.20",
|
|
4
4
|
"description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"@sentry/node": "^10.70.0",
|
|
48
48
|
"@theholocron/components-doc": "^1.6.0",
|
|
49
49
|
"@theholocron/env-utils": "^1.6.0",
|
|
50
|
-
"@theholocron/github-client": "^1.
|
|
51
|
-
"@theholocron/http-client": "^1.
|
|
50
|
+
"@theholocron/github-client": "^1.20.0",
|
|
51
|
+
"@theholocron/http-client": "^1.20.0",
|
|
52
52
|
"@theholocron/observability": "^0.3.0",
|
|
53
53
|
"@theholocron/registry-doc": "^1.12.0",
|
|
54
54
|
"chalk": "^6.0.0",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"pino-pretty": "^13.1.3",
|
|
58
58
|
"posthog-node": "^5.51.6",
|
|
59
59
|
"yargs": "^18.1.0",
|
|
60
|
-
"@theholocron/
|
|
61
|
-
"@theholocron/
|
|
60
|
+
"@theholocron/datapad": "5.0.0-alpha.20",
|
|
61
|
+
"@theholocron/astromech": "5.0.0-alpha.20"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@theholocron/eslint-config": "^8.0.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"tsx": "4.23.12",
|
|
76
76
|
"typescript": "^5.9.3",
|
|
77
77
|
"vitest": "^4.1.11",
|
|
78
|
-
"@theholocron/rollup-plugin-transform-template": "5.0.0-alpha.
|
|
78
|
+
"@theholocron/rollup-plugin-transform-template": "5.0.0-alpha.20"
|
|
79
79
|
},
|
|
80
80
|
"engines": {
|
|
81
81
|
"node": ">=22.0.0"
|