@wisemen/nestjs-typeorm 0.0.6 → 0.0.8

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,10 +1,6 @@
1
1
  import { AsyncLocalStorage } from 'async_hooks';
2
2
  const transactionStorage = new AsyncLocalStorage();
3
3
  export async function transaction(dataSource, runInTransaction) {
4
- const transactionManager = transactionStorage.getStore();
5
- if (transactionManager != null) {
6
- return await runInTransaction(transactionManager);
7
- }
8
4
  return await dataSource.transaction(async (manager) => {
9
5
  return await transactionStorage.run(manager, async () => {
10
6
  return await runInTransaction(manager);
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../lib/extensions/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAG/C,MAAM,kBAAkB,GAAG,IAAI,iBAAiB,EAAwB,CAAA;AAExE,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,UAAsB,EACtB,gBAA8D;IAE9D,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,QAAQ,EAAE,CAAA;IACxD,IAAG,kBAAkB,IAAI,IAAI,EAAE,CAAC;QAC9B,OAAO,MAAM,gBAAgB,CAAC,kBAAkB,CAAC,CAAA;IACnD,CAAC;IAED,OAAO,MAAM,UAAU,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACpD,OAAO,MAAM,kBAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACtD,OAAO,MAAM,gBAAgB,CAAC,OAAO,CAAC,CAAA;QACxC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAE,OAAsB;IACnE,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE;QACxB,GAAG,CAAE,MAAM,EAAE,IAAI;YACf,MAAM,OAAO,GAAG,kBAAkB,CAAC,QAAQ,EAAE,CAAA;YAE7C,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;gBACpB,OAAO,OAAO,CAAC,IAAI,CAAY,CAAA;YACjC,CAAC;iBAAM,CAAC;gBACN,OAAO,MAAM,CAAC,IAAI,CAAY,CAAA;YAChC,CAAC;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../lib/extensions/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAG/C,MAAM,kBAAkB,GAAG,IAAI,iBAAiB,EAAwB,CAAA;AAExE,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,UAAsB,EACtB,gBAA8D;IAE9D,OAAO,MAAM,UAAU,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACpD,OAAO,MAAM,kBAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YACtD,OAAO,MAAM,gBAAgB,CAAC,OAAO,CAAC,CAAA;QACxC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAE,OAAsB;IACnE,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE;QACxB,GAAG,CAAE,MAAM,EAAE,IAAI;YACf,MAAM,OAAO,GAAG,kBAAkB,CAAC,QAAQ,EAAE,CAAA;YAE7C,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;gBACpB,OAAO,OAAO,CAAC,IAAI,CAAY,CAAA;YACjC,CAAC;iBAAM,CAAC;gBACN,OAAO,MAAM,CAAC,IAAI,CAAY,CAAA;YAChC,CAAC;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wisemen/nestjs-typeorm",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",
@@ -31,6 +31,7 @@
31
31
  "dependencies": {
32
32
  "@nestjs/typeorm": "^10.0.2",
33
33
  "@wisemen/time": "^0.0.17",
34
+ "@wisemen/coordinates": "^0.0.2",
34
35
  "change-case": "^5.4.4"
35
36
  },
36
37
  "peerDependencies": {