@punks/backend-entity-manager 0.0.272 → 0.0.274
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/cjs/index.js +9 -31
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/abstractions/operations.d.ts +3 -3
- package/dist/cjs/types/platforms/nest/extensions/jobs/module.d.ts +2 -5
- package/dist/cjs/types/platforms/nest/module.d.ts +1 -4
- package/dist/cjs/types/platforms/nest/services/operations/operation-lock.repository.d.ts +3 -3
- package/dist/esm/index.js +9 -31
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/abstractions/operations.d.ts +3 -3
- package/dist/esm/types/platforms/nest/extensions/jobs/module.d.ts +2 -5
- package/dist/esm/types/platforms/nest/module.d.ts +1 -4
- package/dist/esm/types/platforms/nest/services/operations/operation-lock.repository.d.ts +3 -3
- package/dist/index.d.ts +7 -13
- package/package.json +1 -4
|
@@ -17,7 +17,7 @@ export type LockReleaseInput = {
|
|
|
17
17
|
export declare class LockNotFoundError extends Error {
|
|
18
18
|
}
|
|
19
19
|
export interface ILockRepository {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
acquireLock(input: LockAcquireInput): Promise<LockAcquireResult>;
|
|
21
|
+
releaseLock(input: LockReleaseInput): Promise<void>;
|
|
22
|
+
getLock(lockUid: string): Promise<LockItem | undefined>;
|
|
23
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DynamicModule, OnModuleInit
|
|
1
|
+
import { DynamicModule, OnModuleInit } from "@nestjs/common";
|
|
2
2
|
import { JobsSettings } from "./abstractions/settings";
|
|
3
3
|
import { JobsScheduler } from "./providers/scheduler";
|
|
4
4
|
import { JobsProviderFactory } from "./resolvers/factory";
|
|
@@ -7,8 +7,5 @@ export declare class JobsModule implements OnModuleInit {
|
|
|
7
7
|
private readonly jobsProviderFactory;
|
|
8
8
|
constructor(jobsScheduler: JobsScheduler, jobsProviderFactory: JobsProviderFactory);
|
|
9
9
|
onModuleInit(): Promise<void>;
|
|
10
|
-
static forRoot(input: JobsSettings
|
|
11
|
-
jobInstancesRepository: Type<unknown>;
|
|
12
|
-
jobDefinitionsRepository: Type<unknown>;
|
|
13
|
-
}): DynamicModule;
|
|
10
|
+
static forRoot(input: JobsSettings): DynamicModule;
|
|
14
11
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnModuleInit } from "@nestjs/common";
|
|
2
2
|
import { EntityManagerRegistry } from "./ioc/registry";
|
|
3
3
|
export declare class EntityManagerModule implements OnModuleInit {
|
|
4
4
|
private readonly registry;
|
|
5
5
|
constructor(registry: EntityManagerRegistry);
|
|
6
6
|
onModuleInit(): void;
|
|
7
|
-
static forRoot(providers: {
|
|
8
|
-
operationsLockRepository: Type<unknown>;
|
|
9
|
-
}): DynamicModule;
|
|
10
7
|
}
|
|
@@ -9,8 +9,8 @@ export declare class TypeormOperationLockRepository<TLockEntry extends LockItemC
|
|
|
9
9
|
private readonly repo;
|
|
10
10
|
private readonly entityClass;
|
|
11
11
|
constructor(repo: Repository<TLockEntry>, entityClass: EntityTarget<TLockEntry>);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
getLock: (lockUid: string) => Promise<TLockEntry | undefined>;
|
|
13
|
+
acquireLock: (input: LockAcquireInput) => Promise<LockAcquireResult>;
|
|
14
|
+
releaseLock: (input: LockReleaseInput) => Promise<void>;
|
|
15
15
|
}
|
|
16
16
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1744,9 +1744,9 @@ declare class TypeormOperationLockRepository<TLockEntry extends LockItemClass> i
|
|
|
1744
1744
|
private readonly repo;
|
|
1745
1745
|
private readonly entityClass;
|
|
1746
1746
|
constructor(repo: Repository<TLockEntry>, entityClass: EntityTarget<TLockEntry>);
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1747
|
+
getLock: (lockUid: string) => Promise<TLockEntry | undefined>;
|
|
1748
|
+
acquireLock: (input: LockAcquireInput) => Promise<LockAcquireResult>;
|
|
1749
|
+
releaseLock: (input: LockReleaseInput) => Promise<void>;
|
|
1750
1750
|
}
|
|
1751
1751
|
|
|
1752
1752
|
declare class EmailService {
|
|
@@ -2281,10 +2281,7 @@ declare class JobsModule implements OnModuleInit {
|
|
|
2281
2281
|
private readonly jobsProviderFactory;
|
|
2282
2282
|
constructor(jobsScheduler: JobsScheduler, jobsProviderFactory: JobsProviderFactory);
|
|
2283
2283
|
onModuleInit(): Promise<void>;
|
|
2284
|
-
static forRoot(input: JobsSettings
|
|
2285
|
-
jobInstancesRepository: Type$1<unknown>;
|
|
2286
|
-
jobDefinitionsRepository: Type$1<unknown>;
|
|
2287
|
-
}): DynamicModule;
|
|
2284
|
+
static forRoot(input: JobsSettings): DynamicModule;
|
|
2288
2285
|
}
|
|
2289
2286
|
|
|
2290
2287
|
declare const createExpressFileResponse: (res: Response, file: {
|
|
@@ -3016,9 +3013,6 @@ declare class EntityManagerModule implements OnModuleInit {
|
|
|
3016
3013
|
private readonly registry;
|
|
3017
3014
|
constructor(registry: EntityManagerRegistry);
|
|
3018
3015
|
onModuleInit(): void;
|
|
3019
|
-
static forRoot(providers: {
|
|
3020
|
-
operationsLockRepository: Type$1<unknown>;
|
|
3021
|
-
}): DynamicModule;
|
|
3022
3016
|
}
|
|
3023
3017
|
|
|
3024
3018
|
interface IAuthenticationUserRole {
|
|
@@ -3407,9 +3401,9 @@ type LockReleaseInput = {
|
|
|
3407
3401
|
declare class LockNotFoundError extends Error {
|
|
3408
3402
|
}
|
|
3409
3403
|
interface ILockRepository {
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3404
|
+
acquireLock(input: LockAcquireInput): Promise<LockAcquireResult>;
|
|
3405
|
+
releaseLock(input: LockReleaseInput): Promise<void>;
|
|
3406
|
+
getLock(lockUid: string): Promise<LockItem | undefined>;
|
|
3413
3407
|
}
|
|
3414
3408
|
|
|
3415
3409
|
type AppSecretType = "string" | "number" | "boolean" | "json";
|
package/package.json
CHANGED