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