two-stroke 7.10.0 → 7.11.0
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 +1 -1
- package/src/index.ts +11 -2
- package/worker-configuration.d.ts +12101 -13317
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -46,7 +46,7 @@ export function twoStroke<T>(
|
|
|
46
46
|
): Promise<Response> {
|
|
47
47
|
const defaultHeaders = {
|
|
48
48
|
"Access-Control-Allow-Origin": origin
|
|
49
|
-
? env.SENTRY_ENVIRONMENT === "staging" &&
|
|
49
|
+
? (env.SENTRY_ENVIRONMENT === "staging" || env.SENTRY_ENVIRONMENT === "dev") &&
|
|
50
50
|
req.headers.get("Origin")?.split(":")[1]?.endsWith("localhost")
|
|
51
51
|
? (req.headers.get("Origin") ?? "")
|
|
52
52
|
: origin(req.headers.get("Origin"))
|
|
@@ -361,12 +361,20 @@ export function twoStroke<T>(
|
|
|
361
361
|
console.log("Queue batch finished");
|
|
362
362
|
};
|
|
363
363
|
},
|
|
364
|
-
put<
|
|
364
|
+
put<
|
|
365
|
+
I extends ZodType | undefined,
|
|
366
|
+
O extends ZodType,
|
|
367
|
+
A,
|
|
368
|
+
P extends string,
|
|
369
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
370
|
+
PP extends ZodObject<any> | undefined,
|
|
371
|
+
>(
|
|
365
372
|
auth: Route<T, A>["auth"],
|
|
366
373
|
path: P,
|
|
367
374
|
input: I,
|
|
368
375
|
output: O,
|
|
369
376
|
handler: Handler<T, I, O, A, P>,
|
|
377
|
+
params?: PP,
|
|
370
378
|
) {
|
|
371
379
|
routes.push({
|
|
372
380
|
auth,
|
|
@@ -376,6 +384,7 @@ export function twoStroke<T>(
|
|
|
376
384
|
input,
|
|
377
385
|
output,
|
|
378
386
|
handler,
|
|
387
|
+
params,
|
|
379
388
|
});
|
|
380
389
|
},
|
|
381
390
|
|