@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.js
CHANGED
|
@@ -1327,8 +1327,15 @@ var HandlerRegistry = class {
|
|
|
1327
1327
|
function matchRoute(pattern, actual) {
|
|
1328
1328
|
const patternParts = pattern.split("/").filter(Boolean);
|
|
1329
1329
|
const actualParts = actual.split("/").filter(Boolean);
|
|
1330
|
-
|
|
1331
|
-
|
|
1330
|
+
for (let i = 0; i < patternParts.length; i++) {
|
|
1331
|
+
const part = patternParts[i];
|
|
1332
|
+
if (part.startsWith("{") && part.endsWith("+}")) {
|
|
1333
|
+
return actualParts.length >= patternParts.length;
|
|
1334
|
+
}
|
|
1335
|
+
if (part.startsWith("{")) continue;
|
|
1336
|
+
if (part !== actualParts[i]) return false;
|
|
1337
|
+
}
|
|
1338
|
+
return patternParts.length === actualParts.length;
|
|
1332
1339
|
}
|
|
1333
1340
|
__name(matchRoute, "matchRoute");
|
|
1334
1341
|
|