File tree Expand file tree Collapse file tree 1 file changed +17
-13
lines changed
packages/playground/website/src/lib/state/url Expand file tree Collapse file tree 1 file changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type {
2
2
BlueprintDeclaration ,
3
3
BlueprintBundle ,
4
4
Blueprint ,
5
+ StepDefinition ,
5
6
} from '@wp-playground/client' ;
6
7
import {
7
8
getBlueprintDeclaration ,
@@ -66,30 +67,33 @@ export async function resolveBlueprintFromURL(
66
67
plugins : query . getAll ( 'plugin' ) ,
67
68
steps : [
68
69
importWxrQueryArg &&
69
- / ^ ( h t t p ( s ? ) ) : \/ \/ / i. test ( importWxrQueryArg ) && {
70
+ / ^ ( h t t p ( s ? ) ) : \/ \/ / i. test ( importWxrQueryArg ) &&
71
+ ( {
70
72
step : 'importWxr' ,
71
73
file : {
72
74
resource : 'url' ,
73
75
url : importWxrQueryArg ,
74
76
} ,
75
- } ,
77
+ } as StepDefinition ) ,
76
78
query . get ( 'import-site' ) &&
77
- / ^ ( h t t p ( s ? ) ) : \/ \/ / i. test ( query . get ( 'import-site' ) ! ) && {
79
+ / ^ ( h t t p ( s ? ) ) : \/ \/ / i. test ( query . get ( 'import-site' ) ! ) &&
80
+ ( {
78
81
step : 'importWordPressFiles' ,
79
82
wordPressFilesZip : {
80
83
resource : 'url' ,
81
84
url : query . get ( 'import-site' ) ! ,
82
85
} ,
83
- } ,
84
- query . get ( 'theme' ) && {
85
- step : 'installTheme' ,
86
- themeData : {
87
- resource : 'wordpress.org/themes' ,
88
- slug : query . get ( 'theme' ) ! ,
89
- } ,
90
- progress : { weight : 2 } ,
91
- } ,
92
- ] ,
86
+ } as StepDefinition ) ,
87
+ query . get ( 'theme' ) &&
88
+ ( {
89
+ step : 'installTheme' ,
90
+ themeData : {
91
+ resource : 'wordpress.org/themes' ,
92
+ slug : query . get ( 'theme' ) ! ,
93
+ } ,
94
+ progress : { weight : 2 } ,
95
+ } as StepDefinition ) ,
96
+ ] . filter ( Boolean ) ,
93
97
} ;
94
98
source = {
95
99
type : 'none' ,
You can’t perform that action at this time.
0 commit comments