@jxsuite/server 0.31.0 → 0.31.1
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.
- package/package.json +6 -6
- package/src/packages.ts +11 -1
- package/src/studio-api.ts +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jxsuite/server",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.1",
|
|
4
4
|
"description": "Jx development server with live reload, server-side proxy, and studio integration",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@anthropic-ai/claude-agent-sdk": "^0.3.190",
|
|
33
33
|
"@anthropic-ai/sdk": "^0.105.0",
|
|
34
|
-
"@jxsuite/compiler": "^0.31.
|
|
35
|
-
"@jxsuite/create": "^0.31.
|
|
36
|
-
"@jxsuite/parser": "^0.31.
|
|
37
|
-
"@jxsuite/runtime": "^0.31.
|
|
38
|
-
"@jxsuite/schema": "^0.31.
|
|
34
|
+
"@jxsuite/compiler": "^0.31.1",
|
|
35
|
+
"@jxsuite/create": "^0.31.1",
|
|
36
|
+
"@jxsuite/parser": "^0.31.1",
|
|
37
|
+
"@jxsuite/runtime": "^0.31.1",
|
|
38
|
+
"@jxsuite/schema": "^0.31.1",
|
|
39
39
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
40
40
|
"chokidar": "^5.0.0",
|
|
41
41
|
"zod": "^4.4.3"
|
package/src/packages.ts
CHANGED
|
@@ -94,8 +94,18 @@ export function dependenciesNeedInstall(root: string): boolean {
|
|
|
94
94
|
return !existsSync(resolve(root, "node_modules"));
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Path to the bun executable. Uses the bun running the current process (`process.execPath`) so a
|
|
99
|
+
* packaged desktop app spawns the bun bundled with its Electrobun distribution rather than relying
|
|
100
|
+
* on a system-wide `bun` in `$PATH` (which end users may not have). Falls back to a PATH lookup if
|
|
101
|
+
* `execPath` is somehow unset.
|
|
102
|
+
*/
|
|
103
|
+
export function bunExecutable(): string {
|
|
104
|
+
return process.execPath || "bun";
|
|
105
|
+
}
|
|
106
|
+
|
|
97
107
|
async function runBun(args: string[], cwd: string): Promise<PackageOpResult> {
|
|
98
|
-
const proc = Bun.spawn([
|
|
108
|
+
const proc = Bun.spawn([bunExecutable(), ...args], { cwd, stderr: "pipe", stdout: "pipe" });
|
|
99
109
|
const [stdout, stderr, exitCode] = await Promise.all([
|
|
100
110
|
new Response(proc.stdout).text(),
|
|
101
111
|
new Response(proc.stderr).text(),
|
package/src/studio-api.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { existsSync, readFileSync, statSync } from "node:fs";
|
|
|
14
14
|
import { buildProjectFormatRegistry } from "@jxsuite/compiler/format-host";
|
|
15
15
|
import { applyRename } from "./refactor/apply.ts";
|
|
16
16
|
import {
|
|
17
|
+
bunExecutable,
|
|
17
18
|
dependenciesNeedInstall,
|
|
18
19
|
installDependencies,
|
|
19
20
|
outdatedPackages,
|
|
@@ -763,7 +764,7 @@ export async function handleStudioApi(
|
|
|
763
764
|
if (body.dev) {
|
|
764
765
|
args.splice(1, 0, "-d");
|
|
765
766
|
}
|
|
766
|
-
const proc = Bun.spawn([
|
|
767
|
+
const proc = Bun.spawn([bunExecutable(), ...args], {
|
|
767
768
|
cwd,
|
|
768
769
|
stderr: "pipe",
|
|
769
770
|
stdout: "pipe",
|
|
@@ -792,7 +793,7 @@ export async function handleStudioApi(
|
|
|
792
793
|
}
|
|
793
794
|
const dir = body.dir || activeProjectRoot;
|
|
794
795
|
const cwd = dir ? (isAbsolute(dir) ? dir : resolve(root, dir)) : root;
|
|
795
|
-
const proc = Bun.spawn([
|
|
796
|
+
const proc = Bun.spawn([bunExecutable(), "remove", name], {
|
|
796
797
|
cwd,
|
|
797
798
|
stderr: "pipe",
|
|
798
799
|
stdout: "pipe",
|