goblin-malin 0.1.6 → 0.1.7
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.
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getCacheDir,
|
|
12
12
|
globalLogger,
|
|
13
13
|
inkTransport
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-XCE7RRXV.js";
|
|
15
15
|
|
|
16
16
|
// src/index.tsx
|
|
17
17
|
import React65 from "react";
|
|
@@ -4624,7 +4624,7 @@ var DownloadTask = class extends Task {
|
|
|
4624
4624
|
}
|
|
4625
4625
|
if (existingSavedPath) {
|
|
4626
4626
|
if (existingSavedPath !== outputPath) {
|
|
4627
|
-
const { moveFile } = await import("./metadata-
|
|
4627
|
+
const { moveFile } = await import("./metadata-XUUS7ZMR.js");
|
|
4628
4628
|
await moveFile(existingSavedPath, outputPath);
|
|
4629
4629
|
}
|
|
4630
4630
|
outputCreated = true;
|
|
@@ -8003,7 +8003,17 @@ var IS_SEA = (() => {
|
|
|
8003
8003
|
return false;
|
|
8004
8004
|
}
|
|
8005
8005
|
})();
|
|
8006
|
+
function detectInstallerFromArgv() {
|
|
8007
|
+
const scriptPath = (process.argv[1] ?? "").replace(/\\/g, "/");
|
|
8008
|
+
if (scriptPath.includes("/Yarn/") || scriptPath.includes("/yarn/")) return "yarn";
|
|
8009
|
+
if (scriptPath.includes("/.pnpm/") || scriptPath.includes("/pnpm/")) return "pnpm";
|
|
8010
|
+
if (scriptPath.includes("/npm/")) return "npm";
|
|
8011
|
+
return null;
|
|
8012
|
+
}
|
|
8013
|
+
__name(detectInstallerFromArgv, "detectInstallerFromArgv");
|
|
8006
8014
|
function getInstaller() {
|
|
8015
|
+
const fromArgv = detectInstallerFromArgv();
|
|
8016
|
+
if (fromArgv) return fromArgv;
|
|
8007
8017
|
try {
|
|
8008
8018
|
const raw = readFileSync(join9(DEFAULT_APP_DATA_DIR, "install.json"), "utf8");
|
|
8009
8019
|
const installer2 = JSON.parse(raw).installer;
|
|
@@ -8014,22 +8024,23 @@ function getInstaller() {
|
|
|
8014
8024
|
}
|
|
8015
8025
|
}
|
|
8016
8026
|
__name(getInstaller, "getInstaller");
|
|
8017
|
-
function getUpdateCommand() {
|
|
8027
|
+
function getUpdateCommand(version) {
|
|
8028
|
+
const pkg = version ? `goblin-malin@${version}` : "goblin-malin";
|
|
8018
8029
|
switch (getInstaller()) {
|
|
8019
8030
|
case "yarn":
|
|
8020
|
-
return
|
|
8031
|
+
return `yarn global add ${pkg}`;
|
|
8021
8032
|
case "pnpm":
|
|
8022
|
-
return
|
|
8033
|
+
return `pnpm add -g ${pkg}`;
|
|
8023
8034
|
default:
|
|
8024
|
-
return
|
|
8035
|
+
return `npm install -g ${pkg}`;
|
|
8025
8036
|
}
|
|
8026
8037
|
}
|
|
8027
8038
|
__name(getUpdateCommand, "getUpdateCommand");
|
|
8028
8039
|
|
|
8029
8040
|
// src/components/UpdateModal/UpdateModal.tsx
|
|
8030
8041
|
var installer = getInstaller();
|
|
8031
|
-
var updateCommand = getUpdateCommand();
|
|
8032
8042
|
var UpdateModal = /* @__PURE__ */ __name(({ latestVersion, releaseUrl, terminalHeight, terminalWidth }) => {
|
|
8043
|
+
const updateCommand = getUpdateCommand(latestVersion);
|
|
8033
8044
|
const theme = useTheme();
|
|
8034
8045
|
const { focusState, switchBack } = useFocusContext();
|
|
8035
8046
|
const isActive = focusState.activeWindow === "updateModal";
|
|
@@ -8098,7 +8109,8 @@ var UpdateModal = /* @__PURE__ */ __name(({ latestVersion, releaseUrl, terminalH
|
|
|
8098
8109
|
pkgStatus,
|
|
8099
8110
|
selectedIndex,
|
|
8100
8111
|
releaseUrl,
|
|
8101
|
-
switchBack
|
|
8112
|
+
switchBack,
|
|
8113
|
+
updateCommand
|
|
8102
8114
|
]);
|
|
8103
8115
|
useShortcuts({
|
|
8104
8116
|
id: "updateModal",
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED