@celerity-sdk/core 0.6.0 → 0.8.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 +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1327,15 +1327,22 @@ 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
|
|
|
1335
1342
|
// src/bootstrap/module-graph.ts
|
|
1336
1343
|
import "reflect-metadata";
|
|
1337
1344
|
import createDebug4 from "debug";
|
|
1338
|
-
import {
|
|
1345
|
+
import { isRuntimeProvidedToken } from "@celerity-sdk/common";
|
|
1339
1346
|
var debug4 = createDebug4("celerity:core:bootstrap");
|
|
1340
1347
|
function buildModuleGraph(rootModule) {
|
|
1341
1348
|
const graph = /* @__PURE__ */ new Map();
|
|
@@ -1526,7 +1533,7 @@ function checkDependencies(consumer, depTokens, visibleTokens, moduleClass, grap
|
|
|
1526
1533
|
checkDependencies(dep, adoptedDeps, visibleTokens, moduleClass, graph, container, diagnostics);
|
|
1527
1534
|
continue;
|
|
1528
1535
|
}
|
|
1529
|
-
if (
|
|
1536
|
+
if (isRuntimeProvidedToken(dep)) continue;
|
|
1530
1537
|
diagnostics.push({
|
|
1531
1538
|
type: "missing_dependency",
|
|
1532
1539
|
message: `${tokenToString(consumer)} in ${moduleClass.name} requires ${tokenToString(dep)} \u2014 no provider registered. Ensure the module providing it is included in your module's "imports" array, or register a provider for it directly.`
|