openspecui 0.4.0 → 0.6.1

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/cli.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { a as __commonJS, o as __toESM, t as startServer } from "./src-BS3LYQ6T.mjs";
2
+ import { a as __commonJS, o as __toESM, t as startServer } from "./src-IryZbu1Z.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { fileURLToPath } from "url";
5
5
  import { basename, dirname, extname, join, normalize, relative, resolve } from "path";
6
6
  import { dirname as dirname$1, join as join$1, resolve as resolve$1 } from "node:path";
7
7
  import { readFileSync, readdirSync } from "node:fs";
8
8
  import { readFileSync as readFileSync$1, readdirSync as readdirSync$1, statSync as statSync$1, writeFile } from "fs";
9
+ import { format, inspect } from "util";
9
10
  import { fileURLToPath as fileURLToPath$1 } from "node:url";
10
11
  import { notStrictEqual, strictEqual } from "assert";
11
- import { format, inspect } from "util";
12
12
 
13
13
  //#region ../../node_modules/.pnpm/cliui@9.0.1/node_modules/cliui/build/lib/index.js
14
14
  const align = {
@@ -4517,10 +4517,11 @@ function getVersion() {
4517
4517
  }
4518
4518
  async function main() {
4519
4519
  const originalCwd = process.env.INIT_CWD || process.cwd();
4520
- const argv = await yargs_default(hideBin(process.argv)).scriptName("openspecui").usage("$0 [project-dir]", "Visual interface for spec-driven development").positional("project-dir", {
4521
- describe: "Project directory containing openspec/",
4522
- type: "string",
4523
- default: process.cwd()
4520
+ const argv = await yargs_default(hideBin(process.argv)).scriptName("openspecui").usage("$0 [project-dir]", "Visual interface for spec-driven development", (yargs) => {
4521
+ return yargs.positional("project-dir", {
4522
+ describe: "Project directory containing openspec/",
4523
+ type: "string"
4524
+ });
4524
4525
  }).option("port", {
4525
4526
  alias: "p",
4526
4527
  describe: "Port to run the server on",
@@ -4529,14 +4530,13 @@ async function main() {
4529
4530
  }).option("dir", {
4530
4531
  alias: "d",
4531
4532
  describe: "Project directory containing openspec/",
4532
- type: "string",
4533
- default: process.cwd()
4533
+ type: "string"
4534
4534
  }).option("open", {
4535
4535
  describe: "Automatically open the browser",
4536
4536
  type: "boolean",
4537
4537
  default: true
4538
- }).example("$0", "Start in current directory").example("$0 ./my-project", "Start with specific project").example("$0 -p 8080", "Start on custom port").example("$0 --no-open", "Start without opening browser").version(getVersion()).alias("v", "version").help().alias("h", "help").strict().parse();
4539
- const projectDir = resolve$1(originalCwd, argv._[0]?.toString() || argv.dir);
4538
+ }).example("$0", "Start in current directory").example("$0 ./my-project", "Start with specific project").example("$0 -p 8080", "Start on custom port").example("$0 --dir=./my-project", "Start with specific project").example("$0 --no-open", "Start without opening browser").version(getVersion()).alias("v", "version").help().alias("h", "help").parse();
4539
+ const projectDir = resolve$1(originalCwd, argv["project-dir"] || argv.dir || ".");
4540
4540
  console.log(`
4541
4541
  ┌─────────────────────────────────────────────┐
4542
4542
  │ OpenSpec UI │
@@ -4544,7 +4544,6 @@ async function main() {
4544
4544
  └─────────────────────────────────────────────┘
4545
4545
  `);
4546
4546
  console.log(`📁 Project: ${projectDir}`);
4547
- console.log(`🔌 Port: ${argv.port}`);
4548
4547
  console.log("");
4549
4548
  try {
4550
4549
  const server = await startServer({
@@ -4552,10 +4551,11 @@ async function main() {
4552
4551
  port: argv.port,
4553
4552
  open: argv.open
4554
4553
  });
4554
+ if (server.port !== server.preferredPort) console.log(`⚠️ Port ${server.preferredPort} is in use, using ${server.port} instead`);
4555
4555
  console.log(`✅ Server running at ${server.url}`);
4556
4556
  console.log("");
4557
4557
  if (argv.open) {
4558
- await (await import("./open-Cw_l4kh9.mjs")).default(server.url);
4558
+ await (await import("./open-BTGRjBxH.mjs")).default(server.url);
4559
4559
  console.log("🌐 Browser opened");
4560
4560
  }
4561
4561
  console.log("");
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { i as ACPAgents, n as createServer, r as ProviderManager, t as startServer } from "./src-BS3LYQ6T.mjs";
1
+ import { i as ACPAgents, n as createServer, r as ProviderManager, t as startServer } from "./src-IryZbu1Z.mjs";
2
2
 
3
3
  export { ACPAgents, ProviderManager, createServer, startServer };
@@ -1,12 +1,12 @@
1
1
  import fs, { constants } from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import fs$1 from "node:fs";
4
+ import os from "node:os";
4
5
  import { fileURLToPath } from "node:url";
5
6
  import process from "node:process";
6
7
  import { Buffer } from "node:buffer";
7
8
  import { promisify } from "node:util";
8
9
  import childProcess, { execFile } from "node:child_process";
9
- import os from "node:os";
10
10
 
11
11
  //#region ../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js
12
12
  let isDockerCached;