tensorlake 0.4.47 → 0.4.49
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/bin/darwin-arm64/tensorlake +0 -0
- package/dist/bin/darwin-arm64/tl +0 -0
- package/dist/bin/linux-x64/tensorlake +0 -0
- package/dist/bin/linux-x64/tl +0 -0
- package/dist/bin/win32-x64/tensorlake.exe +0 -0
- package/dist/bin/win32-x64/tl.exe +0 -0
- package/dist/index.cjs +23 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +27 -21
- package/dist/index.js.map +1 -1
- package/dist/{sandbox-image-B130uMYt.d.cts → sandbox-image-BQ6fJT92.d.cts} +1 -0
- package/dist/{sandbox-image-B130uMYt.d.ts → sandbox-image-BQ6fJT92.d.ts} +1 -0
- package/dist/sandbox-image.cjs +23 -21
- package/dist/sandbox-image.cjs.map +1 -1
- package/dist/sandbox-image.d.cts +1 -1
- package/dist/sandbox-image.d.ts +1 -1
- package/dist/sandbox-image.js +27 -21
- package/dist/sandbox-image.js.map +1 -1
- package/package.json +3 -2
package/dist/sandbox-image.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { v as CreateSandboxImageOptions, x as DockerfileBuildPlan, y as DockerfileInstruction, J as SandboxImageSource, V as createSandboxImage, X as defaultRegisteredName, Y as loadDockerfilePlan, Z as loadImagePlan, _ as logicalDockerfileLines, $ as runCreateSandboxImageCli } from './sandbox-image-
|
|
1
|
+
export { v as CreateSandboxImageOptions, x as DockerfileBuildPlan, y as DockerfileInstruction, J as SandboxImageSource, V as createSandboxImage, X as defaultRegisteredName, Y as loadDockerfilePlan, Z as loadImagePlan, _ as logicalDockerfileLines, $ as runCreateSandboxImageCli } from './sandbox-image-BQ6fJT92.cjs';
|
package/dist/sandbox-image.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { v as CreateSandboxImageOptions, x as DockerfileBuildPlan, y as DockerfileInstruction, J as SandboxImageSource, V as createSandboxImage, X as defaultRegisteredName, Y as loadDockerfilePlan, Z as loadImagePlan, _ as logicalDockerfileLines, $ as runCreateSandboxImageCli } from './sandbox-image-
|
|
1
|
+
export { v as CreateSandboxImageOptions, x as DockerfileBuildPlan, y as DockerfileInstruction, J as SandboxImageSource, V as createSandboxImage, X as defaultRegisteredName, Y as loadDockerfilePlan, Z as loadImagePlan, _ as logicalDockerfileLines, $ as runCreateSandboxImageCli } from './sandbox-image-BQ6fJT92.js';
|
package/dist/sandbox-image.js
CHANGED
|
@@ -112,6 +112,17 @@ var RemoteAPIError = class extends SandboxError {
|
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
// src/http.ts
|
|
115
|
+
import {
|
|
116
|
+
Agent,
|
|
117
|
+
fetch as undiciFetch,
|
|
118
|
+
setGlobalDispatcher
|
|
119
|
+
} from "undici";
|
|
120
|
+
setGlobalDispatcher(
|
|
121
|
+
new Agent({
|
|
122
|
+
keepAliveTimeout: 6e4,
|
|
123
|
+
allowH2: true
|
|
124
|
+
})
|
|
125
|
+
);
|
|
115
126
|
var HttpClient = class {
|
|
116
127
|
baseUrl;
|
|
117
128
|
headers;
|
|
@@ -163,31 +174,26 @@ var HttpClient = class {
|
|
|
163
174
|
if (options?.contentType) {
|
|
164
175
|
headers["Content-Type"] = options.contentType;
|
|
165
176
|
}
|
|
166
|
-
const response = await this.requestResponse(
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
headers,
|
|
172
|
-
signal: options?.signal
|
|
173
|
-
}
|
|
174
|
-
);
|
|
177
|
+
const response = await this.requestResponse(method, path2, {
|
|
178
|
+
body: options?.body,
|
|
179
|
+
headers,
|
|
180
|
+
signal: options?.signal
|
|
181
|
+
});
|
|
175
182
|
const buffer = await response.arrayBuffer();
|
|
176
183
|
return new Uint8Array(buffer);
|
|
177
184
|
}
|
|
178
185
|
/** Make a request and return the response body as an SSE stream. */
|
|
179
186
|
async requestStream(method, path2, options) {
|
|
180
|
-
const response = await this.requestResponse(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
headers: { Accept: "text/event-stream" },
|
|
186
|
-
signal: options?.signal
|
|
187
|
-
}
|
|
188
|
-
);
|
|
187
|
+
const response = await this.requestResponse(method, path2, {
|
|
188
|
+
json: options?.json,
|
|
189
|
+
headers: { Accept: "text/event-stream" },
|
|
190
|
+
signal: options?.signal
|
|
191
|
+
});
|
|
189
192
|
if (!response.body) {
|
|
190
|
-
throw new RemoteAPIError(
|
|
193
|
+
throw new RemoteAPIError(
|
|
194
|
+
response.status,
|
|
195
|
+
"No response body for SSE stream"
|
|
196
|
+
);
|
|
191
197
|
}
|
|
192
198
|
return response.body;
|
|
193
199
|
}
|
|
@@ -226,7 +232,7 @@ var HttpClient = class {
|
|
|
226
232
|
);
|
|
227
233
|
const combinedSignal = signal ? anySignal([signal, this.abortController.signal]) : this.abortController.signal;
|
|
228
234
|
try {
|
|
229
|
-
const response = await
|
|
235
|
+
const response = await undiciFetch(url, {
|
|
230
236
|
method,
|
|
231
237
|
headers,
|
|
232
238
|
body,
|
|
@@ -3659,7 +3665,7 @@ var SandboxClient = class _SandboxClient {
|
|
|
3659
3665
|
while (Date.now() < deadline) {
|
|
3660
3666
|
const info = await this.get(result.sandboxId);
|
|
3661
3667
|
if (info.status === "running" /* RUNNING */) {
|
|
3662
|
-
const sandbox = this.connect(result.sandboxId, options?.proxyUrl);
|
|
3668
|
+
const sandbox = this.connect(result.sandboxId, options?.proxyUrl, info.routingHint);
|
|
3663
3669
|
sandbox._setOwner(this);
|
|
3664
3670
|
return sandbox;
|
|
3665
3671
|
}
|