@alcyone-labs/arg-parser 2.6.0 → 2.7.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/README.md +188 -25
- package/dist/core/ArgParser.d.ts +60 -0
- package/dist/core/ArgParser.d.ts.map +1 -1
- package/dist/core/ArgParserBase.d.ts +20 -0
- package/dist/core/ArgParserBase.d.ts.map +1 -1
- package/dist/index.cjs +219 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.min.mjs +3027 -2891
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +219 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,6 +45,9 @@ A modern, type-safe command line argument parser with built-in MCP (Model Contex
|
|
|
45
45
|
- [Common Pitfalls to Avoid](#common-pitfalls-to-avoid)
|
|
46
46
|
- [Automatic MCP Server Mode (`--s-mcp-serve`)](#automatic-mcp-server-mode---s-mcp-serve)
|
|
47
47
|
- [MCP Transports](#mcp-transports)
|
|
48
|
+
- [Adding custom HTTP routes (e.g., /health)](#adding-custom-http-routes-eg-health)
|
|
49
|
+
- [CORS and Authentication for streamable-http](#cors-and-authentication-for-streamable-http)
|
|
50
|
+
- [Multiple transports and improved logging](#multiple-transports-and-improved-logging)
|
|
48
51
|
- [MCP Logging Configuration](#mcp-logging-configuration)
|
|
49
52
|
- [Enhanced Logging (Recommended)](#enhanced-logging-recommended)
|
|
50
53
|
- [Simple Logging Configuration](#simple-logging-configuration)
|
|
@@ -71,6 +74,7 @@ A modern, type-safe command line argument parser with built-in MCP (Model Contex
|
|
|
71
74
|
- [Typical Errors](#typical-errors)
|
|
72
75
|
- [System Flags & Configuration](#system-flags--configuration)
|
|
73
76
|
- [Changelog](#changelog)
|
|
77
|
+
- [v2.7.0](#v270)
|
|
74
78
|
- [v2.6.0](#v260)
|
|
75
79
|
- [v2.5.0](#v250)
|
|
76
80
|
- [v2.4.2](#v242)
|
|
@@ -337,9 +341,9 @@ yarn unlink
|
|
|
337
341
|
|
|
338
342
|
ArgParser's `parse()` method is async and automatically handles both synchronous and asynchronous handlers:
|
|
339
343
|
|
|
340
|
-
###
|
|
344
|
+
### Auto-Execution versus Import: No More Boilerplate
|
|
341
345
|
|
|
342
|
-
|
|
346
|
+
ArgParser now provides auto-execution ability that eliminates the need for boilerplate code to check if your script is being run directly vs. imported. This enables use cases such as programmatically loading the CLI and scanning for tools or testing it from another script via the --s-enable-fuzzy flag or your own script.
|
|
343
347
|
|
|
344
348
|
```typescript
|
|
345
349
|
const cli = ArgParser.withMcp({
|
|
@@ -348,32 +352,27 @@ const cli = ArgParser.withMcp({
|
|
|
348
352
|
handler: async (ctx) => ({ success: true, data: ctx.args }),
|
|
349
353
|
});
|
|
350
354
|
|
|
351
|
-
//
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
const result = await cli.parse(); // No arguments needed!
|
|
356
|
-
console.log("Success:", result);
|
|
357
|
-
} catch (error) {
|
|
358
|
-
console.error("Error:", error.message);
|
|
359
|
-
process.exit(1);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
```
|
|
355
|
+
// Now, this will NOT automatically execute the parser if the script is imported, but will execute if called directly:
|
|
356
|
+
await cli.parse(undefined, {
|
|
357
|
+
importMetaUrl: import.meta.url
|
|
358
|
+
}).catch(handleError);
|
|
363
359
|
|
|
364
|
-
**How it works:**
|
|
365
360
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
361
|
+
// Or, using the manual APIs:
|
|
362
|
+
await cli.parseIfExecutedDirectly(import.meta.url).catch((error) => {
|
|
363
|
+
console.error("Fatal error:", error instanceof Error ? error.message : String(error));
|
|
364
|
+
process.exit(1);
|
|
365
|
+
});
|
|
366
|
+
```
|
|
371
367
|
|
|
372
|
-
**
|
|
368
|
+
**Replaces previously confusing patterns:**
|
|
373
369
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
370
|
+
```typescript
|
|
371
|
+
// Brittle and breaks in sandboxes
|
|
372
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
373
|
+
await cli.parse().catch(handleError);
|
|
374
|
+
}
|
|
375
|
+
```
|
|
377
376
|
|
|
378
377
|
### Cannonical Usage Pattern
|
|
379
378
|
|
|
@@ -1296,6 +1295,14 @@ my-tool --s-mcp-serve --s-mcp-transports '[{"type":"stdio"},{"type":"sse","port"
|
|
|
1296
1295
|
# Single transport with custom options
|
|
1297
1296
|
my-tool --s-mcp-serve --s-mcp-transport sse --s-mcp-port 3000 --s-mcp-host 0.0.0.0
|
|
1298
1297
|
|
|
1298
|
+
# Streamable HTTP CORS/auth via CLI flags (JSON strings)
|
|
1299
|
+
my-tool --s-mcp-serve \
|
|
1300
|
+
--s-mcp-transport streamable-http \
|
|
1301
|
+
--s-mcp-port 3002 --s-mcp-path /api/mcp \
|
|
1302
|
+
--s-mcp-cors '{"origins":["http://localhost:5173"],"credentials":true,"methods":["GET","POST","OPTIONS"],"maxAge":600}' \
|
|
1303
|
+
--s-mcp-auth '{"required":true,"scheme":"jwt","jwt":{"algorithms":["HS256"],"secret":"$MY_JWT_SECRET"},"publicPaths":["/health"]}'
|
|
1304
|
+
|
|
1305
|
+
|
|
1299
1306
|
# Custom log path via CLI flag (logs to specified file instead of ./logs/mcp.log)
|
|
1300
1307
|
my-tool --s-mcp-serve --s-mcp-log-path /var/log/my-mcp-server.log
|
|
1301
1308
|
|
|
@@ -1303,6 +1310,130 @@ my-tool --s-mcp-serve --s-mcp-log-path /var/log/my-mcp-server.log
|
|
|
1303
1310
|
const parser = ArgParser.withMcp({
|
|
1304
1311
|
mcp: {
|
|
1305
1312
|
serverInfo: { name: 'my-tool', version: '1.0.0' },
|
|
1313
|
+
|
|
1314
|
+
```
|
|
1315
|
+
|
|
1316
|
+
### CORS and Authentication for streamable-http
|
|
1317
|
+
|
|
1318
|
+
CORS is often required when connecting a Web UI to an MCP server over HTTP.
|
|
1319
|
+
|
|
1320
|
+
- Programmatic transport config:
|
|
1321
|
+
|
|
1322
|
+
```ts
|
|
1323
|
+
import type { McpTransportConfig } from "@alcyone-labs/arg-parser";
|
|
1324
|
+
|
|
1325
|
+
const defaultTransports: McpTransportConfig[] = [{
|
|
1326
|
+
type: "streamable-http",
|
|
1327
|
+
port: 3002,
|
|
1328
|
+
path: "/api/mcp",
|
|
1329
|
+
cors: {
|
|
1330
|
+
origins: ["http://localhost:5173", /^https?:\/\/example\.com$/],
|
|
1331
|
+
methods: ["GET","POST","OPTIONS"],
|
|
1332
|
+
headers: ["Content-Type","Authorization","MCP-Session-Id"],
|
|
1333
|
+
exposedHeaders: ["MCP-Session-Id"],
|
|
1334
|
+
credentials: true,
|
|
1335
|
+
maxAge: 600,
|
|
1336
|
+
},
|
|
1337
|
+
auth: {
|
|
1338
|
+
required: true,
|
|
1339
|
+
scheme: "jwt", // or "bearer"
|
|
1340
|
+
// Bearer allowlist:
|
|
1341
|
+
// allowedTokens: ["token1","token2"],
|
|
1342
|
+
// JWT verification (HS256):
|
|
1343
|
+
// jwt: { algorithms: ["HS256"], secret: process.env.JWT_SECRET },
|
|
1344
|
+
// JWT verification (RS256 with static public key):
|
|
1345
|
+
// jwt: { algorithms: ["RS256"], publicKey: process.env.RS256_PUBLIC_KEY },
|
|
1346
|
+
// JWT verification (RS256 with dynamic JWKS):
|
|
1347
|
+
// jwt: { algorithms: ["RS256"], getPublicKey: async (header)=>{ /* fetch JWKS and return PEM */ } },
|
|
1348
|
+
publicPaths: ["/health"],
|
|
1349
|
+
protectedPaths: undefined, // if set, only listed paths require auth
|
|
1350
|
+
// Optional custom validator to add extra checks
|
|
1351
|
+
validator: async (req, token) => true,
|
|
1352
|
+
},
|
|
1353
|
+
}];
|
|
1354
|
+
```
|
|
1355
|
+
|
|
1356
|
+
- CLI flags (JSON strings):
|
|
1357
|
+
|
|
1358
|
+
```bash
|
|
1359
|
+
my-tool --s-mcp-serve \
|
|
1360
|
+
--s-mcp-transport streamable-http \
|
|
1361
|
+
--s-mcp-port 3002 --s-mcp-path /api/mcp \
|
|
1362
|
+
--s-mcp-cors '{"origins":["http://localhost:5173"],"credentials":true,"methods":["GET","POST","OPTIONS"],"maxAge":600}' \
|
|
1363
|
+
--s-mcp-auth '{"required":true,"scheme":"jwt","jwt":{"algorithms":["HS256"],"secret":"'$JWT_SECRET'"},"publicPaths":["/health"]}'
|
|
1364
|
+
```
|
|
1365
|
+
|
|
1366
|
+
- Express hook for custom routes:
|
|
1367
|
+
|
|
1368
|
+
```ts
|
|
1369
|
+
httpServer: {
|
|
1370
|
+
configureExpress: (app) => {
|
|
1371
|
+
app.get("/health", (_req, res) => res.json({ ok: true }));
|
|
1372
|
+
},
|
|
1373
|
+
}
|
|
1374
|
+
```
|
|
1375
|
+
|
|
1376
|
+
See examples:
|
|
1377
|
+
- examples/streamable-http/secure-mcp.ts (HS256)
|
|
1378
|
+
- examples/streamable-http/rs256-mcp.ts (RS256)
|
|
1379
|
+
- examples/streamable-http/jwks-mcp.ts (JWKS)
|
|
1380
|
+
- examples/streamable-http/bearer-mcp.ts (Bearer)
|
|
1381
|
+
- examples/streamable-http/productized-mcp.ts (token + session usage)
|
|
1382
|
+
|
|
1383
|
+
#### TypeScript types
|
|
1384
|
+
|
|
1385
|
+
- CorsOptions
|
|
1386
|
+
|
|
1387
|
+
```ts
|
|
1388
|
+
export type CorsOptions = {
|
|
1389
|
+
origins?: "*" | string | RegExp | Array<string | RegExp>;
|
|
1390
|
+
methods?: string[];
|
|
1391
|
+
headers?: string[];
|
|
1392
|
+
exposedHeaders?: string[];
|
|
1393
|
+
credentials?: boolean;
|
|
1394
|
+
maxAge?: number;
|
|
1395
|
+
};
|
|
1396
|
+
```
|
|
1397
|
+
|
|
1398
|
+
- AuthOptions and JwtVerifyOptions
|
|
1399
|
+
|
|
1400
|
+
```ts
|
|
1401
|
+
export type JwtVerifyOptions = {
|
|
1402
|
+
algorithms?: ("HS256" | "RS256")[];
|
|
1403
|
+
secret?: string; // HS256
|
|
1404
|
+
publicKey?: string; // RS256 static
|
|
1405
|
+
getPublicKey?: (header: Record<string, unknown>, payload: Record<string, unknown>) => Promise<string> | string; // RS256 dynamic
|
|
1406
|
+
audience?: string | string[];
|
|
1407
|
+
issuer?: string | string[];
|
|
1408
|
+
clockToleranceSec?: number;
|
|
1409
|
+
};
|
|
1410
|
+
|
|
1411
|
+
export type AuthOptions = {
|
|
1412
|
+
required?: boolean; // default true for MCP endpoint
|
|
1413
|
+
scheme?: "bearer" | "jwt";
|
|
1414
|
+
allowedTokens?: string[]; // simple bearer allowlist
|
|
1415
|
+
validator?: (req: any, token: string | undefined) => boolean | Promise<boolean>;
|
|
1416
|
+
jwt?: JwtVerifyOptions;
|
|
1417
|
+
publicPaths?: string[]; // paths that skip auth
|
|
1418
|
+
protectedPaths?: string[]; // if provided, only these paths require auth
|
|
1419
|
+
customMiddleware?: (req: any, res: any, next: any) => any; // full control hook
|
|
1420
|
+
};
|
|
1421
|
+
```
|
|
1422
|
+
|
|
1423
|
+
- HttpServerOptions
|
|
1424
|
+
|
|
1425
|
+
```ts
|
|
1426
|
+
export type HttpServerOptions = {
|
|
1427
|
+
configureExpress?: (app: any) => void;
|
|
1428
|
+
};
|
|
1429
|
+
```
|
|
1430
|
+
|
|
1431
|
+
Notes:
|
|
1432
|
+
- When credentials are true, Access-Control-Allow-Origin echoes the request Origin rather than using "*".
|
|
1433
|
+
- You can manage CORS for non-MCP routes in configureExpress.
|
|
1434
|
+
- Use publicPaths to allow some routes without auth; use protectedPaths to only require auth for certain routes.
|
|
1435
|
+
|
|
1436
|
+
|
|
1306
1437
|
log: {
|
|
1307
1438
|
level: 'debug', // Capture all log levels
|
|
1308
1439
|
logToFile: '/var/log/my-mcp-server.log',
|
|
@@ -1310,9 +1441,28 @@ const parser = ArgParser.withMcp({
|
|
|
1310
1441
|
}
|
|
1311
1442
|
// LEGACY: logPath: '/var/log/my-mcp-server.log' // Still works
|
|
1312
1443
|
}
|
|
1444
|
+
|
|
1445
|
+
### Adding custom HTTP routes (e.g., /health)
|
|
1446
|
+
|
|
1447
|
+
Use the httpServer.configureExpress(app) hook to register routes before MCP endpoints are bound. Example:
|
|
1448
|
+
|
|
1449
|
+
```ts
|
|
1450
|
+
const cli = ArgParser.withMcp({
|
|
1451
|
+
mcp: {
|
|
1452
|
+
serverInfo: { name: "my-mcp", version: "1.0.0" },
|
|
1453
|
+
defaultTransports: [
|
|
1454
|
+
{ type: "streamable-http", port: 3002, path: "/api/mcp", auth: { required: true, publicPaths: ["/health"] } }
|
|
1455
|
+
],
|
|
1456
|
+
httpServer: { configureExpress: (app) => app.get("/health", (_req, res) => res.json({ ok: true })) },
|
|
1457
|
+
}
|
|
1313
1458
|
});
|
|
1459
|
+
```
|
|
1460
|
+
|
|
1461
|
+
- To make a route public (no auth), add it to auth.publicPaths.
|
|
1462
|
+
- CORS headers for non-MCP paths can be applied by your own middleware inside the hook if desired.
|
|
1463
|
+
|
|
1464
|
+
### Multiple transports and improved logging
|
|
1314
1465
|
|
|
1315
|
-
# Multiple transports and improved logging (configured via --s-mcp-serve system flag)
|
|
1316
1466
|
const cli = ArgParser.withMcp({
|
|
1317
1467
|
appName: 'multi-tool',
|
|
1318
1468
|
appCommandName: 'multi-tool',
|
|
@@ -1914,6 +2064,19 @@ ArgParser includes built-in `--s-*` flags for development, debugging, and config
|
|
|
1914
2064
|
|
|
1915
2065
|
## Changelog
|
|
1916
2066
|
|
|
2067
|
+
### v2.7.0
|
|
2068
|
+
|
|
2069
|
+
**Feat**
|
|
2070
|
+
|
|
2071
|
+
**MCP**:
|
|
2072
|
+
|
|
2073
|
+
- Add support for CORS and authentication options, enabling powerful tools to serve Web UIs and publicly exposed APIs
|
|
2074
|
+
- Add supports for configuring express by exposing the app before it runs
|
|
2075
|
+
|
|
2076
|
+
**CLI**:
|
|
2077
|
+
|
|
2078
|
+
- Add support for NOT automatically executing the CLI if the script is imported, but will execute if called directly as a CLI. This enables use cases such as programmatically loading the CLI and scanning for tools or testing it from another script via the --s-enable-fuzzy flag or your own script.
|
|
2079
|
+
|
|
1917
2080
|
### v2.6.0
|
|
1918
2081
|
|
|
1919
2082
|
**Feat**
|
package/dist/core/ArgParser.d.ts
CHANGED
|
@@ -7,12 +7,41 @@ import type { IFlag, IHandlerContext, OutputSchemaConfig } from "./types";
|
|
|
7
7
|
/**
|
|
8
8
|
* Configuration for a single MCP transport
|
|
9
9
|
*/
|
|
10
|
+
export type CorsOptions = {
|
|
11
|
+
origins?: "*" | string | RegExp | Array<string | RegExp>;
|
|
12
|
+
methods?: string[];
|
|
13
|
+
headers?: string[];
|
|
14
|
+
exposedHeaders?: string[];
|
|
15
|
+
credentials?: boolean;
|
|
16
|
+
maxAge?: number;
|
|
17
|
+
};
|
|
18
|
+
export type JwtVerifyOptions = {
|
|
19
|
+
algorithms?: ("HS256" | "RS256")[];
|
|
20
|
+
secret?: string;
|
|
21
|
+
publicKey?: string;
|
|
22
|
+
getPublicKey?: (header: Record<string, unknown>, payload: Record<string, unknown>) => Promise<string> | string;
|
|
23
|
+
audience?: string | string[];
|
|
24
|
+
issuer?: string | string[];
|
|
25
|
+
clockToleranceSec?: number;
|
|
26
|
+
};
|
|
27
|
+
export type AuthOptions = {
|
|
28
|
+
required?: boolean;
|
|
29
|
+
scheme?: "bearer" | "jwt";
|
|
30
|
+
allowedTokens?: string[];
|
|
31
|
+
validator?: (req: any, token: string | undefined) => boolean | Promise<boolean>;
|
|
32
|
+
jwt?: JwtVerifyOptions;
|
|
33
|
+
publicPaths?: string[];
|
|
34
|
+
protectedPaths?: string[];
|
|
35
|
+
customMiddleware?: (req: any, res: any, next: any) => any;
|
|
36
|
+
};
|
|
10
37
|
export type McpTransportConfig = {
|
|
11
38
|
type: "stdio" | "sse" | "streamable-http";
|
|
12
39
|
port?: number;
|
|
13
40
|
host?: string;
|
|
14
41
|
path?: string;
|
|
15
42
|
sessionIdGenerator?: () => string;
|
|
43
|
+
cors?: CorsOptions;
|
|
44
|
+
auth?: AuthOptions;
|
|
16
45
|
};
|
|
17
46
|
/**
|
|
18
47
|
* Configuration options for MCP sub-command
|
|
@@ -100,6 +129,9 @@ export type DxtOptions = {
|
|
|
100
129
|
* MCP server configuration options for withMcp() method
|
|
101
130
|
* This centralizes MCP server metadata that was previously scattered across addMcpSubCommand calls
|
|
102
131
|
*/
|
|
132
|
+
export type HttpServerOptions = {
|
|
133
|
+
configureExpress?: (app: any) => void;
|
|
134
|
+
};
|
|
103
135
|
export type McpServerOptions = {
|
|
104
136
|
/** MCP server metadata */
|
|
105
137
|
serverInfo?: DxtServerInfo;
|
|
@@ -141,6 +173,8 @@ export type McpServerOptions = {
|
|
|
141
173
|
lifecycle?: McpLifecycleEvents;
|
|
142
174
|
/** DXT package configuration options */
|
|
143
175
|
dxt?: DxtOptions;
|
|
176
|
+
/** Optional HTTP server configuration hooks */
|
|
177
|
+
httpServer?: HttpServerOptions;
|
|
144
178
|
};
|
|
145
179
|
/**
|
|
146
180
|
* Combined options for withMcp() method
|
|
@@ -384,6 +418,8 @@ export declare class ArgParser<THandlerReturn = any> extends ArgParserBase<THand
|
|
|
384
418
|
host?: string;
|
|
385
419
|
path?: string;
|
|
386
420
|
sessionIdGenerator?: () => string;
|
|
421
|
+
cors?: CorsOptions;
|
|
422
|
+
auth?: AuthOptions;
|
|
387
423
|
}>, toolOptions?: GenerateMcpToolsOptions, logPath?: LogPath): Promise<void>;
|
|
388
424
|
/**
|
|
389
425
|
* Start an MCP server with a specific transport type
|
|
@@ -402,6 +438,8 @@ export declare class ArgParser<THandlerReturn = any> extends ArgParserBase<THand
|
|
|
402
438
|
host?: string;
|
|
403
439
|
path?: string;
|
|
404
440
|
sessionIdGenerator?: () => string;
|
|
441
|
+
cors?: CorsOptions;
|
|
442
|
+
auth?: AuthOptions;
|
|
405
443
|
}, toolOptions?: GenerateMcpToolsOptions, logPath?: LogPath): Promise<void>;
|
|
406
444
|
parse(processArgs?: string[], options?: any): Promise<any>;
|
|
407
445
|
/**
|
|
@@ -417,6 +455,28 @@ export declare class ArgParser<THandlerReturn = any> extends ArgParserBase<THand
|
|
|
417
455
|
* @deprecated Use parse() instead. This method will be removed in a future version.
|
|
418
456
|
*/
|
|
419
457
|
parseAsync(processArgs?: string[], options?: any): Promise<any>;
|
|
458
|
+
/**
|
|
459
|
+
* Convenience method for auto-execution: only runs if the script is executed directly (not imported).
|
|
460
|
+
* This eliminates the need for boilerplate code to check if the script is being run directly.
|
|
461
|
+
*
|
|
462
|
+
* @param importMetaUrl Pass import.meta.url from your script for reliable detection
|
|
463
|
+
* @param processArgs Optional arguments to parse (defaults to process.argv.slice(2))
|
|
464
|
+
* @param options Additional parse options
|
|
465
|
+
* @returns Promise that resolves to the parse result, or empty object if script is imported
|
|
466
|
+
*
|
|
467
|
+
* @example
|
|
468
|
+
* ```typescript
|
|
469
|
+
* // At the bottom of your CLI script:
|
|
470
|
+
* await cli.parseIfExecutedDirectly(import.meta.url);
|
|
471
|
+
*
|
|
472
|
+
* // With error handling:
|
|
473
|
+
* await cli.parseIfExecutedDirectly(import.meta.url).catch((error) => {
|
|
474
|
+
* console.error("Fatal error:", error instanceof Error ? error.message : String(error));
|
|
475
|
+
* process.exit(1);
|
|
476
|
+
* });
|
|
477
|
+
* ```
|
|
478
|
+
*/
|
|
479
|
+
parseIfExecutedDirectly(importMetaUrl: string, processArgs?: string[], options?: any): Promise<any>;
|
|
420
480
|
/**
|
|
421
481
|
* Add an MCP sub-command that starts an MCP server exposing this parser's functionality
|
|
422
482
|
* @param subCommandName Name of the sub-command (default: "mcp-server")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArgParser.d.ts","sourceRoot":"","sources":["../../src/core/ArgParser.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAC;AAOzC,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EAClB,MAAM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GAAG,SAAS,EAClC,UAAU,EAAE,aAAa,EACzB,OAAO,CAAC,EAAE,oBAAoB,GAAG;QAAE,WAAW,CAAC,EAAE,uBAAuB,CAAA;KAAE,GACzE,IAAI;IAEP;;;;;;;OAOG;IACI,gBAAgB,CACrB,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,UAAU,EAAE,aAAa,EACzB,WAAW,CAAC,EAAE,uBAAuB,GACpC,IAAI;IAqLP;;;;;;;;OAQG;WACW,OAAO,CAAC,CAAC,GAAG,GAAG,EAC3B,OAAO,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,EAC3B,YAAY,CAAC,EAAE,SAAS,KAAK,EAAE,GAC9B,SAAS,CAAC,CAAC,CAAC;IAoBf;;;OAGG;WACW,MAAM,CAAC,CAAC,GAAG,GAAG,EAC1B,OAAO,CAAC,EAAE,qBAAqB,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,EACxD,YAAY,CAAC,EAAE,qBAAqB,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,GAC5D,SAAS,CAAC,CAAC,CAAC;IASf;;;OAGG;WACW,UAAU,CAAC,CAAC,GAAG,GAAG,EAC9B,OAAO,CAAC,EAAE,qBAAqB,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,EACxD,YAAY,CAAC,EAAE,qBAAqB,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,GAC5D,SAAS,CAAC,CAAC,CAAC;WASD,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;CA+B7E"}
|
|
@@ -98,6 +98,19 @@ export interface IParseOptions {
|
|
|
98
98
|
* @internal
|
|
99
99
|
*/
|
|
100
100
|
isMcp?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* When true, automatically executes the CLI if the script is being run directly (not imported).
|
|
103
|
+
* When false, disables auto-execution detection even if importMetaUrl is provided.
|
|
104
|
+
* Uses robust detection that works across different environments and sandboxes.
|
|
105
|
+
* Only takes effect when importMetaUrl is also provided.
|
|
106
|
+
* @default true (when importMetaUrl is provided)
|
|
107
|
+
*/
|
|
108
|
+
autoExecute?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* The import.meta.url from the calling script, required for reliable auto-execution detection.
|
|
111
|
+
* Only used when autoExecute is true.
|
|
112
|
+
*/
|
|
113
|
+
importMetaUrl?: string;
|
|
101
114
|
}
|
|
102
115
|
type TParsedArgsWithRouting<T = any> = T & {
|
|
103
116
|
$commandChain?: string[];
|
|
@@ -137,6 +150,13 @@ export declare class ArgParserBase<THandlerReturn = any> {
|
|
|
137
150
|
*/
|
|
138
151
|
setHandler(handler: (ctx: IHandlerContext<any, any>) => THandlerReturn | Promise<THandlerReturn>): this;
|
|
139
152
|
printAll(filePath?: string): void;
|
|
153
|
+
/**
|
|
154
|
+
* Detects if the current script is being executed directly (not imported)
|
|
155
|
+
* Uses a robust method that works across different environments and sandboxes
|
|
156
|
+
* @param importMetaUrl The import.meta.url from the calling script (optional)
|
|
157
|
+
* @returns true if the script is being executed directly, false if imported
|
|
158
|
+
*/
|
|
159
|
+
private static isExecutedDirectly;
|
|
140
160
|
parse(processArgs?: string[], options?: IParseOptions): Promise<TParsedArgsWithRouting<any> | ParseResult>;
|
|
141
161
|
/**
|
|
142
162
|
* Alias for parse() method for backward compatibility
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArgParserBase.d.ts","sourceRoot":"","sources":["../../src/core/ArgParserBase.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ArgParserBase.d.ts","sourceRoot":"","sources":["../../src/core/ArgParserBase.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,aAAa,EACb,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EACL,iBAAiB,EACjB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