@obrain/cli 0.1.7 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.js +13 -10
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -46199,17 +46199,20 @@ var startGatewayDaemon = async (gatewayUrl) => {
46199
46199
  if (config.daemon?.pid && isPidAlive(config.daemon.pid)) {
46200
46200
  return config.daemon.pid;
46201
46201
  }
46202
- const script = process.argv[1];
46202
+ const script = Bun.main || process.argv[1];
46203
46203
  if (!script) {
46204
46204
  throw new Error("Unable to determine CLI entrypoint for daemon startup.");
46205
46205
  }
46206
+ const cmd = [
46207
+ process.execPath,
46208
+ script,
46209
+ "daemon",
46210
+ "connect",
46211
+ `--gateway-url=${gatewayUrl}`
46212
+ ];
46213
+ console.log("Starting gateway daemon:", cmd.join(" "));
46206
46214
  const child = Bun.spawn({
46207
- cmd: [
46208
- script,
46209
- "daemon",
46210
- "connect",
46211
- `--gateway-url=${gatewayUrl}`
46212
- ],
46215
+ cmd,
46213
46216
  detached: true,
46214
46217
  stdin: "ignore",
46215
46218
  stdout: "ignore",
@@ -46218,7 +46221,7 @@ var startGatewayDaemon = async (gatewayUrl) => {
46218
46221
  });
46219
46222
  const startupResult = await Promise.race([
46220
46223
  child.exited.then((code) => ({ type: "exited", code })),
46221
- Bun.sleep(150).then(() => ({ type: "running" }))
46224
+ Bun.sleep(1000).then(() => ({ type: "running" }))
46222
46225
  ]);
46223
46226
  if (startupResult.type === "exited") {
46224
46227
  throw new Error(`Gateway daemon exited during startup with code ${startupResult.code}.`);
@@ -75932,8 +75935,8 @@ var statusCommand = {
75932
75935
  };
75933
75936
  // version.json
75934
75937
  var version_default = {
75935
- version: "0.1.7",
75936
- gitCommitHash: "4e74cd7057bd40a7cb214552f4d7787c2752905f"
75938
+ version: "0.1.8",
75939
+ gitCommitHash: "6d42906"
75937
75940
  };
75938
75941
 
75939
75942
  // src/commands/version.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obrain/cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -21,8 +21,8 @@
21
21
  "@types/yargs": "17.0.35",
22
22
  "bun-types": "^1.1.28",
23
23
  "@repo/better-auth": "0.0.0",
24
- "@repo/a2a": "0.0.0",
25
- "@repo/trpc": "0.0.0"
24
+ "@repo/trpc": "0.0.0",
25
+ "@repo/a2a": "0.0.0"
26
26
  },
27
27
  "scripts": {
28
28
  "build": "bun build src/index.ts --outfile dist/index.js --target bun",