@wp-playground/blueprints 0.9.18 → 0.9.19
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 +62 -6
- package/index.cjs +105 -20
- package/index.d.ts +52 -8
- package/index.js +490 -280
- package/lib/steps/handlers.d.ts +2 -0
- package/lib/steps/import-theme-starter-content.d.ts +25 -0
- package/lib/steps/index.d.ts +4 -2
- package/lib/steps/install-theme.d.ts +6 -1
- package/lib/steps/set-site-language.d.ts +22 -0
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1448,7 +1448,8 @@ export declare const installPlugin: StepHandler<InstallPluginStep<File>>;
|
|
|
1448
1448
|
* "slug": "pendant"
|
|
1449
1449
|
* },
|
|
1450
1450
|
* "options": {
|
|
1451
|
-
* "activate": true
|
|
1451
|
+
* "activate": true,
|
|
1452
|
+
* "importStarterContent": true
|
|
1452
1453
|
* }
|
|
1453
1454
|
* }
|
|
1454
1455
|
* </code>
|
|
@@ -1470,6 +1471,10 @@ export interface InstallThemeStep<ResourceType> extends Pick<InstallAssetOptions
|
|
|
1470
1471
|
* Whether to activate the theme after installing it.
|
|
1471
1472
|
*/
|
|
1472
1473
|
activate?: boolean;
|
|
1474
|
+
/**
|
|
1475
|
+
* Whether to import the theme's starter content after installing it.
|
|
1476
|
+
*/
|
|
1477
|
+
importStarterContent?: boolean;
|
|
1473
1478
|
};
|
|
1474
1479
|
}
|
|
1475
1480
|
export interface InstallThemeOptions {
|
|
@@ -1996,6 +2001,30 @@ export interface ImportWordPressFilesStep<ResourceType> {
|
|
|
1996
2001
|
* @param wordPressFilesZip Zipped WordPress site.
|
|
1997
2002
|
*/
|
|
1998
2003
|
export declare const importWordPressFiles: StepHandler<ImportWordPressFilesStep<File>>;
|
|
2004
|
+
/**
|
|
2005
|
+
* @inheritDoc importThemeStarterContent
|
|
2006
|
+
* @example
|
|
2007
|
+
*
|
|
2008
|
+
* <code>
|
|
2009
|
+
* {
|
|
2010
|
+
* "step": "importThemeStarterContent"
|
|
2011
|
+
* }
|
|
2012
|
+
* </code>
|
|
2013
|
+
*/
|
|
2014
|
+
export interface ImportThemeStarterContentStep {
|
|
2015
|
+
/** The step identifier. */
|
|
2016
|
+
step: "importThemeStarterContent";
|
|
2017
|
+
/**
|
|
2018
|
+
* The name of the theme to import content from.
|
|
2019
|
+
*/
|
|
2020
|
+
themeSlug?: string;
|
|
2021
|
+
}
|
|
2022
|
+
/**
|
|
2023
|
+
* Imports a theme Starter Content into WordPress.
|
|
2024
|
+
*
|
|
2025
|
+
* @param playground Playground client.
|
|
2026
|
+
*/
|
|
2027
|
+
export declare const importThemeStarterContent: StepHandler<ImportThemeStarterContentStep>;
|
|
1999
2028
|
/**
|
|
2000
2029
|
* @inheritDoc importWxr
|
|
2001
2030
|
* @example
|
|
@@ -2091,6 +2120,27 @@ export interface ResetDataStep {
|
|
|
2091
2120
|
* @param playground Playground client.
|
|
2092
2121
|
*/
|
|
2093
2122
|
export declare const resetData: StepHandler<ResetDataStep>;
|
|
2123
|
+
/**
|
|
2124
|
+
* @inheritDoc setSiteLanguage
|
|
2125
|
+
* @hasRunnableExample
|
|
2126
|
+
* @example
|
|
2127
|
+
*
|
|
2128
|
+
* <code>
|
|
2129
|
+
* {
|
|
2130
|
+
* "step": "setSiteLanguage",
|
|
2131
|
+
* "language": "en_US"
|
|
2132
|
+
* }
|
|
2133
|
+
* </code>
|
|
2134
|
+
*/
|
|
2135
|
+
export interface SetSiteLanguageStep {
|
|
2136
|
+
step: "setSiteLanguage";
|
|
2137
|
+
/** The language to set, e.g. 'en_US' */
|
|
2138
|
+
language: string;
|
|
2139
|
+
}
|
|
2140
|
+
/**
|
|
2141
|
+
* Sets the site language and download translations.
|
|
2142
|
+
*/
|
|
2143
|
+
export declare const setSiteLanguage: StepHandler<SetSiteLanguageStep>;
|
|
2094
2144
|
/**
|
|
2095
2145
|
* Used by the export step to exclude the Playground-specific files
|
|
2096
2146
|
* from the zip file. Keep it in sync with the list of files created
|
|
@@ -2108,7 +2158,7 @@ export type StepDefinition = Step & {
|
|
|
2108
2158
|
* If you add a step here, make sure to also
|
|
2109
2159
|
* add it to the exports below.
|
|
2110
2160
|
*/
|
|
2111
|
-
export type GenericStep<Resource> = ActivatePluginStep | ActivateThemeStep | CpStep | DefineWpConfigConstsStep | DefineSiteUrlStep | EnableMultisiteStep | ImportWxrStep<Resource> | ImportWordPressFilesStep<Resource> | InstallPluginStep<Resource> | InstallThemeStep<Resource> | LoginStep | MkdirStep | MvStep | ResetDataStep | RequestStep | RmStep | RmdirStep | RunPHPStep | RunPHPWithOptionsStep | RunWpInstallationWizardStep | RunSqlStep<Resource> | SetSiteOptionsStep | UnzipStep<Resource> | UpdateUserMetaStep | WriteFileStep<Resource> | WPCLIStep;
|
|
2161
|
+
export type GenericStep<Resource> = ActivatePluginStep | ActivateThemeStep | CpStep | DefineWpConfigConstsStep | DefineSiteUrlStep | EnableMultisiteStep | ImportWxrStep<Resource> | ImportThemeStarterContentStep | ImportWordPressFilesStep<Resource> | InstallPluginStep<Resource> | InstallThemeStep<Resource> | LoginStep | MkdirStep | MvStep | ResetDataStep | RequestStep | RmStep | RmdirStep | RunPHPStep | RunPHPWithOptionsStep | RunWpInstallationWizardStep | RunSqlStep<Resource> | SetSiteOptionsStep | UnzipStep<Resource> | UpdateUserMetaStep | WriteFileStep<Resource> | WPCLIStep | SetSiteLanguageStep;
|
|
2112
2162
|
/**
|
|
2113
2163
|
* Progress reporting details.
|
|
2114
2164
|
*/
|
|
@@ -2199,20 +2249,14 @@ export interface Blueprint {
|
|
|
2199
2249
|
};
|
|
2200
2250
|
/**
|
|
2201
2251
|
* PHP Constants to define on every request
|
|
2202
|
-
* @deprecated This experimental option will change without warning.
|
|
2203
|
-
* Use `steps` instead.
|
|
2204
2252
|
*/
|
|
2205
2253
|
constants?: Record<string, string>;
|
|
2206
2254
|
/**
|
|
2207
2255
|
* WordPress plugins to install and activate
|
|
2208
|
-
* @deprecated This experimental option will change without warning.
|
|
2209
|
-
* Use `steps` instead.
|
|
2210
2256
|
*/
|
|
2211
2257
|
plugins?: Array<string | FileReference>;
|
|
2212
2258
|
/**
|
|
2213
2259
|
* WordPress site options to define
|
|
2214
|
-
* @deprecated This experimental option will change without warning.
|
|
2215
|
-
* Use `steps` instead.
|
|
2216
2260
|
*/
|
|
2217
2261
|
siteOptions?: Record<string, string> & {
|
|
2218
2262
|
/** The site title */
|