@theholocron/holocron-plugin-discord 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/dist/index.d.mts CHANGED
@@ -1,8 +1,13 @@
1
- import { AuthError, EnsureWebhookResult, EnsuredResource, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsLayout, NotificationsMember, NotificationsOnboardingLayout, NotificationsPinnedLayout, NotificationsServerLayout, NotificationsSignIn, NotificationsWelcomeLayout, ResolveTokenInput, ServerInspection, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess } from "@theholocron/cli";
1
+ import { AuthError, EnsureWebhookResult, EnsuredResource, Notifications, NotificationsAccess, NotificationsApplicationLayout, NotificationsDelivery, NotificationsEveryoneLayout, NotificationsLayout, NotificationsMember, NotificationsOnboardingLayout, NotificationsPinnedLayout, NotificationsServerLayout, NotificationsSignIn, NotificationsWelcomeLayout, PluginToken, ResolveTokenInput, ServerInspection, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess } from "@theholocron/cli";
2
2
  import { DiscordBotClient, DiscordClient, DiscordClientOptions, DiscordOAuthClient, DiscordWebhookInfo, createDiscordClient, parseWebhookUrl } from "@theholocron/discord-client";
3
- export declare const resolveToken: (input?: ResolveTokenInput) => string;
4
- export declare const resolveBotToken: (input?: ResolveTokenInput) => string;
5
- export declare const resolveClientSecret: (input?: ResolveTokenInput) => string;
3
+ export declare const resolveToken: import("@theholocron/cli").TokenResolver;
4
+ export declare const resolveBotToken: import("@theholocron/cli").TokenResolver;
5
+ export declare const resolveClientSecret: import("@theholocron/cli").TokenResolver;
6
+ /**
7
+ * Every token this plugin takes, for `holocron doctor tokens`. `verifyToken` checks a webhook URL, so the bot token and
8
+ * the OAuth client secret are listed but not handed to it.
9
+ */
10
+ export declare const tokens: PluginToken[];
6
11
  interface DiscordNotificationsOptions {
7
12
  /**
8
13
  * Named aliases mapping a logical channel name to its webhook URL.
package/dist/index.mjs CHANGED
@@ -20,6 +20,21 @@ const resolveClientSecret = createResolveToken({
20
20
  keyringService: "discord.holonet.oauth",
21
21
  errorMessage: "no Discord client secret found. Set HOLOCRON_DISCORD_CLIENT_SECRET (or DISCORD_CLIENT_SECRET), or run: holocron auth set discord.holonet.oauth <secret> — it is the client secret from the developer portal (OAuth2 → Reset Secret), which the API cannot create or read."
22
22
  });
23
+ /**
24
+ * Every token this plugin takes, for `holocron doctor tokens`. `verifyToken` checks a webhook URL, so the bot token and
25
+ * the OAuth client secret are listed but not handed to it.
26
+ */
27
+ const tokens = [
28
+ resolveToken.token,
29
+ {
30
+ ...resolveBotToken.token,
31
+ verifiable: false
32
+ },
33
+ {
34
+ ...resolveClientSecret.token,
35
+ verifiable: false
36
+ }
37
+ ];
23
38
  // src/capabilities/notifications.ts
24
39
  /** Discord's numeric settings, by the names the layout uses. */
25
40
  const VERIFICATION = {
@@ -1626,4 +1641,4 @@ function createPlugin(options = {}) {
1626
1641
  };
1627
1642
  }
1628
1643
  const AUTH_HINT = "create a webhook in Discord: open your server → channel settings → Integrations → Webhooks → New Webhook, copy the webhook URL, then run: holocron auth set discord <https://discord.com/api/webhooks/...>";
1629
- export { AUTH_HINT, AuthError, DiscordNotifications, createContext, createDiscordClient, createPlugin, notifications, parseWebhookUrl, resolveBotToken, resolveClientSecret, resolveToken, verifyToken };
1644
+ export { AUTH_HINT, AuthError, DiscordNotifications, createContext, createDiscordClient, createPlugin, notifications, parseWebhookUrl, resolveBotToken, resolveClientSecret, resolveToken, tokens, verifyToken };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-discord",
3
- "version": "5.0.0-alpha.270",
3
+ "version": "5.0.0-alpha.271",
4
4
  "description": "Holocron plugin for Discord. Implements the notifications capability via Discord incoming webhooks.",
5
5
  "keywords": [
6
6
  "discord",
@@ -41,19 +41,19 @@
41
41
  "tsx": "4.23.15",
42
42
  "typescript": "^5.9.3",
43
43
  "vitest": "^5.0.5",
44
+ "@theholocron/cli": "5.0.0-alpha.271",
45
+ "@theholocron/discord-client": "^1.58.0-alpha.2",
44
46
  "@theholocron/eslint-config": "^8.9.0-alpha.3",
45
- "@theholocron/cli": "5.0.0-alpha.270",
46
47
  "@theholocron/misc-utils": "^1.16.1-alpha.1",
47
- "@theholocron/tsdown-config": "^8.9.0-alpha.3",
48
- "@theholocron/discord-client": "^1.58.0-alpha.2",
49
48
  "@theholocron/http-client": "^1.58.0-alpha.2",
49
+ "@theholocron/tsdown-config": "^8.9.0-alpha.3",
50
50
  "@theholocron/tsconfig": "^8.9.0-alpha.3",
51
51
  "@theholocron/vitest-config": "^8.9.0-alpha.3"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@theholocron/discord-client": "^1.50.0",
55
55
  "@theholocron/misc-utils": "^1.16.0",
56
- "@theholocron/cli": "5.0.0-alpha.270"
56
+ "@theholocron/cli": "5.0.0-alpha.271"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=22"