zenweb 2.8.1 → 2.9.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/index.d.ts +1 -0
- package/dist/index.js +9 -2
- package/dist/types.js +0 -1
- package/package.json +5 -4
- package/dist/index.js.map +0 -1
- package/dist/types.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import '@zenweb/body';
|
|
|
5
5
|
import '@zenweb/helper';
|
|
6
6
|
import { Core, SetupFunction } from '@zenweb/core';
|
|
7
7
|
import { CreateOptions } from './types';
|
|
8
|
+
export { init, inject, singleton, Context } from '@zenweb/inject';
|
|
8
9
|
export { Router } from '@zenweb/router';
|
|
9
10
|
export { ApiFail } from '@zenweb/api';
|
|
10
11
|
export { Service } from '@zenweb/service';
|
package/dist/index.js
CHANGED
|
@@ -10,12 +10,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.create = exports.Core = exports.Service = exports.ApiFail = exports.Router = void 0;
|
|
13
|
+
exports.create = exports.Core = exports.Service = exports.ApiFail = exports.Router = exports.Context = exports.singleton = exports.inject = exports.init = void 0;
|
|
14
14
|
require("@zenweb/meta");
|
|
15
15
|
require("@zenweb/log");
|
|
16
16
|
require("@zenweb/messagecode");
|
|
17
17
|
require("@zenweb/body");
|
|
18
18
|
require("@zenweb/helper");
|
|
19
|
+
const inject_1 = require("@zenweb/inject");
|
|
19
20
|
const meta_1 = require("@zenweb/meta");
|
|
20
21
|
const log_1 = require("@zenweb/log");
|
|
21
22
|
const router_1 = require("@zenweb/router");
|
|
@@ -26,6 +27,11 @@ const api_1 = require("@zenweb/api");
|
|
|
26
27
|
const helper_1 = require("@zenweb/helper");
|
|
27
28
|
const core_1 = require("@zenweb/core");
|
|
28
29
|
Object.defineProperty(exports, "Core", { enumerable: true, get: function () { return core_1.Core; } });
|
|
30
|
+
var inject_2 = require("@zenweb/inject");
|
|
31
|
+
Object.defineProperty(exports, "init", { enumerable: true, get: function () { return inject_2.init; } });
|
|
32
|
+
Object.defineProperty(exports, "inject", { enumerable: true, get: function () { return inject_2.inject; } });
|
|
33
|
+
Object.defineProperty(exports, "singleton", { enumerable: true, get: function () { return inject_2.singleton; } });
|
|
34
|
+
Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return inject_2.Context; } });
|
|
29
35
|
var router_2 = require("@zenweb/router");
|
|
30
36
|
Object.defineProperty(exports, "Router", { enumerable: true, get: function () { return router_2.Router; } });
|
|
31
37
|
var api_2 = require("@zenweb/api");
|
|
@@ -39,6 +45,8 @@ __exportStar(require("./types"), exports);
|
|
|
39
45
|
function create(options) {
|
|
40
46
|
options = options || {};
|
|
41
47
|
const core = new core_1.Core(options.core);
|
|
48
|
+
if (options.inject !== false)
|
|
49
|
+
core.setup((0, inject_1.default)());
|
|
42
50
|
if (options.meta !== false)
|
|
43
51
|
core.setup((0, meta_1.default)(options.meta));
|
|
44
52
|
if (options.log !== false)
|
|
@@ -58,4 +66,3 @@ function create(options) {
|
|
|
58
66
|
return core;
|
|
59
67
|
}
|
|
60
68
|
exports.create = create;
|
|
61
|
-
//# sourceMappingURL=index.js.map
|
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zenweb",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "Modular lightweight web framework based on Koa",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "./dist/index.d.ts",
|
|
@@ -32,14 +32,15 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@zenweb/api": "^2.3.4",
|
|
35
|
-
"@zenweb/body": "^2.4.
|
|
35
|
+
"@zenweb/body": "^2.4.2",
|
|
36
36
|
"@zenweb/core": "^2.4.1",
|
|
37
37
|
"@zenweb/helper": "^2.8.2",
|
|
38
|
+
"@zenweb/inject": "^1.0.0",
|
|
38
39
|
"@zenweb/log": "^2.3.0",
|
|
39
40
|
"@zenweb/messagecode": "^2.3.0",
|
|
40
41
|
"@zenweb/meta": "^2.3.2",
|
|
41
|
-
"@zenweb/router": "^2.
|
|
42
|
-
"@zenweb/service": "^2.4.
|
|
42
|
+
"@zenweb/router": "^2.4.2",
|
|
43
|
+
"@zenweb/service": "^2.4.9"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"cross-env": "^7.0.3",
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,wBAAsB;AACtB,uBAAqB;AACrB,+BAA6B;AAC7B,wBAAsB;AACtB,0BAAwB;AACxB,uCAAgC;AAChC,qCAA8B;AAC9B,2CAAoC;AACpC,qDAA8C;AAC9C,uCAAgC;AAChC,6CAAsC;AACtC,qCAA8B;AAC9B,2CAAoC;AACpC,uCAAmD;AAQjD,qFARO,WAAI,OAQP;AANN,yCAAwC;AAA/B,gGAAA,MAAM,OAAA;AACf,mCAAsC;AAA7B,8FAAA,OAAO,OAAA;AAChB,2CAA0C;AAAjC,kGAAA,OAAO,OAAA;AAChB,0CAAwB;AAOxB;;GAEG;AACH,SAAgB,MAAM,CAAC,OAAuB;IAC5C,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;IACxB,MAAM,IAAI,GAAG,IAAI,WAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK;QAAE,IAAI,CAAC,KAAK,CAAC,IAAA,cAAI,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3D,IAAI,O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