tarsk 0.3.23 → 0.3.25

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 +4 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -7,8 +7,8 @@ import { Hono as Hono10 } from "hono";
7
7
  import { cors } from "hono/cors";
8
8
  import { serve } from "@hono/node-server";
9
9
  import { serveStatic } from "@hono/node-server/serve-static";
10
- import { exec } from "child_process";
11
10
  import path from "path";
11
+ import open2 from "open";
12
12
  import { fileURLToPath as fileURLToPath2 } from "url";
13
13
 
14
14
  // src/managers/project-manager.ts
@@ -5155,8 +5155,8 @@ serve({
5155
5155
  fetch: app.fetch,
5156
5156
  port
5157
5157
  }, () => {
5158
- if (shouldOpenBrowser) {
5159
- const start = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
5160
- exec(`${start} ${url}`);
5158
+ const isDevelopment = process.env.MODE === "development";
5159
+ if (shouldOpenBrowser || !isDevelopment) {
5160
+ open2(url).catch(() => {});
5161
5161
  }
5162
5162
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tarsk",
3
- "version": "0.3.23",
3
+ "version": "0.3.25",
4
4
  "description": "CLI for Tarsk - Project Threads Manager",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,7 +17,7 @@
17
17
  "scripts": {
18
18
  "dev": "NODE_ENV=development tsx watch src/index.ts",
19
19
  "build": "rm -rf dist && mkdir -p dist && bun build src/index.ts --outfile=dist/index.js --target=node --format=esm --external=hono --external=@hono/node-server --external=open --external=@neovate/code && cp src/scaffold-templates.json dist/",
20
- "start": "bun run build &&NODE_ENV=development node dist/index.js --debug",
20
+ "start": "bun run build && MODE=development node dist/index.js --debug",
21
21
  "lint": "eslint .",
22
22
  "test": "vitest run"
23
23
  },