@agentconnect/cli 0.2.6 → 0.2.8
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.js +11 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -476,6 +476,8 @@ Dev options:
|
|
|
476
476
|
--port <port> Port to bind (default: 9630)
|
|
477
477
|
--app <path> App path (optional)
|
|
478
478
|
--ui <url> UI dev server URL (optional)
|
|
479
|
+
--log-spawn Log provider command spawns
|
|
480
|
+
--debug Enable debug host logs
|
|
479
481
|
|
|
480
482
|
Pack options:
|
|
481
483
|
--app <path> App directory (default: cwd)
|
|
@@ -510,6 +512,9 @@ function parsePort(value, fallback) {
|
|
|
510
512
|
const parsed = Number(value);
|
|
511
513
|
return Number.isFinite(parsed) ? parsed : fallback;
|
|
512
514
|
}
|
|
515
|
+
function hasFlag(name, alias) {
|
|
516
|
+
return args.includes(name) || (alias ? args.includes(alias) : false);
|
|
517
|
+
}
|
|
513
518
|
async function main() {
|
|
514
519
|
if (!command || command === "--help" || command === "-h") {
|
|
515
520
|
console.log(helpText);
|
|
@@ -520,7 +525,12 @@ async function main() {
|
|
|
520
525
|
const port = parsePort(getFlag("--port", "-p"), 9630);
|
|
521
526
|
const appPath = getFlag("--app", "-a") ?? void 0;
|
|
522
527
|
const uiUrl = getFlag("--ui", "-u") ?? void 0;
|
|
523
|
-
|
|
528
|
+
const logSpawn = hasFlag("--log-spawn");
|
|
529
|
+
const debug = hasFlag("--debug");
|
|
530
|
+
if (debug && !process.env.AGENTCONNECT_DEBUG) {
|
|
531
|
+
process.env.AGENTCONNECT_DEBUG = "1";
|
|
532
|
+
}
|
|
533
|
+
startDevHost({ host, port, appPath, uiUrl, logSpawn });
|
|
524
534
|
return null;
|
|
525
535
|
}
|
|
526
536
|
if (command === "pack") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentconnect/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/rayzhudev/agent-connect",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dev": "tsc --watch"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@agentconnect/host": "^0.2.
|
|
35
|
+
"@agentconnect/host": "^0.2.8",
|
|
36
36
|
"ajv": "^8.17.1",
|
|
37
37
|
"yauzl": "^2.10.0",
|
|
38
38
|
"yazl": "^2.5.1"
|