@jon49/sw 0.15.3 → 0.15.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.
@@ -26,12 +26,6 @@ function searchParams<TReturn>(url: URL): TReturn & { _url: URL } {
26
26
  return new Proxy(url, searchParamsHandler)
27
27
  }
28
28
 
29
- interface ResponseOptions {
30
- handleErrors?: Function
31
- }
32
-
33
- export let options: ResponseOptions = {}
34
-
35
29
  // @ts-ignore
36
30
  export async function useRoutes(req: Request, res: SwResponse, ctx: any): Promise<void> {
37
31
  try {
@@ -154,7 +148,7 @@ async function executeHandler({ url, req, ctx }: ExectuteHandlerOptions): Promis
154
148
  e = [e.message]
155
149
  }
156
150
  if (Array.isArray(e)) {
157
- ctx.messages = e
151
+ ctx.messages = e.map((x: any) => "message" in x ? x.message : String(x))
158
152
  return {
159
153
  status: 204,
160
154
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jon49/sw",
3
- "version": "0.15.3",
3
+ "version": "0.15.5",
4
4
  "description": "Packages for MVC service workers.",
5
5
  "type": "module",
6
6
  "files": [
@@ -44,4 +44,4 @@
44
44
  "@types/node": "^24.0.10",
45
45
  "typescript": "^5.8.3"
46
46
  }
47
- }
47
+ }