@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.
- package/blueprint-schema.json +28 -5
- package/index.cjs +33 -23
- package/index.d.ts +11 -25
- package/index.js +1021 -1002
- package/lib/steps/handlers.d.ts +1 -2
- package/lib/steps/import-wxr.d.ts +27 -0
- package/lib/steps/index.d.ts +3 -3
- package/lib/steps/wp-cli.d.ts +1 -1
- package/package.json +2 -2
- package/schema-readme.md +1 -1
- package/lib/steps/export-wxz.d.ts +0 -9
- package/lib/steps/import-file.d.ts +0 -29
package/index.d.ts
CHANGED
|
@@ -193,6 +193,7 @@ export interface PHPRequestEndEvent {
|
|
|
193
193
|
export interface PHPRequestErrorEvent {
|
|
194
194
|
type: "request.error";
|
|
195
195
|
error: Error;
|
|
196
|
+
source?: "request" | "php-wasm";
|
|
196
197
|
}
|
|
197
198
|
/**
|
|
198
199
|
* Represents a PHP runtime initialization event.
|
|
@@ -658,11 +659,6 @@ export interface PHPRunOptions {
|
|
|
658
659
|
* The code snippet to eval instead of a php file.
|
|
659
660
|
*/
|
|
660
661
|
code?: string;
|
|
661
|
-
/**
|
|
662
|
-
* Whether to throw an error if the PHP process exits with a non-zero code
|
|
663
|
-
* or outputs to stderr.
|
|
664
|
-
*/
|
|
665
|
-
throwOnError?: boolean;
|
|
666
662
|
}
|
|
667
663
|
export interface RmDirOptions {
|
|
668
664
|
/**
|
|
@@ -691,7 +687,7 @@ declare const SupportedPHPVersions: readonly [
|
|
|
691
687
|
];
|
|
692
688
|
export type SupportedPHPVersion = (typeof SupportedPHPVersions)[number];
|
|
693
689
|
export type SupportedPHPExtension = "iconv" | "mbstring" | "xml-bundle" | "gd";
|
|
694
|
-
export type SupportedPHPExtensionBundle = "kitchen-sink";
|
|
690
|
+
export type SupportedPHPExtensionBundle = "kitchen-sink" | "light";
|
|
695
691
|
export interface SemaphoreOptions {
|
|
696
692
|
concurrency: number;
|
|
697
693
|
}
|
|
@@ -1591,33 +1587,31 @@ export interface ImportWordPressFilesStep<ResourceType> {
|
|
|
1591
1587
|
*/
|
|
1592
1588
|
export declare const importWordPressFiles: StepHandler<ImportWordPressFilesStep<File>>;
|
|
1593
1589
|
/**
|
|
1594
|
-
* @inheritDoc
|
|
1590
|
+
* @inheritDoc importWxr
|
|
1595
1591
|
* @example
|
|
1596
1592
|
*
|
|
1597
1593
|
* <code>
|
|
1598
1594
|
* {
|
|
1599
|
-
* "step": "
|
|
1595
|
+
* "step": "importWxr",
|
|
1600
1596
|
* "file": {
|
|
1601
1597
|
* "resource": "url",
|
|
1602
|
-
* "url": "https://your-site.com/starter-content.
|
|
1598
|
+
* "url": "https://your-site.com/starter-content.wxr"
|
|
1603
1599
|
* }
|
|
1604
1600
|
* }
|
|
1605
1601
|
* </code>
|
|
1606
1602
|
*/
|
|
1607
|
-
export interface
|
|
1608
|
-
step: "
|
|
1603
|
+
export interface ImportWxrStep<ResourceType> {
|
|
1604
|
+
step: "importWxr";
|
|
1609
1605
|
/** The file to import */
|
|
1610
1606
|
file: ResourceType;
|
|
1611
1607
|
}
|
|
1612
1608
|
/**
|
|
1613
|
-
*
|
|
1614
|
-
* Supports both WXR and WXZ files.
|
|
1609
|
+
* Imports a WXR file into WordPress.
|
|
1615
1610
|
*
|
|
1616
|
-
* @see https://github.com/WordPress/wordpress-importer/compare/master...akirk:wordpress-importer:import-wxz.patch
|
|
1617
1611
|
* @param playground Playground client.
|
|
1618
1612
|
* @param file The file to import.
|
|
1619
1613
|
*/
|
|
1620
|
-
export declare const
|
|
1614
|
+
export declare const importWxr: StepHandler<ImportWxrStep<File>>;
|
|
1621
1615
|
/**
|
|
1622
1616
|
* @inheritDoc enableMultisite
|
|
1623
1617
|
* @hasRunnableExample
|
|
@@ -1648,7 +1642,7 @@ export declare const enableMultisite: StepHandler<EnableMultisiteStep>;
|
|
|
1648
1642
|
*
|
|
1649
1643
|
* <code>
|
|
1650
1644
|
* {
|
|
1651
|
-
* "step": "
|
|
1645
|
+
* "step": "wp-cli",
|
|
1652
1646
|
* "command": "wp post create --post_title='Test post' --post_excerpt='Some content'"
|
|
1653
1647
|
* }
|
|
1654
1648
|
* </code>
|
|
@@ -1682,7 +1676,7 @@ export type StepDefinition = Step & {
|
|
|
1682
1676
|
* If you add a step here, make sure to also
|
|
1683
1677
|
* add it to the exports below.
|
|
1684
1678
|
*/
|
|
1685
|
-
export type GenericStep<Resource> = ActivatePluginStep | ActivateThemeStep | CpStep | DefineWpConfigConstsStep | DefineSiteUrlStep | EnableMultisiteStep |
|
|
1679
|
+
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;
|
|
1686
1680
|
/**
|
|
1687
1681
|
* Progress reporting details.
|
|
1688
1682
|
*/
|
|
@@ -1703,14 +1697,6 @@ php: UniversalPHP, args: Omit<S, "step">, progressArgs?: StepProgress) => Return
|
|
|
1703
1697
|
* @returns WXR file
|
|
1704
1698
|
*/
|
|
1705
1699
|
export declare function exportWXR(playground: UniversalPHP): Promise<File>;
|
|
1706
|
-
/**
|
|
1707
|
-
* Exports the WordPress database as a WXZ file using
|
|
1708
|
-
* the export-wxz plugin from https://github.com/akirk/export-wxz.
|
|
1709
|
-
*
|
|
1710
|
-
* @param playground Playground client
|
|
1711
|
-
* @returns WXZ file
|
|
1712
|
-
*/
|
|
1713
|
-
export declare function exportWXZ(playground: UniversalPHP): Promise<File>;
|
|
1714
1700
|
export interface ZipWpContentOptions {
|
|
1715
1701
|
/**
|
|
1716
1702
|
* @private
|