@wp-playground/blueprints 0.5.4 → 0.5.6
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/blueprint-schema.json +0 -3
- package/index.cjs +30 -74
- package/index.d.ts +0 -1
- package/index.js +1143 -1217
- package/lib/steps/apply-wordpress-patches/index.d.ts +0 -32
- package/lib/steps/handlers.d.ts +1 -1
- package/lib/steps/index.d.ts +1 -1
- package/package.json +2 -2
- /package/lib/steps/{import-wp-content.d.ts → import-wordpress-files.d.ts} +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { UniversalPHP } from '../../../../../../php-wasm/universal/src/index.ts';
|
|
2
1
|
import { StepHandler } from '..';
|
|
3
2
|
/**
|
|
4
3
|
* @private
|
|
@@ -11,38 +10,7 @@ export interface ApplyWordPressPatchesStep {
|
|
|
11
10
|
patchSecrets?: boolean;
|
|
12
11
|
disableSiteHealth?: boolean;
|
|
13
12
|
disableWpNewBlogNotification?: boolean;
|
|
14
|
-
makeEditorFrameControlled?: boolean;
|
|
15
13
|
prepareForRunningInsideWebBrowser?: boolean;
|
|
16
14
|
addFetchNetworkTransport?: boolean;
|
|
17
15
|
}
|
|
18
16
|
export declare const applyWordPressPatches: StepHandler<ApplyWordPressPatchesStep>;
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* Pair the site editor's nested iframe to the Service Worker.
|
|
22
|
-
*
|
|
23
|
-
* Without the patch below, the site editor initiates network requests that
|
|
24
|
-
* aren't routed through the service worker. That's a known browser issue:
|
|
25
|
-
*
|
|
26
|
-
* * https://bugs.chromium.org/p/chromium/issues/detail?id=880768
|
|
27
|
-
* * https://bugzilla.mozilla.org/show_bug.cgi?id=1293277
|
|
28
|
-
* * https://github.com/w3c/ServiceWorker/issues/765
|
|
29
|
-
*
|
|
30
|
-
* The problem with iframes using srcDoc and src="about:blank" as they
|
|
31
|
-
* fail to inherit the root site's service worker.
|
|
32
|
-
*
|
|
33
|
-
* Gutenberg loads the site editor using <iframe srcDoc="<!doctype html">
|
|
34
|
-
* to force the standards mode and not the quirks mode:
|
|
35
|
-
*
|
|
36
|
-
* https://github.com/WordPress/gutenberg/pull/38855
|
|
37
|
-
*
|
|
38
|
-
* This commit patches the site editor to achieve the same result via
|
|
39
|
-
* <iframe src="/doctype.html"> and a doctype.html file containing just
|
|
40
|
-
* `<!doctype html>`. This allows the iframe to inherit the service worker
|
|
41
|
-
* and correctly load all the css, js, fonts, images, and other assets.
|
|
42
|
-
*
|
|
43
|
-
* Ideally this issue would be fixed directly in Gutenberg and the patch
|
|
44
|
-
* below would be removed.
|
|
45
|
-
*
|
|
46
|
-
* See https://github.com/WordPress/wordpress-playground/issues/42 for more details
|
|
47
|
-
*/
|
|
48
|
-
export declare function makeEditorFrameControlled(php: UniversalPHP, wordpressPath: string, blockEditorScripts: string[]): Promise<void>;
|
package/lib/steps/handlers.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { rmdir } from './rmdir';
|
|
|
14
14
|
export { writeFile } from './write-file';
|
|
15
15
|
export { defineSiteUrl } from './define-site-url';
|
|
16
16
|
export { importFile } from './import-file';
|
|
17
|
-
export { importWordPressFiles } from './import-
|
|
17
|
+
export { importWordPressFiles } from './import-wordpress-files';
|
|
18
18
|
export { exportWXR } from './export-wxr';
|
|
19
19
|
export { exportWXZ } from './export-wxz';
|
|
20
20
|
export { unzip } from './unzip';
|
package/lib/steps/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ import { WriteFileStep } from './write-file';
|
|
|
23
23
|
import { DefineWpConfigConstsStep } from './define-wp-config-consts';
|
|
24
24
|
import { ActivateThemeStep } from './activate-theme';
|
|
25
25
|
import { UnzipStep } from './unzip';
|
|
26
|
-
import { ImportWordPressFilesStep } from './import-
|
|
26
|
+
import { ImportWordPressFilesStep } from './import-wordpress-files';
|
|
27
27
|
import { ImportFileStep } from './import-file';
|
|
28
28
|
export type Step = GenericStep<FileReference>;
|
|
29
29
|
export type StepDefinition = Step & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-playground/blueprints",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
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": "
|
|
24
|
+
"gitHead": "72e190ebb407051ccb5ef544e2a62018395395a0",
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=18.18.2",
|
|
27
27
|
"npm": ">=8.11.0"
|
|
File without changes
|