@wp-playground/blueprints 2.0.21 → 3.0.1
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-validator.js +2 -2
- package/blueprint-schema.json +2 -2
- package/index.cjs +75 -66
- package/index.cjs.map +1 -1
- package/index.d.ts +6 -5
- package/index.js +1234 -1219
- package/index.js.map +1 -1
- package/lib/resolve-remote-blueprint.d.ts +1 -1
- package/lib/steps/index.d.ts +1 -1
- package/lib/steps/install-plugin.d.ts +1 -1
- package/lib/steps/install-theme.d.ts +1 -1
- package/lib/steps/wp-cli.d.ts +1 -1
- package/lib/steps/write-files.d.ts +1 -1
- package/lib/types.d.ts +11 -0
- package/lib/{compile.d.ts → v1/compile.d.ts} +11 -8
- package/lib/{resources.d.ts → v1/resources.d.ts} +1 -1
- package/lib/{blueprint.d.ts → v1/types.d.ts} +4 -9
- package/lib/v2/blueprint-v2-declaration.d.ts +4 -4
- package/lib/v2/run-blueprint-v2.d.ts +2 -2
- package/lib/v2/wep-1-blueprint-v2-schema/appendix-A-blueprint-v2-schema.d.ts +1400 -0
- package/lib/v2/wep-1-blueprint-v2-schema/appendix-B-data-sources.d.ts +179 -0
- package/package.json +13 -13
|
@@ -0,0 +1,1400 @@
|
|
|
1
|
+
import type { DataSources } from './appendix-B-data-sources';
|
|
2
|
+
export declare namespace V2Schema {
|
|
3
|
+
export type BlueprintV2 = {
|
|
4
|
+
/**
|
|
5
|
+
* Not a generic 'number' type – this schema is specifically for
|
|
6
|
+
* Blueprints v2. Version 1 had no "version" field and versions 3, 4,
|
|
7
|
+
* 5, etc will be different from version 2.
|
|
8
|
+
*/
|
|
9
|
+
version: 2;
|
|
10
|
+
/**
|
|
11
|
+
* JSON Schema URL.
|
|
12
|
+
*/
|
|
13
|
+
$schema?: DataSources.URLReference | DataSources.ExecutionContextPath;
|
|
14
|
+
blueprintMeta?: {
|
|
15
|
+
name?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
moreInfo?: string;
|
|
18
|
+
version?: string;
|
|
19
|
+
authors?: string[];
|
|
20
|
+
homepage?: DataSources.URLReference;
|
|
21
|
+
donateLink?: DataSources.URLReference;
|
|
22
|
+
tags?: string[];
|
|
23
|
+
license?: LicenseKeyword | string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Divergence from Blueprints v1:
|
|
27
|
+
*
|
|
28
|
+
* There are no `landingPage` or `login` top-level properties.
|
|
29
|
+
* Instead, Blueprint v2 introduces a dedicated top-level `applicationOptions` property
|
|
30
|
+
* for declaring options or opinions for different application contexts.
|
|
31
|
+
*
|
|
32
|
+
* To keep Blueprints portable and focused on site creation, this specification
|
|
33
|
+
* only allows two Playground-specific options. Other environments cannot declare
|
|
34
|
+
* additional options. Future versions of this specification may allow additional
|
|
35
|
+
* options – they will be discussed on a case-by-case basis.
|
|
36
|
+
*/
|
|
37
|
+
applicationOptions?: {
|
|
38
|
+
/**
|
|
39
|
+
* Options for the WordPress Playground.
|
|
40
|
+
*/
|
|
41
|
+
'wordpress-playground': {
|
|
42
|
+
/**
|
|
43
|
+
* The first page the user is redirected to once the Playground is loaded and
|
|
44
|
+
* the Blueprint is executed.
|
|
45
|
+
*
|
|
46
|
+
* @default "/wp-admin"
|
|
47
|
+
*/
|
|
48
|
+
landingPage?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Whether to log the user in after the Blueprint is executed. If true,
|
|
51
|
+
* the user is logged in as "admin".
|
|
52
|
+
*
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
login?: boolean | {
|
|
56
|
+
username: string;
|
|
57
|
+
password: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Whether to allow the site to access the network.
|
|
61
|
+
*
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
networkAccess?: boolean;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* SITE OPTIONS {{{
|
|
69
|
+
*
|
|
70
|
+
* There are no "nice" top-level shortcuts such as `siteTitle` to implicitly set "popular"
|
|
71
|
+
* site options. All the options must be explicitly declared via the `siteOptions` property.
|
|
72
|
+
* Why? Two reasons:
|
|
73
|
+
*
|
|
74
|
+
* * No need to ask developers to learn a new set of identifiers.
|
|
75
|
+
* * It's unclear which site title should win if the Blueprint declares both
|
|
76
|
+
* `siteTitle` and `siteOptions.blogname`.
|
|
77
|
+
*
|
|
78
|
+
* The tao of Python says: Explicit is better than implicit. Let's stick with that.
|
|
79
|
+
*/
|
|
80
|
+
/**
|
|
81
|
+
* Sets the WPLANG constant and downloads any missing translations for WordPress
|
|
82
|
+
* core and all the installed plugins and themes. If you need a fine-grained
|
|
83
|
+
* control over the translations, use imperative steps in the `additionalStepsAfterExecution`
|
|
84
|
+
* array.
|
|
85
|
+
*
|
|
86
|
+
* @default "en_US"
|
|
87
|
+
*/
|
|
88
|
+
siteLanguage?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Site options. In WordPress, the values are PHP-serializable, but Blueprints are
|
|
91
|
+
* intentionally restricted to an even stricter subset of those, that are JSON-serializable.
|
|
92
|
+
* This is to prevent passing JavaScript Date objects and similar.
|
|
93
|
+
*
|
|
94
|
+
* The runner **MUST** use the WordPress `update_option` function to store the
|
|
95
|
+
* siteOptions values defined in this property as WordPress options. Lists and
|
|
96
|
+
* objects are passed to `update_option` as PHP arrays.
|
|
97
|
+
*
|
|
98
|
+
* Site options example:
|
|
99
|
+
*
|
|
100
|
+
* ```json
|
|
101
|
+
* {
|
|
102
|
+
* "blogname": "Adam's Movies",
|
|
103
|
+
* "timezone": "Poland/Warsaw",
|
|
104
|
+
* "gutenberg-experiments": {
|
|
105
|
+
* 'gutenberg-custom-dataviews': true,
|
|
106
|
+
* 'gutenberg-new-posts-dashboard': true,
|
|
107
|
+
* 'gutenberg-quick-edit-dataviews': true
|
|
108
|
+
* }
|
|
109
|
+
* }
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
siteOptions?: {
|
|
113
|
+
/**
|
|
114
|
+
* Site title.
|
|
115
|
+
*
|
|
116
|
+
* Example: "Adam's Movies"
|
|
117
|
+
* @default "My WordPress Site"
|
|
118
|
+
*/
|
|
119
|
+
blogname?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Example: "Poland/Warsaw"
|
|
122
|
+
* @default "UTC"
|
|
123
|
+
*/
|
|
124
|
+
timezone_string?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Site permalink structure. If present and different from the current permalink structure,
|
|
127
|
+
* the Blueprint runner will run `$wp_rewrite->flush_rules();`. If you only want to set this
|
|
128
|
+
* option without flushing the rules, use an explicit `additionalStepsAfterExecution` step.
|
|
129
|
+
*
|
|
130
|
+
* Example: "/%year%/%monthnum%/%postname%/" or false for no pretty permalinks.
|
|
131
|
+
* @default "/%postname%/"
|
|
132
|
+
*/
|
|
133
|
+
permalink_structure?: string | false;
|
|
134
|
+
} & Record<Exclude<string, 'siteUrl'>, JsonValue>;
|
|
135
|
+
/**
|
|
136
|
+
* }}}
|
|
137
|
+
*/
|
|
138
|
+
/**
|
|
139
|
+
* Constants to define in the wp-config.php file.
|
|
140
|
+
*
|
|
141
|
+
* The runner may overwrite the define() calls in the wp-config.php file
|
|
142
|
+
* on the target site. It assumes the wp-config.php file at the Blueprint
|
|
143
|
+
* Execution Target is writable.
|
|
144
|
+
*
|
|
145
|
+
* @see https://github.com/WordPress/blueprints-library/issues/118
|
|
146
|
+
*/
|
|
147
|
+
constants?: WordPressConstants;
|
|
148
|
+
/**
|
|
149
|
+
* WordPress version to install.
|
|
150
|
+
*
|
|
151
|
+
* When we're setting up the entire site, this will be used to resolve the
|
|
152
|
+
* installed WordPress version. The latest version matching the constraint
|
|
153
|
+
* will be chosen.
|
|
154
|
+
*
|
|
155
|
+
* When we're applying this Blueprint to an existing site, this will be used
|
|
156
|
+
* as an integrity check to verify that the currently installed version of
|
|
157
|
+
* WordPress installed on the target site matches the constraint.
|
|
158
|
+
*
|
|
159
|
+
* @default "latest".
|
|
160
|
+
*/
|
|
161
|
+
wordpressVersion?: DataSources.WordPressVersion | DataSources.DataReference | {
|
|
162
|
+
min: DataSources.WordPressVersion;
|
|
163
|
+
max?: DataSources.WordPressVersion;
|
|
164
|
+
/**
|
|
165
|
+
* @default "latest"
|
|
166
|
+
*/
|
|
167
|
+
preferred?: DataSources.WordPressVersion;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* The PHP version required for this Blueprint to work.
|
|
171
|
+
*
|
|
172
|
+
* In runtimes where we set up the runtime, such as Playground and wp-env, the
|
|
173
|
+
* runner will choose a version compatible with this constraint.
|
|
174
|
+
*
|
|
175
|
+
* In other environments, this is used for validation. The Blueprint engine will
|
|
176
|
+
* throw an error if the currently running PHP version doesn't match this constraint.
|
|
177
|
+
*
|
|
178
|
+
* @default "8.0". Changing the default value will bump the Blueprint version.
|
|
179
|
+
*
|
|
180
|
+
* @see https://github.com/WordPress/blueprints-library/issues/47
|
|
181
|
+
*/
|
|
182
|
+
phpVersion?: DataSources.PHPVersion | {
|
|
183
|
+
min?: DataSources.PHPVersion;
|
|
184
|
+
recommended?: DataSources.PHPVersion;
|
|
185
|
+
max?: DataSources.PHPVersion;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* The theme to install and also activate.
|
|
189
|
+
*
|
|
190
|
+
* > Why not support an `active` property in the `themes` array?
|
|
191
|
+
*
|
|
192
|
+
* Because an `"active"` property would have to default to `false` for themes while it
|
|
193
|
+
* defaults to `true` for plugins. That's error-prone and confusing.
|
|
194
|
+
*
|
|
195
|
+
* @example `"activeTheme": "stylish-press-theme"`
|
|
196
|
+
* @example `"activeTheme": "adventurer@4.6.0"`
|
|
197
|
+
* @example
|
|
198
|
+
* ```json
|
|
199
|
+
* "activeTheme": {
|
|
200
|
+
* "source": "https://github.com/richtabor/kanso/archive/refs/heads/main.zip",
|
|
201
|
+
* "id": "kanso"
|
|
202
|
+
* }
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
activeTheme?: ThemeDefinition;
|
|
206
|
+
/**
|
|
207
|
+
* Installed themes to install without activating them.
|
|
208
|
+
*
|
|
209
|
+
* Example:
|
|
210
|
+
*
|
|
211
|
+
* ```json
|
|
212
|
+
* themes: [
|
|
213
|
+
* "stylish-press-theme",
|
|
214
|
+
* "adventurer@4.6.0",
|
|
215
|
+
* {
|
|
216
|
+
* "source": "https://github.com/richtabor/kanso/archive/refs/heads/main.zip",
|
|
217
|
+
* "id": "kanso"
|
|
218
|
+
* }
|
|
219
|
+
* ]
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
themes?: ThemeDefinition[];
|
|
223
|
+
/**
|
|
224
|
+
* A list of plugins to install and activate.
|
|
225
|
+
*
|
|
226
|
+
* Example:
|
|
227
|
+
*
|
|
228
|
+
* ```json
|
|
229
|
+
* plugins: [
|
|
230
|
+
* "jetpack",
|
|
231
|
+
* "akismet@6.4.3",
|
|
232
|
+
* "./query-monitor.php",
|
|
233
|
+
* "./code-block.zip",
|
|
234
|
+
* {
|
|
235
|
+
* "source": "https://github.com/woocommerce/woocommerce/archive/refs/heads/6.4.3.zip",
|
|
236
|
+
* "active": false
|
|
237
|
+
* }
|
|
238
|
+
* ]
|
|
239
|
+
*/
|
|
240
|
+
plugins?: PluginDefinition[];
|
|
241
|
+
/**
|
|
242
|
+
* A list of mu-plugins to install.
|
|
243
|
+
*
|
|
244
|
+
* Example:
|
|
245
|
+
*
|
|
246
|
+
* ```json
|
|
247
|
+
* muPlugins: [
|
|
248
|
+
* {
|
|
249
|
+
* "file": {
|
|
250
|
+
* "filename": "addFilter-0.php",
|
|
251
|
+
* "content": "<?php add_action( 'requests-requests.before_request', function( &$url ) {\n$url = 'https://playground.wordpress.net/cors-proxy.php?' . $url;\n} );"
|
|
252
|
+
* }
|
|
253
|
+
* }
|
|
254
|
+
* ]
|
|
255
|
+
* ```
|
|
256
|
+
*/
|
|
257
|
+
muPlugins?: Array<DataSources.DataReference>;
|
|
258
|
+
/**
|
|
259
|
+
* Very basic schema for defining custom post types.
|
|
260
|
+
*
|
|
261
|
+
* IMPORTANT: Using this property requires an explicit inclusion of the
|
|
262
|
+
* `secure-custom-fields` plugin. If it's missing, the Blueprint runner will
|
|
263
|
+
* throw an error.
|
|
264
|
+
*
|
|
265
|
+
* See https://github.com/WordPress/blueprints-library/issues/32 for more context.
|
|
266
|
+
*/
|
|
267
|
+
postTypes?: Record<PostTypeKey, PostType | DataSources.ExecutionContextPath>;
|
|
268
|
+
/**
|
|
269
|
+
* A list of fonts to register in the site's Font Library.
|
|
270
|
+
*
|
|
271
|
+
* Example:
|
|
272
|
+
*
|
|
273
|
+
* ```json
|
|
274
|
+
* fonts: {
|
|
275
|
+
* "open-sans": "https://example.com/fonts/open-sans.woff2",
|
|
276
|
+
* "roboto": "./wp-content/fonts/roboto.woff2"
|
|
277
|
+
* }
|
|
278
|
+
* ```
|
|
279
|
+
*
|
|
280
|
+
* Or using the full font collection schema:
|
|
281
|
+
*
|
|
282
|
+
* ```json
|
|
283
|
+
* fonts: {
|
|
284
|
+
* "my-collection": {
|
|
285
|
+
* "font_families": [
|
|
286
|
+
* {
|
|
287
|
+
* "font_family_settings": {
|
|
288
|
+
* "name": "Open Sans",
|
|
289
|
+
* "slug": "open-sans",
|
|
290
|
+
* "fontFamily": "Open Sans",
|
|
291
|
+
* "preview": "https://example.com/previews/open-sans.png",
|
|
292
|
+
* "fontFace": [
|
|
293
|
+
* {
|
|
294
|
+
* "fontFamily": "Open Sans",
|
|
295
|
+
* "fontWeight": "400",
|
|
296
|
+
* "fontStyle": "normal",
|
|
297
|
+
* "src": "./wp-content/fonts/open-sans-regular.woff2"
|
|
298
|
+
* }
|
|
299
|
+
* ]
|
|
300
|
+
* },
|
|
301
|
+
* "categories": ["sans-serif"]
|
|
302
|
+
* }
|
|
303
|
+
* ]
|
|
304
|
+
* }
|
|
305
|
+
* }
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
fonts?: Record<string, DataSources.DataReference | FontCollection>;
|
|
309
|
+
/**
|
|
310
|
+
* A list of media files to upload to the WordPress Media Library – in formats
|
|
311
|
+
* supported by the WordPress Media Library.
|
|
312
|
+
*
|
|
313
|
+
* Example:
|
|
314
|
+
*
|
|
315
|
+
* ```json
|
|
316
|
+
* media: [
|
|
317
|
+
* "https://example.com/images/hero.jpg",
|
|
318
|
+
* "./wp-content/uploads/2024/01/logo.png",
|
|
319
|
+
* {
|
|
320
|
+
* "source": "https://example.com/videos/intro.mp4",
|
|
321
|
+
* "title": "Introduction Video",
|
|
322
|
+
* "description": "A brief introduction to our company",
|
|
323
|
+
* "alt": "Company introduction video"
|
|
324
|
+
* },
|
|
325
|
+
* {
|
|
326
|
+
* "source": "./wp-content/uploads/2024/01/brochure.pdf",
|
|
327
|
+
* "title": "Product Brochure",
|
|
328
|
+
* "description": "Detailed information about our products"
|
|
329
|
+
* }
|
|
330
|
+
* ]
|
|
331
|
+
* ```
|
|
332
|
+
*
|
|
333
|
+
*/
|
|
334
|
+
media?: Array<MediaDefinition>;
|
|
335
|
+
content?: Array<ContentDefinition>;
|
|
336
|
+
users?: Array<{
|
|
337
|
+
username: string;
|
|
338
|
+
email: string;
|
|
339
|
+
role: string;
|
|
340
|
+
meta: Record<string, string>;
|
|
341
|
+
}>;
|
|
342
|
+
roles?: Array<{
|
|
343
|
+
name: string;
|
|
344
|
+
capabilities: Record<string, string>;
|
|
345
|
+
}>;
|
|
346
|
+
additionalStepsAfterExecution?: Array<Step>;
|
|
347
|
+
};
|
|
348
|
+
type LicenseKeyword = 'AFL-3.0' | 'Apache-2.0' | 'Artistic-2.0' | 'BSL-1.0' | 'BSD-2-Clause' | 'BSD-3-Clause' | 'BSD-3-Clause-Clear' | 'BSD-4-Clause' | '0BSD' | 'CC' | 'CC0-1.0' | 'CC-BY-4.0' | 'CC-BY-SA-4.0' | 'WTFPL' | 'ECL-2.0' | 'EPL-1.0' | 'EPL-2.0' | 'EUPL-1.1' | 'AGPL-3.0' | 'GPL' | 'GPL-2.0' | 'GPL-3.0' | 'LGPL' | 'LGPL-2.1' | 'LGPL-3.0' | 'ISC' | 'LPPL-1.3c' | 'MS-PL' | 'MIT' | 'MPL-2.0' | 'OSL-3.0' | 'PostgreSQL' | 'OFL-1.1' | 'NCSA' | 'Unlicense' | 'Zlib';
|
|
349
|
+
type URLMappingConfig = {
|
|
350
|
+
/**
|
|
351
|
+
* Whether to rewrite the hrefs in the remote site's content URLs in the WXR file
|
|
352
|
+
* from the remote site domain to the current site domain's (and path etc).
|
|
353
|
+
*
|
|
354
|
+
* Possible values:
|
|
355
|
+
*
|
|
356
|
+
* * "rewrite" – Rewrite the hrefs to the current site domain's (and path etc).
|
|
357
|
+
* * "preserve" – Preserve the hrefs as they are.
|
|
358
|
+
*
|
|
359
|
+
* @default "rewrite".
|
|
360
|
+
*/
|
|
361
|
+
urlsMode?: 'rewrite' | 'preserve';
|
|
362
|
+
/**
|
|
363
|
+
* A mapping of base URLs to rewrite.
|
|
364
|
+
*/
|
|
365
|
+
urlsMap?: Record<DataSources.URLReference, DataSources.URLReference>;
|
|
366
|
+
};
|
|
367
|
+
type ContentDefinition = ({
|
|
368
|
+
type: 'mysql-dump';
|
|
369
|
+
source: DataSources.DataReference | DataSources.DataReference[];
|
|
370
|
+
} & URLMappingConfig) | ({
|
|
371
|
+
type: 'posts';
|
|
372
|
+
source: DataSources.DataReference | DataSources.DataReference[] | WordPressPost | WordPressPost[];
|
|
373
|
+
} & URLMappingConfig)
|
|
374
|
+
/**
|
|
375
|
+
* WXR files to import.
|
|
376
|
+
*
|
|
377
|
+
* Example:
|
|
378
|
+
*
|
|
379
|
+
* ```json
|
|
380
|
+
* content: [
|
|
381
|
+
* {
|
|
382
|
+
* "type": "wxr",
|
|
383
|
+
* "https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/stylish-press/woo-products.wxr"
|
|
384
|
+
* },
|
|
385
|
+
* {
|
|
386
|
+
* "type": "wxr",
|
|
387
|
+
* "url": "https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/stylish-press/site-content.wxr",
|
|
388
|
+
* "rewriteUrls": true,
|
|
389
|
+
* "fetchStaticAssets": false,
|
|
390
|
+
* "users": false,
|
|
391
|
+
* "comments": false,
|
|
392
|
+
* }
|
|
393
|
+
* ]
|
|
394
|
+
* ```
|
|
395
|
+
*/
|
|
396
|
+
| ({
|
|
397
|
+
type: 'wxr';
|
|
398
|
+
source: DataSources.DataReference;
|
|
399
|
+
/**
|
|
400
|
+
* Static assets handling.
|
|
401
|
+
*
|
|
402
|
+
* Possible values:
|
|
403
|
+
*
|
|
404
|
+
* * "fetch" – Fetch the static assets and save them to the local filesystem.
|
|
405
|
+
* * "hotlink" – Hotlink the static assets from the remote site.
|
|
406
|
+
*
|
|
407
|
+
* @default "fetch".
|
|
408
|
+
*/
|
|
409
|
+
staticAssets?: 'fetch' | 'hotlink';
|
|
410
|
+
/**
|
|
411
|
+
* How to handle authors that don't exist on the current site.
|
|
412
|
+
*
|
|
413
|
+
* Possible values:
|
|
414
|
+
*
|
|
415
|
+
* * "create" – Create a new author.
|
|
416
|
+
* * "default-author" – Use the default author.
|
|
417
|
+
* * "map" – Map the author to an existing author on the current site.
|
|
418
|
+
*
|
|
419
|
+
* @default "create".
|
|
420
|
+
*/
|
|
421
|
+
authorsMode?: 'create' | 'default-author' | 'map';
|
|
422
|
+
/**
|
|
423
|
+
* The default author to use when `mode` is "default-author".
|
|
424
|
+
*
|
|
425
|
+
* @default "admin".
|
|
426
|
+
*/
|
|
427
|
+
defaultAuthorUsername?: string;
|
|
428
|
+
/**
|
|
429
|
+
* Map post authors from the remote site to the current site.
|
|
430
|
+
*
|
|
431
|
+
* When not provided, the importer will attempt to match the authors by
|
|
432
|
+
* username, email, or name.
|
|
433
|
+
*
|
|
434
|
+
* Required when `authorsMode` is "map".
|
|
435
|
+
*
|
|
436
|
+
* @default undefined.
|
|
437
|
+
*/
|
|
438
|
+
authorsMap?: Record<RemoteUsername, LocalUsername>;
|
|
439
|
+
/**
|
|
440
|
+
* Whether to import users from the remote site.
|
|
441
|
+
*
|
|
442
|
+
* @default false.
|
|
443
|
+
*/
|
|
444
|
+
importUsers?: boolean;
|
|
445
|
+
/**
|
|
446
|
+
* Whether to import comments from the remote site.
|
|
447
|
+
*
|
|
448
|
+
* @default false.
|
|
449
|
+
*/
|
|
450
|
+
importComments?: boolean;
|
|
451
|
+
/**
|
|
452
|
+
* Whether to import site settings from the remote site.
|
|
453
|
+
*
|
|
454
|
+
* @default false.
|
|
455
|
+
*/
|
|
456
|
+
importSiteOptions?: boolean;
|
|
457
|
+
} & URLMappingConfig);
|
|
458
|
+
type MediaDefinition = DataSources.DataReference | {
|
|
459
|
+
source: DataSources.DataReference;
|
|
460
|
+
title?: string;
|
|
461
|
+
description?: string;
|
|
462
|
+
alt?: string;
|
|
463
|
+
caption?: string;
|
|
464
|
+
};
|
|
465
|
+
type PluginDefinition = DataSources.DataReference | DataSources.PluginDirectoryReference | PluginObjectDefinition;
|
|
466
|
+
type PluginObjectDefinition = {
|
|
467
|
+
source: DataSources.DataReference | DataSources.PluginDirectoryReference;
|
|
468
|
+
/**
|
|
469
|
+
* Whether to activate the plugin.
|
|
470
|
+
*
|
|
471
|
+
* @default true.
|
|
472
|
+
*/
|
|
473
|
+
active?: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* Parameters to pass to the plugin during activation.
|
|
476
|
+
*
|
|
477
|
+
* These options are stored in a site option that the plugin can access
|
|
478
|
+
* during its activation hook. The option name is:
|
|
479
|
+
*
|
|
480
|
+
* ```php
|
|
481
|
+
* 'blueprint_activation_' . plugin_basename( __FILE__ )
|
|
482
|
+
* ```
|
|
483
|
+
*
|
|
484
|
+
* This ensures uniqueness even when multiple versions of the same plugin exist.
|
|
485
|
+
* This is similar to how the `register_activation_hook` function requires the
|
|
486
|
+
* plugin file path as its first argument.
|
|
487
|
+
*
|
|
488
|
+
* The Blueprint runner will remove the option after activating the plugin.
|
|
489
|
+
*
|
|
490
|
+
* Example:
|
|
491
|
+
*
|
|
492
|
+
* In the Blueprint:
|
|
493
|
+
* ```json
|
|
494
|
+
* {
|
|
495
|
+
* "source": "woocommerce",
|
|
496
|
+
* "activationOptions": {
|
|
497
|
+
* "storeCity": "Wrocław",
|
|
498
|
+
* "storeCountry": "Poland",
|
|
499
|
+
* "storePostalCode": "53-607"
|
|
500
|
+
* }
|
|
501
|
+
* }
|
|
502
|
+
* ```
|
|
503
|
+
*
|
|
504
|
+
* In the plugin's activation hook:
|
|
505
|
+
*
|
|
506
|
+
* ```php
|
|
507
|
+
* register_activation_hook( __FILE__, function( $network_wide ) {
|
|
508
|
+
* // Get the activation options from the transient
|
|
509
|
+
* $option_name = 'blueprint_activation_' . plugin_basename( __FILE__ );
|
|
510
|
+
* $blueprint_activation_options = get_option( $option_name ) ?? [];
|
|
511
|
+
*
|
|
512
|
+
* if ( $blueprint_activation_options ) {
|
|
513
|
+
* $store_city = $blueprint_activation_options['storeCity'] ?? '';
|
|
514
|
+
* $store_country = $blueprint_activation_options['storeCountry'] ?? '';
|
|
515
|
+
* $store_postal_code = $blueprint_activation_options['storePostalCode'] ?? '';
|
|
516
|
+
*
|
|
517
|
+
* // ...do something with the options...
|
|
518
|
+
* }
|
|
519
|
+
*
|
|
520
|
+
* // Continue with normal activation...
|
|
521
|
+
* } );
|
|
522
|
+
* ```
|
|
523
|
+
*/
|
|
524
|
+
activationOptions?: Record<string, JsonValue>;
|
|
525
|
+
/**
|
|
526
|
+
* An explicit directory name within wp-content/plugins to install the plugin at.
|
|
527
|
+
* If not provided, it will be inferred from the plugin source.
|
|
528
|
+
*/
|
|
529
|
+
targetDirectoryName?: string;
|
|
530
|
+
/**
|
|
531
|
+
* Sometimes it's fine when a plugin fails to install.
|
|
532
|
+
*
|
|
533
|
+
* Use-case:
|
|
534
|
+
* Compatibility testing. A Blueprint may install WordPress nightly with
|
|
535
|
+
* a number of plugins to test. Some of those plugins may not yet be compatible
|
|
536
|
+
* with the latest version of WordPress. This is something to take not of,
|
|
537
|
+
* but not a strong reason to fail the entire Blueprint installation.
|
|
538
|
+
*
|
|
539
|
+
* @see https://github.com/WordPress/wordpress-playground/issues/600
|
|
540
|
+
* @default "throw"
|
|
541
|
+
*/
|
|
542
|
+
onError?: 'skip-plugin' | 'throw';
|
|
543
|
+
/**
|
|
544
|
+
* Human-readable name of the plugin for the progress bar.
|
|
545
|
+
*
|
|
546
|
+
* For example, with the following Blueprint:
|
|
547
|
+
*
|
|
548
|
+
* ```json
|
|
549
|
+
* {
|
|
550
|
+
* "plugins": [
|
|
551
|
+
* {
|
|
552
|
+
* "source": "https://github.com/Automattic/jetpack/archive/refs/heads/beta.zip",
|
|
553
|
+
* "humanReadableName": "Jetpack Beta"
|
|
554
|
+
* }
|
|
555
|
+
* ]
|
|
556
|
+
* }
|
|
557
|
+
* ```
|
|
558
|
+
*
|
|
559
|
+
* The progress bar will show "Installing Jetpack Beta plugin" instead of
|
|
560
|
+
* "Installing https://github.com/Automattic/jetpack/archive/refs/heads/beta.zip".
|
|
561
|
+
*/
|
|
562
|
+
humanReadableName?: string;
|
|
563
|
+
};
|
|
564
|
+
type ThemeDefinition = DataSources.ThemeDirectoryReference | DataSources.DataReference | ThemeObjectDefinition;
|
|
565
|
+
type ThemeObjectDefinition = {
|
|
566
|
+
source: DataSources.ThemeDirectoryReference | DataSources.DataReference;
|
|
567
|
+
/**
|
|
568
|
+
* Whether to import the theme's starter content after installing it.
|
|
569
|
+
*/
|
|
570
|
+
importStarterContent?: boolean;
|
|
571
|
+
/**
|
|
572
|
+
* An explicit directory name within wp-content/themes to install the theme at.
|
|
573
|
+
* If not provided, it will be inferred from the theme source.
|
|
574
|
+
*/
|
|
575
|
+
targetDirectoryName?: string;
|
|
576
|
+
/**
|
|
577
|
+
* Human-readable name of the theme for the progress bar.
|
|
578
|
+
*
|
|
579
|
+
* For example, with the following Blueprint:
|
|
580
|
+
*
|
|
581
|
+
* ```json
|
|
582
|
+
* {
|
|
583
|
+
* "themes": [
|
|
584
|
+
* {
|
|
585
|
+
* "source": "https://github.com/Automattic/adventurer/archive/refs/heads/beta.zip",
|
|
586
|
+
* "humanReadableName": "Adventurer"
|
|
587
|
+
* }
|
|
588
|
+
* ]
|
|
589
|
+
* }
|
|
590
|
+
* ```
|
|
591
|
+
*
|
|
592
|
+
* The progress bar will show "Installing Adventurer theme" instead of
|
|
593
|
+
* "Installing https://github.com/Automattic/adventurer/archive/refs/heads/beta.zip".
|
|
594
|
+
*/
|
|
595
|
+
humanReadableName?: string;
|
|
596
|
+
};
|
|
597
|
+
type RemoteUsername = 'string';
|
|
598
|
+
type LocalUsername = 'string';
|
|
599
|
+
/**
|
|
600
|
+
* WordPress register_post_type() arguments representation. {{{
|
|
601
|
+
*
|
|
602
|
+
* The inline docstrings are copied from the WordPress code reference.
|
|
603
|
+
*
|
|
604
|
+
* @see https://developer.wordpress.org/reference/functions/register_post_type/
|
|
605
|
+
*/
|
|
606
|
+
/**
|
|
607
|
+
* Post type key. Must not exceed 20 characters and may only
|
|
608
|
+
* contain lowercase alphanumeric characters, dashes, and underscores.
|
|
609
|
+
*/
|
|
610
|
+
type PostTypeKey = string;
|
|
611
|
+
type Block = [string, Record<string, JsonValue>];
|
|
612
|
+
type PostType = {
|
|
613
|
+
/**
|
|
614
|
+
* Name of the post type shown in the menu. Usually plural.
|
|
615
|
+
* Default is value of $labels['name'].
|
|
616
|
+
*/
|
|
617
|
+
label?: string;
|
|
618
|
+
/**
|
|
619
|
+
* An array of labels for this post type.
|
|
620
|
+
* If not set, post labels are inherited for non-hierarchical types
|
|
621
|
+
* and page labels for hierarchical ones
|
|
622
|
+
*
|
|
623
|
+
* The labels documented for WordPress 6.8 are listed below,
|
|
624
|
+
* and this type also supports an arbitrary set of labels to
|
|
625
|
+
* support future WordPress releases.
|
|
626
|
+
*
|
|
627
|
+
* @see https://developer.wordpress.org/reference/functions/get_post_type_labels/
|
|
628
|
+
*/
|
|
629
|
+
labels?: {
|
|
630
|
+
/**
|
|
631
|
+
* General name for the post type, usually plural.
|
|
632
|
+
* Default is 'Posts' / 'Pages'.
|
|
633
|
+
*/
|
|
634
|
+
name?: string;
|
|
635
|
+
/**
|
|
636
|
+
* Name for one object of this post type.
|
|
637
|
+
* Default is 'Post' / 'Page'.
|
|
638
|
+
*/
|
|
639
|
+
singular_name?: string;
|
|
640
|
+
/**
|
|
641
|
+
* Label for adding a new item.
|
|
642
|
+
* Default is 'Add New' / 'Add New'.
|
|
643
|
+
*/
|
|
644
|
+
add_new?: string;
|
|
645
|
+
/**
|
|
646
|
+
* Label for adding a new singular item.
|
|
647
|
+
* Default is 'Add New Post' / 'Add New Page'.
|
|
648
|
+
*/
|
|
649
|
+
add_new_item?: string;
|
|
650
|
+
/**
|
|
651
|
+
* Label for editing a singular item.
|
|
652
|
+
* Default is 'Edit Post' / 'Edit Page'.
|
|
653
|
+
*/
|
|
654
|
+
edit_item?: string;
|
|
655
|
+
/**
|
|
656
|
+
* Label for the new item page title.
|
|
657
|
+
* Default is 'New Post' / 'New Page'.
|
|
658
|
+
*/
|
|
659
|
+
new_item?: string;
|
|
660
|
+
/**
|
|
661
|
+
* Label for viewing a singular item.
|
|
662
|
+
* Default is 'View Post' / 'View Page'.
|
|
663
|
+
*/
|
|
664
|
+
view_item?: string;
|
|
665
|
+
/**
|
|
666
|
+
* Label for viewing post type archives.
|
|
667
|
+
* Default is 'View Posts' / 'View Pages'.
|
|
668
|
+
*/
|
|
669
|
+
view_items?: string;
|
|
670
|
+
/**
|
|
671
|
+
* Label for searching plural items.
|
|
672
|
+
* Default is 'Search Posts' / 'Search Pages'.
|
|
673
|
+
*/
|
|
674
|
+
search_items?: string;
|
|
675
|
+
/**
|
|
676
|
+
* Label used when no items are found.
|
|
677
|
+
* Default is 'No posts found' / 'No pages found'.
|
|
678
|
+
*/
|
|
679
|
+
not_found?: string;
|
|
680
|
+
/**
|
|
681
|
+
* Label used when no items are in the Trash.
|
|
682
|
+
* Default is 'No posts found in Trash' / 'No pages found in Trash'.
|
|
683
|
+
*/
|
|
684
|
+
not_found_in_trash?: string;
|
|
685
|
+
/**
|
|
686
|
+
* Label used to prefix parents of hierarchical items.
|
|
687
|
+
* Default is 'Parent Page:'.
|
|
688
|
+
*/
|
|
689
|
+
parent_item_colon?: string;
|
|
690
|
+
/**
|
|
691
|
+
* Label to signify all items in a submenu link.
|
|
692
|
+
* Default is 'All Posts' / 'All Pages'.
|
|
693
|
+
*/
|
|
694
|
+
all_items?: string;
|
|
695
|
+
/**
|
|
696
|
+
* Label for archives in nav menus.
|
|
697
|
+
* Default is 'Post Archives' / 'Page Archives'.
|
|
698
|
+
*/
|
|
699
|
+
archives?: string;
|
|
700
|
+
/**
|
|
701
|
+
* Label for the attributes meta box.
|
|
702
|
+
* Default is 'Post Attributes' / 'Page Attributes'.
|
|
703
|
+
*/
|
|
704
|
+
attributes?: string;
|
|
705
|
+
/**
|
|
706
|
+
* Label for the media frame button.
|
|
707
|
+
* Default is 'Insert into post' / 'Insert into page'.
|
|
708
|
+
*/
|
|
709
|
+
insert_into_item?: string;
|
|
710
|
+
/**
|
|
711
|
+
* Label for the media frame filter.
|
|
712
|
+
* Default is 'Uploaded to this post' / 'Uploaded to this page'.
|
|
713
|
+
*/
|
|
714
|
+
uploaded_to_this_item?: string;
|
|
715
|
+
/**
|
|
716
|
+
* Label for the featured image meta box title.
|
|
717
|
+
* Default is 'Featured image'.
|
|
718
|
+
*/
|
|
719
|
+
featured_image?: string;
|
|
720
|
+
/**
|
|
721
|
+
* Label for setting the featured image.
|
|
722
|
+
* Default is 'Set featured image'.
|
|
723
|
+
*/
|
|
724
|
+
set_featured_image?: string;
|
|
725
|
+
/**
|
|
726
|
+
* Label for removing the featured image.
|
|
727
|
+
* Default is 'Remove featured image'.
|
|
728
|
+
*/
|
|
729
|
+
remove_featured_image?: string;
|
|
730
|
+
/**
|
|
731
|
+
* Label in the media frame for using a featured image.
|
|
732
|
+
* Default is 'Use as featured image'.
|
|
733
|
+
*/
|
|
734
|
+
use_featured_image?: string;
|
|
735
|
+
/**
|
|
736
|
+
* Label for the menu name.
|
|
737
|
+
* Default is the same as name.
|
|
738
|
+
*/
|
|
739
|
+
menu_name?: string;
|
|
740
|
+
/**
|
|
741
|
+
* Label for the table views hidden heading.
|
|
742
|
+
* Default is 'Filter posts list' / 'Filter pages list'.
|
|
743
|
+
*/
|
|
744
|
+
filter_items_list?: string;
|
|
745
|
+
/**
|
|
746
|
+
* Label for the date filter in list tables.
|
|
747
|
+
* Default is 'Filter by date'.
|
|
748
|
+
*/
|
|
749
|
+
filter_by_date?: string;
|
|
750
|
+
/**
|
|
751
|
+
* Label for the table pagination hidden heading.
|
|
752
|
+
* Default is 'Posts list navigation' / 'Pages list navigation'.
|
|
753
|
+
*/
|
|
754
|
+
items_list_navigation?: string;
|
|
755
|
+
/**
|
|
756
|
+
* Label for the table hidden heading.
|
|
757
|
+
* Default is 'Posts list' / 'Pages list'.
|
|
758
|
+
*/
|
|
759
|
+
items_list?: string;
|
|
760
|
+
/**
|
|
761
|
+
* Label used when an item is published.
|
|
762
|
+
* Default is 'Post published.' / 'Page published.'
|
|
763
|
+
*/
|
|
764
|
+
item_published?: string;
|
|
765
|
+
/**
|
|
766
|
+
* Label used when an item is published with private visibility.
|
|
767
|
+
* Default is 'Post published privately.' / 'Page published privately.'
|
|
768
|
+
*/
|
|
769
|
+
item_published_privately?: string;
|
|
770
|
+
/**
|
|
771
|
+
* Label used when an item is switched to a draft.
|
|
772
|
+
* Default is 'Post reverted to draft.' / 'Page reverted to draft.'
|
|
773
|
+
*/
|
|
774
|
+
item_reverted_to_draft?: string;
|
|
775
|
+
/**
|
|
776
|
+
* Label used when an item is moved to Trash.
|
|
777
|
+
* Default is 'Post trashed.' / 'Page trashed.'
|
|
778
|
+
*/
|
|
779
|
+
item_trashed?: string;
|
|
780
|
+
/**
|
|
781
|
+
* Label used when an item is scheduled for publishing.
|
|
782
|
+
* Default is 'Post scheduled.' / 'Page scheduled.'
|
|
783
|
+
*/
|
|
784
|
+
item_scheduled?: string;
|
|
785
|
+
/**
|
|
786
|
+
* Label used when an item is updated.
|
|
787
|
+
* Default is 'Post updated.' / 'Page updated.'
|
|
788
|
+
*/
|
|
789
|
+
item_updated?: string;
|
|
790
|
+
/**
|
|
791
|
+
* Title for a navigation link block variation.
|
|
792
|
+
* Default is 'Post Link' / 'Page Link'.
|
|
793
|
+
*/
|
|
794
|
+
item_link?: string;
|
|
795
|
+
/**
|
|
796
|
+
* Description for a navigation link block variation.
|
|
797
|
+
* Default is 'A link to a post.' / 'A link to a page.'
|
|
798
|
+
*/
|
|
799
|
+
item_link_description?: string;
|
|
800
|
+
} & Record<string, string>;
|
|
801
|
+
/**
|
|
802
|
+
* A short descriptive summary of what the post type is.
|
|
803
|
+
*/
|
|
804
|
+
description?: string;
|
|
805
|
+
/**
|
|
806
|
+
* Whether a post type is intended for use publicly either via the admin interface or by front-end users.
|
|
807
|
+
* While the default settings of $exclude_from_search, $publicly_queryable, $show_ui, and $show_in_nav_menus
|
|
808
|
+
* are inherited from $public, each does not rely on this relationship and controls a very specific intention.
|
|
809
|
+
* Default false.
|
|
810
|
+
*/
|
|
811
|
+
public?: boolean;
|
|
812
|
+
/**
|
|
813
|
+
* Whether the post type is hierarchical (e.g. page).
|
|
814
|
+
* Default false.
|
|
815
|
+
*/
|
|
816
|
+
hierarchical?: boolean;
|
|
817
|
+
/**
|
|
818
|
+
* Whether to exclude posts with this post type from front end search results.
|
|
819
|
+
* Default is the opposite value of $public.
|
|
820
|
+
*/
|
|
821
|
+
exclude_from_search?: boolean;
|
|
822
|
+
/**
|
|
823
|
+
* Whether queries can be performed on the front end for the post type as part of parse_request().
|
|
824
|
+
* Endpoints would include:
|
|
825
|
+
* * ?post_type={post_type_key}
|
|
826
|
+
* * ?{post_type_key}={single_post_slug}
|
|
827
|
+
* * ?{post_type_query_var}={single_post_slug}
|
|
828
|
+
* If not set, the default is inherited from $public.
|
|
829
|
+
*/
|
|
830
|
+
publicly_queryable?: boolean;
|
|
831
|
+
/**
|
|
832
|
+
* Whether to generate and allow a UI for managing this post type in the admin.
|
|
833
|
+
* Default is value of $public.
|
|
834
|
+
*/
|
|
835
|
+
show_ui?: boolean;
|
|
836
|
+
/**
|
|
837
|
+
* Where to show the post type in the admin menu. To work, $show_ui must be true.
|
|
838
|
+
* If true, the post type is shown in its own top level menu.
|
|
839
|
+
* If false, no menu is shown.
|
|
840
|
+
* If a string of an existing top level menu ('tools.php' or 'edit.php?post_type=page', for example),
|
|
841
|
+
* the post type will be placed as a sub-menu of that.
|
|
842
|
+
* Default is value of $show_ui.
|
|
843
|
+
*/
|
|
844
|
+
show_in_menu?: boolean | string;
|
|
845
|
+
/**
|
|
846
|
+
* Makes this post type available via the admin bar.
|
|
847
|
+
* Default is value of $show_in_menu.
|
|
848
|
+
*/
|
|
849
|
+
show_in_admin_bar?: boolean;
|
|
850
|
+
/**
|
|
851
|
+
* Makes this post type available for selection in navigation menus.
|
|
852
|
+
* Default is value of $public.
|
|
853
|
+
*/
|
|
854
|
+
show_in_nav_menus?: boolean;
|
|
855
|
+
/**
|
|
856
|
+
* Whether to include the post type in the REST API.
|
|
857
|
+
* Set this to true for the post type to be available in the block editor.
|
|
858
|
+
*/
|
|
859
|
+
show_in_rest?: boolean;
|
|
860
|
+
/**
|
|
861
|
+
* To change the base URL of REST API route.
|
|
862
|
+
* Default is $post_type.
|
|
863
|
+
*/
|
|
864
|
+
rest_base?: string;
|
|
865
|
+
/**
|
|
866
|
+
* To change the namespace URL of REST API route.
|
|
867
|
+
* Default is wp/v2.
|
|
868
|
+
*/
|
|
869
|
+
rest_namespace?: string;
|
|
870
|
+
/**
|
|
871
|
+
* REST API controller class name.
|
|
872
|
+
* Default is 'WP_REST_Posts_Controller'.
|
|
873
|
+
*/
|
|
874
|
+
rest_controller_class?: string;
|
|
875
|
+
/**
|
|
876
|
+
* The URL to the icon to be used for this menu.
|
|
877
|
+
* Pass a base64-encoded SVG using a data URI, which will be colored to match the color scheme —
|
|
878
|
+
* this should begin with 'data:image/svg+xml;base64,'.
|
|
879
|
+
* Pass the name of a Dashicons helper class to use a font icon, e.g. 'dashicons-chart-pie'.
|
|
880
|
+
* Pass 'none' to leave div.wp-menu-image empty so an icon can be added via CSS.
|
|
881
|
+
* Defaults to use the posts icon.
|
|
882
|
+
*/
|
|
883
|
+
menu_icon?: string;
|
|
884
|
+
/**
|
|
885
|
+
* The position in the menu order the post type should appear.
|
|
886
|
+
* To work, $show_in_menu must be true.
|
|
887
|
+
* Default null (at the bottom).
|
|
888
|
+
*/
|
|
889
|
+
menu_position?: string | number;
|
|
890
|
+
/**
|
|
891
|
+
* Whether to rename the capabilities for this post type.
|
|
892
|
+
*/
|
|
893
|
+
rename_capabilities?: boolean;
|
|
894
|
+
/**
|
|
895
|
+
* The singular capability name for this post type.
|
|
896
|
+
*/
|
|
897
|
+
singular_capability_name?: string;
|
|
898
|
+
/**
|
|
899
|
+
* The plural capability name for this post type.
|
|
900
|
+
*/
|
|
901
|
+
plural_capability_name?: string;
|
|
902
|
+
/**
|
|
903
|
+
* An array of taxonomy identifiers that will be registered for the post type.
|
|
904
|
+
* Taxonomies can be registered later with register_taxonomy() or register_taxonomy_for_object_type().
|
|
905
|
+
*/
|
|
906
|
+
taxonomies?: string[];
|
|
907
|
+
/**
|
|
908
|
+
* The query var name for this post type.
|
|
909
|
+
*/
|
|
910
|
+
query_var_name?: string;
|
|
911
|
+
/**
|
|
912
|
+
* Provide a callback function that sets up the meta boxes for the edit form.
|
|
913
|
+
* Do remove_meta_box() and add_meta_box() calls in the callback.
|
|
914
|
+
* Default null.
|
|
915
|
+
*/
|
|
916
|
+
register_meta_box_cb?: string;
|
|
917
|
+
/**
|
|
918
|
+
* Custom text for the "Enter title here" placeholder in the title field.
|
|
919
|
+
*/
|
|
920
|
+
enter_title_here?: string;
|
|
921
|
+
/**
|
|
922
|
+
* The string to use to build the read, edit, and delete capabilities.
|
|
923
|
+
* May be passed as an array to allow for alternative plurals when using this argument as a base to construct the capabilities,
|
|
924
|
+
* e.g. array('story', 'stories').
|
|
925
|
+
* Default 'post'.
|
|
926
|
+
*/
|
|
927
|
+
capability_type?: string | [string, string];
|
|
928
|
+
/**
|
|
929
|
+
* Array of capabilities for this post type.
|
|
930
|
+
* $capability_type is used as a base to construct capabilities by default.
|
|
931
|
+
* See get_post_type_capabilities().
|
|
932
|
+
*/
|
|
933
|
+
capabilities?: {
|
|
934
|
+
[key: string]: string;
|
|
935
|
+
};
|
|
936
|
+
/**
|
|
937
|
+
* Whether to use the internal default meta capability handling.
|
|
938
|
+
* Default false.
|
|
939
|
+
*/
|
|
940
|
+
map_meta_cap?: boolean;
|
|
941
|
+
/**
|
|
942
|
+
* Core feature(s) the post type supports. Serves as an alias for calling add_post_type_support() directly.
|
|
943
|
+
*
|
|
944
|
+
* Core features include 'title', 'editor', 'comments', 'revisions', 'trackbacks', 'author', 'excerpt',
|
|
945
|
+
* 'page-attributes', 'thumbnail', 'custom-fields', and 'post-formats'.
|
|
946
|
+
*
|
|
947
|
+
* Additionally, the 'revisions' feature dictates whether the post type will store revisions,
|
|
948
|
+
* the 'autosave' feature dictates whether the post type will be autosaved,
|
|
949
|
+
* and the 'comments' feature dictates whether the comments count will show on the edit screen.
|
|
950
|
+
*
|
|
951
|
+
* For backward compatibility reasons, adding 'editor' support implies 'autosave' support too.
|
|
952
|
+
*
|
|
953
|
+
* A feature can also be specified as an array of arguments to provide additional information about supporting that feature.
|
|
954
|
+
*
|
|
955
|
+
* Example: array( 'my_feature', array( 'field' => 'value' ) ).
|
|
956
|
+
*
|
|
957
|
+
* If false, no features will be added.
|
|
958
|
+
* Default is an array containing 'title' and 'editor'.
|
|
959
|
+
*/
|
|
960
|
+
supports?: Array<'title' | 'editor' | 'author' | 'thumbnail' | 'excerpt' | 'trackbacks' | 'custom-fields' | 'comments' | 'revisions' | 'page-attributes' | 'post-formats'> & string[];
|
|
961
|
+
/**
|
|
962
|
+
* Whether there should be post type archives, or if a string, the archive slug to use.
|
|
963
|
+
* Will generate the proper rewrite rules if $rewrite is enabled.
|
|
964
|
+
* Default false.
|
|
965
|
+
*/
|
|
966
|
+
has_archive?: boolean | string;
|
|
967
|
+
/**
|
|
968
|
+
* Triggers the handling of rewrites for this post type. To prevent rewrite, set to false.
|
|
969
|
+
* Defaults to true, using $post_type as slug.
|
|
970
|
+
* To specify rewrite rules, an array can be passed with any of these keys:
|
|
971
|
+
* - slug (string): Customize the permastruct slug. Defaults to $post_type key.
|
|
972
|
+
* - with_front (bool): Whether the permastruct should be prepended with WP_Rewrite::$front. Default true.
|
|
973
|
+
* - feeds (bool): Whether the feed permastruct should be built for this post type. Default is value of $has_archive.
|
|
974
|
+
* - pages (bool): Whether the permastruct should provide for pagination. Default true.
|
|
975
|
+
* - ep_mask (int): Endpoint mask to assign. If not specified and permalink_epmask is set, inherits from $permalink_epmask.
|
|
976
|
+
* If not specified and permalink_epmask is not set, defaults to EP_PERMALINK.
|
|
977
|
+
*/
|
|
978
|
+
rewrite?: boolean | {
|
|
979
|
+
slug?: string;
|
|
980
|
+
with_front?: boolean;
|
|
981
|
+
pages?: boolean;
|
|
982
|
+
feeds?: boolean;
|
|
983
|
+
ep_mask?: number;
|
|
984
|
+
};
|
|
985
|
+
/**
|
|
986
|
+
* Sets the query_var key for this post type.
|
|
987
|
+
* Defaults to $post_type key.
|
|
988
|
+
* If false, a post type cannot be loaded at ?{query_var}={post_slug}.
|
|
989
|
+
* If specified as a string, the query ?{query_var_string}={post_slug} will be valid.
|
|
990
|
+
*/
|
|
991
|
+
query_var?: boolean | string;
|
|
992
|
+
/**
|
|
993
|
+
* Whether to allow this post type to be exported.
|
|
994
|
+
* Default true.
|
|
995
|
+
*/
|
|
996
|
+
can_export?: boolean;
|
|
997
|
+
/**
|
|
998
|
+
* Whether to delete posts of this type when deleting a user.
|
|
999
|
+
* If true, posts of this type belonging to the user will be moved to Trash when the user is deleted.
|
|
1000
|
+
* If false, posts of this type belonging to the user will *not* be trashed or deleted.
|
|
1001
|
+
* If not set (the default), posts are trashed if post type supports the 'author' feature.
|
|
1002
|
+
* Otherwise posts are not trashed or deleted.
|
|
1003
|
+
* Default null.
|
|
1004
|
+
*/
|
|
1005
|
+
delete_with_user?: boolean;
|
|
1006
|
+
/**
|
|
1007
|
+
* Array of blocks to use as the default initial state for an editor session.
|
|
1008
|
+
* Each item should be an array containing block name and optional attributes.
|
|
1009
|
+
*/
|
|
1010
|
+
template?: Array<Block>;
|
|
1011
|
+
/**
|
|
1012
|
+
* Whether the block template should be locked if $template is set.
|
|
1013
|
+
* If set to 'all', the user is unable to insert new blocks, move existing blocks and delete blocks.
|
|
1014
|
+
* If set to 'insert', the user is able to move existing blocks but is unable to insert new blocks and delete blocks.
|
|
1015
|
+
* Default false.
|
|
1016
|
+
*/
|
|
1017
|
+
template_lock?: 'all' | 'insert' | false;
|
|
1018
|
+
};
|
|
1019
|
+
/**
|
|
1020
|
+
* }}}
|
|
1021
|
+
*/
|
|
1022
|
+
/**
|
|
1023
|
+
* FONTS DECLARATIONS {{{
|
|
1024
|
+
* This mirrors WordPress core's font-collection.json schema.
|
|
1025
|
+
*/
|
|
1026
|
+
/**
|
|
1027
|
+
* Font face settings with added preview property.
|
|
1028
|
+
*/
|
|
1029
|
+
type FontFace = {
|
|
1030
|
+
/** URL to a preview image of the font. */
|
|
1031
|
+
preview?: string;
|
|
1032
|
+
/** CSS font-family value. */
|
|
1033
|
+
fontFamily: string;
|
|
1034
|
+
/** CSS font-style value. */
|
|
1035
|
+
fontStyle?: string;
|
|
1036
|
+
/** List of available font weights, separated by a space. */
|
|
1037
|
+
fontWeight?: string | number;
|
|
1038
|
+
/** CSS font-display value. */
|
|
1039
|
+
fontDisplay?: 'auto' | 'block' | 'fallback' | 'swap' | 'optional';
|
|
1040
|
+
/** Paths or URLs to the font files. */
|
|
1041
|
+
src: DataSources.DataReference | DataSources.DataReference[];
|
|
1042
|
+
/** CSS font-stretch value. */
|
|
1043
|
+
fontStretch?: string;
|
|
1044
|
+
/** CSS ascent-override value. */
|
|
1045
|
+
ascentOverride?: string;
|
|
1046
|
+
/** CSS descent-override value. */
|
|
1047
|
+
descentOverride?: string;
|
|
1048
|
+
/** CSS font-variant value. */
|
|
1049
|
+
fontVariant?: string;
|
|
1050
|
+
/** CSS font-feature-settings value. */
|
|
1051
|
+
fontFeatureSettings?: string;
|
|
1052
|
+
/** CSS font-variation-settings value. */
|
|
1053
|
+
fontVariationSettings?: string;
|
|
1054
|
+
/** CSS line-gap-override value. */
|
|
1055
|
+
lineGapOverride?: string;
|
|
1056
|
+
/** CSS size-adjust value. */
|
|
1057
|
+
sizeAdjust?: string;
|
|
1058
|
+
/** CSS unicode-range value. */
|
|
1059
|
+
unicodeRange?: string;
|
|
1060
|
+
};
|
|
1061
|
+
/**
|
|
1062
|
+
* Font collection schema for WordPress Font Library.
|
|
1063
|
+
*/
|
|
1064
|
+
type FontCollection = {
|
|
1065
|
+
/** JSON schema URI for font-collection.json. */
|
|
1066
|
+
$schema?: string;
|
|
1067
|
+
/** Array of font families ready to be installed. */
|
|
1068
|
+
font_families: Array<{
|
|
1069
|
+
/** Font family settings with added preview property. */
|
|
1070
|
+
font_family_settings: {
|
|
1071
|
+
/** Name of the font family preset, translatable. */
|
|
1072
|
+
name: string;
|
|
1073
|
+
/** Kebab-case unique identifier for the font family preset. */
|
|
1074
|
+
slug: string;
|
|
1075
|
+
/** CSS font-family value. */
|
|
1076
|
+
fontFamily: string;
|
|
1077
|
+
/** URL to a preview image of the font family. */
|
|
1078
|
+
preview?: string;
|
|
1079
|
+
/** Array of font-face definitions. */
|
|
1080
|
+
fontFace?: FontFace[];
|
|
1081
|
+
};
|
|
1082
|
+
/** Array of category slugs. */
|
|
1083
|
+
categories?: string[];
|
|
1084
|
+
}>;
|
|
1085
|
+
};
|
|
1086
|
+
/**
|
|
1087
|
+
* WordPress Content Schema {{{
|
|
1088
|
+
*/
|
|
1089
|
+
/**
|
|
1090
|
+
* Post data type. It is inspired by the wp_insert_post() arguments,
|
|
1091
|
+
* but it diverges from it in a few ways.
|
|
1092
|
+
*/
|
|
1093
|
+
type WordPressPost = {
|
|
1094
|
+
/**
|
|
1095
|
+
* Username of the post author.
|
|
1096
|
+
*
|
|
1097
|
+
* If missing, the default value will be resolved in the following order
|
|
1098
|
+
* until one is available:
|
|
1099
|
+
*
|
|
1100
|
+
* * Default user defined in the runner configuration.
|
|
1101
|
+
* * The first administrator in the database.
|
|
1102
|
+
* * The first user in the database.
|
|
1103
|
+
* * A newly created user.
|
|
1104
|
+
*
|
|
1105
|
+
* The aggressive resolution is necessary because post_author is NOT NULL
|
|
1106
|
+
* in the database schema.
|
|
1107
|
+
*/
|
|
1108
|
+
post_author?: number;
|
|
1109
|
+
/**
|
|
1110
|
+
* The date of the post in UTC. Accepts format 'YYYY-MM-DD HH:MM:SS'.
|
|
1111
|
+
* Can be used to schedule future posts (when used with post_status: 'future').
|
|
1112
|
+
*
|
|
1113
|
+
* @default Current time
|
|
1114
|
+
*/
|
|
1115
|
+
post_date?: string;
|
|
1116
|
+
/**
|
|
1117
|
+
* The main post content. Can contain HTML, shortcodes, etc.
|
|
1118
|
+
* While technically optional, posts are usually expected to have content.
|
|
1119
|
+
*
|
|
1120
|
+
* @default ''
|
|
1121
|
+
*/
|
|
1122
|
+
post_content?: string;
|
|
1123
|
+
/** The post title. */
|
|
1124
|
+
post_title: string;
|
|
1125
|
+
/** The post excerpt. Default empty. */
|
|
1126
|
+
post_excerpt?: string;
|
|
1127
|
+
/** The post status */
|
|
1128
|
+
post_status?: 'publish' | 'pending' | 'draft' | 'auto-draft' | 'future' | 'private' | 'inherit' | 'trash';
|
|
1129
|
+
/** The post type (e.g., 'post', 'page'). Default 'post'. */
|
|
1130
|
+
post_type?: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* Whether comments are allowed ('open' or 'closed').
|
|
1133
|
+
*
|
|
1134
|
+
* @default 'open'.
|
|
1135
|
+
*/
|
|
1136
|
+
comment_status?: 'open' | 'closed';
|
|
1137
|
+
/** A password to protect access. Default empty. */
|
|
1138
|
+
post_password?: string;
|
|
1139
|
+
/** The URL slug. Default sanitized post_title for new posts. */
|
|
1140
|
+
post_name?: string;
|
|
1141
|
+
/** Post parent name for hierarchical post types (e.g., pages). Default empty. */
|
|
1142
|
+
post_parent_name?: string;
|
|
1143
|
+
/** Menu order within a post type. Default 0. */
|
|
1144
|
+
menu_order?: number;
|
|
1145
|
+
/** MIME type for attachments. Default empty. */
|
|
1146
|
+
post_mime_type?: string;
|
|
1147
|
+
/** Global Unique ID. Default empty. */
|
|
1148
|
+
guid?: string;
|
|
1149
|
+
/** Array of category slugs. Defaults to the site's default category. */
|
|
1150
|
+
post_category?: string[];
|
|
1151
|
+
/** Array of tag names. Default empty. */
|
|
1152
|
+
post_tags?: Array<string>;
|
|
1153
|
+
/**
|
|
1154
|
+
* Taxonomy terms keyed by taxonomy name.
|
|
1155
|
+
* For hierarchical taxonomies: array of term names.
|
|
1156
|
+
* For non-hierarchical: array of term names or slugs.
|
|
1157
|
+
*
|
|
1158
|
+
* Examples:
|
|
1159
|
+
* ```json
|
|
1160
|
+
* tax_input: {
|
|
1161
|
+
* // For hierarchical taxonomies like categories
|
|
1162
|
+
* "category": ["Books", "Fiction", "Science Fiction"],
|
|
1163
|
+
*
|
|
1164
|
+
* // For non-hierarchical taxonomies like tags
|
|
1165
|
+
* "post_tag": ["bestseller", "featured", "summer-reading"],
|
|
1166
|
+
*
|
|
1167
|
+
* // For custom taxonomies
|
|
1168
|
+
* "genre": ["mystery", "thriller"],
|
|
1169
|
+
* "author": ["Jane Doe", "John Smith"]
|
|
1170
|
+
* }
|
|
1171
|
+
* ```
|
|
1172
|
+
*/
|
|
1173
|
+
tax_input?: Record<string, Array<string>>;
|
|
1174
|
+
/**
|
|
1175
|
+
* Post meta keyed by meta key to value. Default empty.
|
|
1176
|
+
*
|
|
1177
|
+
* Examples:
|
|
1178
|
+
* ```json
|
|
1179
|
+
* meta_input: {
|
|
1180
|
+
* // Simple values
|
|
1181
|
+
* "price": "19.99",
|
|
1182
|
+
* "in_stock": true,
|
|
1183
|
+
* "stock": 42,
|
|
1184
|
+
*
|
|
1185
|
+
* // Array values
|
|
1186
|
+
* "related_products": [123, 456, 789],
|
|
1187
|
+
* "product_colors": ["red", "blue", "green"],
|
|
1188
|
+
*
|
|
1189
|
+
* // Object values
|
|
1190
|
+
* "_product_attributes": {
|
|
1191
|
+
* "color": {
|
|
1192
|
+
* "name": "Color",
|
|
1193
|
+
* "value": "Red",
|
|
1194
|
+
* "position": 0,
|
|
1195
|
+
* "visible": true
|
|
1196
|
+
* }
|
|
1197
|
+
* },
|
|
1198
|
+
* "seo_data": {
|
|
1199
|
+
* "title": "Custom SEO Title",
|
|
1200
|
+
* "description": "Custom meta description",
|
|
1201
|
+
* "keywords": ["product", "featured"]
|
|
1202
|
+
* }
|
|
1203
|
+
* }
|
|
1204
|
+
* ```
|
|
1205
|
+
*/
|
|
1206
|
+
meta_input?: Record<string, JsonValue>;
|
|
1207
|
+
/**
|
|
1208
|
+
* Specifies the page template file to use.
|
|
1209
|
+
* This parameter only applies if post_type is 'page'. For other post types, it's ignored.
|
|
1210
|
+
* Provide the template filename (e.g., 'template-contact.php'). Include subdirectory if applicable (e.g., 'templates/full-width.php').
|
|
1211
|
+
* To set a template for non-page post types, use meta_input with key '_wp_page_template'.
|
|
1212
|
+
*
|
|
1213
|
+
* @default ''
|
|
1214
|
+
*/
|
|
1215
|
+
page_template?: string;
|
|
1216
|
+
};
|
|
1217
|
+
/**
|
|
1218
|
+
* }}}
|
|
1219
|
+
*/
|
|
1220
|
+
type ActivatePluginStep = {
|
|
1221
|
+
step: 'activatePlugin';
|
|
1222
|
+
/**
|
|
1223
|
+
* Path to the plugin directory as absolute path
|
|
1224
|
+
* (/wordpress/wp-content/plugins/plugin-name); or the plugin entry file
|
|
1225
|
+
* relative to the plugins directory (plugin-name/plugin-name.php).
|
|
1226
|
+
*/
|
|
1227
|
+
pluginPath: string;
|
|
1228
|
+
/**
|
|
1229
|
+
* Human-readable name of the plugin for the progress bar.
|
|
1230
|
+
*
|
|
1231
|
+
* For example, with the following Blueprint:
|
|
1232
|
+
*
|
|
1233
|
+
* ```json
|
|
1234
|
+
* {
|
|
1235
|
+
* "steps": [
|
|
1236
|
+
* {
|
|
1237
|
+
* "step": "activatePlugin",
|
|
1238
|
+
* "pluginPath": "wordpress-seo/wp-seo.php",
|
|
1239
|
+
* "humanReadableName": "Yoast SEO"
|
|
1240
|
+
* }
|
|
1241
|
+
* ]
|
|
1242
|
+
* }
|
|
1243
|
+
* ```
|
|
1244
|
+
*
|
|
1245
|
+
* The progress bar will show "Activating Yoast SEO" instead of
|
|
1246
|
+
* "Activating wordpress-seo/wp-seo.php".
|
|
1247
|
+
*/
|
|
1248
|
+
humanReadableName?: string;
|
|
1249
|
+
};
|
|
1250
|
+
type ActivateThemeStep = {
|
|
1251
|
+
step: 'activateTheme';
|
|
1252
|
+
/**
|
|
1253
|
+
* The name of the theme directory inside wp-content/themes/
|
|
1254
|
+
*/
|
|
1255
|
+
themeDirectoryName: string;
|
|
1256
|
+
/**
|
|
1257
|
+
* Human-readable name of the theme for the progress bar.
|
|
1258
|
+
*
|
|
1259
|
+
* For example, with the following Blueprint:
|
|
1260
|
+
*
|
|
1261
|
+
* ```json
|
|
1262
|
+
* {
|
|
1263
|
+
* "steps": [
|
|
1264
|
+
* {
|
|
1265
|
+
* "step": "activateTheme",
|
|
1266
|
+
* "themeDirectoryName": "twentytwentythree",
|
|
1267
|
+
* "humanReadableName": "Twenty Twenty-Three"
|
|
1268
|
+
* }
|
|
1269
|
+
* ]
|
|
1270
|
+
* }
|
|
1271
|
+
* ```
|
|
1272
|
+
*
|
|
1273
|
+
* The progress bar will show "Activating Twenty Twenty-Three" instead of
|
|
1274
|
+
* "Activating twentytwentythree".
|
|
1275
|
+
*/
|
|
1276
|
+
humanReadableName?: string;
|
|
1277
|
+
};
|
|
1278
|
+
type CpStep = {
|
|
1279
|
+
step: 'cp';
|
|
1280
|
+
fromPath: string;
|
|
1281
|
+
toPath: string;
|
|
1282
|
+
};
|
|
1283
|
+
type WordPressConstants = Record<string, boolean | string | number> & Partial<{
|
|
1284
|
+
WP_DEBUG: boolean;
|
|
1285
|
+
WP_DEBUG_LOG: boolean;
|
|
1286
|
+
WP_DEBUG_DISPLAY: boolean;
|
|
1287
|
+
SCRIPT_DEBUG: boolean;
|
|
1288
|
+
}>;
|
|
1289
|
+
type DefineConstantsStep = {
|
|
1290
|
+
step: 'defineConstants';
|
|
1291
|
+
constants: WordPressConstants;
|
|
1292
|
+
};
|
|
1293
|
+
type ImportContentStep = {
|
|
1294
|
+
step: 'importContent';
|
|
1295
|
+
content: ContentDefinition[];
|
|
1296
|
+
};
|
|
1297
|
+
type ImportMediaStep = {
|
|
1298
|
+
step: 'importMedia';
|
|
1299
|
+
media: MediaDefinition[];
|
|
1300
|
+
};
|
|
1301
|
+
type ImportThemeStarterContentStep = {
|
|
1302
|
+
step: 'importThemeStarterContent';
|
|
1303
|
+
/**
|
|
1304
|
+
* The name of the theme to import content from.
|
|
1305
|
+
*/
|
|
1306
|
+
themeSlug?: string;
|
|
1307
|
+
};
|
|
1308
|
+
type MkdirStep = {
|
|
1309
|
+
step: 'mkdir';
|
|
1310
|
+
path: string;
|
|
1311
|
+
};
|
|
1312
|
+
type MvStep = {
|
|
1313
|
+
step: 'mv';
|
|
1314
|
+
fromPath: string;
|
|
1315
|
+
toPath: string;
|
|
1316
|
+
};
|
|
1317
|
+
type RmStep = {
|
|
1318
|
+
step: 'rm';
|
|
1319
|
+
path: string;
|
|
1320
|
+
};
|
|
1321
|
+
type RmdirStep = {
|
|
1322
|
+
step: 'rmdir';
|
|
1323
|
+
path: string;
|
|
1324
|
+
};
|
|
1325
|
+
type RunPHPStep = {
|
|
1326
|
+
step: 'runPHP';
|
|
1327
|
+
/**
|
|
1328
|
+
* The PHP file to execute.
|
|
1329
|
+
*/
|
|
1330
|
+
code: DataSources.DataReference;
|
|
1331
|
+
/**
|
|
1332
|
+
* Environment variables to set for this run.
|
|
1333
|
+
*/
|
|
1334
|
+
env?: Record<string, string>;
|
|
1335
|
+
};
|
|
1336
|
+
type RunSQLStep = {
|
|
1337
|
+
step: 'runSQL';
|
|
1338
|
+
source: DataSources.DataReference;
|
|
1339
|
+
};
|
|
1340
|
+
/**
|
|
1341
|
+
* Sets the site language and download translations for WordPress core
|
|
1342
|
+
* and all the installed plugins and themes.
|
|
1343
|
+
*/
|
|
1344
|
+
type SetSiteLanguageStep = {
|
|
1345
|
+
step: 'setSiteLanguage';
|
|
1346
|
+
/**
|
|
1347
|
+
* The language to set, e.g. 'en_US'
|
|
1348
|
+
*/
|
|
1349
|
+
language: string;
|
|
1350
|
+
};
|
|
1351
|
+
type SetSiteOptionsStep = {
|
|
1352
|
+
step: 'setSiteOptions';
|
|
1353
|
+
options: Record<string, JsonValue>;
|
|
1354
|
+
};
|
|
1355
|
+
/**
|
|
1356
|
+
* Unzips a file. While this step is not strictly necessary, it is
|
|
1357
|
+
* very convenient for:
|
|
1358
|
+
*
|
|
1359
|
+
* * Working with GitHub releases that output doubly zipped data.
|
|
1360
|
+
* * Preprocessing zipped data before using them in the Blueprint.
|
|
1361
|
+
*/
|
|
1362
|
+
type UnzipStep = {
|
|
1363
|
+
step: 'unzip';
|
|
1364
|
+
/**
|
|
1365
|
+
* The zip file resource to extract.
|
|
1366
|
+
*/
|
|
1367
|
+
zipFile: DataSources.DataReference;
|
|
1368
|
+
/**
|
|
1369
|
+
* The path to extract the zip file to inside the virtual filesystem.
|
|
1370
|
+
*/
|
|
1371
|
+
extractToPath: string;
|
|
1372
|
+
};
|
|
1373
|
+
type WpCliStep = {
|
|
1374
|
+
step: 'wp-cli';
|
|
1375
|
+
command: string;
|
|
1376
|
+
wpCliPath?: string;
|
|
1377
|
+
};
|
|
1378
|
+
type WriteFilesStep = {
|
|
1379
|
+
step: 'writeFiles';
|
|
1380
|
+
files: Record<string, DataSources.DataReference>;
|
|
1381
|
+
};
|
|
1382
|
+
type PluginStep = {
|
|
1383
|
+
step: 'installPlugin';
|
|
1384
|
+
} & PluginObjectDefinition;
|
|
1385
|
+
type ThemeStep = {
|
|
1386
|
+
step: 'installTheme';
|
|
1387
|
+
/**
|
|
1388
|
+
* Whether to activate the theme after installing it.
|
|
1389
|
+
*
|
|
1390
|
+
* This is not a part of the theme definition. Only the step
|
|
1391
|
+
* can explicitly provide this option. The default value is `true`.
|
|
1392
|
+
*/
|
|
1393
|
+
active?: boolean;
|
|
1394
|
+
} & ThemeObjectDefinition;
|
|
1395
|
+
type Step = ActivatePluginStep | ActivateThemeStep | CpStep | DefineConstantsStep | ImportContentStep | ImportMediaStep | ImportThemeStarterContentStep | PluginStep | ThemeStep | MkdirStep | MvStep | RmStep | RmdirStep | RunPHPStep | RunSQLStep | SetSiteLanguageStep | SetSiteOptionsStep | UnzipStep | WpCliStep | WriteFilesStep;
|
|
1396
|
+
type JsonValue = string | boolean | number | JsonValue[] | {
|
|
1397
|
+
[key: string]: JsonValue;
|
|
1398
|
+
};
|
|
1399
|
+
export {};
|
|
1400
|
+
}
|