@blaxel/core 0.2.57-dev.31 → 0.2.57-dev.32
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/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/sandbox/process/process.js +25 -22
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/sandbox/process/process.js +25 -22
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm/sandbox/process/process.js +25 -22
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/common/settings.js +2 -2
- package/dist/esm-browser/sandbox/process/process.js +25 -22
- package/package.json +1 -1
|
@@ -3,8 +3,8 @@ import { authentication } from "../authentication/index.js";
|
|
|
3
3
|
import { env } from "../common/env.js";
|
|
4
4
|
import { fs, os, path } from "../common/node.js";
|
|
5
5
|
// Build info - these placeholders are replaced at build time by build:replace-imports
|
|
6
|
-
const BUILD_VERSION = "0.2.57-dev.
|
|
7
|
-
const BUILD_COMMIT = "
|
|
6
|
+
const BUILD_VERSION = "0.2.57-dev.32";
|
|
7
|
+
const BUILD_COMMIT = "dd5f12817bd716653ab610c6a1e0bae65d1f53be";
|
|
8
8
|
const BUILD_SENTRY_DSN = "https://fd5e60e1c9820e1eef5ccebb84a07127@o4508714045276160.ingest.us.sentry.io/4510465864564736";
|
|
9
9
|
// Cache for config.yaml tracking value
|
|
10
10
|
let configTrackingValue = null;
|
|
@@ -134,7 +134,7 @@ export class SandboxProcess extends SandboxAction {
|
|
|
134
134
|
throw new Error(`Failed to execute process: ${errorText}`);
|
|
135
135
|
}
|
|
136
136
|
const contentType = response.headers.get('Content-Type') || '';
|
|
137
|
-
const isStreaming = contentType.includes('
|
|
137
|
+
const isStreaming = contentType.includes('application/x-ndjson');
|
|
138
138
|
// Fallback: server doesn't support streaming, use legacy approach
|
|
139
139
|
if (!isStreaming) {
|
|
140
140
|
const data = await response.json();
|
|
@@ -184,27 +184,30 @@ export class SandboxProcess extends SandboxAction {
|
|
|
184
184
|
const lines = buffer.split(/\r?\n/);
|
|
185
185
|
buffer = lines.pop();
|
|
186
186
|
for (const line of lines) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
187
|
+
const parsed = JSON.parse(line);
|
|
188
|
+
switch (parsed.type) {
|
|
189
|
+
case 'stdout':
|
|
190
|
+
if (parsed.data) {
|
|
191
|
+
options.onStdout?.(parsed.data);
|
|
192
|
+
options.onLog?.(parsed.data);
|
|
193
|
+
}
|
|
194
|
+
break;
|
|
195
|
+
case 'stderr':
|
|
196
|
+
if (parsed.data) {
|
|
197
|
+
options.onStderr?.(parsed.data);
|
|
198
|
+
options.onLog?.(parsed.data);
|
|
199
|
+
}
|
|
200
|
+
break;
|
|
201
|
+
case 'result':
|
|
202
|
+
try {
|
|
203
|
+
result = JSON.parse(parsed.data);
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
206
|
+
throw new Error(`Failed to parse result JSON: ${parsed.data}`);
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
default:
|
|
210
|
+
break;
|
|
208
211
|
}
|
|
209
212
|
}
|
|
210
213
|
}
|