@theholocron/cli 5.0.0-alpha.445 → 5.0.0-alpha.446

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
@@ -13701,12 +13701,12 @@ async function checkLayer(c) {
13701
13701
  rows.push(row$5(id(e), title(e), "fail", `not held in ${held.environment}`, [`${e.envName} is declared for ${c.layer}`]));
13702
13702
  continue;
13703
13703
  }
13704
- rows.push(summariseProbeRows(id(e), title(e), await probeToken(c, e, token.token)));
13704
+ rows.push(summariseProbeRows(id(e), title(e), await probeToken(c, e, token.token, held.plain)));
13705
13705
  }
13706
13706
  return rows;
13707
13707
  }
13708
13708
  /** Runs the provider's token probe against one token, as `probe <provider> token --environment <layer>` does. */
13709
- async function probeToken(c, e, token) {
13709
+ async function probeToken(c, e, token, plain) {
13710
13710
  const provider = c.entry.provider;
13711
13711
  const context = {
13712
13712
  ...c.input.context,
@@ -13716,6 +13716,18 @@ async function probeToken(c, e, token) {
13716
13716
  }
13717
13717
  };
13718
13718
  try {
13719
+ return await withEnvironmentValues(plain, () => runWith(c, e, token, context));
13720
+ } catch (err) {
13721
+ return [{
13722
+ status: "fail",
13723
+ label: `${provider} ${PROBE}`,
13724
+ detail: describeError(err).split(token).join("[redacted]")
13725
+ }];
13726
+ }
13727
+ }
13728
+ async function runWith(c, e, token, context) {
13729
+ const provider = c.entry.provider;
13730
+ {
13719
13731
  const reloaded = c.makeLoader(context);
13720
13732
  await reloaded.load();
13721
13733
  const probe = reloaded.probes().get(provider)?.[PROBE] ?? c.probes.get(provider)[PROBE];
@@ -13737,12 +13749,6 @@ async function probeToken(c, e, token) {
13737
13749
  print: () => {},
13738
13750
  onInterrupt: () => () => {}
13739
13751
  })).rows;
13740
- } catch (err) {
13741
- return [{
13742
- status: "fail",
13743
- label: `${provider} ${PROBE}`,
13744
- detail: describeError(err).split(token).join("[redacted]")
13745
- }];
13746
13752
  }
13747
13753
  }
13748
13754
  // src/commands/deep-checks/deep-checks.ts