@wp-playground/blueprints 0.6.8 → 0.6.10

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.
@@ -13,10 +13,9 @@ export { mkdir } from './mkdir';
13
13
  export { rmdir } from './rmdir';
14
14
  export { writeFile } from './write-file';
15
15
  export { defineSiteUrl } from './define-site-url';
16
- export { importFile } from './import-file';
16
+ export { importWxr as importWxr } from './import-wxr';
17
17
  export { importWordPressFiles } from './import-wordpress-files';
18
18
  export { exportWXR } from './export-wxr';
19
- export { exportWXZ } from './export-wxz';
20
19
  export { unzip } from './unzip';
21
20
  export { installPlugin } from './install-plugin';
22
21
  export { installTheme } from './install-theme';
@@ -0,0 +1,27 @@
1
+ import { StepHandler } from '.';
2
+ /**
3
+ * @inheritDoc importWxr
4
+ * @example
5
+ *
6
+ * <code>
7
+ * {
8
+ * "step": "importWxr",
9
+ * "file": {
10
+ * "resource": "url",
11
+ * "url": "https://your-site.com/starter-content.wxr"
12
+ * }
13
+ * }
14
+ * </code>
15
+ */
16
+ export interface ImportWxrStep<ResourceType> {
17
+ step: 'importWxr';
18
+ /** The file to import */
19
+ file: ResourceType;
20
+ }
21
+ /**
22
+ * Imports a WXR file into WordPress.
23
+ *
24
+ * @param playground Playground client.
25
+ * @param file The file to import.
26
+ */
27
+ export declare const importWxr: StepHandler<ImportWxrStep<File>>;
@@ -23,7 +23,7 @@ import { DefineWpConfigConstsStep } from './define-wp-config-consts';
23
23
  import { ActivateThemeStep } from './activate-theme';
24
24
  import { UnzipStep } from './unzip';
25
25
  import { ImportWordPressFilesStep } from './import-wordpress-files';
26
- import { ImportFileStep } from './import-file';
26
+ import { ImportWxrStep } from './import-wxr';
27
27
  import { EnableMultisiteStep } from './enable-multisite';
28
28
  import { WPCLIStep } from './wp-cli';
29
29
  export type Step = GenericStep<FileReference>;
@@ -38,8 +38,8 @@ export { wpContentFilesExcludedFromExport } from '../utils/wp-content-files-excl
38
38
  * If you add a step here, make sure to also
39
39
  * add it to the exports below.
40
40
  */
41
- export type GenericStep<Resource> = ActivatePluginStep | ActivateThemeStep | CpStep | DefineWpConfigConstsStep | DefineSiteUrlStep | EnableMultisiteStep | ImportFileStep<Resource> | ImportWordPressFilesStep<Resource> | InstallPluginStep<Resource> | InstallThemeStep<Resource> | LoginStep | MkdirStep | MvStep | RequestStep | RmStep | RmdirStep | RunPHPStep | RunPHPWithOptionsStep | RunWpInstallationWizardStep | RunSqlStep<Resource> | SetPhpIniEntryStep | SetSiteOptionsStep | UnzipStep<Resource> | UpdateUserMetaStep | WriteFileStep<Resource> | WPCLIStep;
42
- export type { ActivatePluginStep, ActivateThemeStep, CpStep, DefineWpConfigConstsStep, DefineSiteUrlStep, EnableMultisiteStep, ImportFileStep, ImportWordPressFilesStep, InstallPluginStep, InstallPluginOptions, InstallThemeStep, InstallThemeOptions, LoginStep, MkdirStep, MvStep, RequestStep, RmStep, RmdirStep, RunPHPStep, RunPHPWithOptionsStep, RunWpInstallationWizardStep, RunSqlStep, WordPressInstallationOptions, SetPhpIniEntryStep, SetSiteOptionsStep, UnzipStep, UpdateUserMetaStep, WriteFileStep, WPCLIStep, };
41
+ export type GenericStep<Resource> = ActivatePluginStep | ActivateThemeStep | CpStep | DefineWpConfigConstsStep | DefineSiteUrlStep | EnableMultisiteStep | ImportWxrStep<Resource> | ImportWordPressFilesStep<Resource> | InstallPluginStep<Resource> | InstallThemeStep<Resource> | LoginStep | MkdirStep | MvStep | RequestStep | RmStep | RmdirStep | RunPHPStep | RunPHPWithOptionsStep | RunWpInstallationWizardStep | RunSqlStep<Resource> | SetPhpIniEntryStep | 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, RequestStep, RmStep, RmdirStep, RunPHPStep, RunPHPWithOptionsStep, RunWpInstallationWizardStep, RunSqlStep, WordPressInstallationOptions, SetPhpIniEntryStep, SetSiteOptionsStep, UnzipStep, UpdateUserMetaStep, WriteFileStep, WPCLIStep, };
43
43
  /**
44
44
  * Progress reporting details.
45
45
  */
@@ -7,7 +7,7 @@ import { StepHandler } from '.';
7
7
  *
8
8
  * <code>
9
9
  * {
10
- * "step": "wpCLI",
10
+ * "step": "wp-cli",
11
11
  * "command": "wp post create --post_title='Test post' --post_excerpt='Some content'"
12
12
  * }
13
13
  * </code>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-playground/blueprints",
3
- "version": "0.6.8",
3
+ "version": "0.6.10",
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": "cb7b1af260489022238495a2fc0d96f767a1294a",
24
+ "gitHead": "a678c93cecd1c7fd5c8279ad8454a83225edd2aa",
25
25
  "engines": {
26
26
  "node": ">=18.18.2",
27
27
  "npm": ">=8.11.0"
package/schema-readme.md CHANGED
@@ -5,5 +5,5 @@ Whenever the types are modified, the schema needs to be rebuilt using
5
5
  `nx build playground-blueprints` and then committed to the repository.
6
6
 
7
7
  Unfortunately, it is not auto-rebuilt in `npm run dev` mode as the
8
- `dts-bundle-generator` utility we use for type rollyps does not support
8
+ `dts-bundle-generator` utility we use for type rollups does not support
9
9
  watching for changes.
@@ -1,9 +0,0 @@
1
- import { UniversalPHP } from '../../../../../php-wasm/universal/src/index.ts';
2
- /**
3
- * Exports the WordPress database as a WXZ file using
4
- * the export-wxz plugin from https://github.com/akirk/export-wxz.
5
- *
6
- * @param playground Playground client
7
- * @returns WXZ file
8
- */
9
- export declare function exportWXZ(playground: UniversalPHP): Promise<File>;
@@ -1,29 +0,0 @@
1
- import { StepHandler } from '.';
2
- /**
3
- * @inheritDoc importFile
4
- * @example
5
- *
6
- * <code>
7
- * {
8
- * "step": "importFile",
9
- * "file": {
10
- * "resource": "url",
11
- * "url": "https://your-site.com/starter-content.wxz"
12
- * }
13
- * }
14
- * </code>
15
- */
16
- export interface ImportFileStep<ResourceType> {
17
- step: 'importFile';
18
- /** The file to import */
19
- file: ResourceType;
20
- }
21
- /**
22
- * Uploads a file to the WordPress importer and returns the response.
23
- * Supports both WXR and WXZ files.
24
- *
25
- * @see https://github.com/WordPress/wordpress-importer/compare/master...akirk:wordpress-importer:import-wxz.patch
26
- * @param playground Playground client.
27
- * @param file The file to import.
28
- */
29
- export declare const importFile: StepHandler<ImportFileStep<File>>;