@theholocron/cli 5.0.0-alpha.196 → 5.0.0-alpha.198

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/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, NotificationsAccess, NotificationsChannelLayout, NotificationsLayout, NotificationsOnboardingLayout, NotificationsServerLayout, NotificationsWelcomeLayout, 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";
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, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsEveryoneLayout, NotificationsLayout, NotificationsOnboardingLayout, NotificationsServerLayout, NotificationsWelcomeLayout, 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, NotificationsAccess, NotificationsChannelLayout, NotificationsLayout, NotificationsOnboardingLayout, NotificationsServerLayout, NotificationsWelcomeLayout, 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 };
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, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsEveryoneLayout, NotificationsLayout, NotificationsOnboardingLayout, NotificationsServerLayout, NotificationsWelcomeLayout, 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 };
@@ -752,6 +752,10 @@ interface EnsureWebhookResult {
752
752
  * the application that created the webhook, and only on creation).
753
753
  */
754
754
  url?: string;
755
+ /** For a webhook that already existed, or was just made: the settings that were set (`"avatar"`). */
756
+ updated?: string[];
757
+ /** Set when the webhook is fine but setting its avatar failed; the webhook and its `url` are still good. */
758
+ avatarError?: string;
755
759
  }
756
760
  /**
757
761
  * Who may see a channel and post in it. Roles are named as in the layout's `roles`.
@@ -778,6 +782,7 @@ interface NotificationsChannelLayout {
778
782
  webhook?: boolean | {
779
783
  name?: string;
780
784
  secret?: string;
785
+ avatar?: string;
781
786
  };
782
787
  }
783
788
  /**
@@ -847,8 +852,49 @@ interface NotificationsOnboardingLayout {
847
852
  }>;
848
853
  }>;
849
854
  }
855
+ /**
856
+ * Settings of the bot's own application (for Discord, what the developer portal shows). A field left
857
+ * out is left alone.
858
+ */
859
+ interface NotificationsApplicationLayout {
860
+ /** What the application's page says it is (Discord allows up to 400 characters). */
861
+ description?: string;
862
+ /** Short labels, up to five of up to twenty characters each. */
863
+ tags?: string[];
864
+ /** The default install link: what the bot is added with. Permissions are named, as in a role's. */
865
+ install?: {
866
+ scopes: string[];
867
+ permissions: string[];
868
+ };
869
+ /** `https://` link to the terms of service. */
870
+ termsUrl?: string;
871
+ /** `https://` link to the privacy policy. */
872
+ privacyUrl?: string;
873
+ /** `https://` link the provider calls to verify linked roles. */
874
+ roleConnectionsUrl?: string;
875
+ }
876
+ /**
877
+ * Permissions of everyone on the server (for Discord, the @everyone role). Unlike a role's `permissions`,
878
+ * these name only what to change: the rest of the set is left as it is.
879
+ */
880
+ interface NotificationsEveryoneLayout {
881
+ /** Permissions to grant. */
882
+ allow?: string[];
883
+ /** Permissions to take away. */
884
+ deny?: string[];
885
+ }
850
886
  /** A declared server layout, applied idempotently by `holocron notifications setup`. */
851
887
  interface NotificationsLayout {
888
+ /** The bot's own application settings, applied with the server's. */
889
+ application?: NotificationsApplicationLayout;
890
+ /** What everyone on the server may do, applied with the server's settings. */
891
+ everyone?: NotificationsEveryoneLayout;
892
+ /**
893
+ * The picture every webhook gets unless its own `webhook.avatar` says otherwise: a path to a PNG,
894
+ * JPEG or GIF (from where the CLI runs) or an `https://` URL. It is set only on a webhook that has
895
+ * no picture yet -- a provider cannot say whether the one it holds is the same image.
896
+ */
897
+ webhookAvatar?: string;
852
898
  /** What a new member sees on joining, applied after the channels exist. */
853
899
  welcome?: NotificationsWelcomeLayout;
854
900
  /** The questions a new member answers, applied after the channels and roles exist. */
@@ -887,6 +933,16 @@ interface NotificationsLayout {
887
933
  * layout against.
888
934
  */
889
935
  interface ServerInspection {
936
+ /** The bot's application as the provider has it, in the layout's terms, when the layout declares `application`. */
937
+ application?: NotificationsApplicationLayout;
938
+ /** Set when reading the application failed; `application` is then absent and means nothing. */
939
+ applicationError?: string;
940
+ /** What everyone may do, by permission name, when the layout declares `everyone`. */
941
+ everyone?: {
942
+ permissions: string[];
943
+ };
944
+ /** Set when reading everyone's permissions failed; `everyone` is then absent and means nothing. */
945
+ everyoneError?: string;
890
946
  /** The welcome screen as the server has it, in the layout's terms, when the layout declares `welcome`. */
891
947
  welcome?: NotificationsWelcomeLayout;
892
948
  /** Set when reading the welcome screen failed; `welcome` is then absent and means nothing. */
@@ -912,6 +968,8 @@ interface ServerInspection {
912
968
  topic?: string;
913
969
  /** Names of the webhooks on the channel. Only filled in for channels the layout gives a webhook. */
914
970
  webhooks: string[];
971
+ /** Which of those webhooks have a picture of their own. */
972
+ webhookAvatars?: string[];
915
973
  /** Set when listing this channel's webhooks failed; `webhooks` is then empty and means nothing. */
916
974
  webhooksError?: string;
917
975
  /** Who can see and post; `"custom"` as for `categoryAccess`. */
@@ -959,6 +1017,8 @@ interface Notifications extends ProviderIdentity {
959
1017
  channel: string;
960
1018
  name: string;
961
1019
  category?: string;
1020
+ /** An image as a `data:` URI, set when the webhook has none. */
1021
+ avatar?: string;
962
1022
  }): Promise<EnsureWebhookResult>;
963
1023
  ensureRole?(input: {
964
1024
  name: string;
@@ -982,6 +1042,14 @@ interface Notifications extends ProviderIdentity {
982
1042
  ensureOnboarding?(onboarding: NotificationsOnboardingLayout): Promise<{
983
1043
  updated: string[];
984
1044
  }>;
1045
+ /** Bring the bot's application settings in line with the layout, changing only what differs. Returns what it changed. */
1046
+ ensureApplication?(application: NotificationsApplicationLayout): Promise<{
1047
+ updated: string[];
1048
+ }>;
1049
+ /** Grant or take away the named permissions from everyone, changing only what differs. Returns what it changed. */
1050
+ ensureEveryone?(everyone: NotificationsEveryoneLayout): Promise<{
1051
+ updated: string[];
1052
+ }>;
985
1053
  /**
986
1054
  * Before anything is created, prove the credentials can do the parts of the layout that need
987
1055
  * more than the rest (for Discord, change the server's settings). Throws with the reason and how
@@ -1181,4 +1249,4 @@ declare class WebhookVerificationError extends Error {
1181
1249
  }
1182
1250
  declare function isMulti<K extends CapabilityKey>(key: K): CardinalityFor<K> extends "many" ? true : false;
1183
1251
  //#endregion
1184
- 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, NotificationsAccess, NotificationsChannelLayout, NotificationsLayout, NotificationsOnboardingLayout, NotificationsServerLayout, NotificationsWelcomeLayout, 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 };
1252
+ 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, NotificationsAccess, NotificationsApplicationLayout, NotificationsChannelLayout, NotificationsEveryoneLayout, NotificationsLayout, NotificationsOnboardingLayout, NotificationsServerLayout, NotificationsWelcomeLayout, 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.196",
3
+ "version": "5.0.0-alpha.198",
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.196",
67
- "@theholocron/datapad": "5.0.0-alpha.196"
66
+ "@theholocron/astromech": "5.0.0-alpha.198",
67
+ "@theholocron/datapad": "5.0.0-alpha.198"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@theholocron/eslint-config": "^8.8.2",