slashbin-kit-core 0.0.0-stage → 1.0.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/dist/durable-queue-claim.d.ts +44 -0
- package/dist/durable-queue-claim.js +78 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/item-text.d.ts +13 -0
- package/dist/item-text.js +106 -0
- package/dist/queue-store.d.ts +36 -0
- package/dist/queue-store.js +62 -0
- package/package.json +31 -4
- package/README.md +0 -3
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { QueueStore } from "./queue-store.js";
|
|
2
|
+
export type DeadLetterReason = "malformed" | "max-attempts";
|
|
3
|
+
export type FailOutcome = "retry" | "deadletter";
|
|
4
|
+
export interface DurableQueueClaimOptions {
|
|
5
|
+
/** Redis list key, e.g. "events". */
|
|
6
|
+
queue: string;
|
|
7
|
+
/** MUST equal `${queue}:processing`. */
|
|
8
|
+
processing: string;
|
|
9
|
+
/** Integer >= 1, required, no default. Kit docs recommend 8. */
|
|
10
|
+
maxAttempts: number;
|
|
11
|
+
/** Integer >= 1; the BLMOVE timeout. Defaults to 1. */
|
|
12
|
+
blockSeconds?: number;
|
|
13
|
+
/** The adopter's dead-letter sink. */
|
|
14
|
+
deadLetter(item: string, reason: DeadLetterReason): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The only owner of a queue list and its processing list. At-least-once: an item is always in the queue,
|
|
18
|
+
* in its processing list, or in the dead-letter sink. Downstream actions MUST be idempotent.
|
|
19
|
+
*
|
|
20
|
+
* An item is a UTF-8 JSON object string. The kit reads and writes only its top-level `attempts` member, as text, so caller values are never re-encoded.
|
|
21
|
+
*/
|
|
22
|
+
export declare class DurableQueueClaim {
|
|
23
|
+
private readonly store;
|
|
24
|
+
private readonly options;
|
|
25
|
+
private readonly blockSeconds;
|
|
26
|
+
constructor(store: QueueStore, options: DurableQueueClaimOptions);
|
|
27
|
+
/**
|
|
28
|
+
* Moves the next item from the queue to the processing list and returns it, or null after blockSeconds
|
|
29
|
+
* with nothing to claim. A non-JSON-object item goes to the sink as "malformed" and the next is claimed.
|
|
30
|
+
* A sink or Redis failure rejects and leaves the item in processing until reconcile().
|
|
31
|
+
*/
|
|
32
|
+
claimNext(): Promise<string | null>;
|
|
33
|
+
/** Call after the handler succeeds. True when removed, false when already acked or reconciled. */
|
|
34
|
+
ack(item: string): Promise<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* Call after the handler fails. Writes a NEW item with attempts + 1 and every other byte of the original: requeued below maxAttempts,
|
|
37
|
+
* dead-lettered at it. The two Redis calls are not atomic, so a crash between them re-runs the item.
|
|
38
|
+
* The kit does not sleep; backoff belongs to the adopter's loop. `reason` is the adopter's to log:
|
|
39
|
+
* the kit has no logger and does not store it in the item.
|
|
40
|
+
*/
|
|
41
|
+
fail(item: string, reason: string): Promise<FailOutcome>;
|
|
42
|
+
/** Boot reconcile: moves every item in processing back to the queue. Call before the first claimNext(). */
|
|
43
|
+
reconcile(): Promise<number>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { isJsonObject, readAttempts, withAttempts } from "./item-text.js";
|
|
2
|
+
/**
|
|
3
|
+
* The only owner of a queue list and its processing list. At-least-once: an item is always in the queue,
|
|
4
|
+
* in its processing list, or in the dead-letter sink. Downstream actions MUST be idempotent.
|
|
5
|
+
*
|
|
6
|
+
* An item is a UTF-8 JSON object string. The kit reads and writes only its top-level `attempts` member, as text, so caller values are never re-encoded.
|
|
7
|
+
*/
|
|
8
|
+
export class DurableQueueClaim {
|
|
9
|
+
store;
|
|
10
|
+
options;
|
|
11
|
+
blockSeconds;
|
|
12
|
+
constructor(store, options) {
|
|
13
|
+
this.store = store;
|
|
14
|
+
this.options = options;
|
|
15
|
+
const { queue, processing, maxAttempts, blockSeconds = 1 } = options;
|
|
16
|
+
if (processing !== `${queue}:processing`) {
|
|
17
|
+
throw new Error(`DurableQueueClaim: processing must equal "${queue}:processing", got "${processing}"`);
|
|
18
|
+
}
|
|
19
|
+
if (!Number.isInteger(maxAttempts) || maxAttempts < 1) {
|
|
20
|
+
throw new Error(`DurableQueueClaim: maxAttempts must be an integer >= 1, got ${String(maxAttempts)}`);
|
|
21
|
+
}
|
|
22
|
+
if (!Number.isInteger(blockSeconds) || blockSeconds < 1) {
|
|
23
|
+
throw new Error(`DurableQueueClaim: blockSeconds must be an integer >= 1, got ${String(blockSeconds)}`);
|
|
24
|
+
}
|
|
25
|
+
this.blockSeconds = blockSeconds;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Moves the next item from the queue to the processing list and returns it, or null after blockSeconds
|
|
29
|
+
* with nothing to claim. A non-JSON-object item goes to the sink as "malformed" and the next is claimed.
|
|
30
|
+
* A sink or Redis failure rejects and leaves the item in processing until reconcile().
|
|
31
|
+
*/
|
|
32
|
+
async claimNext() {
|
|
33
|
+
const { queue, processing, deadLetter } = this.options;
|
|
34
|
+
for (;;) {
|
|
35
|
+
const raw = await this.store.blockingClaim(queue, processing, this.blockSeconds);
|
|
36
|
+
if (raw === null)
|
|
37
|
+
return null;
|
|
38
|
+
if (isJsonObject(raw))
|
|
39
|
+
return raw;
|
|
40
|
+
await deadLetter(raw, "malformed");
|
|
41
|
+
await this.store.remove(processing, raw);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** Call after the handler succeeds. True when removed, false when already acked or reconciled. */
|
|
45
|
+
async ack(item) {
|
|
46
|
+
return (await this.store.remove(this.options.processing, item)) === 1;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Call after the handler fails. Writes a NEW item with attempts + 1 and every other byte of the original: requeued below maxAttempts,
|
|
50
|
+
* dead-lettered at it. The two Redis calls are not atomic, so a crash between them re-runs the item.
|
|
51
|
+
* The kit does not sleep; backoff belongs to the adopter's loop. `reason` is the adopter's to log:
|
|
52
|
+
* the kit has no logger and does not store it in the item.
|
|
53
|
+
*/
|
|
54
|
+
async fail(item, reason) {
|
|
55
|
+
const { queue, processing, maxAttempts, deadLetter } = this.options;
|
|
56
|
+
if (!isJsonObject(item)) {
|
|
57
|
+
throw new Error(`DurableQueueClaim.fail: item is not a JSON object (handler failure: ${reason})`);
|
|
58
|
+
}
|
|
59
|
+
const attempts = readAttempts(item) + 1;
|
|
60
|
+
const next = withAttempts(item, attempts);
|
|
61
|
+
// Verify the replacement before anything is written or removed: a bad one leaves the item in processing.
|
|
62
|
+
if (!isJsonObject(next) || readAttempts(next) !== attempts || withAttempts(next, readAttempts(item)) !== withAttempts(item, readAttempts(item))) {
|
|
63
|
+
throw new Error("DurableQueueClaim.fail: replacement item does not preserve the original");
|
|
64
|
+
}
|
|
65
|
+
if (attempts < maxAttempts) {
|
|
66
|
+
await this.store.push(queue, next);
|
|
67
|
+
await this.store.remove(processing, item);
|
|
68
|
+
return "retry";
|
|
69
|
+
}
|
|
70
|
+
await deadLetter(next, "max-attempts");
|
|
71
|
+
await this.store.remove(processing, item);
|
|
72
|
+
return "deadletter";
|
|
73
|
+
}
|
|
74
|
+
/** Boot reconcile: moves every item in processing back to the queue. Call before the first claimNext(). */
|
|
75
|
+
reconcile() {
|
|
76
|
+
return this.store.requeueAll(this.options.processing, this.options.queue);
|
|
77
|
+
}
|
|
78
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { DurableQueueClaim } from "./durable-queue-claim.js";
|
|
2
|
+
export type { DurableQueueClaimOptions, FailOutcome, DeadLetterReason } from "./durable-queue-claim.js";
|
|
3
|
+
export { RedisQueueStore } from "./queue-store.js";
|
|
4
|
+
export type { QueueStore } from "./queue-store.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text-level access to the top-level `attempts` member of a queue item.
|
|
3
|
+
*
|
|
4
|
+
* The kit must change only `attempts`. Round-tripping an item through JSON.parse / JSON.stringify
|
|
5
|
+
* rewrites caller numbers (9007199254740993 becomes ...992, 1e400 becomes null, -0 becomes 0), so the
|
|
6
|
+
* item is edited as text: every byte outside the `attempts` value is carried over unchanged.
|
|
7
|
+
*/
|
|
8
|
+
/** The item's `attempts` as a non-negative integer, 0 when absent or not one. Last duplicate key wins, as in JSON.parse. */
|
|
9
|
+
export declare function readAttempts(raw: string): number;
|
|
10
|
+
/** The item with its top-level `attempts` set to `attempts`; every other byte is unchanged. */
|
|
11
|
+
export declare function withAttempts(raw: string, attempts: number): string;
|
|
12
|
+
/** True when `raw` parses as a JSON object (not null, an array or a scalar). */
|
|
13
|
+
export declare function isJsonObject(raw: string): boolean;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text-level access to the top-level `attempts` member of a queue item.
|
|
3
|
+
*
|
|
4
|
+
* The kit must change only `attempts`. Round-tripping an item through JSON.parse / JSON.stringify
|
|
5
|
+
* rewrites caller numbers (9007199254740993 becomes ...992, 1e400 becomes null, -0 becomes 0), so the
|
|
6
|
+
* item is edited as text: every byte outside the `attempts` value is carried over unchanged.
|
|
7
|
+
*/
|
|
8
|
+
const WHITESPACE = new Set([" ", "\t", "\n", "\r"]);
|
|
9
|
+
function skipWhitespace(raw, from) {
|
|
10
|
+
let at = from;
|
|
11
|
+
while (at < raw.length && WHITESPACE.has(raw[at]))
|
|
12
|
+
at++;
|
|
13
|
+
return at;
|
|
14
|
+
}
|
|
15
|
+
/** Index just after the string token that opens at `start` (a double quote). */
|
|
16
|
+
function endOfString(raw, start) {
|
|
17
|
+
let at = start + 1;
|
|
18
|
+
while (raw[at] !== '"')
|
|
19
|
+
at += raw[at] === "\\" ? 2 : 1;
|
|
20
|
+
return at + 1;
|
|
21
|
+
}
|
|
22
|
+
/** Index just after the JSON value that starts at `start`. Input must already be valid JSON. */
|
|
23
|
+
function endOfValue(raw, start) {
|
|
24
|
+
const first = raw[start];
|
|
25
|
+
if (first === '"')
|
|
26
|
+
return endOfString(raw, start);
|
|
27
|
+
if (first === "{" || first === "[") {
|
|
28
|
+
let depth = 0;
|
|
29
|
+
let at = start;
|
|
30
|
+
do {
|
|
31
|
+
const ch = raw[at];
|
|
32
|
+
if (ch === '"') {
|
|
33
|
+
at = endOfString(raw, at);
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (ch === "{" || ch === "[")
|
|
37
|
+
depth++;
|
|
38
|
+
else if (ch === "}" || ch === "]")
|
|
39
|
+
depth--;
|
|
40
|
+
at++;
|
|
41
|
+
} while (depth > 0);
|
|
42
|
+
return at;
|
|
43
|
+
}
|
|
44
|
+
let at = start;
|
|
45
|
+
while (at < raw.length && !WHITESPACE.has(raw[at]) && !",}]".includes(raw[at]))
|
|
46
|
+
at++;
|
|
47
|
+
return at;
|
|
48
|
+
}
|
|
49
|
+
/** Scans the members of a JSON object string already validated by JSON.parse. */
|
|
50
|
+
function scanObject(raw) {
|
|
51
|
+
const members = [];
|
|
52
|
+
let at = skipWhitespace(raw, 0) + 1; // past "{"
|
|
53
|
+
let insertAt = at;
|
|
54
|
+
for (;;) {
|
|
55
|
+
at = skipWhitespace(raw, at);
|
|
56
|
+
if (raw[at] === "}")
|
|
57
|
+
return { members, insertAt };
|
|
58
|
+
if (raw[at] === ",") {
|
|
59
|
+
at++;
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
const keyEnd = endOfString(raw, at);
|
|
63
|
+
const key = JSON.parse(raw.slice(at, keyEnd));
|
|
64
|
+
at = skipWhitespace(raw, keyEnd) + 1; // past ":"
|
|
65
|
+
const valueStart = skipWhitespace(raw, at);
|
|
66
|
+
const valueEnd = endOfValue(raw, valueStart);
|
|
67
|
+
members.push({ key, valueStart, valueEnd });
|
|
68
|
+
insertAt = valueEnd;
|
|
69
|
+
at = valueEnd;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/** The item's `attempts` as a non-negative integer, 0 when absent or not one. Last duplicate key wins, as in JSON.parse. */
|
|
73
|
+
export function readAttempts(raw) {
|
|
74
|
+
const found = scanObject(raw).members.filter((m) => m.key === "attempts");
|
|
75
|
+
const last = found[found.length - 1];
|
|
76
|
+
if (last === undefined)
|
|
77
|
+
return 0;
|
|
78
|
+
const value = JSON.parse(raw.slice(last.valueStart, last.valueEnd));
|
|
79
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 0 ? value : 0;
|
|
80
|
+
}
|
|
81
|
+
/** The item with its top-level `attempts` set to `attempts`; every other byte is unchanged. */
|
|
82
|
+
export function withAttempts(raw, attempts) {
|
|
83
|
+
const { members, insertAt } = scanObject(raw);
|
|
84
|
+
const existing = members.filter((m) => m.key === "attempts");
|
|
85
|
+
if (existing.length === 0) {
|
|
86
|
+
const member = `"attempts":${attempts}`;
|
|
87
|
+
return `${raw.slice(0, insertAt)}${members.length > 0 ? "," : ""}${member}${raw.slice(insertAt)}`;
|
|
88
|
+
}
|
|
89
|
+
let out = "";
|
|
90
|
+
let from = 0;
|
|
91
|
+
for (const m of existing) {
|
|
92
|
+
out += raw.slice(from, m.valueStart) + String(attempts);
|
|
93
|
+
from = m.valueEnd;
|
|
94
|
+
}
|
|
95
|
+
return out + raw.slice(from);
|
|
96
|
+
}
|
|
97
|
+
/** True when `raw` parses as a JSON object (not null, an array or a scalar). */
|
|
98
|
+
export function isJsonObject(raw) {
|
|
99
|
+
try {
|
|
100
|
+
const parsed = JSON.parse(raw);
|
|
101
|
+
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed);
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Redis } from "ioredis";
|
|
2
|
+
/** The Redis list operations DurableQueueClaim is allowed to use. Items are FIFO: push at head, claim at tail. */
|
|
3
|
+
export interface QueueStore {
|
|
4
|
+
/** LPUSH queue item. Resolves after the write. */
|
|
5
|
+
push(queue: string, item: string): Promise<void>;
|
|
6
|
+
/** BLMOVE queue processing RIGHT LEFT. Returns the item, or null on timeout. */
|
|
7
|
+
blockingClaim(queue: string, processing: string, timeoutSeconds: number): Promise<string | null>;
|
|
8
|
+
/** LREM processing 1 item. Returns the number removed (0 or 1). */
|
|
9
|
+
remove(processing: string, item: string): Promise<number>;
|
|
10
|
+
/** LMOVE processing queue RIGHT LEFT until empty. Returns the count moved. */
|
|
11
|
+
requeueAll(processing: string, queue: string): Promise<number>;
|
|
12
|
+
/** LPUSH deadKey item. The OLDEST dead letter is at the tail. */
|
|
13
|
+
deadLetterPush(deadKey: string, item: string): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Replays the OLDEST dead letter: sets its top-level attempts to 0 as text (every other byte unchanged),
|
|
16
|
+
* then moves it with one Lua EVAL that checks the destination is a list and the entry is still the oldest.
|
|
17
|
+
* Returns the replayed item string, or null when deadKey is empty. A dead letter that is not a JSON
|
|
18
|
+
* object, or a destination that is not a list, rejects and leaves both keys untouched.
|
|
19
|
+
*/
|
|
20
|
+
replayOldest(deadKey: string, queue: string): Promise<string | null>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* QueueStore over ioredis. Takes two connections: `client` for ordinary commands and `blockingClient`,
|
|
24
|
+
* dedicated to BLMOVE so a blocked claim never stalls other commands.
|
|
25
|
+
*/
|
|
26
|
+
export declare class RedisQueueStore implements QueueStore {
|
|
27
|
+
private readonly client;
|
|
28
|
+
private readonly blockingClient;
|
|
29
|
+
constructor(client: Redis, blockingClient: Redis);
|
|
30
|
+
push(queue: string, item: string): Promise<void>;
|
|
31
|
+
blockingClaim(queue: string, processing: string, timeoutSeconds: number): Promise<string | null>;
|
|
32
|
+
remove(processing: string, item: string): Promise<number>;
|
|
33
|
+
requeueAll(processing: string, queue: string): Promise<number>;
|
|
34
|
+
deadLetterPush(deadKey: string, item: string): Promise<void>;
|
|
35
|
+
replayOldest(deadKey: string, queue: string): Promise<string | null>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { isJsonObject, withAttempts } from "./item-text.js";
|
|
2
|
+
// ARGV[1] is the entry read from the tail, ARGV[2] its replacement. Returns 1 when moved, 0 when the tail
|
|
3
|
+
// changed since it was read. A non-list destination errors before anything is removed.
|
|
4
|
+
const REPLAY_OLDEST_LUA = `
|
|
5
|
+
local destination = redis.call('TYPE', KEYS[2])['ok']
|
|
6
|
+
if destination ~= 'list' and destination ~= 'none' then
|
|
7
|
+
return redis.error_reply('replayOldest: destination is not a list')
|
|
8
|
+
end
|
|
9
|
+
if redis.call('LINDEX', KEYS[1], -1) ~= ARGV[1] then return 0 end
|
|
10
|
+
redis.call('RPOP', KEYS[1])
|
|
11
|
+
redis.call('LPUSH', KEYS[2], ARGV[2])
|
|
12
|
+
return 1
|
|
13
|
+
`;
|
|
14
|
+
const REPLAY_ATTEMPTS = 10;
|
|
15
|
+
/**
|
|
16
|
+
* QueueStore over ioredis. Takes two connections: `client` for ordinary commands and `blockingClient`,
|
|
17
|
+
* dedicated to BLMOVE so a blocked claim never stalls other commands.
|
|
18
|
+
*/
|
|
19
|
+
export class RedisQueueStore {
|
|
20
|
+
client;
|
|
21
|
+
blockingClient;
|
|
22
|
+
constructor(client, blockingClient) {
|
|
23
|
+
this.client = client;
|
|
24
|
+
this.blockingClient = blockingClient;
|
|
25
|
+
if (client === blockingClient) {
|
|
26
|
+
throw new Error("RedisQueueStore: blockingClient must be a dedicated connection, not the shared client");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async push(queue, item) {
|
|
30
|
+
await this.client.lpush(queue, item);
|
|
31
|
+
}
|
|
32
|
+
blockingClaim(queue, processing, timeoutSeconds) {
|
|
33
|
+
return this.blockingClient.blmove(queue, processing, "RIGHT", "LEFT", timeoutSeconds);
|
|
34
|
+
}
|
|
35
|
+
remove(processing, item) {
|
|
36
|
+
return this.client.lrem(processing, 1, item);
|
|
37
|
+
}
|
|
38
|
+
async requeueAll(processing, queue) {
|
|
39
|
+
let moved = 0;
|
|
40
|
+
while ((await this.client.lmove(processing, queue, "RIGHT", "LEFT")) !== null) {
|
|
41
|
+
moved++;
|
|
42
|
+
}
|
|
43
|
+
return moved;
|
|
44
|
+
}
|
|
45
|
+
async deadLetterPush(deadKey, item) {
|
|
46
|
+
await this.client.lpush(deadKey, item);
|
|
47
|
+
}
|
|
48
|
+
async replayOldest(deadKey, queue) {
|
|
49
|
+
for (let attempt = 0; attempt < REPLAY_ATTEMPTS; attempt++) {
|
|
50
|
+
const oldest = await this.client.lindex(deadKey, -1);
|
|
51
|
+
if (oldest === null)
|
|
52
|
+
return null;
|
|
53
|
+
if (!isJsonObject(oldest)) {
|
|
54
|
+
throw new Error(`RedisQueueStore.replayOldest: oldest entry of "${deadKey}" is not a JSON object; left in place`);
|
|
55
|
+
}
|
|
56
|
+
const replacement = withAttempts(oldest, 0);
|
|
57
|
+
if ((await this.client.eval(REPLAY_OLDEST_LUA, 2, deadKey, queue, oldest, replacement)) === 1)
|
|
58
|
+
return replacement;
|
|
59
|
+
}
|
|
60
|
+
throw new Error(`RedisQueueStore.replayOldest: "${deadKey}" kept changing under the replay; nothing moved`);
|
|
61
|
+
}
|
|
62
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slashbin-kit-core",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Shared queue-claim primitives for Slashbin receiver and ingest kits: at-least-once claim, ack, retry and boot reconcile over Redis lists.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"check": "tsc --noEmit",
|
|
23
|
+
"build": "tsc",
|
|
24
|
+
"test": "vitest run"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"ioredis": "^5.4.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"typescript": "^5.6.0",
|
|
31
|
+
"vitest": "^3.0.0"
|
|
32
|
+
}
|
|
33
|
+
}
|
package/README.md
DELETED