edgeone 1.1.12 → 1.1.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.
- package/edgeone-dist/cli.js +294 -275
- package/edgeone-dist/pages/dev/runner-worker.js +22 -3
- package/package.json +1 -1
|
@@ -1168,6 +1168,25 @@ Object.assign(env, process.env || {});
|
|
|
1168
1168
|
delete env.TENCENTCLOUD_UIN;
|
|
1169
1169
|
delete env.TENCENTCLOUD_APPID;
|
|
1170
1170
|
|
|
1171
|
+
|
|
1172
|
+
try {
|
|
1173
|
+
|
|
1174
|
+
// \u79FB\u9664\u5DF2\u6709\u7684\u76D1\u542C\u5668\uFF08\u5982\u679C\u6709\uFF09
|
|
1175
|
+
process.removeAllListeners('uncaughtException');
|
|
1176
|
+
process.removeAllListeners('unhandledRejection');
|
|
1177
|
+
|
|
1178
|
+
process.on('uncaughtException', (error) => {
|
|
1179
|
+
console.error('Uncaught Exception:', error);
|
|
1180
|
+
});
|
|
1181
|
+
|
|
1182
|
+
process.on('unhandledRejection', (reason, promise) => {
|
|
1183
|
+
console.error('Unhandled Rejection:', reason);
|
|
1184
|
+
});
|
|
1185
|
+
|
|
1186
|
+
} catch (error) {
|
|
1187
|
+
console.error('Uncaught Exception:', error);
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1171
1190
|
const port = ${this.wrapPort};
|
|
1172
1191
|
|
|
1173
1192
|
${v$()}
|
|
@@ -1188,7 +1207,7 @@ const server = http.createServer(async (req, res) => {
|
|
|
1188
1207
|
});
|
|
1189
1208
|
return result;
|
|
1190
1209
|
})() : {};
|
|
1191
|
-
|
|
1210
|
+
// \u4FEE\u6539 req.headers \u4E2D\u7684 eo-connecting-geo \u4E3A geo
|
|
1192
1211
|
const newGeo = {
|
|
1193
1212
|
asn: geo.asn,
|
|
1194
1213
|
countryName: geo.nation_name,
|
|
@@ -1265,9 +1284,9 @@ const server = http.createServer(async (req, res) => {
|
|
|
1265
1284
|
|
|
1266
1285
|
} catch (error) {
|
|
1267
1286
|
console.error('server error', error);
|
|
1268
|
-
res.writeHead(
|
|
1287
|
+
res.writeHead(502, {
|
|
1269
1288
|
"Content-Type": "application/json",
|
|
1270
|
-
"Eo-Pages-Inner-Scf-Status": "
|
|
1289
|
+
"Eo-Pages-Inner-Scf-Status": "502",
|
|
1271
1290
|
"Functions-Request-Id": req.headers['x-scf-request-id'] || ''
|
|
1272
1291
|
});
|
|
1273
1292
|
res.end(JSON.stringify({
|