@theholocron/cli 5.0.0-alpha.24 → 5.0.0-alpha.25
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 +12 -2
- package/dist/cli.mjs.map +1 -1
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -1257,6 +1257,16 @@ function commandsInContext(context) {
|
|
|
1257
1257
|
* present, so operators can sanity-check the wiring without spinning
|
|
1258
1258
|
* up a build.
|
|
1259
1259
|
*/
|
|
1260
|
+
/**
|
|
1261
|
+
* Provider `url` fields (Vercel's REST API, at least) come back as bare
|
|
1262
|
+
* hostnames — `"my-app.vercel.app"`, no scheme — which terminals don't
|
|
1263
|
+
* linkify and browsers won't navigate to unmodified. Printed output
|
|
1264
|
+
* should be a URL a human can click/paste; structured log fields keep
|
|
1265
|
+
* the raw provider value as-is.
|
|
1266
|
+
*/
|
|
1267
|
+
function withScheme(url) {
|
|
1268
|
+
return /^https?:\/\//.test(url) ? url : `https://${url}`;
|
|
1269
|
+
}
|
|
1260
1270
|
async function runDeploy(input) {
|
|
1261
1271
|
const print = input.print ?? ((line) => console.log(line));
|
|
1262
1272
|
const logger = input.logger ?? getLogger();
|
|
@@ -1288,7 +1298,7 @@ async function runDeploy(input) {
|
|
|
1288
1298
|
branch: input.branch,
|
|
1289
1299
|
...input.target ? { target: input.target } : {}
|
|
1290
1300
|
}));
|
|
1291
|
-
print(` ${style.success(`${record.status} — ${record.url}`)}`);
|
|
1301
|
+
print(` ${style.success(`${record.status} — ${withScheme(record.url)}`)}`);
|
|
1292
1302
|
logger.info({
|
|
1293
1303
|
status: record.status,
|
|
1294
1304
|
url: record.url,
|
|
@@ -1371,7 +1381,7 @@ async function runDeployFromFiles(input) {
|
|
|
1371
1381
|
files,
|
|
1372
1382
|
...input.target ? { target: input.target } : {}
|
|
1373
1383
|
}));
|
|
1374
|
-
print(` ${style.success(result.url)}`);
|
|
1384
|
+
print(` ${style.success(withScheme(result.url))}`);
|
|
1375
1385
|
logger.info({
|
|
1376
1386
|
url: result.url,
|
|
1377
1387
|
id: result.deploymentId
|