@php-wasm/universal 3.0.40 → 3.0.42
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/index.cjs +1 -1
- package/index.cjs.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +7 -7
package/index.cjs
CHANGED
|
@@ -48,7 +48,7 @@ ${bold} WASM ERROR${reset}${redBg}`);for(const e of t.split(`
|
|
|
48
48
|
foreach (glob('/internal/shared/preload/*.php') as $file) {
|
|
49
49
|
require_once $file;
|
|
50
50
|
}
|
|
51
|
-
`),e.onMessage=async r=>{for(const s of u(this,F)){const n=await s(r);if(n)return n}return""},w(this,T,improveWASMErrorReporting(e)),this.dispatchEvent({type:"runtime.initialized"})}async setSapiName(t){if(this[__private__dont__use].ccall("wasm_set_sapi_name",NUMBER,[STRING],[t])!==0)throw new Error("Could not set SAPI name. This can only be done before the PHP WASM module is initialized.Did you already dispatch any requests?");w(this,I,t)}chdir(t){this[__private__dont__use].FS.chdir(t)}cwd(){return this[__private__dont__use].FS.cwd()}chmod(t,e){this[__private__dont__use].FS.chmod(t,e)}async request(t){if(logger.logger.
|
|
51
|
+
`),e.onMessage=async r=>{for(const s of u(this,F)){const n=await s(r);if(n)return n}return""},w(this,T,improveWASMErrorReporting(e)),this.dispatchEvent({type:"runtime.initialized"})}async setSapiName(t){if(this[__private__dont__use].ccall("wasm_set_sapi_name",NUMBER,[STRING],[t])!==0)throw new Error("Could not set SAPI name. This can only be done before the PHP WASM module is initialized.Did you already dispatch any requests?");w(this,I,t)}chdir(t){this[__private__dont__use].FS.chdir(t)}cwd(){return this[__private__dont__use].FS.cwd()}chmod(t,e){this[__private__dont__use].FS.chmod(t,e)}async request(t){if(logger.logger.debug("PHP.request() is deprecated. Please use new PHPRequestHandler() instead."),!this.requestHandler)throw new Error("No request handler available.");return this.requestHandler.request(t)}async run(t){const e=await this.runStream(t),r=await PHPResponse.fromStreamedResponse(e);if(r.exitCode!==0)throw new PHPExecutionFailureError(`PHP.run() failed with exit code ${r.exitCode}.
|
|
52
52
|
|
|
53
53
|
=== Stdout ===
|
|
54
54
|
${r.text}
|