rahman-resources 1.11.0 → 1.12.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/bin/cli.js CHANGED
@@ -211,6 +211,22 @@ function findRepoRoot(start) {
211
211
  // ─── catalog lookups ──────────────────────────────────────────────────────
212
212
 
213
213
  function findEntry(slug) {
214
+ const direct = lookupEntry(slug);
215
+ if (direct) return direct;
216
+ // Superseded slugs (e.g. the seven landing sections merged into
217
+ // landing-sections, UX wave U3) resolve through manifest.aliases.
218
+ const alias = manifest.aliases?.[slug];
219
+ if (alias) {
220
+ const found = lookupEntry(alias);
221
+ if (found) {
222
+ console.error(kleur.yellow(`"${slug}" is superseded by "${alias}" — using ${alias}.`));
223
+ return found;
224
+ }
225
+ }
226
+ return null;
227
+ }
228
+
229
+ function lookupEntry(slug) {
214
230
  for (const kind of KINDS) {
215
231
  const list = manifest[kind + "s"] ?? [];
216
232
  const e = list.find((x) => x.slug === slug);