@computesdk/workbench 5.0.2 → 5.0.4
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/workbench.js +15 -2
- package/dist/bin/workbench.js.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -8,11 +8,11 @@ var __export = (target, all) => {
|
|
|
8
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
// ../../node_modules/.pnpm/tsup@8.5.
|
|
11
|
+
// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js
|
|
12
12
|
import path from "path";
|
|
13
13
|
import { fileURLToPath } from "url";
|
|
14
14
|
var init_esm_shims = __esm({
|
|
15
|
-
"../../node_modules/.pnpm/tsup@8.5.
|
|
15
|
+
"../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js"() {
|
|
16
16
|
"use strict";
|
|
17
17
|
}
|
|
18
18
|
});
|
|
@@ -266,6 +266,7 @@ ${c.bold("Running Commands:")}
|
|
|
266
266
|
${c.cyan("getUrl({ port: 3000 })")} ${c.dim("// Get public URL")}
|
|
267
267
|
${c.cyan(`runCode("console.log('hi')", "node")`)}
|
|
268
268
|
${c.cyan("sandboxInfo()")} ${c.dim("// Get sandbox details")}
|
|
269
|
+
${c.cyan("ready()")} ${c.dim("// Get readiness status")}
|
|
269
270
|
${c.cyan("getInstance()")} ${c.dim("// Get native instance")}
|
|
270
271
|
|
|
271
272
|
${c.dim("Terminal (PTY & Exec):")}
|
|
@@ -697,6 +698,7 @@ async function getComputeInstance(state) {
|
|
|
697
698
|
compute2 = gatewayCompute({
|
|
698
699
|
provider: providerName,
|
|
699
700
|
computesdkApiKey: gatewayConfig.apiKey,
|
|
701
|
+
requestTimeoutMs: 6e4,
|
|
700
702
|
// Spread provider-specific config
|
|
701
703
|
[providerName]: providerConfig
|
|
702
704
|
});
|
|
@@ -1332,6 +1334,17 @@ function injectWorkbenchCommands(replServer, state) {
|
|
|
1332
1334
|
}
|
|
1333
1335
|
return sandbox.getInfo();
|
|
1334
1336
|
};
|
|
1337
|
+
replServer.context.ready = async () => {
|
|
1338
|
+
const sandbox = state.currentSandbox;
|
|
1339
|
+
if (!sandbox) {
|
|
1340
|
+
throw new Error("No active sandbox. Run a command to auto-create one.");
|
|
1341
|
+
}
|
|
1342
|
+
const sandboxReady = sandbox;
|
|
1343
|
+
if (typeof sandboxReady.ready !== "function") {
|
|
1344
|
+
throw new Error("Ready status is not supported for this provider.");
|
|
1345
|
+
}
|
|
1346
|
+
return sandboxReady.ready();
|
|
1347
|
+
};
|
|
1335
1348
|
replServer.context.runCode = async (code, runtime) => {
|
|
1336
1349
|
const sandbox = state.currentSandbox;
|
|
1337
1350
|
if (!sandbox) {
|