@wp-playground/blueprints 3.1.19 → 3.1.20

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 CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("@php-wasm/node-polyfills");const br=require("@php-wasm/progress"),D=require("@php-wasm/util"),We=require("@php-wasm/universal"),we=require("@wp-playground/storage"),Pt=require("@php-wasm/web-service-worker"),gr=require("@php-wasm/stream-compression"),ae=require("@php-wasm/logger"),xr=require("@wp-playground/wordpress"),wr=require("@wp-playground/common");function Cr(r){return r&&"read"in r&&typeof r.read=="function"}async function _t(r){if(!Cr(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}class Be{static async create(t){const n=await _t(t),l=Cr(t)?t:void 0;return Be.createFromDeclaration(n,l)}static createFromDeclaration(t,n=void 0){return new Be(t,n,t.version||1)}constructor(t,n,l){this.declaration=t,this.bundle=n,this.version=l}getVersion(){return this.version}getDeclaration(){return this.declaration}isBundle(){return this.bundle!==void 0}getBundle(){return this.bundle}getBlueprint(){return this.getBundle()||this.getDeclaration()}}function pr(r){const t=r.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const kt=`Blueprint resource of type "bundled" requires a filesystem.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const br=require("@php-wasm/progress"),D=require("@php-wasm/util"),We=require("@php-wasm/universal"),we=require("@wp-playground/storage"),Pt=require("@php-wasm/web-service-worker"),gr=require("@php-wasm/stream-compression"),ae=require("@php-wasm/logger"),xr=require("@wp-playground/wordpress"),wr=require("@wp-playground/common");function Cr(r){return r&&"read"in r&&typeof r.read=="function"}async function _t(r){if(!Cr(r))return r;const n=await(await r.read("blueprint.json")).text();return JSON.parse(n)}class Be{static async create(t){const n=await _t(t),l=Cr(t)?t:void 0;return Be.createFromDeclaration(n,l)}static createFromDeclaration(t,n=void 0){return new Be(t,n,t.version||1)}constructor(t,n,l){this.declaration=t,this.bundle=n,this.version=l}getVersion(){return this.version}getDeclaration(){return this.declaration}isBundle(){return this.bundle!==void 0}getBundle(){return this.bundle}getBlueprint(){return this.getBundle()||this.getDeclaration()}}function pr(r){const t=r.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const kt=`Blueprint resource of type "bundled" requires a filesystem.
2
2
 
3
3
  This Blueprint refers to files that should be bundled with it (like images, plugins, or themes), but the filesystem needed to access these files is not available. This usually happens when:
4
4