@alcyone-labs/arg-parser 2.12.1 → 2.12.3
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/README.md +14 -2
- package/dist/config/ConfigurationManager.d.ts.map +1 -1
- package/dist/core/ArgParserBase.d.ts.map +1 -1
- package/dist/index.cjs +9 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.min.mjs +401 -400
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import dotenv from "dotenv";
|
|
4
5
|
import { createRegExp, anyOf, oneOrMore, char } from "magic-regexp";
|
|
5
6
|
import { createMcpLogger } from "@alcyone-labs/simple-mcp-logger";
|
|
6
7
|
import { Logger, createCliLogger, createMcpLogger as createMcpLogger2, logger } from "@alcyone-labs/simple-mcp-logger";
|
|
@@ -4429,11 +4430,9 @@ class ArgParserBase {
|
|
|
4429
4430
|
const autoDiscoveredEnvFile = this.#configurationManager.discoverEnvFile(basePath);
|
|
4430
4431
|
if (autoDiscoveredEnvFile) {
|
|
4431
4432
|
console.warn(`Auto-discovered env file: ${autoDiscoveredEnvFile}`);
|
|
4433
|
+
dotenv.config({ path: autoDiscoveredEnvFile, quiet: true, override: true });
|
|
4432
4434
|
try {
|
|
4433
|
-
const {
|
|
4434
|
-
finalParser: envFinalParser,
|
|
4435
|
-
parserChain: envParserChain
|
|
4436
|
-
} = this.#_identifyCommandChainAndParsers(
|
|
4435
|
+
const { finalParser: envFinalParser, parserChain: envParserChain } = this.#_identifyCommandChainAndParsers(
|
|
4437
4436
|
processArgs,
|
|
4438
4437
|
this,
|
|
4439
4438
|
[],
|
|
@@ -5217,7 +5216,12 @@ class ArgParserBase {
|
|
|
5217
5216
|
if (!(actualSubParserInstance instanceof ArgParserBase)) {
|
|
5218
5217
|
return `${indent()}${green(name.padEnd(20))} [Error: Subcommand '${name}' has an invalid parser configuration]`;
|
|
5219
5218
|
}
|
|
5220
|
-
let subHelp = `${indent()}${green(name
|
|
5219
|
+
let subHelp = `${indent()}${green(name)}`;
|
|
5220
|
+
const subDescription = actualSubParserInstance.#description;
|
|
5221
|
+
if (subDescription) {
|
|
5222
|
+
subHelp += `
|
|
5223
|
+
${indent(2)}${white(subDescription)}`;
|
|
5224
|
+
}
|
|
5221
5225
|
const flagsFromSubManager = actualSubParserInstance && actualSubParserInstance.#flagManager ? actualSubParserInstance.#flagManager.flags : void 0;
|
|
5222
5226
|
const subFlags = (flagsFromSubManager || []).filter(
|
|
5223
5227
|
(f) => f["name"] !== "help"
|