@gjsify/child_process 0.23.0 → 0.24.2

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.
@@ -0,0 +1,2 @@
1
+ import"./_virtual/_rolldown/runtime.js";const e=`child_process`,t=`browser`;function callerFrame(e){if(!e)return;let t=[];for(let n of e.split(`
2
+ `).slice(1)){let e=n.trim();if(e&&!(e.includes(`unsupported`)||e.includes(`callerFrame`))&&(t.push(e.replace(/^at\s+/,``)),t.length===2))break}return t[1]??t[0]}function unsupported(n){let r=callerFrame(Error().stack),i=Error(`[@gjsify/${e}/${t}] ${e}.${n} is not available on the ${t} platform: a browser sandbox has no process model — no Web API can create, signal or reap an OS process.${r?` Called from ${r}.`:``}`);throw i.code=`ENOTSUP`,i.errno=-45,i.syscall=n,i.gjsifyModule=e,i.gjsifyRuntime=t,r!==void 0&&(i.gjsifyImporter=r),i}var ChildProcess=class{constructor(){unsupported(`ChildProcess`)}};function spawn(...e){return unsupported(`spawn`)}function spawnSync(...e){return unsupported(`spawnSync`)}function exec(...e){return unsupported(`exec`)}function execSync(...e){return unsupported(`execSync`)}function execFile(...e){return unsupported(`execFile`)}function execFileSync(...e){return unsupported(`execFileSync`)}const n={ChildProcess,spawn,spawnSync,exec,execSync,execFile,execFileSync};export{ChildProcess,n as default,exec,execFile,execFileSync,execSync,spawn,spawnSync};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * `child_process.ChildProcess` — constructing one implies an OS process handle,
3
+ * which does not exist here. Present so `import { ChildProcess } from
4
+ * 'child_process'` links and so `instanceof` checks compile; throws on `new`.
5
+ */
6
+ export declare class ChildProcess {
7
+ constructor();
8
+ }
9
+ export declare function spawn(..._args: unknown[]): ChildProcess;
10
+ export declare function spawnSync(..._args: unknown[]): never;
11
+ export declare function exec(..._args: unknown[]): ChildProcess;
12
+ export declare function execSync(..._args: unknown[]): never;
13
+ export declare function execFile(..._args: unknown[]): ChildProcess;
14
+ export declare function execFileSync(..._args: unknown[]): never;
15
+ declare const childProcessDefault: {
16
+ ChildProcess: typeof ChildProcess;
17
+ spawn: typeof spawn;
18
+ spawnSync: typeof spawnSync;
19
+ exec: typeof exec;
20
+ execSync: typeof execSync;
21
+ execFile: typeof execFile;
22
+ execFileSync: typeof execFileSync;
23
+ };
24
+ export default childProcessDefault;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/child_process",
3
- "version": "0.23.0",
3
+ "version": "0.24.2",
4
4
  "description": "Node.js child_process module for Gjs",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -9,6 +9,10 @@
9
9
  ".": {
10
10
  "types": "./lib/types/index.d.ts",
11
11
  "default": "./lib/esm/index.js"
12
+ },
13
+ "./browser": {
14
+ "types": "./lib/types/browser.d.ts",
15
+ "default": "./lib/esm/browser.js"
12
16
  }
13
17
  },
14
18
  "files": [
@@ -33,18 +37,18 @@
33
37
  "child_process"
34
38
  ],
35
39
  "devDependencies": {
36
- "@gjsify/cli": "^0.23.0",
37
- "@gjsify/dom-elements": "^0.23.0",
38
- "@gjsify/unit": "^0.23.0",
40
+ "@gjsify/cli": "^0.24.2",
41
+ "@gjsify/dom-elements": "^0.24.2",
42
+ "@gjsify/unit": "^0.24.2",
39
43
  "@types/node": "^25.9.2",
40
44
  "typescript": "^6.0.3"
41
45
  },
42
46
  "dependencies": {
43
47
  "@girs/gio-2.0": "^4.1.0",
44
48
  "@girs/glib-2.0": "^4.1.0",
45
- "@gjsify/buffer": "^0.23.0",
46
- "@gjsify/events": "^0.23.0",
47
- "@gjsify/utils": "^0.23.0"
49
+ "@gjsify/buffer": "^0.24.2",
50
+ "@gjsify/events": "^0.24.2",
51
+ "@gjsify/utils": "^0.24.2"
48
52
  },
49
53
  "gjsify": {
50
54
  "runtimes": {