@gjsify/process 0.4.23 → 0.4.25
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/esm/internal/gjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";function getGjsGlobal(){return globalThis}function getGioNamespace(){let e=
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";function getGjsGlobal(){return globalThis}function getGioNamespace(){let e=getGjsGlobal().imports?.gi;if(!e)return null;let t=null;try{t=e.GioUnix??null}catch{}if(!t)try{t=e.Gio??null}catch{}return t}export{getGioNamespace,getGjsGlobal};
|
|
@@ -18,10 +18,26 @@ export interface GjsGlobalThis {
|
|
|
18
18
|
}
|
|
19
19
|
/** Cast the global view to our loose shape — kept in one place. */
|
|
20
20
|
export declare function getGjsGlobal(): GjsGlobalThis;
|
|
21
|
+
/** Stream-class shape we use: only the static `new(fd, closeOnClose)` factory
|
|
22
|
+
* that the four GIO byte-stream classes share. */
|
|
23
|
+
export interface GioStreamCtor {
|
|
24
|
+
new: (fd: number, closeOnClose: boolean) => unknown;
|
|
25
|
+
}
|
|
26
|
+
/** A loose view of the Gio/GioUnix namespace shape we touch: typed entries
|
|
27
|
+
* for the four byte-stream classes we care about, plus an index signature
|
|
28
|
+
* for dynamic access to anything else (most callers reach for the typed
|
|
29
|
+
* entries, the index signature keeps the door open without `as any` casts). */
|
|
30
|
+
export interface GioNamespaceLike {
|
|
31
|
+
UnixOutputStream?: GioStreamCtor;
|
|
32
|
+
OutputStream?: GioStreamCtor;
|
|
33
|
+
UnixInputStream?: GioStreamCtor;
|
|
34
|
+
InputStream?: GioStreamCtor;
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
}
|
|
21
37
|
/**
|
|
22
38
|
* Resolve the right Gio-flavoured namespace. GJS ≥ 1.88 supersedes
|
|
23
39
|
* `Gio.UnixInputStream` etc. with `GioUnix.InputStream`; we try the new
|
|
24
40
|
* namespace first and fall back to the legacy one. Returns `null` when
|
|
25
41
|
* neither is available (e.g. under Node).
|
|
26
42
|
*/
|
|
27
|
-
export declare function getGioNamespace():
|
|
43
|
+
export declare function getGioNamespace(): GioNamespaceLike | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/process",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.25",
|
|
4
4
|
"description": "Node.js process module for Gjs",
|
|
5
5
|
"module": "lib/esm/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"process"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@gjsify/events": "^0.4.
|
|
37
|
-
"@gjsify/terminal-native": "^0.4.
|
|
38
|
-
"@gjsify/utils": "^0.4.
|
|
36
|
+
"@gjsify/events": "^0.4.25",
|
|
37
|
+
"@gjsify/terminal-native": "^0.4.25",
|
|
38
|
+
"@gjsify/utils": "^0.4.25"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@gjsify/cli": "^0.4.
|
|
42
|
-
"@gjsify/unit": "^0.4.
|
|
41
|
+
"@gjsify/cli": "^0.4.25",
|
|
42
|
+
"@gjsify/unit": "^0.4.25",
|
|
43
43
|
"@types/node": "^25.9.1",
|
|
44
44
|
"typescript": "^6.0.3"
|
|
45
45
|
}
|