@mutmutco/hub 4.1.10 → 4.1.12
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/index.cjs +24 -14
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -53,6 +53,7 @@ __export(index_exports, {
|
|
|
53
53
|
probeCursorLaunchStaging: () => probeCursorLaunchStaging,
|
|
54
54
|
probeHermesInstallation: () => probeHermesInstallation,
|
|
55
55
|
probeHermesLaunchStaging: () => probeHermesLaunchStaging,
|
|
56
|
+
probeJervcodeInstallation: () => probeJervcodeInstallation,
|
|
56
57
|
probeKimiLaunchStaging: () => probeKimiLaunchStaging,
|
|
57
58
|
probeLaunchTargetVersion: () => probeLaunchTargetVersion,
|
|
58
59
|
progressiveRow: () => progressiveRow,
|
|
@@ -2019,13 +2020,13 @@ function installedVersion(env) {
|
|
|
2019
2020
|
function materializedManifestLocation(env) {
|
|
2020
2021
|
return (0, import_node_path11.join)(jervcodeAgentDir(env), "npm", "node_modules", ...PI_PACKAGE.split("/"));
|
|
2021
2022
|
}
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
return null;
|
|
2023
|
+
var PI_LIST_SPEC = new RegExp(`npm:${PI_PACKAGE.replace("/", "\\/")}@(\\S+)`);
|
|
2024
|
+
function parseListText(stdout) {
|
|
2025
|
+
for (const line of stdout.split("\n")) {
|
|
2026
|
+
const match = line.match(PI_LIST_SPEC);
|
|
2027
|
+
if (match) return match[1];
|
|
2028
2028
|
}
|
|
2029
|
+
return null;
|
|
2029
2030
|
}
|
|
2030
2031
|
function probeJervcodeInstallation(env = process.env, runner = runHostCommand) {
|
|
2031
2032
|
const manifestLocation = materializedManifestLocation(env);
|
|
@@ -2038,18 +2039,17 @@ function probeJervcodeInstallation(env = process.env, runner = runHostCommand) {
|
|
|
2038
2039
|
const hosted = hostEnv(env);
|
|
2039
2040
|
const command = hostCommands(env).find((bin) => runner(bin, ["--version"], hosted).status === 0);
|
|
2040
2041
|
if (!command) return manifestEvidence();
|
|
2041
|
-
const hostLocation = `${command}
|
|
2042
|
-
const result = runner(command, ["
|
|
2043
|
-
const
|
|
2044
|
-
|
|
2045
|
-
if (row?.version) {
|
|
2042
|
+
const hostLocation = `${command} list`;
|
|
2043
|
+
const result = runner(command, ["list"], hosted);
|
|
2044
|
+
const version = result.status === 0 ? parseListText(result.stdout) : null;
|
|
2045
|
+
if (version) {
|
|
2046
2046
|
return {
|
|
2047
|
-
version
|
|
2047
|
+
version,
|
|
2048
2048
|
location: hostLocation,
|
|
2049
|
-
detail:
|
|
2049
|
+
detail: "native host user package listing"
|
|
2050
2050
|
};
|
|
2051
2051
|
}
|
|
2052
|
-
const hostError =
|
|
2052
|
+
const hostError = result.status !== 0 ? `${hostLocation} failed: ${failure2(result)}` : `${hostLocation} did not list npm:${PI_PACKAGE}`;
|
|
2053
2053
|
if (manifestVersion) {
|
|
2054
2054
|
return {
|
|
2055
2055
|
version: manifestVersion,
|
|
@@ -3538,6 +3538,15 @@ function reportFooterLines(summary, options = {}) {
|
|
|
3538
3538
|
};
|
|
3539
3539
|
const footer = dryRun ? `${counts.updated}/${counts.total} would update` : `${counts.updated}/${counts.total} updated` + (counts.retry ? ` \xB7 ${counts.retry} will retry` : "") + (counts.failed ? ` \xB7 ${counts.failed} failed` : "");
|
|
3540
3540
|
const out = ["", " " + footer];
|
|
3541
|
+
const self = summary.updater;
|
|
3542
|
+
if (!dryRun && self && self.from && self.to && self.from !== self.to && self.verdict !== "fail") {
|
|
3543
|
+
out.push("");
|
|
3544
|
+
out.push(...noteLines(
|
|
3545
|
+
" note: ",
|
|
3546
|
+
`hub moved ${self.from} \u2192 ${self.to} after the surfaces above ran, so they used ${self.from} logic \u2014 rerun \`mmi-hub update\` to bring them to ${self.to}`,
|
|
3547
|
+
width
|
|
3548
|
+
));
|
|
3549
|
+
}
|
|
3541
3550
|
if (counts.failed) {
|
|
3542
3551
|
out.push("");
|
|
3543
3552
|
for (const row of rows.filter((row2) => row2.kind === "failed")) {
|
|
@@ -3804,6 +3813,7 @@ if (typeof require !== "undefined" && require.main === module) {
|
|
|
3804
3813
|
probeCursorLaunchStaging,
|
|
3805
3814
|
probeHermesInstallation,
|
|
3806
3815
|
probeHermesLaunchStaging,
|
|
3816
|
+
probeJervcodeInstallation,
|
|
3807
3817
|
probeKimiLaunchStaging,
|
|
3808
3818
|
probeLaunchTargetVersion,
|
|
3809
3819
|
progressiveRow,
|
package/package.json
CHANGED