@zintrust/redis-rpc 2.4.1
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 +257 -0
- package/dist/adapters.d.ts +43 -0
- package/dist/adapters.js +48 -0
- package/dist/backend.d.ts +2 -0
- package/dist/backend.js +557 -0
- package/dist/build-manifest.json +94 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +82 -0
- package/dist/env.d.ts +17 -0
- package/dist/env.js +24 -0
- package/dist/errors.d.ts +8 -0
- package/dist/errors.js +30 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +10 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.js +65 -0
- package/dist/types.d.ts +65 -0
- package/dist/types.js +1 -0
- package/package.json +63 -0
package/dist/client.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ErrorFactory, isUndefinedOrNull } from '@zintrust/core/runtime';
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import http from 'node:http';
|
|
4
|
+
import https from 'node:https';
|
|
5
|
+
import { rpcServerOptions } from './env.js';
|
|
6
|
+
const requestJson = (url, body, headers) => {
|
|
7
|
+
return new Promise((resolve, reject) => {
|
|
8
|
+
const transport = url.protocol === 'https:' ? https : http;
|
|
9
|
+
const request = transport.request(url, {
|
|
10
|
+
method: 'POST',
|
|
11
|
+
agent: false,
|
|
12
|
+
headers: {
|
|
13
|
+
...headers,
|
|
14
|
+
'content-length': String(Buffer.byteLength(body)),
|
|
15
|
+
},
|
|
16
|
+
}, (response) => {
|
|
17
|
+
const chunks = [];
|
|
18
|
+
response.setEncoding('utf8');
|
|
19
|
+
response.on('data', (chunk) => chunks.push(chunk));
|
|
20
|
+
response.on('end', () => {
|
|
21
|
+
const text = chunks.join('');
|
|
22
|
+
try {
|
|
23
|
+
resolve({
|
|
24
|
+
statusCode: response.statusCode || 0,
|
|
25
|
+
ok: (response.statusCode || 0) >= 200 && (response.statusCode || 0) < 300,
|
|
26
|
+
body: isUndefinedOrNull(text.trim()) ? {} : JSON.parse(text),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
reject(ErrorFactory.createTryCatchError('Redis RPC response parse failed', { error }));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
request.on('error', (error) => reject(ErrorFactory.createConnectionError('Redis RPC request failed', { error })));
|
|
35
|
+
request.end(body);
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
const createServiceProxy = (client, service, target) => {
|
|
39
|
+
return new Proxy(Object.create(null), {
|
|
40
|
+
get(_receiver, property) {
|
|
41
|
+
if (typeof property !== 'string')
|
|
42
|
+
return undefined;
|
|
43
|
+
return (...args) => client.call(service, property, { target, args });
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
export const createRedisRpcClient = (options = {}) => {
|
|
48
|
+
const settings = rpcServerOptions();
|
|
49
|
+
const baseUrl = options.baseUrl || `http://${settings.host}:${settings.port}`;
|
|
50
|
+
const secret = options.secret ?? settings.secret;
|
|
51
|
+
const client = Object.freeze({
|
|
52
|
+
call: async (service, method, payload = {}) => {
|
|
53
|
+
const url = new URL('/rpc', baseUrl);
|
|
54
|
+
const body = JSON.stringify({
|
|
55
|
+
requestId: randomUUID(),
|
|
56
|
+
service,
|
|
57
|
+
method,
|
|
58
|
+
payload,
|
|
59
|
+
});
|
|
60
|
+
const response = await requestJson(url, body, {
|
|
61
|
+
'content-type': 'application/json',
|
|
62
|
+
connection: 'close',
|
|
63
|
+
...(secret ? { 'x-redis-rpc-secret': secret } : {}),
|
|
64
|
+
});
|
|
65
|
+
const parsed = response.body;
|
|
66
|
+
if (!response.ok || parsed.ok !== true) {
|
|
67
|
+
const error = parsed.error;
|
|
68
|
+
throw ErrorFactory.createTryCatchError(error?.message || `Redis RPC failed (${response.statusCode})`, {
|
|
69
|
+
code: error?.code,
|
|
70
|
+
details: error?.details,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return parsed.result;
|
|
74
|
+
},
|
|
75
|
+
queue: (method, payload = {}) => client.call('queue', method, payload),
|
|
76
|
+
worker: (method, payload = {}) => client.call('worker', method, payload),
|
|
77
|
+
monitor: (method, payload = {}) => client.call('queue-monitor', method, payload),
|
|
78
|
+
redis: (method, payload = {}) => client.call('redis', method, payload),
|
|
79
|
+
service: (service, target) => createServiceProxy(client, service, target),
|
|
80
|
+
});
|
|
81
|
+
return client;
|
|
82
|
+
};
|
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type RedisRpcRedisOptions = Readonly<{
|
|
2
|
+
host: string;
|
|
3
|
+
port: number;
|
|
4
|
+
password?: string;
|
|
5
|
+
db: number;
|
|
6
|
+
maxRetriesPerRequest: null;
|
|
7
|
+
}>;
|
|
8
|
+
export type RedisRpcServerOptions = Readonly<{
|
|
9
|
+
host: string;
|
|
10
|
+
port: number;
|
|
11
|
+
secret: string;
|
|
12
|
+
prefix: string;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const readString: (key: string, fallback?: string) => string;
|
|
15
|
+
export declare const readInt: (key: string, fallback: number) => number;
|
|
16
|
+
export declare const redisConnectionOptions: () => RedisRpcRedisOptions;
|
|
17
|
+
export declare const rpcServerOptions: () => RedisRpcServerOptions;
|
package/dist/env.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { isNull } from '@zintrust/core/helper';
|
|
2
|
+
import { config as loadDotenv } from 'dotenv';
|
|
3
|
+
loadDotenv({ path: process.env.REDIS_RPC_ENV_FILE || '.env' });
|
|
4
|
+
export const readString = (key, fallback = '') => {
|
|
5
|
+
const value = process.env[key];
|
|
6
|
+
return typeof value === 'string' && !isNull(value.trim()) ? value.trim() : fallback;
|
|
7
|
+
};
|
|
8
|
+
export const readInt = (key, fallback) => {
|
|
9
|
+
const parsed = Number.parseInt(readString(key, String(fallback)), 10);
|
|
10
|
+
return Number.isFinite(parsed) ? parsed : fallback;
|
|
11
|
+
};
|
|
12
|
+
export const redisConnectionOptions = () => ({
|
|
13
|
+
host: readString('REDIS_RPC_REDIS_HOST', readString('REDIS_HOST', '127.0.0.1')),
|
|
14
|
+
port: readInt('REDIS_RPC_REDIS_PORT', readInt('REDIS_PORT', 6379)),
|
|
15
|
+
password: readString('REDIS_RPC_REDIS_PASSWORD', readString('REDIS_PASSWORD', '')) || undefined,
|
|
16
|
+
db: readInt('REDIS_RPC_REDIS_DB', readInt('REDIS_QUEUE_DB', readInt('REDIS_DB', 0))),
|
|
17
|
+
maxRetriesPerRequest: null,
|
|
18
|
+
});
|
|
19
|
+
export const rpcServerOptions = () => ({
|
|
20
|
+
host: readString('REDIS_RPC_HOST', '127.0.0.1'),
|
|
21
|
+
port: readInt('REDIS_RPC_PORT', 8794),
|
|
22
|
+
secret: readString('REDIS_RPC_SECRET', readString('REDIS_PROXY_SECRET', readString('APP_KEY', ''))),
|
|
23
|
+
prefix: readString('REDIS_RPC_BULLMQ_PREFIX', readString('BULLMQ_PREFIX', 'bull')),
|
|
24
|
+
});
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const createRpcValidationError: (message: string, details?: unknown) => Error;
|
|
2
|
+
export declare const createRpcUnauthorizedError: (message: string, details?: unknown) => Error;
|
|
3
|
+
export declare const createRpcNotFoundError: (message: string, details?: unknown) => Error;
|
|
4
|
+
export declare const createRpcFailureError: (message: string, details?: unknown) => Error;
|
|
5
|
+
export declare const toErrorPayload: (error: unknown) => Readonly<{
|
|
6
|
+
status: number;
|
|
7
|
+
body: unknown;
|
|
8
|
+
}>;
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ErrorFactory } from '@zintrust/core/runtime';
|
|
2
|
+
export const createRpcValidationError = (message, details) => {
|
|
3
|
+
return ErrorFactory.createValidationError(message, details);
|
|
4
|
+
};
|
|
5
|
+
export const createRpcUnauthorizedError = (message, details) => {
|
|
6
|
+
return ErrorFactory.createUnauthorizedError(message, details);
|
|
7
|
+
};
|
|
8
|
+
export const createRpcNotFoundError = (message, details) => {
|
|
9
|
+
return ErrorFactory.createNotFoundError(message, details);
|
|
10
|
+
};
|
|
11
|
+
export const createRpcFailureError = (message, details) => {
|
|
12
|
+
return ErrorFactory.createTryCatchError(message, details);
|
|
13
|
+
};
|
|
14
|
+
export const toErrorPayload = (error) => {
|
|
15
|
+
const value = error;
|
|
16
|
+
const code = typeof value.code === 'string' && value.code.length > 0 ? value.code : 'REDIS_RPC_ERROR';
|
|
17
|
+
const message = typeof value.message === 'string' && value.message.length > 0 ? value.message : 'Redis RPC request failed';
|
|
18
|
+
const status = typeof value.statusCode === 'number' && value.statusCode >= 400 ? value.statusCode : 500;
|
|
19
|
+
return {
|
|
20
|
+
status,
|
|
21
|
+
body: {
|
|
22
|
+
ok: false,
|
|
23
|
+
error: {
|
|
24
|
+
code,
|
|
25
|
+
message,
|
|
26
|
+
details: value.details,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { createRedisRpcServer, listenRedisRpcServer } from './server';
|
|
2
|
+
export { createRedisRpcClient } from './client';
|
|
3
|
+
export { createBullMqRpcQueue, createWorkerRpcRuntime, createQueueMonitorRpcDriver, createRedisRpcService, } from './adapters';
|
|
4
|
+
export { createRedisRpcBackend } from './backend';
|
|
5
|
+
export type { RpcPayload, RpcRequest, RpcErrorBody, RpcSuccessBody, RedisRpcBackendState, RedisRpcServiceHandler, RedisRpcBackend, CreateRedisRpcBackendOptions, RedisRpcClientOptions, RedisRpcClient, RedisRpcServerInstance, } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Package version and build metadata
|
|
8
|
+
* Available at runtime for debugging and health checks
|
|
9
|
+
*/
|
|
10
|
+
export declare const _ZINTRUST_REDIS_RPC_VERSION = "1.0.0";
|
|
11
|
+
export declare const _ZINTRUST_REDIS_RPC_BUILD_DATE = "__BUILD_DATE__";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { createRedisRpcServer, listenRedisRpcServer } from './server.js';
|
|
2
|
+
export { createRedisRpcClient } from './client.js';
|
|
3
|
+
export { createBullMqRpcQueue, createWorkerRpcRuntime, createQueueMonitorRpcDriver, createRedisRpcService, } from './adapters.js';
|
|
4
|
+
export { createRedisRpcBackend } from './backend.js';
|
|
5
|
+
/**
|
|
6
|
+
* Package version and build metadata
|
|
7
|
+
* Available at runtime for debugging and health checks
|
|
8
|
+
*/
|
|
9
|
+
export const _ZINTRUST_REDIS_RPC_VERSION = '1.0.0';
|
|
10
|
+
export const _ZINTRUST_REDIS_RPC_BUILD_DATE = '__BUILD_DATE__';
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { RedisRpcServerInstance } from './types';
|
|
2
|
+
export declare const createRedisRpcServer: (options?: Record<string, unknown>) => RedisRpcServerInstance;
|
|
3
|
+
export declare const listenRedisRpcServer: (options?: Record<string, unknown>) => Promise<RedisRpcServerInstance>;
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { isObject } from '@zintrust/core/helper';
|
|
2
|
+
import { Logger } from '@zintrust/core/runtime';
|
|
3
|
+
import http from 'node:http';
|
|
4
|
+
import { createRedisRpcBackend } from './backend.js';
|
|
5
|
+
import { rpcServerOptions } from './env.js';
|
|
6
|
+
import { createRpcNotFoundError, createRpcUnauthorizedError, toErrorPayload } from './errors.js';
|
|
7
|
+
const readBody = async (request) => {
|
|
8
|
+
const chunks = [];
|
|
9
|
+
for await (const chunk of request) {
|
|
10
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
11
|
+
}
|
|
12
|
+
return Buffer.concat(chunks).toString('utf8');
|
|
13
|
+
};
|
|
14
|
+
const json = (response, status, payload) => {
|
|
15
|
+
response.writeHead(status, {
|
|
16
|
+
'content-type': 'application/json; charset=utf-8',
|
|
17
|
+
'cache-control': 'no-store',
|
|
18
|
+
});
|
|
19
|
+
response.end(JSON.stringify(payload));
|
|
20
|
+
};
|
|
21
|
+
export const createRedisRpcServer = (options = {}) => {
|
|
22
|
+
const settings = { ...rpcServerOptions(), ...options };
|
|
23
|
+
const backend = isObject(options.backend)
|
|
24
|
+
? options.backend
|
|
25
|
+
: createRedisRpcBackend(settings);
|
|
26
|
+
const server = http.createServer(async (request, response) => {
|
|
27
|
+
try {
|
|
28
|
+
const url = new URL(request.url || '/', `http://${request.headers.host || 'localhost'}`);
|
|
29
|
+
if (request.method === 'GET' && url.pathname === '/health') {
|
|
30
|
+
json(response, 200, { ok: true, service: 'redis-rpc', prefix: backend.prefix });
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (request.method !== 'POST' || url.pathname !== '/rpc') {
|
|
34
|
+
throw createRpcNotFoundError('Unknown Redis RPC route');
|
|
35
|
+
}
|
|
36
|
+
if (!settings.secret || request.headers['x-redis-rpc-secret'] !== settings.secret) {
|
|
37
|
+
throw createRpcUnauthorizedError('Invalid Redis RPC secret');
|
|
38
|
+
}
|
|
39
|
+
const bodyText = await readBody(request);
|
|
40
|
+
const body = (bodyText.trim().length === 0 ? {} : JSON.parse(bodyText));
|
|
41
|
+
const result = await backend.dispatch(String(body.service || ''), String(body.method || ''), body.payload ?? {});
|
|
42
|
+
json(response, 200, { ok: true, requestId: body.requestId ?? null, result, error: null });
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
const payload = toErrorPayload(error);
|
|
46
|
+
json(response, payload.status, payload.body);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return { server, backend, settings };
|
|
50
|
+
};
|
|
51
|
+
export const listenRedisRpcServer = async (options = {}) => {
|
|
52
|
+
const created = createRedisRpcServer(options);
|
|
53
|
+
await new Promise((resolve) => created.server.listen(created.settings.port, created.settings.host, resolve));
|
|
54
|
+
return created;
|
|
55
|
+
};
|
|
56
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
57
|
+
const created = await listenRedisRpcServer();
|
|
58
|
+
Logger.info(`redis-rpc listening on http://${created.settings.host}:${created.settings.port}`);
|
|
59
|
+
const shutdown = async () => {
|
|
60
|
+
await created.backend.close();
|
|
61
|
+
created.server.close(() => process.exit(0));
|
|
62
|
+
};
|
|
63
|
+
process.on('SIGINT', () => void shutdown());
|
|
64
|
+
process.on('SIGTERM', () => void shutdown());
|
|
65
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { RedisOptions } from 'ioredis';
|
|
2
|
+
import type http from 'node:http';
|
|
3
|
+
import type { RedisRpcRedisOptions, RedisRpcServerOptions } from './env';
|
|
4
|
+
export type RpcPayload = Record<string, unknown> & Readonly<{
|
|
5
|
+
args?: unknown[];
|
|
6
|
+
target?: string;
|
|
7
|
+
queue?: string;
|
|
8
|
+
queueName?: string;
|
|
9
|
+
}>;
|
|
10
|
+
export type RpcRequest = Readonly<{
|
|
11
|
+
requestId?: string | null;
|
|
12
|
+
service: string;
|
|
13
|
+
method: string;
|
|
14
|
+
payload?: RpcPayload;
|
|
15
|
+
}>;
|
|
16
|
+
export type RpcErrorBody = Readonly<{
|
|
17
|
+
ok: false;
|
|
18
|
+
error: Readonly<{
|
|
19
|
+
code: string;
|
|
20
|
+
message: string;
|
|
21
|
+
details?: unknown;
|
|
22
|
+
}>;
|
|
23
|
+
}>;
|
|
24
|
+
export type RpcSuccessBody<T = unknown> = Readonly<{
|
|
25
|
+
ok: true;
|
|
26
|
+
requestId: string | null;
|
|
27
|
+
result: T;
|
|
28
|
+
error: null;
|
|
29
|
+
}>;
|
|
30
|
+
export type RedisRpcBackendState = {
|
|
31
|
+
prefix: string;
|
|
32
|
+
connectionOptions: RedisRpcRedisOptions | RedisOptions;
|
|
33
|
+
};
|
|
34
|
+
export type RedisRpcServiceHandler = (input: Readonly<{
|
|
35
|
+
method: string;
|
|
36
|
+
payload: RpcPayload;
|
|
37
|
+
backend: RedisRpcBackend;
|
|
38
|
+
}>) => Promise<unknown>;
|
|
39
|
+
export type RedisRpcBackend = Readonly<{
|
|
40
|
+
prefix: string;
|
|
41
|
+
dispatch: (service: string, method: string, payload?: RpcPayload) => Promise<unknown>;
|
|
42
|
+
registerService: (service: string, handler: RedisRpcServiceHandler) => void;
|
|
43
|
+
close: () => Promise<void>;
|
|
44
|
+
}>;
|
|
45
|
+
export type CreateRedisRpcBackendOptions = Partial<RedisRpcServerOptions> & Readonly<{
|
|
46
|
+
redis?: RedisRpcRedisOptions | RedisOptions;
|
|
47
|
+
services?: Record<string, RedisRpcServiceHandler>;
|
|
48
|
+
}>;
|
|
49
|
+
export type RedisRpcClientOptions = Partial<RedisRpcServerOptions> & Readonly<{
|
|
50
|
+
baseUrl?: string;
|
|
51
|
+
secret?: string;
|
|
52
|
+
}>;
|
|
53
|
+
export type RedisRpcClient = Readonly<{
|
|
54
|
+
call: <T = unknown>(service: string, method: string, payload?: RpcPayload) => Promise<T>;
|
|
55
|
+
queue: <T = unknown>(method: string, payload?: RpcPayload) => Promise<T>;
|
|
56
|
+
worker: <T = unknown>(method: string, payload?: RpcPayload) => Promise<T>;
|
|
57
|
+
monitor: <T = unknown>(method: string, payload?: RpcPayload) => Promise<T>;
|
|
58
|
+
redis: <T = unknown>(method: string, payload?: RpcPayload) => Promise<T>;
|
|
59
|
+
service: <TService extends object = Record<string, (...args: unknown[]) => Promise<unknown>>>(service: string, target?: string) => TService;
|
|
60
|
+
}>;
|
|
61
|
+
export type RedisRpcServerInstance = Readonly<{
|
|
62
|
+
server: http.Server;
|
|
63
|
+
backend: RedisRpcBackend;
|
|
64
|
+
settings: RedisRpcServerOptions;
|
|
65
|
+
}>;
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zintrust/redis-rpc",
|
|
3
|
+
"version": "2.4.1",
|
|
4
|
+
"description": "Redis RPC backend for BullMQ queue operations in ZinTrust.",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./server": {
|
|
18
|
+
"types": "./dist/server.d.ts",
|
|
19
|
+
"default": "./dist/server.js"
|
|
20
|
+
},
|
|
21
|
+
"./client": {
|
|
22
|
+
"types": "./dist/client.d.ts",
|
|
23
|
+
"default": "./dist/client.js"
|
|
24
|
+
},
|
|
25
|
+
"./adapters": {
|
|
26
|
+
"types": "./dist/adapters.d.ts",
|
|
27
|
+
"default": "./dist/adapters.js"
|
|
28
|
+
},
|
|
29
|
+
"./backend": {
|
|
30
|
+
"types": "./dist/backend.d.ts",
|
|
31
|
+
"default": "./dist/backend.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=20.0.0"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@zintrust/core": "2.4.0",
|
|
39
|
+
"bullmq": "^5.77.6",
|
|
40
|
+
"dotenv": "^17.2.3",
|
|
41
|
+
"ioredis": "^5.11.0"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@zintrust/core": "*"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"zintrust",
|
|
51
|
+
"redis",
|
|
52
|
+
"rpc",
|
|
53
|
+
"bullmq",
|
|
54
|
+
"queue",
|
|
55
|
+
"proxy"
|
|
56
|
+
],
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsc -p tsconfig.json && node ../../scripts/fix-dist-esm-imports.mjs dist",
|
|
59
|
+
"type-check": "tsc --noEmit -p tsconfig.json",
|
|
60
|
+
"test": "tsx test-bullmq.mjs",
|
|
61
|
+
"prepublishOnly": "npm run build"
|
|
62
|
+
}
|
|
63
|
+
}
|