@wp-playground/client 0.6.7 → 0.6.8

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.
Files changed (4) hide show
  1. package/index.cjs +13 -13
  2. package/index.d.ts +41 -3
  3. package/index.js +938 -812
  4. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -201,6 +201,13 @@ export declare class PHPResponse implements PHPResponseData {
201
201
  export interface PHPRequestEndEvent {
202
202
  type: "request.end";
203
203
  }
204
+ /**
205
+ * Represents an error event related to the PHP request.
206
+ */
207
+ export interface PHPRequestErrorEvent {
208
+ type: "request.error";
209
+ error: Error;
210
+ }
204
211
  /**
205
212
  * Represents a PHP runtime initialization event.
206
213
  */
@@ -218,7 +225,7 @@ export interface PHPRuntimeBeforeDestroyEvent {
218
225
  * This is intentionally not an extension of CustomEvent
219
226
  * to make it isomorphic between different JavaScript runtimes.
220
227
  */
221
- export type PHPEvent = PHPRequestEndEvent | PHPRuntimeInitializedEvent | PHPRuntimeBeforeDestroyEvent;
228
+ export type PHPEvent = PHPRequestEndEvent | PHPRequestErrorEvent | PHPRuntimeInitializedEvent | PHPRuntimeBeforeDestroyEvent;
222
229
  /**
223
230
  * A callback function that handles PHP events.
224
231
  */
@@ -724,6 +731,10 @@ export declare const SupportedPHPVersionsList: string[];
724
731
  export type SupportedPHPVersion = (typeof SupportedPHPVersions)[number];
725
732
  export type SupportedPHPExtension = "iconv" | "mbstring" | "xml-bundle" | "gd";
726
733
  export type SupportedPHPExtensionBundle = "kitchen-sink";
734
+ export type RewriteRule = {
735
+ match: RegExp;
736
+ replacement: string;
737
+ };
727
738
  export interface PHPRequestHandlerConfiguration {
728
739
  /**
729
740
  * The directory in the PHP filesystem where the server will look
@@ -734,10 +745,15 @@ export interface PHPRequestHandlerConfiguration {
734
745
  * Request Handler URL. Used to populate $_SERVER details like HTTP_HOST.
735
746
  */
736
747
  absoluteUrl?: string;
748
+ /**
749
+ * Rewrite rules
750
+ */
751
+ rewriteRules?: RewriteRule[];
737
752
  }
738
753
  /** @inheritDoc */
739
754
  export declare class PHPRequestHandler implements RequestHandler {
740
755
  #private;
756
+ rewriteRules: RewriteRule[];
741
757
  /**
742
758
  * The PHP instance
743
759
  */
@@ -1721,8 +1737,7 @@ export declare const defineWpConfigConsts: StepHandler<DefineWpConfigConstsStep>
1721
1737
  * <code>
1722
1738
  * {
1723
1739
  * "step": "activateTheme",
1724
- * "pluginName": "Storefront",
1725
- * "pluginPath": "/wordpress/wp-content/themes/storefront"
1740
+ * "themeFolderName": "storefront"
1726
1741
  * }
1727
1742
  * </code>
1728
1743
  */
@@ -1960,8 +1975,31 @@ export interface Blueprint {
1960
1975
  * Optional description. It doesn't do anything but is exposed as
1961
1976
  * a courtesy to developers who may want to document which blueprint
1962
1977
  * file does what.
1978
+ *
1979
+ * @deprecated Use meta.description instead.
1963
1980
  */
1964
1981
  description?: string;
1982
+ /**
1983
+ * Optional metadata. Used by the Blueprints gallery at https://github.com/WordPress/blueprints
1984
+ */
1985
+ meta?: {
1986
+ /**
1987
+ * A clear and concise name for your Blueprint.
1988
+ */
1989
+ title: string;
1990
+ /**
1991
+ * A brief explanation of what your Blueprint offers.
1992
+ */
1993
+ description?: string;
1994
+ /**
1995
+ * A GitHub username of the author of this Blueprint.
1996
+ */
1997
+ author: string;
1998
+ /**
1999
+ * Relevant categories to help users find your Blueprint in the future Blueprints section on WordPress.org.
2000
+ */
2001
+ categories?: string[];
2002
+ };
1965
2003
  /**
1966
2004
  * The preferred PHP and WordPress versions to use.
1967
2005
  */