@midwayjs/code-dye 3.19.2 → 4.0.0-alpha.1
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/configuration.js +3 -3
- package/dist/middleware.js +3 -3
- package/package.json +10 -11
package/dist/configuration.js
CHANGED
|
@@ -23,7 +23,7 @@ let CodeDyeConfiguration = class CodeDyeConfiguration {
|
|
|
23
23
|
});
|
|
24
24
|
// 将ioc内的代码进行包裹
|
|
25
25
|
for (const [key, value] of container.registry) {
|
|
26
|
-
if (!
|
|
26
|
+
if (!value?.path || !value.srcPath) {
|
|
27
27
|
continue;
|
|
28
28
|
}
|
|
29
29
|
value.path = (0, codeDye_1.codeDye)(value.path, [value.srcPath || key]);
|
|
@@ -31,6 +31,7 @@ let CodeDyeConfiguration = class CodeDyeConfiguration {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
+
exports.CodeDyeConfiguration = CodeDyeConfiguration;
|
|
34
35
|
__decorate([
|
|
35
36
|
(0, core_1.Inject)(),
|
|
36
37
|
__metadata("design:type", core_1.MidwayApplicationManager)
|
|
@@ -39,7 +40,7 @@ __decorate([
|
|
|
39
40
|
(0, core_1.Config)(),
|
|
40
41
|
__metadata("design:type", Object)
|
|
41
42
|
], CodeDyeConfiguration.prototype, "codeDye", void 0);
|
|
42
|
-
CodeDyeConfiguration = __decorate([
|
|
43
|
+
exports.CodeDyeConfiguration = CodeDyeConfiguration = __decorate([
|
|
43
44
|
(0, core_1.Configuration)({
|
|
44
45
|
namespace: 'code-dye',
|
|
45
46
|
importConfigs: [
|
|
@@ -49,5 +50,4 @@ CodeDyeConfiguration = __decorate([
|
|
|
49
50
|
],
|
|
50
51
|
})
|
|
51
52
|
], CodeDyeConfiguration);
|
|
52
|
-
exports.CodeDyeConfiguration = CodeDyeConfiguration;
|
|
53
53
|
//# sourceMappingURL=configuration.js.map
|
package/dist/middleware.js
CHANGED
|
@@ -15,7 +15,7 @@ const html_1 = require("./html");
|
|
|
15
15
|
const reqInfo_1 = require("./reqInfo");
|
|
16
16
|
let CodeDyeMW = class CodeDyeMW {
|
|
17
17
|
resolve(app) {
|
|
18
|
-
if (
|
|
18
|
+
if ('express' === app.getNamespace()) {
|
|
19
19
|
return async (req, res, next) => {
|
|
20
20
|
return this.compatibleMiddleware(req, res, next);
|
|
21
21
|
};
|
|
@@ -71,12 +71,12 @@ let CodeDyeMW = class CodeDyeMW {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
+
exports.CodeDyeMW = CodeDyeMW;
|
|
74
75
|
__decorate([
|
|
75
76
|
(0, core_1.Config)('codeDye'),
|
|
76
77
|
__metadata("design:type", Object)
|
|
77
78
|
], CodeDyeMW.prototype, "codeDye", void 0);
|
|
78
|
-
CodeDyeMW = __decorate([
|
|
79
|
+
exports.CodeDyeMW = CodeDyeMW = __decorate([
|
|
79
80
|
(0, core_1.Middleware)()
|
|
80
81
|
], CodeDyeMW);
|
|
81
|
-
exports.CodeDyeMW = CodeDyeMW;
|
|
82
82
|
//# sourceMappingURL=middleware.js.map
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/code-dye",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.1",
|
|
4
4
|
"description": "Midway Code Dye Component",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
|
-
"test": "node
|
|
10
|
-
"cov": "node
|
|
9
|
+
"test": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand",
|
|
10
|
+
"cov": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand --coverage --forceExit",
|
|
11
11
|
"ci": "npm run test"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [],
|
|
@@ -22,13 +22,12 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@midwayjs/core": "^
|
|
26
|
-
"@midwayjs/express": "^
|
|
27
|
-
"@midwayjs/faas": "^
|
|
28
|
-
"@midwayjs/koa": "^
|
|
29
|
-
"@midwayjs/mock": "^
|
|
30
|
-
"@midwayjs/
|
|
31
|
-
"@midwayjs/web": "^3.19.2"
|
|
25
|
+
"@midwayjs/core": "^4.0.0-alpha.1",
|
|
26
|
+
"@midwayjs/express": "^4.0.0-alpha.1",
|
|
27
|
+
"@midwayjs/faas": "^4.0.0-alpha.1",
|
|
28
|
+
"@midwayjs/koa": "^4.0.0-alpha.1",
|
|
29
|
+
"@midwayjs/mock": "^4.0.0-alpha.1",
|
|
30
|
+
"@midwayjs/web": "^4.0.0-alpha.1"
|
|
32
31
|
},
|
|
33
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "14bb4da91805a1cf52f190c0d37a74b395dd6372"
|
|
34
33
|
}
|