@hg-ts/knex 0.5.23 → 0.5.25

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.
@@ -1 +1 @@
1
- {"version":3,"file":"repository.testing.module.d.ts","sourceRoot":"","sources":["../../src/tests/repository.testing.module.ts"],"names":[],"mappings":"AAOA,qBASa,uBAAuB;CAAG"}
1
+ {"version":3,"file":"repository.testing.module.d.ts","sourceRoot":"","sources":["../../src/tests/repository.testing.module.ts"],"names":[],"mappings":"AAMA,qBAQa,uBAAuB;CAAG"}
@@ -4,7 +4,6 @@ import { ExecutionModeModule } from '@hg-ts/execution-mode';
4
4
  import { LoggerModule } from '@hg-ts/logger';
5
5
  import { Module } from '@nestjs/common';
6
6
  import { KnexModule } from '../knex.module.js';
7
- import { PostgresTestcontainerModule } from '../test-containers/index.js';
8
7
  let RepositoryTestingModule = class RepositoryTestingModule {
9
8
  };
10
9
  RepositoryTestingModule = __decorate([
@@ -13,7 +12,6 @@ RepositoryTestingModule = __decorate([
13
12
  ExecutionModeModule,
14
13
  LoggerModule,
15
14
  ConfigModule,
16
- PostgresTestcontainerModule,
17
15
  KnexModule,
18
16
  ],
19
17
  })
@@ -1 +1 @@
1
- {"version":3,"file":"repository.testing.module.js","sourceRoot":"","sources":["../../src/tests/repository.testing.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAWnE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAAG,CAAA;AAA1B,uBAAuB;IATnC,MAAM,CAAC;QACP,OAAO,EAAE;YACR,mBAAmB;YACnB,YAAY;YACZ,YAAY;YACZ,2BAA2B;YAC3B,UAAU;SACV;KACD,CAAC;GACW,uBAAuB,CAAG"}
1
+ {"version":3,"file":"repository.testing.module.js","sourceRoot":"","sources":["../../src/tests/repository.testing.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAUxC,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAAG,CAAA;AAA1B,uBAAuB;IARnC,MAAM,CAAC;QACP,OAAO,EAAE;YACR,mBAAmB;YACnB,YAAY;YACZ,YAAY;YACZ,UAAU;SACV;KACD,CAAC;GACW,uBAAuB,CAAG"}
@@ -0,0 +1,3 @@
1
+ export declare function setup(): Promise<void>;
2
+ export declare function teardown(): Promise<void>;
3
+ //# sourceMappingURL=vitest.setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.setup.d.ts","sourceRoot":"","sources":["../src/vitest.setup.ts"],"names":[],"mappings":"AAuBA,wBAAsB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAO3C;AAED,wBAAsB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAI9C"}
@@ -0,0 +1,32 @@
1
+ import { __decorate } from "tslib";
2
+ import { ConfigModule } from '@hg-ts/config-loader';
3
+ import { LoggerModule } from '@hg-ts/logger';
4
+ import { Module, } from '@nestjs/common';
5
+ import { NestFactory } from '@nestjs/core';
6
+ import { PostgresTestcontainerModule } from './test-containers/index.js';
7
+ process.env['HG_ENV'] = 'test';
8
+ let nestContext = null;
9
+ let VitestModule = class VitestModule {
10
+ };
11
+ VitestModule = __decorate([
12
+ Module({
13
+ imports: [
14
+ PostgresTestcontainerModule,
15
+ LoggerModule,
16
+ ConfigModule,
17
+ ],
18
+ })
19
+ ], VitestModule);
20
+ export async function setup() {
21
+ nestContext = await NestFactory.createApplicationContext(VitestModule, {
22
+ bufferLogs: true,
23
+ abortOnError: false,
24
+ });
25
+ await nestContext.init();
26
+ }
27
+ export async function teardown() {
28
+ if (nestContext) {
29
+ await nestContext.close();
30
+ }
31
+ }
32
+ //# sourceMappingURL=vitest.setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.setup.js","sourceRoot":"","sources":["../src/vitest.setup.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAEN,MAAM,GACN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAEzE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;AAC/B,IAAI,WAAW,GAAmC,IAAI,CAAC;AASvD,IAAM,YAAY,GAAlB,MAAM,YAAY;CACjB,CAAA;AADK,YAAY;IAPjB,MAAM,CAAC;QACP,OAAO,EAAE;YACR,2BAA2B;YAC3B,YAAY;YACZ,YAAY;SACZ;KACD,CAAC;GACI,YAAY,CACjB;AAED,MAAM,CAAC,KAAK,UAAU,KAAK;IAC1B,WAAW,GAAG,MAAM,WAAW,CAAC,wBAAwB,CAAC,YAAY,EAAE;QACtE,UAAU,EAAE,IAAI;QAChB,YAAY,EAAE,KAAK;KACnB,CAAC,CAAC;IAEH,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC7B,IAAI,WAAW,EAAE,CAAC;QACjB,MAAM,WAAW,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@hg-ts/knex",
3
- "version": "0.5.23",
3
+ "version": "0.5.25",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "exports": {
7
- ".": "./dist/index.js"
7
+ ".": "./dist/index.js",
8
+ "./vitest.setup": "./dist/vitest.setup.js"
8
9
  },
9
10
  "repository": "git@gitlab.com:hyper-graph/framework.git",
10
11
  "scripts": {
@@ -18,19 +19,19 @@
18
19
  "test:dev": "vitest watch"
19
20
  },
20
21
  "devDependencies": {
21
- "@hg-ts-config/typescript": "0.5.23",
22
- "@hg-ts/async-context": "0.5.23",
23
- "@hg-ts/config-loader": "0.5.23",
24
- "@hg-ts/domain": "0.5.23",
25
- "@hg-ts/events": "0.5.23",
26
- "@hg-ts/exception": "0.5.23",
27
- "@hg-ts/execution-mode": "0.5.23",
28
- "@hg-ts/linter": "0.5.23",
29
- "@hg-ts/logger": "0.5.23",
30
- "@hg-ts/repository": "0.5.23",
31
- "@hg-ts/tests": "0.5.23",
32
- "@hg-ts/types": "0.5.23",
33
- "@hg-ts/validation": "0.5.23",
22
+ "@hg-ts-config/typescript": "0.5.25",
23
+ "@hg-ts/async-context": "0.5.25",
24
+ "@hg-ts/config-loader": "0.5.25",
25
+ "@hg-ts/domain": "0.5.25",
26
+ "@hg-ts/events": "0.5.25",
27
+ "@hg-ts/exception": "0.5.25",
28
+ "@hg-ts/execution-mode": "0.5.25",
29
+ "@hg-ts/linter": "0.5.25",
30
+ "@hg-ts/logger": "0.5.25",
31
+ "@hg-ts/repository": "0.5.25",
32
+ "@hg-ts/tests": "0.5.25",
33
+ "@hg-ts/types": "0.5.25",
34
+ "@hg-ts/validation": "0.5.25",
34
35
  "@nestjs/common": "11.1.0",
35
36
  "@nestjs/core": "11.1.0",
36
37
  "@nestjs/testing": "11.1.0",
@@ -47,16 +48,16 @@
47
48
  "vitest": "4.0.14"
48
49
  },
49
50
  "peerDependencies": {
50
- "@hg-ts/async-context": "0.5.23",
51
- "@hg-ts/config-loader": "0.5.23",
52
- "@hg-ts/domain": "0.5.23",
53
- "@hg-ts/events": "0.5.23",
54
- "@hg-ts/exception": "0.5.23",
55
- "@hg-ts/execution-mode": "0.5.23",
56
- "@hg-ts/logger": "0.5.23",
57
- "@hg-ts/repository": "0.5.23",
58
- "@hg-ts/tests": "0.5.23",
59
- "@hg-ts/validation": "0.5.23",
51
+ "@hg-ts/async-context": "0.5.25",
52
+ "@hg-ts/config-loader": "0.5.25",
53
+ "@hg-ts/domain": "0.5.25",
54
+ "@hg-ts/events": "0.5.25",
55
+ "@hg-ts/exception": "0.5.25",
56
+ "@hg-ts/execution-mode": "0.5.25",
57
+ "@hg-ts/logger": "0.5.25",
58
+ "@hg-ts/repository": "0.5.25",
59
+ "@hg-ts/tests": "0.5.25",
60
+ "@hg-ts/validation": "0.5.25",
60
61
  "@nestjs/common": "*",
61
62
  "@nestjs/core": "*",
62
63
  "@nestjs/testing": "*",
@@ -3,14 +3,12 @@ import { ExecutionModeModule } from '@hg-ts/execution-mode';
3
3
  import { LoggerModule } from '@hg-ts/logger';
4
4
  import { Module } from '@nestjs/common';
5
5
  import { KnexModule } from '../knex.module.js';
6
- import { PostgresTestcontainerModule } from '../test-containers/index.js';
7
6
 
8
7
  @Module({
9
8
  imports: [
10
9
  ExecutionModeModule,
11
10
  LoggerModule,
12
11
  ConfigModule,
13
- PostgresTestcontainerModule,
14
12
  KnexModule,
15
13
  ],
16
14
  })
@@ -0,0 +1,37 @@
1
+ import { ConfigModule } from '@hg-ts/config-loader';
2
+ import { LoggerModule } from '@hg-ts/logger';
3
+ import {
4
+ INestApplicationContext,
5
+ Module,
6
+ } from '@nestjs/common';
7
+ import { NestFactory } from '@nestjs/core';
8
+
9
+ import { PostgresTestcontainerModule } from './test-containers/index.js';
10
+
11
+ process.env['HG_ENV'] = 'test';
12
+ let nestContext: INestApplicationContext | null = null;
13
+
14
+ @Module({
15
+ imports: [
16
+ PostgresTestcontainerModule,
17
+ LoggerModule,
18
+ ConfigModule,
19
+ ],
20
+ })
21
+ class VitestModule {
22
+ }
23
+
24
+ export async function setup(): Promise<void> {
25
+ nestContext = await NestFactory.createApplicationContext(VitestModule, {
26
+ bufferLogs: true,
27
+ abortOnError: false,
28
+ });
29
+
30
+ await nestContext.init();
31
+ }
32
+
33
+ export async function teardown(): Promise<void> {
34
+ if (nestContext) {
35
+ await nestContext.close();
36
+ }
37
+ }
package/tsconfig.json CHANGED
@@ -5,5 +5,6 @@
5
5
  "rootDir": "src",
6
6
  "outDir": "dist"
7
7
  },
8
- "exclude": ["dist"]
8
+ "exclude": ["dist"],
9
+ "include": ["src"]
9
10
  }