jeasx 1.6.1 → 1.6.2
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/esbuild.config.js +4 -0
- package/package.json +1 -1
- package/serverless.js +8 -1
- package/serverless.ts +8 -1
package/esbuild.config.js
CHANGED
|
@@ -65,6 +65,8 @@ function buildServer(...entryPoints) {
|
|
|
65
65
|
logLevel: "info",
|
|
66
66
|
color: true,
|
|
67
67
|
bundle: true,
|
|
68
|
+
sourcemap: true,
|
|
69
|
+
sourcesContent: false,
|
|
68
70
|
outbase: "src",
|
|
69
71
|
outdir: "dist",
|
|
70
72
|
platform: "neutral",
|
|
@@ -83,6 +85,8 @@ function buildBrowser(...entryPoints) {
|
|
|
83
85
|
logLevel: "info",
|
|
84
86
|
color: true,
|
|
85
87
|
bundle: true,
|
|
88
|
+
sourcemap: true,
|
|
89
|
+
sourcesContent: true,
|
|
86
90
|
outbase: "src/browser",
|
|
87
91
|
outdir: "dist/browser",
|
|
88
92
|
platform: "browser",
|
package/package.json
CHANGED
package/serverless.js
CHANGED
|
@@ -40,7 +40,14 @@ var serverless_default = Fastify({
|
|
|
40
40
|
}).decorateRequest("route", "").decorateRequest("path", "").addHook("onRequest", async (request, reply) => {
|
|
41
41
|
const index = request.url.indexOf("?");
|
|
42
42
|
request.path = index === -1 ? request.url : request.url.slice(0, index);
|
|
43
|
-
}).all("*",
|
|
43
|
+
}).all("*", async (request, reply) => {
|
|
44
|
+
try {
|
|
45
|
+
return await handler(request, reply);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.error("\u274C", error);
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
44
51
|
const modules = {};
|
|
45
52
|
async function handler(request, reply) {
|
|
46
53
|
let response;
|
package/serverless.ts
CHANGED
|
@@ -66,7 +66,14 @@ export default Fastify({
|
|
|
66
66
|
const index = request.url.indexOf("?");
|
|
67
67
|
request.path = index === -1 ? request.url : request.url.slice(0, index);
|
|
68
68
|
})
|
|
69
|
-
.all("*",
|
|
69
|
+
.all("*", async (request: FastifyRequest, reply: FastifyReply) => {
|
|
70
|
+
try {
|
|
71
|
+
return await handler(request, reply);
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.error("❌", error);
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
70
77
|
|
|
71
78
|
// Cache for resolved route modules, 'null' means no module exists.
|
|
72
79
|
const modules: { [path: string]: { default: Function } | null } = {};
|