dsh-codex-subscription 2.2.0 → 2.2.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/lib/client.js +1 -1
- package/lib/index.js +6 -5
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -7290,7 +7290,7 @@ window.__ModuleLoader__.load({
|
|
|
7290
7290
|
}
|
|
7291
7291
|
//#endregion
|
|
7292
7292
|
//#region src/version.js
|
|
7293
|
-
const PACKAGE_VERSION = "2.2.
|
|
7293
|
+
const PACKAGE_VERSION = "2.2.1";
|
|
7294
7294
|
//#endregion
|
|
7295
7295
|
//#region src/client-recovery.js
|
|
7296
7296
|
async function recoveryCall(rpc, endpoint, payload = {}, timeoutMs = 1e4) {
|
package/lib/index.js
CHANGED
|
@@ -553,14 +553,15 @@ async function withCodexNetwork(run, options = {}) {
|
|
|
553
553
|
}
|
|
554
554
|
if (options.websocket) activeWebSocketScopes += 1;
|
|
555
555
|
if (activeScopes === 0) {
|
|
556
|
-
|
|
556
|
+
const fetchBeforeScope = globalThis.fetch;
|
|
557
|
+
baseFetch = fetchBeforeScope;
|
|
557
558
|
scopedFetch = async (input, init) => {
|
|
558
559
|
const scope = networkScope.getStore();
|
|
559
|
-
if (scope === void 0) return
|
|
560
|
+
if (scope === void 0) return fetchBeforeScope(input, init);
|
|
560
561
|
const { options: scopedOptions, allowedHosts, resolved } = scope;
|
|
561
562
|
const proxyFetch = scopedOptions.fetchThroughProxy ?? fetchThroughProxy;
|
|
562
563
|
const target = new URL(typeof input === "string" || input instanceof URL ? input : input.url);
|
|
563
|
-
if (target.protocol !== "https:" || !allowedHosts.has(target.hostname)) return
|
|
564
|
+
if (target.protocol !== "https:" || !allowedHosts.has(target.hostname)) return fetchBeforeScope(input, init);
|
|
564
565
|
let proxy = resolved.get(target.hostname);
|
|
565
566
|
if (proxy === void 0) {
|
|
566
567
|
proxy = resolveCodexProxy({
|
|
@@ -571,7 +572,7 @@ async function withCodexNetwork(run, options = {}) {
|
|
|
571
572
|
}
|
|
572
573
|
const route = await proxy;
|
|
573
574
|
scopedOptions.onRoute?.(route.source);
|
|
574
|
-
const response = await (route.url === void 0 ?
|
|
575
|
+
const response = await (route.url === void 0 ? fetchBeforeScope(input, init) : proxyFetch(input, init, route.url));
|
|
575
576
|
return scopedOptions.transformResponse?.(response, target) ?? response;
|
|
576
577
|
};
|
|
577
578
|
globalThis.fetch = scopedFetch;
|
|
@@ -2831,7 +2832,7 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
|
|
|
2831
2832
|
Object.freeze(["0.82.1", "0.85.1"]);
|
|
2832
2833
|
//#endregion
|
|
2833
2834
|
//#region src/version.js
|
|
2834
|
-
const PACKAGE_VERSION = "2.2.
|
|
2835
|
+
const PACKAGE_VERSION = "2.2.1";
|
|
2835
2836
|
const USER_AGENT = `dsh-codex-subscription/${PACKAGE_VERSION}`;
|
|
2836
2837
|
//#endregion
|
|
2837
2838
|
//#region src/model-catalog.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-codex-subscription",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Use ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|