Skip to content

Commit ec0e554

Browse files
committed
lint
1 parent aa024f4 commit ec0e554

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

packages/playground/blueprints/src/lib/v2/run-blueprint-v2.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ export async function runBlueprintV2(
124124
/**
125125
* Prepare hooks, filters, and run the Blueprint:
126126
*/
127-
console.log('options.blueprintOverrides', options.blueprintOverrides);
128127
await php?.writeFile(
129128
'/tmp/run-blueprints.php',
130129
`<?php
@@ -222,13 +221,6 @@ require( "/tmp/blueprints.phar" );
222221
])) as StreamedPHPResponse;
223222

224223
streamedResponse.finished.finally(unbindMessageListener);
225-
streamedResponse.stdout.pipeTo(
226-
new WritableStream({
227-
write(chunk) {
228-
console.log('stdout', new TextDecoder().decode(chunk));
229-
},
230-
})
231-
);
232224

233225
return streamedResponse;
234226
}

packages/playground/client/src/apply-blueprint-overrides.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import type {
22
BlueprintV1Declaration,
33
BlueprintV1,
4-
BlueprintBundle,
54
} from '@wp-playground/blueprints';
6-
import { isBlueprintBundle } from '@wp-playground/blueprints';
75
import { RecommendedPHPVersion } from '@wp-playground/common';
86
import type { BlueprintOverrides } from './index';
97

@@ -21,11 +19,19 @@ export function applyBlueprintOverrides(
2119
): BlueprintV1 {
2220
// If it's a bundle, we can't modify it - return as is
2321
// The overrides will be applied during compilation
24-
if (isBlueprintBundle(blueprint)) {
22+
// Inline check: blueprint is a bundle if it has a 'read' function
23+
if (
24+
blueprint &&
25+
'read' in blueprint &&
26+
typeof blueprint.read === 'function'
27+
) {
2528
return blueprint;
2629
}
2730

28-
return applyOverridesToDeclaration(blueprint, overrides);
31+
return applyOverridesToDeclaration(
32+
blueprint as BlueprintV1Declaration,
33+
overrides
34+
);
2935
}
3036

3137
function applyOverridesToDeclaration(

packages/playground/client/src/blueprints-v2-handler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { ProgressTracker } from '@php-wasm/progress';
22
import type { PlaygroundClient, StartPlaygroundOptions } from '.';
3-
import { BlueprintReflection } from '@wp-playground/blueprints';
43
import { collectPhpLogs, logger } from '@php-wasm/logger';
54
import { consumeAPI } from '@php-wasm/universal';
65

@@ -26,6 +25,9 @@ export class BlueprintsV2Handler {
2625
// Convert v1 blueprint to v2 if needed
2726
let blueprint: any = rawBlueprint;
2827
if (rawBlueprint) {
28+
const { BlueprintReflection } = await import(
29+
'@wp-playground/blueprints'
30+
);
2931
const reflection = await BlueprintReflection.create(rawBlueprint);
3032
if (reflection.getVersion() === 1) {
3133
// Convert v1 to minimal v2 blueprint

packages/playground/website/src/lib/state/redux/slice-sites.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { selectActiveSite, setActiveSite } from './store';
99
import { opfsSiteStorage } from '../opfs/opfs-site-storage';
1010
import {
1111
type BlueprintV1,
12-
BlueprintReflection,
1312
type RuntimeConfiguration,
1413
resolveRuntimeConfiguration,
1514
} from '@wp-playground/blueprints';

0 commit comments

Comments
 (0)