@wp-playground/blueprints 0.9.17 → 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/lib/steps/handlers.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { rmdir } from './rmdir';
|
|
|
13
13
|
export { writeFile } from './write-file';
|
|
14
14
|
export { defineSiteUrl } from './define-site-url';
|
|
15
15
|
export { importWxr as importWxr } from './import-wxr';
|
|
16
|
+
export { importThemeStarterContent as importThemeStarterContent } from './import-theme-starter-content';
|
|
16
17
|
export { importWordPressFiles } from './import-wordpress-files';
|
|
17
18
|
export { exportWXR } from './export-wxr';
|
|
18
19
|
export { unzip } from './unzip';
|
|
@@ -25,3 +26,4 @@ export { setSiteOptions, updateUserMeta } from './site-data';
|
|
|
25
26
|
export { defineWpConfigConsts } from './define-wp-config-consts';
|
|
26
27
|
export { zipWpContent } from './zip-wp-content';
|
|
27
28
|
export { wpCLI } from './wp-cli';
|
|
29
|
+
export { setSiteLanguage } from './set-site-language';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StepHandler } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* @inheritDoc importThemeStarterContent
|
|
4
|
+
* @example
|
|
5
|
+
*
|
|
6
|
+
* <code>
|
|
7
|
+
* {
|
|
8
|
+
* "step": "importThemeStarterContent"
|
|
9
|
+
* }
|
|
10
|
+
* </code>
|
|
11
|
+
*/
|
|
12
|
+
export interface ImportThemeStarterContentStep {
|
|
13
|
+
/** The step identifier. */
|
|
14
|
+
step: 'importThemeStarterContent';
|
|
15
|
+
/**
|
|
16
|
+
* The name of the theme to import content from.
|
|
17
|
+
*/
|
|
18
|
+
themeSlug?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Imports a theme Starter Content into WordPress.
|
|
22
|
+
*
|
|
23
|
+
* @param playground Playground client.
|
|
24
|
+
*/
|
|
25
|
+
export declare const importThemeStarterContent: StepHandler<ImportThemeStarterContentStep>;
|
package/lib/steps/index.d.ts
CHANGED
|
@@ -22,10 +22,12 @@ import { DefineWpConfigConstsStep } from './define-wp-config-consts';
|
|
|
22
22
|
import { ActivateThemeStep } from './activate-theme';
|
|
23
23
|
import { UnzipStep } from './unzip';
|
|
24
24
|
import { ImportWordPressFilesStep } from './import-wordpress-files';
|
|
25
|
+
import { ImportThemeStarterContentStep } from './import-theme-starter-content';
|
|
25
26
|
import { ImportWxrStep } from './import-wxr';
|
|
26
27
|
import { EnableMultisiteStep } from './enable-multisite';
|
|
27
28
|
import { WPCLIStep } from './wp-cli';
|
|
28
29
|
import { ResetDataStep } from './reset-data';
|
|
30
|
+
import { SetSiteLanguageStep } from './set-site-language';
|
|
29
31
|
export type Step = GenericStep<FileReference>;
|
|
30
32
|
export type StepDefinition = Step & {
|
|
31
33
|
progress?: {
|
|
@@ -38,8 +40,8 @@ export { wpContentFilesExcludedFromExport } from '../utils/wp-content-files-excl
|
|
|
38
40
|
* If you add a step here, make sure to also
|
|
39
41
|
* add it to the exports below.
|
|
40
42
|
*/
|
|
41
|
-
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;
|
|
42
|
-
export type { ActivatePluginStep, ActivateThemeStep, CpStep, DefineWpConfigConstsStep, DefineSiteUrlStep, EnableMultisiteStep, ImportWxrStep, ImportWordPressFilesStep, InstallPluginStep, InstallPluginOptions, InstallThemeStep, InstallThemeOptions, LoginStep, MkdirStep, MvStep, ResetDataStep, RequestStep, RmStep, RmdirStep, RunPHPStep, RunPHPWithOptionsStep, RunWpInstallationWizardStep, RunSqlStep, WordPressInstallationOptions, SetSiteOptionsStep, UnzipStep, UpdateUserMetaStep, WriteFileStep, WPCLIStep, };
|
|
43
|
+
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;
|
|
44
|
+
export type { ActivatePluginStep, ActivateThemeStep, CpStep, DefineWpConfigConstsStep, DefineSiteUrlStep, EnableMultisiteStep, ImportWxrStep, ImportThemeStarterContentStep, ImportWordPressFilesStep, InstallPluginStep, InstallPluginOptions, InstallThemeStep, InstallThemeOptions, LoginStep, MkdirStep, MvStep, ResetDataStep, RequestStep, RmStep, RmdirStep, RunPHPStep, RunPHPWithOptionsStep, RunWpInstallationWizardStep, RunSqlStep, WordPressInstallationOptions, SetSiteOptionsStep, UnzipStep, UpdateUserMetaStep, WriteFileStep, WPCLIStep, SetSiteLanguageStep, };
|
|
43
45
|
/**
|
|
44
46
|
* Progress reporting details.
|
|
45
47
|
*/
|
|
@@ -14,7 +14,8 @@ import { InstallAssetOptions } from './install-asset';
|
|
|
14
14
|
* "slug": "pendant"
|
|
15
15
|
* },
|
|
16
16
|
* "options": {
|
|
17
|
-
* "activate": true
|
|
17
|
+
* "activate": true,
|
|
18
|
+
* "importStarterContent": true
|
|
18
19
|
* }
|
|
19
20
|
* }
|
|
20
21
|
* </code>
|
|
@@ -36,6 +37,10 @@ export interface InstallThemeStep<ResourceType> extends Pick<InstallAssetOptions
|
|
|
36
37
|
* Whether to activate the theme after installing it.
|
|
37
38
|
*/
|
|
38
39
|
activate?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to import the theme's starter content after installing it.
|
|
42
|
+
*/
|
|
43
|
+
importStarterContent?: boolean;
|
|
39
44
|
};
|
|
40
45
|
}
|
|
41
46
|
export interface InstallThemeOptions {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StepHandler } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* @inheritDoc setSiteLanguage
|
|
4
|
+
* @hasRunnableExample
|
|
5
|
+
* @example
|
|
6
|
+
*
|
|
7
|
+
* <code>
|
|
8
|
+
* {
|
|
9
|
+
* "step": "setSiteLanguage",
|
|
10
|
+
* "language": "en_US"
|
|
11
|
+
* }
|
|
12
|
+
* </code>
|
|
13
|
+
*/
|
|
14
|
+
export interface SetSiteLanguageStep {
|
|
15
|
+
step: 'setSiteLanguage';
|
|
16
|
+
/** The language to set, e.g. 'en_US' */
|
|
17
|
+
language: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Sets the site language and download translations.
|
|
21
|
+
*/
|
|
22
|
+
export declare const setSiteLanguage: StepHandler<SetSiteLanguageStep>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-playground/blueprints",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.19",
|
|
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": "aafbbcdc4b0644885bd55d0ed67381952f0b16b6",
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=18.18.0",
|
|
27
27
|
"npm": ">=8.11.0"
|