11import { readFile , writeFile } from "node:fs/promises"
2- import { buildGenericAbilityRuntimeRunRecipe , buildRuntimePackageRunRecipe , buildWordPressBenchRecipe , buildWordPressPhpunitRecipe , compileRecipeTemplate , type GenericAbilityRuntimeRunOptions , type RecipeTemplateInput , type RuntimePackageRunRecipeOptions , type WorkspaceRecipe , type WorkspaceRecipeExtraPlugin , type WorkspaceRecipeMount , type WorkspaceRecipeRuntimeService , type WorkspaceRecipeStep } from "@automattic/wp-codebox-core"
2+ import { buildGenericAbilityRuntimeRunRecipe , buildRuntimePackageRunRecipe , buildWordPressBenchRecipe , buildWordPressPhpunitRecipe , compileRecipeTemplate , type GenericAbilityRuntimeRunOptions , type RecipeTemplateInput , type RuntimePackageRunRecipeOptions , type WorkspaceRecipe , type WorkspaceRecipeExtraPlugin , type WorkspaceRecipeMount , type WorkspaceRecipePHPWasmExtensionManifest , type WorkspaceRecipeRuntimeBackendPackage , type WorkspaceRecipeRuntimeService , type WorkspaceRecipeStep } from "@automattic/wp-codebox-core"
33
44interface RecipeBuildOptions {
55 recipeType : "phpunit" | "bench" | "template" | "generic-ability-runtime-run" | "runtime-package-run"
@@ -10,6 +10,9 @@ interface RecipeBuildOptions {
1010interface WordPressPhpunitBuilderOptions {
1111 blueprint ?: unknown
1212 wordpressVersion ?: string
13+ phpVersion ?: string
14+ extensions ?: WorkspaceRecipePHPWasmExtensionManifest [ ]
15+ backendPackage ?: WorkspaceRecipeRuntimeBackendPackage
1316 mounts ?: WorkspaceRecipeMount [ ]
1417 services ?: WorkspaceRecipeRuntimeService [ ]
1518 extra_plugins ?: WorkspaceRecipeExtraPlugin [ ]
@@ -76,6 +79,9 @@ function buildRecipe(recipeType: RecipeBuildOptions["recipeType"], options: Word
7679 return buildWordPressPhpunitRecipe ( {
7780 blueprint : phpunitOptions . blueprint ,
7881 wordpressVersion : stringOrUndefined ( phpunitOptions . wordpressVersion ) ,
82+ phpVersion : stringOrUndefined ( phpunitOptions . phpVersion ) ,
83+ extensions : Array . isArray ( phpunitOptions . extensions ) ? phpunitOptions . extensions : [ ] ,
84+ backendPackage : phpunitOptions . backendPackage ,
7985 mounts : Array . isArray ( phpunitOptions . mounts ) ? phpunitOptions . mounts : [ ] ,
8086 services : Array . isArray ( phpunitOptions . services ) ? phpunitOptions . services : [ ] ,
8187 extra_plugins : Array . isArray ( phpunitOptions . extra_plugins ) ? phpunitOptions . extra_plugins : [ ] ,
0 commit comments