@forklaunch/implementation-worker-database 0.1.1 → 0.1.3
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/package.json +3 -3
- package/lib/__test__/schemaEquality.test.d.ts +0 -2
- package/lib/__test__/schemaEquality.test.d.ts.map +0 -1
- package/lib/__test__/schemaEquality.test.js +0 -20
- package/lib/consumers/databaseWorker.consumer.d.ts +0 -32
- package/lib/consumers/databaseWorker.consumer.d.ts.map +0 -1
- package/lib/consumers/databaseWorker.consumer.js +0 -43
- package/lib/consumers/index.d.ts +0 -2
- package/lib/consumers/index.d.ts.map +0 -1
- package/lib/consumers/index.js +0 -1
- package/lib/eject/consumers/databaseWorker.consumer.ts +0 -56
- package/lib/eject/consumers/index.ts +0 -1
- package/lib/eject/domain/schemas/databaseWorker.schema.ts +0 -6
- package/lib/eject/domain/schemas/index.ts +0 -1
- package/lib/eject/producers/databaseWorker.producer.ts +0 -17
- package/lib/eject/producers/index.ts +0 -1
- package/lib/eject/types/databaseWorker.types.ts +0 -4
- package/lib/eject/types/index.ts +0 -1
- package/lib/jest.config.d.ts +0 -4
- package/lib/jest.config.d.ts.map +0 -1
- package/lib/jest.config.js +0 -19
- package/lib/producers/databaseWorker.producer.d.ts +0 -12
- package/lib/producers/databaseWorker.producer.d.ts.map +0 -1
- package/lib/producers/databaseWorker.producer.js +0 -12
- package/lib/producers/index.d.ts +0 -2
- package/lib/producers/index.d.ts.map +0 -1
- package/lib/producers/index.js +0 -1
- package/lib/schemas/databaseWorker.schema.d.ts +0 -42
- package/lib/schemas/databaseWorker.schema.d.ts.map +0 -1
- package/lib/schemas/databaseWorker.schema.js +0 -7
- package/lib/schemas/index.d.ts +0 -2
- package/lib/schemas/index.d.ts.map +0 -1
- package/lib/schemas/index.js +0 -1
- package/lib/schemas/typebox/databaseWorker.schema.d.ts +0 -29
- package/lib/schemas/typebox/databaseWorker.schema.d.ts.map +0 -1
- package/lib/schemas/typebox/databaseWorker.schema.js +0 -5
- package/lib/schemas/zod/databaseWorker.schema.d.ts +0 -5
- package/lib/schemas/zod/databaseWorker.schema.d.ts.map +0 -1
- package/lib/schemas/zod/databaseWorker.schema.js +0 -5
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/databaseWorker.types.d.ts +0 -5
- package/lib/types/databaseWorker.types.d.ts.map +0 -1
- package/lib/types/databaseWorker.types.js +0 -1
- package/lib/types/index.d.ts +0 -2
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/index.js +0 -1
- package/lib/vitest.config.d.ts +0 -3
- package/lib/vitest.config.d.ts.map +0 -1
- package/lib/vitest.config.js +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/implementation-worker-database",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Database implementation for forklaunch workers",
|
|
5
5
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"lib/**"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@forklaunch/core": "
|
|
41
|
+
"@forklaunch/core": "^0.7.4",
|
|
42
42
|
"@mikro-orm/core": "^6.4.13",
|
|
43
43
|
"@sinclair/typebox": "^0.34.33",
|
|
44
44
|
"zod": "^3.24.3",
|
|
45
|
-
"@forklaunch/interfaces-worker": "0.1.
|
|
45
|
+
"@forklaunch/interfaces-worker": "0.1.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"depcheck": "^1.4.7",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemaEquality.test.d.ts","sourceRoot":"","sources":["../../__test__/schemaEquality.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { isTrue } from '@forklaunch/common';
|
|
2
|
-
import { testSchemaEquality } from '@forklaunch/core/test';
|
|
3
|
-
import { DatabaseWorkerOptionsSchema as TypeboxDatabaseWorkerOptionsSchema } from '../schemas/typebox/databaseWorker.schema';
|
|
4
|
-
import { DatabaseWorkerOptionsSchema as ZodDatabaseWorkerOptionsSchema } from '../schemas/zod/databaseWorker.schema';
|
|
5
|
-
describe('schema equality', () => {
|
|
6
|
-
it('should be equal for bullmq worker', () => {
|
|
7
|
-
expect(
|
|
8
|
-
isTrue(
|
|
9
|
-
testSchemaEquality(
|
|
10
|
-
ZodDatabaseWorkerOptionsSchema,
|
|
11
|
-
TypeboxDatabaseWorkerOptionsSchema,
|
|
12
|
-
{
|
|
13
|
-
retries: 1,
|
|
14
|
-
interval: 1000
|
|
15
|
-
}
|
|
16
|
-
)
|
|
17
|
-
)
|
|
18
|
-
).toBeTruthy();
|
|
19
|
-
});
|
|
20
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { BaseEntity } from '@forklaunch/core/persistence';
|
|
2
|
-
import { WorkerConsumer } from '@forklaunch/interfaces-worker/interfaces';
|
|
3
|
-
import {
|
|
4
|
-
WorkerEventEntity,
|
|
5
|
-
WorkerFailureHandler,
|
|
6
|
-
WorkerProcessFunction
|
|
7
|
-
} from '@forklaunch/interfaces-worker/types';
|
|
8
|
-
import { EntityManager, EntityName } from '@mikro-orm/core';
|
|
9
|
-
import { DatabaseWorkerOptions } from '../types/databaseWorker.types';
|
|
10
|
-
export declare class DatabaseWorkerConsumer<
|
|
11
|
-
EventEntity extends WorkerEventEntity & BaseEntity,
|
|
12
|
-
Options extends DatabaseWorkerOptions
|
|
13
|
-
> implements WorkerConsumer<EventEntity>
|
|
14
|
-
{
|
|
15
|
-
protected readonly entityName: EntityName<EventEntity>;
|
|
16
|
-
protected readonly em: EntityManager;
|
|
17
|
-
protected readonly options: Options;
|
|
18
|
-
protected readonly processEvents: WorkerProcessFunction<EventEntity>;
|
|
19
|
-
protected readonly failureHandler: WorkerFailureHandler<EventEntity>;
|
|
20
|
-
constructor(
|
|
21
|
-
entityName: EntityName<EventEntity>,
|
|
22
|
-
em: EntityManager,
|
|
23
|
-
options: Options,
|
|
24
|
-
processEvents: WorkerProcessFunction<EventEntity>,
|
|
25
|
-
failureHandler: WorkerFailureHandler<EventEntity>
|
|
26
|
-
);
|
|
27
|
-
private retrieveEvents;
|
|
28
|
-
private updateEvents;
|
|
29
|
-
peekEvents(): Promise<EventEntity[]>;
|
|
30
|
-
start(): Promise<void>;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=databaseWorker.consumer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"databaseWorker.consumer.d.ts","sourceRoot":"","sources":["../../consumers/databaseWorker.consumer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,qBAAa,sBAAsB,CACjC,WAAW,SAAS,iBAAiB,GAAG,UAAU,EAClD,OAAO,SAAS,qBAAqB,CACrC,YAAW,cAAc,CAAC,WAAW,CAAC;IAGpC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,WAAW,CAAC;IACtD,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,aAAa;IACpC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO;IACnC,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC,WAAW,CAAC;IACpE,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,oBAAoB,CAAC,WAAW,CAAC;gBAJjD,UAAU,EAAE,UAAU,CAAC,WAAW,CAAC,EACnC,EAAE,EAAE,aAAa,EACjB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,qBAAqB,CAAC,WAAW,CAAC,EACjD,cAAc,EAAE,oBAAoB,CAAC,WAAW,CAAC;YAGxD,cAAc;YAUd,YAAY;IASpB,UAAU,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAIpC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAS7B"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export class DatabaseWorkerConsumer {
|
|
2
|
-
entityName;
|
|
3
|
-
em;
|
|
4
|
-
options;
|
|
5
|
-
processEvents;
|
|
6
|
-
failureHandler;
|
|
7
|
-
constructor(entityName, em, options, processEvents, failureHandler) {
|
|
8
|
-
this.entityName = entityName;
|
|
9
|
-
this.em = em;
|
|
10
|
-
this.options = options;
|
|
11
|
-
this.processEvents = processEvents;
|
|
12
|
-
this.failureHandler = failureHandler;
|
|
13
|
-
}
|
|
14
|
-
async retrieveEvents() {
|
|
15
|
-
return await this.em.getRepository(this.entityName).find({
|
|
16
|
-
where: {
|
|
17
|
-
processed: false,
|
|
18
|
-
retryCount: { $lt: this.options.retries }
|
|
19
|
-
},
|
|
20
|
-
orderBy: { createdAt: 'ASC' }
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
async updateEvents(events) {
|
|
24
|
-
await this.em.getRepository(this.entityName).upsertMany(
|
|
25
|
-
events.map((event) => ({
|
|
26
|
-
...event,
|
|
27
|
-
retryCount: event.retryCount + 1
|
|
28
|
-
}))
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
async peekEvents() {
|
|
32
|
-
return await this.retrieveEvents();
|
|
33
|
-
}
|
|
34
|
-
async start() {
|
|
35
|
-
setInterval(async () => {
|
|
36
|
-
const events = await this.retrieveEvents();
|
|
37
|
-
const failedEvents = await this.processEvents(events);
|
|
38
|
-
await this.failureHandler(failedEvents);
|
|
39
|
-
await this.updateEvents(failedEvents.map((event) => event.value));
|
|
40
|
-
await this.em.flush();
|
|
41
|
-
}, this.options.interval);
|
|
42
|
-
}
|
|
43
|
-
}
|
package/lib/consumers/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../consumers/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
package/lib/consumers/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './databaseWorker.consumer';
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { BaseEntity } from '@forklaunch/core/persistence';
|
|
2
|
-
import { WorkerConsumer } from '@forklaunch/interfaces-worker/interfaces';
|
|
3
|
-
import {
|
|
4
|
-
WorkerEventEntity,
|
|
5
|
-
WorkerFailureHandler,
|
|
6
|
-
WorkerProcessFunction
|
|
7
|
-
} from '@forklaunch/interfaces-worker/types';
|
|
8
|
-
import { EntityManager, EntityName } from '@mikro-orm/core';
|
|
9
|
-
import { DatabaseWorkerOptions } from '../types/databaseWorker.types';
|
|
10
|
-
|
|
11
|
-
export class DatabaseWorkerConsumer<
|
|
12
|
-
EventEntity extends WorkerEventEntity & BaseEntity,
|
|
13
|
-
Options extends DatabaseWorkerOptions
|
|
14
|
-
> implements WorkerConsumer<EventEntity>
|
|
15
|
-
{
|
|
16
|
-
constructor(
|
|
17
|
-
protected readonly entityName: EntityName<EventEntity>,
|
|
18
|
-
protected readonly em: EntityManager,
|
|
19
|
-
protected readonly options: Options,
|
|
20
|
-
protected readonly processEvents: WorkerProcessFunction<EventEntity>,
|
|
21
|
-
protected readonly failureHandler: WorkerFailureHandler<EventEntity>
|
|
22
|
-
) {}
|
|
23
|
-
|
|
24
|
-
private async retrieveEvents(): Promise<EventEntity[]> {
|
|
25
|
-
return await this.em.getRepository(this.entityName).find({
|
|
26
|
-
where: {
|
|
27
|
-
processed: false,
|
|
28
|
-
retryCount: { $lt: this.options.retries }
|
|
29
|
-
},
|
|
30
|
-
orderBy: { createdAt: 'ASC' }
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
private async updateEvents(events: EventEntity[]): Promise<void> {
|
|
35
|
-
await this.em.getRepository(this.entityName).upsertMany(
|
|
36
|
-
events.map((event) => ({
|
|
37
|
-
...event,
|
|
38
|
-
retryCount: event.retryCount + 1
|
|
39
|
-
}))
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
async peekEvents(): Promise<EventEntity[]> {
|
|
44
|
-
return await this.retrieveEvents();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
async start(): Promise<void> {
|
|
48
|
-
setInterval(async () => {
|
|
49
|
-
const events = await this.retrieveEvents();
|
|
50
|
-
const failedEvents = await this.processEvents(events);
|
|
51
|
-
await this.failureHandler(failedEvents);
|
|
52
|
-
await this.updateEvents(failedEvents.map((event) => event.value));
|
|
53
|
-
await this.em.flush();
|
|
54
|
-
}, this.options.interval);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './databaseWorker.consumer';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './databaseWorker.schema';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BaseEntity } from '@forklaunch/core/persistence';
|
|
2
|
-
import { WorkerEventEntity } from '@forklaunch/interfaces-worker/types';
|
|
3
|
-
import { EntityManager } from '@mikro-orm/core';
|
|
4
|
-
|
|
5
|
-
export class DatabaseWorkerProducer<
|
|
6
|
-
EventEntity extends WorkerEventEntity & BaseEntity
|
|
7
|
-
> {
|
|
8
|
-
constructor(private readonly em: EntityManager) {}
|
|
9
|
-
|
|
10
|
-
async enqueueJob(event: EventEntity): Promise<void> {
|
|
11
|
-
await this.em.persistAndFlush(event);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async enqueueBatchJobs(events: EventEntity[]): Promise<void> {
|
|
15
|
-
await this.em.persistAndFlush(events);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './databaseWorker.producer';
|
package/lib/eject/types/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './databaseWorker.types';
|
package/lib/jest.config.d.ts
DELETED
package/lib/jest.config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jest.config.d.ts","sourceRoot":"","sources":["../jest.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,QAAA,MAAM,UAAU,EAAE,oBAiBjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/lib/jest.config.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const jestConfig = {
|
|
2
|
-
preset: 'ts-jest/presets/default-esm', // or other ESM presets
|
|
3
|
-
moduleNameMapper: {
|
|
4
|
-
'^(\\.{1,2}/.*)\\.js$': '$1'
|
|
5
|
-
},
|
|
6
|
-
transform: {
|
|
7
|
-
// '^.+\\.[tj]sx?$' to process ts,js,tsx,jsx with `ts-jest`
|
|
8
|
-
// '^.+\\.m?[tj]sx?$' to process ts,js,tsx,jsx,mts,mjs,mtsx,mjsx with `ts-jest`
|
|
9
|
-
'^.+\\.[tj]sx?$': [
|
|
10
|
-
'ts-jest',
|
|
11
|
-
{
|
|
12
|
-
useESM: true
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
'^.+\\.js$': 'babel-jest'
|
|
16
|
-
},
|
|
17
|
-
testPathIgnorePatterns: ['.*dist/', '.*node_modules/']
|
|
18
|
-
};
|
|
19
|
-
export default jestConfig;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BaseEntity } from '@forklaunch/core/persistence';
|
|
2
|
-
import { WorkerEventEntity } from '@forklaunch/interfaces-worker/types';
|
|
3
|
-
import { EntityManager } from '@mikro-orm/core';
|
|
4
|
-
export declare class DatabaseWorkerProducer<
|
|
5
|
-
EventEntity extends WorkerEventEntity & BaseEntity
|
|
6
|
-
> {
|
|
7
|
-
private readonly em;
|
|
8
|
-
constructor(em: EntityManager);
|
|
9
|
-
enqueueJob(event: EventEntity): Promise<void>;
|
|
10
|
-
enqueueBatchJobs(events: EventEntity[]): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=databaseWorker.producer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"databaseWorker.producer.d.ts","sourceRoot":"","sources":["../../producers/databaseWorker.producer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,sBAAsB,CACjC,WAAW,SAAS,iBAAiB,GAAG,UAAU;IAEtC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,aAAa;IAExC,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7D"}
|
package/lib/producers/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../producers/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
package/lib/producers/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './databaseWorker.producer';
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export declare const DatabaseWorkerSchemas: <
|
|
2
|
-
SchemaValidator extends import('@forklaunch/validator').AnySchemaValidator
|
|
3
|
-
>(
|
|
4
|
-
options: Record<string, unknown> & {
|
|
5
|
-
validator: SchemaValidator;
|
|
6
|
-
}
|
|
7
|
-
) => import('@forklaunch/core/mappers').SchemasByValidator<
|
|
8
|
-
SchemaValidator,
|
|
9
|
-
(options: Record<string, unknown>) => {
|
|
10
|
-
retries: import('@sinclair/typebox').TTransform<
|
|
11
|
-
import('@sinclair/typebox').TUnion<
|
|
12
|
-
[
|
|
13
|
-
import('@sinclair/typebox').TNumber,
|
|
14
|
-
import('@sinclair/typebox').TString,
|
|
15
|
-
import('@sinclair/typebox').TBoolean,
|
|
16
|
-
import('@sinclair/typebox').TNull,
|
|
17
|
-
import('@sinclair/typebox').TDate,
|
|
18
|
-
import('@sinclair/typebox').TBigInt
|
|
19
|
-
]
|
|
20
|
-
>,
|
|
21
|
-
number
|
|
22
|
-
>;
|
|
23
|
-
interval: import('@sinclair/typebox').TTransform<
|
|
24
|
-
import('@sinclair/typebox').TUnion<
|
|
25
|
-
[
|
|
26
|
-
import('@sinclair/typebox').TNumber,
|
|
27
|
-
import('@sinclair/typebox').TString,
|
|
28
|
-
import('@sinclair/typebox').TBoolean,
|
|
29
|
-
import('@sinclair/typebox').TNull,
|
|
30
|
-
import('@sinclair/typebox').TDate,
|
|
31
|
-
import('@sinclair/typebox').TBigInt
|
|
32
|
-
]
|
|
33
|
-
>,
|
|
34
|
-
number
|
|
35
|
-
>;
|
|
36
|
-
},
|
|
37
|
-
(options: Record<string, unknown>) => {
|
|
38
|
-
retries: import('zod').ZodNumber;
|
|
39
|
-
interval: import('zod').ZodNumber;
|
|
40
|
-
}
|
|
41
|
-
>;
|
|
42
|
-
//# sourceMappingURL=databaseWorker.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"databaseWorker.schema.d.ts","sourceRoot":"","sources":["../../schemas/databaseWorker.schema.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;;;;;;;EAGjC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { serviceSchemaResolver } from '@forklaunch/core/mappers';
|
|
2
|
-
import { DatabaseWorkerOptionsSchema as TypeBoxSchemas } from './typebox/databaseWorker.schema';
|
|
3
|
-
import { DatabaseWorkerOptionsSchema as ZodSchemas } from './zod/databaseWorker.schema';
|
|
4
|
-
export const DatabaseWorkerSchemas = serviceSchemaResolver(
|
|
5
|
-
() => TypeBoxSchemas,
|
|
6
|
-
() => ZodSchemas
|
|
7
|
-
);
|
package/lib/schemas/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
package/lib/schemas/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './databaseWorker.schema';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare const DatabaseWorkerOptionsSchema: {
|
|
2
|
-
retries: import('@sinclair/typebox').TTransform<
|
|
3
|
-
import('@sinclair/typebox').TUnion<
|
|
4
|
-
[
|
|
5
|
-
import('@sinclair/typebox').TNumber,
|
|
6
|
-
import('@sinclair/typebox').TString,
|
|
7
|
-
import('@sinclair/typebox').TBoolean,
|
|
8
|
-
import('@sinclair/typebox').TNull,
|
|
9
|
-
import('@sinclair/typebox').TDate,
|
|
10
|
-
import('@sinclair/typebox').TBigInt
|
|
11
|
-
]
|
|
12
|
-
>,
|
|
13
|
-
number
|
|
14
|
-
>;
|
|
15
|
-
interval: import('@sinclair/typebox').TTransform<
|
|
16
|
-
import('@sinclair/typebox').TUnion<
|
|
17
|
-
[
|
|
18
|
-
import('@sinclair/typebox').TNumber,
|
|
19
|
-
import('@sinclair/typebox').TString,
|
|
20
|
-
import('@sinclair/typebox').TBoolean,
|
|
21
|
-
import('@sinclair/typebox').TNull,
|
|
22
|
-
import('@sinclair/typebox').TDate,
|
|
23
|
-
import('@sinclair/typebox').TBigInt
|
|
24
|
-
]
|
|
25
|
-
>,
|
|
26
|
-
number
|
|
27
|
-
>;
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=databaseWorker.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"databaseWorker.schema.d.ts","sourceRoot":"","sources":["../../../schemas/typebox/databaseWorker.schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B;;;CAGvC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"databaseWorker.schema.d.ts","sourceRoot":"","sources":["../../../schemas/zod/databaseWorker.schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B;;;CAGvC,CAAC"}
|