@theholocron/cli 5.0.0-alpha.187 → 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.
@@ -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
@@ -785,7 +796,7 @@ interface NotificationsLayout {
785
796
  }
786
797
  /**
787
798
  * What a provider found on the server, limited to what a {@link NotificationsLayout}
788
- * asks about. Read-only: this is what `holocron notifications verify` compares the
799
+ * asks about. Read-only: this is what `holocron doctor notifications` compares the
789
800
  * layout against.
790
801
  */
791
802
  interface ServerInspection {
@@ -804,6 +815,10 @@ interface ServerInspection {
804
815
  name: string;
805
816
  id: string;
806
817
  mentionable: boolean;
818
+ /** `#rrggbb`, or absent for the default colour. */
819
+ color?: string;
820
+ hoist?: boolean;
821
+ permissions?: string[];
807
822
  }>;
808
823
  /** Set when reading the roles failed; `roles` is then empty and means nothing. Not read at all when the layout declares none. */
809
824
  rolesError?: string;
@@ -839,7 +854,16 @@ interface Notifications extends ProviderIdentity {
839
854
  ensureRole?(input: {
840
855
  name: string;
841
856
  mentionable?: boolean;
857
+ color?: string;
858
+ hoist?: boolean;
859
+ permissions?: string[];
842
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;
843
867
  /**
844
868
  * Smoke check for `holocron doctor`: prove the provisioning credentials work
845
869
  * and name what they reach. Returns `null` when there is nothing to check (a
@@ -852,7 +876,7 @@ interface Notifications extends ProviderIdentity {
852
876
  } | null>;
853
877
  /**
854
878
  * Read what exists on the server, for the parts the layout cares about, without
855
- * changing anything. Backs `holocron notifications verify`.
879
+ * changing anything. Backs `holocron doctor notifications`.
856
880
  */
857
881
  inspect?(layout: NotificationsLayout): Promise<ServerInspection>;
858
882
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "5.0.0-alpha.187",
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.187",
67
- "@theholocron/datapad": "5.0.0-alpha.187"
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",