@hg-ts/knex 0.4.4 → 0.5.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/dist/event.knex.repository.d.ts +3 -3
- package/dist/event.knex.repository.d.ts.map +1 -1
- package/dist/event.knex.repository.js +2 -4
- package/dist/event.knex.repository.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/knex.module.d.ts +3 -0
- package/dist/knex.module.d.ts.map +1 -1
- package/dist/knex.module.js +14 -2
- package/dist/knex.module.js.map +1 -1
- package/dist/knex.repository.d.ts +0 -1
- package/dist/knex.repository.d.ts.map +1 -1
- package/dist/knex.repository.js +0 -4
- package/dist/knex.repository.js.map +1 -1
- package/dist/knex.repository.spec.d.ts +31 -0
- package/dist/knex.repository.spec.d.ts.map +1 -0
- package/dist/knex.repository.spec.js +174 -0
- package/dist/knex.repository.spec.js.map +1 -0
- package/dist/test-containers/postgres-testcontainer.module.d.ts.map +1 -1
- package/dist/test-containers/postgres-testcontainer.module.js +4 -1
- package/dist/test-containers/postgres-testcontainer.module.js.map +1 -1
- package/package.json +28 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DomainEvent } from '@hg-ts/domain';
|
|
2
|
-
import { BaseEventRepository, EventFindOptions } from '@hg-ts/repository';
|
|
1
|
+
import { DomainEvent, DomainEventDto } from '@hg-ts/domain';
|
|
2
|
+
import { BaseEventRepository, EventFindOptions, NotEmptyList } from '@hg-ts/repository';
|
|
3
3
|
import { KnexService } from './knex.service.js';
|
|
4
4
|
export type EventTable = {
|
|
5
5
|
id: string;
|
|
@@ -18,7 +18,7 @@ declare module 'knex/types/tables.js' {
|
|
|
18
18
|
}
|
|
19
19
|
export declare class EventKnexRepository extends BaseEventRepository {
|
|
20
20
|
protected readonly knex: KnexService;
|
|
21
|
-
|
|
21
|
+
protected rawAdd(dtos: NotEmptyList<DomainEventDto>): Promise<void>;
|
|
22
22
|
protected findEntities(options?: Partial<EventFindOptions>, table?: 'event'): Promise<DomainEvent[]>;
|
|
23
23
|
protected createEvent(name: string, row: Omit<EventTable, 'name'>): DomainEvent;
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.knex.repository.d.ts","sourceRoot":"","sources":["../src/event.knex.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,
|
|
1
|
+
{"version":3,"file":"event.knex.repository.d.ts","sourceRoot":"","sources":["../src/event.knex.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EACX,cAAc,EAEd,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,MAAM,UAAU,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,EAAE,IAAI,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IAErC,UAAU,MAAM;QACf,KAAK,EAAE,UAAU,CAAC;KAClB;CACD;AAED,qBAAa,mBAAoB,SAAQ,mBAAmB;IAE3D,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;cAEZ,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;cAMzD,YAAY,CACpC,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM,EACvC,KAAK,GAAE,OAAiB,GACtB,OAAO,CAAC,WAAW,EAAE,CAAC;IA+CzB,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,WAAW;CAU/E"}
|
|
@@ -5,11 +5,9 @@ import { Inject } from '@nestjs/common';
|
|
|
5
5
|
import { KnexService } from './knex.service.js';
|
|
6
6
|
export class EventKnexRepository extends BaseEventRepository {
|
|
7
7
|
knex;
|
|
8
|
-
async
|
|
9
|
-
const events = Array.isArray(event) ? event : [event];
|
|
8
|
+
async rawAdd(dtos) {
|
|
10
9
|
const trx = await this.knex.getMasterTrx();
|
|
11
|
-
|
|
12
|
-
await trx('event').insert(dbFormattedEvents);
|
|
10
|
+
await trx('event').insert(dtos);
|
|
13
11
|
}
|
|
14
12
|
async findEntities(options = {}, table = 'event') {
|
|
15
13
|
const { id, entityId, entityName, limit } = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.knex.repository.js","sourceRoot":"","sources":["../src/event.knex.repository.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,WAAW,
|
|
1
|
+
{"version":3,"file":"event.knex.repository.js","sourceRoot":"","sources":["../src/event.knex.repository.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,WAAW,EAEX,eAAe,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,mBAAmB,GAGnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoBhD,MAAM,OAAO,mBAAoB,SAAQ,mBAAmB;IAExC,IAAI,CAAc;IAElB,KAAK,CAAC,MAAM,CAAC,IAAkC;QACjE,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;QAE3C,MAAM,GAAG,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;I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G,SAAS,EAAE,GAAG,GAAG,CAAC;YACnC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YAEhD,KAAK,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;YAE9B,OAAO,KAAK,CAAC;QACd,CAAC,CAAC,CAAC;IACJ,CAAC;IAES,WAAW,CAAC,IAAY,EAAE,GAA6B;QAChE,OAAO,IAAI,WAAW,CAAC;YACtB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,IAAI;SACJ,CAAC,CAAC;IACJ,CAAC;CACD;AApEmB;IADlB,MAAM,EAAE;8BACgB,WAAW;iDAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export * from './external-config.js';
|
|
|
5
5
|
export * from './test-containers/index.js';
|
|
6
6
|
export * from './knex.repository.js';
|
|
7
7
|
export * from './event.knex.repository.js';
|
|
8
|
+
export * from './knex.repository.spec.js';
|
|
8
9
|
export { eventMigration };
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AAEvD,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAE3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AAEvD,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAE3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,5 +5,6 @@ export * from './external-config.js';
|
|
|
5
5
|
export * from './test-containers/index.js';
|
|
6
6
|
export * from './knex.repository.js';
|
|
7
7
|
export * from './event.knex.repository.js';
|
|
8
|
+
export * from './knex.repository.spec.js';
|
|
8
9
|
export { eventMigration };
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AAEvD,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAE3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AAEvD,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAE3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/knex.module.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knex.module.d.ts","sourceRoot":"","sources":["../src/knex.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"knex.module.d.ts","sourceRoot":"","sources":["../src/knex.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EACN,aAAa,EAGb,MAAM,gBAAgB,CAAC;AAKxB,qBAca,UAAU;WACR,OAAO,CAAC,YAAY,EAAE,YAAY,GAAG,aAAa;CAWhE"}
|
package/dist/knex.module.js
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
+
var KnexModule_1;
|
|
1
2
|
import { __decorate } from "tslib";
|
|
2
3
|
import { ConfigLoader } from '@hg-ts/config-loader';
|
|
3
4
|
import { Global, Module, } from '@nestjs/common';
|
|
4
5
|
import { KnexConfig } from './knex.config.js';
|
|
5
6
|
import { KnexService } from './knex.service.js';
|
|
6
|
-
let KnexModule = class KnexModule {
|
|
7
|
+
let KnexModule = KnexModule_1 = class KnexModule {
|
|
8
|
+
static forRoot(configLoader) {
|
|
9
|
+
return {
|
|
10
|
+
module: KnexModule_1,
|
|
11
|
+
providers: [
|
|
12
|
+
{
|
|
13
|
+
provide: ConfigLoader,
|
|
14
|
+
useValue: configLoader,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
};
|
|
18
|
+
}
|
|
7
19
|
};
|
|
8
|
-
KnexModule = __decorate([
|
|
20
|
+
KnexModule = KnexModule_1 = __decorate([
|
|
9
21
|
Global(),
|
|
10
22
|
Module({
|
|
11
23
|
providers: [
|
package/dist/knex.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knex.module.js","sourceRoot":"","sources":["../src/knex.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"knex.module.js","sourceRoot":"","sources":["../src/knex.module.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAEN,MAAM,EACN,MAAM,GACN,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgBzC,IAAM,UAAU,kBAAhB,MAAM,UAAU;IACf,MAAM,CAAC,OAAO,CAAC,YAA0B;QAC/C,OAAO;YACN,MAAM,EAAE,YAAU;YAClB,SAAS,EAAE;gBACV;oBACC,OAAO,EAAE,YAAY;oBACrB,QAAQ,EAAE,YAAY;iBACtB;aACD;SACD,CAAC;IACH,CAAC;CACD,CAAA;AAZY,UAAU;IAdtB,MAAM,EAAE;IACR,MAAM,CAAC;QACP,SAAS,EAAE;YACV,WAAW;YACX;gBACC,OAAO,EAAE,UAAU;gBACnB,KAAK,CAAC,UAAU,CAAC,YAA0B;oBAC1C,OAAO,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;gBAC9C,CAAC;gBACD,MAAM,EAAE,CAAC,YAAY,CAAC;aACtB;SACD;QACD,OAAO,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC;KAClC,CAAC;GACW,UAAU,CAYtB"}
|
|
@@ -3,6 +3,5 @@ import { BaseFindOptions, BaseRepository } from '@hg-ts/repository';
|
|
|
3
3
|
import { KnexService } from './knex.service.js';
|
|
4
4
|
export declare abstract class KnexRepository<Aggregate extends BaseAggregate<any>, FindOptions extends BaseFindOptions<Aggregate> = BaseFindOptions<Aggregate>> extends BaseRepository<Aggregate, FindOptions> {
|
|
5
5
|
protected readonly knex: KnexService;
|
|
6
|
-
clear(): Promise<void>;
|
|
7
6
|
}
|
|
8
7
|
//# sourceMappingURL=knex.repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knex.repository.d.ts","sourceRoot":"","sources":["../src/knex.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"knex.repository.d.ts","sourceRoot":"","sources":["../src/knex.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EACN,eAAe,EACf,cAAc,EACd,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,8BAAsB,cAAc,CACnC,SAAS,SAAS,aAAa,CAAC,GAAG,CAAC,EACpC,WAAW,SAAS,eAAe,CAAC,SAAS,CAAC,GAAG,eAAe,CAAC,SAAS,CAAC,CAC1E,SAAQ,cAAc,CAAC,SAAS,EAAE,WAAW,CAAC;IAE/C,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;CACrC"}
|
package/dist/knex.repository.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { WillNeverHappenedException } from '@hg-ts/exception';
|
|
3
2
|
import { BaseRepository, } from '@hg-ts/repository';
|
|
4
3
|
import { Inject } from '@nestjs/common';
|
|
5
4
|
import { KnexService } from './knex.service.js';
|
|
6
5
|
export class KnexRepository extends BaseRepository {
|
|
7
6
|
knex;
|
|
8
|
-
async clear() {
|
|
9
|
-
throw new WillNeverHappenedException('Knex repository cannot be cleared');
|
|
10
|
-
}
|
|
11
7
|
}
|
|
12
8
|
__decorate([
|
|
13
9
|
Inject(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knex.repository.js","sourceRoot":"","sources":["../src/knex.repository.ts"],"names":[],"mappings":";AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"knex.repository.js","sourceRoot":"","sources":["../src/knex.repository.ts"],"names":[],"mappings":";AACA,OAAO,EAEN,cAAc,GACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,OAAgB,cAGpB,SAAQ,cAAsC;IAE5B,IAAI,CAAc;CACrC;AADmB;IADlB,MAAM,EAAE;8BACgB,WAAW;4CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseAggregate } from '@hg-ts/domain';
|
|
2
|
+
import { AggregateId } from '@hg-ts/repository';
|
|
3
|
+
import { Suite } from '@hg-ts/tests';
|
|
4
|
+
import { KnexRepository } from './knex.repository.js';
|
|
5
|
+
import { KnexService } from './knex.service.js';
|
|
6
|
+
export declare abstract class KnexRepositorySpec<Aggregate extends BaseAggregate<any>> extends Suite {
|
|
7
|
+
knexService: KnexService;
|
|
8
|
+
private module;
|
|
9
|
+
private resolveFunction;
|
|
10
|
+
private readonly repositoryClass;
|
|
11
|
+
protected abstract repository: KnexRepository<Aggregate>;
|
|
12
|
+
protected constructor(repositoryClass: Class<KnexRepository<Aggregate>, any[]>);
|
|
13
|
+
getNextId(): Promise<void>;
|
|
14
|
+
addSuccess(): Promise<void>;
|
|
15
|
+
addEmptyArray(): Promise<void>;
|
|
16
|
+
updateSuccess(): Promise<void>;
|
|
17
|
+
updateEmptyArray(): Promise<void>;
|
|
18
|
+
idSearch(): Promise<void>;
|
|
19
|
+
addDuplicate(): Promise<void>;
|
|
20
|
+
notFoundExceptionOnGet(): Promise<void>;
|
|
21
|
+
notFoundExceptionOnUpdate(): Promise<void>;
|
|
22
|
+
clearError(): Promise<void>;
|
|
23
|
+
setUp(): Promise<void>;
|
|
24
|
+
beforeEach(): Promise<void>;
|
|
25
|
+
afterEach(): Promise<void>;
|
|
26
|
+
tearDown(): Promise<void>;
|
|
27
|
+
protected abstract getRepositoryClass(): Class<KnexRepository<Aggregate>, any[]>;
|
|
28
|
+
protected abstract createAggregate(): Aggregate;
|
|
29
|
+
protected abstract checkId(id: AggregateId<Aggregate>): void;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=knex.repository.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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C;IAY3B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/C,SAAS,CAAC,QAAQ,CAAC,kBAAkB,IAAI,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAChF,SAAS,CAAC,QAAQ,CAAC,eAAe,IAAI,SAAS;IAC/C,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,IAAI;CAC5D"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { FileConfigLoader } from '@hg-ts/config-loader';
|
|
3
|
+
import { WillNeverHappenedException } from '@hg-ts/exception';
|
|
4
|
+
import { ExecutionModeModule, HgExecutionMode, } from '@hg-ts/execution-mode';
|
|
5
|
+
import { LoggerModule } from '@hg-ts/logger';
|
|
6
|
+
import { AggregateAlreadyExistsException, AggregateNotFoundException, } from '@hg-ts/repository';
|
|
7
|
+
import { ExpectException, Suite, Test, } from '@hg-ts/tests';
|
|
8
|
+
import { Test as TestFactory, } from '@nestjs/testing';
|
|
9
|
+
import { KnexModule } from './knex.module.js';
|
|
10
|
+
import { KnexService } from './knex.service.js';
|
|
11
|
+
import { PostgresTestcontainerModule } from './test-containers/index.js';
|
|
12
|
+
const IGNORE_ERROR_SYMBOL = Symbol('Transaction rolled back');
|
|
13
|
+
export class KnexRepositorySpec extends Suite {
|
|
14
|
+
knexService;
|
|
15
|
+
module;
|
|
16
|
+
resolveFunction = null;
|
|
17
|
+
repositoryClass;
|
|
18
|
+
constructor(repositoryClass) {
|
|
19
|
+
super();
|
|
20
|
+
this.repositoryClass = repositoryClass;
|
|
21
|
+
}
|
|
22
|
+
async getNextId() {
|
|
23
|
+
const id = await this.repository.getNextId();
|
|
24
|
+
this.checkId(id);
|
|
25
|
+
}
|
|
26
|
+
async addSuccess() {
|
|
27
|
+
const aggregate = this.createAggregate();
|
|
28
|
+
await this.knexService.runInTransaction(async () => {
|
|
29
|
+
await this.repository.add(aggregate);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
async addEmptyArray() {
|
|
33
|
+
await this.knexService.runInTransaction(async () => {
|
|
34
|
+
await this.repository.add([]);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
async updateSuccess() {
|
|
38
|
+
const aggregate = this.createAggregate();
|
|
39
|
+
await this.knexService.runInTransaction(async () => {
|
|
40
|
+
await this.repository.add(aggregate);
|
|
41
|
+
});
|
|
42
|
+
await this.knexService.runInTransaction(async () => {
|
|
43
|
+
await this.repository.update(aggregate);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
async updateEmptyArray() {
|
|
47
|
+
await this.knexService.runInTransaction(async () => {
|
|
48
|
+
await this.repository.update([]);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
async idSearch() {
|
|
52
|
+
}
|
|
53
|
+
async addDuplicate() {
|
|
54
|
+
const aggregate = this.createAggregate();
|
|
55
|
+
await this.knexService.runInTransaction(async () => {
|
|
56
|
+
await this.repository.add(aggregate);
|
|
57
|
+
await this.repository.add(aggregate);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
async notFoundExceptionOnGet() {
|
|
61
|
+
await this.knexService.runInTransaction(async () => {
|
|
62
|
+
const nextId = await this.repository.getNextId();
|
|
63
|
+
await this.repository.getOrFail(nextId);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async notFoundExceptionOnUpdate() {
|
|
67
|
+
const aggregate = this.createAggregate();
|
|
68
|
+
await this.knexService.runInTransaction(async () => {
|
|
69
|
+
await this.repository.update(aggregate);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
async clearError() {
|
|
73
|
+
await this.repository.clear();
|
|
74
|
+
}
|
|
75
|
+
async setUp() {
|
|
76
|
+
this.module = await TestFactory.createTestingModule({
|
|
77
|
+
imports: [
|
|
78
|
+
ExecutionModeModule,
|
|
79
|
+
LoggerModule,
|
|
80
|
+
PostgresTestcontainerModule,
|
|
81
|
+
KnexModule.forRoot(new FileConfigLoader({
|
|
82
|
+
overrideEnv: new HgExecutionMode(),
|
|
83
|
+
envBuilder: true,
|
|
84
|
+
configDir: 'config',
|
|
85
|
+
})),
|
|
86
|
+
],
|
|
87
|
+
providers: [this.repositoryClass],
|
|
88
|
+
}).compile();
|
|
89
|
+
await this.module.init();
|
|
90
|
+
this.repository = this.module.get(this.getRepositoryClass());
|
|
91
|
+
this.knexService = this.module.get(KnexService);
|
|
92
|
+
}
|
|
93
|
+
async beforeEach() {
|
|
94
|
+
this.knexService.runInTransaction(async () => new Promise((_resolve, reject) => {
|
|
95
|
+
this.resolveFunction = reject;
|
|
96
|
+
})).catch(error => {
|
|
97
|
+
if (error === IGNORE_ERROR_SYMBOL) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
throw error;
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
async afterEach() {
|
|
104
|
+
this.resolveFunction?.(IGNORE_ERROR_SYMBOL);
|
|
105
|
+
}
|
|
106
|
+
async tearDown() {
|
|
107
|
+
await this.module.close();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
__decorate([
|
|
111
|
+
Test(),
|
|
112
|
+
__metadata("design:type", Function),
|
|
113
|
+
__metadata("design:paramtypes", []),
|
|
114
|
+
__metadata("design:returntype", Promise)
|
|
115
|
+
], KnexRepositorySpec.prototype, "getNextId", null);
|
|
116
|
+
__decorate([
|
|
117
|
+
Test(),
|
|
118
|
+
__metadata("design:type", Function),
|
|
119
|
+
__metadata("design:paramtypes", []),
|
|
120
|
+
__metadata("design:returntype", Promise)
|
|
121
|
+
], KnexRepositorySpec.prototype, "addSuccess", null);
|
|
122
|
+
__decorate([
|
|
123
|
+
Test(),
|
|
124
|
+
__metadata("design:type", Function),
|
|
125
|
+
__metadata("design:paramtypes", []),
|
|
126
|
+
__metadata("design:returntype", Promise)
|
|
127
|
+
], KnexRepositorySpec.prototype, "addEmptyArray", null);
|
|
128
|
+
__decorate([
|
|
129
|
+
Test(),
|
|
130
|
+
__metadata("design:type", Function),
|
|
131
|
+
__metadata("design:paramtypes", []),
|
|
132
|
+
__metadata("design:returntype", Promise)
|
|
133
|
+
], KnexRepositorySpec.prototype, "updateSuccess", null);
|
|
134
|
+
__decorate([
|
|
135
|
+
Test(),
|
|
136
|
+
__metadata("design:type", Function),
|
|
137
|
+
__metadata("design:paramtypes", []),
|
|
138
|
+
__metadata("design:returntype", Promise)
|
|
139
|
+
], KnexRepositorySpec.prototype, "updateEmptyArray", null);
|
|
140
|
+
__decorate([
|
|
141
|
+
Test(),
|
|
142
|
+
__metadata("design:type", Function),
|
|
143
|
+
__metadata("design:paramtypes", []),
|
|
144
|
+
__metadata("design:returntype", Promise)
|
|
145
|
+
], KnexRepositorySpec.prototype, "idSearch", null);
|
|
146
|
+
__decorate([
|
|
147
|
+
Test(),
|
|
148
|
+
ExpectException(AggregateAlreadyExistsException),
|
|
149
|
+
__metadata("design:type", Function),
|
|
150
|
+
__metadata("design:paramtypes", []),
|
|
151
|
+
__metadata("design:returntype", Promise)
|
|
152
|
+
], KnexRepositorySpec.prototype, "addDuplicate", null);
|
|
153
|
+
__decorate([
|
|
154
|
+
Test(),
|
|
155
|
+
ExpectException(AggregateNotFoundException),
|
|
156
|
+
__metadata("design:type", Function),
|
|
157
|
+
__metadata("design:paramtypes", []),
|
|
158
|
+
__metadata("design:returntype", Promise)
|
|
159
|
+
], KnexRepositorySpec.prototype, "notFoundExceptionOnGet", null);
|
|
160
|
+
__decorate([
|
|
161
|
+
Test(),
|
|
162
|
+
ExpectException(AggregateNotFoundException),
|
|
163
|
+
__metadata("design:type", Function),
|
|
164
|
+
__metadata("design:paramtypes", []),
|
|
165
|
+
__metadata("design:returntype", Promise)
|
|
166
|
+
], KnexRepositorySpec.prototype, "notFoundExceptionOnUpdate", null);
|
|
167
|
+
__decorate([
|
|
168
|
+
Test(),
|
|
169
|
+
ExpectException(WillNeverHappenedException),
|
|
170
|
+
__metadata("design:type", Function),
|
|
171
|
+
__metadata("design:paramtypes", []),
|
|
172
|
+
__metadata("design:returntype", Promise)
|
|
173
|
+
], KnexRepositorySpec.prototype, "clearError", null);
|
|
174
|
+
//# sourceMappingURL=knex.repository.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knex.repository.spec.js","sourceRoot":"","sources":["../src/knex.repository.spec.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EACN,mBAAmB,EACnB,eAAe,GACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACN,+BAA+B,EAE/B,0BAA0B,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,eAAe,EACf,KAAK,EACL,IAAI,GACJ,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,IAAI,IAAI,WAAW,GAEnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAEzE,MAAM,mBAAmB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAE9D,MAAM,OAAgB,kBAAyD,SAAQ,KAAK;IACpF,WAAW,CAAc;IACxB,MAAM,CAAgB;IACtB,eAAe,GAAwC,IAAI,CAAC;IAEnD,eAAe,CAA0C;IAI1E,YAAsB,eAAwD;QAC7E,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACxC,CAAC;IAGY,AAAN,KAAK,CAAC,SAAS;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A+B,CAAC;;;;sDAQhD;AAIY;IAFZ,IAAI,EAAE;IACN,eAAe,CAAC,0BAA0B,CAAC;;;;gEAM3C;AAIY;IAFZ,IAAI,EAAE;IACN,eAAe,CAAC,0BAA0B,CAAC;;;;mEAO3C;AAIY;IAFZ,IAAI,EAAE;IACN,eAAe,CAAC,0BAA0B,CAAC;;;;oDAG3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres-testcontainer.module.d.ts","sourceRoot":"","sources":["../../src/test-containers/postgres-testcontainer.module.ts"],"names":[],"mappings":"AASA,
|
|
1
|
+
{"version":3,"file":"postgres-testcontainer.module.d.ts","sourceRoot":"","sources":["../../src/test-containers/postgres-testcontainer.module.ts"],"names":[],"mappings":"AASA,qBAKa,2BAA2B;CAAG"}
|
|
@@ -6,7 +6,10 @@ let PostgresTestcontainerModule = class PostgresTestcontainerModule {
|
|
|
6
6
|
};
|
|
7
7
|
PostgresTestcontainerModule = __decorate([
|
|
8
8
|
Global(),
|
|
9
|
-
Module({
|
|
9
|
+
Module({
|
|
10
|
+
imports: [KnexModule],
|
|
11
|
+
providers: [PostgresTestcontainerService],
|
|
12
|
+
})
|
|
10
13
|
], PostgresTestcontainerModule);
|
|
11
14
|
export { PostgresTestcontainerModule };
|
|
12
15
|
//# sourceMappingURL=postgres-testcontainer.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres-testcontainer.module.js","sourceRoot":"","sources":["../../src/test-containers/postgres-testcontainer.module.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,MAAM,EACN,MAAM,GACN,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"postgres-testcontainer.module.js","sourceRoot":"","sources":["../../src/test-containers/postgres-testcontainer.module.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,MAAM,EACN,MAAM,GACN,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAO5E,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;CAAG,CAAA;AAA9B,2BAA2B;IALvC,MAAM,EAAE;IACR,MAAM,CAAC;QACP,OAAO,EAAE,CAAC,UAAU,CAAC;QACrB,SAAS,EAAE,CAAC,4BAA4B,CAAC;KACzC,CAAC;GACW,2BAA2B,CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hg-ts/knex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -16,20 +16,22 @@
|
|
|
16
16
|
"lint:ts:fix": "lint-ts --fix"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@hg-ts-config/typescript": "0.
|
|
20
|
-
"@hg-ts/async-context": "0.
|
|
21
|
-
"@hg-ts/config-loader": "0.
|
|
22
|
-
"@hg-ts/domain": "0.
|
|
23
|
-
"@hg-ts/events": "0.
|
|
24
|
-
"@hg-ts/exception": "0.
|
|
25
|
-
"@hg-ts/execution-mode": "0.
|
|
26
|
-
"@hg-ts/linter": "0.
|
|
27
|
-
"@hg-ts/logger": "0.
|
|
28
|
-
"@hg-ts/repository": "0.
|
|
29
|
-
"@hg-ts/tests": "0.
|
|
30
|
-
"@hg-ts/types": "0.
|
|
31
|
-
"@hg-ts/validation": "0.
|
|
19
|
+
"@hg-ts-config/typescript": "0.5.1",
|
|
20
|
+
"@hg-ts/async-context": "0.5.1",
|
|
21
|
+
"@hg-ts/config-loader": "0.5.1",
|
|
22
|
+
"@hg-ts/domain": "0.5.1",
|
|
23
|
+
"@hg-ts/events": "0.5.1",
|
|
24
|
+
"@hg-ts/exception": "0.5.1",
|
|
25
|
+
"@hg-ts/execution-mode": "0.5.1",
|
|
26
|
+
"@hg-ts/linter": "0.5.1",
|
|
27
|
+
"@hg-ts/logger": "0.5.1",
|
|
28
|
+
"@hg-ts/repository": "0.5.1",
|
|
29
|
+
"@hg-ts/tests": "0.5.1",
|
|
30
|
+
"@hg-ts/types": "0.5.1",
|
|
31
|
+
"@hg-ts/validation": "0.5.1",
|
|
32
32
|
"@nestjs/common": "11.1.0",
|
|
33
|
+
"@nestjs/core": "11.1.0",
|
|
34
|
+
"@nestjs/testing": "11.1.0",
|
|
33
35
|
"@types/node": "22.19.1",
|
|
34
36
|
"@types/pg": "^8",
|
|
35
37
|
"eslint": "9.18.0",
|
|
@@ -41,16 +43,19 @@
|
|
|
41
43
|
"typescript": "5.7.3"
|
|
42
44
|
},
|
|
43
45
|
"peerDependencies": {
|
|
44
|
-
"@hg-ts/async-context": "0.
|
|
45
|
-
"@hg-ts/config-loader": "0.
|
|
46
|
-
"@hg-ts/domain": "0.
|
|
47
|
-
"@hg-ts/events": "0.
|
|
48
|
-
"@hg-ts/exception": "0.
|
|
49
|
-
"@hg-ts/execution-mode": "0.
|
|
50
|
-
"@hg-ts/logger": "0.
|
|
51
|
-
"@hg-ts/repository": "0.
|
|
52
|
-
"@hg-ts/
|
|
46
|
+
"@hg-ts/async-context": "0.5.1",
|
|
47
|
+
"@hg-ts/config-loader": "0.5.1",
|
|
48
|
+
"@hg-ts/domain": "0.5.1",
|
|
49
|
+
"@hg-ts/events": "0.5.1",
|
|
50
|
+
"@hg-ts/exception": "0.5.1",
|
|
51
|
+
"@hg-ts/execution-mode": "0.5.1",
|
|
52
|
+
"@hg-ts/logger": "0.5.1",
|
|
53
|
+
"@hg-ts/repository": "0.5.1",
|
|
54
|
+
"@hg-ts/tests": "0.5.1",
|
|
55
|
+
"@hg-ts/validation": "0.5.1",
|
|
53
56
|
"@nestjs/common": "*",
|
|
57
|
+
"@nestjs/core": "*",
|
|
58
|
+
"@nestjs/testing": "*",
|
|
54
59
|
"knex": ">=3.1.0",
|
|
55
60
|
"reflect-metadata": "*",
|
|
56
61
|
"rxjs": "*",
|