@php-wasm/web-7-2 3.0.36 → 3.0.37

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.
Binary file
@@ -1,6 +1,6 @@
1
1
  import dependencyFilename from './7_2_34/php_7_2.wasm';
2
2
  export { dependencyFilename };
3
- export const dependenciesTotalSize = 20181538;
3
+ export const dependenciesTotalSize = 20181230;
4
4
  const phpVersionString = '7.2.34';
5
5
  export function init(RuntimeName, PHPLoader) {
6
6
  // The rest of the code comes from the built php.js file and esm-suffix.js
@@ -13289,12 +13289,15 @@ export function init(RuntimeName, PHPLoader) {
13289
13289
  noop: function () {},
13290
13290
  spawnProcess: function (command, args, options) {
13291
13291
  if (Module['spawnProcess']) {
13292
- const spawnedPromise = Module['spawnProcess'](
13293
- command,
13294
- args,
13295
- options
13296
- );
13297
- return Promise.resolve(spawnedPromise).then(function (spawned) {
13292
+ const spawned = Module['spawnProcess'](command, args, {
13293
+ ...options,
13294
+ shell: true,
13295
+ stdio: ['pipe', 'pipe', 'pipe'],
13296
+ });
13297
+ if (spawned && !('then' in spawned) && 'on' in spawned) {
13298
+ return spawned;
13299
+ }
13300
+ return Promise.resolve(spawned).then(function (spawned) {
13298
13301
  if (!spawned || !spawned.on) {
13299
13302
  throw new Error(
13300
13303
  'spawnProcess() must return an EventEmitter but returned a different type.'
@@ -13303,13 +13306,6 @@ export function init(RuntimeName, PHPLoader) {
13303
13306
  return spawned;
13304
13307
  });
13305
13308
  }
13306
- if (ENVIRONMENT_IS_NODE) {
13307
- return require('child_process').spawn(command, args, {
13308
- ...options,
13309
- shell: true,
13310
- stdio: ['pipe', 'pipe', 'pipe'],
13311
- });
13312
- }
13313
13309
  const e = new Error(
13314
13310
  'popen(), proc_open() etc. are unsupported on this PHP instance. Call php.setSpawnHandler() ' +
13315
13311
  'and provide a callback to handle spawning processes, or disable a popen(), proc_open() ' +
@@ -24716,13 +24712,13 @@ export function init(RuntimeName, PHPLoader) {
24716
24712
  ___cxa_rethrow_primary_exception;
24717
24713
  Module['___syscall_shutdown'] = ___syscall_shutdown;
24718
24714
  var ASM_CONSTS = {
24719
- 10532801: ($0) => {
24715
+ 10532769: ($0) => {
24720
24716
  if (!$0) {
24721
24717
  AL.alcErr = 40964;
24722
24718
  return 1;
24723
24719
  }
24724
24720
  },
24725
- 10532849: ($0) => {
24721
+ 10532817: ($0) => {
24726
24722
  if (!AL.currentCtx) {
24727
24723
  err('alGetProcAddress() called without a valid context');
24728
24724
  return 1;
@@ -25196,7 +25192,7 @@ export function init(RuntimeName, PHPLoader) {
25196
25192
  __indirect_function_table = wasmTable =
25197
25193
  wasmExports['__indirect_function_table'];
25198
25194
  }
25199
- var ___heap_base = 11811392;
25195
+ var ___heap_base = 11811328;
25200
25196
  var wasmImports = {
25201
25197
  IMG_Init: _IMG_Init,
25202
25198
  IMG_Load: _IMG_Load,
Binary file
package/jspi/php_7_2.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import dependencyFilename from './7_2_34/php_7_2.wasm';
2
2
  export { dependencyFilename };
3
- export const dependenciesTotalSize = 19763591;
3
+ export const dependenciesTotalSize = 19763601;
4
4
  const phpVersionString = '7.2.34';
5
5
  export function init(RuntimeName, PHPLoader) {
6
6
  // The rest of the code comes from the built php.js file and esm-suffix.js
@@ -13165,12 +13165,15 @@ export function init(RuntimeName, PHPLoader) {
13165
13165
  noop: function () {},
13166
13166
  spawnProcess: function (command, args, options) {
13167
13167
  if (Module['spawnProcess']) {
13168
- const spawnedPromise = Module['spawnProcess'](
13169
- command,
13170
- args,
13171
- options
13172
- );
13173
- return Promise.resolve(spawnedPromise).then(function (spawned) {
13168
+ const spawned = Module['spawnProcess'](command, args, {
13169
+ ...options,
13170
+ shell: true,
13171
+ stdio: ['pipe', 'pipe', 'pipe'],
13172
+ });
13173
+ if (spawned && !('then' in spawned) && 'on' in spawned) {
13174
+ return spawned;
13175
+ }
13176
+ return Promise.resolve(spawned).then(function (spawned) {
13174
13177
  if (!spawned || !spawned.on) {
13175
13178
  throw new Error(
13176
13179
  'spawnProcess() must return an EventEmitter but returned a different type.'
@@ -13179,13 +13182,6 @@ export function init(RuntimeName, PHPLoader) {
13179
13182
  return spawned;
13180
13183
  });
13181
13184
  }
13182
- if (ENVIRONMENT_IS_NODE) {
13183
- return require('child_process').spawn(command, args, {
13184
- ...options,
13185
- shell: true,
13186
- stdio: ['pipe', 'pipe', 'pipe'],
13187
- });
13188
- }
13189
13185
  const e = new Error(
13190
13186
  'popen(), proc_open() etc. are unsupported on this PHP instance. Call php.setSpawnHandler() ' +
13191
13187
  'and provide a callback to handle spawning processes, or disable a popen(), proc_open() ' +
@@ -24490,13 +24486,13 @@ export function init(RuntimeName, PHPLoader) {
24490
24486
  Module['_sched_yield'] = _sched_yield;
24491
24487
  Module['___syscall_shutdown'] = ___syscall_shutdown;
24492
24488
  var ASM_CONSTS = {
24493
- 10533362: ($0) => {
24489
+ 10533346: ($0) => {
24494
24490
  if (!$0) {
24495
24491
  AL.alcErr = 40964;
24496
24492
  return 1;
24497
24493
  }
24498
24494
  },
24499
- 10533410: ($0) => {
24495
+ 10533394: ($0) => {
24500
24496
  if (!AL.currentCtx) {
24501
24497
  err('alGetProcAddress() called without a valid context');
24502
24498
  return 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/web-7-2",
3
- "version": "3.0.36",
3
+ "version": "3.0.37",
4
4
  "description": "PHP 7.2 WebAssembly binaries for web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,11 +35,11 @@
35
35
  "node": ">=20.18.3",
36
36
  "npm": ">=10.1.0"
37
37
  },
38
- "gitHead": "ea21b3215956ace10f21e254fe483220168a120f",
38
+ "gitHead": "1ac56b78f05f1c517f6b56beb527d6826b53aa82",
39
39
  "dependencies": {
40
40
  "ini": "4.1.2",
41
41
  "wasm-feature-detect": "1.8.0",
42
- "@php-wasm/universal": "3.0.36"
42
+ "@php-wasm/universal": "3.0.37"
43
43
  },
44
44
  "packageManager": "npm@10.9.2",
45
45
  "overrides": {