@hey-api/shared 0.0.0-next-20260620070001 → 0.0.0-next-20260621081910

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.mjs CHANGED
@@ -430,15 +430,20 @@ function resolveTable(input, table, { ancestor = {}, context = {}, resolvedCasca
430
430
  }
431
431
  function collectDeps(spec, resolved, deps) {
432
432
  const { $dependencies } = spec;
433
- if ($dependencies) for (const key of $dependencies) {
434
- const value = resolved[key];
435
- if (value && typeof value === "string") deps.add(value);
436
- }
433
+ if ($dependencies) for (const key of $dependencies) addDependencyValue(resolved[key], deps);
437
434
  for (const [key, specVal] of Object.entries(spec)) {
438
435
  if (key.startsWith("$")) continue;
439
436
  if (isPlainObject(specVal) && isPlainObject(resolved[key])) collectDeps(specVal, resolved[key], deps);
440
437
  }
441
438
  }
439
+ function addDependencyValue(value, deps) {
440
+ if (!value) return;
441
+ if (typeof value === "string") {
442
+ deps.add(value);
443
+ return;
444
+ }
445
+ if (Array.isArray(value)) for (const item of value) addDependencyValue(item, deps);
446
+ }
442
447
  function resolveField(defaultVal, currentVal, key, { ancestor, context, resolvedCascade, specAncestor }) {
443
448
  if (isCoercer(defaultVal)) return defaultVal[COERCER](currentVal, context);
444
449
  if (isPlainObject(defaultVal)) {