novita-sandbox 2.0.1 → 2.0.2
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-BVTDJ3EJ.mjs → chunk-D6URLV2Y.mjs} +15 -11
- package/dist/chunk-D6URLV2Y.mjs.map +1 -0
- package/dist/code-interpreter.js +14 -10
- package/dist/code-interpreter.js.map +1 -1
- package/dist/code-interpreter.mjs +1 -1
- package/dist/desktop.js +14 -10
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.mjs +1 -1
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-BVTDJ3EJ.mjs.map +0 -1
|
@@ -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.0.
|
|
63
|
+
var version = "2.0.2";
|
|
64
64
|
|
|
65
65
|
// src/core/utils.ts
|
|
66
66
|
import platform from "platform";
|
|
@@ -384,15 +384,19 @@ var REQUEST_TIMEOUT_MS = 6e4;
|
|
|
384
384
|
var DEFAULT_SANDBOX_TIMEOUT_MS = 3e5;
|
|
385
385
|
var KEEPALIVE_PING_INTERVAL_SEC = 50;
|
|
386
386
|
var KEEPALIVE_PING_HEADER = "Keepalive-Ping-Interval";
|
|
387
|
-
var
|
|
388
|
-
var
|
|
387
|
+
var DEFAULT_NOVITA_DOMAIN = "us-phx-1.sandbox.novita.ai";
|
|
388
|
+
var LEGACY_NOVITA_DOMAINS = [
|
|
389
|
+
"sandbox.novita.ai",
|
|
390
|
+
"us-01.sandbox.novita.ai",
|
|
391
|
+
"us-ga-01.sandbox.novita.ai"
|
|
392
|
+
];
|
|
393
|
+
var LATEST_LEGACY_SDK_VERSION = "1.2.3a1";
|
|
389
394
|
function validateNovitaDomain(domain) {
|
|
390
|
-
if (domain
|
|
391
|
-
|
|
395
|
+
if (LEGACY_NOVITA_DOMAINS.includes(domain)) {
|
|
396
|
+
throw new Error(
|
|
397
|
+
`The current SDK version does not support the domain you provided: ${domain}. Please use version ${LATEST_LEGACY_SDK_VERSION}.`
|
|
398
|
+
);
|
|
392
399
|
}
|
|
393
|
-
throw new Error(
|
|
394
|
-
`The current SDK version does not support the domain you provided: ${domain}. Please use version ${LATEST_LEGACY_SDK_VERSION}.`
|
|
395
|
-
);
|
|
396
400
|
}
|
|
397
401
|
var _ConnectionConfig = class _ConnectionConfig {
|
|
398
402
|
constructor(opts) {
|
|
@@ -410,7 +414,7 @@ var _ConnectionConfig = class _ConnectionConfig {
|
|
|
410
414
|
this.sandboxUrl = (opts == null ? void 0 : opts.sandboxUrl) || _ConnectionConfig.sandboxUrl;
|
|
411
415
|
}
|
|
412
416
|
static get domain() {
|
|
413
|
-
return getEnvVar("NOVITA_DOMAIN") ||
|
|
417
|
+
return getEnvVar("NOVITA_DOMAIN") || DEFAULT_NOVITA_DOMAIN;
|
|
414
418
|
}
|
|
415
419
|
static get apiUrl() {
|
|
416
420
|
return getEnvVar("NOVITA_API_URL");
|
|
@@ -2330,7 +2334,7 @@ var VolumeConnectionConfig = class _VolumeConnectionConfig {
|
|
|
2330
2334
|
this.requestTimeoutMs = opts == null ? void 0 : opts.requestTimeoutMs;
|
|
2331
2335
|
}
|
|
2332
2336
|
static get domain() {
|
|
2333
|
-
return getEnvVar("NOVITA_DOMAIN") ||
|
|
2337
|
+
return getEnvVar("NOVITA_DOMAIN") || DEFAULT_NOVITA_DOMAIN;
|
|
2334
2338
|
}
|
|
2335
2339
|
static get debug() {
|
|
2336
2340
|
return (getEnvVar("NOVITA_DEBUG") || "false").toLowerCase() === "true";
|
|
@@ -6387,4 +6391,4 @@ export {
|
|
|
6387
6391
|
Sandbox,
|
|
6388
6392
|
core_default
|
|
6389
6393
|
};
|
|
6390
|
-
//# sourceMappingURL=chunk-
|
|
6394
|
+
//# sourceMappingURL=chunk-D6URLV2Y.mjs.map
|