numux 1.15.1 → 1.16.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.
Files changed (2) hide show
  1. package/dist/numux.js +16 -8
  2. 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: "1.15.1",
39
+ version: "1.16.0",
40
40
  description: "Terminal multiplexer with dependency orchestration",
41
41
  type: "module",
42
42
  license: "MIT",
@@ -711,7 +711,7 @@ function expandScriptPatterns(config, cwd) {
711
711
  }
712
712
 
713
713
  // src/config/loader.ts
714
- import { existsSync as existsSync3 } from "fs";
714
+ import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
715
715
  import { resolve as resolve3 } from "path";
716
716
 
717
717
  // src/utils/logger.ts
@@ -815,7 +815,15 @@ async function autoDetectConfig(cwd) {
815
815
  return loadFile(path);
816
816
  }
817
817
  }
818
- throw new Error(`No numux config found. Create one of: ${CONFIG_FILES.join(", ")}`);
818
+ const pkgPath = resolve3(cwd, "package.json");
819
+ if (existsSync3(pkgPath)) {
820
+ const pkgJson = JSON.parse(readFileSync2(pkgPath, "utf-8"));
821
+ if (pkgJson.numux && typeof pkgJson.numux === "object") {
822
+ log(`Found numux config in package.json`);
823
+ return interpolateConfig(pkgJson.numux);
824
+ }
825
+ }
826
+ throw new Error(`No numux config found. Create one of: ${CONFIG_FILES.join(", ")}, or add a "numux" key to package.json`);
819
827
  }
820
828
 
821
829
  // src/config/resolver.ts
@@ -1135,14 +1143,14 @@ function validateStopSignal(value) {
1135
1143
  }
1136
1144
 
1137
1145
  // src/config/workspaces.ts
1138
- import { existsSync as existsSync4, readFileSync as readFileSync2 } from "fs";
1146
+ import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
1139
1147
  import { basename, resolve as resolve4 } from "path";
1140
1148
  function resolveWorkspaceProcesses(script, cwd) {
1141
1149
  const pkgPath = resolve4(cwd, "package.json");
1142
1150
  if (!existsSync4(pkgPath)) {
1143
1151
  throw new Error(`No package.json found in ${cwd}`);
1144
1152
  }
1145
- const pkgJson = JSON.parse(readFileSync2(pkgPath, "utf-8"));
1153
+ const pkgJson = JSON.parse(readFileSync3(pkgPath, "utf-8"));
1146
1154
  const pm = detectPackageManager(pkgJson, cwd);
1147
1155
  const raw = pkgJson.workspaces;
1148
1156
  let patterns;
@@ -1168,7 +1176,7 @@ function resolveWorkspaceProcesses(script, cwd) {
1168
1176
  const usedNames = new Set;
1169
1177
  for (const dir of dirs) {
1170
1178
  const wsPkgPath = resolve4(dir, "package.json");
1171
- const wsPkg = JSON.parse(readFileSync2(wsPkgPath, "utf-8"));
1179
+ const wsPkg = JSON.parse(readFileSync3(wsPkgPath, "utf-8"));
1172
1180
  const scripts = wsPkg.scripts;
1173
1181
  if (!scripts?.[script])
1174
1182
  continue;
@@ -1249,7 +1257,7 @@ class FileWatcher {
1249
1257
  import { resolve as resolve6 } from "path";
1250
1258
 
1251
1259
  // src/utils/env-file.ts
1252
- import { readFileSync as readFileSync3 } from "fs";
1260
+ import { readFileSync as readFileSync4 } from "fs";
1253
1261
  import { resolve as resolve5 } from "path";
1254
1262
  function parseEnvFile(content) {
1255
1263
  const vars = {};
@@ -1281,7 +1289,7 @@ function loadEnvFiles(envFile, cwd) {
1281
1289
  const path = resolve5(cwd, file);
1282
1290
  let content;
1283
1291
  try {
1284
- content = readFileSync3(path, "utf-8");
1292
+ content = readFileSync4(path, "utf-8");
1285
1293
  } catch (err) {
1286
1294
  const code = err.code;
1287
1295
  if (code === "ENOENT") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "numux",
3
- "version": "1.15.1",
3
+ "version": "1.16.0",
4
4
  "description": "Terminal multiplexer with dependency orchestration",
5
5
  "type": "module",
6
6
  "license": "MIT",