@theholocron/cli 5.0.0-alpha.370 → 5.0.0-alpha.372
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 +16 -12
- package/dist/cli.mjs.map +1 -1
- package/dist/{config-system-513IhEuT.d.mts → config-system-Cw2w_2CU.d.mts} +1 -1
- package/dist/{index-DXC-Eco9.d.mts → index-CHUMSoXo.d.mts} +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/plugin/capabilities.d.mts +1 -1
- package/dist/presets.d.mts +1 -1
- package/package.json +13 -13
package/dist/cli.mjs
CHANGED
|
@@ -4027,7 +4027,7 @@ async function runDevServe(input) {
|
|
|
4027
4027
|
});
|
|
4028
4028
|
}
|
|
4029
4029
|
// src/commands/dev-serve/dev-serve.command.ts
|
|
4030
|
-
const env$5 =
|
|
4030
|
+
const env$5 = holocronEnv();
|
|
4031
4031
|
const devServeCommand = {
|
|
4032
4032
|
command: "serve",
|
|
4033
4033
|
describe: "Serve the handler `dev.serve` names on PORT: the application `holocron dev` runs when it is configured, not usually run by hand",
|
|
@@ -4375,7 +4375,8 @@ async function runDev(input) {
|
|
|
4375
4375
|
env: {
|
|
4376
4376
|
ENVIRONMENT: APP_ENVIRONMENT,
|
|
4377
4377
|
...values,
|
|
4378
|
-
PORT: String(input.port)
|
|
4378
|
+
PORT: String(input.port),
|
|
4379
|
+
[`${PREFIX}_PORT`]: String(input.port)
|
|
4379
4380
|
}
|
|
4380
4381
|
},
|
|
4381
4382
|
companion: {
|
|
@@ -11627,16 +11628,18 @@ function configuredTeamId(resolved) {
|
|
|
11627
11628
|
/**
|
|
11628
11629
|
* Reads the Vercel token, team id and Deployment Protection bypass secret through the credential chain
|
|
11629
11630
|
* (`resolveValue`: the environment, then the `credentials` providers) instead of `process.env`. The environment's
|
|
11630
|
-
* `VERCEL_TEAM_ID` wins over the configured provider's `teamId`, so the override CI
|
|
11631
|
+
* `HOLOCRON_VERCEL_TEAM_ID` (or the bare `VERCEL_TEAM_ID`) wins over the configured provider's `teamId`, so the override CI
|
|
11632
|
+
* passes keeps working. Each name is read as `HOLOCRON_<NAME>` first, then bare: `VERCEL_TOKEN` is the one the Vercel
|
|
11633
|
+
* plugin's own `HOLOCRON_VERCEL_TOKEN` / `VERCEL_TOKEN` pair already uses. A value that
|
|
11631
11634
|
* is not set is left out, so the result spreads straight into the input of `resolveVercelBypassHeaders`.
|
|
11632
11635
|
*
|
|
11633
11636
|
* @param resolved - The loaded config, when the command has one. `monitoring run-resolved` loads none.
|
|
11634
11637
|
* @param env - The environment to read. Default `process.env`; a test passes its own.
|
|
11635
11638
|
*/
|
|
11636
11639
|
function resolveVercelCredentials(resolved, env) {
|
|
11637
|
-
const vercelToken = resolveValue(["VERCEL_TOKEN"], env);
|
|
11638
|
-
const vercelTeamId = resolveValue(["VERCEL_TEAM_ID"], env) ?? configuredTeamId(resolved);
|
|
11639
|
-
const bypassSecret = resolveValue(["VERCEL_PROTECTION_BYPASS_SECRET"], env);
|
|
11640
|
+
const vercelToken = resolveValue(["VERCEL_TOKEN"], env, { prefix: PREFIX });
|
|
11641
|
+
const vercelTeamId = resolveValue(["VERCEL_TEAM_ID"], env, { prefix: PREFIX }) ?? configuredTeamId(resolved);
|
|
11642
|
+
const bypassSecret = resolveValue(["VERCEL_PROTECTION_BYPASS_SECRET"], env, { prefix: PREFIX });
|
|
11640
11643
|
return {
|
|
11641
11644
|
...vercelToken ? { vercelToken } : {},
|
|
11642
11645
|
...vercelTeamId ? { vercelTeamId } : {},
|
|
@@ -15771,14 +15774,15 @@ function newPublicPackages(addedFiles, io) {
|
|
|
15771
15774
|
* root `index`) with no docs signal for that package: its README, a docs page named after it, or a doc comment added
|
|
15772
15775
|
* in its source. `[skip docs] <reason>` in the PR description (`PR_BODY`) or a commit message excuses it, scoped with
|
|
15773
15776
|
* `[skip docs: <package>]`; a marker with no reason excuses nothing. This is the `docsEnforcement` job of
|
|
15774
|
-
* `platform.repoValidation`. The base to diff against is `BASE_SHA` (default `HEAD~1`)
|
|
15777
|
+
* `platform.repoValidation`. The base to diff against is `HOLOCRON_BASE_SHA`, else `BASE_SHA` (default `HEAD~1`); the title and body are `HOLOCRON_PR_TITLE` / `HOLOCRON_PR_BODY`, else `PR_TITLE` / `PR_BODY`.
|
|
15775
15778
|
*/
|
|
15776
15779
|
function docsPresenceProbe(io) {
|
|
15777
15780
|
return {
|
|
15778
15781
|
summary: "Warn when a new package, or a feat to one, ships without a docs change (never fails).",
|
|
15779
15782
|
writes: false,
|
|
15780
15783
|
async run(ctx) {
|
|
15781
|
-
const
|
|
15784
|
+
const env = holocronEnv(io.env);
|
|
15785
|
+
const base = env.get("BASE_SHA") ?? "HEAD~1";
|
|
15782
15786
|
let addedFiles;
|
|
15783
15787
|
let changedFiles;
|
|
15784
15788
|
try {
|
|
@@ -15812,7 +15816,7 @@ function docsPresenceProbe(io) {
|
|
|
15812
15816
|
label: "new packages without docs",
|
|
15813
15817
|
detail: `${newPackages.join(", ")}: add a docs page under docs/ in this PR, or a scoped follow-up right after`
|
|
15814
15818
|
});
|
|
15815
|
-
const subjects = [
|
|
15819
|
+
const subjects = [env.get("PR_TITLE") ?? "", ...io.subjects(base)].filter(Boolean);
|
|
15816
15820
|
if (!isFeat(subjects)) {
|
|
15817
15821
|
ctx.say({
|
|
15818
15822
|
status: "ok",
|
|
@@ -15834,7 +15838,7 @@ function docsPresenceProbe(io) {
|
|
|
15834
15838
|
packages,
|
|
15835
15839
|
changedFiles,
|
|
15836
15840
|
addedCommentLines: (dir) => io.diffOf(base, dir).split("\n").filter(isAddedDocComment),
|
|
15837
|
-
skip: parseSkipDocs(`${
|
|
15841
|
+
skip: parseSkipDocs(`${env.get("PR_BODY") ?? ""}\n${io.messages(base)}`)
|
|
15838
15842
|
});
|
|
15839
15843
|
for (const { dir, reason } of skipped) ctx.say({
|
|
15840
15844
|
status: "info",
|
|
@@ -16182,11 +16186,11 @@ function runTypedoc(repoRoot) {
|
|
|
16182
16186
|
};
|
|
16183
16187
|
/* v8 ignore stop */
|
|
16184
16188
|
}
|
|
16185
|
-
/** The diff of the PR's `.ts` files against the base (`BASE_SHA`, or the merge base with `origin/alpha`). */
|
|
16189
|
+
/** The diff of the PR's `.ts` files against the base (`HOLOCRON_BASE_SHA`, else `BASE_SHA`, or the merge base with `origin/alpha`). */
|
|
16186
16190
|
function realDiff(repoRoot) {
|
|
16187
16191
|
/* v8 ignore start -- runs the real git; the probe is tested with an injected diff */
|
|
16188
16192
|
return () => {
|
|
16189
|
-
const base =
|
|
16193
|
+
const base = holocronEnv().get("BASE_SHA") ?? "origin/alpha";
|
|
16190
16194
|
return execFileSync("git", [
|
|
16191
16195
|
"diff",
|
|
16192
16196
|
"-U0",
|