@alcyone-labs/arg-parser 2.13.2 → 2.13.4
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/index.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.min.mjs +425 -424
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/dist/tui/index.d.ts +292 -0
- package/dist/tui.cjs +1078 -0
- package/dist/tui.cjs.map +1 -0
- package/dist/tui.mjs +1052 -0
- package/dist/tui.mjs.map +1 -0
- package/package.json +15 -3
package/dist/index.cjs
CHANGED
|
@@ -29,6 +29,7 @@ const dotenv = require("dotenv");
|
|
|
29
29
|
const magicRegexp = require("magic-regexp");
|
|
30
30
|
const simpleMcpLogger = require("@alcyone-labs/simple-mcp-logger");
|
|
31
31
|
const getTsconfig = require("get-tsconfig");
|
|
32
|
+
const os = require("node:os");
|
|
32
33
|
const zod = require("zod");
|
|
33
34
|
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
34
35
|
function _interopNamespaceDefault(e) {
|
|
@@ -49,6 +50,7 @@ function _interopNamespaceDefault(e) {
|
|
|
49
50
|
}
|
|
50
51
|
const fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs);
|
|
51
52
|
const path__namespace = /* @__PURE__ */ _interopNamespaceDefault(path);
|
|
53
|
+
const os__namespace = /* @__PURE__ */ _interopNamespaceDefault(os);
|
|
52
54
|
const RESET$1 = "\x1B[0m";
|
|
53
55
|
const BOLD$1 = "\x1B[1m";
|
|
54
56
|
const DIM$1 = "\x1B[2m";
|
|
@@ -1267,7 +1269,7 @@ const _DxtPathResolver = class _DxtPathResolver {
|
|
|
1267
1269
|
}
|
|
1268
1270
|
const context = {
|
|
1269
1271
|
isDxt: this.isDxtEnvironment(),
|
|
1270
|
-
userHome: void 0,
|
|
1272
|
+
userHome: typeof os__namespace.homedir === "function" ? os__namespace.homedir() : void 0,
|
|
1271
1273
|
cwd: typeof process !== "undefined" && typeof process.cwd === "function" ? process.cwd() : void 0
|
|
1272
1274
|
};
|
|
1273
1275
|
const entryPoint = detectEntryPoint();
|
|
@@ -1370,7 +1372,7 @@ const _DxtPathResolver = class _DxtPathResolver {
|
|
|
1370
1372
|
* @returns Path with variables substituted
|
|
1371
1373
|
*/
|
|
1372
1374
|
static substituteVariables(inputPath, context, config) {
|
|
1373
|
-
const safeHomedir = () => "/tmp";
|
|
1375
|
+
const safeHomedir = () => typeof os__namespace.homedir === "function" ? os__namespace.homedir() : "/tmp";
|
|
1374
1376
|
const homeDir = context.userHome || safeHomedir();
|
|
1375
1377
|
const variables = {
|
|
1376
1378
|
// Standard DXT variables
|
|
@@ -1421,7 +1423,7 @@ const _DxtPathResolver = class _DxtPathResolver {
|
|
|
1421
1423
|
if (ctx.isDxt && ctx.extensionDir) {
|
|
1422
1424
|
return path__namespace.join(ctx.extensionDir, "data", filename);
|
|
1423
1425
|
} else {
|
|
1424
|
-
const safeHomedir = () => "/tmp";
|
|
1426
|
+
const safeHomedir = () => typeof os__namespace.homedir === "function" ? os__namespace.homedir() : "/tmp";
|
|
1425
1427
|
const userDataDir = process.env["XDG_DATA_HOME"] || path__namespace.join(ctx.userHome || safeHomedir(), ".local", "share");
|
|
1426
1428
|
const appName = this.getAppName(ctx);
|
|
1427
1429
|
return path__namespace.join(userDataDir, appName, filename);
|
|
@@ -1438,7 +1440,7 @@ const _DxtPathResolver = class _DxtPathResolver {
|
|
|
1438
1440
|
if (ctx.isDxt && ctx.extensionDir) {
|
|
1439
1441
|
return path__namespace.join(ctx.extensionDir, "temp", filename);
|
|
1440
1442
|
} else {
|
|
1441
|
-
const safeTmpdir = () => "/tmp";
|
|
1443
|
+
const safeTmpdir = () => typeof os__namespace.tmpdir === "function" ? os__namespace.tmpdir() : "/tmp";
|
|
1442
1444
|
const appName = this.getAppName(ctx);
|
|
1443
1445
|
return path__namespace.join(safeTmpdir(), appName, filename);
|
|
1444
1446
|
}
|
|
@@ -1454,7 +1456,7 @@ const _DxtPathResolver = class _DxtPathResolver {
|
|
|
1454
1456
|
if (ctx.isDxt && ctx.extensionDir) {
|
|
1455
1457
|
return path__namespace.join(ctx.extensionDir, "config", filename);
|
|
1456
1458
|
} else {
|
|
1457
|
-
const safeHomedir = () => "/tmp";
|
|
1459
|
+
const safeHomedir = () => typeof os__namespace.homedir === "function" ? os__namespace.homedir() : "/tmp";
|
|
1458
1460
|
const configDir = process.env["XDG_CONFIG_HOME"] || path__namespace.join(ctx.userHome || safeHomedir(), ".config");
|
|
1459
1461
|
const appName = this.getAppName(ctx);
|
|
1460
1462
|
return path__namespace.join(configDir, appName, filename);
|