Skip to content

Commit b90fd80

Browse files
committed
fix: use tsx
1 parent 3d8522c commit b90fd80

9 files changed

Lines changed: 15 additions & 20 deletions

File tree

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"test:packages": "vp run -r test",
2525
"build": "vp run -r build",
2626
"build:packages": "vp run -r build",
27-
"server:start": "node --conditions=development --experimental-transform-types packages/agent/src/index.ts serve",
27+
"server:start": "tsx --conditions=development packages/agent/src/index.ts serve",
2828
"server:dev": "node scripts/dev/server.mjs",
2929
"desktop:build": "pnpm --filter @codeworksh/desktop build",
3030
"desktop:start": "pnpm --filter @codeworksh/desktop start",
@@ -42,7 +42,7 @@
4242
"devDependencies": {
4343
"@types/node": "^24.12.2",
4444
"@typescript/native-preview": "7.0.0-dev.20260328.1",
45-
"typebox": "^1.1.37",
45+
"tsx": "^4.21.0",
4646
"typescript": "^5.9.3",
4747
"vite-plus": "0.1.17"
4848
},

‎packages/agent/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"test": "vp test",
3535
"check": "vp check",
3636
"lint": "vp lint",
37-
"cli": "node --conditions=development --experimental-transform-types src/index.ts",
38-
"openapi": "node --conditions=development --experimental-transform-types scripts/openapi.ts && vp fmt openapi.json"
37+
"cli": "tsx --conditions=development src/index.ts",
38+
"openapi": "tsx --conditions=development scripts/openapi.ts && vp fmt openapi.json"
3939
},
4040
"dependencies": {
4141
"@codeworksh/aikit": "workspace:*",

‎packages/agent/src/cli/cmd/run.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { pathToFileURL } from "node:url";
99
import { createCodeWorkClient, type CodeWorkSdkClient } from "@codeworksh/sdk";
1010
import { Server } from "../../server/server.ts";
1111
import { bootstrap } from "../bootstrap.ts";
12-
import { Runtime } from "../../config/runtime";
12+
import { Runtime } from "../../config/runtime.ts";
1313

1414
interface RunArgs extends ArgumentsCamelCase {
1515
args: string[];

‎packages/agent/src/sandbox/builtin.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Bash, InMemoryFs, ReadWriteFs, MountableFs } from "just-bash";
2-
import { Sandbox } from "./sandbox";
2+
import { Sandbox } from "./sandbox.ts";
33
import { randomUUID } from "node:crypto";
44
import nodeFs from "node:fs/promises";
55
import path from "node:path";

‎packages/agent/src/sandbox/sandbox.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Type from "typebox";
2-
import { Log } from "../util/log";
2+
import { Log } from "../util/log.ts";
33
import { Filesystem } from "@codeworksh/utils";
44
import { NamedError } from "@codeworksh/utils";
55
import { Process } from "../util/process.ts";

‎packages/agent/src/workspace/context.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Context } from "../util/context.ts";
2-
import { type Sandbox } from "../sandbox/sandbox";
2+
import { type Sandbox } from "../sandbox/sandbox.ts";
33

44
interface Context {
55
workspaceId: string;

‎packages/sdk/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"build": "vp pack",
3838
"bump": "bumpp",
3939
"check": "vp check",
40-
"generate": "openapi-ts && node --experimental-transform-types scripts/postgenerate.ts && vp fmt",
40+
"generate": "openapi-ts && tsx scripts/postgenerate.ts && vp fmt",
4141
"lint": "vp lint"
4242
},
4343
"dependencies": {

‎pnpm-lock.yaml‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎scripts/dev/server.mjs‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,9 @@ import process, { loadEnvFile } from "node:process";
55

66
const cwd = process.cwd();
77
const entry = path.join(cwd, "packages/agent/src/index.ts");
8+
const tsxBin = path.join(cwd, "node_modules", ".bin", process.platform === "win32" ? "tsx.cmd" : "tsx");
89
const watchRoot = path.join(cwd, "packages/agent/src");
9-
const childArgs = [
10-
"--conditions=development",
11-
"--experimental-transform-types",
12-
entry,
13-
"serve",
14-
...process.argv.slice(2),
15-
];
10+
const childArgs = ["--conditions=development", entry, "serve", ...process.argv.slice(2)];
1611
const pollIntervalMs = 250;
1712
const restartDebounceMs = 120;
1813

@@ -53,7 +48,7 @@ async function snapshotTree() {
5348
}
5449

5550
function startChild() {
56-
child = spawn(process.execPath, childArgs, {
51+
child = spawn(tsxBin, childArgs, {
5752
cwd,
5853
stdio: "inherit",
5954
});

0 commit comments

Comments
 (0)