@php-wasm/util
Advanced tools
Comparing version
28
index.js
@@ -53,3 +53,3 @@ const f = Symbol("SleepFinished"); | ||
constructor(t, s) { | ||
super(t), this.userFriendlyMessage = s, this.userFriendlyMessage || (this.userFriendlyMessage = t); | ||
super(t), this.userFriendlyMessage = s ?? t; | ||
} | ||
@@ -97,3 +97,3 @@ } | ||
} | ||
function M(e, t) { | ||
function U(e, t) { | ||
return e === "/" ? !0 : (e = c(e), t = c(t), t.startsWith(e + "/") || t === e); | ||
@@ -111,5 +111,5 @@ } | ||
} | ||
function U(e) { | ||
function q(e) { | ||
return function(t, s = [], i = {}) { | ||
const n = new w(), u = new E(n); | ||
const n = new y(), u = new E(n); | ||
return setTimeout(async () => { | ||
@@ -149,3 +149,3 @@ let r = []; | ||
constructor(t) { | ||
super(), this.childProcess = t, this.exited = !1, this.stdinData = [], t.on("stdin", (s) => { | ||
super(), this.exited = !1, this.stdinData = [], this.childProcess = t, t.on("stdin", (s) => { | ||
this.stdinData ? this.stdinData.push(s.slice()) : this.emit("stdin", s); | ||
@@ -176,8 +176,8 @@ }); | ||
} | ||
let y = 9743; | ||
class w extends h { | ||
constructor(t = y++) { | ||
super(), this.pid = t, this.stdout = new h(), this.stderr = new h(); | ||
let w = 9743; | ||
class y extends h { | ||
constructor(t = w++) { | ||
super(), this.stdout = new h(), this.stderr = new h(); | ||
const s = this; | ||
this.stdin = { | ||
this.pid = t, this.stdin = { | ||
write: (i) => { | ||
@@ -196,3 +196,3 @@ s.emit("stdin", i); | ||
} | ||
function q() { | ||
function M() { | ||
return P(36, "-_"); | ||
@@ -223,5 +223,5 @@ } | ||
b as basename, | ||
U as createSpawnHandler, | ||
q as createSpawnHandler, | ||
S as dirname, | ||
M as isParentOf, | ||
U as isParentOf, | ||
T as joinPaths, | ||
@@ -231,5 +231,5 @@ c as normalizePath, | ||
A as phpVars, | ||
q as randomFilename, | ||
M as randomFilename, | ||
P as randomString | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -27,5 +27,5 @@ type Listener = (...args: any[]) => any; | ||
export declare class ProcessApi extends EventEmitter { | ||
private childProcess; | ||
private exited; | ||
private stdinData; | ||
private childProcess; | ||
constructor(childProcess: ChildProcess); | ||
@@ -43,8 +43,8 @@ stdout(data: string | ArrayBuffer): void; | ||
export declare class ChildProcess extends EventEmitter { | ||
pid: number; | ||
stdout: EventEmitter; | ||
stderr: EventEmitter; | ||
stdin: StdIn; | ||
pid: number; | ||
constructor(pid?: number); | ||
} | ||
export {}; |
export declare class PhpWasmError extends Error { | ||
userFriendlyMessage?: string | undefined; | ||
constructor(message: string, userFriendlyMessage?: string | undefined); | ||
userFriendlyMessage?: string; | ||
constructor(message: string, userFriendlyMessage?: string); | ||
} |
{ | ||
"name": "@php-wasm/util", | ||
"version": "1.0.29", | ||
"version": "1.1.0", | ||
"type": "module", | ||
@@ -26,8 +26,15 @@ "types": "index.d.ts", | ||
"module": "./index.js", | ||
"gitHead": "173e69f62e1b43bd7353b875054bb1ef5e394de8", | ||
"gitHead": "9dbbe2b22ccbacda9c0da4444c51d5739e784302", | ||
"engines": { | ||
"node": ">=18.18.0", | ||
"npm": ">=8.11.0" | ||
"node": ">=20.18.3", | ||
"npm": ">=10.1.0" | ||
}, | ||
"overrides": { | ||
"rollup": "^4.34.6", | ||
"react": "18.3.1", | ||
"react-dom": "18.3.1", | ||
"typescript": "5.4.5", | ||
"ws": "^8.18.0" | ||
}, | ||
"dependencies": {} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
76321
0.33%422
-0.24%