@forklaunch/implementation-worker-redis 0.3.3 → 0.3.6
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/lib/consumers/index.d.mts +12 -26
- package/lib/consumers/index.d.ts +12 -26
- package/lib/consumers/index.js +15 -24
- package/lib/consumers/index.mjs +11 -13
- package/lib/domain/schemas/index.d.mts +7 -51
- package/lib/domain/schemas/index.d.ts +7 -51
- package/lib/domain/schemas/index.js +530 -873
- package/lib/domain/schemas/index.mjs +543 -850
- package/lib/domain/types/index.d.mts +3 -3
- package/lib/domain/types/index.d.ts +3 -3
- package/lib/domain/types/index.js +4 -8
- package/lib/eject/producers/redisWorker.producer.ts +0 -1
- package/lib/producers/index.d.mts +7 -11
- package/lib/producers/index.d.ts +7 -11
- package/lib/producers/index.js +7 -13
- package/lib/producers/index.mjs +3 -2
- package/package.json +11 -11
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
6
|
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
8
|
for (let key of __getOwnPropNames(from))
|
|
9
9
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, {
|
|
11
|
-
get: () => from[key],
|
|
12
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
-
});
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
11
|
}
|
|
15
12
|
return to;
|
|
16
13
|
};
|
|
17
|
-
var __toCommonJS = (mod) =>
|
|
18
|
-
__copyProps(__defProp({}, '__esModule', { value: true }), mod);
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
15
|
|
|
20
16
|
// domain/types/index.ts
|
|
21
17
|
var types_exports = {};
|
|
@@ -3,17 +3,13 @@ import { WorkerProducer } from '@forklaunch/interfaces-worker/interfaces';
|
|
|
3
3
|
import { WorkerEventEntity } from '@forklaunch/interfaces-worker/types';
|
|
4
4
|
import { RedisWorkerOptions } from '../domain/types/index.mjs';
|
|
5
5
|
|
|
6
|
-
declare class RedisWorkerProducer<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
private readonly options;
|
|
14
|
-
constructor(queueName: string, cache: TtlCache, options: Options);
|
|
15
|
-
enqueueJob(event: EventEntity): Promise<void>;
|
|
16
|
-
enqueueBatchJobs(events: EventEntity[]): Promise<void>;
|
|
6
|
+
declare class RedisWorkerProducer<EventEntity extends WorkerEventEntity, Options extends RedisWorkerOptions> implements WorkerProducer<EventEntity> {
|
|
7
|
+
private readonly queueName;
|
|
8
|
+
private readonly cache;
|
|
9
|
+
private readonly options;
|
|
10
|
+
constructor(queueName: string, cache: TtlCache, options: Options);
|
|
11
|
+
enqueueJob(event: EventEntity): Promise<void>;
|
|
12
|
+
enqueueBatchJobs(events: EventEntity[]): Promise<void>;
|
|
17
13
|
}
|
|
18
14
|
|
|
19
15
|
export { RedisWorkerProducer };
|
package/lib/producers/index.d.ts
CHANGED
|
@@ -3,17 +3,13 @@ import { WorkerProducer } from '@forklaunch/interfaces-worker/interfaces';
|
|
|
3
3
|
import { WorkerEventEntity } from '@forklaunch/interfaces-worker/types';
|
|
4
4
|
import { RedisWorkerOptions } from '../domain/types/index.js';
|
|
5
5
|
|
|
6
|
-
declare class RedisWorkerProducer<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
private readonly options;
|
|
14
|
-
constructor(queueName: string, cache: TtlCache, options: Options);
|
|
15
|
-
enqueueJob(event: EventEntity): Promise<void>;
|
|
16
|
-
enqueueBatchJobs(events: EventEntity[]): Promise<void>;
|
|
6
|
+
declare class RedisWorkerProducer<EventEntity extends WorkerEventEntity, Options extends RedisWorkerOptions> implements WorkerProducer<EventEntity> {
|
|
7
|
+
private readonly queueName;
|
|
8
|
+
private readonly cache;
|
|
9
|
+
private readonly options;
|
|
10
|
+
constructor(queueName: string, cache: TtlCache, options: Options);
|
|
11
|
+
enqueueJob(event: EventEntity): Promise<void>;
|
|
12
|
+
enqueueBatchJobs(events: EventEntity[]): Promise<void>;
|
|
17
13
|
}
|
|
18
14
|
|
|
19
15
|
export { RedisWorkerProducer };
|
package/lib/producers/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -8,18 +8,14 @@ var __export = (target, all) => {
|
|
|
8
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
9
|
};
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
12
|
for (let key of __getOwnPropNames(from))
|
|
13
13
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
15
|
}
|
|
19
16
|
return to;
|
|
20
17
|
};
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, '__esModule', { value: true }), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
|
|
24
20
|
// producers/index.ts
|
|
25
21
|
var producers_exports = {};
|
|
@@ -39,12 +35,10 @@ var RedisWorkerProducer = class {
|
|
|
39
35
|
await this.cache.enqueueRecord(this.queueName, event);
|
|
40
36
|
}
|
|
41
37
|
async enqueueBatchJobs(events) {
|
|
42
|
-
console.log('Enqueuing batch jobs', events);
|
|
43
38
|
await this.cache.enqueueBatchRecords(this.queueName, events);
|
|
44
39
|
}
|
|
45
40
|
};
|
|
46
41
|
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 &&
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
});
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
RedisWorkerProducer
|
|
44
|
+
});
|
package/lib/producers/index.mjs
CHANGED
|
@@ -9,8 +9,9 @@ var RedisWorkerProducer = class {
|
|
|
9
9
|
await this.cache.enqueueRecord(this.queueName, event);
|
|
10
10
|
}
|
|
11
11
|
async enqueueBatchJobs(events) {
|
|
12
|
-
console.log('Enqueuing batch jobs', events);
|
|
13
12
|
await this.cache.enqueueBatchRecords(this.queueName, events);
|
|
14
13
|
}
|
|
15
14
|
};
|
|
16
|
-
export {
|
|
15
|
+
export {
|
|
16
|
+
RedisWorkerProducer
|
|
17
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/implementation-worker-redis",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Redis implementation for forklaunch workers",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
"lib/**"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@forklaunch/core": "^0.
|
|
46
|
-
"@forklaunch/internal": "^0.
|
|
47
|
-
"@sinclair/typebox": "^0.34.
|
|
48
|
-
"zod": "^3.25.
|
|
49
|
-
"@forklaunch/interfaces-worker": "0.2.
|
|
45
|
+
"@forklaunch/core": "^0.10.4",
|
|
46
|
+
"@forklaunch/internal": "^0.1.4",
|
|
47
|
+
"@sinclair/typebox": "^0.34.37",
|
|
48
|
+
"zod": "^3.25.71",
|
|
49
|
+
"@forklaunch/interfaces-worker": "0.2.4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
52
|
+
"@typescript/native-preview": "7.0.0-dev.20250703.1",
|
|
53
53
|
"depcheck": "^1.4.7",
|
|
54
|
-
"eslint": "^9.
|
|
55
|
-
"prettier": "^3.
|
|
56
|
-
"typedoc": "^0.28.
|
|
57
|
-
"typescript-eslint": "^8.
|
|
54
|
+
"eslint": "^9.30.1",
|
|
55
|
+
"prettier": "^3.6.2",
|
|
56
|
+
"typedoc": "^0.28.7",
|
|
57
|
+
"typescript-eslint": "^8.35.1"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "tsc --noEmit && tsup producers/index.ts consumers/index.ts domain/schemas/index.ts domain/types/index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean && if [ -f eject-package.bash ]; then pnpm package:eject; fi",
|