solidstep 0.3.4 → 0.3.5

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": "solidstep",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Next Step SolidJS Framework for building web applications.",
5
5
  "type": "module",
6
6
  "author": "HamzaKV <hamzakv333@gmail.com>",
package/server.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AAkfA,QAAA,MAAM,OAAO,2FA+XX,CAAC;AAEH,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AAkfA,QAAA,MAAM,OAAO,2FAqYX,CAAC;AAEH,eAAe,OAAO,CAAC"}
package/server.js CHANGED
@@ -687,6 +687,10 @@ const handler = eventHandler(async (event) => {
687
687
  return stream;
688
688
  }
689
689
  catch (e) {
690
+ if (e instanceof RedirectError ||
691
+ e.name === 'RedirectError') {
692
+ return new Response('', { status: 302, headers: { Location: e.message } });
693
+ }
690
694
  console.error(e);
691
695
  return new Response('Internal Server Error', { status: 500 });
692
696
  }