@holo-js/cli 0.1.6 → 0.1.8
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/holo.mjs +45 -31
- package/dist/{broadcast-2AZIC5ZP.mjs → broadcast-3VPGBNCR.mjs} +4 -4
- package/dist/{cache-5OROX4GL.mjs → cache-JGGCYQQG.mjs} +4 -4
- package/dist/{cache-migrations-7XFVLTOC.mjs → cache-migrations-3V7LI4CC.mjs} +5 -5
- package/dist/{chunk-ODJA3TFG.mjs → chunk-2NUEWM2P.mjs} +6 -4
- package/dist/{chunk-UZTDQKIY.mjs → chunk-D4NXGVV4.mjs} +1 -1
- package/dist/{chunk-5BLEC66P.mjs → chunk-DFKX4YT4.mjs} +1 -1
- package/dist/{chunk-MXKNQACM.mjs → chunk-O6AXHL7Z.mjs} +1417 -17
- package/dist/{chunk-OZUDZEAW.mjs → chunk-QIOHKKXP.mjs} +23 -5
- package/dist/{chunk-USACXIIB.mjs → chunk-SABHUOON.mjs} +141 -1180
- package/dist/{config-5JSC6KJG.mjs → config-K7SBKT2C.mjs} +2 -2
- package/dist/{dev-F6QUWNCR.mjs → dev-RZLZX75U.mjs} +5 -5
- package/dist/{discovery-JLT2EOGH.mjs → discovery-SFRDA4VX.mjs} +2 -2
- package/dist/{generators-WVKJLAYB.mjs → generators-UJA6WP7J.mjs} +5 -5
- package/dist/index.mjs +45 -31
- package/dist/{media-migrations-DU7WEKAY.mjs → media-migrations-76KFHA2U.mjs} +6 -6
- package/dist/{queue-NOLVWPCH.mjs → queue-JGVKSPUM.mjs} +6 -6
- package/dist/{queue-migrations-HXNTZMGL.mjs → queue-migrations-3TYOTL45.mjs} +5 -5
- package/dist/{runtime-462O2BDR.mjs → runtime-4AAMJI34.mjs} +5 -5
- package/dist/{scaffold-WOJV2ZZI.mjs → scaffold-TMP7PWOA.mjs} +7 -6
- package/dist/{security-5VGM467J.mjs → security-ILU74RIZ.mjs} +4 -4
- package/package.json +7 -7
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-57SJ566R.mjs";
|
|
4
4
|
import {
|
|
5
5
|
prepareProjectDiscovery
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D4NXGVV4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
loadProjectConfig,
|
|
9
9
|
resolveGeneratedSchemaPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DFKX4YT4.mjs";
|
|
11
11
|
import {
|
|
12
12
|
loadGeneratedProjectRegistry
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-O6AXHL7Z.mjs";
|
|
14
14
|
import {
|
|
15
15
|
CLI_RUNTIME_ROOT,
|
|
16
16
|
bundleProjectModule
|
|
@@ -566,11 +566,11 @@ function runRuntimeInvocation(command, args, options) {
|
|
|
566
566
|
function getRuntimeFailureMessage(kind, result) {
|
|
567
567
|
const stderr = result.stderr?.trim();
|
|
568
568
|
if (stderr) {
|
|
569
|
-
return stderr;
|
|
569
|
+
return formatRuntimeFailureText(stderr);
|
|
570
570
|
}
|
|
571
571
|
const stdout = result.stdout?.trim();
|
|
572
572
|
if (stdout) {
|
|
573
|
-
return stdout;
|
|
573
|
+
return formatRuntimeFailureText(stdout);
|
|
574
574
|
}
|
|
575
575
|
const errorCode = result.error && "code" in result.error ? result.error.code : void 0;
|
|
576
576
|
if (typeof errorCode === "string" && errorCode.length > 0) {
|
|
@@ -578,6 +578,24 @@ function getRuntimeFailureMessage(kind, result) {
|
|
|
578
578
|
}
|
|
579
579
|
return `Runtime command "${kind}" failed.`;
|
|
580
580
|
}
|
|
581
|
+
function stripRuntimeErrorPrefix(line) {
|
|
582
|
+
return line.replace(/^(?:[A-Za-z][\w.]*Error|Error):\s+/, "");
|
|
583
|
+
}
|
|
584
|
+
function isRuntimeErrorSourceLine(line) {
|
|
585
|
+
return line.startsWith("throw ") || line.startsWith("at ") || line === "^" || /^\^+$/.test(line);
|
|
586
|
+
}
|
|
587
|
+
function formatRuntimeFailureText(text) {
|
|
588
|
+
const lines = text.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
589
|
+
const friendlyLine = lines.find((line) => line.includes("Unable to ") && !isRuntimeErrorSourceLine(line));
|
|
590
|
+
if (friendlyLine) {
|
|
591
|
+
return stripRuntimeErrorPrefix(friendlyLine);
|
|
592
|
+
}
|
|
593
|
+
const errorLine = lines.find((line) => /^(?:[A-Za-z][\w.]*Error|Error):\s+/.test(line));
|
|
594
|
+
if (errorLine) {
|
|
595
|
+
return stripRuntimeErrorPrefix(errorLine);
|
|
596
|
+
}
|
|
597
|
+
return lines[0] ?? text.trim();
|
|
598
|
+
}
|
|
581
599
|
async function withRuntimeEnvironment(projectRoot, kind, options, callback) {
|
|
582
600
|
if (kind === "seed") {
|
|
583
601
|
const project = await loadProjectConfig(projectRoot, { required: true });
|