@gjsify/utils 0.0.4 → 0.1.0
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/README.md +26 -0
- package/lib/esm/base64.js +72 -0
- package/lib/esm/byte-array.js +6 -0
- package/lib/esm/cli.js +1 -2
- package/lib/esm/defer.js +6 -0
- package/lib/esm/encoding.js +35 -0
- package/lib/esm/fs.js +2 -1
- package/lib/esm/gio-errors.js +98 -0
- package/lib/esm/gio.js +39 -0
- package/lib/esm/globals.js +8 -0
- package/lib/esm/index.js +10 -8
- package/lib/esm/main-loop.js +28 -0
- package/lib/esm/next-tick.js +6 -0
- package/lib/esm/structured-clone.js +169 -0
- package/lib/types/base64.d.ts +8 -0
- package/lib/types/byte-array.d.ts +7 -0
- package/lib/types/defer.d.ts +7 -0
- package/lib/types/encoding.d.ts +11 -0
- package/lib/types/gio-errors.d.ts +28 -0
- package/lib/types/gio.d.ts +17 -0
- package/lib/types/globals.d.ts +5 -0
- package/lib/types/index.d.ts +10 -8
- package/lib/types/main-loop.d.ts +20 -0
- package/lib/types/next-tick.d.ts +5 -0
- package/lib/types/structured-clone.d.ts +15 -0
- package/package.json +18 -20
- package/src/base64.ts +78 -0
- package/src/byte-array.ts +12 -0
- package/src/defer.ts +11 -0
- package/src/encoding.ts +36 -0
- package/src/fs.ts +2 -2
- package/src/gio-errors.ts +101 -0
- package/src/gio.ts +67 -0
- package/src/globals.ts +13 -0
- package/src/index.ts +10 -9
- package/src/main-loop.ts +62 -0
- package/src/next-tick.ts +16 -0
- package/src/structured-clone.ts +242 -0
- package/src/test.ts +1 -3
- package/tsconfig.json +27 -10
- package/tsconfig.tsbuildinfo +1 -0
- package/lib/cjs/cancel-handler.js +0 -22
- package/lib/cjs/cli.js +0 -11
- package/lib/cjs/error.js +0 -21
- package/lib/cjs/file.js +0 -13
- package/lib/cjs/fs.js +0 -21
- package/lib/cjs/index.js +0 -14
- package/lib/cjs/log.js +0 -159
- package/lib/cjs/message.js +0 -13
- package/lib/cjs/os.js +0 -81
- package/lib/cjs/path.js +0 -50
- package/lib/cjs/process.js +0 -41
- package/lib/cjs/system.js +0 -47
- package/lib/cjs/tty.js +0 -13
- package/lib/cjs/types/cancel-signals.js +0 -0
- package/lib/cjs/types/error-data.js +0 -0
- package/lib/cjs/types/index.js +0 -8
- package/lib/cjs/types/signal-methods.js +0 -0
- package/lib/cjs/types/stack-trace-frame.js +0 -0
- package/lib/cjs/types/structured-log-data.js +0 -0
- package/lib/cjs/types/uncaught-exception-data.js +0 -0
- package/lib/cjs/types/unhandled-rejection-data.js +0 -0
- package/lib/cjs/types/user-info.js +0 -0
- package/lib/cjs/version.js +0 -7
- package/lib/esm/cancel-handler.js +0 -22
- package/lib/esm/log.js +0 -159
- package/lib/esm/os.js +0 -81
- package/lib/esm/process.js +0 -41
- package/lib/esm/system.js +0 -47
- package/lib/esm/tty.js +0 -13
- package/lib/esm/types/cancel-signals.js +0 -0
- package/lib/esm/types/error-data.js +0 -0
- package/lib/esm/types/index.js +0 -8
- package/lib/esm/types/signal-methods.js +0 -0
- package/lib/esm/types/stack-trace-frame.js +0 -0
- package/lib/esm/types/structured-log-data.js +0 -0
- package/lib/esm/types/uncaught-exception-data.js +0 -0
- package/lib/esm/types/unhandled-rejection-data.js +0 -0
- package/lib/esm/types/user-info.js +0 -0
- package/lib/esm/version.js +0 -7
- package/lib/types/cancel-handler.d.ts +0 -4
- package/lib/types/log.d.ts +0 -29
- package/lib/types/os.d.ts +0 -7
- package/lib/types/process.d.ts +0 -6
- package/lib/types/system.d.ts +0 -5
- package/lib/types/tty.d.ts +0 -5
- package/lib/types/types/cancel-signals.d.ts +0 -5
- package/lib/types/types/error-data.d.ts +0 -7
- package/lib/types/types/index.d.ts +0 -8
- package/lib/types/types/signal-methods.d.ts +0 -62
- package/lib/types/types/stack-trace-frame.d.ts +0 -6
- package/lib/types/types/structured-log-data.d.ts +0 -5
- package/lib/types/types/uncaught-exception-data.d.ts +0 -4
- package/lib/types/types/unhandled-rejection-data.d.ts +0 -5
- package/lib/types/types/user-info.d.ts +0 -8
- package/lib/types/version.d.ts +0 -1
- package/src/cancel-handler.ts +0 -24
- package/src/log.ts +0 -218
- package/src/os.ts +0 -94
- package/src/process.spec.ts +0 -24
- package/src/process.ts +0 -46
- package/src/system.ts +0 -56
- package/src/tty.spec.ts +0 -10
- package/src/tty.ts +0 -10
- package/src/types/cancel-signals.ts +0 -6
- package/src/types/error-data.ts +0 -8
- package/src/types/index.ts +0 -8
- package/src/types/signal-methods.ts +0 -63
- package/src/types/stack-trace-frame.ts +0 -7
- package/src/types/structured-log-data.ts +0 -5
- package/src/types/uncaught-exception-data.ts +0 -5
- package/src/types/unhandled-rejection-data.ts +0 -6
- package/src/types/user-info.ts +0 -9
- package/src/version.ts +0 -4
- package/test.gjs.js +0 -34758
- package/test.gjs.js.map +0 -7
- package/test.gjs.js.meta.json +0 -1
- package/tsconfig.types.json +0 -7
- package/tsconfig.types.tsbuildinfo +0 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
// structuredClone polyfill for GJS
|
|
2
|
+
// Reference: HTML Living Standard §2.7.1 StructuredSerializeInternal
|
|
3
|
+
// Reference: refs/deno/ext/web/02_structured_clone.js, refs/ungap-structured-clone/
|
|
4
|
+
// Reimplemented for GJS using standard JavaScript (SpiderMonkey 128)
|
|
5
|
+
|
|
6
|
+
const { toString } = Object.prototype;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Get the internal [[Class]] tag of a value via Object.prototype.toString.
|
|
10
|
+
* Returns e.g. "Array", "Date", "RegExp", "Map", "Error", "Uint8Array", etc.
|
|
11
|
+
*/
|
|
12
|
+
function classOf(value: unknown): string {
|
|
13
|
+
return toString.call(value).slice(8, -1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Throw a DataCloneError. Uses DOMException if available, otherwise a plain Error.
|
|
18
|
+
*/
|
|
19
|
+
function throwDataCloneError(message: string): never {
|
|
20
|
+
const DOMExceptionCtor = (globalThis as Record<string, unknown>).DOMException as
|
|
21
|
+
(new (message: string, name: string) => Error) | undefined;
|
|
22
|
+
if (typeof DOMExceptionCtor === 'function') {
|
|
23
|
+
throw new DOMExceptionCtor(message, 'DataCloneError');
|
|
24
|
+
}
|
|
25
|
+
const error = new Error(message);
|
|
26
|
+
error.name = 'DataCloneError';
|
|
27
|
+
throw error;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Error constructors that can be cloned per the HTML spec. */
|
|
31
|
+
const ERROR_CONSTRUCTORS: Record<string, ErrorConstructor> = {
|
|
32
|
+
Error,
|
|
33
|
+
EvalError,
|
|
34
|
+
RangeError,
|
|
35
|
+
ReferenceError,
|
|
36
|
+
SyntaxError,
|
|
37
|
+
TypeError,
|
|
38
|
+
URIError,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** TypedArray constructors for reconstruction. */
|
|
42
|
+
const TYPED_ARRAY_TAGS = new Set([
|
|
43
|
+
'Int8Array', 'Uint8Array', 'Uint8ClampedArray',
|
|
44
|
+
'Int16Array', 'Uint16Array',
|
|
45
|
+
'Int32Array', 'Uint32Array',
|
|
46
|
+
'Float32Array', 'Float64Array',
|
|
47
|
+
'BigInt64Array', 'BigUint64Array',
|
|
48
|
+
]);
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Internal recursive clone with circular/shared reference tracking.
|
|
52
|
+
* The `seen` map stores original→clone mappings. It must be populated
|
|
53
|
+
* with the clone BEFORE recursing into children to handle circular refs.
|
|
54
|
+
*/
|
|
55
|
+
function internalClone(value: unknown, seen: Map<object, unknown>): unknown {
|
|
56
|
+
// Primitives (including null, undefined, boolean, number, string, bigint)
|
|
57
|
+
if (value === null || value === undefined) return value;
|
|
58
|
+
const type = typeof value;
|
|
59
|
+
if (type === 'boolean' || type === 'number' || type === 'string' || type === 'bigint') {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
if (type === 'symbol') {
|
|
63
|
+
throwDataCloneError('Symbol cannot be cloned');
|
|
64
|
+
}
|
|
65
|
+
if (type === 'function') {
|
|
66
|
+
throwDataCloneError('Function cannot be cloned');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const obj = value as object;
|
|
70
|
+
|
|
71
|
+
// Circular / shared reference — return existing clone
|
|
72
|
+
if (seen.has(obj)) return seen.get(obj);
|
|
73
|
+
|
|
74
|
+
const tag = classOf(obj);
|
|
75
|
+
|
|
76
|
+
// --- Date ---
|
|
77
|
+
if (tag === 'Date') {
|
|
78
|
+
return new Date((obj as Date).getTime());
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// --- RegExp (lastIndex always 0 in clone per spec) ---
|
|
82
|
+
if (tag === 'RegExp') {
|
|
83
|
+
return new RegExp((obj as RegExp).source, (obj as RegExp).flags);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// --- Wrapper objects: Boolean, Number, String ---
|
|
87
|
+
if (tag === 'Boolean') return Object((obj as object).valueOf());
|
|
88
|
+
if (tag === 'Number') return Object((obj as object).valueOf());
|
|
89
|
+
if (tag === 'String') return Object((obj as object).valueOf());
|
|
90
|
+
|
|
91
|
+
// --- BigInt wrapper object ---
|
|
92
|
+
if (tag === 'BigInt') return Object(BigInt.prototype.valueOf.call(obj));
|
|
93
|
+
|
|
94
|
+
// --- Error types ---
|
|
95
|
+
// Note: Object.prototype.toString returns [object Error] for all error subtypes
|
|
96
|
+
// in SpiderMonkey and V8, so we use instanceof + constructor.name to detect the specific type.
|
|
97
|
+
if (obj instanceof Error) {
|
|
98
|
+
const src = obj;
|
|
99
|
+
const ctorName = src.constructor?.name;
|
|
100
|
+
const Ctor = (ctorName && ERROR_CONSTRUCTORS[ctorName]) || ERROR_CONSTRUCTORS[src.name] || Error;
|
|
101
|
+
const cloned = new Ctor(src.message);
|
|
102
|
+
cloned.name = src.name;
|
|
103
|
+
// Clone cause if present (ES2022)
|
|
104
|
+
if ('cause' in src) {
|
|
105
|
+
Object.defineProperty(cloned, 'cause', {
|
|
106
|
+
value: internalClone(src.cause, seen),
|
|
107
|
+
writable: true,
|
|
108
|
+
enumerable: false,
|
|
109
|
+
configurable: true,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return cloned;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// --- DOMException ---
|
|
116
|
+
if (tag === 'DOMException') {
|
|
117
|
+
const DOMExceptionCtor = (globalThis as Record<string, unknown>).DOMException as
|
|
118
|
+
(new (message: string, name: string) => Error) | undefined;
|
|
119
|
+
if (typeof DOMExceptionCtor === 'function') {
|
|
120
|
+
const src = obj as { message: string; name: string };
|
|
121
|
+
return new DOMExceptionCtor(src.message, src.name);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// --- ArrayBuffer ---
|
|
126
|
+
if (tag === 'ArrayBuffer') {
|
|
127
|
+
const src = obj as ArrayBuffer;
|
|
128
|
+
const cloned = src.slice(0);
|
|
129
|
+
seen.set(obj, cloned);
|
|
130
|
+
return cloned;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// --- SharedArrayBuffer ---
|
|
134
|
+
if (tag === 'SharedArrayBuffer') {
|
|
135
|
+
// SharedArrayBuffer clones share the backing store (same memory)
|
|
136
|
+
return obj;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// --- DataView ---
|
|
140
|
+
if (tag === 'DataView') {
|
|
141
|
+
const src = obj as DataView;
|
|
142
|
+
const bufferClone = internalClone(src.buffer, seen) as ArrayBuffer;
|
|
143
|
+
const cloned = new DataView(bufferClone, src.byteOffset, src.byteLength);
|
|
144
|
+
seen.set(obj, cloned);
|
|
145
|
+
return cloned;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// --- TypedArrays ---
|
|
149
|
+
if (TYPED_ARRAY_TAGS.has(tag)) {
|
|
150
|
+
const src = obj as { buffer: ArrayBuffer; byteOffset: number; length: number; constructor: new (buffer: ArrayBuffer, byteOffset: number, length: number) => unknown };
|
|
151
|
+
const bufferClone = internalClone(src.buffer, seen) as ArrayBuffer;
|
|
152
|
+
const Ctor = src.constructor as new (buffer: ArrayBuffer, byteOffset: number, length: number) => unknown;
|
|
153
|
+
const cloned = new Ctor(bufferClone, src.byteOffset, src.length);
|
|
154
|
+
seen.set(obj, cloned);
|
|
155
|
+
return cloned;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// --- Map ---
|
|
159
|
+
if (tag === 'Map') {
|
|
160
|
+
const cloned = new Map();
|
|
161
|
+
seen.set(obj, cloned);
|
|
162
|
+
for (const [k, v] of obj as Map<unknown, unknown>) {
|
|
163
|
+
cloned.set(internalClone(k, seen), internalClone(v, seen));
|
|
164
|
+
}
|
|
165
|
+
return cloned;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// --- Set ---
|
|
169
|
+
if (tag === 'Set') {
|
|
170
|
+
const cloned = new Set();
|
|
171
|
+
seen.set(obj, cloned);
|
|
172
|
+
for (const v of obj as Set<unknown>) {
|
|
173
|
+
cloned.add(internalClone(v, seen));
|
|
174
|
+
}
|
|
175
|
+
return cloned;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// --- Blob / File (use instanceof for cross-environment compatibility) ---
|
|
179
|
+
{
|
|
180
|
+
const g = globalThis as Record<string, unknown>;
|
|
181
|
+
const BlobCtor = g.Blob as (new (parts: unknown[], options?: { type?: string }) => { type: string; size: number }) | undefined;
|
|
182
|
+
const FileCtor = g.File as (new (parts: unknown[], name: string, options?: { type?: string; lastModified?: number }) => { name: string; type: string; lastModified: number }) | undefined;
|
|
183
|
+
if (typeof FileCtor === 'function' && obj instanceof (FileCtor as any)) {
|
|
184
|
+
const src = obj as { name: string; type: string; lastModified: number };
|
|
185
|
+
return new FileCtor([obj], src.name, { type: src.type, lastModified: src.lastModified });
|
|
186
|
+
}
|
|
187
|
+
if (typeof BlobCtor === 'function' && obj instanceof (BlobCtor as any)) {
|
|
188
|
+
const src = obj as { type: string };
|
|
189
|
+
return new BlobCtor([obj], { type: src.type });
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// --- Non-cloneable types ---
|
|
194
|
+
if (obj instanceof WeakMap) throwDataCloneError('WeakMap cannot be cloned');
|
|
195
|
+
if (obj instanceof WeakSet) throwDataCloneError('WeakSet cannot be cloned');
|
|
196
|
+
if (obj instanceof WeakRef) throwDataCloneError('WeakRef cannot be cloned');
|
|
197
|
+
if (typeof globalThis.Promise === 'function' && obj instanceof Promise) {
|
|
198
|
+
throwDataCloneError('Promise cannot be cloned');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// --- Array ---
|
|
202
|
+
if (tag === 'Array') {
|
|
203
|
+
const src = obj as unknown[];
|
|
204
|
+
const cloned: unknown[] = [];
|
|
205
|
+
seen.set(obj, cloned);
|
|
206
|
+
for (let i = 0; i < src.length; i++) {
|
|
207
|
+
// Preserve holes in sparse arrays
|
|
208
|
+
if (i in src) {
|
|
209
|
+
cloned[i] = internalClone(src[i], seen);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return cloned;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// --- Plain Object (or unknown object type — clone own enumerable string-keyed props) ---
|
|
216
|
+
if (tag === 'Object' || typeof obj === 'object') {
|
|
217
|
+
const cloned: Record<string, unknown> = {};
|
|
218
|
+
seen.set(obj, cloned);
|
|
219
|
+
for (const key of Object.keys(obj as Record<string, unknown>)) {
|
|
220
|
+
cloned[key] = internalClone((obj as Record<string, unknown>)[key], seen);
|
|
221
|
+
}
|
|
222
|
+
return cloned;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
throwDataCloneError(`${tag} cannot be cloned`);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* structuredClone polyfill implementing the HTML structured clone algorithm.
|
|
230
|
+
*
|
|
231
|
+
* Supports: primitives (incl. -0, NaN, Infinity, BigInt), wrapper objects,
|
|
232
|
+
* Date, RegExp, Error types, ArrayBuffer, TypedArrays, DataView, Map, Set,
|
|
233
|
+
* Blob, File, circular/shared references, plain objects and arrays.
|
|
234
|
+
*
|
|
235
|
+
* Throws DataCloneError for: functions, symbols, WeakMap, WeakSet, WeakRef, Promise.
|
|
236
|
+
*
|
|
237
|
+
* @param value The value to clone
|
|
238
|
+
* @param _options Reserved for future transfer list support (currently ignored)
|
|
239
|
+
*/
|
|
240
|
+
export function structuredClone<T>(value: T, _options?: { transfer?: unknown[] }): T {
|
|
241
|
+
return internalClone(value, new Map()) as T;
|
|
242
|
+
}
|
package/src/test.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -2,20 +2,37 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"module": "NodeNext",
|
|
4
4
|
"types": [],
|
|
5
|
-
"lib": [
|
|
5
|
+
"lib": [
|
|
6
|
+
"ESNext"
|
|
7
|
+
],
|
|
6
8
|
"target": "ESNext",
|
|
7
9
|
"moduleResolution": "NodeNext",
|
|
8
10
|
"experimentalDecorators": true,
|
|
11
|
+
"emitDeclarationOnly": true,
|
|
12
|
+
"declaration": true,
|
|
9
13
|
"outDir": "lib",
|
|
10
|
-
"declarationDir": "lib",
|
|
14
|
+
"declarationDir": "lib/types",
|
|
11
15
|
"rootDir": "src",
|
|
12
|
-
"composite": true
|
|
16
|
+
"composite": true,
|
|
17
|
+
"skipLibCheck": true,
|
|
18
|
+
"allowJs": true,
|
|
19
|
+
"checkJs": false,
|
|
20
|
+
"strict": false
|
|
13
21
|
},
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"allowJs": true,
|
|
16
|
-
"checkJs": false,
|
|
17
22
|
"reflection": false,
|
|
18
|
-
"files": [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
"files": [
|
|
24
|
+
"src/index.ts"
|
|
25
|
+
],
|
|
26
|
+
"include": [
|
|
27
|
+
"../../../node_modules/@girs/gjs/gjs.d.ts",
|
|
28
|
+
"../../../node_modules/@girs/gjs/dom.d.ts",
|
|
29
|
+
"src/**/*.mts",
|
|
30
|
+
"src/**/*.ts"
|
|
31
|
+
],
|
|
32
|
+
"exclude": [
|
|
33
|
+
"src/test.ts",
|
|
34
|
+
"src/test.mts",
|
|
35
|
+
"src/**/*.spec.ts",
|
|
36
|
+
"src/**/*.spec.mts"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/typescript/lib/lib.es2025.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/typescript/lib/lib.es2025.collection.d.ts","../../../node_modules/typescript/lib/lib.es2025.float16.d.ts","../../../node_modules/typescript/lib/lib.es2025.intl.d.ts","../../../node_modules/typescript/lib/lib.es2025.iterator.d.ts","../../../node_modules/typescript/lib/lib.es2025.promise.d.ts","../../../node_modules/typescript/lib/lib.es2025.regexp.d.ts","../../../node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/typescript/lib/lib.esnext.date.d.ts","../../../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/typescript/lib/lib.esnext.error.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.esnext.temporal.d.ts","../../../node_modules/typescript/lib/lib.esnext.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","./src/base64.ts","../../../node_modules/@girs/glib-2.0/glib-2.0-ambient.d.ts","../../../node_modules/@girs/glib-2.0/glib-2.0-import.d.ts","../../../node_modules/@girs/gjs/gettext.d.ts","../../../node_modules/@girs/gobject-2.0/gobject-2.0-ambient.d.ts","../../../node_modules/@girs/gobject-2.0/gobject-2.0-import.d.ts","../../../node_modules/@girs/gobject-2.0/gobject-2.0.d.ts","../../../node_modules/@girs/gobject-2.0/index.d.ts","../../../node_modules/@girs/gjs/system.d.ts","../../../node_modules/@girs/cairo-1.0/cairo-1.0-ambient.d.ts","../../../node_modules/@girs/cairo-1.0/cairo-1.0-import.d.ts","../../../node_modules/@girs/cairo-1.0/cairo-1.0.d.ts","../../../node_modules/@girs/cairo-1.0/index.d.ts","../../../node_modules/@girs/gjs/cairo.d.ts","../../../node_modules/@girs/gjs/console.d.ts","../../../node_modules/@girs/gjs/gi.d.ts","../../../node_modules/@girs/gjs/gjs-ambient.d.ts","../../../node_modules/@girs/gjs/gjs.d.ts","../../../node_modules/@girs/gjs/index.d.ts","../../../node_modules/@girs/glib-2.0/glib-2.0.d.ts","../../../node_modules/@girs/glib-2.0/index.d.ts","./src/byte-array.ts","./src/cli.ts","./src/defer.ts","./src/encoding.ts","./src/globals.ts","./src/error.ts","./src/file.ts","../../../node_modules/@girs/gio-2.0/gio-2.0-ambient.d.ts","../../../node_modules/@girs/gio-2.0/gio-2.0-import.d.ts","../../../node_modules/@girs/gmodule-2.0/gmodule-2.0-ambient.d.ts","../../../node_modules/@girs/gmodule-2.0/gmodule-2.0-import.d.ts","../../../node_modules/@girs/gmodule-2.0/gmodule-2.0.d.ts","../../../node_modules/@girs/gmodule-2.0/index.d.ts","../../../node_modules/@girs/gio-2.0/gio-2.0.d.ts","../../../node_modules/@girs/gio-2.0/index.d.ts","../../../node_modules/@girs/giounix-2.0/giounix-2.0-ambient.d.ts","../../../node_modules/@girs/giounix-2.0/giounix-2.0-import.d.ts","../../../node_modules/@girs/giounix-2.0/giounix-2.0.d.ts","../../../node_modules/@girs/giounix-2.0/index.d.ts","./src/fs.ts","./src/gio.ts","./src/gio-errors.ts","./src/message.ts","./src/next-tick.ts","./src/path.ts","./src/structured-clone.ts","./src/main-loop.ts","./src/index.ts","../../../node_modules/@girs/gjs/dom.d.ts"],"fileIdsList":[[97,100],[100],[95,106,108],[98,99],[116,123],[123],[95,106,108,121],[117,122],[124,127],[127],[95,106,108,121,123],[125,126],[95,100],[95,108],[91,96,101,102,103],[91,95,96,101,108],[105],[95],[89,108],[108],[95,106],[90,107],[118,121],[121],[119,120],[92,95],[106,108],[93,94],[123,127],[108,123],[88,109,110,111,112,113,114,115,128,129,130,131,132,133,134,135]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"1e9332c23e9a907175e0ffc6a49e236f97b48838cc8aec9ce7e4cec21e544b65","impliedFormat":1},{"version":"3753fbc1113dc511214802a2342280a8b284ab9094f6420e7aa171e868679f91","impliedFormat":1},{"version":"999ca32883495a866aa5737fe1babc764a469e4cde6ee6b136a4b9ae68853e4b","impliedFormat":1},{"version":"17f13ecb98cbc39243f2eee1f16d45cd8ec4706b03ee314f1915f1a8b42f6984","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"0bd714129fca875f7d4c477a1a392200b0bcd13fb2e80928cd334b63830ea047","affectsGlobalScope":true,"impliedFormat":1},{"version":"e2c9037ae6cd2c52d80ceef0b3c5ffdb488627d71529cf4f63776daf11161c9a","affectsGlobalScope":true,"impliedFormat":1},{"version":"135d5cf4d345f59f1a9caadfafcd858d3d9cc68290db616cc85797224448cccc","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc238c3f81c2984751932b6aab223cd5b830e0ac6cad76389e5e9d2ffc03287d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4a07f9b76d361f572620927e5735b77d6d2101c23cdd94383eb5b706e7b36357","affectsGlobalScope":true,"impliedFormat":1},{"version":"7c4e8dc6ab834cc6baa0227e030606d29e3e8449a9f67cdf5605ea5493c4db29","affectsGlobalScope":true,"impliedFormat":1},{"version":"de7ba0fd02e06cd9a5bd4ab441ed0e122735786e67dde1e849cced1cd8b46b78","affectsGlobalScope":true,"impliedFormat":1},{"version":"6148e4e88d720a06855071c3db02069434142a8332cf9c182cda551adedf3156","affectsGlobalScope":true,"impliedFormat":1},{"version":"d63dba625b108316a40c95a4425f8d4294e0deeccfd6c7e59d819efa19e23409","affectsGlobalScope":true,"impliedFormat":1},{"version":"0568d6befee03dd435bed4fc25c4e46865b24bdcb8c563fdc21f580a2c301904","affectsGlobalScope":true,"impliedFormat":1},{"version":"30d62269b05b584741f19a5369852d5d34895aa2ac4fd948956f886d15f9cc0d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"ffbe6d7b295306b2ba88030f65b74c107d8d99bdcf596ea99c62a02f606108b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"996fb27b15277369c68a4ba46ed138b4e9e839a02fb4ec756f7997629242fd9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"79b712591b270d4778c89706ca2cfc56ddb8c3f895840e477388f1710dc5eda9","affectsGlobalScope":true,"impliedFormat":1},{"version":"20884846cef428b992b9bd032e70a4ef88e349263f63aeddf04dda837a7dba26","affectsGlobalScope":true,"impliedFormat":1},{"version":"5fcab789c73a97cd43828ee3cc94a61264cf24d4c44472ce64ced0e0f148bdb2","affectsGlobalScope":true,"impliedFormat":1},{"version":"db59a81f070c1880ad645b2c0275022baa6a0c4f0acdc58d29d349c6efcf0903","affectsGlobalScope":true,"impliedFormat":1},{"version":"673294292640f5722b700e7d814e17aaf7d93f83a48a2c9b38f33cbc940ad8b0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d786b48f934cbca483b3c6d0a798cb43bbb4ada283e76fb22c28e53ae05b9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"142efd4ce210576f777dc34df121777be89eda476942d6d6663b03dcb53be3ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"379bc41580c2d774f82e828c70308f24a005b490c25ba34d679d84bcf05c3d9d","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed484fb2aa8a1a23d0277056ec3336e0a0b52f9b8d6a961f338a642faf43235d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ffedae1d1c2d53fdbca1c96d3c7dda544281f7d262f99b6880634f8fd8d9820","affectsGlobalScope":true,"impliedFormat":1},{"version":"83a730b125d477dd264df8ba479afab27a3dae7152b005c214ab94dc7ee44fd3","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"20abcc37a8c39848767fcc645d73b9a6d42db0d83d8702198b27e850317f4b49","signature":"004cd7c170c88793a62f0b831a52c8bec5835581048d81ec483105bb6fb569c8","impliedFormat":99},{"version":"8c9787aadb580199528c52892a52d65cf5681cbf431f50c387b4452d830e8260","impliedFormat":99},{"version":"6e9045bc4cb132b149dac58eeb9689f1fdb2b2b356ebbf02b93912b7a0fdbc25","affectsGlobalScope":true,"impliedFormat":99},{"version":"2085382b07f3cd64087a991b6becb50133f01238539acfd02b4056a94a5ebb9d","impliedFormat":99},{"version":"db35eb1245b36fd3ff663811086d15cb8c68f3b3dc5f5f831db3b0eefbcb033c","impliedFormat":99},{"version":"0f3c61a292d85a2e818df1f9a7c7f37846cb1a6a3a4ecf7894f8a738d4bdb192","affectsGlobalScope":true,"impliedFormat":99},{"version":"bce313ff21532aa74f970cecd12a7e2a1b3fa20579ef702c16d627327c64bd98","impliedFormat":99},{"version":"86a89e907573f6d3c8ddab189817f10eff6b0c42ec08c485888d5e8b2efa1e2c","impliedFormat":99},{"version":"e73f713456ae34abd233f29196aa99fdf404cb91164c5122bc19a3d719047cd2","impliedFormat":99},{"version":"54c3513e44305cbe56ef433417d9e42104cdc317a63c43ecf72a1849ee69ccc2","impliedFormat":99},{"version":"7b0dc352c423e02893e3dbefdc5172f227c7638cd40c35c4b1b77af3008613de","affectsGlobalScope":true,"impliedFormat":99},{"version":"409686ee569ee9b47c3588823d5871fe711069a53ee94471fd4bffcc6469ee1a","impliedFormat":99},{"version":"0add61f82f10b4bb3bf837edda13915a643fa650f577e79a03be219c656f9e18","impliedFormat":99},{"version":"4db1053ff2a3a26c56ec68803986fb9a2de7ecb26d6252e1d4b719c48398f799","impliedFormat":99},{"version":"c1bf15bba38171793cfc7112559b1714b0bcb9f79477e012dffc4bb0ef2292a1","impliedFormat":99},{"version":"6922180d916be5ec823dd103ec60bf1ec48bded8e53194a760831a877a7cff0f","impliedFormat":99},{"version":"d0cd0ed5ad50d765e2e30fd7a45ce1b054cce85ff8235d19bbe45152acd32a08","impliedFormat":99},{"version":"7a61ece44b95f226c4166f48ed58e90a7b76242588293c52bb45bd74368c7559","affectsGlobalScope":true,"impliedFormat":99},{"version":"8dd968f41e49b2b0514d16baa1199620746dd6e8017accbea9a39a4b0c2a9d28","impliedFormat":99},{"version":"a6f32a624b98546b3ab4f84f0b900206a23542430a715b764796a9b10a27f242","impliedFormat":99},{"version":"a1eeac57c42f81587bdb5ba17781055a64913a1b6896752b5b9e45ba007577a2","impliedFormat":99},{"version":"b914609f1e239e89a080ab7f5ff72594deb7cde2e9747eac1a8095593ffb4ba9","signature":"55aac1cafba7e50f99fb9e8628a7f634e8354534e96ea8585821215c87de20be","impliedFormat":99},{"version":"4fb51536d048114117c829bb5f4f5846f3988bbda16f57326507323fe19888a6","signature":"f88f71f98c5b98896efe89d3a38dc6ec813b7e08d168f1006c4973839d77ca08","impliedFormat":99},{"version":"e3e990113befca442516787f1b0c38345ce97b6424711b8082d890659c88d9d3","signature":"b76aa9f47943110ec585bb2b743aecb6f000377700923632f0db301482bdd73c","impliedFormat":99},{"version":"c2b69bbc1bbf79f09e72e69716aaddc83142a04e57bf30c673570aaabd5384e8","signature":"af1988260c49b37553045ea830586a7aeb8e442f20579ee17b5a2ac26141ad6c","impliedFormat":99},{"version":"acb02c911ca0e588841b120e519904adb79fe7dacc55d16bc6cdd2e02e15c1b4","signature":"bcd5f304d453dd40284c9645b5de54e0d8c8df0f3d80f53d664d3f99782d0ef5","impliedFormat":99},{"version":"6f173d4e758b7ff70a3e0b3b2906869970cd23559eb6f19bfd6caa395e8e6f51","signature":"a7298076563ec3132348662dacd7512b67a8564714460cf092a0211bcca5ee20","impliedFormat":99},{"version":"90bf7a0f6125cfb40e3b9c1f5f471a235bc92c9a0bf9934a996648e5861e70c9","signature":"c99b7291b92920c8990726218d15eb170e32f6d74c63b7a020f0812f8546d288","impliedFormat":99},{"version":"21ab021acdc50115128766fc952cb9265bbe1e878a6e6712f7999cfcdd3bfbba","impliedFormat":99},{"version":"a67623830d36a6c76f01ce2b51ca3206fb07de66d89b364837eb0fdb901de445","affectsGlobalScope":true,"impliedFormat":99},{"version":"090eb5c7c46bcebe0fdde327c76833c56f3f5503fa2c9b34a908c88ac3536ee6","impliedFormat":99},{"version":"54ac9f13e2b5a9bf9c0a2ceec8135b290d6d5f1b7623f2297f3e7e7f66da5aea","affectsGlobalScope":true,"impliedFormat":99},{"version":"a8fe8ba4b9226110a43330bc743d98e3e3af394e50f018dae034d11821a4b598","impliedFormat":99},{"version":"75fdff836de566cceca1fd40f365af854fbd8139e0fb33a191f8d087c9e43d90","impliedFormat":99},{"version":"e75adffbfda3c908bb319bf8bc4c5f01c23c0a6c129df28edf57bd9e3b9fe7a8","impliedFormat":99},{"version":"981e32c1ee850a697091171963411a0a940d5c1fa1fe3ea88fb9ea7c0f841bd1","impliedFormat":99},{"version":"775315594ac4d695b64fa125e1de049e3996ef407ca155fd8ff953a51ce0f8ce","impliedFormat":99},{"version":"b7849794cd7aedbd872d7dcd7979835dfb8c78c0d6d2fe86ca945c6094dd98c9","affectsGlobalScope":true,"impliedFormat":99},{"version":"4b0e72414af7bf8add6da3e3a74a04e265fd869e666aa6ec06a1e45a487d1d8b","impliedFormat":99},{"version":"06e59779655de7c08fc8ab13b136dcdbe74d3409d4c8578df5598c4b2ee4299c","impliedFormat":99},{"version":"b5fc3758badb6cba6058263b5ecbeef42bc4facd91e0c22f5b67bd9cbf6f3c38","signature":"1981a715841b053d196bd2fa7094a40e443550be04387c5bd61bd987c862a8c1","impliedFormat":99},{"version":"f443edf6e3ec017a14d0548b99e633d275550f30c992b11e637b58f06d81a873","signature":"2b9a95c45751bab93ad8f47330f6e9ca44fe49484c34678f186994e92c539819","impliedFormat":99},{"version":"b436ddafc0833ee5f53d66902474ca45e40a959290349d8252911dddf0f7f5dc","signature":"a14f06f88503879efda49e5b1b68c5a9fea51038e587450067d74c50609f0fd1","impliedFormat":99},{"version":"3ed8aa2be77f350abf0e3187f5a741705e574fc096ed17f2272f541fc1c2b174","signature":"49243f7ff940e6fa2bb1064e9db8579284331ebfdbbc40afa4c5579c11daed12","impliedFormat":99},{"version":"4a03e93453dd18383df6d45b37ea2c349f46e7098e38d25476f9cc7206c4bb88","signature":"4166644865115049a8c122b6061e4af2a7df86f4062a6ea9cd33c418a8fc1e48","impliedFormat":99},{"version":"aee9b6d84ee4c14f2d1606405b03f7d0b369e28a17014fb9eeef93eb30d84b66","signature":"0f633f56c3e62663502f33a45c9e05f06c638e00f949bbaa3efcb6623af1f910","impliedFormat":99},{"version":"56e8e992ec36beb9914f6d9a3c61b375e22aa9732f97ab43bd451f2f6ee9ea36","signature":"19764f46f5f49e9c0426e38e477f1ca75748f93e7314ff91fa92e4fd63df3eb8","impliedFormat":99},{"version":"330dd85a3b1d85485f78513f70b5ff7367e2b96b00278f140d5de0c263f0cef0","signature":"3978e1a4e65d355befa56b48fece71e9cee3985f568ad88de880a9ebc336b03a","impliedFormat":99},{"version":"33eced8b3dfef79d161db0a449e4c01c0b7879e21b1df13debd371a90afe5501","impliedFormat":99},{"version":"fec18a4e0ddcf74bec40eb2ac2ed0b2b0060bfcd407a46fb1d18edd5a03a5085","affectsGlobalScope":true,"impliedFormat":99}],"root":[88,105,[109,115],[128,137]],"options":{"allowJs":true,"checkJs":false,"composite":true,"declaration":true,"declarationDir":"./lib/types","emitDeclarationOnly":true,"experimentalDecorators":true,"module":199,"outDir":"./lib","rootDir":"./src","skipLibCheck":true,"strict":false,"target":99},"referencedMap":[[97,1],[98,2],[99,3],[100,4],[116,5],[117,6],[122,7],[123,8],[124,9],[125,10],[126,11],[127,12],[101,13],[137,14],[104,15],[105,16],[106,17],[96,18],[89,19],[90,20],[107,21],[108,22],[118,23],[119,24],[120,3],[121,25],[92,26],[93,18],[94,27],[95,28],[109,20],[110,20],[115,20],[128,29],[129,30],[136,31],[135,20],[133,30]],"latestChangedDtsFile":"./lib/types/index.d.ts","version":"6.0.2"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
let nextRid = 1;
|
|
2
|
-
const resources = {};
|
|
3
|
-
const createCancelHandler = () => {
|
|
4
|
-
const rid = nextRid++;
|
|
5
|
-
const cancelHandler = {};
|
|
6
|
-
imports.signals.addSignalMethods(cancelHandler);
|
|
7
|
-
resources[rid] = cancelHandler;
|
|
8
|
-
return rid;
|
|
9
|
-
};
|
|
10
|
-
const closeCancelHandler = (rid) => {
|
|
11
|
-
const cancelHandler = getCancelHandler(rid);
|
|
12
|
-
cancelHandler?.emit("close");
|
|
13
|
-
delete resources[rid];
|
|
14
|
-
};
|
|
15
|
-
const getCancelHandler = (rid) => {
|
|
16
|
-
return resources[rid];
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
closeCancelHandler,
|
|
20
|
-
createCancelHandler,
|
|
21
|
-
getCancelHandler
|
|
22
|
-
};
|
package/lib/cjs/cli.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import GLib from "@girs/glib-2.0";
|
|
2
|
-
const byteArray = imports.byteArray;
|
|
3
|
-
const cli = (commandLine) => {
|
|
4
|
-
const [res, out, err, status] = GLib.spawn_command_line_sync(commandLine);
|
|
5
|
-
if (err.byteLength)
|
|
6
|
-
throw new Error(byteArray.toString(err));
|
|
7
|
-
return byteArray.toString(out);
|
|
8
|
-
};
|
|
9
|
-
export {
|
|
10
|
-
cli
|
|
11
|
-
};
|
package/lib/cjs/error.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const initErrorV8Methods = (ErrorConstructor) => {
|
|
2
|
-
if (!Error.captureStackTrace) {
|
|
3
|
-
Error.captureStackTrace = function(targetObject, constructorOpt) {
|
|
4
|
-
const container = new Error();
|
|
5
|
-
const target = constructorOpt || targetObject;
|
|
6
|
-
Object.defineProperty(target, "stack", {
|
|
7
|
-
configurable: true,
|
|
8
|
-
get: function getStack() {
|
|
9
|
-
var stack = container.stack;
|
|
10
|
-
Object.defineProperty(this, "stack", {
|
|
11
|
-
value: stack
|
|
12
|
-
});
|
|
13
|
-
return stack;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
initErrorV8Methods
|
|
21
|
-
};
|
package/lib/cjs/file.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import GLib from "@girs/glib-2.0";
|
|
2
|
-
const byteArray = imports.byteArray;
|
|
3
|
-
const readJSON = (path) => {
|
|
4
|
-
const [ok, contents] = GLib.file_get_contents(path);
|
|
5
|
-
if (ok) {
|
|
6
|
-
const map = JSON.parse(byteArray.toString(contents));
|
|
7
|
-
return map;
|
|
8
|
-
}
|
|
9
|
-
throw new Error(`Error on require "${path}"`);
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
readJSON
|
|
13
|
-
};
|
package/lib/cjs/fs.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import Gio from "@girs/gio-2.0";
|
|
2
|
-
const existsFD = (fd) => {
|
|
3
|
-
try {
|
|
4
|
-
let stream = Gio.UnixInputStream.new(fd, false);
|
|
5
|
-
stream.close(null);
|
|
6
|
-
return true;
|
|
7
|
-
} catch (error) {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
function existsSync(path) {
|
|
12
|
-
if (typeof path !== "string" || path === "") {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
const file = Gio.File.new_for_path(path);
|
|
16
|
-
return file.query_exists(null);
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
existsFD,
|
|
20
|
-
existsSync
|
|
21
|
-
};
|
package/lib/cjs/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from "./types/index.js";
|
|
2
|
-
export * from "./cancel-handler.js";
|
|
3
|
-
export * from "./cli.js";
|
|
4
|
-
export * from "./error.js";
|
|
5
|
-
export * from "./file.js";
|
|
6
|
-
export * from "./fs.js";
|
|
7
|
-
export * from "./log.js";
|
|
8
|
-
export * from "./message.js";
|
|
9
|
-
export * from "./os.js";
|
|
10
|
-
export * from "./path.js";
|
|
11
|
-
export * from "./process.js";
|
|
12
|
-
export * from "./system.js";
|
|
13
|
-
export * from "./tty.js";
|
|
14
|
-
export * from "./version.js";
|
package/lib/cjs/log.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import GLib from "@girs/glib-2.0";
|
|
2
|
-
const logLevelToString = (logLevel) => {
|
|
3
|
-
switch (logLevel) {
|
|
4
|
-
case GLib.LogLevelFlags.FLAG_FATAL:
|
|
5
|
-
return "FLAG_FATAL";
|
|
6
|
-
case GLib.LogLevelFlags.FLAG_RECURSION:
|
|
7
|
-
return "FLAG_RECURSION";
|
|
8
|
-
case GLib.LogLevelFlags.LEVEL_CRITICAL:
|
|
9
|
-
return "LEVEL_CRITICAL";
|
|
10
|
-
case GLib.LogLevelFlags.LEVEL_DEBUG:
|
|
11
|
-
return "LEVEL_DEBUG";
|
|
12
|
-
case GLib.LogLevelFlags.LEVEL_ERROR:
|
|
13
|
-
return "LEVEL_ERROR";
|
|
14
|
-
case GLib.LogLevelFlags.LEVEL_INFO:
|
|
15
|
-
return "LEVEL_INFO";
|
|
16
|
-
case GLib.LogLevelFlags.LEVEL_MASK:
|
|
17
|
-
return "LEVEL_MASK";
|
|
18
|
-
case GLib.LogLevelFlags.LEVEL_MESSAGE:
|
|
19
|
-
return "LEVEL_MESSAGE";
|
|
20
|
-
case GLib.LogLevelFlags.LEVEL_WARNING:
|
|
21
|
-
return "LEVEL_WARNING";
|
|
22
|
-
default:
|
|
23
|
-
return "UNKNOWN";
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const STACK_TRACE_REGEX = /^.*@(.*):(\d+):(\d+)/;
|
|
27
|
-
const parseStackTrace = (stackTraceLine) => {
|
|
28
|
-
const match = stackTraceLine.match(STACK_TRACE_REGEX);
|
|
29
|
-
if (match) {
|
|
30
|
-
const [, fileName, lineNumber, columnNumber] = match;
|
|
31
|
-
return { fileName, lineNumber: Number(lineNumber), columnNumber: Number(columnNumber), line: stackTraceLine };
|
|
32
|
-
}
|
|
33
|
-
return null;
|
|
34
|
-
};
|
|
35
|
-
const getStackTraceStartLineIndex = (lines) => {
|
|
36
|
-
for (let i = 1; i < lines.length; i++) {
|
|
37
|
-
const line = lines[i];
|
|
38
|
-
if (STACK_TRACE_REGEX.test(line)) {
|
|
39
|
-
return i;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return -1;
|
|
43
|
-
};
|
|
44
|
-
const extractErrorData = (errorMessage) => {
|
|
45
|
-
const lines = errorMessage.split("\n");
|
|
46
|
-
for (let line of lines) {
|
|
47
|
-
line = line.trim();
|
|
48
|
-
}
|
|
49
|
-
const endOfErrorType = lines[0].indexOf(": ");
|
|
50
|
-
let errorType = "Error";
|
|
51
|
-
if (endOfErrorType > 0) {
|
|
52
|
-
errorType = lines[0].slice(0, endOfErrorType);
|
|
53
|
-
if (globalThis[errorType]) {
|
|
54
|
-
lines[0] = lines[0].slice(endOfErrorType + 2);
|
|
55
|
-
} else {
|
|
56
|
-
errorType = "Error";
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
let stackTraceLineIndex = getStackTraceStartLineIndex(lines);
|
|
60
|
-
const message = lines.slice(0, stackTraceLineIndex).join("\n");
|
|
61
|
-
const stackTraceLines = lines.slice(stackTraceLineIndex);
|
|
62
|
-
const frames = [];
|
|
63
|
-
for (const stackTraceLine of stackTraceLines) {
|
|
64
|
-
const frame = parseStackTrace(stackTraceLine);
|
|
65
|
-
if (frame) {
|
|
66
|
-
frames.push(frame);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
errorType,
|
|
71
|
-
message,
|
|
72
|
-
frames,
|
|
73
|
-
stackTraceLines
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
const reconstructErrorFromMessage = (errorMessage) => {
|
|
77
|
-
const { errorType, frames, message, stackTraceLines } = extractErrorData(errorMessage);
|
|
78
|
-
const ErrorType = globalThis[errorType];
|
|
79
|
-
const error = new ErrorType();
|
|
80
|
-
error.message = message;
|
|
81
|
-
error.stack = stackTraceLines.join("\n");
|
|
82
|
-
return {
|
|
83
|
-
error,
|
|
84
|
-
errorType,
|
|
85
|
-
frames,
|
|
86
|
-
message,
|
|
87
|
-
stackTraceLines
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
class LogSignals {
|
|
91
|
-
static instance;
|
|
92
|
-
/** This is a singleton because log_set_writer_func may only be called once */
|
|
93
|
-
constructor() {
|
|
94
|
-
this.initHandler();
|
|
95
|
-
}
|
|
96
|
-
static getSingleton() {
|
|
97
|
-
if (LogSignals.instance) {
|
|
98
|
-
return LogSignals.instance;
|
|
99
|
-
}
|
|
100
|
-
LogSignals.instance = new LogSignals();
|
|
101
|
-
return LogSignals.instance;
|
|
102
|
-
}
|
|
103
|
-
initHandler() {
|
|
104
|
-
GLib.log_set_writer_func((level, fields) => {
|
|
105
|
-
const decoder = new TextDecoder("utf-8");
|
|
106
|
-
const message = decoder.decode(fields?.MESSAGE);
|
|
107
|
-
const priority = Number(decoder.decode(fields?.PRIORITY));
|
|
108
|
-
const domain = decoder.decode(fields?.GLIB_DOMAIN);
|
|
109
|
-
const data = {
|
|
110
|
-
message,
|
|
111
|
-
priority,
|
|
112
|
-
domain
|
|
113
|
-
};
|
|
114
|
-
if (!this.handler(level, data)) {
|
|
115
|
-
level |= GLib.LogLevelFlags.FLAG_RECURSION;
|
|
116
|
-
GLib.log_default_handler(domain, level, message, null);
|
|
117
|
-
}
|
|
118
|
-
return GLib.LogWriterOutput.HANDLED;
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* A log handler to emit `unhandledRejection` and `uncaughtException` events
|
|
123
|
-
* @param level The log level
|
|
124
|
-
* @param data The structured log data
|
|
125
|
-
* @returns `true` to catch the log or `false` to output the error to the console as usual
|
|
126
|
-
*/
|
|
127
|
-
handler(level, structuredData) {
|
|
128
|
-
if (level === GLib.LogLevelFlags.LEVEL_WARNING && structuredData.domain === "Gjs" && structuredData.message.startsWith("Unhandled promise rejection")) {
|
|
129
|
-
try {
|
|
130
|
-
const errorData = reconstructErrorFromMessage(structuredData.message);
|
|
131
|
-
const fakePromise = new Promise(() => {
|
|
132
|
-
});
|
|
133
|
-
logSignals.emit("unhandledRejection", structuredData, {
|
|
134
|
-
reason: errorData.error,
|
|
135
|
-
promise: fakePromise,
|
|
136
|
-
errorType: errorData.errorType,
|
|
137
|
-
frames: errorData.frames,
|
|
138
|
-
message: errorData.message,
|
|
139
|
-
stackTraceLines: errorData.stackTraceLines
|
|
140
|
-
});
|
|
141
|
-
} catch (error) {
|
|
142
|
-
printerr(error);
|
|
143
|
-
}
|
|
144
|
-
} else if (level === GLib.LogLevelFlags.LEVEL_CRITICAL) {
|
|
145
|
-
const errorData = reconstructErrorFromMessage(structuredData.message);
|
|
146
|
-
logSignals.emit("uncaughtException", structuredData, errorData);
|
|
147
|
-
}
|
|
148
|
-
return false;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
imports.signals.addSignalMethods(LogSignals.prototype);
|
|
152
|
-
const logSignals = LogSignals.getSingleton();
|
|
153
|
-
export {
|
|
154
|
-
LogSignals,
|
|
155
|
-
extractErrorData,
|
|
156
|
-
logLevelToString,
|
|
157
|
-
logSignals,
|
|
158
|
-
parseStackTrace
|
|
159
|
-
};
|
package/lib/cjs/message.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const notImplemented = (msg) => {
|
|
2
|
-
const message = msg ? `Not implemented: ${msg}` : "Not implemented";
|
|
3
|
-
throw new Error(message);
|
|
4
|
-
};
|
|
5
|
-
const warnNotImplemented = (msg) => {
|
|
6
|
-
const message = msg ? `Not implemented: ${msg}` : "Not implemented";
|
|
7
|
-
console.warn(message);
|
|
8
|
-
return message;
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
notImplemented,
|
|
12
|
-
warnNotImplemented
|
|
13
|
-
};
|