@server/next 0.20.22 → 0.20.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@server/next",
3
- "version": "0.20.22",
3
+ "version": "0.20.24",
4
4
  "description": "An experimental reimplementation of server.js focused on the DX",
5
5
  "homepage": "https://node-server.com/",
6
6
  "repository": "https://github.com/franciscop/server-next.git",
@@ -6,10 +6,11 @@ export default new Proxy(NoSession, {
6
6
  get(target, key) {
7
7
  if (target[key]) return target[key];
8
8
  if (key === "then") return target[key];
9
+ if (typeof key === "symbol") return target[key];
9
10
  throw ServerError.NO_STORE_READ({ key });
10
11
  },
11
12
  set(target, key, value) {
12
- if (target[key] || key === "then") {
13
+ if (target[key] || key === "then" || typeof key === "symbol") {
13
14
  target[key] = value;
14
15
  } else {
15
16
  throw ServerError.NO_STORE_WRITE({ key });
package/src/index.js CHANGED
@@ -174,7 +174,9 @@ export default function server(options = {}) {
174
174
  options = validateOptions(options, Netlify.env.toObject());
175
175
  const ctx = await createWinterContext(request, options, this);
176
176
  extendWithDefaults(ctx);
177
- return await handleRequest(this.handlers, ctx);
177
+ const out = await handleRequest(this.handlers, ctx);
178
+ console.log(out);
179
+ return out;
178
180
  } catch (error) {
179
181
  console.error(error);
180
182
  return new Response(error.message, { status: error.status || 500 });