@theholocron/cli 5.0.0-alpha.434 → 5.0.0-alpha.435
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
|
@@ -11715,7 +11715,7 @@ async function credentialsRows(input) {
|
|
|
11715
11715
|
repoRoot: input.context.repoRoot,
|
|
11716
11716
|
env: { HOLOCRON_ENVIRONMENT: "local" },
|
|
11717
11717
|
...input.gitExec ? { gitExec: input.gitExec } : {}
|
|
11718
|
-
}), expected);
|
|
11718
|
+
}), expected, variableKeys(resolved));
|
|
11719
11719
|
rows.push(...checked.rows);
|
|
11720
11720
|
places.push(...checked.places);
|
|
11721
11721
|
} catch (err) {
|
|
@@ -11732,7 +11732,7 @@ async function credentialsRows(input) {
|
|
|
11732
11732
|
* Environment found holds it (the first found wins, as in the credential store). A required Environment that does not
|
|
11733
11733
|
* exist is a failing row of its own, by name, and an unreadable place for the matrix; a missing `- local` is not mentioned.
|
|
11734
11734
|
*/
|
|
11735
|
-
async function checkProvider(impl, candidates, expected) {
|
|
11735
|
+
async function checkProvider(impl, candidates, expected, synced) {
|
|
11736
11736
|
const provider = impl.providerName;
|
|
11737
11737
|
if (!impl.inspect) return {
|
|
11738
11738
|
rows: [row$5(provider, "skip", "cannot list the variables without reading their values")],
|
|
@@ -11775,20 +11775,33 @@ async function checkProvider(impl, candidates, expected) {
|
|
|
11775
11775
|
const places = [];
|
|
11776
11776
|
const missingRequired = expected.filter((e) => !e.optional && !have(e.name)).map((e) => e.name);
|
|
11777
11777
|
found.forEach(({ name, result }, index) => {
|
|
11778
|
+
const column = {
|
|
11779
|
+
id: `vault:${name}`,
|
|
11780
|
+
group,
|
|
11781
|
+
label: labelOf(name),
|
|
11782
|
+
env: layerFor(name),
|
|
11783
|
+
reportedElsewhere: true,
|
|
11784
|
+
unreadReported: true
|
|
11785
|
+
};
|
|
11786
|
+
const visible = result.visible === void 0 ? void 0 : new Set(result.visible);
|
|
11787
|
+
const secretNames = visible ? result.names.filter((n) => !visible.has(n)) : result.names;
|
|
11778
11788
|
places.push({
|
|
11779
|
-
column
|
|
11780
|
-
id: `vault:${name}`,
|
|
11781
|
-
group,
|
|
11782
|
-
label: labelOf(name),
|
|
11783
|
-
env: layerFor(name),
|
|
11784
|
-
reportedElsewhere: true,
|
|
11785
|
-
unreadReported: true
|
|
11786
|
-
},
|
|
11789
|
+
column,
|
|
11787
11790
|
kind: "secret",
|
|
11788
|
-
needed: [...
|
|
11789
|
-
present:
|
|
11791
|
+
needed: [...secretNames.filter((n) => names.has(n)), ...index === found.length - 1 ? missingRequired : []],
|
|
11792
|
+
present: secretNames,
|
|
11790
11793
|
reasons: Object.fromEntries(expected.map((e) => [e.name.toUpperCase(), `a token the configured plugins take${e.optional ? " (optional)" : ""}`]))
|
|
11791
11794
|
});
|
|
11795
|
+
if (visible) {
|
|
11796
|
+
const wanted = column.env === "dev" ? synced : [];
|
|
11797
|
+
places.push({
|
|
11798
|
+
column,
|
|
11799
|
+
kind: "variable",
|
|
11800
|
+
needed: wanted,
|
|
11801
|
+
present: result.names.filter((n) => visible.has(n)),
|
|
11802
|
+
reasons: Object.fromEntries(wanted.map((n) => [n.toUpperCase(), "a variable repo.variables.sync writes to GitHub; dev holds its own copy"]))
|
|
11803
|
+
});
|
|
11804
|
+
}
|
|
11792
11805
|
});
|
|
11793
11806
|
return {
|
|
11794
11807
|
rows,
|
|
@@ -11805,6 +11818,10 @@ async function checkProvider(impl, candidates, expected) {
|
|
|
11805
11818
|
function layerFor(name) {
|
|
11806
11819
|
return layerOf(name, "local") === "dev" ? "dev" : "local";
|
|
11807
11820
|
}
|
|
11821
|
+
/** The names `repo.variables.sync` writes as variables, in any scope, without repeats. */
|
|
11822
|
+
function variableKeys(resolved) {
|
|
11823
|
+
return [...new Set((resolved.repo?.variables?.sync ?? []).flatMap((entry) => entry.keys))];
|
|
11824
|
+
}
|
|
11808
11825
|
// src/commands/secrets-sync/deploy-filter/deploy-filter.ts
|
|
11809
11826
|
/**
|
|
11810
11827
|
* What `repo.secrets.deploy` lets one vault environment send to a deployment or a Worker: every entry naming it adds
|
|
@@ -12242,7 +12259,7 @@ function namesWith(place, cell, manual) {
|
|
|
12242
12259
|
/**
|
|
12243
12260
|
* The rows the matrix adds to `doctor secrets`, from the places it was built from:
|
|
12244
12261
|
*
|
|
12245
|
-
* - `extra` names are
|
|
12262
|
+
* - `extra` names are in the matrix and make no row, except with `strict`, where each place that has some fails.
|
|
12246
12263
|
* - `MISSING` names fail, one row per place, except in a place another check already reports on (GitHub).
|
|
12247
12264
|
* - A place that could not be read is a skipped row that names it and why, again except where another check says so.
|
|
12248
12265
|
*
|
|
@@ -12274,17 +12291,14 @@ function matrixRows(matrix, manual, strict) {
|
|
|
12274
12291
|
detail: `${missing.length} problem(s)`,
|
|
12275
12292
|
problems: missing.map((name) => `missing ${place.kind} ${name}`)
|
|
12276
12293
|
});
|
|
12277
|
-
const extra = namesWith(place, "extra", skip);
|
|
12278
|
-
if (extra.length > 0) {
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
problems: []
|
|
12286
|
-
});
|
|
12287
|
-
}
|
|
12294
|
+
const extra = strict ? namesWith(place, "extra", skip) : [];
|
|
12295
|
+
if (extra.length > 0) rows.push({
|
|
12296
|
+
id: `extra:${id}`,
|
|
12297
|
+
title,
|
|
12298
|
+
status: "fail",
|
|
12299
|
+
detail: `${extra.length} extra in ${where(place)}, nothing feeds ${extra.length === 1 ? "it" : "them"}: ${extra.join(", ")}`,
|
|
12300
|
+
problems: []
|
|
12301
|
+
});
|
|
12288
12302
|
}
|
|
12289
12303
|
return rows;
|
|
12290
12304
|
}
|