@midwayjs/info 3.11.12 → 3.12.0
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/infoService.js +1 -1
- package/dist/utils.js +5 -1
- package/package.json +7 -7
package/dist/infoService.js
CHANGED
|
@@ -104,7 +104,7 @@ let InfoService = class InfoService {
|
|
|
104
104
|
];
|
|
105
105
|
const info = {};
|
|
106
106
|
for (const modName of npmModuleList) {
|
|
107
|
-
const modulePkg =
|
|
107
|
+
const modulePkg = this.midwayInformationService.getPkg();
|
|
108
108
|
if (modulePkg) {
|
|
109
109
|
info[modName] = modulePkg.version;
|
|
110
110
|
}
|
package/dist/utils.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.safeContent = exports.renderToHtml = exports.bitToMB = exports.safeRequire = void 0;
|
|
4
|
+
const fs_1 = require("fs");
|
|
4
5
|
function safeRequire(mod, defaultValue) {
|
|
5
6
|
try {
|
|
6
|
-
|
|
7
|
+
if (!(0, fs_1.existsSync)(mod)) {
|
|
8
|
+
return defaultValue;
|
|
9
|
+
}
|
|
10
|
+
return JSON.parse((0, fs_1.readFileSync)(mod, 'utf8'));
|
|
7
11
|
}
|
|
8
12
|
catch (e) {
|
|
9
13
|
return defaultValue;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/info",
|
|
3
3
|
"description": "midway info",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.12.0",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"picomatch": "2.3.1"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@midwayjs/core": "^3.
|
|
17
|
-
"@midwayjs/express": "^3.
|
|
18
|
-
"@midwayjs/koa": "^3.
|
|
19
|
-
"@midwayjs/mock": "^3.
|
|
20
|
-
"@midwayjs/serverless-fc-starter": "^3.
|
|
16
|
+
"@midwayjs/core": "^3.12.0",
|
|
17
|
+
"@midwayjs/express": "^3.12.0",
|
|
18
|
+
"@midwayjs/koa": "^3.12.0",
|
|
19
|
+
"@midwayjs/mock": "^3.12.0",
|
|
20
|
+
"@midwayjs/serverless-fc-starter": "^3.12.0",
|
|
21
21
|
"@midwayjs/serverless-scf-starter": "^3.10.14"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"type": "git",
|
|
40
40
|
"url": "https://github.com/midwayjs/midway.git"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "0e9a08cd078c4c4dedfa753a8c1025806cc0b0a2"
|
|
43
43
|
}
|