two-stroke 8.0.14 → 8.0.15
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 +8 -4
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -374,7 +374,8 @@ export function twoStroke<T>(
|
|
|
374
374
|
method: "PUT",
|
|
375
375
|
path,
|
|
376
376
|
matcher: new RegExp(
|
|
377
|
-
|
|
377
|
+
// oxlint-disable-next-line unicorn/prefer-string-raw
|
|
378
|
+
`^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<$seg>[^\\/]*)")}$`,
|
|
378
379
|
),
|
|
379
380
|
input,
|
|
380
381
|
output,
|
|
@@ -396,7 +397,8 @@ export function twoStroke<T>(
|
|
|
396
397
|
method: "POST",
|
|
397
398
|
path,
|
|
398
399
|
matcher: new RegExp(
|
|
399
|
-
|
|
400
|
+
// oxlint-disable-next-line unicorn/prefer-string-raw
|
|
401
|
+
`^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<$seg>[^\\/]*)")}$`,
|
|
400
402
|
),
|
|
401
403
|
input,
|
|
402
404
|
output,
|
|
@@ -417,7 +419,8 @@ export function twoStroke<T>(
|
|
|
417
419
|
method: "GET",
|
|
418
420
|
path,
|
|
419
421
|
matcher: new RegExp(
|
|
420
|
-
|
|
422
|
+
// oxlint-disable-next-line unicorn/prefer-string-raw
|
|
423
|
+
`^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<$seg>[^\\/]*)")}$`,
|
|
421
424
|
),
|
|
422
425
|
output,
|
|
423
426
|
handler,
|
|
@@ -436,7 +439,8 @@ export function twoStroke<T>(
|
|
|
436
439
|
method: "DELETE",
|
|
437
440
|
path,
|
|
438
441
|
matcher: new RegExp(
|
|
439
|
-
|
|
442
|
+
// oxlint-disable-next-line unicorn/prefer-string-raw
|
|
443
|
+
`^${escapeRegex(path).replaceAll(/\/{(?<seg>[^}]*)}/g, "/(?<$seg>[^\\/]*)")}$`,
|
|
440
444
|
),
|
|
441
445
|
output,
|
|
442
446
|
handler,
|