@theholocron/cli 5.0.0-alpha.570 → 5.0.0-alpha.571
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 +7 -2
- package/dist/cli.mjs.map +1 -1
- package/package.json +5 -5
package/dist/cli.mjs
CHANGED
|
@@ -19381,9 +19381,14 @@ function configuredPackages(input) {
|
|
|
19381
19381
|
return [...new Set(packages)];
|
|
19382
19382
|
}
|
|
19383
19383
|
// src/commands/doctor-secrets/expected-tokens.ts
|
|
19384
|
+
/** Whether the credentials Environments (`local`, `dev`) need not hold the token: it is `optional`, or declares only other layers. */
|
|
19385
|
+
function optionalHere(token) {
|
|
19386
|
+
if (token.optional === true) return true;
|
|
19387
|
+
return token.expect !== void 0 && !tokenExpectations([token]).some((e) => e.layer === "local" || e.layer === "dev");
|
|
19388
|
+
}
|
|
19384
19389
|
/**
|
|
19385
19390
|
* The `envName` of every token the configured plugins list (their `tokens` export), once each, in plain code-unit order
|
|
19386
|
-
* so the output is the same on every machine. A name any plugin needs is not `optional`, even if another plugin lists
|
|
19391
|
+
* so the output is the same on every machine. A token that declares only other layers than `local` and `dev` (`expect.layers`, a ci-only token) is `optional` here. A name any plugin needs is not `optional`, even if another plugin lists
|
|
19387
19392
|
* it as optional. A plugin that cannot be loaded lists none.
|
|
19388
19393
|
*
|
|
19389
19394
|
* @param input - The loaded config and, for a test, the importer that loads a plugin package.
|
|
@@ -19392,7 +19397,7 @@ async function expectedTokens(input) {
|
|
|
19392
19397
|
const importer = input.importer ?? defaultImporter;
|
|
19393
19398
|
const optionalOnly = /* @__PURE__ */ new Map();
|
|
19394
19399
|
for (const pkg of configuredPackages(input)) try {
|
|
19395
|
-
for (const token of (await importer(pkg)).tokens ?? []) optionalOnly.set(token.envName, (optionalOnly.get(token.envName) ?? true) && token
|
|
19400
|
+
for (const token of (await importer(pkg)).tokens ?? []) optionalOnly.set(token.envName, (optionalOnly.get(token.envName) ?? true) && optionalHere(token));
|
|
19396
19401
|
} catch {}
|
|
19397
19402
|
return [...optionalOnly.keys()].sort().map((name) => ({
|
|
19398
19403
|
name,
|