openspecui 1.0.2 → 1.0.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/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as SchemaInfoSchema, c as CliExecutor, d as __commonJS, f as __toESM, i as SchemaDetailSchema, l as ConfigManager, o as SchemaResolutionSchema, r as require_dist, s as TemplatesSchema, t as startServer, u as OpenSpecAdapter } from "./src-CG4m4lBD.mjs";
2
+ import { a as SchemaInfoSchema, c as CliExecutor, d as __commonJS, f as __toESM, i as SchemaDetailSchema, l as ConfigManager, o as SchemaResolutionSchema, r as require_dist, s as TemplatesSchema, t as startServer, u as OpenSpecAdapter } from "./src-D5eBKdVF.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";
@@ -4505,7 +4505,7 @@ var yargs_default = Yargs;
4505
4505
 
4506
4506
  //#endregion
4507
4507
  //#region package.json
4508
- var version = "1.0.2";
4508
+ var version = "1.0.3";
4509
4509
  var devDependencies = {
4510
4510
  "@hono/node-server": "^1.14.1",
4511
4511
  "@openspecui/server": "workspace:*",
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { n as createServer, t as startServer } from "./src-CG4m4lBD.mjs";
1
+ import { n as createServer, t as startServer } from "./src-D5eBKdVF.mjs";
2
2
 
3
3
  export { createServer, startServer };
@@ -5,7 +5,7 @@ import { Readable } from "stream";
5
5
  import crypto from "crypto";
6
6
  import { EventEmitter } from "events";
7
7
  import { mkdir, readFile, rename, writeFile } from "fs/promises";
8
- import { join } from "path";
8
+ import { dirname, join } from "path";
9
9
  import { AsyncLocalStorage } from "node:async_hooks";
10
10
  import { mkdir as mkdir$1, readFile as readFile$1, readdir, rm, stat, writeFile as writeFile$1 } from "node:fs/promises";
11
11
  import { dirname as dirname$1, join as join$1, matchesGlob, relative as relative$1, resolve as resolve$1, sep } from "node:path";
@@ -14371,6 +14371,7 @@ var ConfigManager = class {
14371
14371
  }
14372
14372
  };
14373
14373
  const serialized = JSON.stringify(merged, null, 2);
14374
+ await mkdir(dirname(this.configPath), { recursive: true });
14374
14375
  await writeFile(this.configPath, serialized, "utf-8");
14375
14376
  updateReactiveFileCache(this.configPath, serialized);
14376
14377
  this.invalidateResolvedCliRunner();
@@ -14405,10 +14406,14 @@ var ConfigManager = class {
14405
14406
  const [resolvedCommand, ...resolvedArgs] = resolved.commandParts;
14406
14407
  const currentCommand = config.cli.command?.trim();
14407
14408
  const currentArgs = config.cli.args ?? [];
14408
- if (currentCommand !== resolvedCommand || currentArgs.length !== resolvedArgs.length || currentArgs.some((arg, index) => arg !== resolvedArgs[index])) await this.writeConfig({ cli: {
14409
- command: resolvedCommand,
14410
- args: resolvedArgs
14411
- } });
14409
+ if (currentCommand !== resolvedCommand || currentArgs.length !== resolvedArgs.length || currentArgs.some((arg, index) => arg !== resolvedArgs[index])) try {
14410
+ await this.writeConfig({ cli: {
14411
+ command: resolvedCommand,
14412
+ args: resolvedArgs
14413
+ } });
14414
+ } catch (err) {
14415
+ console.warn("Failed to persist auto-detected CLI command:", err);
14416
+ }
14412
14417
  }
14413
14418
  return resolved;
14414
14419
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openspecui",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "OpenSpec UI - Visual interface for spec-driven development",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -33,8 +33,8 @@
33
33
  "typescript": "^5.7.2",
34
34
  "vitest": "^2.1.8",
35
35
  "yargs": "^18.0.0",
36
- "@openspecui/server": "1.0.2",
37
- "@openspecui/web": "1.0.2"
36
+ "@openspecui/server": "1.0.3",
37
+ "@openspecui/web": "1.0.3"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "pnpm run build:web && pnpm run build:copy-web && tsdown",