@theholocron/cli 5.0.0-alpha.186 → 5.0.0-alpha.188
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/cli.mjs +635 -261
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/plugin/capabilities.d.mts +55 -1
- package/package.json +3 -3
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, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, EnsureResult, EnsureWebhookResult, EnsuredResource, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, Monitoring, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, NormalizedAuthUser, Notifications, NotificationsChannelLayout, NotificationsLayout, 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, 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, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, EnsureResult, EnsureWebhookResult, EnsuredResource, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, Monitoring, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, NormalizedAuthUser, Notifications, NotificationsChannelLayout, NotificationsLayout, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, ServerInspection, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, 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 { PackageJson } from "@theholocron/pkg-utils";
|
|
4
4
|
import { ConfigFileError } from "@theholocron/datapad";
|
|
@@ -789,4 +789,4 @@ declare function missingCapabilities(capabilities: readonly string[]): string[];
|
|
|
789
789
|
*/
|
|
790
790
|
declare function readWorkspacePackageJsons(repoRoot: string, workspacePackages: readonly WorkspacePackage[]): Promise<PackageJsonLike[]>;
|
|
791
791
|
//#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, 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, NotificationsChannelLayout, NotificationsLayout, 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, type SingleEntry, Source, 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 };
|
|
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, 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, NotificationsChannelLayout, NotificationsLayout, 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, 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 };
|
|
@@ -740,6 +740,8 @@ interface Tooling extends ProviderIdentity {
|
|
|
740
740
|
interface EnsuredResource {
|
|
741
741
|
id: string;
|
|
742
742
|
created: boolean;
|
|
743
|
+
/** For something that already existed: the settings that disagreed with the layout and were changed. */
|
|
744
|
+
updated?: string[];
|
|
743
745
|
}
|
|
744
746
|
/** A webhook (or equivalent inbound URL) for a channel. */
|
|
745
747
|
interface EnsureWebhookResult {
|
|
@@ -774,6 +776,15 @@ interface NotificationsLayout {
|
|
|
774
776
|
roles?: Array<{
|
|
775
777
|
name: string;
|
|
776
778
|
mentionable?: boolean;
|
|
779
|
+
/** `#rrggbb`. Omit to leave the colour alone. */
|
|
780
|
+
color?: string;
|
|
781
|
+
/** Show the role's members as their own group in the member list. */
|
|
782
|
+
hoist?: boolean;
|
|
783
|
+
/**
|
|
784
|
+
* The permissions the role holds, by the provider's own names (for Discord, `ViewChannel`,
|
|
785
|
+
* `SendMessages`, …). The list is exact: a permission not named is not granted.
|
|
786
|
+
*/
|
|
787
|
+
permissions?: string[];
|
|
777
788
|
/**
|
|
778
789
|
* Store the role's id in this secret, so a workflow can ping the role
|
|
779
790
|
* without anyone copying the id by hand. The id is not sensitive; a secret
|
|
@@ -783,6 +794,35 @@ interface NotificationsLayout {
|
|
|
783
794
|
secret?: string;
|
|
784
795
|
}>;
|
|
785
796
|
}
|
|
797
|
+
/**
|
|
798
|
+
* What a provider found on the server, limited to what a {@link NotificationsLayout}
|
|
799
|
+
* asks about. Read-only: this is what `holocron doctor notifications` compares the
|
|
800
|
+
* layout against.
|
|
801
|
+
*/
|
|
802
|
+
interface ServerInspection {
|
|
803
|
+
categories: string[];
|
|
804
|
+
channels: Array<{
|
|
805
|
+
name: string;
|
|
806
|
+
/** The category it sits under, if any. */
|
|
807
|
+
category?: string;
|
|
808
|
+
topic?: string;
|
|
809
|
+
/** Names of the webhooks on the channel. Only filled in for channels the layout gives a webhook. */
|
|
810
|
+
webhooks: string[];
|
|
811
|
+
/** Set when listing this channel's webhooks failed; `webhooks` is then empty and means nothing. */
|
|
812
|
+
webhooksError?: string;
|
|
813
|
+
}>;
|
|
814
|
+
roles: Array<{
|
|
815
|
+
name: string;
|
|
816
|
+
id: string;
|
|
817
|
+
mentionable: boolean;
|
|
818
|
+
/** `#rrggbb`, or absent for the default colour. */
|
|
819
|
+
color?: string;
|
|
820
|
+
hoist?: boolean;
|
|
821
|
+
permissions?: string[];
|
|
822
|
+
}>;
|
|
823
|
+
/** Set when reading the roles failed; `roles` is then empty and means nothing. Not read at all when the layout declares none. */
|
|
824
|
+
rolesError?: string;
|
|
825
|
+
}
|
|
786
826
|
interface Notifications extends ProviderIdentity {
|
|
787
827
|
readonly key: "notifications";
|
|
788
828
|
/**
|
|
@@ -814,7 +854,16 @@ interface Notifications extends ProviderIdentity {
|
|
|
814
854
|
ensureRole?(input: {
|
|
815
855
|
name: string;
|
|
816
856
|
mentionable?: boolean;
|
|
857
|
+
color?: string;
|
|
858
|
+
hoist?: boolean;
|
|
859
|
+
permissions?: string[];
|
|
817
860
|
}): Promise<EnsuredResource>;
|
|
861
|
+
/**
|
|
862
|
+
* Check the provider-specific parts of the layout (colours, permission names, …) without
|
|
863
|
+
* touching the server, so `setup` can refuse a bad layout before it creates anything.
|
|
864
|
+
* Returns the first problem, or `undefined` when the layout is fine.
|
|
865
|
+
*/
|
|
866
|
+
validateLayout?(layout: NotificationsLayout): string | undefined;
|
|
818
867
|
/**
|
|
819
868
|
* Smoke check for `holocron doctor`: prove the provisioning credentials work
|
|
820
869
|
* and name what they reach. Returns `null` when there is nothing to check (a
|
|
@@ -825,6 +874,11 @@ interface Notifications extends ProviderIdentity {
|
|
|
825
874
|
whoami?(): Promise<{
|
|
826
875
|
target: string;
|
|
827
876
|
} | null>;
|
|
877
|
+
/**
|
|
878
|
+
* Read what exists on the server, for the parts the layout cares about, without
|
|
879
|
+
* changing anything. Backs `holocron doctor notifications`.
|
|
880
|
+
*/
|
|
881
|
+
inspect?(layout: NotificationsLayout): Promise<ServerInspection>;
|
|
828
882
|
}
|
|
829
883
|
interface Analytics extends ProviderIdentity {
|
|
830
884
|
readonly key: "analytics";
|
|
@@ -997,4 +1051,4 @@ declare class WebhookVerificationError extends Error {
|
|
|
997
1051
|
}
|
|
998
1052
|
declare function isMulti<K extends CapabilityKey>(key: K): CardinalityFor<K> extends "many" ? true : false;
|
|
999
1053
|
//#endregion
|
|
1000
|
-
export { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, EnsureResult, EnsureWebhookResult, EnsuredResource, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, Monitoring, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, NormalizedAuthUser, Notifications, NotificationsChannelLayout, NotificationsLayout, 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, WikiProvisionOpts, WikiProxyConfig, Workers, isMulti };
|
|
1054
|
+
export { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, EnsureResult, EnsureWebhookResult, EnsuredResource, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, Monitoring, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, NormalizedAuthUser, Notifications, NotificationsChannelLayout, NotificationsLayout, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, ServerInspection, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, 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.188",
|
|
4
4
|
"description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -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.
|
|
67
|
-
"@theholocron/datapad": "5.0.0-alpha.
|
|
66
|
+
"@theholocron/astromech": "5.0.0-alpha.188",
|
|
67
|
+
"@theholocron/datapad": "5.0.0-alpha.188"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@theholocron/eslint-config": "^8.8.2",
|