@gjsify/resolve-npm 0.44.0 → 0.45.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/lib/index.mjs CHANGED
@@ -65,7 +65,7 @@ import { getDerivedAliasesSync as _getDerivedAliasesSync } from './runtime-alias
65
65
  * direct indexing.
66
66
  *
67
67
  * @param {Record<string,string>} table
68
- * @param {'gjs'|'node'|'browser'|'nativescript'} target
68
+ * @param {import('./runtime-aliases.mjs').Target} target
69
69
  * @returns {Record<string,string>}
70
70
  */
71
71
  function withDerivedSlotRouting(table, target) {
@@ -83,12 +83,10 @@ function withDerivedSlotRouting(table, target) {
83
83
  return routed;
84
84
  };
85
85
  return new Proxy(table, {
86
- get: (_t, prop) =>
87
- typeof prop === 'string' ? materialise()[prop] : Reflect.get(table, prop),
86
+ get: (_t, prop) => (typeof prop === 'string' ? materialise()[prop] : Reflect.get(table, prop)),
88
87
  has: (_t, prop) => Reflect.has(materialise(), prop),
89
88
  ownKeys: () => Reflect.ownKeys(materialise()),
90
- getOwnPropertyDescriptor: (_t, prop) =>
91
- Reflect.getOwnPropertyDescriptor(materialise(), prop),
89
+ getOwnPropertyDescriptor: (_t, prop) => Reflect.getOwnPropertyDescriptor(materialise(), prop),
92
90
  });
93
91
  }
94
92
 
@@ -148,13 +146,10 @@ export const EXTERNALS_NODE = [
148
146
  'sqlite',
149
147
  'worker_threads',
150
148
  'zlib',
151
- ]
149
+ ];
152
150
 
153
151
  /** Array of NPM module names for which we have our own implementation */
154
- export const EXTERNALS_NPM = [
155
- 'readable-stream',
156
- 'node-fetch'
157
- ]
152
+ export const EXTERNALS_NPM = ['readable-stream', 'node-fetch'];
158
153
 
159
154
  /** General record of modules for Gjs */
160
155
  export const ALIASES_GENERAL_FOR_GJS = {
@@ -163,7 +158,7 @@ export const ALIASES_GENERAL_FOR_GJS = {
163
158
  // DOMParser is not available; on GJS we provide DOMParser via
164
159
  // @gjsify/domparser, so jsdom and its whatwg-url/webidl-conversions
165
160
  // deps (which use SharedArrayBuffer — unavailable in GJS) are never needed.
166
- 'jsdom': '@gjsify/empty',
161
+ jsdom: '@gjsify/empty',
167
162
 
168
163
  // engine.io-client ships both polling-xhr.node.js (uses xmlhttprequest-ssl /
169
164
  // Node http.request) and polling-xhr.js (uses globalThis.XMLHttpRequest).
@@ -176,66 +171,65 @@ export const ALIASES_GENERAL_FOR_GJS = {
176
171
  './polling-xhr.node.js': './polling-xhr.js',
177
172
  './websocket.node.js': './websocket.js',
178
173
  './globals.node.js': './globals.js',
179
-
180
- }
174
+ };
181
175
 
182
176
  /** Record of Node.js modules (build in or not) and his replacement for Gjs */
183
177
  export const ALIASES_NODE_FOR_GJS = {
184
178
  // Internal Node.js modules
185
- 'assert': '@gjsify/assert',
179
+ assert: '@gjsify/assert',
186
180
  'assert/strict': '@gjsify/assert/strict',
187
- 'async_hooks': '@gjsify/async_hooks',
188
- 'buffer': '@gjsify/buffer',
189
- 'child_process': '@gjsify/child_process',
190
- 'cluster': '@gjsify/cluster',
191
- 'console': '@gjsify/console',
192
- 'constants': '@gjsify/constants',
193
- 'crypto': '@gjsify/crypto',
194
- 'dgram': '@gjsify/dgram',
195
- 'diagnostics_channel': '@gjsify/diagnostics_channel',
196
- 'dns': '@gjsify/dns',
181
+ async_hooks: '@gjsify/async_hooks',
182
+ buffer: '@gjsify/buffer',
183
+ child_process: '@gjsify/child_process',
184
+ cluster: '@gjsify/cluster',
185
+ console: '@gjsify/console',
186
+ constants: '@gjsify/constants',
187
+ crypto: '@gjsify/crypto',
188
+ dgram: '@gjsify/dgram',
189
+ diagnostics_channel: '@gjsify/diagnostics_channel',
190
+ dns: '@gjsify/dns',
197
191
  'dns/promises': '@gjsify/dns/promises',
198
- 'domain': '@gjsify/domain',
199
- 'events': '@gjsify/events',
200
- 'fs': '@gjsify/fs',
192
+ domain: '@gjsify/domain',
193
+ events: '@gjsify/events',
194
+ fs: '@gjsify/fs',
201
195
  'fs/promises': '@gjsify/fs/promises',
202
- 'http': '@gjsify/http',
203
- 'http2': '@gjsify/http2',
204
- 'https': '@gjsify/https',
205
- 'inspector': '@gjsify/inspector',
206
- 'module': '@gjsify/module',
207
- 'net': '@gjsify/net',
208
- 'os': '@gjsify/os',
209
- 'path': '@gjsify/path',
196
+ http: '@gjsify/http',
197
+ http2: '@gjsify/http2',
198
+ https: '@gjsify/https',
199
+ inspector: '@gjsify/inspector',
200
+ module: '@gjsify/module',
201
+ net: '@gjsify/net',
202
+ os: '@gjsify/os',
203
+ path: '@gjsify/path',
210
204
  'path/posix': '@gjsify/path/posix',
211
205
  'path/win32': '@gjsify/path/win32',
212
- 'perf_hooks': '@gjsify/perf_hooks',
213
- 'process': '@gjsify/process',
214
- 'punycode': '@gjsify/punycode', // stub — deprecated, low priority
215
- 'querystring': '@gjsify/querystring',
216
- 'readline': '@gjsify/readline',
206
+ perf_hooks: '@gjsify/perf_hooks',
207
+ process: '@gjsify/process',
208
+ punycode: '@gjsify/punycode', // stub — deprecated, low priority
209
+ querystring: '@gjsify/querystring',
210
+ readline: '@gjsify/readline',
217
211
  'readline/promises': '@gjsify/readline/promises',
218
- 'repl': '@gjsify/repl', // stub — low priority
219
- 'stream': '@gjsify/stream',
212
+ repl: '@gjsify/repl', // stub — low priority
213
+ stream: '@gjsify/stream',
220
214
  'stream/web': '@gjsify/stream/web',
221
215
  'stream/consumers': '@gjsify/stream/consumers',
222
216
  'stream/promises': '@gjsify/stream/promises',
223
- 'string_decoder': '@gjsify/string_decoder',
224
- 'sys': '@gjsify/sys',
217
+ string_decoder: '@gjsify/string_decoder',
218
+ sys: '@gjsify/sys',
225
219
  // 'test': '@gjsify/test', // not planned — use @gjsify/unit instead
226
- 'timers': '@gjsify/timers',
220
+ timers: '@gjsify/timers',
227
221
  'timers/promises': '@gjsify/timers/promises',
228
- 'tls': '@gjsify/tls',
229
- 'tty': '@gjsify/tty',
230
- 'url': '@gjsify/url',
231
- 'util': '@gjsify/util',
222
+ tls: '@gjsify/tls',
223
+ tty: '@gjsify/tty',
224
+ url: '@gjsify/url',
225
+ util: '@gjsify/util',
232
226
  'util/types': '@gjsify/util/types',
233
- 'v8': '@gjsify/v8',
234
- 'vm': '@gjsify/vm',
235
- 'wasi': '@gjsify/wasi', // stub — low priority (WebAssembly System Interface)
236
- 'sqlite': '@gjsify/sqlite',
237
- 'worker_threads': '@gjsify/worker_threads',
238
- 'zlib': '@gjsify/zlib',
227
+ v8: '@gjsify/v8',
228
+ vm: '@gjsify/vm',
229
+ wasi: '@gjsify/wasi', // stub — low priority (WebAssembly System Interface)
230
+ sqlite: '@gjsify/sqlite',
231
+ worker_threads: '@gjsify/worker_threads',
232
+ zlib: '@gjsify/zlib',
239
233
 
240
234
  // Third party Node Modules
241
235
  'node-fetch': '@gjsify/fetch',
@@ -249,7 +243,7 @@ export const ALIASES_NODE_FOR_GJS = {
249
243
  // resolves to @gjsify/ws unchanged, including the `typeof ws ===
250
244
  // 'function'` heuristic used by @thaunknown/simple-websocket and
251
245
  // similar transitive users.
252
- 'ws': '@gjsify/ws',
246
+ ws: '@gjsify/ws',
253
247
 
254
248
  // isomorphic-ws's browser.js is literally `module.exports = WebSocket`
255
249
  // — just the native class. On GJS that native class is @gjsify/websocket
@@ -258,7 +252,7 @@ export const ALIASES_NODE_FOR_GJS = {
258
252
  // Consumers who do `import WS from 'isomorphic-ws'` get our class
259
253
  // unchanged — one less delegation hop than going through @gjsify/ws.
260
254
  'isomorphic-ws': '@gjsify/websocket',
261
- }
255
+ };
262
256
 
263
257
  /**
264
258
  * Record of Node.js modules (built-in or 3rd-party) and their `@gjsify/<X>`
@@ -332,65 +326,65 @@ export const ALIASES_NODE_FOR_GJS = {
332
326
  * made the `crypto` / `zlib` root-body routing read as latent.)
333
327
  */
334
328
  const ALIASES_NODE_FOR_BROWSER_TABLE = {
335
- 'assert': '@gjsify/assert',
336
- 'assert/strict': '@gjsify/assert/strict',
337
- 'async_hooks': '@gjsify/async_hooks',
338
- 'buffer': '@gjsify/buffer',
339
- 'child_process': '@gjsify/child_process/browser', // none slot — NAMED throwing stub
340
- 'cluster': '@gjsify/empty', // (B) simulatable over Web Workers — unbuilt
341
- 'console': '@gjsify/console',
342
- 'constants': '@gjsify/constants',
343
- 'crypto': '@gjsify/crypto/browser', // partial slot — name the platform entry
344
- 'dgram': '@gjsify/empty', // (B) simulatable over WebRTC data channels — unbuilt
345
- 'diagnostics_channel': '@gjsify/diagnostics_channel',
346
- 'dns': '@gjsify/dns/browser', // partial slot — name the platform entry
347
- 'dns/promises': '@gjsify/empty', // (A) blocked: no ./browser/promises subpath yet
348
- 'domain': '@gjsify/domain',
349
- 'events': '@gjsify/events',
350
- 'fs': '@gjsify/fs/browser', // partial slot — name the platform entry
351
- 'fs/promises': '@gjsify/fs/browser/promises',
352
- 'http': '@gjsify/http/browser', // partial slot — name the platform entry
353
- 'http2': '@gjsify/empty', // (C) impossible — needs a named throwing stub
354
- 'https': '@gjsify/https/browser', // partial slot — name the platform entry
355
- 'inspector': '@gjsify/empty', // (C) impossible — needs a named throwing stub
356
- 'module': '@gjsify/module/browser', // partial slot — name the platform entry
357
- 'net': '@gjsify/net/browser', // none slot — NAMED throwing stub
358
- 'os': '@gjsify/os',
359
- 'path': '@gjsify/path',
360
- 'path/posix': '@gjsify/path/posix',
361
- 'path/win32': '@gjsify/path/win32',
362
- 'perf_hooks': '@gjsify/perf_hooks',
363
- 'process': '@gjsify/process', // PR-D: flips today's `@gjsify/empty`
364
- 'punycode': '@gjsify/punycode',
365
- 'querystring': '@gjsify/querystring',
366
- 'readline': '@gjsify/empty', // (B) stream-generic; simulatable — unbuilt
367
- 'readline/promises': '@gjsify/empty', // (B) stream-generic; simulatable — unbuilt
368
- 'repl': '@gjsify/empty', // (C) impossible, and no @gjsify/repl package exists
369
- 'stream': '@gjsify/stream',
370
- 'stream/web': '@gjsify/stream/web',
371
- 'stream/consumers': '@gjsify/stream/consumers',
372
- 'stream/promises': '@gjsify/stream/promises',
373
- 'string_decoder': '@gjsify/string_decoder',
374
- 'sys': '@gjsify/sys',
375
- 'timers': '@gjsify/timers',
376
- 'timers/promises': '@gjsify/timers/promises',
377
- 'tls': '@gjsify/tls/browser', // none slot — NAMED throwing stub
378
- 'tty': '@gjsify/empty', // (B) isatty()===false is honest — unbuilt
379
- 'url': '@gjsify/url',
380
- 'util': '@gjsify/util',
381
- 'util/types': '@gjsify/util/types',
382
- 'v8': '@gjsify/empty', // (B) serialize/deserialize over structuredClone — unbuilt
383
- 'vm': '@gjsify/vm',
384
- 'wasi': '@gjsify/empty', // (C) impossible, and no @gjsify/wasi package exists
385
- 'sqlite': '@gjsify/sqlite/browser', // partial slot — name the platform entry
386
- 'worker_threads': '@gjsify/worker_threads/browser', // partial slot — name the platform entry
387
- 'zlib': '@gjsify/zlib/browser', // partial slot — name the platform entry
329
+ assert: '@gjsify/assert',
330
+ 'assert/strict': '@gjsify/assert/strict',
331
+ async_hooks: '@gjsify/async_hooks',
332
+ buffer: '@gjsify/buffer',
333
+ child_process: '@gjsify/child_process/browser', // none slot — NAMED throwing stub
334
+ cluster: '@gjsify/empty', // (B) simulatable over Web Workers — unbuilt
335
+ console: '@gjsify/console',
336
+ constants: '@gjsify/constants',
337
+ crypto: '@gjsify/crypto/browser', // partial slot — name the platform entry
338
+ dgram: '@gjsify/empty', // (B) simulatable over WebRTC data channels — unbuilt
339
+ diagnostics_channel: '@gjsify/diagnostics_channel',
340
+ dns: '@gjsify/dns/browser', // partial slot — name the platform entry
341
+ 'dns/promises': '@gjsify/empty', // (A) blocked: no ./browser/promises subpath yet
342
+ domain: '@gjsify/domain',
343
+ events: '@gjsify/events',
344
+ fs: '@gjsify/fs/browser', // partial slot — name the platform entry
345
+ 'fs/promises': '@gjsify/fs/browser/promises',
346
+ http: '@gjsify/http/browser', // partial slot — name the platform entry
347
+ http2: '@gjsify/empty', // (C) impossible — needs a named throwing stub
348
+ https: '@gjsify/https/browser', // partial slot — name the platform entry
349
+ inspector: '@gjsify/empty', // (C) impossible — needs a named throwing stub
350
+ module: '@gjsify/module/browser', // partial slot — name the platform entry
351
+ net: '@gjsify/net/browser', // none slot — NAMED throwing stub
352
+ os: '@gjsify/os',
353
+ path: '@gjsify/path',
354
+ 'path/posix': '@gjsify/path/posix',
355
+ 'path/win32': '@gjsify/path/win32',
356
+ perf_hooks: '@gjsify/perf_hooks',
357
+ process: '@gjsify/process', // PR-D: flips today's `@gjsify/empty`
358
+ punycode: '@gjsify/punycode',
359
+ querystring: '@gjsify/querystring',
360
+ readline: '@gjsify/empty', // (B) stream-generic; simulatable — unbuilt
361
+ 'readline/promises': '@gjsify/empty', // (B) stream-generic; simulatable — unbuilt
362
+ repl: '@gjsify/empty', // (C) impossible, and no @gjsify/repl package exists
363
+ stream: '@gjsify/stream',
364
+ 'stream/web': '@gjsify/stream/web',
365
+ 'stream/consumers': '@gjsify/stream/consumers',
366
+ 'stream/promises': '@gjsify/stream/promises',
367
+ string_decoder: '@gjsify/string_decoder',
368
+ sys: '@gjsify/sys',
369
+ timers: '@gjsify/timers',
370
+ 'timers/promises': '@gjsify/timers/promises',
371
+ tls: '@gjsify/tls/browser', // none slot — NAMED throwing stub
372
+ tty: '@gjsify/empty', // (B) isatty()===false is honest — unbuilt
373
+ url: '@gjsify/url',
374
+ util: '@gjsify/util',
375
+ 'util/types': '@gjsify/util/types',
376
+ v8: '@gjsify/empty', // (B) serialize/deserialize over structuredClone — unbuilt
377
+ vm: '@gjsify/vm',
378
+ wasi: '@gjsify/empty', // (C) impossible, and no @gjsify/wasi package exists
379
+ sqlite: '@gjsify/sqlite/browser', // partial slot — name the platform entry
380
+ worker_threads: '@gjsify/worker_threads/browser', // partial slot — name the platform entry
381
+ zlib: '@gjsify/zlib/browser', // partial slot — name the platform entry
388
382
 
389
383
  // Third-party
390
- 'node-fetch': '@gjsify/empty', // (A') native-available: wants @gjsify/fetch/globals
391
- 'ws': '@gjsify/ws/browser', // partial slot — name the platform entry
392
- 'isomorphic-ws': '@gjsify/empty', // (A') native-available: wants a WebSocket re-export
393
- }
384
+ 'node-fetch': '@gjsify/empty', // (A') native-available: wants @gjsify/fetch/globals
385
+ ws: '@gjsify/ws/browser', // partial slot — name the platform entry
386
+ 'isomorphic-ws': '@gjsify/empty', // (A') native-available: wants a WebSocket re-export
387
+ };
394
388
 
395
389
  /**
396
390
  * Bare Node-builtin specifier → polyfill / empty-stub mapping for `--app
@@ -399,10 +393,7 @@ const ALIASES_NODE_FOR_BROWSER_TABLE = {
399
393
  * and it exports a `./browser` subpath). See `withDerivedSlotRouting` above for
400
394
  * why the two-pass chain has to be collapsed here.
401
395
  */
402
- export const ALIASES_NODE_FOR_BROWSER = withDerivedSlotRouting(
403
- ALIASES_NODE_FOR_BROWSER_TABLE,
404
- 'browser',
405
- );
396
+ export const ALIASES_NODE_FOR_BROWSER = withDerivedSlotRouting(ALIASES_NODE_FOR_BROWSER_TABLE, 'browser');
406
397
 
407
398
  /**
408
399
  * Bare Node-builtin specifier → polyfill / empty-stub mapping for `--app
@@ -438,66 +429,66 @@ export const ALIASES_NODE_FOR_BROWSER = withDerivedSlotRouting(
438
429
  */
439
430
  export const ALIASES_NODE_FOR_NATIVESCRIPT = {
440
431
  // Server-only Node built-ins → empty stub
441
- 'child_process': '@gjsify/empty',
442
- 'cluster': '@gjsify/empty',
443
- 'dgram': '@gjsify/empty',
444
- 'dns': '@gjsify/empty',
445
- 'dns/promises': '@gjsify/empty',
446
- 'inspector': '@gjsify/empty',
447
- 'net': '@gjsify/empty',
448
- 'tls': '@gjsify/empty',
449
- 'tty': '@gjsify/empty',
450
- 'http': '@gjsify/empty',
451
- 'https': '@gjsify/empty',
452
- 'http2': '@gjsify/empty',
453
- 'readline': '@gjsify/empty',
454
- 'repl': '@gjsify/empty',
455
- 'v8': '@gjsify/empty',
456
- 'vm': '@gjsify/empty',
457
- 'worker_threads': '@gjsify/empty',
458
- 'perf_hooks': '@gjsify/empty',
459
- 'diagnostics_channel': '@gjsify/empty',
460
- 'domain': '@gjsify/empty',
461
- 'sqlite': '@gjsify/empty',
462
- 'sys': '@gjsify/empty',
463
- 'zlib': '@gjsify/empty',
432
+ child_process: '@gjsify/empty',
433
+ cluster: '@gjsify/empty',
434
+ dgram: '@gjsify/empty',
435
+ dns: '@gjsify/empty',
436
+ 'dns/promises': '@gjsify/empty',
437
+ inspector: '@gjsify/empty',
438
+ net: '@gjsify/empty',
439
+ tls: '@gjsify/empty',
440
+ tty: '@gjsify/empty',
441
+ http: '@gjsify/empty',
442
+ https: '@gjsify/empty',
443
+ http2: '@gjsify/empty',
444
+ readline: '@gjsify/empty',
445
+ repl: '@gjsify/empty',
446
+ v8: '@gjsify/empty',
447
+ vm: '@gjsify/empty',
448
+ worker_threads: '@gjsify/empty',
449
+ perf_hooks: '@gjsify/empty',
450
+ diagnostics_channel: '@gjsify/empty',
451
+ domain: '@gjsify/empty',
452
+ sqlite: '@gjsify/empty',
453
+ sys: '@gjsify/empty',
454
+ zlib: '@gjsify/empty',
464
455
 
465
456
  // Mobile-tractable Node built-ins → @gjsify/<X>
466
- 'assert': '@gjsify/assert',
467
- 'assert/strict': '@gjsify/assert',
468
- 'async_hooks': '@gjsify/async_hooks',
469
- 'buffer': '@gjsify/buffer',
457
+ assert: '@gjsify/assert',
458
+ 'assert/strict': '@gjsify/assert',
459
+ async_hooks: '@gjsify/async_hooks',
460
+ buffer: '@gjsify/buffer',
470
461
  // `@gjsify/module` (not `@gjsify/empty`): provides the named exports
471
462
  // `createRequire` / `builtinModules` / `isBuiltin`, so `import { createRequire }
472
463
  // from 'module'` in deps (e.g. css-tree) resolves instead of failing the build.
473
- 'module': '@gjsify/module',
474
- 'crypto': '@gjsify/crypto',
475
- 'events': '@gjsify/events',
464
+ module: '@gjsify/module',
465
+ crypto: '@gjsify/crypto',
466
+ events: '@gjsify/events',
476
467
  // @gjsify/fs uses gi://Gio (GJS-only). On NS, route to the native bridge.
477
- 'fs': '@gjsify/native-fs-bridge',
478
- 'fs/promises': '@gjsify/native-fs-bridge',
479
- 'os': '@gjsify/os',
480
- 'path': '@gjsify/path',
481
- 'path/posix': '@gjsify/path/posix',
482
- 'path/win32': '@gjsify/path/win32',
483
- 'process': '@gjsify/process',
484
- 'stream': '@gjsify/stream',
485
- 'stream/promises': '@gjsify/stream/promises',
486
- 'stream/web': '@gjsify/stream/web',
487
- 'string_decoder': '@gjsify/string_decoder',
488
- 'url': '@gjsify/url',
489
- 'util': '@gjsify/util',
490
- 'util/types': '@gjsify/util/types',
491
- 'querystring': '@gjsify/querystring',
492
- 'console': '@gjsify/console',
493
- 'timers': '@gjsify/timers',
494
- 'timers/promises': '@gjsify/timers/promises',
468
+ fs: '@gjsify/native-fs-bridge',
469
+ 'fs/promises': '@gjsify/native-fs-bridge',
470
+ os: '@gjsify/os',
471
+ path: '@gjsify/path',
472
+ 'path/posix': '@gjsify/path/posix',
473
+ 'path/win32': '@gjsify/path/win32',
474
+ process: '@gjsify/process',
475
+ stream: '@gjsify/stream',
476
+ 'stream/promises': '@gjsify/stream/promises',
477
+ 'stream/web': '@gjsify/stream/web',
478
+ string_decoder: '@gjsify/string_decoder',
479
+ url: '@gjsify/url',
480
+ util: '@gjsify/util',
481
+ 'util/types': '@gjsify/util/types',
482
+ querystring: '@gjsify/querystring',
483
+ console: '@gjsify/console',
484
+ timers: '@gjsify/timers',
485
+ 'timers/promises': '@gjsify/timers/promises',
495
486
 
496
487
  // Third-party
497
- 'node-fetch': '@gjsify/empty', // NS has native fetch
498
- 'ws': '@gjsify/empty', // NS has its own WebSocket
499
- 'isomorphic-ws': '@gjsify/empty',
500
- }
488
+ 'node-fetch': '@gjsify/empty', // NS has native fetch
489
+ ws: '@gjsify/empty', // NS has its own WebSocket
490
+ 'isomorphic-ws': '@gjsify/empty',
491
+ };
501
492
 
502
493
  /** Record of Web modules and his replacement for Gjs */
503
494
  export const ALIASES_WEB_FOR_GJS = {
@@ -508,14 +499,14 @@ export const ALIASES_WEB_FOR_GJS = {
508
499
  'dom-exception': '@gjsify/dom-exception',
509
500
  'event-target-shim': '@gjsify/dom-events',
510
501
  'message-channel': '@gjsify/message-channel',
511
- 'eventsource': '@gjsify/eventsource',
512
- 'fetch': '@gjsify/fetch',
513
- 'formdata': '@gjsify/formdata',
502
+ eventsource: '@gjsify/eventsource',
503
+ fetch: '@gjsify/fetch',
504
+ formdata: '@gjsify/formdata',
514
505
  'html-image-element': '@gjsify/html-image-element',
515
- 'webcrypto': '@gjsify/webcrypto',
516
- 'webgl': '@gjsify/webgl',
517
- 'websocket': '@gjsify/websocket',
518
- 'webstorage': '@gjsify/webstorage',
506
+ webcrypto: '@gjsify/webcrypto',
507
+ webgl: '@gjsify/webgl',
508
+ websocket: '@gjsify/websocket',
509
+ webstorage: '@gjsify/webstorage',
519
510
 
520
511
  // /register subpaths (side-effect only — opt-in to global registration)
521
512
  'abort-controller/register': '@gjsify/abort-controller/register',
@@ -540,23 +531,23 @@ export const ALIASES_WEB_FOR_GJS = {
540
531
  'web-streams/register/queuing': '@gjsify/web-streams/register/queuing',
541
532
 
542
533
  // xmlhttprequest (implemented in @gjsify/fetch)
543
- 'xmlhttprequest': '@gjsify/fetch',
534
+ xmlhttprequest: '@gjsify/fetch',
544
535
  'xmlhttprequest/register': '@gjsify/fetch/register/xhr',
545
536
  '@gjsify/xmlhttprequest': '@gjsify/fetch',
546
537
  '@gjsify/xmlhttprequest/register': '@gjsify/fetch/register/xhr',
547
- 'domparser': '@gjsify/domparser',
538
+ domparser: '@gjsify/domparser',
548
539
  'domparser/register': '@gjsify/domparser/register',
549
540
 
550
541
  // Web Audio API (GStreamer backend)
551
- 'webaudio': '@gjsify/webaudio',
542
+ webaudio: '@gjsify/webaudio',
552
543
  'webaudio/register': '@gjsify/webaudio/register',
553
544
 
554
545
  // Gamepad API (libmanette backend)
555
- 'gamepad': '@gjsify/gamepad',
546
+ gamepad: '@gjsify/gamepad',
556
547
  'gamepad/register': '@gjsify/gamepad/register',
557
548
 
558
549
  // WebRTC API (GStreamer webrtcbin backend)
559
- 'webrtc': '@gjsify/webrtc',
550
+ webrtc: '@gjsify/webrtc',
560
551
  'webrtc/register': '@gjsify/webrtc/register',
561
552
  'webrtc/register/peer-connection': '@gjsify/webrtc/register/peer-connection',
562
553
  'webrtc/register/data-channel': '@gjsify/webrtc/register/data-channel',
@@ -567,10 +558,10 @@ export const ALIASES_WEB_FOR_GJS = {
567
558
  // WebAssembly Promise APIs polyfill — wraps the synchronous Module/Instance
568
559
  // constructors so WebAssembly.{compile,instantiate,validate,...} resolve
569
560
  // instead of throwing the SpiderMonkey 128 stub error.
570
- 'webassembly': '@gjsify/webassembly',
561
+ webassembly: '@gjsify/webassembly',
571
562
  'webassembly/register': '@gjsify/webassembly/register',
572
563
  'webassembly/register/promise': '@gjsify/webassembly/register/promise',
573
- }
564
+ };
574
565
 
575
566
  /** General record of modules for Node */
576
567
  export const ALIASES_GENERAL_FOR_NODE = {
@@ -587,7 +578,7 @@ export const ALIASES_GENERAL_FOR_NODE = {
587
578
  '@gjsify/web-globals/register': '@gjsify/empty',
588
579
  '@gjsify/web-globals/register/performance': '@gjsify/empty',
589
580
  '@gjsify/web-globals/register/formdata': '@gjsify/empty',
590
- }
581
+ };
591
582
 
592
583
  /**
593
584
  * Record of GJS built-in module specifiers and their replacement for the
@@ -611,10 +602,10 @@ export const ALIASES_GENERAL_FOR_NODE = {
611
602
  * the engine's foreign-struct seam knows about).
612
603
  */
613
604
  const ALIASES_GJS_FOR_NODE = {
614
- 'system': '@gjsify/node-gi/system',
615
- 'gettext': '@gjsify/node-gi/gettext',
616
- 'cairo': '@gjsify/node-gi/cairo',
617
- }
605
+ system: '@gjsify/node-gi/system',
606
+ gettext: '@gjsify/node-gi/gettext',
607
+ cairo: '@gjsify/node-gi/cairo',
608
+ };
618
609
 
619
610
  export { ALIASES_GJS_FOR_NODE };
620
611
 
@@ -643,19 +634,19 @@ export const ALIASES_WEB_FOR_NODE = {
643
634
  // works without any GJS deps; routing to it gives consumers a working
644
635
  // EventSource on Node out of the box. Same fix pattern as the `dom-events`
645
636
  // entry above.
646
- 'eventsource': '@gjsify/eventsource',
637
+ eventsource: '@gjsify/eventsource',
647
638
  // 'fetch' routes to @gjsify/fetch/globals on Node — the globals.mjs
648
639
  // re-exports the native globalThis.{fetch,Request,Response,Headers,
649
640
  // FormData} as named exports. The dynamic resolver routes
650
641
  // @gjsify/fetch to the same /globals subpath via its runtimes
651
642
  // triplet declaration (`node:"native"`), so both entry forms converge.
652
- 'fetch': '@gjsify/fetch/globals',
653
- 'formdata': '@gjsify/formdata/globals',
643
+ fetch: '@gjsify/fetch/globals',
644
+ formdata: '@gjsify/formdata/globals',
654
645
  'html-image-element': '@gjsify/html-image-element',
655
- 'webcrypto': '@gjsify/webcrypto/globals',
656
- 'webgl': '@gjsify/webgl',
657
- 'websocket': '@gjsify/websocket/globals',
658
- 'webstorage': '@gjsify/webstorage',
646
+ webcrypto: '@gjsify/webcrypto/globals',
647
+ webgl: '@gjsify/webgl',
648
+ websocket: '@gjsify/websocket/globals',
649
+ webstorage: '@gjsify/webstorage',
659
650
 
660
651
  // /register subpaths — no-op on Node (native globals are already set)
661
652
  'abort-controller/register': '@gjsify/empty',
@@ -718,26 +709,26 @@ export const ALIASES_WEB_FOR_NODE = {
718
709
  '@gjsify/buffer/register': '@gjsify/empty',
719
710
 
720
711
  // xmlhttprequest + DOMParser — no-op on Node
721
- 'xmlhttprequest': '@gjsify/empty',
712
+ xmlhttprequest: '@gjsify/empty',
722
713
  'xmlhttprequest/register': '@gjsify/empty',
723
714
  '@gjsify/xmlhttprequest': '@gjsify/empty',
724
715
  '@gjsify/xmlhttprequest/register': '@gjsify/empty',
725
- 'domparser': '@gjsify/empty',
716
+ domparser: '@gjsify/empty',
726
717
  'domparser/register': '@gjsify/empty',
727
718
  '@gjsify/domparser/register': '@gjsify/empty',
728
719
 
729
720
  // Web Audio API — no-op on Node (experimental --experimental-web-audio not widely available)
730
- 'webaudio': '@gjsify/empty',
721
+ webaudio: '@gjsify/empty',
731
722
  'webaudio/register': '@gjsify/empty',
732
723
  '@gjsify/webaudio/register': '@gjsify/empty',
733
724
 
734
725
  // Gamepad API — no-op on Node
735
- 'gamepad': '@gjsify/empty',
726
+ gamepad: '@gjsify/empty',
736
727
  'gamepad/register': '@gjsify/empty',
737
728
  '@gjsify/gamepad/register': '@gjsify/empty',
738
729
 
739
730
  // WebRTC API — no-op on Node (Phase 1 is GStreamer-only, no fallback)
740
- 'webrtc': '@gjsify/empty',
731
+ webrtc: '@gjsify/empty',
741
732
  'webrtc/register': '@gjsify/empty',
742
733
  'webrtc/register/peer-connection': '@gjsify/empty',
743
734
  'webrtc/register/data-channel': '@gjsify/empty',
@@ -755,9 +746,9 @@ export const ALIASES_WEB_FOR_NODE = {
755
746
  // WebAssembly Promise APIs — native on Node (no polyfill needed); the
756
747
  // bare `webassembly` specifier maps to /globals so consumers can import
757
748
  // typed helpers without dragging the polyfill into the bundle.
758
- 'webassembly': '@gjsify/webassembly/globals',
749
+ webassembly: '@gjsify/webassembly/globals',
759
750
  'webassembly/register': '@gjsify/empty',
760
751
  'webassembly/register/promise': '@gjsify/empty',
761
752
  '@gjsify/webassembly/register': '@gjsify/empty',
762
753
  '@gjsify/webassembly/register/promise': '@gjsify/empty',
763
- }
754
+ };