goblin-malin 0.1.9 → 0.1.10
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-3Z5GC7PL.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-V5F55CIM.js");
|
|
4628
4628
|
await moveFile(existingSavedPath, outputPath);
|
|
4629
4629
|
}
|
|
4630
4630
|
outputCreated = true;
|
|
@@ -8079,6 +8079,7 @@ var UpdateModal = /* @__PURE__ */ __name(({ latestVersion, releaseUrl, terminalH
|
|
|
8079
8079
|
return;
|
|
8080
8080
|
}
|
|
8081
8081
|
setPkgStatus("running");
|
|
8082
|
+
globalLogger.info(`[updater] running: ${updateCommand}`);
|
|
8082
8083
|
const [bin, ...args] = updateCommand.split(" ");
|
|
8083
8084
|
const proc = spawn3(bin, args, {
|
|
8084
8085
|
stdio: "pipe",
|
|
@@ -8086,19 +8087,27 @@ var UpdateModal = /* @__PURE__ */ __name(({ latestVersion, releaseUrl, terminalH
|
|
|
8086
8087
|
});
|
|
8087
8088
|
const addLines = /* @__PURE__ */ __name((chunk) => {
|
|
8088
8089
|
const lines = chunk.toString().split("\n").filter(Boolean);
|
|
8090
|
+
lines.forEach((l) => globalLogger.info(`[updater] ${l}`));
|
|
8089
8091
|
setPkgOutput((prev) => [
|
|
8090
8092
|
...prev,
|
|
8091
8093
|
...lines
|
|
8092
|
-
].slice(-
|
|
8094
|
+
].slice(-20));
|
|
8093
8095
|
}, "addLines");
|
|
8094
8096
|
proc.stdout?.on("data", addLines);
|
|
8095
8097
|
proc.stderr?.on("data", addLines);
|
|
8096
8098
|
proc.on("exit", (code) => {
|
|
8097
8099
|
if (!mountedRef.current) return;
|
|
8098
|
-
|
|
8100
|
+
if (code === 0) {
|
|
8101
|
+
globalLogger.info(`[updater] success`);
|
|
8102
|
+
setPkgStatus("done");
|
|
8103
|
+
} else {
|
|
8104
|
+
globalLogger.error(`[updater] failed with exit code ${code}`);
|
|
8105
|
+
setPkgStatus("error");
|
|
8106
|
+
}
|
|
8099
8107
|
});
|
|
8100
8108
|
proc.on("error", (err) => {
|
|
8101
8109
|
if (!mountedRef.current) return;
|
|
8110
|
+
globalLogger.error(`[updater] spawn error: ${err.message}`);
|
|
8102
8111
|
setPkgOutput((prev) => [
|
|
8103
8112
|
...prev,
|
|
8104
8113
|
err.message
|
|
@@ -8157,7 +8166,7 @@ var UpdateModal = /* @__PURE__ */ __name(({ latestVersion, releaseUrl, terminalH
|
|
|
8157
8166
|
]
|
|
8158
8167
|
});
|
|
8159
8168
|
if (!isActive) return null;
|
|
8160
|
-
const modalWidth = Math.min(
|
|
8169
|
+
const modalWidth = Math.min(100, terminalWidth - 4);
|
|
8161
8170
|
const isIdle = IS_SEA || pkgStatus === "idle";
|
|
8162
8171
|
const isInProgress = !IS_SEA && pkgStatus === "running";
|
|
8163
8172
|
return /* @__PURE__ */ React28.createElement(Box14, {
|
|
@@ -8221,8 +8230,7 @@ var UpdateModal = /* @__PURE__ */ __name(({ latestVersion, releaseUrl, terminalH
|
|
|
8221
8230
|
color: theme.ui.focusIndicator
|
|
8222
8231
|
}, "Updating via ", installer, "..."), pkgOutput.map((line, i) => /* @__PURE__ */ React28.createElement(Text23, {
|
|
8223
8232
|
key: i,
|
|
8224
|
-
dimColor: true
|
|
8225
|
-
wrap: "truncate"
|
|
8233
|
+
dimColor: true
|
|
8226
8234
|
}, line))), !IS_SEA && pkgStatus === "done" && /* @__PURE__ */ React28.createElement(Box14, {
|
|
8227
8235
|
flexDirection: "column",
|
|
8228
8236
|
marginTop: 1
|
|
@@ -8235,10 +8243,9 @@ var UpdateModal = /* @__PURE__ */ __name(({ latestVersion, releaseUrl, terminalH
|
|
|
8235
8243
|
marginTop: 1
|
|
8236
8244
|
}, /* @__PURE__ */ React28.createElement(Text23, {
|
|
8237
8245
|
color: theme.status.error
|
|
8238
|
-
}, "Update failed."), pkgOutput.
|
|
8246
|
+
}, "Update failed."), pkgOutput.map((line, i) => /* @__PURE__ */ React28.createElement(Text23, {
|
|
8239
8247
|
key: i,
|
|
8240
|
-
color: theme.text.muted
|
|
8241
|
-
wrap: "truncate"
|
|
8248
|
+
color: theme.text.muted
|
|
8242
8249
|
}, line))), /* @__PURE__ */ React28.createElement(Box14, {
|
|
8243
8250
|
marginTop: 1,
|
|
8244
8251
|
flexDirection: "row"
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "goblin-malin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
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",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"#base/*": "./src/base/*.ts",
|
|
11
11
|
"#components": "./src/components/index.ts",
|
|
12
12
|
"#components/*": "./src/components/*.ts",
|
|
13
|
+
"#constants": "./src/constants.ts",
|
|
13
14
|
"#contexts": "./src/contexts/index.ts",
|
|
14
15
|
"#contexts/*": "./src/contexts/*.ts",
|
|
15
16
|
"#exceptions": "./src/exceptions/index.ts",
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
"#hooks/*": "./src/hooks/*.ts",
|
|
21
22
|
"#settings": "./src/settings/index.ts",
|
|
22
23
|
"#settings/*": "./src/settings/*.ts",
|
|
24
|
+
"#updater/*": "./src/updater/*.ts",
|
|
23
25
|
"#utils": "./src/utils/index.ts",
|
|
24
26
|
"#utils/*": "./src/utils/*.ts",
|
|
25
27
|
"#assets/*": "./src/assets/*",
|