@modern-js/plugin-express 2.27.0 → 2.28.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/CHANGELOG.md +11 -0
- package/dist/cjs/plugin.js +106 -109
- package/dist/cjs/utils.js +2 -2
- package/dist/esm/plugin.js +4 -4
- package/dist/esm/utils.js +2 -2
- package/dist/esm-node/plugin.js +106 -109
- package/dist/esm-node/utils.js +2 -2
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @modern-js/plugin-express
|
|
2
2
|
|
|
3
|
+
## 2.28.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [4e3ce96]
|
|
8
|
+
- Updated dependencies [00b58a7]
|
|
9
|
+
- @modern-js/types@2.28.0
|
|
10
|
+
- @modern-js/utils@2.28.0
|
|
11
|
+
- @modern-js/bff-core@2.28.0
|
|
12
|
+
- @modern-js/bff-runtime@2.28.0
|
|
13
|
+
|
|
3
14
|
## 2.27.0
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -58,117 +58,114 @@ const initApp = (app) => {
|
|
|
58
58
|
app.use(_express.default.json());
|
|
59
59
|
return app;
|
|
60
60
|
};
|
|
61
|
-
const _default = () => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
afterLambdaRegisted(app);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
} else if (mode === "function") {
|
|
102
|
-
app = (0, _express.default)();
|
|
103
|
-
initApp(app);
|
|
104
|
-
if (config) {
|
|
105
|
-
const { middleware } = config;
|
|
106
|
-
initMiddlewares(middleware, app);
|
|
107
|
-
}
|
|
108
|
-
useRun(app);
|
|
109
|
-
(0, _registerRoutes.default)(app, apiHandlerInfos);
|
|
110
|
-
} else {
|
|
111
|
-
throw new Error(`mode must be function or framework`);
|
|
61
|
+
const _default = () => ({
|
|
62
|
+
name: "@modern-js/plugin-express",
|
|
63
|
+
pre: [
|
|
64
|
+
"@modern-js/plugin-bff"
|
|
65
|
+
],
|
|
66
|
+
post: [
|
|
67
|
+
"@modern-js/plugin-server"
|
|
68
|
+
],
|
|
69
|
+
setup: (api) => ({
|
|
70
|
+
async prepareApiServer({ pwd, config, render }) {
|
|
71
|
+
var _userConfig_bff;
|
|
72
|
+
let app;
|
|
73
|
+
const appContext = api.useAppContext();
|
|
74
|
+
const apiHandlerInfos = appContext.apiHandlerInfos;
|
|
75
|
+
const apiDirectory = appContext.apiDirectory;
|
|
76
|
+
const apiDir = apiDirectory || _path.join(pwd, "./api");
|
|
77
|
+
const mode = appContext.apiMode;
|
|
78
|
+
const userConfig = api.useConfigContext();
|
|
79
|
+
if (mode === "framework") {
|
|
80
|
+
var _app;
|
|
81
|
+
const appModule = await findAppModule(apiDir);
|
|
82
|
+
app = appModule[0];
|
|
83
|
+
const hooks = appModule[1];
|
|
84
|
+
if (!((_app = app) === null || _app === void 0 ? void 0 : _app.use)) {
|
|
85
|
+
app = (0, _express.default)();
|
|
86
|
+
}
|
|
87
|
+
initApp(app);
|
|
88
|
+
if (config) {
|
|
89
|
+
const { middleware } = config;
|
|
90
|
+
initMiddlewares(middleware, app);
|
|
91
|
+
}
|
|
92
|
+
useRun(app);
|
|
93
|
+
(0, _registerRoutes.default)(app, apiHandlerInfos);
|
|
94
|
+
if (hooks) {
|
|
95
|
+
const { afterLambdaRegisted } = hooks;
|
|
96
|
+
if (afterLambdaRegisted) {
|
|
97
|
+
afterLambdaRegisted(app);
|
|
112
98
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
99
|
+
}
|
|
100
|
+
} else if (mode === "function") {
|
|
101
|
+
app = (0, _express.default)();
|
|
102
|
+
initApp(app);
|
|
103
|
+
if (config) {
|
|
104
|
+
const { middleware } = config;
|
|
105
|
+
initMiddlewares(middleware, app);
|
|
106
|
+
}
|
|
107
|
+
useRun(app);
|
|
108
|
+
(0, _registerRoutes.default)(app, apiHandlerInfos);
|
|
109
|
+
} else {
|
|
110
|
+
throw new Error(`mode must be function or framework`);
|
|
111
|
+
}
|
|
112
|
+
if (((_userConfig_bff = userConfig.bff) === null || _userConfig_bff === void 0 ? void 0 : _userConfig_bff.enableHandleWeb) && render) {
|
|
113
|
+
app.use(async (req, res, next) => {
|
|
114
|
+
const html = await render(req, res);
|
|
115
|
+
if (html) {
|
|
116
|
+
res.end(html);
|
|
121
117
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
res.on("finish", (err) => {
|
|
130
|
-
if (err) {
|
|
131
|
-
return reject(err);
|
|
132
|
-
}
|
|
133
|
-
return resolve();
|
|
134
|
-
});
|
|
135
|
-
return app(req, res, handler);
|
|
136
|
-
});
|
|
137
|
-
},
|
|
138
|
-
prepareWebServer({ config }, next) {
|
|
139
|
-
var _userConfig_server;
|
|
140
|
-
const userConfig = api.useConfigContext();
|
|
141
|
-
if (!(userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_server = userConfig.server) === null || _userConfig_server === void 0 ? void 0 : _userConfig_server.enableFrameworkExt)) {
|
|
142
|
-
return next();
|
|
118
|
+
next();
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
return (req, res) => new Promise((resolve, reject) => {
|
|
122
|
+
const handler = (err) => {
|
|
123
|
+
if (err) {
|
|
124
|
+
return reject(err);
|
|
143
125
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
initMiddlewares(middleware, app);
|
|
126
|
+
return (0, _finalhandler.default)(req, res, {})(null);
|
|
127
|
+
};
|
|
128
|
+
res.on("finish", (err) => {
|
|
129
|
+
if (err) {
|
|
130
|
+
return reject(err);
|
|
150
131
|
}
|
|
151
|
-
return (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
132
|
+
return resolve();
|
|
133
|
+
});
|
|
134
|
+
return app(req, res, handler);
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
prepareWebServer({ config }, next) {
|
|
138
|
+
var _userConfig_server, _userConfig;
|
|
139
|
+
const userConfig = api.useConfigContext();
|
|
140
|
+
if (!((_userConfig = userConfig) === null || _userConfig === void 0 ? void 0 : (_userConfig_server = _userConfig.server) === null || _userConfig_server === void 0 ? void 0 : _userConfig_server.enableFrameworkExt)) {
|
|
141
|
+
return next();
|
|
142
|
+
}
|
|
143
|
+
const app = (0, _express.default)();
|
|
144
|
+
initApp(app);
|
|
145
|
+
if (config) {
|
|
146
|
+
const { middleware } = config;
|
|
147
|
+
debug("web middleware", middleware);
|
|
148
|
+
initMiddlewares(middleware, app);
|
|
149
|
+
}
|
|
150
|
+
return (ctx) => new Promise((resolve, reject) => {
|
|
151
|
+
const { source: { req, res } } = ctx;
|
|
152
|
+
const handler = (err) => {
|
|
153
|
+
if (err) {
|
|
154
|
+
return reject(err);
|
|
155
|
+
}
|
|
156
|
+
if (res.headersSent && res.statusCode !== 200) {
|
|
157
|
+
(0, _finalhandler.default)(req, res, {})(null);
|
|
158
|
+
}
|
|
159
|
+
return resolve();
|
|
160
|
+
};
|
|
161
|
+
res.on("finish", (err) => {
|
|
162
|
+
if (err) {
|
|
163
|
+
return reject(err);
|
|
164
|
+
}
|
|
165
|
+
return resolve();
|
|
166
|
+
});
|
|
167
|
+
return app(req, res, handler);
|
|
168
|
+
});
|
|
172
169
|
}
|
|
173
|
-
}
|
|
174
|
-
};
|
|
170
|
+
})
|
|
171
|
+
});
|
package/dist/cjs/utils.js
CHANGED
|
@@ -84,8 +84,8 @@ const createRouteHandler = (handler) => {
|
|
|
84
84
|
}
|
|
85
85
|
} else if ((0, _bffcore.isInputParamsDeciderHandler)(handler)) {
|
|
86
86
|
try {
|
|
87
|
-
var _input_data;
|
|
88
|
-
const args = (input === null ||
|
|
87
|
+
var _input_data, _input;
|
|
88
|
+
const args = ((_input = input) === null || _input === void 0 ? void 0 : (_input_data = _input.data) === null || _input_data === void 0 ? void 0 : _input_data.args) || [];
|
|
89
89
|
const body = await handler(...args);
|
|
90
90
|
if (typeof body !== "undefined") {
|
|
91
91
|
if (typeof body === "object") {
|
package/dist/esm/plugin.js
CHANGED
|
@@ -136,7 +136,7 @@ export default function() {
|
|
|
136
136
|
prepareApiServer: function prepareApiServer(param) {
|
|
137
137
|
var pwd = param.pwd, config = param.config, render = param.render;
|
|
138
138
|
return _async_to_generator(function() {
|
|
139
|
-
var _userConfig_bff, app, appContext, apiHandlerInfos, apiDirectory, apiDir, mode, userConfig, appModule, hooks, middleware, afterLambdaRegisted, middleware1;
|
|
139
|
+
var _userConfig_bff, app, appContext, apiHandlerInfos, apiDirectory, apiDir, mode, userConfig, _app, appModule, hooks, middleware, afterLambdaRegisted, middleware1;
|
|
140
140
|
return _ts_generator(this, function(_state) {
|
|
141
141
|
switch (_state.label) {
|
|
142
142
|
case 0:
|
|
@@ -159,7 +159,7 @@ export default function() {
|
|
|
159
159
|
appModule = _state.sent();
|
|
160
160
|
app = appModule[0];
|
|
161
161
|
hooks = appModule[1];
|
|
162
|
-
if (!(app === null ||
|
|
162
|
+
if (!((_app = app) === null || _app === void 0 ? void 0 : _app.use)) {
|
|
163
163
|
app = express();
|
|
164
164
|
}
|
|
165
165
|
initApp(app);
|
|
@@ -248,9 +248,9 @@ export default function() {
|
|
|
248
248
|
},
|
|
249
249
|
prepareWebServer: function prepareWebServer(param, next) {
|
|
250
250
|
var config = param.config;
|
|
251
|
-
var _userConfig_server;
|
|
251
|
+
var _userConfig_server, _userConfig;
|
|
252
252
|
var userConfig = api.useConfigContext();
|
|
253
|
-
if (!(userConfig === null ||
|
|
253
|
+
if (!((_userConfig = userConfig) === null || _userConfig === void 0 ? void 0 : (_userConfig_server = _userConfig.server) === null || _userConfig_server === void 0 ? void 0 : _userConfig_server.enableFrameworkExt)) {
|
|
254
254
|
return next();
|
|
255
255
|
}
|
|
256
256
|
var app = express();
|
package/dist/esm/utils.js
CHANGED
|
@@ -70,7 +70,7 @@ var handleResponseMeta = function(res, handler) {
|
|
|
70
70
|
export var createRouteHandler = function(handler) {
|
|
71
71
|
var apiHandler = function() {
|
|
72
72
|
var _ref = _async_to_generator(function(req, res, next) {
|
|
73
|
-
var input, result, error, result1, _input_data, args, body, e, args1, body1, e1;
|
|
73
|
+
var input, result, error, result1, _input_data, _input, args, body, e, args1, body1, e1;
|
|
74
74
|
return _ts_generator(this, function(_state) {
|
|
75
75
|
switch (_state.label) {
|
|
76
76
|
case 0:
|
|
@@ -179,7 +179,7 @@ export var createRouteHandler = function(handler) {
|
|
|
179
179
|
,
|
|
180
180
|
12
|
|
181
181
|
]);
|
|
182
|
-
args = (input === null ||
|
|
182
|
+
args = ((_input = input) === null || _input === void 0 ? void 0 : (_input_data = _input.data) === null || _input_data === void 0 ? void 0 : _input_data.args) || [];
|
|
183
183
|
return [
|
|
184
184
|
4,
|
|
185
185
|
handler.apply(void 0, _to_consumable_array(args))
|
package/dist/esm-node/plugin.js
CHANGED
|
@@ -46,117 +46,114 @@ const initApp = (app) => {
|
|
|
46
46
|
app.use(express.json());
|
|
47
47
|
return app;
|
|
48
48
|
};
|
|
49
|
-
export default () => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
afterLambdaRegisted(app);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
} else if (mode === "function") {
|
|
90
|
-
app = express();
|
|
91
|
-
initApp(app);
|
|
92
|
-
if (config) {
|
|
93
|
-
const { middleware } = config;
|
|
94
|
-
initMiddlewares(middleware, app);
|
|
95
|
-
}
|
|
96
|
-
useRun(app);
|
|
97
|
-
registerRoutes(app, apiHandlerInfos);
|
|
98
|
-
} else {
|
|
99
|
-
throw new Error(`mode must be function or framework`);
|
|
49
|
+
export default () => ({
|
|
50
|
+
name: "@modern-js/plugin-express",
|
|
51
|
+
pre: [
|
|
52
|
+
"@modern-js/plugin-bff"
|
|
53
|
+
],
|
|
54
|
+
post: [
|
|
55
|
+
"@modern-js/plugin-server"
|
|
56
|
+
],
|
|
57
|
+
setup: (api) => ({
|
|
58
|
+
async prepareApiServer({ pwd, config, render }) {
|
|
59
|
+
var _userConfig_bff;
|
|
60
|
+
let app;
|
|
61
|
+
const appContext = api.useAppContext();
|
|
62
|
+
const apiHandlerInfos = appContext.apiHandlerInfos;
|
|
63
|
+
const apiDirectory = appContext.apiDirectory;
|
|
64
|
+
const apiDir = apiDirectory || path.join(pwd, "./api");
|
|
65
|
+
const mode = appContext.apiMode;
|
|
66
|
+
const userConfig = api.useConfigContext();
|
|
67
|
+
if (mode === "framework") {
|
|
68
|
+
var _app;
|
|
69
|
+
const appModule = await findAppModule(apiDir);
|
|
70
|
+
app = appModule[0];
|
|
71
|
+
const hooks = appModule[1];
|
|
72
|
+
if (!((_app = app) === null || _app === void 0 ? void 0 : _app.use)) {
|
|
73
|
+
app = express();
|
|
74
|
+
}
|
|
75
|
+
initApp(app);
|
|
76
|
+
if (config) {
|
|
77
|
+
const { middleware } = config;
|
|
78
|
+
initMiddlewares(middleware, app);
|
|
79
|
+
}
|
|
80
|
+
useRun(app);
|
|
81
|
+
registerRoutes(app, apiHandlerInfos);
|
|
82
|
+
if (hooks) {
|
|
83
|
+
const { afterLambdaRegisted } = hooks;
|
|
84
|
+
if (afterLambdaRegisted) {
|
|
85
|
+
afterLambdaRegisted(app);
|
|
100
86
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
87
|
+
}
|
|
88
|
+
} else if (mode === "function") {
|
|
89
|
+
app = express();
|
|
90
|
+
initApp(app);
|
|
91
|
+
if (config) {
|
|
92
|
+
const { middleware } = config;
|
|
93
|
+
initMiddlewares(middleware, app);
|
|
94
|
+
}
|
|
95
|
+
useRun(app);
|
|
96
|
+
registerRoutes(app, apiHandlerInfos);
|
|
97
|
+
} else {
|
|
98
|
+
throw new Error(`mode must be function or framework`);
|
|
99
|
+
}
|
|
100
|
+
if (((_userConfig_bff = userConfig.bff) === null || _userConfig_bff === void 0 ? void 0 : _userConfig_bff.enableHandleWeb) && render) {
|
|
101
|
+
app.use(async (req, res, next) => {
|
|
102
|
+
const html = await render(req, res);
|
|
103
|
+
if (html) {
|
|
104
|
+
res.end(html);
|
|
109
105
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
res.on("finish", (err) => {
|
|
118
|
-
if (err) {
|
|
119
|
-
return reject(err);
|
|
120
|
-
}
|
|
121
|
-
return resolve();
|
|
122
|
-
});
|
|
123
|
-
return app(req, res, handler);
|
|
124
|
-
});
|
|
125
|
-
},
|
|
126
|
-
prepareWebServer({ config }, next) {
|
|
127
|
-
var _userConfig_server;
|
|
128
|
-
const userConfig = api.useConfigContext();
|
|
129
|
-
if (!(userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_server = userConfig.server) === null || _userConfig_server === void 0 ? void 0 : _userConfig_server.enableFrameworkExt)) {
|
|
130
|
-
return next();
|
|
106
|
+
next();
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return (req, res) => new Promise((resolve, reject) => {
|
|
110
|
+
const handler = (err) => {
|
|
111
|
+
if (err) {
|
|
112
|
+
return reject(err);
|
|
131
113
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
initMiddlewares(middleware, app);
|
|
114
|
+
return finalhandler(req, res, {})(null);
|
|
115
|
+
};
|
|
116
|
+
res.on("finish", (err) => {
|
|
117
|
+
if (err) {
|
|
118
|
+
return reject(err);
|
|
138
119
|
}
|
|
139
|
-
return (
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
120
|
+
return resolve();
|
|
121
|
+
});
|
|
122
|
+
return app(req, res, handler);
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
prepareWebServer({ config }, next) {
|
|
126
|
+
var _userConfig_server, _userConfig;
|
|
127
|
+
const userConfig = api.useConfigContext();
|
|
128
|
+
if (!((_userConfig = userConfig) === null || _userConfig === void 0 ? void 0 : (_userConfig_server = _userConfig.server) === null || _userConfig_server === void 0 ? void 0 : _userConfig_server.enableFrameworkExt)) {
|
|
129
|
+
return next();
|
|
130
|
+
}
|
|
131
|
+
const app = express();
|
|
132
|
+
initApp(app);
|
|
133
|
+
if (config) {
|
|
134
|
+
const { middleware } = config;
|
|
135
|
+
debug("web middleware", middleware);
|
|
136
|
+
initMiddlewares(middleware, app);
|
|
137
|
+
}
|
|
138
|
+
return (ctx) => new Promise((resolve, reject) => {
|
|
139
|
+
const { source: { req, res } } = ctx;
|
|
140
|
+
const handler = (err) => {
|
|
141
|
+
if (err) {
|
|
142
|
+
return reject(err);
|
|
143
|
+
}
|
|
144
|
+
if (res.headersSent && res.statusCode !== 200) {
|
|
145
|
+
finalhandler(req, res, {})(null);
|
|
146
|
+
}
|
|
147
|
+
return resolve();
|
|
148
|
+
};
|
|
149
|
+
res.on("finish", (err) => {
|
|
150
|
+
if (err) {
|
|
151
|
+
return reject(err);
|
|
152
|
+
}
|
|
153
|
+
return resolve();
|
|
154
|
+
});
|
|
155
|
+
return app(req, res, handler);
|
|
156
|
+
});
|
|
160
157
|
}
|
|
161
|
-
}
|
|
162
|
-
};
|
|
158
|
+
})
|
|
159
|
+
});
|
package/dist/esm-node/utils.js
CHANGED
|
@@ -64,8 +64,8 @@ export const createRouteHandler = (handler) => {
|
|
|
64
64
|
}
|
|
65
65
|
} else if (isInputParamsDeciderHandler(handler)) {
|
|
66
66
|
try {
|
|
67
|
-
var _input_data;
|
|
68
|
-
const args = (input === null ||
|
|
67
|
+
var _input_data, _input;
|
|
68
|
+
const args = ((_input = input) === null || _input === void 0 ? void 0 : (_input_data = _input.data) === null || _input_data === void 0 ? void 0 : _input_data.args) || [];
|
|
69
69
|
const body = await handler(...args);
|
|
70
70
|
if (typeof body !== "undefined") {
|
|
71
71
|
if (typeof body === "object") {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.28.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/cli/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/cli/index.js",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"reflect-metadata": "^0.1.13",
|
|
50
50
|
"type-is": "^1.6.18",
|
|
51
51
|
"@swc/helpers": "0.5.1",
|
|
52
|
-
"@modern-js/bff-runtime": "2.
|
|
53
|
-
"@modern-js/types": "2.
|
|
54
|
-
"@modern-js/
|
|
55
|
-
"@modern-js/
|
|
52
|
+
"@modern-js/bff-runtime": "2.28.0",
|
|
53
|
+
"@modern-js/types": "2.28.0",
|
|
54
|
+
"@modern-js/bff-core": "2.28.0",
|
|
55
|
+
"@modern-js/utils": "2.28.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/cookie-parser": "^1.4.2",
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"supertest": "^6.1.6",
|
|
69
69
|
"typescript": "^5",
|
|
70
70
|
"zod": "^3.17.3",
|
|
71
|
-
"@modern-js/core": "2.
|
|
72
|
-
"@modern-js/app-tools": "2.
|
|
73
|
-
"@modern-js/server-core": "2.
|
|
74
|
-
"@scripts/
|
|
75
|
-
"@scripts/
|
|
71
|
+
"@modern-js/core": "2.28.0",
|
|
72
|
+
"@modern-js/app-tools": "2.28.0",
|
|
73
|
+
"@modern-js/server-core": "2.28.0",
|
|
74
|
+
"@scripts/jest-config": "2.28.0",
|
|
75
|
+
"@scripts/build": "2.28.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"express": "^4.17.1"
|