spacecode 2.4.0 → 2.4.1
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/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/repl.mjs +4 -3
- package/package.json +1 -1
package/dist/repl.mjs
CHANGED
|
@@ -5000,7 +5000,7 @@ function createProfileClient({ baseUrl, apiKey, fetch: doFetch, timeoutMs = 8e3
|
|
|
5000
5000
|
method,
|
|
5001
5001
|
headers: { Authorization: `Bearer ${apiKey}`, ...init.body !== void 0 ? { "content-type": "application/json" } : {}, ...init.headers },
|
|
5002
5002
|
...init.body !== void 0 ? { body: JSON.stringify(init.body) } : {},
|
|
5003
|
-
signal: AbortSignal.timeout(timeoutMs)
|
|
5003
|
+
signal: AbortSignal.timeout(init.timeoutMs ?? timeoutMs)
|
|
5004
5004
|
});
|
|
5005
5005
|
} catch (err) {
|
|
5006
5006
|
throw new ProfileApiError(0, `profile request failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -5033,7 +5033,7 @@ function createProfileClient({ baseUrl, apiKey, fetch: doFetch, timeoutMs = 8e3
|
|
|
5033
5033
|
},
|
|
5034
5034
|
/** Asks the server-side classifier to decide keep/on_demand/drop per section (see adapt-plan.ts). */
|
|
5035
5035
|
async adapt(sections) {
|
|
5036
|
-
const res = await call("POST", "/adapt", { body: { sections } });
|
|
5036
|
+
const res = await call("POST", "/adapt", { body: { sections }, timeoutMs: ADAPT_TIMEOUT_MS });
|
|
5037
5037
|
return await res.json();
|
|
5038
5038
|
},
|
|
5039
5039
|
async put(kind, name, input) {
|
|
@@ -5044,7 +5044,7 @@ function createProfileClient({ baseUrl, apiKey, fetch: doFetch, timeoutMs = 8e3
|
|
|
5044
5044
|
}
|
|
5045
5045
|
};
|
|
5046
5046
|
}
|
|
5047
|
-
var ProfileApiError;
|
|
5047
|
+
var ProfileApiError, ADAPT_TIMEOUT_MS;
|
|
5048
5048
|
var init_profile_client = __esm({
|
|
5049
5049
|
"../agent/src/import/profile-client.ts"() {
|
|
5050
5050
|
"use strict";
|
|
@@ -5056,6 +5056,7 @@ var init_profile_client = __esm({
|
|
|
5056
5056
|
this.name = "ProfileApiError";
|
|
5057
5057
|
}
|
|
5058
5058
|
};
|
|
5059
|
+
ADAPT_TIMEOUT_MS = 1e5;
|
|
5059
5060
|
}
|
|
5060
5061
|
});
|
|
5061
5062
|
|