@wp-playground/client 3.0.6 → 3.0.8

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.
Files changed (3) hide show
  1. package/index.cjs +1 -1
  2. package/index.js +2 -0
  3. package/package.json +2 -2
package/index.cjs CHANGED
@@ -1068,6 +1068,6 @@ require( "/tmp/blueprints.phar" );
1068
1068
  at ${h.details.file}:${h.details.line}
1069
1069
  `+(h.details.trace?h.details.trace+`
1070
1070
  `:"")):Pe.error(`${_}${L}Error:${y} ${h.message}
1071
- `),new Error(h.message)}}}),await m.boot({mounts:s,sapiName:o,scope:f??Math.random().toFixed(16),corsProxyUrl:n,experimentalBlueprintsV2Runner:!0,blueprint:i}),await m.isReady(),p.finish(),nf(Pe,m),a==null||a(m),m.goTo("/"),m}}async function Pg(e){const{iframe:t,progressTracker:r=new Dn,disableProgressBar:i}=e;let{remoteUrl:a}=e;Cg(a),Ag(t),a=Og(a,{progressbar:!i,"blueprints-runner":e.experimentalBlueprintsV2Runner?"v2":"v1"}),r.setCaption("Preparing WordPress"),await new Promise(o=>{t.src=a,t.addEventListener("load",o,!1)});const s=await(e.experimentalBlueprintsV2Runner?new Eg(e):new Sg(e)).bootPlayground(t,r);return r.finish(),s}function Ag(e){var t,r;(t=e.sandbox)!=null&&t.length&&!((r=e.sandbox)!=null&&r.contains("allow-storage-access-by-user-activation"))&&e.sandbox.add("allow-storage-access-by-user-activation")}const Vc="https://playground.wordpress.net",Tg=`http://${xg}:${kg}`,ef=[Vc,Tg,"https://wasm.wordpress.net",location.origin,"http://localhost","https://localhost","http://127.0.0.1","https://127.0.0.1",...vg],Gc=Vc;function Cg(e){const t=new URL(e,Gc);if(!(ef.includes(t.origin)&&t.pathname==="/remote.html"))throw new Error(`Invalid remote URL: ${t}. Expected remote URL to have a path of "/remote.html" based on one of the following origins:
1071
+ `),new Error(h.message)}}}),await m.boot({mounts:s,sapiName:o,scope:f??Math.random().toFixed(16),corsProxyUrl:n,experimentalBlueprintsV2Runner:!0,blueprint:i}),await m.isReady(),p.finish(),nf(Pe,m),a==null||a(m),m.goTo("/"),m}}async function Pg(e){const{iframe:t,progressTracker:r=new Dn,disableProgressBar:i}=e;let{remoteUrl:a}=e;Cg(a),Ag(t),a=Og(a,{progressbar:!i,"blueprints-runner":e.experimentalBlueprintsV2Runner?"v2":"v1"}),r.setCaption("Preparing WordPress"),await new Promise(o=>{t.src=a,t.addEventListener("load",o,!1)});const s=await(e.experimentalBlueprintsV2Runner?new Eg(e):new Sg(e)).bootPlayground(t,r);return r.finish(),s}function Ag(e){var t,r;(t=e.sandbox)!=null&&t.length&&!((r=e.sandbox)!=null&&r.contains("allow-storage-access-by-user-activation"))&&e.sandbox.add("allow-storage-access-by-user-activation")}const Vc="https://playground.wordpress.net",Tg=`http://${xg}:${kg}`,ef=[Vc,Tg,"https://wasm.wordpress.net",location.origin,"http://localhost","http://localhost:5400","https://localhost","http://127.0.0.1","http://127.0.0.1:5400","https://127.0.0.1",...vg],Gc=Vc;function Cg(e){const t=new URL(e,Gc);if(!(ef.includes(t.origin)&&t.pathname==="/remote.html"))throw new Error(`Invalid remote URL: ${t}. Expected remote URL to have a path of "/remote.html" based on one of the following origins:
1072
1072
  ${ef.join(`
1073
1073
  `)}`)}function Og(e,t){const r=new URL(e,Gc),i=new URLSearchParams(r.search);for(const[a,n]of Object.entries(t))if(n!=null&&n!==!1)if(Array.isArray(n))for(const s of n)i.append(a,s.toString());else i.set(a,n.toString());return r.search=i.toString(),r.toString()}exports.BlueprintReflection=Jr;exports.LatestSupportedPHPVersion=uf;exports.SupportedPHPVersions=$n;exports.SupportedPHPVersionsList=wu;exports.activatePlugin=Ra;exports.activateTheme=Ia;exports.compileBlueprint=Jn;exports.compileBlueprintV1=Jn;exports.cp=Pc;exports.defineSiteUrl=Ba;exports.defineWpConfigConsts=Zn;exports.enableMultisite=Ec;exports.exportWXR=Ic;exports.getBlueprintDeclaration=qc;exports.getV2Runner=Kc;exports.importThemeStarterContent=Na;exports.importWordPressFiles=Rc;exports.importWxr=Lc;exports.installPlugin=Hc;exports.installTheme=$c;exports.isBlueprintBundle=Ua;exports.login=Fc;exports.mkdir=Tc;exports.mv=Ac;exports.phpVar=ct;exports.phpVars=Is;exports.request=bc;exports.resetData=Bc;exports.resolveRemoteBlueprint=gg;exports.resolveRuntimeConfiguration=zc;exports.rm=Da;exports.rmdir=Cc;exports.runBlueprintSteps=Wa;exports.runBlueprintV1Steps=Wa;exports.runBlueprintV2=_g;exports.runPHP=_c;exports.runPHPWithOptions=gc;exports.runSql=wc;exports.runWpInstallationWizard=Nc;exports.setPhpIniEntries=mu;exports.setPluginProxyURL=bg;exports.setSiteLanguage=Uc;exports.setSiteOptions=Ha;exports.startPlaygroundWeb=Pg;exports.unzip=Xn;exports.updateUserMeta=kc;exports.wpCLI=Fa;exports.wpContentFilesExcludedFromExport=ja;exports.writeFile=Yn;exports.writeFiles=Oc;exports.zipWpContent=jc;
package/index.js CHANGED
@@ -26331,8 +26331,10 @@ const bc = "https://playground.wordpress.net", vg = `http://${yg}:${_g}`, Ul = [
26331
26331
  // Allow hosting remote from same origin
26332
26332
  location.origin,
26333
26333
  "http://localhost",
26334
+ "http://localhost:5400",
26334
26335
  "https://localhost",
26335
26336
  "http://127.0.0.1",
26337
+ "http://127.0.0.1:5400",
26336
26338
  "https://127.0.0.1",
26337
26339
  ...mg
26338
26340
  ], vc = bc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-playground/client",
3
- "version": "3.0.6",
3
+ "version": "3.0.8",
4
4
  "description": "WordPress Playground client",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,7 +37,7 @@
37
37
  "main": "./index.cjs",
38
38
  "module": "./index.js",
39
39
  "types": "index.d.ts",
40
- "gitHead": "76ac040706918e24e56aa96a89e266887d323691",
40
+ "gitHead": "a1128d0626073076640e7acd088cd3c9c70916c2",
41
41
  "engines": {
42
42
  "node": ">=20.18.3",
43
43
  "npm": ">=10.1.0"