@xdsjs/dossierx-daemon 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -4
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/cli.ts
4
- import { stat as stat4 } from "fs/promises";
4
+ import { mkdir as mkdir6, stat as stat4 } from "fs/promises";
5
5
  import os3 from "os";
6
6
  import path8 from "path";
7
7
  import { Command } from "commander";
@@ -786,7 +786,7 @@ function createTaskArchive(options) {
786
786
 
787
787
  // src/version.ts
788
788
  var DAEMON_PACKAGE_NAME = "@xdsjs/dossierx-daemon";
789
- var DAEMON_VERSION = "0.1.1";
789
+ var DAEMON_VERSION = "0.1.2";
790
790
 
791
791
  // src/local-api/server.ts
792
792
  var DEFAULT_MAX_FILE_BYTES = 5 * 1024 * 1024;
@@ -2259,7 +2259,14 @@ async function uninstallLaunchAgent(options = {}) {
2259
2259
  }
2260
2260
 
2261
2261
  // src/cli.ts
2262
- async function assertWorkspaceExists(workspace) {
2262
+ async function ensureWorkspaceDirectory(workspace) {
2263
+ await mkdir6(workspace, { recursive: true }).catch(async (error) => {
2264
+ const stats2 = await stat4(workspace).catch(() => null);
2265
+ if (!stats2?.isDirectory()) {
2266
+ throw new Error("Workspace path is not a directory");
2267
+ }
2268
+ throw error;
2269
+ });
2263
2270
  const stats = await stat4(workspace);
2264
2271
  if (!stats.isDirectory()) {
2265
2272
  throw new Error("Workspace path is not a directory");
@@ -2348,7 +2355,7 @@ async function runDaemon(options) {
2348
2355
  );
2349
2356
  }
2350
2357
  const workspaceRoot = path8.resolve(expandHomePath(workspacePath3));
2351
- await assertWorkspaceExists(workspaceRoot);
2358
+ await ensureWorkspaceDirectory(workspaceRoot);
2352
2359
  const capabilities = await detectCapabilities();
2353
2360
  const investWiki = createInvestWikiRunnerFromOptions(runtimeOptions);
2354
2361
  const codex = createCodexRunnerFromOptions(runtimeOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xdsjs/dossierx-daemon",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -28,8 +28,8 @@
28
28
  "execa": "^9.0.0",
29
29
  "pino": "^10.0.0",
30
30
  "zod": "^4.0.0",
31
- "@xdsjs/dossierx-shared": "^0.1.1",
32
- "@xdsjs/dossierx-workspace": "^0.1.0"
31
+ "@xdsjs/dossierx-workspace": "^0.1.0",
32
+ "@xdsjs/dossierx-shared": "^0.1.1"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "^24.0.0",