@rtrentjones/greenlight 0.2.16 → 0.2.18
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/bin.js +17 -7
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -426,7 +426,7 @@ function tokensForTool(tool) {
|
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
// src/version.ts
|
|
429
|
-
var MODULE_REF = "v0.2.
|
|
429
|
+
var MODULE_REF = "v0.2.18";
|
|
430
430
|
var MODULE_SOURCE_BASE = "git::https://github.com/RTrentJones/greenlight.git//infra/modules";
|
|
431
431
|
function moduleSource(module, ref = MODULE_REF) {
|
|
432
432
|
return `${MODULE_SOURCE_BASE}/${module}?ref=${ref}`;
|
|
@@ -1956,19 +1956,25 @@ function dirCheck(label, dir) {
|
|
|
1956
1956
|
}
|
|
1957
1957
|
function conformanceChecks(t, root) {
|
|
1958
1958
|
const out = [];
|
|
1959
|
-
const
|
|
1960
|
-
const
|
|
1959
|
+
const toolDir = t.dir ?? join4("tools", t.name);
|
|
1960
|
+
const specCandidates = t.external ? [
|
|
1961
|
+
`verify/${t.name}.config.ts`,
|
|
1962
|
+
join4(toolDir, `verify/${t.name}.config.ts`),
|
|
1963
|
+
join4(toolDir, "verify.config.ts")
|
|
1964
|
+
] : [join4(toolDir, "verify.config.ts")];
|
|
1965
|
+
const found = specCandidates.find((p) => existsSync7(join4(root, p)));
|
|
1961
1966
|
out.push({
|
|
1962
1967
|
name: `${t.name}: in the verify loop`,
|
|
1963
|
-
status:
|
|
1964
|
-
detail:
|
|
1968
|
+
status: found ? "ok" : "warn",
|
|
1969
|
+
detail: found ?? `no verify spec (looked: ${specCandidates.join(", ")}) \u2014 falls back to the lane default`
|
|
1965
1970
|
});
|
|
1966
1971
|
const builtIn = !t.external && t.target === "workers";
|
|
1967
|
-
const
|
|
1972
|
+
const platformPreview = t.target === "vercel";
|
|
1973
|
+
const gateable = Boolean(t.preview) || builtIn || platformPreview;
|
|
1968
1974
|
out.push({
|
|
1969
1975
|
name: `${t.name}: local preview gate`,
|
|
1970
1976
|
status: gateable ? "ok" : "warn",
|
|
1971
|
-
detail: gateable ? void 0 : `no built-in serve for ${t.external ? "an external " : ""}${t.target} tool \u2014 add preview:{ command, \u2026 } so \`greenlight preview ${t.name}\` works`
|
|
1977
|
+
detail: platformPreview ? "vercel per-PR preview + deployment_status verify" : gateable ? void 0 : `no built-in serve for ${t.external ? "an external " : ""}${t.target} tool \u2014 add preview:{ command, \u2026 } so \`greenlight preview ${t.name}\` works`
|
|
1972
1978
|
});
|
|
1973
1979
|
return out;
|
|
1974
1980
|
}
|
|
@@ -2521,6 +2527,10 @@ async function previewCommand(args) {
|
|
|
2521
2527
|
let pass;
|
|
2522
2528
|
if (entry.preview) {
|
|
2523
2529
|
pass = await previewViaDescriptor(entry, name, port);
|
|
2530
|
+
} else if (entry.external && entry.target === "vercel") {
|
|
2531
|
+
throw new Error(
|
|
2532
|
+
`"${name}" is a vercel tool \u2014 its pre-prod gate is Vercel's per-PR preview deployment (the greenlight-verify.yml on deployment_status), not \`greenlight preview\`. Open a PR on its repo to get a preview + verify.`
|
|
2533
|
+
);
|
|
2524
2534
|
} else if (entry.external) {
|
|
2525
2535
|
throw new Error(
|
|
2526
2536
|
`"${name}" is external and has no preview descriptor \u2014 add preview:{ command, \u2026 } to its manifest entry (e.g. a docker command), or preview it from its own repo`
|