@kodelyth/twitch 2026.5.39 → 2026.5.42

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.
Files changed (62) hide show
  1. package/README.md +89 -0
  2. package/api.ts +21 -0
  3. package/channel-plugin-api.ts +1 -0
  4. package/dist/api.js +3 -0
  5. package/dist/channel-plugin-api.js +2 -0
  6. package/dist/index.js +18 -0
  7. package/dist/monitor-j1GtQVBd.js +337 -0
  8. package/dist/plugin-BMzrFFQR.js +1285 -0
  9. package/dist/runtime-CwXHrWo3.js +8 -0
  10. package/dist/runtime-api.js +1 -0
  11. package/dist/setup-entry.js +11 -0
  12. package/dist/setup-plugin-api.js +2 -0
  13. package/dist/setup-surface-CovnRl9R.js +527 -0
  14. package/index.test.ts +13 -0
  15. package/index.ts +16 -0
  16. package/klaw.plugin.json +2 -219
  17. package/package.json +3 -3
  18. package/runtime-api.ts +22 -0
  19. package/setup-entry.ts +9 -0
  20. package/setup-plugin-api.ts +3 -0
  21. package/src/access-control.test.ts +373 -0
  22. package/src/access-control.ts +195 -0
  23. package/src/actions.test.ts +75 -0
  24. package/src/actions.ts +175 -0
  25. package/src/client-manager-registry.ts +87 -0
  26. package/src/config-schema.test.ts +46 -0
  27. package/src/config-schema.ts +88 -0
  28. package/src/config.test.ts +233 -0
  29. package/src/config.ts +177 -0
  30. package/src/monitor.ts +311 -0
  31. package/src/outbound.test.ts +572 -0
  32. package/src/outbound.ts +242 -0
  33. package/src/plugin.lifecycle.test.ts +86 -0
  34. package/src/plugin.live.test.ts +120 -0
  35. package/src/plugin.test.ts +77 -0
  36. package/src/plugin.ts +220 -0
  37. package/src/probe.test.ts +196 -0
  38. package/src/probe.ts +130 -0
  39. package/src/resolver.ts +139 -0
  40. package/src/runtime.ts +9 -0
  41. package/src/send.test.ts +342 -0
  42. package/src/send.ts +191 -0
  43. package/src/setup-surface.test.ts +529 -0
  44. package/src/setup-surface.ts +526 -0
  45. package/src/status.test.ts +298 -0
  46. package/src/status.ts +179 -0
  47. package/src/test-fixtures.ts +30 -0
  48. package/src/token.test.ts +198 -0
  49. package/src/token.ts +93 -0
  50. package/src/twitch-client.test.ts +574 -0
  51. package/src/twitch-client.ts +276 -0
  52. package/src/types.ts +104 -0
  53. package/src/utils/markdown.ts +98 -0
  54. package/src/utils/twitch.ts +81 -0
  55. package/test/setup.ts +7 -0
  56. package/tsconfig.json +16 -0
  57. package/api.js +0 -7
  58. package/channel-plugin-api.js +0 -7
  59. package/index.js +0 -7
  60. package/runtime-api.js +0 -7
  61. package/setup-entry.js +0 -7
  62. package/setup-plugin-api.js +0 -7
@@ -0,0 +1,276 @@
1
+ import { RefreshingAuthProvider, StaticAuthProvider } from "@twurple/auth";
2
+ import { ChatClient, LogLevel } from "@twurple/chat";
3
+ import type { KlawConfig } from "klaw/plugin-sdk/config-contracts";
4
+ import { formatErrorMessage } from "klaw/plugin-sdk/error-runtime";
5
+ import { resolveTwitchToken } from "./token.js";
6
+ import type { ChannelLogSink, TwitchAccountConfig, TwitchChatMessage } from "./types.js";
7
+ import { normalizeToken } from "./utils/twitch.js";
8
+
9
+ /**
10
+ * Manages Twitch chat client connections
11
+ */
12
+ export class TwitchClientManager {
13
+ private clients = new Map<string, ChatClient>();
14
+ private messageHandlers = new Map<string, (message: TwitchChatMessage) => void>();
15
+
16
+ constructor(private logger: ChannelLogSink) {}
17
+
18
+ /**
19
+ * Create an auth provider for the account.
20
+ */
21
+ private async createAuthProvider(
22
+ account: TwitchAccountConfig,
23
+ normalizedToken: string,
24
+ ): Promise<StaticAuthProvider | RefreshingAuthProvider> {
25
+ if (!account.clientId) {
26
+ throw new Error("Missing Twitch client ID");
27
+ }
28
+
29
+ if (account.clientSecret) {
30
+ const authProvider = new RefreshingAuthProvider({
31
+ clientId: account.clientId,
32
+ clientSecret: account.clientSecret,
33
+ });
34
+
35
+ await authProvider
36
+ .addUserForToken({
37
+ accessToken: normalizedToken,
38
+ refreshToken: account.refreshToken ?? null,
39
+ expiresIn: account.expiresIn ?? null,
40
+ obtainmentTimestamp: account.obtainmentTimestamp ?? Date.now(),
41
+ })
42
+ .then((userId) => {
43
+ this.logger.info(
44
+ `Added user ${userId} to RefreshingAuthProvider for ${account.username}`,
45
+ );
46
+ })
47
+ .catch((err) => {
48
+ this.logger.error(
49
+ `Failed to add user to RefreshingAuthProvider: ${formatErrorMessage(err)}`,
50
+ );
51
+ });
52
+
53
+ authProvider.onRefresh((userId, token) => {
54
+ this.logger.info(
55
+ `Access token refreshed for user ${userId} (expires in ${token.expiresIn ? `${token.expiresIn}s` : "unknown"})`,
56
+ );
57
+ });
58
+
59
+ authProvider.onRefreshFailure((userId, error) => {
60
+ this.logger.error(`Failed to refresh access token for user ${userId}: ${error.message}`);
61
+ });
62
+
63
+ const refreshStatus = account.refreshToken
64
+ ? "automatic token refresh enabled"
65
+ : "token refresh disabled (no refresh token)";
66
+ this.logger.info(`Using RefreshingAuthProvider for ${account.username} (${refreshStatus})`);
67
+
68
+ return authProvider;
69
+ }
70
+
71
+ this.logger.info(`Using StaticAuthProvider for ${account.username} (no clientSecret provided)`);
72
+ return new StaticAuthProvider(account.clientId, normalizedToken);
73
+ }
74
+
75
+ /**
76
+ * Get or create a chat client for an account
77
+ */
78
+ async getClient(
79
+ account: TwitchAccountConfig,
80
+ cfg?: KlawConfig,
81
+ accountId?: string,
82
+ ): Promise<ChatClient> {
83
+ const key = this.getAccountKey(account);
84
+
85
+ const existing = this.clients.get(key);
86
+ if (existing) {
87
+ return existing;
88
+ }
89
+
90
+ const tokenResolution = resolveTwitchToken(cfg, {
91
+ accountId,
92
+ });
93
+
94
+ if (!tokenResolution.token) {
95
+ this.logger.error(
96
+ `Missing Twitch token for account ${account.username} (set channels.twitch.accounts.${account.username}.token or KLAW_TWITCH_ACCESS_TOKEN for default)`,
97
+ );
98
+ throw new Error("Missing Twitch token");
99
+ }
100
+
101
+ this.logger.debug?.(`Using ${tokenResolution.source} token source for ${account.username}`);
102
+
103
+ if (!account.clientId) {
104
+ this.logger.error(`Missing Twitch client ID for account ${account.username}`);
105
+ throw new Error("Missing Twitch client ID");
106
+ }
107
+
108
+ const normalizedToken = normalizeToken(tokenResolution.token);
109
+
110
+ const authProvider = await this.createAuthProvider(account, normalizedToken);
111
+
112
+ const client = new ChatClient({
113
+ authProvider,
114
+ channels: [account.channel],
115
+ rejoinChannelsOnReconnect: true,
116
+ requestMembershipEvents: true,
117
+ logger: {
118
+ minLevel: LogLevel.WARNING,
119
+ custom: {
120
+ log: (level, message) => {
121
+ switch (level) {
122
+ case LogLevel.CRITICAL:
123
+ this.logger.error(message);
124
+ break;
125
+ case LogLevel.ERROR:
126
+ this.logger.error(message);
127
+ break;
128
+ case LogLevel.WARNING:
129
+ this.logger.warn(message);
130
+ break;
131
+ case LogLevel.INFO:
132
+ this.logger.info(message);
133
+ break;
134
+ case LogLevel.DEBUG:
135
+ this.logger.debug?.(message);
136
+ break;
137
+ case LogLevel.TRACE:
138
+ this.logger.debug?.(message);
139
+ break;
140
+ }
141
+ },
142
+ },
143
+ },
144
+ });
145
+
146
+ this.setupClientHandlers(client, account);
147
+
148
+ client.connect();
149
+
150
+ this.clients.set(key, client);
151
+ this.logger.info(`Connected to Twitch as ${account.username}`);
152
+
153
+ return client;
154
+ }
155
+
156
+ /**
157
+ * Set up message and event handlers for a client
158
+ */
159
+ private setupClientHandlers(client: ChatClient, account: TwitchAccountConfig): void {
160
+ const key = this.getAccountKey(account);
161
+
162
+ // Handle incoming messages
163
+ client.onMessage((channelName, _user, messageText, msg) => {
164
+ const handler = this.messageHandlers.get(key);
165
+ if (handler) {
166
+ const normalizedChannel = channelName.startsWith("#") ? channelName.slice(1) : channelName;
167
+ const from = `twitch:${msg.userInfo.userName}`;
168
+ const preview = messageText.slice(0, 100).replace(/\n/g, "\\n");
169
+ this.logger.debug?.(
170
+ `twitch inbound: channel=${normalizedChannel} from=${from} len=${messageText.length} preview="${preview}"`,
171
+ );
172
+
173
+ handler({
174
+ username: msg.userInfo.userName,
175
+ displayName: msg.userInfo.displayName,
176
+ userId: msg.userInfo.userId,
177
+ message: messageText,
178
+ channel: normalizedChannel,
179
+ id: msg.id,
180
+ timestamp: new Date(),
181
+ isMod: msg.userInfo.isMod,
182
+ isOwner: msg.userInfo.isBroadcaster,
183
+ isVip: msg.userInfo.isVip,
184
+ isSub: msg.userInfo.isSubscriber,
185
+ chatType: "group",
186
+ });
187
+ }
188
+ });
189
+
190
+ this.logger.info(`Set up handlers for ${key}`);
191
+ }
192
+
193
+ /**
194
+ * Set a message handler for an account
195
+ * @returns A function that removes the handler when called
196
+ */
197
+ onMessage(
198
+ account: TwitchAccountConfig,
199
+ handler: (message: TwitchChatMessage) => void,
200
+ ): () => void {
201
+ const key = this.getAccountKey(account);
202
+ this.messageHandlers.set(key, handler);
203
+ return () => {
204
+ this.messageHandlers.delete(key);
205
+ };
206
+ }
207
+
208
+ /**
209
+ * Disconnect a client
210
+ */
211
+ async disconnect(account: TwitchAccountConfig): Promise<void> {
212
+ const key = this.getAccountKey(account);
213
+ const client = this.clients.get(key);
214
+
215
+ if (client) {
216
+ client.quit();
217
+ this.clients.delete(key);
218
+ this.messageHandlers.delete(key);
219
+ this.logger.info(`Disconnected ${key}`);
220
+ }
221
+ }
222
+
223
+ /**
224
+ * Disconnect all clients
225
+ */
226
+ async disconnectAll(): Promise<void> {
227
+ this.clients.forEach((client) => client.quit());
228
+ this.clients.clear();
229
+ this.messageHandlers.clear();
230
+ this.logger.info(" Disconnected all clients");
231
+ }
232
+
233
+ /**
234
+ * Send a message to a channel
235
+ */
236
+ async sendMessage(
237
+ account: TwitchAccountConfig,
238
+ channel: string,
239
+ message: string,
240
+ cfg?: KlawConfig,
241
+ accountId?: string,
242
+ ): Promise<{ ok: boolean; error?: string; messageId?: string }> {
243
+ try {
244
+ const client = await this.getClient(account, cfg, accountId);
245
+
246
+ // Generate a message ID (Twurple's say() doesn't return the message ID, so we generate one)
247
+ const messageId = crypto.randomUUID();
248
+
249
+ // Send message (Twurple handles rate limiting)
250
+ await client.say(channel, message);
251
+
252
+ return { ok: true, messageId };
253
+ } catch (error) {
254
+ this.logger.error(`Failed to send message: ${formatErrorMessage(error)}`);
255
+ return {
256
+ ok: false,
257
+ error: formatErrorMessage(error),
258
+ };
259
+ }
260
+ }
261
+
262
+ /**
263
+ * Generate a unique key for an account
264
+ */
265
+ public getAccountKey(account: TwitchAccountConfig): string {
266
+ return `${account.username}:${account.channel}`;
267
+ }
268
+
269
+ /**
270
+ * Clear all clients and handlers (for testing)
271
+ */
272
+ clearForTest(): void {
273
+ this.clients.clear();
274
+ this.messageHandlers.clear();
275
+ }
276
+ }
package/src/types.ts ADDED
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Twitch channel plugin types.
3
+ *
4
+ * This file defines Twitch-specific types. Generic channel types are imported
5
+ * from Klaw core.
6
+ */
7
+
8
+ import type {
9
+ ChannelAccountSnapshot,
10
+ ChannelLogSink,
11
+ ChannelMessageActionAdapter,
12
+ ChannelMessageActionContext,
13
+ ChannelOutboundAdapter,
14
+ ChannelOutboundContext,
15
+ ChannelPlugin,
16
+ ChannelResolveKind,
17
+ ChannelResolveResult,
18
+ OutboundDeliveryResult,
19
+ } from "../runtime-api.js";
20
+
21
+ // ============================================================================
22
+ // Twitch-Specific Types
23
+ // ============================================================================
24
+
25
+ /**
26
+ * Twitch user roles that can be allowed to interact with the bot
27
+ */
28
+ export type TwitchRole = "moderator" | "owner" | "vip" | "subscriber" | "all";
29
+
30
+ /**
31
+ * Account configuration for a Twitch channel
32
+ */
33
+ export interface TwitchAccountConfig {
34
+ /** Twitch username */
35
+ username: string;
36
+ /** Twitch OAuth access token (requires chat:read and chat:write scopes) */
37
+ accessToken: string;
38
+ /** Twitch client ID (from Twitch Developer Portal or twitchtokengenerator.com) */
39
+ clientId: string;
40
+ /** Channel name to join (required) */
41
+ channel: string;
42
+ /** Enable this account */
43
+ enabled?: boolean;
44
+ /** Allowlist of Twitch user IDs who can interact with the bot (use IDs for safety, not usernames) */
45
+ allowFrom?: Array<string>;
46
+ /** Roles allowed to interact with the bot (e.g., ["mod", "vip", "sub"]) */
47
+ allowedRoles?: TwitchRole[];
48
+ /** Require @mention to trigger bot responses */
49
+ requireMention?: boolean;
50
+ /** Outbound response prefix override for this channel/account. */
51
+ responsePrefix?: string;
52
+ /** Twitch client secret (required for token refresh via RefreshingAuthProvider) */
53
+ clientSecret?: string;
54
+ /** Refresh token (required for automatic token refresh) */
55
+ refreshToken?: string;
56
+ /** Token expiry time in seconds (optional, for token refresh tracking) */
57
+ expiresIn?: number | null;
58
+ /** Timestamp when token was obtained (optional, for token refresh tracking) */
59
+ obtainmentTimestamp?: number;
60
+ }
61
+
62
+ /**
63
+ * Twitch message from chat
64
+ */
65
+ export interface TwitchChatMessage {
66
+ /** Username of sender */
67
+ username: string;
68
+ /** Twitch user ID of sender (unique, persistent identifier) */
69
+ userId?: string;
70
+ /** Message text */
71
+ message: string;
72
+ /** Channel name */
73
+ channel: string;
74
+ /** Display name (may include special characters) */
75
+ displayName?: string;
76
+ /** Message ID */
77
+ id?: string;
78
+ /** Timestamp */
79
+ timestamp?: Date;
80
+ /** Whether the sender is a moderator */
81
+ isMod?: boolean;
82
+ /** Whether the sender is the channel owner/broadcaster */
83
+ isOwner?: boolean;
84
+ /** Whether the sender is a VIP */
85
+ isVip?: boolean;
86
+ /** Whether the sender is a subscriber */
87
+ isSub?: boolean;
88
+ /** Chat type */
89
+ chatType?: "group";
90
+ }
91
+
92
+ // Re-export core types for convenience
93
+ export type {
94
+ ChannelAccountSnapshot,
95
+ ChannelLogSink,
96
+ ChannelMessageActionAdapter,
97
+ ChannelMessageActionContext,
98
+ ChannelOutboundAdapter,
99
+ ChannelResolveKind,
100
+ ChannelResolveResult,
101
+ ChannelPlugin,
102
+ ChannelOutboundContext,
103
+ OutboundDeliveryResult,
104
+ };
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Markdown utilities for Twitch chat
3
+ *
4
+ * Twitch chat doesn't support markdown formatting, so we strip it before sending.
5
+ * Based on Klaw's markdownToText in src/agents/tools/web-fetch-utils.ts.
6
+ */
7
+
8
+ /**
9
+ * Strip markdown formatting from text for Twitch compatibility.
10
+ *
11
+ * Removes images, links, bold, italic, strikethrough, code blocks, inline code,
12
+ * headers, and list formatting. Replaces newlines with spaces since Twitch
13
+ * is a single-line chat medium.
14
+ *
15
+ * @param markdown - The markdown text to strip
16
+ * @returns Plain text with markdown removed
17
+ */
18
+ export function stripMarkdownForTwitch(markdown: string): string {
19
+ return (
20
+ markdown
21
+ // Images
22
+ .replace(/!\[[^\]]*]\([^)]+\)/g, "")
23
+ // Links
24
+ .replace(/\[([^\]]+)]\([^)]+\)/g, "$1")
25
+ // Bold (**text**)
26
+ .replace(/\*\*([^*]+)\*\*/g, "$1")
27
+ // Bold (__text__)
28
+ .replace(/__([^_]+)__/g, "$1")
29
+ // Italic (*text*)
30
+ .replace(/\*([^*]+)\*/g, "$1")
31
+ // Italic (_text_)
32
+ .replace(/_([^_]+)_/g, "$1")
33
+ // Strikethrough (~~text~~)
34
+ .replace(/~~([^~]+)~~/g, "$1")
35
+ // Code blocks
36
+ .replace(/```[\s\S]*?```/g, (block) => block.replace(/```[^\n]*\n?/g, "").replace(/```/g, ""))
37
+ // Inline code
38
+ .replace(/`([^`]+)`/g, "$1")
39
+ // Headers
40
+ .replace(/^#{1,6}\s+/gm, "")
41
+ // Lists
42
+ .replace(/^\s*[-*+]\s+/gm, "")
43
+ .replace(/^\s*\d+\.\s+/gm, "")
44
+ // Normalize whitespace
45
+ .replace(/\r/g, "") // Remove carriage returns
46
+ .replace(/[ \t]+\n/g, "\n") // Remove trailing spaces before newlines
47
+ .replace(/\n/g, " ") // Replace newlines with spaces (for Twitch)
48
+ .replace(/[ \t]{2,}/g, " ") // Reduce multiple spaces to single
49
+ .trim()
50
+ );
51
+ }
52
+
53
+ /**
54
+ * Simple word-boundary chunker for Twitch (500 char limit).
55
+ * Strips markdown before chunking to avoid breaking markdown patterns.
56
+ *
57
+ * @param text - The text to chunk
58
+ * @param limit - Maximum characters per chunk (Twitch limit is 500)
59
+ * @returns Array of text chunks
60
+ */
61
+ export function chunkTextForTwitch(text: string, limit: number): string[] {
62
+ // First, strip markdown
63
+ const cleaned = stripMarkdownForTwitch(text);
64
+ if (!cleaned) {
65
+ return [];
66
+ }
67
+ if (limit <= 0) {
68
+ return [cleaned];
69
+ }
70
+ if (cleaned.length <= limit) {
71
+ return [cleaned];
72
+ }
73
+
74
+ const chunks: string[] = [];
75
+ let remaining = cleaned;
76
+
77
+ while (remaining.length > limit) {
78
+ // Find the last space before the limit
79
+ const window = remaining.slice(0, limit);
80
+ const lastSpaceIndex = window.lastIndexOf(" ");
81
+
82
+ if (lastSpaceIndex === -1) {
83
+ // No space found, hard split at limit
84
+ chunks.push(window);
85
+ remaining = remaining.slice(limit);
86
+ } else {
87
+ // Split at the last space
88
+ chunks.push(window.slice(0, lastSpaceIndex));
89
+ remaining = remaining.slice(lastSpaceIndex + 1);
90
+ }
91
+ }
92
+
93
+ if (remaining) {
94
+ chunks.push(remaining);
95
+ }
96
+
97
+ return chunks;
98
+ }
@@ -0,0 +1,81 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { normalizeLowercaseStringOrEmpty } from "klaw/plugin-sdk/string-coerce-runtime";
3
+
4
+ /**
5
+ * Twitch-specific utility functions
6
+ */
7
+
8
+ /**
9
+ * Normalize Twitch channel names.
10
+ *
11
+ * Removes the '#' prefix if present, converts to lowercase, and trims whitespace.
12
+ * Twitch channel names are case-insensitive and don't use the '#' prefix in the API.
13
+ *
14
+ * @param channel - The channel name to normalize
15
+ * @returns Normalized channel name
16
+ *
17
+ * @example
18
+ * normalizeTwitchChannel("#TwitchChannel") // "twitchchannel"
19
+ * normalizeTwitchChannel("MyChannel") // "mychannel"
20
+ */
21
+ export function normalizeTwitchChannel(channel: string): string {
22
+ const trimmed = normalizeLowercaseStringOrEmpty(channel);
23
+ return trimmed.startsWith("#") ? trimmed.slice(1) : trimmed;
24
+ }
25
+
26
+ /**
27
+ * Create a standardized error message for missing target.
28
+ *
29
+ * @param provider - The provider name (e.g., "Twitch")
30
+ * @param hint - Optional hint for how to fix the issue
31
+ * @returns Error object with descriptive message
32
+ */
33
+ export function missingTargetError(provider: string, hint?: string): Error {
34
+ return new Error(`Delivering to ${provider} requires target${hint ? ` ${hint}` : ""}`);
35
+ }
36
+
37
+ /**
38
+ * Generate a unique message ID for Twitch messages.
39
+ *
40
+ * Twurple's say() doesn't return the message ID, so we generate one
41
+ * for tracking purposes.
42
+ *
43
+ * @returns A unique message ID
44
+ */
45
+ export function generateMessageId(): string {
46
+ return `${Date.now()}-${randomUUID()}`;
47
+ }
48
+
49
+ /**
50
+ * Normalize OAuth token by removing the "oauth:" prefix if present.
51
+ *
52
+ * Twurple doesn't require the "oauth:" prefix, so we strip it for consistency.
53
+ *
54
+ * @param token - The OAuth token to normalize
55
+ * @returns Normalized token without "oauth:" prefix
56
+ *
57
+ * @example
58
+ * normalizeToken("oauth:abc123") // "abc123"
59
+ * normalizeToken("abc123") // "abc123"
60
+ */
61
+ export function normalizeToken(token: string): string {
62
+ return token.startsWith("oauth:") ? token.slice(6) : token;
63
+ }
64
+
65
+ /**
66
+ * Check if an account is properly configured with required credentials.
67
+ *
68
+ * @param account - The Twitch account config to check
69
+ * @returns true if the account has required credentials
70
+ */
71
+ export function isAccountConfigured(
72
+ account: {
73
+ username?: string;
74
+ accessToken?: string;
75
+ clientId?: string;
76
+ },
77
+ resolvedToken?: string | null,
78
+ ): boolean {
79
+ const token = resolvedToken ?? account?.accessToken;
80
+ return Boolean(account?.username && token && account?.clientId);
81
+ }
package/test/setup.ts ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Vitest setup file for Twitch plugin tests.
3
+ *
4
+ * Re-exports the root test setup to avoid duplication.
5
+ */
6
+
7
+ export * from "../../../test/setup.js";
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "../tsconfig.package-boundary.base.json",
3
+ "compilerOptions": {
4
+ "rootDir": "."
5
+ },
6
+ "include": ["./*.ts", "./src/**/*.ts"],
7
+ "exclude": [
8
+ "./**/*.test.ts",
9
+ "./dist/**",
10
+ "./node_modules/**",
11
+ "./src/test-support/**",
12
+ "./src/**/*test-helpers.ts",
13
+ "./src/**/*test-harness.ts",
14
+ "./src/**/*test-support.ts"
15
+ ]
16
+ }
package/api.js DELETED
@@ -1,7 +0,0 @@
1
- export * from "../../../dist/extensions/twitch/api.js";
2
- import * as module from "../../../dist/extensions/twitch/api.js";
3
- let defaultExport = "default" in module ? module.default : module;
4
- for (let index = 0; index < 4 && defaultExport && typeof defaultExport === "object" && "default" in defaultExport; index += 1) {
5
- defaultExport = defaultExport.default;
6
- }
7
- export { defaultExport as default };
@@ -1,7 +0,0 @@
1
- export * from "../../../dist/extensions/twitch/channel-plugin-api.js";
2
- import * as module from "../../../dist/extensions/twitch/channel-plugin-api.js";
3
- let defaultExport = "default" in module ? module.default : module;
4
- for (let index = 0; index < 4 && defaultExport && typeof defaultExport === "object" && "default" in defaultExport; index += 1) {
5
- defaultExport = defaultExport.default;
6
- }
7
- export { defaultExport as default };
package/index.js DELETED
@@ -1,7 +0,0 @@
1
- export * from "../../../dist/extensions/twitch/index.js";
2
- import defaultModule from "../../../dist/extensions/twitch/index.js";
3
- let defaultExport = defaultModule;
4
- for (let index = 0; index < 4 && defaultExport && typeof defaultExport === "object" && "default" in defaultExport; index += 1) {
5
- defaultExport = defaultExport.default;
6
- }
7
- export { defaultExport as default };
package/runtime-api.js DELETED
@@ -1,7 +0,0 @@
1
- export * from "../../../dist/extensions/twitch/runtime-api.js";
2
- import * as module from "../../../dist/extensions/twitch/runtime-api.js";
3
- let defaultExport = "default" in module ? module.default : module;
4
- for (let index = 0; index < 4 && defaultExport && typeof defaultExport === "object" && "default" in defaultExport; index += 1) {
5
- defaultExport = defaultExport.default;
6
- }
7
- export { defaultExport as default };
package/setup-entry.js DELETED
@@ -1,7 +0,0 @@
1
- export * from "../../../dist/extensions/twitch/setup-entry.js";
2
- import defaultModule from "../../../dist/extensions/twitch/setup-entry.js";
3
- let defaultExport = defaultModule;
4
- for (let index = 0; index < 4 && defaultExport && typeof defaultExport === "object" && "default" in defaultExport; index += 1) {
5
- defaultExport = defaultExport.default;
6
- }
7
- export { defaultExport as default };
@@ -1,7 +0,0 @@
1
- export * from "../../../dist/extensions/twitch/setup-plugin-api.js";
2
- import * as module from "../../../dist/extensions/twitch/setup-plugin-api.js";
3
- let defaultExport = "default" in module ? module.default : module;
4
- for (let index = 0; index < 4 && defaultExport && typeof defaultExport === "object" && "default" in defaultExport; index += 1) {
5
- defaultExport = defaultExport.default;
6
- }
7
- export { defaultExport as default };