@kb-labs/cli-commands 2.15.0 → 2.17.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.js +12 -8
- package/dist/index.js.map +1 -1
- package/dist/registry/index.js +12 -8
- package/dist/registry/index.js.map +1 -1
- package/package.json +22 -22
package/dist/registry/index.js
CHANGED
|
@@ -1279,23 +1279,24 @@ async function registerManifests(discoveryResults, registry2, options = {}) {
|
|
|
1279
1279
|
} catch (hookError) {
|
|
1280
1280
|
log2.debug(`Lifecycle hooks unavailable for ${manifest.id}: ${hookError.message}`);
|
|
1281
1281
|
}
|
|
1282
|
-
const
|
|
1282
|
+
const canonicalKey = manifest.group ? `${manifest.group}:${manifest.id}` : manifest.id;
|
|
1283
|
+
const existing = globalIds.get(canonicalKey);
|
|
1283
1284
|
if (existing) {
|
|
1284
1285
|
const collision = checkCollision(manifest, existing, result.source, namespace);
|
|
1285
1286
|
if (collision.shouldShadow) {
|
|
1286
1287
|
existing.shadowed = true;
|
|
1287
|
-
globalIds.set(
|
|
1288
|
+
globalIds.set(canonicalKey, cmd);
|
|
1288
1289
|
if (logLevel === "info" || logLevel === "debug") {
|
|
1289
|
-
log2.info(`${
|
|
1290
|
+
log2.info(`${canonicalKey} from ${result.source} shadows ${existing.source} version`);
|
|
1290
1291
|
}
|
|
1291
1292
|
} else {
|
|
1292
1293
|
cmd.shadowed = true;
|
|
1293
1294
|
if (logLevel === "info" || logLevel === "debug") {
|
|
1294
|
-
log2.info(`${
|
|
1295
|
+
log2.info(`${canonicalKey} from ${result.source} shadowed by ${existing.source} version`);
|
|
1295
1296
|
}
|
|
1296
1297
|
}
|
|
1297
1298
|
} else {
|
|
1298
|
-
globalIds.set(
|
|
1299
|
+
globalIds.set(canonicalKey, cmd);
|
|
1299
1300
|
}
|
|
1300
1301
|
const aliasesToCheck = manifest.aliases || [];
|
|
1301
1302
|
for (const alias of aliasesToCheck) {
|
|
@@ -1522,10 +1523,13 @@ var InMemoryRegistry = class {
|
|
|
1522
1523
|
* Returns the colliding key if found, null otherwise.
|
|
1523
1524
|
*/
|
|
1524
1525
|
_findSystemCollision(manifest, canonicalId) {
|
|
1525
|
-
if (this.systemCommands.has(canonicalId))
|
|
1526
|
-
|
|
1526
|
+
if (this.systemCommands.has(canonicalId)) {
|
|
1527
|
+
return canonicalId;
|
|
1528
|
+
}
|
|
1527
1529
|
const space = canonicalId.replace(/:/g, " ");
|
|
1528
|
-
if (this.systemCommands.has(space))
|
|
1530
|
+
if (this.systemCommands.has(space)) {
|
|
1531
|
+
return space;
|
|
1532
|
+
}
|
|
1529
1533
|
return null;
|
|
1530
1534
|
}
|
|
1531
1535
|
/**
|