@celerity-sdk/core 0.6.0 → 0.7.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/dist/index.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -1507,8 +1507,15 @@ var HandlerRegistry = class {
|
|
|
1507
1507
|
function matchRoute(pattern, actual) {
|
|
1508
1508
|
const patternParts = pattern.split("/").filter(Boolean);
|
|
1509
1509
|
const actualParts = actual.split("/").filter(Boolean);
|
|
1510
|
-
|
|
1511
|
-
|
|
1510
|
+
for (let i = 0; i < patternParts.length; i++) {
|
|
1511
|
+
const part = patternParts[i];
|
|
1512
|
+
if (part.startsWith("{") && part.endsWith("+}")) {
|
|
1513
|
+
return actualParts.length >= patternParts.length;
|
|
1514
|
+
}
|
|
1515
|
+
if (part.startsWith("{")) continue;
|
|
1516
|
+
if (part !== actualParts[i]) return false;
|
|
1517
|
+
}
|
|
1518
|
+
return patternParts.length === actualParts.length;
|
|
1512
1519
|
}
|
|
1513
1520
|
__name(matchRoute, "matchRoute");
|
|
1514
1521
|
|