@midwayjs/typeorm 4.0.0-beta.11 → 4.0.0-beta.13

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 (2) hide show
  1. package/cli.js +7 -8
  2. package/package.json +4 -4
package/cli.js CHANGED
@@ -2,20 +2,19 @@
2
2
  'use strict';
3
3
 
4
4
  const { join } = require('path');
5
- // eslint-disable-next-line node/no-unpublished-require
5
+
6
6
  const { CommandUtils } = require('typeorm/commands/CommandUtils');
7
- // eslint-disable-next-line node/no-unpublished-require
7
+
8
8
  const ImportUtils = require('typeorm/util/ImportUtils');
9
- // eslint-disable-next-line node/no-unpublished-require
9
+
10
10
  const { DataSource } = require('typeorm');
11
11
 
12
12
  const originLoadDataSource = CommandUtils.loadDataSource;
13
13
 
14
14
  CommandUtils.loadDataSource = async function (dataSourceFilePath) {
15
15
  try {
16
- let dataSourceFileExports = await ImportUtils.importOrRequireFile(
17
- dataSourceFilePath
18
- );
16
+ let dataSourceFileExports =
17
+ await ImportUtils.importOrRequireFile(dataSourceFilePath);
19
18
  if (dataSourceFileExports[0] && dataSourceFileExports[0].default) {
20
19
  dataSourceFileExports = dataSourceFileExports[0].default;
21
20
  if (typeof dataSourceFileExports === 'function') {
@@ -41,10 +40,10 @@ CommandUtils.loadDataSource = async function (dataSourceFilePath) {
41
40
  }
42
41
  } catch (err) {
43
42
  throw new Error(
44
- `Unable to open file: "${dataSourceFilePath}". ${err.message}`
43
+ `Unable to open file: "${dataSourceFilePath}". ${err.message}`,
44
+ { cause: err }
45
45
  );
46
46
  }
47
47
  };
48
48
 
49
- // eslint-disable-next-line node/no-unpublished-require
50
49
  require('typeorm/cli-ts-node-commonjs');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/typeorm",
3
- "version": "4.0.0-beta.11",
3
+ "version": "4.0.0-beta.13",
4
4
  "description": "Midway Component for TypeORM",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -14,8 +14,8 @@
14
14
  "index.d.ts"
15
15
  ],
16
16
  "devDependencies": {
17
- "@midwayjs/core": "^4.0.0-beta.11",
18
- "@midwayjs/mock": "^4.0.0-beta.11",
17
+ "@midwayjs/core": "^4.0.0-beta.13",
18
+ "@midwayjs/mock": "^4.0.0-beta.13",
19
19
  "sqlite3": "5.1.7",
20
20
  "typeorm": "0.3.26"
21
21
  },
@@ -36,5 +36,5 @@
36
36
  "type": "git",
37
37
  "url": "https://github.com/midwayjs/midway.git"
38
38
  },
39
- "gitHead": "6ef05719ca6e900f1ec34aff7a5c5a9614358c50"
39
+ "gitHead": "9a38b66a84a6880370cac90d737f94f9c5f2f256"
40
40
  }