@theholocron/holocron-plugin-discord 5.0.0-alpha.231 → 5.0.0-alpha.232
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 +3 -0
- package/dist/index.mjs +11 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -285,6 +285,9 @@ declare function createContext(options?: DiscordPluginOptions): PluginContext;
|
|
|
285
285
|
declare function notifications(ctx: PluginContext): Notifications;
|
|
286
286
|
declare function createPlugin(options?: DiscordPluginOptions): {
|
|
287
287
|
name: string;
|
|
288
|
+
probes: {
|
|
289
|
+
connection: import("@theholocron/cli").Probe;
|
|
290
|
+
};
|
|
288
291
|
capabilities: {
|
|
289
292
|
notifications: () => Notifications;
|
|
290
293
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthError, ElevationRequiredError, ProviderApiError, createResolveToken } from "@theholocron/cli";
|
|
1
|
+
import { AuthError, ElevationRequiredError, ProviderApiError, connectionProbe, createResolveToken } from "@theholocron/cli";
|
|
2
2
|
import { errorMessage } from "@theholocron/misc-utils";
|
|
3
3
|
import { ApplicationFlag, ChannelType, createDiscordBotClient, createDiscordClient, createDiscordOAuthClient, findVerifiedConnection, parseWebhookUrl, permissionNames, permissions } from "@theholocron/discord-client";
|
|
4
4
|
//#region src/auth.ts
|
|
@@ -1615,6 +1615,16 @@ function createPlugin(options = {}) {
|
|
|
1615
1615
|
const ctx = createContext(options);
|
|
1616
1616
|
return {
|
|
1617
1617
|
name: "@theholocron/holocron-plugin-discord",
|
|
1618
|
+
probes: { connection: connectionProbe({
|
|
1619
|
+
provider: "Discord",
|
|
1620
|
+
url: options.baseUrl ?? "https://discord.com",
|
|
1621
|
+
fetch: options.fetch,
|
|
1622
|
+
token: () => resolveToken(options),
|
|
1623
|
+
verify: (token) => verifyToken(token, {
|
|
1624
|
+
baseUrl: options.baseUrl,
|
|
1625
|
+
fetch: options.fetch
|
|
1626
|
+
})
|
|
1627
|
+
}) },
|
|
1618
1628
|
capabilities: { notifications: () => notifications(ctx) }
|
|
1619
1629
|
};
|
|
1620
1630
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/holocron-plugin-discord",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.232",
|
|
4
4
|
"description": "Holocron plugin for Discord. Implements the notifications capability via Discord incoming webhooks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"discord",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"tsx": "4.23.15",
|
|
49
49
|
"typescript": "^5.9.3",
|
|
50
50
|
"vitest": "^4.1.11",
|
|
51
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
51
|
+
"@theholocron/cli": "5.0.0-alpha.232"
|
|
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.
|
|
56
|
+
"@theholocron/cli": "5.0.0-alpha.232"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=22"
|