numux 1.10.4 → 1.11.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 +22 -3
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
package/dist/numux.js
CHANGED
|
@@ -22,7 +22,7 @@ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports,
|
|
|
22
22
|
var require_package = __commonJS((exports, module) => {
|
|
23
23
|
module.exports = {
|
|
24
24
|
name: "numux",
|
|
25
|
-
version: "1.
|
|
25
|
+
version: "1.11.0",
|
|
26
26
|
description: "Terminal multiplexer with dependency orchestration",
|
|
27
27
|
type: "module",
|
|
28
28
|
license: "MIT",
|
|
@@ -122,6 +122,16 @@ var FLAGS = [
|
|
|
122
122
|
key: "autoColors",
|
|
123
123
|
description: "Auto-assign colors to processes based on their name"
|
|
124
124
|
},
|
|
125
|
+
{
|
|
126
|
+
type: "value",
|
|
127
|
+
long: "--env-file",
|
|
128
|
+
short: "-e",
|
|
129
|
+
key: "envFile",
|
|
130
|
+
description: 'Env file path, or "false" to disable env file loading',
|
|
131
|
+
valueName: "<path|false>",
|
|
132
|
+
completionHint: "file",
|
|
133
|
+
parse: (raw) => raw === "false" ? false : raw
|
|
134
|
+
},
|
|
125
135
|
{
|
|
126
136
|
type: "value",
|
|
127
137
|
long: "--config",
|
|
@@ -970,7 +980,7 @@ function validateConfig(raw, warnings) {
|
|
|
970
980
|
throw new Error("Config must define at least one process");
|
|
971
981
|
}
|
|
972
982
|
const globalCwd = typeof config.cwd === "string" ? config.cwd : undefined;
|
|
973
|
-
const globalEnvFile =
|
|
983
|
+
const globalEnvFile = validateEnvFile(config.envFile);
|
|
974
984
|
let globalEnv;
|
|
975
985
|
if (config.env && typeof config.env === "object") {
|
|
976
986
|
for (const [k, v] of Object.entries(config.env)) {
|
|
@@ -1066,7 +1076,11 @@ function validateStringOrStringArray(value) {
|
|
|
1066
1076
|
return value;
|
|
1067
1077
|
return;
|
|
1068
1078
|
}
|
|
1069
|
-
|
|
1079
|
+
function validateEnvFile(value) {
|
|
1080
|
+
if (value === false)
|
|
1081
|
+
return false;
|
|
1082
|
+
return validateStringOrStringArray(value);
|
|
1083
|
+
}
|
|
1070
1084
|
function validateErrorMatcher(name, value) {
|
|
1071
1085
|
if (value === true)
|
|
1072
1086
|
return true;
|
|
@@ -3136,6 +3150,11 @@ async function main() {
|
|
|
3136
3150
|
}
|
|
3137
3151
|
}
|
|
3138
3152
|
}
|
|
3153
|
+
if (parsed.envFile !== undefined) {
|
|
3154
|
+
for (const proc of Object.values(config.processes)) {
|
|
3155
|
+
proc.envFile = parsed.envFile;
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3139
3158
|
if (parsed.noWatch) {
|
|
3140
3159
|
for (const proc of Object.values(config.processes)) {
|
|
3141
3160
|
delete proc.watch;
|
package/dist/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export interface NumuxProcessConfig {
|
|
|
2
2
|
command: string;
|
|
3
3
|
cwd?: string;
|
|
4
4
|
env?: Record<string, string>;
|
|
5
|
-
envFile?: string | string[];
|
|
5
|
+
envFile?: string | string[] | false;
|
|
6
6
|
dependsOn?: string[];
|
|
7
7
|
readyPattern?: string;
|
|
8
8
|
persistent?: boolean;
|
|
@@ -24,7 +24,7 @@ export type NumuxScriptPattern = Omit<NumuxProcessConfig, 'command'> & {
|
|
|
24
24
|
export interface NumuxConfig {
|
|
25
25
|
cwd?: string;
|
|
26
26
|
env?: Record<string, string>;
|
|
27
|
-
envFile?: string | string[];
|
|
27
|
+
envFile?: string | string[] | false;
|
|
28
28
|
processes: Record<string, NumuxProcessConfig | NumuxScriptPattern | string>;
|
|
29
29
|
}
|
|
30
30
|
/** Validated config with all shorthand expanded to full objects */
|