@php-wasm/universal 3.1.33 → 3.1.35

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.js CHANGED
@@ -4143,25 +4143,27 @@ async function resolvePHPExtension(r) {
4143
4143
  };
4144
4144
  }
4145
4145
  function withResolvedPHPExtensions(r, e) {
4146
- var s;
4146
+ var n;
4147
4147
  if (!e.length)
4148
4148
  return r;
4149
4149
  const t = { ...r.ENV };
4150
- for (const n of e) {
4151
- if (Object.assign(t, n.env), !n.iniPath)
4150
+ for (const o of e) {
4151
+ if (Object.assign(t, o.env), !o.iniPath)
4152
4152
  continue;
4153
- const o = ((s = t.PHP_INI_SCAN_DIR) == null ? void 0 : s.split(":")) ?? [];
4154
- o.includes(n.extensionDir) || (o.push(n.extensionDir), t.PHP_INI_SCAN_DIR = o.join(":"));
4153
+ const i = ((n = t.PHP_INI_SCAN_DIR) == null ? void 0 : n.split(":")) ?? [];
4154
+ i.includes(o.extensionDir) || (i.push(o.extensionDir), t.PHP_INI_SCAN_DIR = i.join(":"));
4155
4155
  }
4156
+ const s = r.preRun ?? [];
4156
4157
  return {
4157
4158
  ...r,
4158
4159
  ENV: t,
4159
- onRuntimeInitialized: (n) => {
4160
- var o;
4161
- (o = r.onRuntimeInitialized) == null || o.call(r, n);
4162
- for (const i of e)
4163
- installPHPExtensionFilesSync(n.FS, i);
4164
- }
4160
+ preRun: [
4161
+ ...s,
4162
+ (o) => {
4163
+ for (const i of e)
4164
+ installPHPExtensionFilesSync(o.FS, i);
4165
+ }
4166
+ ]
4165
4167
  };
4166
4168
  }
4167
4169
  function installPHPExtensionFilesSync(r, e) {