@geekmidas/testkit 0.0.4 → 0.0.6

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.
Files changed (68) hide show
  1. package/dist/Factory.mjs +1 -1
  2. package/dist/{KyselyFactory-BGvSMLtd.cjs → KyselyFactory-BX7Kv2uP.cjs} +1 -1
  3. package/dist/{KyselyFactory-ionH4gvk.mjs → KyselyFactory-pOMOFQWE.mjs} +2 -2
  4. package/dist/KyselyFactory.cjs +2 -2
  5. package/dist/KyselyFactory.mjs +3 -3
  6. package/dist/{ObjectionFactory-CFrtXe7i.mjs → ObjectionFactory-ChuX8sZN.mjs} +1 -1
  7. package/dist/ObjectionFactory.mjs +2 -2
  8. package/dist/{PostgresKyselyMigrator-CbtiZgfI.mjs → PostgresKyselyMigrator-D8fm35-s.mjs} +1 -1
  9. package/dist/{PostgresKyselyMigrator-Cxf2Dp9y.cjs → PostgresKyselyMigrator-JTY2LfwD.cjs} +2 -2
  10. package/dist/PostgresKyselyMigrator.cjs +2 -2
  11. package/dist/PostgresKyselyMigrator.mjs +2 -2
  12. package/dist/{PostgresMigrator-eqyAFSf-.cjs → PostgresMigrator-Bz-tnjB6.cjs} +1 -1
  13. package/dist/PostgresMigrator.cjs +1 -1
  14. package/dist/PostgresMigrator.mjs +1 -1
  15. package/dist/{VitestKyselyTransactionIsolator-DXjWQtDN.mjs → VitestKyselyTransactionIsolator-D-qpeVKO.mjs} +1 -1
  16. package/dist/{VitestKyselyTransactionIsolator-Dh2AgJDd.cjs → VitestKyselyTransactionIsolator-jF6Ohyu_.cjs} +1 -1
  17. package/dist/VitestKyselyTransactionIsolator.cjs +2 -3
  18. package/dist/VitestKyselyTransactionIsolator.mjs +2 -3
  19. package/dist/{VitestTransactionIsolator-zK5NJ7DQ.cjs → VitestTransactionIsolator-BK9UsrKt.cjs} +4 -2
  20. package/dist/{VitestTransactionIsolator-pLwsDo_A.mjs → VitestTransactionIsolator-e-R3p_X8.mjs} +4 -3
  21. package/dist/VitestTransactionIsolator.cjs +1 -2
  22. package/dist/VitestTransactionIsolator.mjs +1 -2
  23. package/dist/__tests__/Factory.spec.cjs +42 -42
  24. package/dist/__tests__/Factory.spec.mjs +23 -24
  25. package/dist/__tests__/KyselyFactory.spec.cjs +80 -80
  26. package/dist/__tests__/KyselyFactory.spec.mjs +74 -74
  27. package/dist/__tests__/ObjectionFactory.spec.cjs +80 -81
  28. package/dist/__tests__/ObjectionFactory.spec.mjs +52 -53
  29. package/dist/__tests__/PostgresMigrator.spec.cjs +59 -60
  30. package/dist/__tests__/PostgresMigrator.spec.mjs +31 -32
  31. package/dist/__tests__/faker.spec.cjs +60 -60
  32. package/dist/__tests__/faker.spec.mjs +35 -36
  33. package/dist/__tests__/integration.spec.cjs +44 -41
  34. package/dist/__tests__/integration.spec.mjs +45 -43
  35. package/dist/{chunk-DWy1uDak.cjs → chunk-CUT6urMc.cjs} +0 -9
  36. package/dist/example.cjs +2 -2
  37. package/dist/example.mjs +3 -3
  38. package/dist/{faker-h6CkRloU.cjs → faker-caz-8zt8.cjs} +1 -1
  39. package/dist/faker.cjs +1 -1
  40. package/dist/faker.mjs +1 -1
  41. package/dist/{helpers-C2NH7xcz.cjs → helpers-B2CfbaTC.cjs} +1 -1
  42. package/dist/helpers-DN4sJO4i.mjs +13 -0
  43. package/dist/helpers-DOtYCEvZ.cjs +19 -0
  44. package/dist/helpers.cjs +2 -6
  45. package/dist/helpers.mjs +2 -5
  46. package/dist/kysely-C1-aHdnU.mjs +11 -0
  47. package/dist/kysely-DL3C2eM4.cjs +16 -0
  48. package/dist/kysely.cjs +8 -15
  49. package/dist/kysely.mjs +8 -15
  50. package/dist/objection.mjs +2 -2
  51. package/package.json +2 -1
  52. package/src/VitestTransactionIsolator.ts +4 -2
  53. package/src/__tests__/KyselyFactory.spec.ts +4 -6
  54. package/src/__tests__/integration.spec.ts +8 -3
  55. package/src/helpers.ts +1 -18
  56. package/src/kysely.ts +3 -1
  57. package/dist/dist-BM2KvLG1.mjs +0 -5618
  58. package/dist/dist-DE3gAxQI.cjs +0 -5736
  59. package/dist/helpers-BnARb5Ap.mjs +0 -19
  60. package/dist/helpers-C_RZk04R.cjs +0 -31
  61. package/dist/magic-string.es-C6yzoryu.mjs +0 -1014
  62. package/dist/magic-string.es-jdtJrR0A.cjs +0 -1015
  63. package/dist/vi.bdSIJ99Y-BgRxGeO2.mjs +0 -9382
  64. package/dist/vi.bdSIJ99Y-CFuzUeY6.cjs +0 -9393
  65. /package/dist/{Factory-D52Lsc6Z.mjs → Factory-DlzMkMzb.mjs} +0 -0
  66. /package/dist/{PostgresMigrator-DqeuPy-e.mjs → PostgresMigrator-CEoRKTdq.mjs} +0 -0
  67. /package/dist/{faker-cGCFcrj2.mjs → faker-BwaXA_RF.mjs} +0 -0
  68. /package/dist/{helpers-CukcFAU9.mjs → helpers-Rf5F71r9.mjs} +0 -0
@@ -1,19 +0,0 @@
1
- import { IsolationLevel } from "./VitestTransactionIsolator-pLwsDo_A.mjs";
2
- import { VitestKyselyTransactionIsolator } from "./VitestKyselyTransactionIsolator-DXjWQtDN.mjs";
3
- import { CamelCasePlugin, Kysely, PostgresDialect } from "kysely";
4
- import pg from "pg";
5
-
6
- //#region src/helpers.ts
7
- function wrapVitestKyselyTransaction(db, setup, level = IsolationLevel.REPEATABLE_READ) {
8
- const wrapper = new VitestKyselyTransactionIsolator();
9
- return wrapper.wrapVitestWithTransaction(db, setup, level);
10
- }
11
- function createKyselyDb(config) {
12
- return new Kysely({
13
- dialect: new PostgresDialect({ pool: new pg.Pool(config) }),
14
- plugins: [new CamelCasePlugin()]
15
- });
16
- }
17
-
18
- //#endregion
19
- export { createKyselyDb, wrapVitestKyselyTransaction };
@@ -1,31 +0,0 @@
1
- const require_chunk = require('./chunk-DWy1uDak.cjs');
2
- const require_VitestTransactionIsolator = require('./VitestTransactionIsolator-zK5NJ7DQ.cjs');
3
- const require_VitestKyselyTransactionIsolator = require('./VitestKyselyTransactionIsolator-Dh2AgJDd.cjs');
4
- const kysely = require_chunk.__toESM(require("kysely"));
5
- const pg = require_chunk.__toESM(require("pg"));
6
-
7
- //#region src/helpers.ts
8
- function wrapVitestKyselyTransaction(db, setup, level = require_VitestTransactionIsolator.IsolationLevel.REPEATABLE_READ) {
9
- const wrapper = new require_VitestKyselyTransactionIsolator.VitestKyselyTransactionIsolator();
10
- return wrapper.wrapVitestWithTransaction(db, setup, level);
11
- }
12
- function createKyselyDb(config) {
13
- return new kysely.Kysely({
14
- dialect: new kysely.PostgresDialect({ pool: new pg.default.Pool(config) }),
15
- plugins: [new kysely.CamelCasePlugin()]
16
- });
17
- }
18
-
19
- //#endregion
20
- Object.defineProperty(exports, 'createKyselyDb', {
21
- enumerable: true,
22
- get: function () {
23
- return createKyselyDb;
24
- }
25
- });
26
- Object.defineProperty(exports, 'wrapVitestKyselyTransaction', {
27
- enumerable: true,
28
- get: function () {
29
- return wrapVitestKyselyTransaction;
30
- }
31
- });