Skip to content

Commit 0414051

Browse files
committed
fix build
1 parent 4e54f0b commit 0414051

4 files changed

Lines changed: 45 additions & 14 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
- 'src/**'
88
- 'package.json'
99
- 'build.ts'
10-
- 'build-npm.ts'
1110
- 'bun.lock'
1211
workflow_dispatch:
1312

@@ -36,9 +35,6 @@ jobs:
3635
- name: Build binaries for all platforms
3736
run: bun run build
3837

39-
- name: Build for npm (JavaScript bundle)
40-
run: bun run build:npm
41-
4238
- name: Get version from package.json
4339
id: package-version
4440
run: echo "version=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT

bin/effect-devtools

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
11
#!/usr/bin/env node
22

33
// Entry point for effect-devtools npm package
4-
// Runs the bundled JavaScript version
4+
// Runs the platform-specific compiled binary
55

66
import { fileURLToPath } from "url";
77
import { dirname, join } from "path";
8+
import { spawn } from "child_process";
9+
import { existsSync } from "fs";
810

911
const __filename = fileURLToPath(import.meta.url);
1012
const __dirname = dirname(__filename);
1113

12-
// Import and run the bundled app
13-
await import(join(__dirname, "..", "dist", "index.js"));
14+
const platform = process.platform === "win32" ? "windows" : process.platform;
15+
const arch = process.arch;
16+
const ext = process.platform === "win32" ? ".exe" : "";
17+
18+
const binaryName = `effect-devtools-${platform}-${arch}`;
19+
const binaryPath = join(__dirname, "..", "dist", binaryName, binaryName + ext);
20+
21+
if (!existsSync(binaryPath)) {
22+
console.error(`Binary not found for your platform: ${platform}-${arch}`);
23+
console.error(`Expected: ${binaryPath}`);
24+
console.error(`\nSupported platforms: linux-x64, darwin-x64, windows-x64`);
25+
process.exit(1);
26+
}
27+
28+
const child = spawn(binaryPath, process.argv.slice(2), {
29+
stdio: "inherit",
30+
});
31+
32+
child.on("close", (code) => {
33+
process.exit(code ?? 0);
34+
});

bun.lock

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "effect-devtui",
3-
"version": "0.2.2",
3+
"version": "0.2.3",
44
"description": "Terminal UI for Effect DevTools",
55
"keywords": [
66
"effect",
@@ -42,9 +42,9 @@
4242
"@effect/platform-bun": "^0.86.0",
4343
"@effect/platform-node": "^0.103.0",
4444
"@opentui/core": "^0.1.59",
45-
"@opentui/solid": "^0.1.59",
45+
"@opentui/solid": "^0.1.60",
4646
"effect": "^3.19.10",
47-
"solid-js": "^1.9.10",
47+
"solid-js": "1.9.9",
4848
"ws": "^8.18.3"
4949
},
5050
"devDependencies": {

0 commit comments

Comments
 (0)