@ravi-os/sdk 0.260915.1 → 0.261009.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/client.d.ts +432 -9
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +420 -12
- package/dist/client.js.map +1 -1
- package/dist/fetch.d.ts +14 -0
- package/dist/fetch.d.ts.map +1 -0
- package/dist/fetch.js +20 -0
- package/dist/fetch.js.map +1 -0
- package/dist/schemas.d.ts +20699 -10197
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +14935 -1689
- package/dist/schemas.js.map +1 -1
- package/dist/streaming.generated.d.ts.map +1 -1
- package/dist/streaming.generated.js +2 -4
- package/dist/streaming.generated.js.map +1 -1
- package/dist/transport/http.d.ts.map +1 -1
- package/dist/transport/http.js +2 -4
- package/dist/transport/http.js.map +1 -1
- package/dist/types.d.ts +2651 -109
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +1 -1
package/dist/fetch.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the `fetch` implementation used by browser-safe SDK clients.
|
|
3
|
+
*
|
|
4
|
+
* Native `Window.fetch` / `WorkerGlobalScope.fetch` throw
|
|
5
|
+
* `TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation`
|
|
6
|
+
* when the method is extracted and called without its original receiver.
|
|
7
|
+
* The default path therefore binds `globalThis.fetch` so Electron and
|
|
8
|
+
* browsers work without a `config.fetch` workaround.
|
|
9
|
+
*
|
|
10
|
+
* A caller-supplied `custom` implementation is returned as-is so tests,
|
|
11
|
+
* retry wrappers, and edge runtimes keep control of `this`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveFetch(custom: typeof fetch | undefined, missingError: string): typeof fetch;
|
|
14
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,KAAK,GAAG,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,KAAK,CAMjG"}
|
package/dist/fetch.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the `fetch` implementation used by browser-safe SDK clients.
|
|
3
|
+
*
|
|
4
|
+
* Native `Window.fetch` / `WorkerGlobalScope.fetch` throw
|
|
5
|
+
* `TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation`
|
|
6
|
+
* when the method is extracted and called without its original receiver.
|
|
7
|
+
* The default path therefore binds `globalThis.fetch` so Electron and
|
|
8
|
+
* browsers work without a `config.fetch` workaround.
|
|
9
|
+
*
|
|
10
|
+
* A caller-supplied `custom` implementation is returned as-is so tests,
|
|
11
|
+
* retry wrappers, and edge runtimes keep control of `this`.
|
|
12
|
+
*/
|
|
13
|
+
export function resolveFetch(custom, missingError) {
|
|
14
|
+
const impl = custom ?? globalThis.fetch;
|
|
15
|
+
if (typeof impl !== "function") {
|
|
16
|
+
throw new Error(missingError);
|
|
17
|
+
}
|
|
18
|
+
return custom === undefined ? impl.bind(globalThis) : impl;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=fetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY,CAAC,MAAgC,EAAE,YAAoB;IACjF,MAAM,IAAI,GAAG,MAAM,IAAI,UAAU,CAAC,KAAK,CAAC;IACxC,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7D,CAAC"}
|