@gjsify/utils 0.21.0 → 0.23.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 CHANGED
@@ -10,15 +10,46 @@ Part of the [gjsify](https://github.com/gjsify/gjsify) project — Node.js and W
10
10
  gjsify install @gjsify/utils
11
11
  ```
12
12
 
13
- ## Usage
13
+ ## Two entry points
14
+
15
+ The package has a GJS-only half and a cross-runtime half, and the specifier you import
16
+ from decides which one you get. Pick the narrowest one that covers your imports.
17
+
18
+ | Specifier | Runtimes | Contents |
19
+ |---|---|---|
20
+ | `@gjsify/utils/core` | GJS · Node · browser · NativeScript | everything that is well-defined without GLib/Gio |
21
+ | `@gjsify/utils` | **GJS only** | `…/core` plus the six modules that call into GLib/Gio |
22
+ | `@gjsify/utils/main-loop` | GJS · Node · browser · NativeScript | just `ensureMainLoop` / `quitMainLoop` |
14
23
 
15
24
  ```typescript
16
- import { ensureMainLoop } from '@gjsify/utils';
25
+ // Cross-runtime — safe from a package whose browser / nativescript slot is
26
+ // `polyfill` or `partial`.
27
+ import { makeCallable, nextTick, createNodeError, registerGlobal } from '@gjsify/utils/core';
17
28
 
18
- // Start GLib MainLoop if not already running (no-op on Node.js)
19
- ensureMainLoop();
29
+ // GJS-only — importing this is a declaration that your package reaches GLib/Gio.
30
+ import { cli, existsSync, readBytesAsync } from '@gjsify/utils';
20
31
  ```
21
32
 
33
+ `@gjsify/utils/core` carries the pure helpers (`makeCallable`, `deferEmit`,
34
+ `initErrorV8Methods`, the `gio-errors` errno mapping — `createNodeError`,
35
+ `createGLibFileError`, `isNotFoundError` and the `GIO_ERROR_TO_NODE` /
36
+ `GLIB_FILE_ERROR_TO_NODE` tables — `registerGlobal`, `notImplemented`,
37
+ `warnNotImplemented`, `queueMicrotask`, `structuredClone`) plus the two
38
+ **GJS-guarded** modules that probe `globalThis.imports?.gi` and fall back to a
39
+ portable path (`ensureMainLoop` / `quitMainLoop`, `nextTick`).
40
+
41
+ The root barrel adds `gbytesToUint8Array`, `cli`, `readJSON`, `existsFD`, `existsSync`,
42
+ `gioAsync`, `readBytesAsync`, `inputStreamAsyncIterator`, `resolve`, `getProgramExe`,
43
+ `getProgramDir`, `getPathSeparator` and `getNodeModulesPath` — all of which take a
44
+ top-level `@girs/*` value import or a bare `imports.*` read and therefore only work
45
+ under GJS.
46
+
47
+ Off GJS the bundler substitutes an empty module for `@girs/*`, so a GJS-only helper
48
+ reached from a browser bundle does **not** fail at build or load time — it throws a
49
+ `TypeError` the first time it is called. `scripts/audit-runtimes.mjs --check` enforces
50
+ the split statically; see
51
+ [ADR 0014](../../../docs/adr/0014-utils-core-subpath-and-platform-entry-routing.md).
52
+
22
53
  ## License
23
54
 
24
55
  MIT
@@ -0,0 +1 @@
1
+ import{makeCallable as e}from"./callable.js";import{deferEmit as t}from"./defer.js";import{initErrorV8Methods as n}from"./error.js";import{GIO_ERROR_TO_NODE as r,GLIB_FILE_ERROR_TO_NODE as i,createGLibFileError as a,createNodeError as o,isNotFoundError as s}from"./gio-errors.js";import{registerGlobal as c}from"./globals.js";import{notImplemented as l,warnNotImplemented as u}from"./message.js";import{queueMicrotask as d}from"./microtask.js";import{mapMachine as f,mapSysname as p}from"./platform-names.js";import{structuredClone as m}from"./structured-clone.js";import{ensureMainLoop as h,quitMainLoop as g}from"./main-loop.js";import{__resetBurstStateForTests as _,nextTick as v}from"./next-tick.js";export{r as GIO_ERROR_TO_NODE,i as GLIB_FILE_ERROR_TO_NODE,_ as __resetBurstStateForTests,a as createGLibFileError,o as createNodeError,t as deferEmit,h as ensureMainLoop,n as initErrorV8Methods,s as isNotFoundError,e as makeCallable,f as mapMachine,p as mapSysname,v as nextTick,l as notImplemented,d as queueMicrotask,g as quitMainLoop,c as registerGlobal,m as structuredClone,u as warnNotImplemented};
package/lib/esm/error.js CHANGED
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";const initErrorV8Methods=e=>{let t=Error;t.captureStackTrace||=function(e,t){let n=Error();Object.defineProperty(t||e,`stack`,{configurable:!0,get:function getStack(){var e=n.stack;return Object.defineProperty(this,`stack`,{value:e}),e}})}};export{initErrorV8Methods};
1
+ import"./_virtual/_rolldown/runtime.js";const initErrorV8Methods=e=>{let t=Error;t.captureStackTrace||=function(e,t){let n=Error();Object.defineProperty(t||e,"stack",{configurable:!0,get:function getStack(){var e=n.stack;return Object.defineProperty(this,"stack",{value:e}),e}})}};export{initErrorV8Methods};
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{gbytesToUint8Array as e}from"./byte-array.js";import{makeCallable as t}from"./callable.js";import{cli as n}from"./cli.js";import{deferEmit as r}from"./defer.js";import{initErrorV8Methods as i}from"./error.js";import{readJSON as a}from"./file.js";import{existsFD as o,existsSync as s}from"./fs.js";import{GIO_ERROR_TO_NODE as c,GLIB_FILE_ERROR_TO_NODE as l,createGLibFileError as u,createNodeError as d,isNotFoundError as f}from"./gio-errors.js";import{gioAsync as p,inputStreamAsyncIterator as m,readBytesAsync as h}from"./gio.js";import{registerGlobal as g}from"./globals.js";import{notImplemented as _,warnNotImplemented as v}from"./message.js";import{queueMicrotask as y}from"./microtask.js";import{__resetBurstStateForTests as b,nextTick as x}from"./next-tick.js";import{getNodeModulesPath as S,getPathSeparator as C,getProgramDir as w,getProgramExe as T,resolve as E}from"./path.js";import{structuredClone as D}from"./structured-clone.js";import{ensureMainLoop as O,quitMainLoop as k}from"./main-loop.js";export{c as GIO_ERROR_TO_NODE,l as GLIB_FILE_ERROR_TO_NODE,b as __resetBurstStateForTests,n as cli,u as createGLibFileError,d as createNodeError,r as deferEmit,O as ensureMainLoop,o as existsFD,s as existsSync,e as gbytesToUint8Array,S as getNodeModulesPath,C as getPathSeparator,w as getProgramDir,T as getProgramExe,p as gioAsync,i as initErrorV8Methods,m as inputStreamAsyncIterator,f as isNotFoundError,t as makeCallable,x as nextTick,_ as notImplemented,y as queueMicrotask,k as quitMainLoop,h as readBytesAsync,a as readJSON,g as registerGlobal,E as resolve,D as structuredClone,v as warnNotImplemented};
1
+ import{gbytesToUint8Array as e}from"./byte-array.js";import{makeCallable as t}from"./callable.js";import{cli as n}from"./cli.js";import{deferEmit as r}from"./defer.js";import{initErrorV8Methods as i}from"./error.js";import{GIO_ERROR_TO_NODE as a,GLIB_FILE_ERROR_TO_NODE as o,createGLibFileError as s,createNodeError as c,isNotFoundError as l}from"./gio-errors.js";import{registerGlobal as u}from"./globals.js";import{notImplemented as d,warnNotImplemented as f}from"./message.js";import{queueMicrotask as p}from"./microtask.js";import{mapMachine as m,mapSysname as h}from"./platform-names.js";import{structuredClone as g}from"./structured-clone.js";import{ensureMainLoop as _,quitMainLoop as v}from"./main-loop.js";import{__resetBurstStateForTests as y,nextTick as b}from"./next-tick.js";import"./core.js";import{readJSON as x}from"./file.js";import{existsFD as S,existsSync as C}from"./fs.js";import{gioAsync as w,inputStreamAsyncIterator as T,readBytesAsync as E}from"./gio.js";import{getNodeModulesPath as D,getPathSeparator as O,getProgramDir as k,getProgramExe as A,resolve as j}from"./path.js";export{a as GIO_ERROR_TO_NODE,o as GLIB_FILE_ERROR_TO_NODE,y as __resetBurstStateForTests,n as cli,s as createGLibFileError,c as createNodeError,r as deferEmit,_ as ensureMainLoop,S as existsFD,C as existsSync,e as gbytesToUint8Array,D as getNodeModulesPath,O as getPathSeparator,k as getProgramDir,A as getProgramExe,w as gioAsync,i as initErrorV8Methods,T as inputStreamAsyncIterator,l as isNotFoundError,t as makeCallable,m as mapMachine,h as mapSysname,b as nextTick,d as notImplemented,p as queueMicrotask,v as quitMainLoop,E as readBytesAsync,x as readJSON,u as registerGlobal,j as resolve,g as structuredClone,f as warnNotImplemented};
@@ -0,0 +1 @@
1
+ import"./_virtual/_rolldown/runtime.js";function mapSysname(e){let t=e.trim();switch(t){case`Linux`:return`linux`;case`Darwin`:return`darwin`;case`FreeBSD`:return`freebsd`;case`OpenBSD`:return`openbsd`;case`NetBSD`:return`netbsd`;case`SunOS`:return`sunos`;case`AIX`:return`aix`;case`Haiku`:return`haiku`;default:return/^CYGWIN/i.test(t)?`cygwin`:/^(MINGW|MSYS|Windows)/i.test(t)?`win32`:void 0}}function mapMachine(e){let t=e.trim().toLowerCase();switch(t){case`x86_64`:case`amd64`:return`x64`;case`aarch64`:case`arm64`:return`arm64`;case`i386`:case`i486`:case`i586`:case`i686`:return`ia32`;case`ppc64le`:case`ppc64`:return`ppc64`;case`s390x`:return`s390x`;case`riscv64`:return`riscv64`;case`loongarch64`:return`loong64`;case`mipsel`:return`mipsel`;case`mips`:return`mips`;default:return/^arm/.test(t)?`arm`:void 0}}export{mapMachine,mapSysname};
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";const{toString:e}=Object.prototype;function classOf(t){return e.call(t).slice(8,-1)}function throwDataCloneError(e){let t=globalThis.DOMException;if(typeof t==`function`)throw new t(e,`DataCloneError`);let n=Error(e);throw n.name=`DataCloneError`,n}const t={Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError},n=new Set([`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function internalClone(e,r,i){if(e==null)return e;let a=typeof e;if(a===`boolean`||a===`number`||a===`string`||a===`bigint`)return e;a===`symbol`&&throwDataCloneError(`Symbol cannot be cloned`),a===`function`&&throwDataCloneError(`Function cannot be cloned`);let o=e;if(r.has(o))return r.get(o);let s=classOf(o);if(s===`Date`)return new Date(o.getTime());if(s===`RegExp`)return new RegExp(o.source,o.flags);if(s===`Boolean`||s===`Number`||s===`String`)return Object(o.valueOf());if(s===`BigInt`)return Object(BigInt.prototype.valueOf.call(o));if(o instanceof Error){let e=o,n=e.constructor?.name,a=new(n&&t[n]||t[e.name]||Error)(e.message);return a.name=e.name,`cause`in e&&Object.defineProperty(a,`cause`,{value:internalClone(e.cause,r,i),writable:!0,enumerable:!1,configurable:!0}),a}if(s===`DOMException`){let e=globalThis.DOMException;if(typeof e==`function`){let t=o;return new e(t.message,t.name)}}if(s===`ArrayBuffer`){let e=o;if(i&&i.transferred.has(e)){let t=i.transferred.get(e);return r.set(o,t),t}(e.detached===!0||e.byteLength===0&&e.detached)&&throwDataCloneError(`ArrayBuffer is detached and cannot be cloned`);let t=e.slice(0);return r.set(o,t),t}if(s===`SharedArrayBuffer`||o&&typeof o==`object`&&o.constructor?.name===`SharedBuffer`)return o;if(s===`DataView`){let e=o,t=i?.viewSnapshots.get(o),n=internalClone(e.buffer,r,i),a=t?t.byteOffset:e.byteOffset,s=t?t.byteLength:e.byteLength,c=new DataView(n,a,s);return r.set(o,c),c}if(n.has(s)){let e=o,t=i?.viewSnapshots.get(o),n=internalClone(e.buffer,r,i),a=e.constructor,s=new a(n,t?t.byteOffset:e.byteOffset,t?t.length:e.length);return r.set(o,s),s}if(s===`Map`){let e=new Map;r.set(o,e);for(let[t,n]of o)e.set(internalClone(t,r,i),internalClone(n,r,i));return e}if(s===`Set`){let e=new Set;r.set(o,e);for(let t of o)e.add(internalClone(t,r,i));return e}{let e=globalThis,t=e.Blob,n=e.File;if(typeof n==`function`&&o instanceof n){let e=o;return new n([o],e.name,{type:e.type,lastModified:e.lastModified})}if(typeof t==`function`&&o instanceof t)return new t([o],{type:o.type})}if(o instanceof WeakMap&&throwDataCloneError(`WeakMap cannot be cloned`),o instanceof WeakSet&&throwDataCloneError(`WeakSet cannot be cloned`),o instanceof WeakRef&&throwDataCloneError(`WeakRef cannot be cloned`),typeof globalThis.Promise==`function`&&o instanceof Promise&&throwDataCloneError(`Promise cannot be cloned`),s===`Array`){let e=o,t=[];r.set(o,t);for(let n=0;n<e.length;n++)n in e&&(t[n]=internalClone(e[n],r,i));return t}if(s===`Object`||typeof o==`object`){let e={};r.set(o,e);for(let t of Object.keys(o))e[t]=internalClone(o[t],r,i);return e}throwDataCloneError(`${s} cannot be cloned`)}function structuredClone(e,t){let n=t?.transfer;if(!n||n.length===0)return internalClone(e,new Map);let r=new Set;for(let e of n)if(classOf(e)===`ArrayBuffer`){let t=e;t.detached===!0&&throwDataCloneError(`ArrayBuffer in transfer list is detached`),r.add(t)}let i=new Map;r.size>0&&snapshotViewsBackedByTransferredBuffers(e,r,i,new Set);let a=new Map;for(let e of r){let t=e;typeof t.transfer!=`function`&&throwDataCloneError(`ArrayBuffer.prototype.transfer() not available — runtime is not SM140+`),a.set(e,t.transfer())}return internalClone(e,new Map,{transferred:a,viewSnapshots:i})}function snapshotViewsBackedByTransferredBuffers(e,t,r,i){if(typeof e!=`object`||!e)return;let a=e;if(i.has(a))return;i.add(a);let o=classOf(a);if(o===`DataView`){let e=a;t.has(e.buffer)&&r.set(a,{byteOffset:e.byteOffset,length:0,byteLength:e.byteLength});return}if(n.has(o)){let e=a;t.has(e.buffer)&&r.set(a,{byteOffset:e.byteOffset,length:e.length,byteLength:e.byteLength});return}if(Array.isArray(a)){for(let e=0;e<a.length;e++)e in a&&snapshotViewsBackedByTransferredBuffers(a[e],t,r,i);return}if(o===`Map`){for(let[e,n]of a)snapshotViewsBackedByTransferredBuffers(e,t,r,i),snapshotViewsBackedByTransferredBuffers(n,t,r,i);return}if(o===`Set`){for(let e of a)snapshotViewsBackedByTransferredBuffers(e,t,r,i);return}if(o===`Object`)for(let e of Object.keys(a))snapshotViewsBackedByTransferredBuffers(a[e],t,r,i)}export{structuredClone};
1
+ import"./_virtual/_rolldown/runtime.js";const{toString:e}=Object.prototype;function classOf(t){return e.call(t).slice(8,-1)}function throwDataCloneError(e){let t=globalThis.DOMException;if(typeof t==`function`)throw new t(e,`DataCloneError`);let n=Error(e);throw n.name=`DataCloneError`,n}const t={Error,EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError},n=new Set([`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function internalClone(e,r,i){if(e==null)return e;let a=typeof e;if(a===`boolean`||a===`number`||a===`string`||a===`bigint`)return e;a===`symbol`&&throwDataCloneError(`Symbol cannot be cloned`),a===`function`&&throwDataCloneError(`Function cannot be cloned`);let o=e;if(r.has(o))return r.get(o);let s=classOf(o);if(s===`Date`)return new Date(o.getTime());if(s===`RegExp`)return new RegExp(o.source,o.flags);if(s===`Boolean`||s===`Number`||s===`String`)return Object(o.valueOf());if(s===`BigInt`)return Object(BigInt.prototype.valueOf.call(o));if(o instanceof Error){let e=o,n=e.constructor?.name,a=new(n&&t[n]||t[e.name]||Error)(e.message);return a.name=e.name,`cause`in e&&Object.defineProperty(a,"cause",{value:internalClone(e.cause,r,i),writable:!0,enumerable:!1,configurable:!0}),a}if(s===`DOMException`){let e=globalThis.DOMException;if(typeof e==`function`){let t=o;return new e(t.message,t.name)}}if(s===`ArrayBuffer`){let e=o;if(i&&i.transferred.has(e)){let t=i.transferred.get(e);return r.set(o,t),t}(e.detached===!0||e.byteLength===0&&e.detached)&&throwDataCloneError(`ArrayBuffer is detached and cannot be cloned`);let t=e.slice(0);return r.set(o,t),t}if(s===`SharedArrayBuffer`||o&&typeof o==`object`&&o.constructor?.name===`SharedBuffer`)return o;if(s===`DataView`){let e=o,t=i?.viewSnapshots.get(o),n=internalClone(e.buffer,r,i),a=t?t.byteOffset:e.byteOffset,s=t?t.byteLength:e.byteLength,c=new DataView(n,a,s);return r.set(o,c),c}if(n.has(s)){let e=o,t=i?.viewSnapshots.get(o),n=internalClone(e.buffer,r,i),a=e.constructor,s=new a(n,t?t.byteOffset:e.byteOffset,t?t.length:e.length);return r.set(o,s),s}if(s===`Map`){let e=new Map;r.set(o,e);for(let[t,n]of o)e.set(internalClone(t,r,i),internalClone(n,r,i));return e}if(s===`Set`){let e=new Set;r.set(o,e);for(let t of o)e.add(internalClone(t,r,i));return e}{let e=globalThis,t=e.Blob,n=e.File;if(typeof n==`function`&&o instanceof n){let e=o;return new n([o],e.name,{type:e.type,lastModified:e.lastModified})}if(typeof t==`function`&&o instanceof t)return new t([o],{type:o.type})}if(o instanceof WeakMap&&throwDataCloneError(`WeakMap cannot be cloned`),o instanceof WeakSet&&throwDataCloneError(`WeakSet cannot be cloned`),o instanceof WeakRef&&throwDataCloneError(`WeakRef cannot be cloned`),typeof globalThis.Promise==`function`&&o instanceof Promise&&throwDataCloneError(`Promise cannot be cloned`),s===`Array`){let e=o,t=[];r.set(o,t);for(let n=0;n<e.length;n++)n in e&&(t[n]=internalClone(e[n],r,i));return t}if(s===`Object`||typeof o==`object`){let e={};r.set(o,e);for(let t of Object.keys(o))e[t]=internalClone(o[t],r,i);return e}throwDataCloneError(`${s} cannot be cloned`)}function structuredClone(e,t){let n=t?.transfer;if(!n||n.length===0)return internalClone(e,new Map);let r=new Set;for(let e of n)if(classOf(e)===`ArrayBuffer`){let t=e;t.detached===!0&&throwDataCloneError(`ArrayBuffer in transfer list is detached`),r.add(t)}let i=new Map;r.size>0&&snapshotViewsBackedByTransferredBuffers(e,r,i,new Set);let a=new Map;for(let e of r){let t=e;typeof t.transfer!=`function`&&throwDataCloneError(`ArrayBuffer.prototype.transfer() not available — runtime is not SM140+`),a.set(e,t.transfer())}return internalClone(e,new Map,{transferred:a,viewSnapshots:i})}function snapshotViewsBackedByTransferredBuffers(e,t,r,i){if(typeof e!=`object`||!e)return;let a=e;if(i.has(a))return;i.add(a);let o=classOf(a);if(o===`DataView`){let e=a;t.has(e.buffer)&&r.set(a,{byteOffset:e.byteOffset,length:0,byteLength:e.byteLength});return}if(n.has(o)){let e=a;t.has(e.buffer)&&r.set(a,{byteOffset:e.byteOffset,length:e.length,byteLength:e.byteLength});return}if(Array.isArray(a)){for(let e=0;e<a.length;e++)e in a&&snapshotViewsBackedByTransferredBuffers(a[e],t,r,i);return}if(o===`Map`){for(let[e,n]of a)snapshotViewsBackedByTransferredBuffers(e,t,r,i),snapshotViewsBackedByTransferredBuffers(n,t,r,i);return}if(o===`Set`){for(let e of a)snapshotViewsBackedByTransferredBuffers(e,t,r,i);return}if(o===`Object`)for(let e of Object.keys(a))snapshotViewsBackedByTransferredBuffers(a[e],t,r,i)}export{structuredClone};
@@ -0,0 +1,11 @@
1
+ export * from './callable.js';
2
+ export * from './defer.js';
3
+ export * from './error.js';
4
+ export * from './gio-errors.js';
5
+ export * from './globals.js';
6
+ export * from './message.js';
7
+ export * from './microtask.js';
8
+ export * from './platform-names.js';
9
+ export * from './structured-clone.js';
10
+ export * from './main-loop.js';
11
+ export * from './next-tick.js';
@@ -1,16 +1,7 @@
1
- export * from './callable.js';
1
+ export * from './core.js';
2
2
  export * from './byte-array.js';
3
3
  export * from './cli.js';
4
- export * from './defer.js';
5
- export * from './globals.js';
6
- export * from './error.js';
7
4
  export * from './file.js';
8
5
  export * from './fs.js';
9
6
  export * from './gio.js';
10
- export * from './gio-errors.js';
11
- export * from './message.js';
12
- export * from './microtask.js';
13
- export * from './next-tick.js';
14
7
  export * from './path.js';
15
- export * from './structured-clone.js';
16
- export * from './main-loop.js';
@@ -0,0 +1,6 @@
1
+ export type ProcessPlatform = 'aix' | 'android' | 'cygwin' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'netbsd' | 'openbsd' | 'sunos' | 'win32';
2
+ export type ProcessArch = 'arm' | 'arm64' | 'ia32' | 'loong64' | 'mips' | 'mipsel' | 'ppc64' | 'riscv64' | 's390x' | 'x64';
3
+ /** `uname -s` (kernel name) → Node's `process.platform` vocabulary. */
4
+ export declare function mapSysname(sysname: string): ProcessPlatform | undefined;
5
+ /** `uname -m` (machine) → Node's `process.arch` vocabulary. */
6
+ export declare function mapMachine(machine: string): ProcessArch | undefined;
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@gjsify/utils",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "description": "Utils module for gjsify",
5
5
  "module": "lib/esm/index.js",
6
6
  "types": "lib/types/index.d.ts",
7
+ "sideEffects": false,
7
8
  "files": [
8
9
  "lib"
9
10
  ],
@@ -13,6 +14,10 @@
13
14
  "types": "./lib/types/index.d.ts",
14
15
  "default": "./lib/esm/index.js"
15
16
  },
17
+ "./core": {
18
+ "types": "./lib/types/core.d.ts",
19
+ "default": "./lib/esm/core.js"
20
+ },
16
21
  "./main-loop": {
17
22
  "types": "./lib/types/main-loop.d.ts",
18
23
  "default": "./lib/esm/main-loop.js"
@@ -35,7 +40,7 @@
35
40
  "fs"
36
41
  ],
37
42
  "devDependencies": {
38
- "@gjsify/cli": "^0.21.0",
43
+ "@gjsify/cli": "^0.23.0",
39
44
  "typescript": "^6.0.3"
40
45
  },
41
46
  "dependencies": {
@@ -55,6 +60,26 @@
55
60
  },
56
61
  "homepage": "https://github.com/gjsify/gjsify/tree/main/packages/gjs/utils#readme",
57
62
  "gjsify": {
58
- "tier": 1
63
+ "tier": 1,
64
+ "runtimes": {
65
+ "gjs": "polyfill",
66
+ "node": "none",
67
+ "browser": "none",
68
+ "nativescript": "none"
69
+ },
70
+ "runtimeSubpaths": {
71
+ "./core": {
72
+ "gjs": "polyfill",
73
+ "node": "polyfill",
74
+ "browser": "polyfill",
75
+ "nativescript": "polyfill"
76
+ },
77
+ "./main-loop": {
78
+ "gjs": "polyfill",
79
+ "node": "polyfill",
80
+ "browser": "polyfill",
81
+ "nativescript": "polyfill"
82
+ }
83
+ }
59
84
  }
60
85
  }