ppio-sandbox 2.1.0-a5 → 2.1.0-a7
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-FTZEUGFE.mjs → chunk-GFAVCROP.mjs} +10 -5
- package/dist/chunk-GFAVCROP.mjs.map +1 -0
- package/dist/{chunk-MRIYHDYZ.mjs → chunk-LS2KSJBX.mjs} +2 -2
- package/dist/{chunk-7FK4QRY2.mjs → chunk-S7TU45UT.mjs} +2 -2
- package/dist/code-interpreter.js +7 -2
- package/dist/code-interpreter.js.map +1 -1
- package/dist/code-interpreter.mjs +2 -2
- package/dist/desktop.js +7 -2
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.mjs +2 -2
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/sandbox-CK3EHN3N.mjs +8 -0
- package/dist/sandbox-E6T32R3Z.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-MRIYHDYZ.mjs.map → chunk-LS2KSJBX.mjs.map} +0 -0
- /package/dist/{chunk-7FK4QRY2.mjs.map → chunk-S7TU45UT.mjs.map} +0 -0
- /package/dist/{sandbox-7CAGPGIQ.mjs.map → sandbox-CK3EHN3N.mjs.map} +0 -0
- /package/dist/{sandbox-VMOVM5KY.mjs.map → sandbox-E6T32R3Z.mjs.map} +0 -0
|
@@ -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-a7";
|
|
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() {
|
|
@@ -6176,6 +6180,7 @@ var TemplateBase = class _TemplateBase {
|
|
|
6176
6180
|
*/
|
|
6177
6181
|
static async getBuildStatus(data, options) {
|
|
6178
6182
|
const config = new ConnectionConfig(options);
|
|
6183
|
+
raiseIfLegacy(config, "Template.getBuildStatus", BuildError);
|
|
6179
6184
|
const client = new ApiClient(config);
|
|
6180
6185
|
return await getBuildStatus(client, {
|
|
6181
6186
|
templateID: data.templateId,
|
|
@@ -7689,12 +7694,12 @@ var PPIO = class {
|
|
|
7689
7694
|
this.secret = new SecretNamespace(opts);
|
|
7690
7695
|
this.codeInterpreter = new RuntimeSandboxNamespace(
|
|
7691
7696
|
opts,
|
|
7692
|
-
() => import("./sandbox-
|
|
7697
|
+
() => import("./sandbox-E6T32R3Z.mjs")
|
|
7693
7698
|
);
|
|
7694
7699
|
this.code_interpreter = this.codeInterpreter;
|
|
7695
7700
|
this.desktop = new RuntimeSandboxNamespace(
|
|
7696
7701
|
opts,
|
|
7697
|
-
() => import("./sandbox-
|
|
7702
|
+
() => import("./sandbox-CK3EHN3N.mjs")
|
|
7698
7703
|
);
|
|
7699
7704
|
}
|
|
7700
7705
|
async create(templateOrOpts, opts) {
|
|
@@ -7772,4 +7777,4 @@ export {
|
|
|
7772
7777
|
ALL_TRAFFIC,
|
|
7773
7778
|
core_default
|
|
7774
7779
|
};
|
|
7775
|
-
//# sourceMappingURL=chunk-
|
|
7780
|
+
//# sourceMappingURL=chunk-GFAVCROP.mjs.map
|