ppio-sandbox 2.1.0-a5 → 2.1.0-a6
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/{chunk-7FK4QRY2.mjs → chunk-AMF7LP7N.mjs} +2 -2
- package/dist/{chunk-FTZEUGFE.mjs → chunk-DOWJBACY.mjs} +9 -5
- package/dist/chunk-DOWJBACY.mjs.map +1 -0
- package/dist/{chunk-MRIYHDYZ.mjs → chunk-Y6OVSPMT.mjs} +2 -2
- package/dist/code-interpreter.js +6 -2
- package/dist/code-interpreter.js.map +1 -1
- package/dist/code-interpreter.mjs +2 -2
- package/dist/desktop.js +6 -2
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.mjs +2 -2
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/sandbox-7RXZEFUF.mjs +8 -0
- package/dist/sandbox-WP4ABL6S.mjs +8 -0
- package/package.json +1 -1
- package/dist/chunk-FTZEUGFE.mjs.map +0 -1
- package/dist/sandbox-7CAGPGIQ.mjs +0 -8
- package/dist/sandbox-VMOVM5KY.mjs +0 -8
- /package/dist/{chunk-7FK4QRY2.mjs.map → chunk-AMF7LP7N.mjs.map} +0 -0
- /package/dist/{chunk-MRIYHDYZ.mjs.map → chunk-Y6OVSPMT.mjs.map} +0 -0
- /package/dist/{sandbox-7CAGPGIQ.mjs.map → sandbox-7RXZEFUF.mjs.map} +0 -0
- /package/dist/{sandbox-VMOVM5KY.mjs.map → sandbox-WP4ABL6S.mjs.map} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
TimeoutError,
|
|
6
6
|
__spreadProps,
|
|
7
7
|
__spreadValues
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DOWJBACY.mjs";
|
|
9
9
|
|
|
10
10
|
// src/desktop/utils.ts
|
|
11
11
|
import { randomBytes } from "crypto";
|
|
@@ -530,4 +530,4 @@ var VNCServer = class {
|
|
|
530
530
|
export {
|
|
531
531
|
Sandbox2 as Sandbox
|
|
532
532
|
};
|
|
533
|
-
//# sourceMappingURL=chunk-
|
|
533
|
+
//# sourceMappingURL=chunk-AMF7LP7N.mjs.map
|
|
@@ -60,7 +60,7 @@ import createClient from "openapi-fetch";
|
|
|
60
60
|
import platform2 from "platform";
|
|
61
61
|
|
|
62
62
|
// package.json
|
|
63
|
-
var version = "2.1.0-
|
|
63
|
+
var version = "2.1.0-a6";
|
|
64
64
|
|
|
65
65
|
// src/core/utils.ts
|
|
66
66
|
import platform from "platform";
|
|
@@ -420,6 +420,10 @@ function validateDomain(domain) {
|
|
|
420
420
|
throw new Error("Domain cannot be empty");
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
+
function normalizeApiUrl(apiUrl) {
|
|
424
|
+
if (!apiUrl) return apiUrl;
|
|
425
|
+
return /^[a-z][a-z\d+.-]*:\/\//i.test(apiUrl) ? apiUrl : `https://${apiUrl}`;
|
|
426
|
+
}
|
|
423
427
|
function getDefaultApiUrl(domain, debug) {
|
|
424
428
|
var _a3;
|
|
425
429
|
if (debug) {
|
|
@@ -439,7 +443,7 @@ var _ConnectionConfig = class _ConnectionConfig {
|
|
|
439
443
|
this.logger = opts == null ? void 0 : opts.logger;
|
|
440
444
|
this.headers = (opts == null ? void 0 : opts.headers) || {};
|
|
441
445
|
this.headers["User-Agent"] = `ppio-sandbox-sdk-js/${version}`;
|
|
442
|
-
this.apiUrl = (opts == null ? void 0 : opts.apiUrl) || _ConnectionConfig.apiUrl || getDefaultApiUrl(this.domain, this.debug);
|
|
446
|
+
this.apiUrl = normalizeApiUrl(opts == null ? void 0 : opts.apiUrl) || normalizeApiUrl(_ConnectionConfig.apiUrl) || getDefaultApiUrl(this.domain, this.debug);
|
|
443
447
|
this.sandboxUrl = (opts == null ? void 0 : opts.sandboxUrl) || _ConnectionConfig.sandboxUrl;
|
|
444
448
|
}
|
|
445
449
|
static get domain() {
|
|
@@ -7689,12 +7693,12 @@ var PPIO = class {
|
|
|
7689
7693
|
this.secret = new SecretNamespace(opts);
|
|
7690
7694
|
this.codeInterpreter = new RuntimeSandboxNamespace(
|
|
7691
7695
|
opts,
|
|
7692
|
-
() => import("./sandbox-
|
|
7696
|
+
() => import("./sandbox-7RXZEFUF.mjs")
|
|
7693
7697
|
);
|
|
7694
7698
|
this.code_interpreter = this.codeInterpreter;
|
|
7695
7699
|
this.desktop = new RuntimeSandboxNamespace(
|
|
7696
7700
|
opts,
|
|
7697
|
-
() => import("./sandbox-
|
|
7701
|
+
() => import("./sandbox-WP4ABL6S.mjs")
|
|
7698
7702
|
);
|
|
7699
7703
|
}
|
|
7700
7704
|
async create(templateOrOpts, opts) {
|
|
@@ -7772,4 +7776,4 @@ export {
|
|
|
7772
7776
|
ALL_TRAFFIC,
|
|
7773
7777
|
core_default
|
|
7774
7778
|
};
|
|
7775
|
-
//# sourceMappingURL=chunk-
|
|
7779
|
+
//# sourceMappingURL=chunk-DOWJBACY.mjs.map
|