@jon49/sw 0.13.0 → 0.13.1
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/lib/routes.ts +2 -3
- package/package.json +1 -1
package/lib/routes.ts
CHANGED
|
@@ -19,8 +19,7 @@ const searchParamsHandler = {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
function searchParams<TReturn>(
|
|
23
|
-
let url = new URL(req.url)
|
|
22
|
+
function searchParams<TReturn>(url: URL) : TReturn & {_url: URL} {
|
|
24
23
|
return new Proxy(url, searchParamsHandler)
|
|
25
24
|
}
|
|
26
25
|
|
|
@@ -174,7 +173,7 @@ async function executeHandler({ url, req, event }: ExectuteHandlerOptions) : Pro
|
|
|
174
173
|
try {
|
|
175
174
|
let messages: string[] = []
|
|
176
175
|
const data = await getData(req)
|
|
177
|
-
let query = searchParams<{ handler?: string }>(
|
|
176
|
+
let query = searchParams<{ handler?: string }>(url)
|
|
178
177
|
let args = { req, data, query }
|
|
179
178
|
let result = await (
|
|
180
179
|
handlers instanceof Function
|