@theholocron/cli 3.15.0 → 3.16.1

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
@@ -973,6 +973,7 @@ function patchFiles(dir, variants, description, homepage, runtimeEnvironment, pr
973
973
  if (description !== void 0) content = content.split("<description>").join(description);
974
974
  if (homepage !== void 0) content = content.split("<homepage>").join(homepage);
975
975
  if (runtimeEnvironment !== void 0) content = content.split("<runtime_environment>").join(runtimeEnvironment);
976
+ content = content.replace(/\n?<!-- holocron:template-only -->[\s\S]*?<!-- \/holocron:template-only -->\n?/g, "");
976
977
  if (content !== original) {
977
978
  writeFn(filepath, content);
978
979
  print(` ✓ ${path.relative(dir, filepath)}`);
@@ -3319,14 +3320,23 @@ async function runSetup(input) {
3319
3320
  }
3320
3321
  if (loader.has("source") && config.docs) {
3321
3322
  const source = loader.get("source");
3322
- const deployToken = process.env.HOLOCRON_DEPLOY_TOKEN;
3323
+ const resolveDeployToken = createFeatureResolver({
3324
+ envName: "HOLOCRON_DEPLOY_TOKEN",
3325
+ keyringKey: "github.deploy"
3326
+ });
3327
+ let deployToken;
3328
+ try {
3329
+ deployToken = resolveDeployToken({ keyring: input.keyring });
3330
+ } catch (err) {
3331
+ if (!(err instanceof AuthError)) throw err;
3332
+ }
3323
3333
  print(style.step("docs"));
3324
3334
  if (!deployToken) {
3325
3335
  steps.push({
3326
3336
  capability: "source",
3327
3337
  step: "configure GitHub Pages",
3328
3338
  status: "skip",
3329
- message: "HOLOCRON_DEPLOY_TOKEN not setskipping Pages setup"
3339
+ message: "no deploy token found set HOLOCRON_DEPLOY_TOKEN or run: holocron auth set github.deploy <PAT>"
3330
3340
  });
3331
3341
  print(formatStep(steps[steps.length - 1]));
3332
3342
  } else if (source.configurePages) {
@@ -3446,6 +3456,14 @@ async function runSetup(input) {
3446
3456
  print("");
3447
3457
  const summaryLine = ` ${summary.ok} ok, ${summary.fail} fail, ${summary.skip} skipped${dryRun ? `, ${summary.dryRun} would-do` : ""}`;
3448
3458
  print(summary.fail > 0 ? style.fail(summaryLine.trim()) : style.success(summaryLine.trim()));
3459
+ const skippedSteps = steps.filter((s) => s.status === "skip");
3460
+ if (skippedSteps.length > 0) {
3461
+ print("");
3462
+ print(style.hint(" Skipped:"));
3463
+ for (const s of skippedSteps)
3464
+ /* v8 ignore next -- all skip steps set message; empty fallback is defensive */
3465
+ print(style.hint(` · ${s.step}${s.message ? ` (${s.message})` : ""}`));
3466
+ }
3449
3467
  if (steps.some((s) => s.reason === "permissions")) {
3450
3468
  print("");
3451
3469
  print(style.warn("Some steps failed with 403 (insufficient token permissions)."));