@theholocron/cli 5.0.0-alpha.431 → 5.0.0-alpha.432

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/cli.mjs CHANGED
@@ -12120,6 +12120,14 @@ async function matrixPlaces(input) {
12120
12120
  environment
12121
12121
  });
12122
12122
  }
12123
+ const listedVariables = (environment) => new Set(variableEntries.filter((entry) => resolvedEnvironment(entry) === environment).flatMap((entry) => entry.keys.map((name) => name.toUpperCase())));
12124
+ const ownNames = (kind, environment, present, needed) => {
12125
+ if (!envs.has(`${kind === "secret" ? "variable" : "secret"}:${environment}`)) return present;
12126
+ const variables = listedVariables(environment);
12127
+ if (kind === "variable") return present.filter((name) => variables.has(name.toUpperCase()));
12128
+ const wanted = new Set(needed.map((name) => name.toUpperCase()));
12129
+ return present.filter((name) => !variables.has(name.toUpperCase()) || wanted.has(name.toUpperCase()));
12130
+ };
12123
12131
  for (const { kind, env, environment } of envs.values()) {
12124
12132
  if (!wants(env)) continue;
12125
12133
  const found = await namesOf(environment);
@@ -12156,7 +12164,7 @@ async function matrixPlaces(input) {
12156
12164
  kind,
12157
12165
  needed,
12158
12166
  reasons,
12159
- ...Array.isArray(found) ? { present } : { unread: found.why }
12167
+ ...Array.isArray(found) ? { present: ownNames(kind, environment, present, needed) } : { unread: found.why }
12160
12168
  });
12161
12169
  }
12162
12170
  if (wants("prod")) for (const environment of new Set(deployEntries.map(resolvedEnvironment))) {