@interactive-inc/flume 0.2.0 → 0.4.0
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/README.md +60 -39
- package/dist/connection-error-HUO3PC3G.js +16 -0
- package/dist/discord.d.ts +10 -85
- package/dist/discord.js +474 -175
- package/dist/github.d.ts +9 -48
- package/dist/github.js +391 -128
- package/dist/{http-error-BtXonO-W.js → http-error-CPSKoSie.js} +1 -1
- package/dist/index.d.ts +76 -45
- package/dist/index.js +225 -40
- package/dist/safe-invoke-callback-EpWXwfwp.js +170 -0
- package/dist/safe-read-text-DgrJ4Uhl.js +20 -0
- package/dist/safe-stringify-BWS-uXZP.js +172 -0
- package/dist/serial-queue-B9LoBc64.js +162 -0
- package/dist/slack.d.ts +10 -62
- package/dist/slack.js +377 -131
- package/dist/{types-tnOPBc1p.d.ts → types-D-tO-Mh2.d.ts} +36 -10
- package/package.json +21 -18
- package/dist/connection-error-BOk97djj.d.ts +0 -6
- package/dist/http-error-K-Ym4lfK.d.ts +0 -11
- package/dist/logger-CpGB9WO_.js +0 -49
- package/dist/parse-error-BAiCLRmk.d.ts +0 -6
- package/dist/safe-fetch-30ZzOKHL.js +0 -20
- package/dist/safe-json-parse-WCg_x1JS.js +0 -15
- package/dist/schedule-reconnect-DSxZJG3h.js +0 -93
- package/dist/serial-queue-ExmlnpzQ.js +0 -16
package/dist/github.d.ts
CHANGED
|
@@ -1,65 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as FlumeSourceStartOptions, T as FlumeStatus, c as FlumeHandler, o as FlumeGitHubNotification, s as FlumeGitHubSourceOptions } from "./types-D-tO-Mh2.js";
|
|
2
2
|
|
|
3
3
|
//#region lib/github/github-source.d.ts
|
|
4
4
|
declare class FlumeGitHubSource {
|
|
5
5
|
private readonly options;
|
|
6
6
|
readonly name: "github";
|
|
7
7
|
private poller;
|
|
8
|
-
private
|
|
8
|
+
private handler;
|
|
9
9
|
private readonly log;
|
|
10
10
|
private readonly deps;
|
|
11
11
|
private readonly queue;
|
|
12
|
+
private readonly signals;
|
|
13
|
+
private readonly statusEmitter;
|
|
14
|
+
private readonly onSignalAbort;
|
|
12
15
|
constructor(options: FlumeGitHubSourceOptions);
|
|
13
|
-
start(handler: FlumeHandler): Promise<
|
|
16
|
+
start(handler: FlumeHandler, options?: FlumeSourceStartOptions): Promise<Error | null>;
|
|
14
17
|
stop(): Promise<void>;
|
|
15
18
|
status(): FlumeStatus;
|
|
16
19
|
private handleNotifications;
|
|
17
|
-
private
|
|
20
|
+
private safeExtractMeta;
|
|
18
21
|
}
|
|
19
22
|
//#endregion
|
|
20
23
|
//#region lib/github/extract-github-meta.d.ts
|
|
21
|
-
declare function
|
|
24
|
+
declare function flumeExtractGitHubMeta(notification: FlumeGitHubNotification): Record<string, string>;
|
|
22
25
|
//#endregion
|
|
23
|
-
|
|
24
|
-
type Deps = Pick<FlumeRuntimeDeps, "fetch" | "setInterval" | "clearInterval" | "now">;
|
|
25
|
-
type Props$1 = {
|
|
26
|
-
token: string;
|
|
27
|
-
interval: number;
|
|
28
|
-
onNotifications: (notifications: FlumeGitHubNotification[]) => void;
|
|
29
|
-
onConnected: () => void;
|
|
30
|
-
onDisconnected: (detail: string) => void;
|
|
31
|
-
onLog?: FlumeLogHandler;
|
|
32
|
-
deps: Deps;
|
|
33
|
-
};
|
|
34
|
-
declare class FlumeGitHubPoller {
|
|
35
|
-
private readonly props;
|
|
36
|
-
private readonly log;
|
|
37
|
-
private readonly cache;
|
|
38
|
-
private timer;
|
|
39
|
-
private since;
|
|
40
|
-
private bootstrapped;
|
|
41
|
-
stopped: boolean;
|
|
42
|
-
private consecutiveErrors;
|
|
43
|
-
constructor(props: Props$1);
|
|
44
|
-
start(): Promise<void>;
|
|
45
|
-
stop(): void;
|
|
46
|
-
private poll;
|
|
47
|
-
private processNotifications;
|
|
48
|
-
private safeFetch;
|
|
49
|
-
}
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region lib/github/github-seen-cache.d.ts
|
|
52
|
-
type Props = {
|
|
53
|
-
maxSize: number;
|
|
54
|
-
};
|
|
55
|
-
declare class FlumeGitHubSeenCache {
|
|
56
|
-
private readonly props;
|
|
57
|
-
private seen;
|
|
58
|
-
constructor(props: Props);
|
|
59
|
-
has(id: string, updatedAt: string): boolean;
|
|
60
|
-
add(id: string, updatedAt: string): void;
|
|
61
|
-
trim(): void;
|
|
62
|
-
get size(): number;
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
export { FlumeGitHubNotificationSchema, FlumeGitHubPoller, FlumeGitHubSeenCache, FlumeGitHubSource, extractGitHubMeta };
|
|
26
|
+
export { FlumeGitHubSource, flumeExtractGitHubMeta };
|