numux 2.7.1 → 2.8.0
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/numux.js +26 -6
- package/package.json +1 -1
package/dist/numux.js
CHANGED
|
@@ -36,7 +36,7 @@ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports,
|
|
|
36
36
|
var require_package = __commonJS((exports, module) => {
|
|
37
37
|
module.exports = {
|
|
38
38
|
name: "numux",
|
|
39
|
-
version: "2.
|
|
39
|
+
version: "2.8.0",
|
|
40
40
|
description: "Terminal multiplexer with dependency orchestration",
|
|
41
41
|
type: "module",
|
|
42
42
|
license: "MIT",
|
|
@@ -95,7 +95,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
// src/index.ts
|
|
98
|
-
import { existsSync as
|
|
98
|
+
import { existsSync as existsSync6, writeFileSync } from "fs";
|
|
99
99
|
import { resolve as resolve8 } from "path";
|
|
100
100
|
|
|
101
101
|
// src/cli-flags.ts
|
|
@@ -2791,7 +2791,7 @@ class StatusBar {
|
|
|
2791
2791
|
this.renderable = new TextRenderable(renderer, {
|
|
2792
2792
|
id: "status-bar",
|
|
2793
2793
|
width: "100%",
|
|
2794
|
-
|
|
2794
|
+
wrapMode: "word",
|
|
2795
2795
|
content: this.buildContent(),
|
|
2796
2796
|
bg: "#1a1a1a",
|
|
2797
2797
|
paddingX: 1
|
|
@@ -3876,6 +3876,26 @@ class LogWriter {
|
|
|
3876
3876
|
}
|
|
3877
3877
|
}
|
|
3878
3878
|
|
|
3879
|
+
// src/utils/project-name.ts
|
|
3880
|
+
import { existsSync as existsSync5, readFileSync as readFileSync5 } from "fs";
|
|
3881
|
+
import { tmpdir as tmpdir2 } from "os";
|
|
3882
|
+
import { basename as basename3, join as join2 } from "path";
|
|
3883
|
+
function resolveProjectName(cwd) {
|
|
3884
|
+
try {
|
|
3885
|
+
const pkgPath = join2(cwd, "package.json");
|
|
3886
|
+
if (existsSync5(pkgPath)) {
|
|
3887
|
+
const pkg = JSON.parse(readFileSync5(pkgPath, "utf-8"));
|
|
3888
|
+
if (typeof pkg.name === "string" && pkg.name.trim()) {
|
|
3889
|
+
return pkg.name.replace(/^@[^/]+\//, "").trim();
|
|
3890
|
+
}
|
|
3891
|
+
}
|
|
3892
|
+
} catch {}
|
|
3893
|
+
return basename3(cwd);
|
|
3894
|
+
}
|
|
3895
|
+
function defaultLogDir(cwd) {
|
|
3896
|
+
return join2(tmpdir2(), "numux", resolveProjectName(cwd));
|
|
3897
|
+
}
|
|
3898
|
+
|
|
3879
3899
|
// src/utils/shutdown.ts
|
|
3880
3900
|
function setupShutdownHandlers(app, logWriter) {
|
|
3881
3901
|
let shuttingDown = false;
|
|
@@ -3953,7 +3973,7 @@ async function main() {
|
|
|
3953
3973
|
}
|
|
3954
3974
|
if (parsed.init) {
|
|
3955
3975
|
const target = resolve8("numux.config.ts");
|
|
3956
|
-
if (
|
|
3976
|
+
if (existsSync6(target)) {
|
|
3957
3977
|
console.error(`Already exists: ${target}`);
|
|
3958
3978
|
process.exit(1);
|
|
3959
3979
|
}
|
|
@@ -4114,8 +4134,8 @@ async function main() {
|
|
|
4114
4134
|
}
|
|
4115
4135
|
}
|
|
4116
4136
|
const manager = new ProcessManager(config);
|
|
4117
|
-
const logDir = parsed.logDir ?? config.logDir;
|
|
4118
|
-
const logWriter =
|
|
4137
|
+
const logDir = parsed.logDir ?? config.logDir ?? defaultLogDir(process.cwd());
|
|
4138
|
+
const logWriter = LogWriter.createPersistent(logDir);
|
|
4119
4139
|
printWarnings(warnings);
|
|
4120
4140
|
const timestamps = parsed.timestamps || config.timestamps;
|
|
4121
4141
|
const usePrefix = parsed.prefix || config.prefix;
|