@gjsify/xmlhttprequest 0.4.30 → 0.4.32
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/index.js +1 -0
- package/package.json +10 -3
package/lib/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// XMLHttpRequest and URL.createObjectURL/revokeObjectURL for GJS
|
|
2
2
|
// Backed by @gjsify/fetch (Soup 3.0) for HTTP and GLib for file:// + temp files.
|
|
3
3
|
// Reference: https://xhr.spec.whatwg.org/
|
|
4
|
+
// oxlint-disable typescript/no-explicit-any -- W3C XMLHttpRequest surface uses `any` deliberately: `response: any` in lib.dom matches our impl (the actual shape varies by `responseType`: text/json/arraybuffer/blob); the `on{load,error,progress,…}` handler return types are `=> any` in lib.dom; the simplified progress events we dispatch carry varying-shape payloads. The remaining `any`s in send()'s body parameter, fetch-callback narrowing at the Soup boundary, listener-map value type, and catch-block error sit inside this same W3C surface and a `gioAsync`-style introspection boundary.
|
|
4
5
|
import GLib from 'gi://GLib?version=2.0';
|
|
5
6
|
import System from 'system';
|
|
6
7
|
import fetch from '@gjsify/fetch';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/xmlhttprequest",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.32",
|
|
4
4
|
"description": "XMLHttpRequest and URL.createObjectURL/revokeObjectURL for GJS — backed by @gjsify/fetch and GLib",
|
|
5
5
|
"module": "lib/esm/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -38,11 +38,18 @@
|
|
|
38
38
|
"@girs/gio-2.0": "2.88.0-4.0.1",
|
|
39
39
|
"@girs/gjs": "4.0.1",
|
|
40
40
|
"@girs/glib-2.0": "2.88.0-4.0.1",
|
|
41
|
-
"@gjsify/fetch": "^0.4.
|
|
41
|
+
"@gjsify/fetch": "^0.4.32"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@gjsify/cli": "^0.4.
|
|
44
|
+
"@gjsify/cli": "^0.4.32",
|
|
45
45
|
"@types/node": "^25.9.1",
|
|
46
46
|
"typescript": "^6.0.3"
|
|
47
|
+
},
|
|
48
|
+
"gjsify": {
|
|
49
|
+
"runtimes": {
|
|
50
|
+
"gjs": "polyfill",
|
|
51
|
+
"node": "none",
|
|
52
|
+
"browser": "none"
|
|
53
|
+
}
|
|
47
54
|
}
|
|
48
55
|
}
|