@wp-playground/blueprints 3.0.2 → 3.0.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.
@@ -0,0 +1,19 @@
1
+ import type { Blueprint, BlueprintBundle } from './types';
2
+ import type { BlueprintV1Declaration } from './v1/types';
3
+ import type { BlueprintV2Declaration } from './v2/blueprint-v2-declaration';
4
+ export declare function isBlueprintBundle(input: any): input is BlueprintBundle;
5
+ export declare function getBlueprintDeclaration(blueprint: Blueprint): Promise<BlueprintV1Declaration | BlueprintV2Declaration>;
6
+ export type BlueprintType = 'bundle' | 'declaration';
7
+ export declare class BlueprintReflection {
8
+ private readonly declaration;
9
+ private readonly bundle;
10
+ private readonly version;
11
+ static create(blueprint: Blueprint): Promise<BlueprintReflection>;
12
+ static createFromDeclaration(declaration: BlueprintV1Declaration | BlueprintV2Declaration, bundle?: BlueprintBundle | undefined): BlueprintReflection;
13
+ protected constructor(declaration: BlueprintV1Declaration | BlueprintV2Declaration, bundle: BlueprintBundle | undefined, version: number);
14
+ getVersion(): number;
15
+ getDeclaration(): import("./v2/wep-1-blueprint-v2-schema/appendix-A-blueprint-v2-schema").V2Schema.BlueprintV2 | BlueprintV1Declaration;
16
+ isBundle(): boolean;
17
+ getBundle(): import("@wp-playground/storage").Filesystem | undefined;
18
+ getBlueprint(): Blueprint;
19
+ }
@@ -0,0 +1,2 @@
1
+ import type { Blueprint, RuntimeConfiguration } from './types';
2
+ export declare function resolveRuntimeConfiguration(blueprint: Blueprint): Promise<RuntimeConfiguration>;
@@ -25,7 +25,7 @@ export interface InstallAssetOptions {
25
25
  /**
26
26
  * Install asset: Extract folder from zip file and move it to target
27
27
  */
28
- export declare function installAsset(playground: UniversalPHP, { targetPath, zipFile, ifAlreadyInstalled, targetFolderName }: InstallAssetOptions): Promise<{
28
+ export declare function installAsset(playground: UniversalPHP, { targetPath, zipFile, ifAlreadyInstalled, targetFolderName, }: InstallAssetOptions): Promise<{
29
29
  assetFolderPath: string;
30
30
  assetFolderName: string;
31
31
  }>;
package/lib/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { Filesystem } from '@wp-playground/storage';
2
- import type { BlueprintV1, BlueprintV1Declaration } from './v1/types';
2
+ import type { BlueprintV1, BlueprintV1Declaration, ExtraLibrary, PHPConstants } from './v1/types';
3
3
  import type { BlueprintV2, BlueprintV2Declaration } from './v2/blueprint-v2-declaration';
4
+ import type { SupportedPHPVersion } from '@php-wasm/universal';
4
5
  /**
5
6
  * A filesystem structure containing a /blueprint.json file and any
6
7
  * resources referenced by that blueprint.
@@ -8,3 +9,11 @@ import type { BlueprintV2, BlueprintV2Declaration } from './v2/blueprint-v2-decl
8
9
  export type BlueprintBundle = Filesystem;
9
10
  export type BlueprintDeclaration = BlueprintV1Declaration | BlueprintV2Declaration;
10
11
  export type Blueprint = BlueprintV1 | BlueprintV2;
12
+ export interface RuntimeConfiguration {
13
+ phpVersion: SupportedPHPVersion;
14
+ wpVersion: string;
15
+ intl: boolean;
16
+ networking: boolean;
17
+ extraLibraries: ExtraLibrary[];
18
+ constants: PHPConstants;
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-playground/blueprints",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./index.js",
@@ -21,7 +21,7 @@
21
21
  "access": "public",
22
22
  "directory": "../../../dist/packages/playground/blueprints"
23
23
  },
24
- "gitHead": "35cc84863d9e92c1e6a5d354bb0727673b461216",
24
+ "gitHead": "238d05ffb780d420070b23384e0a906c71bd0611",
25
25
  "engines": {
26
26
  "node": ">=20.18.3",
27
27
  "npm": ">=10.1.0"
@@ -46,17 +46,17 @@
46
46
  "wasm-feature-detect": "1.8.0",
47
47
  "ws": "8.18.1",
48
48
  "yargs": "17.7.2",
49
- "@php-wasm/node-polyfills": "3.0.2",
50
- "@wp-playground/storage": "3.0.2",
51
- "@php-wasm/universal": "3.0.2",
52
- "@wp-playground/common": "3.0.2",
53
- "@php-wasm/util": "3.0.2",
54
- "@php-wasm/node": "3.0.2",
55
- "@wp-playground/wordpress": "3.0.2",
56
- "@php-wasm/logger": "3.0.2",
57
- "@php-wasm/progress": "3.0.2",
58
- "@php-wasm/stream-compression": "3.0.2",
59
- "@php-wasm/web": "3.0.2"
49
+ "@php-wasm/node-polyfills": "3.0.3",
50
+ "@wp-playground/storage": "3.0.3",
51
+ "@wp-playground/common": "3.0.3",
52
+ "@php-wasm/universal": "3.0.3",
53
+ "@php-wasm/util": "3.0.3",
54
+ "@php-wasm/node": "3.0.3",
55
+ "@wp-playground/wordpress": "3.0.3",
56
+ "@php-wasm/logger": "3.0.3",
57
+ "@php-wasm/progress": "3.0.3",
58
+ "@php-wasm/stream-compression": "3.0.3",
59
+ "@php-wasm/web": "3.0.3"
60
60
  },
61
61
  "overrides": {
62
62
  "rollup": "^4.34.6",