@wp-playground/client 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.
Files changed (4) hide show
  1. package/index.cjs +130 -45
  2. package/index.d.ts +52 -8
  3. package/index.js +1507 -1297
  4. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1614,7 +1614,8 @@ export declare const installPlugin: StepHandler<InstallPluginStep<File>>;
1614
1614
  * "slug": "pendant"
1615
1615
  * },
1616
1616
  * "options": {
1617
- * "activate": true
1617
+ * "activate": true,
1618
+ * "importStarterContent": true
1618
1619
  * }
1619
1620
  * }
1620
1621
  * </code>
@@ -1636,6 +1637,10 @@ export interface InstallThemeStep<ResourceType> extends Pick<InstallAssetOptions
1636
1637
  * Whether to activate the theme after installing it.
1637
1638
  */
1638
1639
  activate?: boolean;
1640
+ /**
1641
+ * Whether to import the theme's starter content after installing it.
1642
+ */
1643
+ importStarterContent?: boolean;
1639
1644
  };
1640
1645
  }
1641
1646
  export interface InstallThemeOptions {
@@ -2162,6 +2167,30 @@ export interface ImportWordPressFilesStep<ResourceType> {
2162
2167
  * @param wordPressFilesZip Zipped WordPress site.
2163
2168
  */
2164
2169
  export declare const importWordPressFiles: StepHandler<ImportWordPressFilesStep<File>>;
2170
+ /**
2171
+ * @inheritDoc importThemeStarterContent
2172
+ * @example
2173
+ *
2174
+ * <code>
2175
+ * {
2176
+ * "step": "importThemeStarterContent"
2177
+ * }
2178
+ * </code>
2179
+ */
2180
+ export interface ImportThemeStarterContentStep {
2181
+ /** The step identifier. */
2182
+ step: "importThemeStarterContent";
2183
+ /**
2184
+ * The name of the theme to import content from.
2185
+ */
2186
+ themeSlug?: string;
2187
+ }
2188
+ /**
2189
+ * Imports a theme Starter Content into WordPress.
2190
+ *
2191
+ * @param playground Playground client.
2192
+ */
2193
+ export declare const importThemeStarterContent: StepHandler<ImportThemeStarterContentStep>;
2165
2194
  /**
2166
2195
  * @inheritDoc importWxr
2167
2196
  * @example
@@ -2257,6 +2286,27 @@ export interface ResetDataStep {
2257
2286
  * @param playground Playground client.
2258
2287
  */
2259
2288
  export declare const resetData: StepHandler<ResetDataStep>;
2289
+ /**
2290
+ * @inheritDoc setSiteLanguage
2291
+ * @hasRunnableExample
2292
+ * @example
2293
+ *
2294
+ * <code>
2295
+ * {
2296
+ * "step": "setSiteLanguage",
2297
+ * "language": "en_US"
2298
+ * }
2299
+ * </code>
2300
+ */
2301
+ export interface SetSiteLanguageStep {
2302
+ step: "setSiteLanguage";
2303
+ /** The language to set, e.g. 'en_US' */
2304
+ language: string;
2305
+ }
2306
+ /**
2307
+ * Sets the site language and download translations.
2308
+ */
2309
+ export declare const setSiteLanguage: StepHandler<SetSiteLanguageStep>;
2260
2310
  /**
2261
2311
  * Used by the export step to exclude the Playground-specific files
2262
2312
  * from the zip file. Keep it in sync with the list of files created
@@ -2274,7 +2324,7 @@ export type StepDefinition = Step & {
2274
2324
  * If you add a step here, make sure to also
2275
2325
  * add it to the exports below.
2276
2326
  */
2277
- 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;
2327
+ 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;
2278
2328
  /**
2279
2329
  * Progress reporting details.
2280
2330
  */
@@ -2365,20 +2415,14 @@ export interface Blueprint {
2365
2415
  };
2366
2416
  /**
2367
2417
  * PHP Constants to define on every request
2368
- * @deprecated This experimental option will change without warning.
2369
- * Use `steps` instead.
2370
2418
  */
2371
2419
  constants?: Record<string, string>;
2372
2420
  /**
2373
2421
  * WordPress plugins to install and activate
2374
- * @deprecated This experimental option will change without warning.
2375
- * Use `steps` instead.
2376
2422
  */
2377
2423
  plugins?: Array<string | FileReference>;
2378
2424
  /**
2379
2425
  * WordPress site options to define
2380
- * @deprecated This experimental option will change without warning.
2381
- * Use `steps` instead.
2382
2426
  */
2383
2427
  siteOptions?: Record<string, string> & {
2384
2428
  /** The site title */