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-2PHPGCAV.js";
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-Y7BJ4AA2.js");
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 "yarn global add goblin-malin";
8031
+ return `yarn global add ${pkg}`;
8021
8032
  case "pnpm":
8022
- return "pnpm add -g goblin-malin";
8033
+ return `pnpm add -g ${pkg}`;
8023
8034
  default:
8024
- return "npm install -g goblin-malin";
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",
@@ -109,7 +109,7 @@ dotenv.config({
109
109
  });
110
110
  function resolveAppVersion() {
111
111
  try {
112
- return "0.1.6";
112
+ return "0.1.7";
113
113
  } catch {
114
114
  const _req = createRequire(import.meta.url);
115
115
  return _req("../package.json").version;
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  start
4
- } from "./chunk-5KB7X57L.js";
5
- import "./chunk-2PHPGCAV.js";
4
+ } from "./chunk-SDED7RDY.js";
5
+ import "./chunk-XCE7RRXV.js";
6
6
 
7
7
  // src/cli.ts
8
8
  start();
package/dist/index.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  src_default,
3
3
  start,
4
4
  withFullScreen
5
- } from "./chunk-5KB7X57L.js";
6
- import "./chunk-2PHPGCAV.js";
5
+ } from "./chunk-SDED7RDY.js";
6
+ import "./chunk-XCE7RRXV.js";
7
7
  export {
8
8
  src_default as default,
9
9
  start,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cleanAndTagFlac,
3
3
  moveFile
4
- } from "./chunk-2PHPGCAV.js";
4
+ } from "./chunk-XCE7RRXV.js";
5
5
  export {
6
6
  cleanAndTagFlac,
7
7
  moveFile
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goblin-malin",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "A keyboard-driven terminal UI for downloading and tagging music tracks with metadata from Spotify and YouTube",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",