diff --git a/packages/wp-now/src/wp-now.ts b/packages/wp-now/src/wp-now.ts index 4f628747..6cc447ea 100644 --- a/packages/wp-now/src/wp-now.ts +++ b/packages/wp-now/src/wp-now.ts @@ -8,10 +8,13 @@ import { downloadWordPress, } from './download'; import { + StepDefinition, activatePlugin, activateTheme, + compileBlueprint, defineWpConfigConsts, login, + runBlueprintSteps, } from '@wp-playground/blueprints'; import { WPNowOptions, WPNowMode } from './config'; import { @@ -132,6 +135,19 @@ export default async function startWPNow( await activatePluginOrTheme(php, options); } + if (options.blueprintObject) { + output.log(`blueprint steps: ${options.blueprintObject.steps.length}`); + const compiled = compileBlueprint(options.blueprintObject, { + onStepCompleted: (result, step: StepDefinition) => { + output.log(`Blueprint Step completed: ${step.step}`, { + result, + step, + }); + }, + }); + await runBlueprintSteps(compiled, php); + } + return { php, phpInstances,