@wp-playground/wordpress 1.1.1 → 1.1.3

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/boot.d.ts CHANGED
@@ -99,6 +99,7 @@ export interface BootOptions {
99
99
  * @return PHPRequestHandler instance with WordPress installed.
100
100
  */
101
101
  export declare function bootWordPress(options: BootOptions): Promise<PHPRequestHandler>;
102
+ export declare function bootRequestHandler(options: BootOptions): Promise<PHPRequestHandler>;
102
103
  /**
103
104
  * Checks if WordPress is installed by checking if the wp-load.php file exists
104
105
  * and if the blog is installed.
package/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@php-wasm/util"),p=require("@wp-playground/common"),l=require("@php-wasm/universal"),P=require("@php-wasm/logger"),k=`<?php
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@php-wasm/util"),d=require("@wp-playground/common"),s=require("@php-wasm/universal"),k=require("@php-wasm/logger"),E=`<?php
2
2
 
3
3
  /**
4
4
  * Rewrites the wp-config.php file to ensure specific constants are defined
@@ -343,16 +343,16 @@ function skip_whitespace($tokens) {
343
343
  }
344
344
  return $output;
345
345
  }
346
- `;async function _(e,r,t,n="rewrite"){const o=i.phpVars({wpConfigPath:r,constants:t,whenAlreadyDefined:n});if((await e.run({code:`<?php ob_start(); ?>
347
- ${k}
348
- $wp_config_path = ${o.wpConfigPath};
346
+ `;async function f(e,i,n,t="rewrite"){const a=r.phpVars({wpConfigPath:i,constants:n,whenAlreadyDefined:t});if((await e.run({code:`<?php ob_start(); ?>
347
+ ${E}
348
+ $wp_config_path = ${a.wpConfigPath};
349
349
  $wp_config = file_get_contents($wp_config_path);
350
- $new_wp_config = rewrite_wp_config_to_define_constants($wp_config, ${o.constants}, ${o.whenAlreadyDefined});
350
+ $new_wp_config = rewrite_wp_config_to_define_constants($wp_config, ${a.constants}, ${a.whenAlreadyDefined});
351
351
  $return_value = file_put_contents($wp_config_path, $new_wp_config);
352
352
  ob_clean();
353
353
  echo false === $return_value ? '0' : '1';
354
354
  ob_end_flush();
355
- `})).text!=="1")throw new Error("Failed to rewrite constants in wp-config.php.")}async function c(e,r){const t=i.joinPaths(r,"wp-config.php"),n={DB_NAME:"wordpress"};!e.fileExists(t)&&e.fileExists(i.joinPaths(r,"wp-config-sample.php"))&&await e.writeFile(t,await e.readFileAsBuffer(i.joinPaths(r,"wp-config-sample.php"))),await _(e,t,n,"skip")}async function E(e){var o,d;async function r(a,u){const s=new l.PHP(await e.createPhpRuntime());return e.sapiName&&s.setSapiName(e.sapiName),a&&(s.requestHandler=a),e.phpIniEntries&&l.setPhpIniEntries(s,e.phpIniEntries),u?(await w(s),await l.writeFiles(s,"/",e.createFiles||{}),await m(s,i.joinPaths(new URL(e.siteUrl).pathname,"phpinfo.php"))):l.proxyFileSystem(await a.getPrimaryPhp(),s,["/tmp",a.documentRoot,"/internal/shared"]),e.spawnHandler&&await s.setSpawnHandler(e.spawnHandler(a.processManager)),l.rotatePHPRuntime({php:s,cwd:a.documentRoot,recreateRuntime:e.createPhpRuntime,maxRequests:400}),s}const t=new l.PHPRequestHandler({phpFactory:async({isPrimary:a})=>r(t,a),documentRoot:e.documentRoot||"/wordpress",absoluteUrl:e.siteUrl,rewriteRules:$,getFileNotFoundAction:e.getFileNotFoundAction??h,cookieStore:e.cookieStore}),n=await t.getPrimaryPhp();if((o=e.hooks)!=null&&o.beforeWordPressFiles&&await e.hooks.beforeWordPressFiles(n),e.wordPressZip&&await y(n,await e.wordPressZip),e.constants)for(const a in e.constants)n.defineConstant(a,e.constants[a]);if(n.defineConstant("WP_HOME",e.siteUrl),n.defineConstant("WP_SITEURL",e.siteUrl),await c(n,t.documentRoot),(d=e.hooks)!=null&&d.beforeDatabaseSetup&&await e.hooks.beforeDatabaseSetup(n),e.sqliteIntegrationPluginZip&&await b(n,await e.sqliteIntegrationPluginZip),await f(n)||await T(n),!await f(n))throw new Error("WordPress installation has failed.");return t}async function f(e){return(await e.run({code:`<?php
355
+ `})).text!=="1")throw new Error("Failed to rewrite constants in wp-config.php.")}async function _(e,i){const n=r.joinPaths(i,"wp-config.php"),t={DB_NAME:"wordpress"};!e.fileExists(n)&&e.fileExists(r.joinPaths(i,"wp-config-sample.php"))&&await e.writeFile(n,await e.readFileAsBuffer(r.joinPaths(i,"wp-config-sample.php"))),await f(e,n,t,"skip")}async function T(e){var t,a;const i=await c(e),n=await i.getPrimaryPhp();if((t=e.hooks)!=null&&t.beforeWordPressFiles&&await e.hooks.beforeWordPressFiles(n),e.wordPressZip&&await y(n,await e.wordPressZip),e.constants)for(const o in e.constants)n.defineConstant(o,e.constants[o]);if(n.defineConstant("WP_HOME",e.siteUrl),n.defineConstant("WP_SITEURL",e.siteUrl),await _(n,i.documentRoot),(a=e.hooks)!=null&&a.beforeDatabaseSetup&&await e.hooks.beforeDatabaseSetup(n),e.sqliteIntegrationPluginZip&&await b(n,await e.sqliteIntegrationPluginZip),await p(n)||await R(n),!await p(n))throw new Error("WordPress installation has failed.");return i}async function c(e){async function i(t,a){const o=new s.PHP(await e.createPhpRuntime());return e.sapiName&&o.setSapiName(e.sapiName),t&&(o.requestHandler=t),e.phpIniEntries&&s.setPhpIniEntries(o,e.phpIniEntries),a?(await w(o),await s.writeFiles(o,"/",e.createFiles||{}),await m(o,r.joinPaths(new URL(e.siteUrl).pathname,"phpinfo.php"))):s.proxyFileSystem(await t.getPrimaryPhp(),o,["/tmp",t.documentRoot,"/internal/shared"]),e.spawnHandler&&await o.setSpawnHandler(e.spawnHandler(t.processManager)),s.rotatePHPRuntime({php:o,cwd:t.documentRoot,recreateRuntime:e.createPhpRuntime,maxRequests:400}),o}const n=new s.PHPRequestHandler({phpFactory:async({isPrimary:t})=>i(n,t),documentRoot:e.documentRoot||"/wordpress",absoluteUrl:e.siteUrl,rewriteRules:$,getFileNotFoundAction:e.getFileNotFoundAction??h,cookieStore:e.cookieStore});return n}async function p(e){return(await e.run({code:`<?php
356
356
  ob_start();
357
357
  $wp_load = getenv('DOCUMENT_ROOT') . '/wp-load.php';
358
358
  if (!file_exists($wp_load)) {
@@ -363,7 +363,7 @@ function skip_whitespace($tokens) {
363
363
  ob_clean();
364
364
  echo is_blog_installed() ? '1' : '0';
365
365
  ob_end_flush();
366
- `,env:{DOCUMENT_ROOT:e.documentRoot}})).text==="1"}async function T(e){await l.withPHPIniValues(e,{disable_functions:"fsockopen",allow_url_fopen:"0"},async()=>await e.request({url:"/wp-admin/install.php?step=2",method:"POST",body:{language:"en",prefix:"wp_",weblog_title:"My WordPress Website",user_name:"admin",admin_password:"password",admin_password2:"password",Submit:"Install WordPress",pw_weak:"1",admin_email:"admin@localhost.com"}})),(await e.run({code:`<?php
366
+ `,env:{DOCUMENT_ROOT:e.documentRoot}})).text==="1"}async function R(e){await s.withPHPIniValues(e,{disable_functions:"fsockopen",allow_url_fopen:"0"},async()=>await e.request({url:"/wp-admin/install.php?step=2",method:"POST",body:{language:"en",prefix:"wp_",weblog_title:"My WordPress Website",user_name:"admin",admin_password:"password",admin_password2:"password",Submit:"Install WordPress",pw_weak:"1",admin_email:"admin@localhost.com"}})),(await e.run({code:`<?php
367
367
  ob_start();
368
368
  $wp_load = getenv('DOCUMENT_ROOT') . '/wp-load.php';
369
369
  if (!file_exists($wp_load)) {
@@ -378,10 +378,10 @@ function skip_whitespace($tokens) {
378
378
  ob_clean();
379
379
  echo $option_result ? '1' : '0';
380
380
  ob_end_flush();
381
- `,env:{DOCUMENT_ROOT:e.documentRoot}})).text!=="1"&&P.logger.warn("Failed to default to pretty permalinks after WP install.")}function h(e){return{type:"internal-redirect",uri:"/index.php"}}async function R(e){const n=(await(await e.getPrimaryPhp()).run({code:`<?php
382
- require '${e.documentRoot}/wp-includes/version.php';
383
- echo $wp_version;
384
- `})).text;if(!n)throw new Error("Unable to read loaded WordPress version.");return g(n)}function g(e){if(/-(alpha|beta|RC)\d*-\d+$/.test(e))return"nightly";if(/-(beta|RC)\d*$/.test(e))return"beta";const n=e.match(/^(\d+\.\d+)(?:\.\d+)?$/);return n!==null?n[1]:e}const $=[{match:/^\/(.*?)(\/wp-(content|admin|includes)\/.*)/g,replacement:"$2"}];async function w(e){await e.mkdir("/internal/shared/mu-plugins"),await e.writeFile("/internal/shared/preload/env.php",`<?php
381
+ `,env:{DOCUMENT_ROOT:e.documentRoot}})).text!=="1"&&k.logger.warn("Failed to default to pretty permalinks after WP install.")}function h(e){return{type:"internal-redirect",uri:"/index.php"}}async function S(e){const{php:i,reap:n}=await e.processManager.acquirePHPInstance({considerPrimary:!0});try{const a=(await i.run({code:`<?php
382
+ require '${e.documentRoot}/wp-includes/version.php';
383
+ echo $wp_version;
384
+ `})).text;if(!a)throw new Error("Unable to read loaded WordPress version.");return g(a)}finally{n()}}function g(e){if(/-(alpha|beta|RC)\d*-\d+$/.test(e))return"nightly";if(/-(beta|RC)\d*$/.test(e))return"beta";const t=e.match(/^(\d+\.\d+)(?:\.\d+)?$/);return t!==null?t[1]:e}const $=[{match:/^\/(.*?)(\/wp-(content|admin|includes)\/.*)/g,replacement:"$2"}];async function w(e){await e.mkdir("/internal/shared/mu-plugins"),await e.writeFile("/internal/shared/preload/env.php",`<?php
385
385
 
386
386
  // Allow adding filters/actions prior to loading WordPress.
387
387
  // $function_to_add MUST be a string.
@@ -609,18 +609,18 @@ function skip_whitespace($tokens) {
609
609
  }
610
610
  return false;
611
611
  });
612
- })();`)}async function m(e,r="/phpinfo.php"){await e.writeFile("/internal/shared/preload/phpinfo.php",`<?php
612
+ })();`)}async function m(e,i="/phpinfo.php"){await e.writeFile("/internal/shared/preload/phpinfo.php",`<?php
613
613
  // Render PHPInfo if the requested page is /phpinfo.php
614
- if ( ${i.phpVar(r)} === $_SERVER['REQUEST_URI'] ) {
614
+ if ( isset($_SERVER['REQUEST_URI']) && ${r.phpVar(i)} === $_SERVER['REQUEST_URI'] ) {
615
615
  phpinfo();
616
616
  exit;
617
617
  }
618
- `)}async function b(e,r){await e.isDir("/tmp/sqlite-database-integration")&&await e.rmdir("/tmp/sqlite-database-integration",{recursive:!0}),await e.mkdir("/tmp/sqlite-database-integration"),await p.unzipFile(e,r,"/tmp/sqlite-database-integration");const t="/internal/shared/sqlite-database-integration",n=`/tmp/sqlite-database-integration/${(await e.listFiles("/tmp/sqlite-database-integration"))[0]}`;await e.mv(n,t),e.defineConstant("WP_SQLITE_AST_DRIVER",!0),await e.defineConstant("SQLITE_MAIN_FILE","1");const d=(await e.readFileAsText(i.joinPaths(t,"db.copy"))).replace("'{SQLITE_IMPLEMENTATION_FOLDER_PATH}'",i.phpVar(t)).replace("'{SQLITE_PLUGIN}'",i.phpVar(i.joinPaths(t,"load.php"))),a=i.joinPaths(await e.documentRoot,"wp-content/db.php"),u=`<?php
618
+ `)}async function b(e,i){await e.isDir("/tmp/sqlite-database-integration")&&await e.rmdir("/tmp/sqlite-database-integration",{recursive:!0}),await e.mkdir("/tmp/sqlite-database-integration"),await d.unzipFile(e,i,"/tmp/sqlite-database-integration");const n="/internal/shared/sqlite-database-integration",t=`/tmp/sqlite-database-integration/${(await e.listFiles("/tmp/sqlite-database-integration"))[0]}`;await e.mv(t,n),e.defineConstant("WP_SQLITE_AST_DRIVER",!0),await e.defineConstant("SQLITE_MAIN_FILE","1");const o=(await e.readFileAsText(r.joinPaths(n,"db.copy"))).replace("'{SQLITE_IMPLEMENTATION_FOLDER_PATH}'",r.phpVar(n)).replace("'{SQLITE_PLUGIN}'",r.phpVar(r.joinPaths(n,"load.php"))),P=r.joinPaths(await e.documentRoot,"wp-content/db.php"),l=`<?php
619
619
  // Do not preload this if WordPress comes with a custom db.php file.
620
- if(file_exists(${i.phpVar(a)})) {
620
+ if(file_exists(${r.phpVar(P)})) {
621
621
  return;
622
622
  }
623
- ?>`,s="/internal/shared/mu-plugins/sqlite-database-integration.php";await e.writeFile(s,u+d),await e.writeFile("/internal/shared/preload/0-sqlite.php",u+`<?php
623
+ ?>`,u="/internal/shared/mu-plugins/sqlite-database-integration.php";await e.writeFile(u,l+o),await e.writeFile("/internal/shared/preload/0-sqlite.php",l+`<?php
624
624
 
625
625
  /**
626
626
  * Loads the SQLite integration plugin before WordPress is loaded
@@ -670,7 +670,7 @@ class Playground_SQLite_Integration_Loader {
670
670
  $GLOBALS['wpdb']->$name = $value;
671
671
  }
672
672
  protected function load_sqlite_integration() {
673
- require_once ${i.phpVar(s)};
673
+ require_once ${r.phpVar(u)};
674
674
  }
675
675
  }
676
676
  $wpdb = $GLOBALS['wpdb'] = new Playground_SQLite_Integration_Loader();
@@ -692,5 +692,5 @@ if(!function_exists('mysqli_connect')) {
692
692
  var_dump(isset($wpdb));
693
693
  die("SQLite integration not loaded " . get_class($wpdb));
694
694
  }
695
- `)}async function y(e,r){e.mkdir("/tmp/unzipped-wordpress"),await p.unzipFile(e,r,"/tmp/unzipped-wordpress"),e.fileExists("/tmp/unzipped-wordpress/wordpress.zip")&&await p.unzipFile(e,"/tmp/unzipped-wordpress/wordpress.zip","/tmp/unzipped-wordpress");let t=e.fileExists("/tmp/unzipped-wordpress/wordpress")?"/tmp/unzipped-wordpress/wordpress":e.fileExists("/tmp/unzipped-wordpress/build")?"/tmp/unzipped-wordpress/build":"/tmp/unzipped-wordpress";if(!e.fileExists(i.joinPaths(t,"wp-config-sample.php"))){const n=e.listFiles(t);if(n.length){const o=n[0];e.fileExists(i.joinPaths(t,o,"wp-config-sample.php"))&&(t=i.joinPaths(t,o))}}if(e.isDir(e.documentRoot)&&S(e.documentRoot,e)){for(const n of e.listFiles(t)){const o=i.joinPaths(t,n),d=i.joinPaths(e.documentRoot,n);e.mv(o,d)}e.rmdir(t,{recursive:!0})}else e.mv(t,e.documentRoot);!e.fileExists(i.joinPaths(e.documentRoot,"wp-config.php"))&&e.fileExists(i.joinPaths(e.documentRoot,"wp-config-sample.php"))&&e.writeFile(i.joinPaths(e.documentRoot,"wp-config.php"),e.readFileAsText(i.joinPaths(e.documentRoot,"/wp-config-sample.php")))}function S(e,r){const t=r.listFiles(e);return t.length===0||t.length===1&&t[0]==="playground-site-metadata.json"}const v=p.createMemoizedFetch(fetch);async function L(e="latest"){if(e.startsWith("https://")||e.startsWith("http://")){const n=await crypto.subtle.digest("SHA-1",new TextEncoder().encode(e)),o=Array.from(new Uint8Array(n)).map(d=>d.toString(16).padStart(2,"0")).join("");return{releaseUrl:e,version:"custom-"+o.substring(0,8),source:"inferred"}}else if(e==="trunk"||e==="nightly")return{releaseUrl:"https://wordpress.org/nightly-builds/wordpress-latest.zip",version:"nightly-"+new Date().toISOString().split("T")[0],source:"inferred"};let t=await(await v("https://api.wordpress.org/core/version-check/1.7/?channel=beta")).json();t=t.offers.filter(n=>n.response==="autoupdate");for(const n of t){if(e==="beta"&&n.version.includes("beta"))return{releaseUrl:n.download,version:n.version,source:"api"};if(e==="latest"&&!n.version.includes("beta"))return{releaseUrl:n.download,version:n.version,source:"api"};if(n.version.substring(0,e.length)===e)return{releaseUrl:n.download,version:n.version,source:"api"}}return{releaseUrl:`https://wordpress.org/wordpress-${e}.zip`,version:e,source:"inferred"}}exports.bootWordPress=E;exports.defineWpConfigConstants=_;exports.ensureWpConfig=c;exports.getFileNotFoundActionForWordPress=h;exports.getLoadedWordPressVersion=R;exports.preloadPhpInfoRoute=m;exports.preloadSqliteIntegration=b;exports.resolveWordPressRelease=L;exports.setupPlatformLevelMuPlugins=w;exports.unzipWordPress=y;exports.versionStringToLoadedWordPressVersion=g;exports.wordPressRewriteRules=$;
695
+ `)}async function y(e,i){e.mkdir("/tmp/unzipped-wordpress"),await d.unzipFile(e,i,"/tmp/unzipped-wordpress"),e.fileExists("/tmp/unzipped-wordpress/wordpress.zip")&&await d.unzipFile(e,"/tmp/unzipped-wordpress/wordpress.zip","/tmp/unzipped-wordpress");let n=e.fileExists("/tmp/unzipped-wordpress/wordpress")?"/tmp/unzipped-wordpress/wordpress":e.fileExists("/tmp/unzipped-wordpress/build")?"/tmp/unzipped-wordpress/build":"/tmp/unzipped-wordpress";if(!e.fileExists(r.joinPaths(n,"wp-config-sample.php"))){const t=e.listFiles(n);if(t.length){const a=t[0];e.fileExists(r.joinPaths(n,a,"wp-config-sample.php"))&&(n=r.joinPaths(n,a))}}if(e.isDir(e.documentRoot)&&v(e.documentRoot,e)){for(const t of e.listFiles(n)){const a=r.joinPaths(n,t),o=r.joinPaths(e.documentRoot,t);e.mv(a,o)}e.rmdir(n,{recursive:!0})}else e.mv(n,e.documentRoot);!e.fileExists(r.joinPaths(e.documentRoot,"wp-config.php"))&&e.fileExists(r.joinPaths(e.documentRoot,"wp-config-sample.php"))&&e.writeFile(r.joinPaths(e.documentRoot,"wp-config.php"),e.readFileAsText(r.joinPaths(e.documentRoot,"/wp-config-sample.php")))}function v(e,i){const n=i.listFiles(e);return n.length===0||n.length===1&&n[0]==="playground-site-metadata.json"}const L=d.createMemoizedFetch(fetch);async function x(e="latest"){if(e.startsWith("https://")||e.startsWith("http://")){const t=await crypto.subtle.digest("SHA-1",new TextEncoder().encode(e)),a=Array.from(new Uint8Array(t)).map(o=>o.toString(16).padStart(2,"0")).join("");return{releaseUrl:e,version:"custom-"+a.substring(0,8),source:"inferred"}}else if(e==="trunk"||e==="nightly")return{releaseUrl:"https://wordpress.org/nightly-builds/wordpress-latest.zip",version:"nightly-"+new Date().toISOString().split("T")[0],source:"inferred"};let n=await(await L("https://api.wordpress.org/core/version-check/1.7/?channel=beta")).json();n=n.offers.filter(t=>t.response==="autoupdate");for(const t of n){if(e==="beta"&&t.version.includes("beta"))return{releaseUrl:t.download,version:t.version,source:"api"};if(e==="latest"&&!t.version.includes("beta"))return{releaseUrl:t.download,version:t.version,source:"api"};if(t.version.substring(0,e.length)===e)return{releaseUrl:t.download,version:t.version,source:"api"}}return{releaseUrl:`https://wordpress.org/wordpress-${e}.zip`,version:e,source:"inferred"}}exports.bootRequestHandler=c;exports.bootWordPress=T;exports.defineWpConfigConstants=f;exports.ensureWpConfig=_;exports.getFileNotFoundActionForWordPress=h;exports.getLoadedWordPressVersion=S;exports.preloadPhpInfoRoute=m;exports.preloadSqliteIntegration=b;exports.resolveWordPressRelease=x;exports.setupPlatformLevelMuPlugins=w;exports.unzipWordPress=y;exports.versionStringToLoadedWordPressVersion=g;exports.wordPressRewriteRules=$;
696
696
  //# sourceMappingURL=index.cjs.map
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { PHP, UniversalPHP } from '@php-wasm/universal';
2
- export { bootWordPress, getFileNotFoundActionForWordPress } from './boot';
2
+ export { bootWordPress, bootRequestHandler, getFileNotFoundActionForWordPress, } from './boot';
3
3
  export { defineWpConfigConstants, ensureWpConfig } from './rewrite-wp-config';
4
4
  export { getLoadedWordPressVersion } from './version-detect';
5
5
  export * from './version-detect';
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { phpVars as _, joinPaths as r, phpVar as l } from "@php-wasm/util";
2
- import { createMemoizedFetch as c, unzipFile as p } from "@wp-playground/common";
3
- import { PHPRequestHandler as h, PHP as g, setPhpIniEntries as $, writeFiles as w, proxyFileSystem as m, rotatePHPRuntime as b, withPHPIniValues as y } from "@php-wasm/universal";
1
+ import { phpVars as _, joinPaths as a, phpVar as s } from "@php-wasm/util";
2
+ import { createMemoizedFetch as c, unzipFile as d } from "@wp-playground/common";
3
+ import { PHPRequestHandler as h, withPHPIniValues as g, PHP as $, setPhpIniEntries as w, writeFiles as m, proxyFileSystem as b, rotatePHPRuntime as y } from "@php-wasm/universal";
4
4
  import { logger as k } from "@php-wasm/logger";
5
5
  const P = `<?php
6
6
 
@@ -348,8 +348,8 @@ function skip_whitespace($tokens) {
348
348
  return $output;
349
349
  }
350
350
  `;
351
- async function E(e, i, t, n = "rewrite") {
352
- const o = _({ wpConfigPath: i, constants: t, whenAlreadyDefined: n });
351
+ async function E(e, i, n, t = "rewrite") {
352
+ const o = _({ wpConfigPath: i, constants: n, whenAlreadyDefined: t });
353
353
  if ((await e.run({
354
354
  code: `<?php ob_start(); ?>
355
355
  ${P}
@@ -365,55 +365,59 @@ async function E(e, i, t, n = "rewrite") {
365
365
  throw new Error("Failed to rewrite constants in wp-config.php.");
366
366
  }
367
367
  async function T(e, i) {
368
- const t = r(i, "wp-config.php"), n = {
368
+ const n = a(i, "wp-config.php"), t = {
369
369
  DB_NAME: "wordpress"
370
370
  };
371
- !e.fileExists(t) && e.fileExists(r(i, "wp-config-sample.php")) && await e.writeFile(
372
- t,
371
+ !e.fileExists(n) && e.fileExists(a(i, "wp-config-sample.php")) && await e.writeFile(
372
+ n,
373
373
  await e.readFileAsBuffer(
374
- r(i, "wp-config-sample.php")
374
+ a(i, "wp-config-sample.php")
375
375
  )
376
- ), await E(e, t, n, "skip");
376
+ ), await E(e, n, t, "skip");
377
+ }
378
+ async function q(e) {
379
+ var t, o;
380
+ const i = await R(e), n = await i.getPrimaryPhp();
381
+ if ((t = e.hooks) != null && t.beforeWordPressFiles && await e.hooks.beforeWordPressFiles(n), e.wordPressZip && await O(n, await e.wordPressZip), e.constants)
382
+ for (const r in e.constants)
383
+ n.defineConstant(r, e.constants[r]);
384
+ if (n.defineConstant("WP_HOME", e.siteUrl), n.defineConstant("WP_SITEURL", e.siteUrl), await T(n, i.documentRoot), (o = e.hooks) != null && o.beforeDatabaseSetup && await e.hooks.beforeDatabaseSetup(n), e.sqliteIntegrationPluginZip && await W(
385
+ n,
386
+ await e.sqliteIntegrationPluginZip
387
+ ), await p(n) || await S(n), !await p(n))
388
+ throw new Error("WordPress installation has failed.");
389
+ return i;
377
390
  }
378
- async function N(e) {
379
- var o, d;
380
- async function i(a, u) {
381
- const s = new g(await e.createPhpRuntime());
382
- return e.sapiName && s.setSapiName(e.sapiName), a && (s.requestHandler = a), e.phpIniEntries && $(s, e.phpIniEntries), u ? (await L(s), await w(s, "/", e.createFiles || {}), await I(
383
- s,
384
- r(new URL(e.siteUrl).pathname, "phpinfo.php")
385
- )) : m(await a.getPrimaryPhp(), s, [
391
+ async function R(e) {
392
+ async function i(t, o) {
393
+ const r = new $(await e.createPhpRuntime());
394
+ return e.sapiName && r.setSapiName(e.sapiName), t && (r.requestHandler = t), e.phpIniEntries && w(r, e.phpIniEntries), o ? (await I(r), await m(r, "/", e.createFiles || {}), await U(
395
+ r,
396
+ a(new URL(e.siteUrl).pathname, "phpinfo.php")
397
+ )) : b(await t.getPrimaryPhp(), r, [
386
398
  "/tmp",
387
- a.documentRoot,
399
+ t.documentRoot,
388
400
  "/internal/shared"
389
- ]), e.spawnHandler && await s.setSpawnHandler(
390
- e.spawnHandler(a.processManager)
391
- ), b({
392
- php: s,
393
- cwd: a.documentRoot,
401
+ ]), e.spawnHandler && await r.setSpawnHandler(
402
+ e.spawnHandler(t.processManager)
403
+ ), y({
404
+ php: r,
405
+ cwd: t.documentRoot,
394
406
  recreateRuntime: e.createPhpRuntime,
395
407
  maxRequests: 400
396
- }), s;
408
+ }), r;
397
409
  }
398
- const t = new h({
399
- phpFactory: async ({ isPrimary: a }) => i(t, a),
410
+ const n = new h({
411
+ phpFactory: async ({ isPrimary: t }) => i(n, t),
400
412
  documentRoot: e.documentRoot || "/wordpress",
401
413
  absoluteUrl: e.siteUrl,
402
- rewriteRules: x,
403
- getFileNotFoundAction: e.getFileNotFoundAction ?? S,
414
+ rewriteRules: L,
415
+ getFileNotFoundAction: e.getFileNotFoundAction ?? v,
404
416
  cookieStore: e.cookieStore
405
- }), n = await t.getPrimaryPhp();
406
- if ((o = e.hooks) != null && o.beforeWordPressFiles && await e.hooks.beforeWordPressFiles(n), e.wordPressZip && await W(n, await e.wordPressZip), e.constants)
407
- for (const a in e.constants)
408
- n.defineConstant(a, e.constants[a]);
409
- if (n.defineConstant("WP_HOME", e.siteUrl), n.defineConstant("WP_SITEURL", e.siteUrl), await T(n, t.documentRoot), (d = e.hooks) != null && d.beforeDatabaseSetup && await e.hooks.beforeDatabaseSetup(n), e.sqliteIntegrationPluginZip && await U(
410
- n,
411
- await e.sqliteIntegrationPluginZip
412
- ), await f(n) || await R(n), !await f(n))
413
- throw new Error("WordPress installation has failed.");
414
- return t;
417
+ });
418
+ return n;
415
419
  }
416
- async function f(e) {
420
+ async function p(e) {
417
421
  return (await e.run({
418
422
  code: `<?php
419
423
  ob_start();
@@ -432,8 +436,8 @@ async function f(e) {
432
436
  }
433
437
  })).text === "1";
434
438
  }
435
- async function R(e) {
436
- await y(
439
+ async function S(e) {
440
+ await g(
437
441
  e,
438
442
  {
439
443
  disable_functions: "fsockopen",
@@ -477,38 +481,45 @@ async function R(e) {
477
481
  }
478
482
  })).text !== "1" && k.warn("Failed to default to pretty permalinks after WP install.");
479
483
  }
480
- function S(e) {
484
+ function v(e) {
481
485
  return {
482
486
  type: "internal-redirect",
483
487
  uri: "/index.php"
484
488
  };
485
489
  }
486
- async function q(e) {
487
- const n = (await (await e.getPrimaryPhp()).run({
488
- code: `<?php
489
- require '${e.documentRoot}/wp-includes/version.php';
490
- echo $wp_version;
491
- `
492
- })).text;
493
- if (!n)
494
- throw new Error("Unable to read loaded WordPress version.");
495
- return v(n);
490
+ async function M(e) {
491
+ const { php: i, reap: n } = await e.processManager.acquirePHPInstance({
492
+ considerPrimary: !0
493
+ });
494
+ try {
495
+ const o = (await i.run({
496
+ code: `<?php
497
+ require '${e.documentRoot}/wp-includes/version.php';
498
+ echo $wp_version;
499
+ `
500
+ })).text;
501
+ if (!o)
502
+ throw new Error("Unable to read loaded WordPress version.");
503
+ return x(o);
504
+ } finally {
505
+ n();
506
+ }
496
507
  }
497
- function v(e) {
508
+ function x(e) {
498
509
  if (/-(alpha|beta|RC)\d*-\d+$/.test(e))
499
510
  return "nightly";
500
511
  if (/-(beta|RC)\d*$/.test(e))
501
512
  return "beta";
502
- const n = e.match(/^(\d+\.\d+)(?:\.\d+)?$/);
503
- return n !== null ? n[1] : e;
513
+ const t = e.match(/^(\d+\.\d+)(?:\.\d+)?$/);
514
+ return t !== null ? t[1] : e;
504
515
  }
505
- const x = [
516
+ const L = [
506
517
  {
507
518
  match: /^\/(.*?)(\/wp-(content|admin|includes)\/.*)/g,
508
519
  replacement: "$2"
509
520
  }
510
521
  ];
511
- async function L(e) {
522
+ async function I(e) {
512
523
  await e.mkdir("/internal/shared/mu-plugins"), await e.writeFile(
513
524
  "/internal/shared/preload/env.php",
514
525
  `<?php
@@ -751,41 +762,41 @@ async function L(e) {
751
762
  })();`
752
763
  );
753
764
  }
754
- async function I(e, i = "/phpinfo.php") {
765
+ async function U(e, i = "/phpinfo.php") {
755
766
  await e.writeFile(
756
767
  "/internal/shared/preload/phpinfo.php",
757
768
  `<?php
758
769
  // Render PHPInfo if the requested page is /phpinfo.php
759
- if ( ${l(i)} === $_SERVER['REQUEST_URI'] ) {
770
+ if ( isset($_SERVER['REQUEST_URI']) && ${s(i)} === $_SERVER['REQUEST_URI'] ) {
760
771
  phpinfo();
761
772
  exit;
762
773
  }
763
774
  `
764
775
  );
765
776
  }
766
- async function U(e, i) {
777
+ async function W(e, i) {
767
778
  await e.isDir("/tmp/sqlite-database-integration") && await e.rmdir("/tmp/sqlite-database-integration", {
768
779
  recursive: !0
769
- }), await e.mkdir("/tmp/sqlite-database-integration"), await p(e, i, "/tmp/sqlite-database-integration");
770
- const t = "/internal/shared/sqlite-database-integration", n = `/tmp/sqlite-database-integration/${(await e.listFiles("/tmp/sqlite-database-integration"))[0]}`;
771
- await e.mv(n, t), e.defineConstant("WP_SQLITE_AST_DRIVER", !0), await e.defineConstant("SQLITE_MAIN_FILE", "1");
772
- const d = (await e.readFileAsText(
773
- r(t, "db.copy")
780
+ }), await e.mkdir("/tmp/sqlite-database-integration"), await d(e, i, "/tmp/sqlite-database-integration");
781
+ const n = "/internal/shared/sqlite-database-integration", t = `/tmp/sqlite-database-integration/${(await e.listFiles("/tmp/sqlite-database-integration"))[0]}`;
782
+ await e.mv(t, n), e.defineConstant("WP_SQLITE_AST_DRIVER", !0), await e.defineConstant("SQLITE_MAIN_FILE", "1");
783
+ const r = (await e.readFileAsText(
784
+ a(n, "db.copy")
774
785
  )).replace(
775
786
  "'{SQLITE_IMPLEMENTATION_FOLDER_PATH}'",
776
- l(t)
787
+ s(n)
777
788
  ).replace(
778
789
  "'{SQLITE_PLUGIN}'",
779
- l(r(t, "load.php"))
780
- ), a = r(await e.documentRoot, "wp-content/db.php"), u = `<?php
790
+ s(a(n, "load.php"))
791
+ ), f = a(await e.documentRoot, "wp-content/db.php"), l = `<?php
781
792
  // Do not preload this if WordPress comes with a custom db.php file.
782
- if(file_exists(${l(a)})) {
793
+ if(file_exists(${s(f)})) {
783
794
  return;
784
795
  }
785
- ?>`, s = "/internal/shared/mu-plugins/sqlite-database-integration.php";
786
- await e.writeFile(s, u + d), await e.writeFile(
796
+ ?>`, u = "/internal/shared/mu-plugins/sqlite-database-integration.php";
797
+ await e.writeFile(u, l + r), await e.writeFile(
787
798
  "/internal/shared/preload/0-sqlite.php",
788
- u + `<?php
799
+ l + `<?php
789
800
 
790
801
  /**
791
802
  * Loads the SQLite integration plugin before WordPress is loaded
@@ -835,7 +846,7 @@ class Playground_SQLite_Integration_Loader {
835
846
  $GLOBALS['wpdb']->$name = $value;
836
847
  }
837
848
  protected function load_sqlite_integration() {
838
- require_once ${l(s)};
849
+ require_once ${s(u)};
839
850
  }
840
851
  }
841
852
  $wpdb = $GLOBALS['wpdb'] = new Playground_SQLite_Integration_Loader();
@@ -863,49 +874,49 @@ if(!function_exists('mysqli_connect')) {
863
874
  `
864
875
  );
865
876
  }
866
- async function W(e, i) {
867
- e.mkdir("/tmp/unzipped-wordpress"), await p(e, i, "/tmp/unzipped-wordpress"), e.fileExists("/tmp/unzipped-wordpress/wordpress.zip") && await p(
877
+ async function O(e, i) {
878
+ e.mkdir("/tmp/unzipped-wordpress"), await d(e, i, "/tmp/unzipped-wordpress"), e.fileExists("/tmp/unzipped-wordpress/wordpress.zip") && await d(
868
879
  e,
869
880
  "/tmp/unzipped-wordpress/wordpress.zip",
870
881
  "/tmp/unzipped-wordpress"
871
882
  );
872
- let t = e.fileExists("/tmp/unzipped-wordpress/wordpress") ? "/tmp/unzipped-wordpress/wordpress" : e.fileExists("/tmp/unzipped-wordpress/build") ? "/tmp/unzipped-wordpress/build" : "/tmp/unzipped-wordpress";
873
- if (!e.fileExists(r(t, "wp-config-sample.php"))) {
874
- const n = e.listFiles(t);
875
- if (n.length) {
876
- const o = n[0];
883
+ let n = e.fileExists("/tmp/unzipped-wordpress/wordpress") ? "/tmp/unzipped-wordpress/wordpress" : e.fileExists("/tmp/unzipped-wordpress/build") ? "/tmp/unzipped-wordpress/build" : "/tmp/unzipped-wordpress";
884
+ if (!e.fileExists(a(n, "wp-config-sample.php"))) {
885
+ const t = e.listFiles(n);
886
+ if (t.length) {
887
+ const o = t[0];
877
888
  e.fileExists(
878
- r(t, o, "wp-config-sample.php")
879
- ) && (t = r(t, o));
889
+ a(n, o, "wp-config-sample.php")
890
+ ) && (n = a(n, o));
880
891
  }
881
892
  }
882
- if (e.isDir(e.documentRoot) && O(e.documentRoot, e)) {
883
- for (const n of e.listFiles(t)) {
884
- const o = r(t, n), d = r(e.documentRoot, n);
885
- e.mv(o, d);
893
+ if (e.isDir(e.documentRoot) && C(e.documentRoot, e)) {
894
+ for (const t of e.listFiles(n)) {
895
+ const o = a(n, t), r = a(e.documentRoot, t);
896
+ e.mv(o, r);
886
897
  }
887
- e.rmdir(t, { recursive: !0 });
898
+ e.rmdir(n, { recursive: !0 });
888
899
  } else
889
- e.mv(t, e.documentRoot);
890
- !e.fileExists(r(e.documentRoot, "wp-config.php")) && e.fileExists(r(e.documentRoot, "wp-config-sample.php")) && e.writeFile(
891
- r(e.documentRoot, "wp-config.php"),
900
+ e.mv(n, e.documentRoot);
901
+ !e.fileExists(a(e.documentRoot, "wp-config.php")) && e.fileExists(a(e.documentRoot, "wp-config-sample.php")) && e.writeFile(
902
+ a(e.documentRoot, "wp-config.php"),
892
903
  e.readFileAsText(
893
- r(e.documentRoot, "/wp-config-sample.php")
904
+ a(e.documentRoot, "/wp-config-sample.php")
894
905
  )
895
906
  );
896
907
  }
897
- function O(e, i) {
898
- const t = i.listFiles(e);
899
- return t.length === 0 || t.length === 1 && // TODO: use a constant from a site storage package
900
- t[0] === "playground-site-metadata.json";
908
+ function C(e, i) {
909
+ const n = i.listFiles(e);
910
+ return n.length === 0 || n.length === 1 && // TODO: use a constant from a site storage package
911
+ n[0] === "playground-site-metadata.json";
901
912
  }
902
- const C = c(fetch);
913
+ const A = c(fetch);
903
914
  async function B(e = "latest") {
904
915
  if (e.startsWith("https://") || e.startsWith("http://")) {
905
- const n = await crypto.subtle.digest(
916
+ const t = await crypto.subtle.digest(
906
917
  "SHA-1",
907
918
  new TextEncoder().encode(e)
908
- ), o = Array.from(new Uint8Array(n)).map((d) => d.toString(16).padStart(2, "0")).join("");
919
+ ), o = Array.from(new Uint8Array(t)).map((r) => r.toString(16).padStart(2, "0")).join("");
909
920
  return {
910
921
  releaseUrl: e,
911
922
  version: "custom-" + o.substring(0, 8),
@@ -917,29 +928,29 @@ async function B(e = "latest") {
917
928
  version: "nightly-" + (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
918
929
  source: "inferred"
919
930
  };
920
- let t = await (await C(
931
+ let n = await (await A(
921
932
  "https://api.wordpress.org/core/version-check/1.7/?channel=beta"
922
933
  )).json();
923
- t = t.offers.filter(
924
- (n) => n.response === "autoupdate"
934
+ n = n.offers.filter(
935
+ (t) => t.response === "autoupdate"
925
936
  );
926
- for (const n of t) {
927
- if (e === "beta" && n.version.includes("beta"))
937
+ for (const t of n) {
938
+ if (e === "beta" && t.version.includes("beta"))
928
939
  return {
929
- releaseUrl: n.download,
930
- version: n.version,
940
+ releaseUrl: t.download,
941
+ version: t.version,
931
942
  source: "api"
932
943
  };
933
- if (e === "latest" && !n.version.includes("beta"))
944
+ if (e === "latest" && !t.version.includes("beta"))
934
945
  return {
935
- releaseUrl: n.download,
936
- version: n.version,
946
+ releaseUrl: t.download,
947
+ version: t.version,
937
948
  source: "api"
938
949
  };
939
- if (n.version.substring(0, e.length) === e)
950
+ if (t.version.substring(0, e.length) === e)
940
951
  return {
941
- releaseUrl: n.download,
942
- version: n.version,
952
+ releaseUrl: t.download,
953
+ version: t.version,
943
954
  source: "api"
944
955
  };
945
956
  }
@@ -950,17 +961,18 @@ async function B(e = "latest") {
950
961
  };
951
962
  }
952
963
  export {
953
- N as bootWordPress,
964
+ R as bootRequestHandler,
965
+ q as bootWordPress,
954
966
  E as defineWpConfigConstants,
955
967
  T as ensureWpConfig,
956
- S as getFileNotFoundActionForWordPress,
957
- q as getLoadedWordPressVersion,
958
- I as preloadPhpInfoRoute,
959
- U as preloadSqliteIntegration,
968
+ v as getFileNotFoundActionForWordPress,
969
+ M as getLoadedWordPressVersion,
970
+ U as preloadPhpInfoRoute,
971
+ W as preloadSqliteIntegration,
960
972
  B as resolveWordPressRelease,
961
- L as setupPlatformLevelMuPlugins,
962
- W as unzipWordPress,
963
- v as versionStringToLoadedWordPressVersion,
964
- x as wordPressRewriteRules
973
+ I as setupPlatformLevelMuPlugins,
974
+ O as unzipWordPress,
975
+ x as versionStringToLoadedWordPressVersion,
976
+ L as wordPressRewriteRules
965
977
  };
966
978
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-playground/wordpress",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "WordPress-related plumbing for WordPress Playground",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,7 +35,7 @@
35
35
  "access": "public",
36
36
  "directory": "../../../dist/packages/playground/wordpress"
37
37
  },
38
- "gitHead": "8bff9428d68d3c4a5e84c6cd633e82bf8512a4e3",
38
+ "gitHead": "977f8e90eabb2c8d4eed75677ddd9fb6c13274ae",
39
39
  "dependencies": {
40
40
  "comlink": "^4.4.1",
41
41
  "express": "4.21.2",
@@ -43,11 +43,11 @@
43
43
  "wasm-feature-detect": "1.8.0",
44
44
  "ws": "8.18.1",
45
45
  "yargs": "17.7.2",
46
- "@php-wasm/universal": "1.1.1",
47
- "@php-wasm/util": "1.1.1",
48
- "@php-wasm/logger": "1.1.1",
49
- "@wp-playground/common": "1.1.1",
50
- "@php-wasm/node": "1.1.1"
46
+ "@php-wasm/universal": "1.1.3",
47
+ "@php-wasm/util": "1.1.3",
48
+ "@php-wasm/logger": "1.1.3",
49
+ "@wp-playground/common": "1.1.3",
50
+ "@php-wasm/node": "1.1.3"
51
51
  },
52
52
  "overrides": {
53
53
  "rollup": "^4.34.6",