@wp-playground/blueprints 3.0.2 → 3.0.4
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/index.cjs +38 -38
- package/index.cjs.map +1 -1
- package/index.d.ts +4 -2
- package/index.js +752 -678
- package/index.js.map +1 -1
- package/lib/reflection.d.ts +19 -0
- package/lib/resolve-runtime-configuration.d.ts +2 -0
- package/lib/steps/install-asset.d.ts +1 -1
- package/lib/types.d.ts +10 -1
- package/package.json +13 -13
package/index.js
CHANGED
|
@@ -1,18 +1,58 @@
|
|
|
1
1
|
import "@php-wasm/node-polyfills";
|
|
2
|
-
import { cloneStreamMonitorProgress as
|
|
3
|
-
import { dirname as
|
|
4
|
-
import { writeFiles as
|
|
5
|
-
import { resolveCommitHash as
|
|
6
|
-
import { fetchWithCorsProxy as
|
|
7
|
-
import { StreamedFile as
|
|
2
|
+
import { cloneStreamMonitorProgress as Ir, cloneResponseMonitorProgress as Wr, ProgressTracker as Ur } from "@php-wasm/progress";
|
|
3
|
+
import { dirname as gr, randomFilename as br, phpVars as wr, joinPaths as ie, phpVar as he, Semaphore as vr } from "@php-wasm/util";
|
|
4
|
+
import { writeFiles as nr, LatestSupportedPHPVersion as Br, SupportedPHPVersions as Mr } from "@php-wasm/universal";
|
|
5
|
+
import { resolveCommitHash as zr, listGitFiles as Vr, listDescendantFiles as Hr, sparseCheckout as Zr, OverlayFilesystem as Yr, InMemoryFilesystem as Gr, FetchFilesystem as Qr, ZipFilesystem as Jr } from "@wp-playground/storage";
|
|
6
|
+
import { fetchWithCorsProxy as Xr } from "@php-wasm/web";
|
|
7
|
+
import { StreamedFile as Kr } from "@php-wasm/stream-compression";
|
|
8
8
|
import { logger as ae } from "@php-wasm/logger";
|
|
9
|
-
import { defineWpConfigConstants as
|
|
10
|
-
import { unzipFile as
|
|
11
|
-
function
|
|
9
|
+
import { defineWpConfigConstants as et, ensureWpConfig as rt } from "@wp-playground/wordpress";
|
|
10
|
+
import { unzipFile as Pr, RecommendedPHPVersion as tt } from "@wp-playground/common";
|
|
11
|
+
function _r(r) {
|
|
12
|
+
return r && "read" in r && typeof r.read == "function";
|
|
13
|
+
}
|
|
14
|
+
async function st(r) {
|
|
15
|
+
if (!_r(r))
|
|
16
|
+
return r;
|
|
17
|
+
const n = await (await r.read("blueprint.json")).text();
|
|
18
|
+
return JSON.parse(n);
|
|
19
|
+
}
|
|
20
|
+
class rr {
|
|
21
|
+
constructor(t, n, f) {
|
|
22
|
+
this.declaration = t, this.bundle = n, this.version = f;
|
|
23
|
+
}
|
|
24
|
+
static async create(t) {
|
|
25
|
+
const n = await st(t), f = _r(t) ? t : void 0;
|
|
26
|
+
return rr.createFromDeclaration(n, f);
|
|
27
|
+
}
|
|
28
|
+
static createFromDeclaration(t, n = void 0) {
|
|
29
|
+
return new rr(
|
|
30
|
+
t,
|
|
31
|
+
n,
|
|
32
|
+
t.version || 1
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
getVersion() {
|
|
36
|
+
return this.version;
|
|
37
|
+
}
|
|
38
|
+
getDeclaration() {
|
|
39
|
+
return this.declaration;
|
|
40
|
+
}
|
|
41
|
+
isBundle() {
|
|
42
|
+
return this.bundle !== void 0;
|
|
43
|
+
}
|
|
44
|
+
getBundle() {
|
|
45
|
+
return this.bundle;
|
|
46
|
+
}
|
|
47
|
+
getBlueprint() {
|
|
48
|
+
return this.getBundle() || this.getDeclaration();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function tr(r) {
|
|
12
52
|
const t = r.split(".").shift().replace(/-/g, " ");
|
|
13
53
|
return t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
|
|
14
54
|
}
|
|
15
|
-
const
|
|
55
|
+
const it = [
|
|
16
56
|
"vfs",
|
|
17
57
|
"literal",
|
|
18
58
|
"wordpress.org/themes",
|
|
@@ -21,8 +61,8 @@ const rt = [
|
|
|
21
61
|
"git:directory",
|
|
22
62
|
"bundled"
|
|
23
63
|
];
|
|
24
|
-
function
|
|
25
|
-
return r && typeof r == "object" && typeof r.resource == "string" &&
|
|
64
|
+
function ot(r) {
|
|
65
|
+
return r && typeof r == "object" && typeof r.resource == "string" && it.includes(r.resource);
|
|
26
66
|
}
|
|
27
67
|
class Te {
|
|
28
68
|
get progress() {
|
|
@@ -47,44 +87,44 @@ class Te {
|
|
|
47
87
|
*/
|
|
48
88
|
static create(t, {
|
|
49
89
|
semaphore: n,
|
|
50
|
-
progress:
|
|
90
|
+
progress: f,
|
|
51
91
|
corsProxy: u,
|
|
52
92
|
streamBundledFile: s
|
|
53
93
|
}) {
|
|
54
94
|
let e;
|
|
55
95
|
switch (t.resource) {
|
|
56
96
|
case "vfs":
|
|
57
|
-
e = new
|
|
97
|
+
e = new at(t, f);
|
|
58
98
|
break;
|
|
59
99
|
case "literal":
|
|
60
|
-
e = new
|
|
100
|
+
e = new nt(t, f);
|
|
61
101
|
break;
|
|
62
102
|
case "wordpress.org/themes":
|
|
63
|
-
e = new
|
|
103
|
+
e = new mt(t, f);
|
|
64
104
|
break;
|
|
65
105
|
case "wordpress.org/plugins":
|
|
66
|
-
e = new
|
|
106
|
+
e = new yt(t, f);
|
|
67
107
|
break;
|
|
68
108
|
case "url":
|
|
69
|
-
e = new
|
|
109
|
+
e = new ft(t, f, { corsProxy: u });
|
|
70
110
|
break;
|
|
71
111
|
case "git:directory":
|
|
72
|
-
e = new
|
|
112
|
+
e = new dt(t, f, {
|
|
73
113
|
corsProxy: u
|
|
74
114
|
});
|
|
75
115
|
break;
|
|
76
116
|
case "literal:directory":
|
|
77
|
-
e = new
|
|
117
|
+
e = new ct(t, f);
|
|
78
118
|
break;
|
|
79
119
|
case "bundled":
|
|
80
120
|
if (!s)
|
|
81
121
|
throw new Error(
|
|
82
122
|
"Filesystem is required for blueprint resources"
|
|
83
123
|
);
|
|
84
|
-
e = new
|
|
124
|
+
e = new bt(
|
|
85
125
|
t,
|
|
86
126
|
s,
|
|
87
|
-
|
|
127
|
+
f
|
|
88
128
|
);
|
|
89
129
|
break;
|
|
90
130
|
default:
|
|
@@ -92,10 +132,10 @@ class Te {
|
|
|
92
132
|
`Unknown resource type: ${t.resource}`
|
|
93
133
|
);
|
|
94
134
|
}
|
|
95
|
-
return n && (e = new
|
|
135
|
+
return n && (e = new gt(e, n)), new ht(e);
|
|
96
136
|
}
|
|
97
137
|
}
|
|
98
|
-
class
|
|
138
|
+
class kr extends Te {
|
|
99
139
|
constructor(t) {
|
|
100
140
|
super(), this.resource = t;
|
|
101
141
|
}
|
|
@@ -120,7 +160,7 @@ class vr extends Te {
|
|
|
120
160
|
this.resource.setPlayground(t);
|
|
121
161
|
}
|
|
122
162
|
}
|
|
123
|
-
class
|
|
163
|
+
class at extends Te {
|
|
124
164
|
/**
|
|
125
165
|
* Creates a new instance of `VFSResource`.
|
|
126
166
|
* @param playground The playground client.
|
|
@@ -143,7 +183,7 @@ class st extends Te {
|
|
|
143
183
|
return this.resource.path.split("/").pop() || "";
|
|
144
184
|
}
|
|
145
185
|
}
|
|
146
|
-
class
|
|
186
|
+
class nt extends Te {
|
|
147
187
|
/**
|
|
148
188
|
* Creates a new instance of `LiteralResource`.
|
|
149
189
|
* @param resource The literal reference.
|
|
@@ -162,7 +202,7 @@ class it extends Te {
|
|
|
162
202
|
return this.resource.name;
|
|
163
203
|
}
|
|
164
204
|
}
|
|
165
|
-
class
|
|
205
|
+
class pr extends Te {
|
|
166
206
|
/**
|
|
167
207
|
* Creates a new instance of `FetchResource`.
|
|
168
208
|
* @param progress The progress tracker.
|
|
@@ -172,24 +212,24 @@ class nr extends Te {
|
|
|
172
212
|
}
|
|
173
213
|
/** @inheritDoc */
|
|
174
214
|
async resolve() {
|
|
175
|
-
var n,
|
|
215
|
+
var n, f, u;
|
|
176
216
|
(n = this.progress) == null || n.setCaption(this.caption);
|
|
177
217
|
const t = this.getURL();
|
|
178
218
|
try {
|
|
179
|
-
let s = await
|
|
219
|
+
let s = await Xr(
|
|
180
220
|
t,
|
|
181
221
|
void 0,
|
|
182
222
|
this.corsProxy,
|
|
183
|
-
await ((
|
|
223
|
+
await ((f = this.playground) == null ? void 0 : f.absoluteUrl)
|
|
184
224
|
);
|
|
185
225
|
if (!s.ok)
|
|
186
226
|
throw new Error(`Could not download "${t}"`);
|
|
187
|
-
if (s = await
|
|
227
|
+
if (s = await Wr(
|
|
188
228
|
s,
|
|
189
|
-
((u = this.progress) == null ? void 0 : u.loadingListener) ??
|
|
229
|
+
((u = this.progress) == null ? void 0 : u.loadingListener) ?? lt
|
|
190
230
|
), s.status !== 200)
|
|
191
231
|
throw new Error(`Could not download "${t}"`);
|
|
192
|
-
const e = this.name ||
|
|
232
|
+
const e = this.name || pt(
|
|
193
233
|
s.headers.get("content-disposition") || ""
|
|
194
234
|
) || encodeURIComponent(t);
|
|
195
235
|
return new File([await s.blob()], e);
|
|
@@ -243,7 +283,7 @@ class nr extends Te {
|
|
|
243
283
|
return !0;
|
|
244
284
|
}
|
|
245
285
|
}
|
|
246
|
-
function
|
|
286
|
+
function pt(r) {
|
|
247
287
|
if (!r)
|
|
248
288
|
return null;
|
|
249
289
|
const t = r.match(/filename\*?=([^;]+)/i);
|
|
@@ -251,25 +291,25 @@ function ot(r) {
|
|
|
251
291
|
return null;
|
|
252
292
|
let n = t[1].trim();
|
|
253
293
|
if ((n.startsWith('"') && n.endsWith('"') || n.startsWith("'") && n.endsWith("'")) && (n = n.slice(1, -1)), t[0].includes("filename*")) {
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
294
|
+
const f = n.match(/^[^']*'[^']*'(.+)$/);
|
|
295
|
+
if (f)
|
|
256
296
|
try {
|
|
257
|
-
n = decodeURIComponent(
|
|
297
|
+
n = decodeURIComponent(f[1]);
|
|
258
298
|
} catch {
|
|
259
299
|
}
|
|
260
300
|
}
|
|
261
301
|
return n;
|
|
262
302
|
}
|
|
263
|
-
const
|
|
303
|
+
const lt = () => {
|
|
264
304
|
};
|
|
265
|
-
class
|
|
305
|
+
class ft extends pr {
|
|
266
306
|
/**
|
|
267
307
|
* Creates a new instance of `UrlResource`.
|
|
268
308
|
* @param resource The URL reference.
|
|
269
309
|
* @param progress The progress tracker.
|
|
270
310
|
*/
|
|
271
|
-
constructor(t, n,
|
|
272
|
-
if (super(n,
|
|
311
|
+
constructor(t, n, f) {
|
|
312
|
+
if (super(n, f == null ? void 0 : f.corsProxy), this.resource = t, this.options = f, this.resource.url.startsWith("https://github.com/")) {
|
|
273
313
|
const u = this.resource.url.match(
|
|
274
314
|
/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/blob\/(?<branch>[^/]+)\/(?<path>.+[^/])$/
|
|
275
315
|
);
|
|
@@ -288,22 +328,22 @@ class nt extends nr {
|
|
|
288
328
|
return this.resource.caption ?? super.caption;
|
|
289
329
|
}
|
|
290
330
|
}
|
|
291
|
-
class
|
|
292
|
-
constructor(t, n,
|
|
293
|
-
super(), this.reference = t, this._progress = n, this.options =
|
|
331
|
+
class dt extends Te {
|
|
332
|
+
constructor(t, n, f) {
|
|
333
|
+
super(), this.reference = t, this._progress = n, this.options = f;
|
|
294
334
|
}
|
|
295
335
|
async resolve() {
|
|
296
|
-
var
|
|
297
|
-
const t = (
|
|
336
|
+
var d;
|
|
337
|
+
const t = (d = this.options) != null && d.corsProxy ? `${this.options.corsProxy}${this.reference.url}` : this.reference.url, n = await zr(t, {
|
|
298
338
|
value: this.reference.ref,
|
|
299
339
|
type: "infer"
|
|
300
|
-
}),
|
|
301
|
-
let e = await
|
|
302
|
-
return e =
|
|
340
|
+
}), f = await Vr(t, n), u = this.reference.path.replace(/^\/+/, ""), s = Hr(f, u);
|
|
341
|
+
let e = await Zr(t, n, s);
|
|
342
|
+
return e = ut(
|
|
303
343
|
e,
|
|
304
344
|
(y) => y.substring(u.length).replace(/^\/+/, "")
|
|
305
345
|
), {
|
|
306
|
-
name:
|
|
346
|
+
name: gr(this.reference.path) || this.reference.url.replaceAll(/[^a-zA-Z0-9-.]/g, "-").replaceAll(/-+/g, "-"),
|
|
307
347
|
files: e
|
|
308
348
|
};
|
|
309
349
|
}
|
|
@@ -312,12 +352,12 @@ class pt extends Te {
|
|
|
312
352
|
return this.reference.path.split("/").pop();
|
|
313
353
|
}
|
|
314
354
|
}
|
|
315
|
-
function
|
|
355
|
+
function ut(r, t) {
|
|
316
356
|
return Object.fromEntries(
|
|
317
|
-
Object.entries(r).map(([n,
|
|
357
|
+
Object.entries(r).map(([n, f]) => [t(n), f])
|
|
318
358
|
);
|
|
319
359
|
}
|
|
320
|
-
class
|
|
360
|
+
class ct extends Te {
|
|
321
361
|
constructor(t, n) {
|
|
322
362
|
super(), this.reference = t, this._progress = n;
|
|
323
363
|
}
|
|
@@ -329,40 +369,40 @@ class ft extends Te {
|
|
|
329
369
|
return this.reference.name;
|
|
330
370
|
}
|
|
331
371
|
}
|
|
332
|
-
class
|
|
372
|
+
class mt extends pr {
|
|
333
373
|
constructor(t, n) {
|
|
334
374
|
super(n), this.resource = t;
|
|
335
375
|
}
|
|
336
376
|
get name() {
|
|
337
|
-
return
|
|
377
|
+
return tr(this.resource.slug);
|
|
338
378
|
}
|
|
339
379
|
getURL() {
|
|
340
|
-
return `https://downloads.wordpress.org/theme/${
|
|
380
|
+
return `https://downloads.wordpress.org/theme/${Or(this.resource.slug)}`;
|
|
341
381
|
}
|
|
342
382
|
}
|
|
343
|
-
class
|
|
383
|
+
class yt extends pr {
|
|
344
384
|
constructor(t, n) {
|
|
345
385
|
super(n), this.resource = t;
|
|
346
386
|
}
|
|
347
387
|
/** @inheritDoc */
|
|
348
388
|
get name() {
|
|
349
|
-
return
|
|
389
|
+
return tr(this.resource.slug);
|
|
350
390
|
}
|
|
351
391
|
/** @inheritDoc */
|
|
352
392
|
getURL() {
|
|
353
|
-
return `https://downloads.wordpress.org/plugin/${
|
|
393
|
+
return `https://downloads.wordpress.org/plugin/${Or(this.resource.slug)}`;
|
|
354
394
|
}
|
|
355
395
|
}
|
|
356
|
-
function
|
|
396
|
+
function Or(r) {
|
|
357
397
|
return !r || r.endsWith(".zip") ? r : r + ".latest-stable.zip";
|
|
358
398
|
}
|
|
359
|
-
class
|
|
399
|
+
class ht extends kr {
|
|
360
400
|
/** @inheritDoc */
|
|
361
401
|
async resolve() {
|
|
362
402
|
return this.promise || (this.promise = this.resource.resolve()), this.promise;
|
|
363
403
|
}
|
|
364
404
|
}
|
|
365
|
-
class
|
|
405
|
+
class gt extends kr {
|
|
366
406
|
constructor(t, n) {
|
|
367
407
|
super(t), this.semaphore = n;
|
|
368
408
|
}
|
|
@@ -371,43 +411,43 @@ class mt extends vr {
|
|
|
371
411
|
return this.isAsync ? this.semaphore.run(() => this.resource.resolve()) : this.resource.resolve();
|
|
372
412
|
}
|
|
373
413
|
}
|
|
374
|
-
class
|
|
414
|
+
class bt extends Te {
|
|
375
415
|
/**
|
|
376
416
|
* Creates a new instance of `BlueprintResource`.
|
|
377
417
|
* @param resource The blueprint reference.
|
|
378
418
|
* @param filesystem The filesystem to read from.
|
|
379
419
|
* @param progress The progress tracker.
|
|
380
420
|
*/
|
|
381
|
-
constructor(t, n,
|
|
421
|
+
constructor(t, n, f) {
|
|
382
422
|
if (!n)
|
|
383
423
|
throw new Error(
|
|
384
424
|
`You are trying to run a Blueprint that refers to a bundled file ("blueprint" resource type), but you did not provide the rest of the bundle. This Blueprint won't work as a standalone JSON file. You'll need to load the entire bundle, e.g. a blueprint.zip file. Alternatively, you may try loading it directly from a URL or a local directory and Playground will try (with your permission) to source the missing files from paths relative to the blueprint file.`
|
|
385
425
|
);
|
|
386
|
-
super(), this.resource = t, this.streamBundledFile = n, this._progress =
|
|
426
|
+
super(), this.resource = t, this.streamBundledFile = n, this._progress = f;
|
|
387
427
|
}
|
|
388
428
|
/** @inheritDoc */
|
|
389
429
|
async resolve() {
|
|
390
|
-
var t, n,
|
|
430
|
+
var t, n, f;
|
|
391
431
|
(t = this.progress) == null || t.set(0);
|
|
392
432
|
try {
|
|
393
433
|
const u = await this.streamBundledFile(this.resource.path), s = u.filesize;
|
|
394
434
|
if (!s)
|
|
395
435
|
return (n = this.progress) == null || n.set(100), u;
|
|
396
|
-
const e =
|
|
436
|
+
const e = Ir(
|
|
397
437
|
u.stream(),
|
|
398
438
|
s,
|
|
399
|
-
(
|
|
439
|
+
(d) => {
|
|
400
440
|
var y;
|
|
401
441
|
(y = this.progress) == null || y.set(
|
|
402
|
-
|
|
442
|
+
d.detail.loaded / d.detail.total * 100
|
|
403
443
|
);
|
|
404
444
|
}
|
|
405
445
|
);
|
|
406
|
-
return new
|
|
446
|
+
return new Kr(e, this.name, {
|
|
407
447
|
filesize: s
|
|
408
448
|
});
|
|
409
449
|
} catch (u) {
|
|
410
|
-
throw (
|
|
450
|
+
throw (f = this.progress) == null || f.set(100), new Error(
|
|
411
451
|
`Failed to read file from blueprint. This Blueprint refers to a resource of type "bundled" with path "${this.resource.path}" that was not available. Please ensure that the entire bundle, such as a blueprint.zip file, is loaded. If you are trying to load the Blueprint directly from a URL or a local directory, make sure that all the necessary files are accessible and located relative to the blueprint file.
|
|
412
452
|
|
|
413
453
|
Error details: ${u instanceof Error ? u.message : String(u)}`,
|
|
@@ -424,8 +464,8 @@ Error details: ${u instanceof Error ? u.message : String(u)}`,
|
|
|
424
464
|
return !0;
|
|
425
465
|
}
|
|
426
466
|
}
|
|
427
|
-
const
|
|
428
|
-
|
|
467
|
+
const Tr = async (r, { pluginPath: t, pluginName: n }, f) => {
|
|
468
|
+
f == null || f.tracker.setCaption(`Activating ${n || t}`);
|
|
429
469
|
const u = await r.documentRoot, s = await r.run({
|
|
430
470
|
code: `<?php
|
|
431
471
|
define( 'WP_ADMIN', true );
|
|
@@ -515,9 +555,9 @@ const _r = async (r, { pluginPath: t, pluginName: n }, d) => {
|
|
|
515
555
|
throw e.text !== "false" && ae.debug(e.text), new Error(
|
|
516
556
|
`Plugin ${t} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details.`
|
|
517
557
|
);
|
|
518
|
-
},
|
|
558
|
+
}, jr = async (r, { themeFolderName: t }, n) => {
|
|
519
559
|
n == null || n.tracker.setCaption(`Activating ${t}`);
|
|
520
|
-
const
|
|
560
|
+
const f = await r.documentRoot, u = `${f}/wp-content/themes/${t}`;
|
|
521
561
|
if (!await r.fileExists(u))
|
|
522
562
|
throw new Error(`
|
|
523
563
|
Couldn't activate theme ${t}.
|
|
@@ -542,7 +582,7 @@ const _r = async (r, { pluginPath: t, pluginName: n }, d) => {
|
|
|
542
582
|
die('Theme activated successfully');
|
|
543
583
|
`,
|
|
544
584
|
env: {
|
|
545
|
-
docroot:
|
|
585
|
+
docroot: f,
|
|
546
586
|
themeFolderName: t
|
|
547
587
|
}
|
|
548
588
|
});
|
|
@@ -550,7 +590,7 @@ const _r = async (r, { pluginPath: t, pluginName: n }, d) => {
|
|
|
550
590
|
throw ae.debug(s), new Error(
|
|
551
591
|
`Theme ${t} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details`
|
|
552
592
|
);
|
|
553
|
-
},
|
|
593
|
+
}, wt = async (r, { code: t }) => {
|
|
554
594
|
let n = typeof t == "string" ? t : t.content;
|
|
555
595
|
return (n.includes('"wordpress/wp-load.php"') || n.includes("'wordpress/wp-load.php'")) && (ae.error(
|
|
556
596
|
`
|
|
@@ -575,7 +615,7 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
575
615
|
'"wordpress/wp-load.php"',
|
|
576
616
|
'"/wordpress/wp-load.php"'
|
|
577
617
|
)), await r.run({ code: n });
|
|
578
|
-
},
|
|
618
|
+
}, vt = async (r, { options: t }) => await r.run(t), Er = async (r, { path: t }) => {
|
|
579
619
|
t.startsWith("/") || (ae.error(
|
|
580
620
|
`
|
|
581
621
|
The rm() step in your Blueprint refers to a relative path.
|
|
@@ -593,14 +633,14 @@ Use: rm({ path: '/wordpress/wp-load.php' });
|
|
|
593
633
|
This will ensure your code works reliably regardless of the current working directory.
|
|
594
634
|
`.trim()
|
|
595
635
|
), t = `/${t}`), await r.unlink(t);
|
|
596
|
-
},
|
|
636
|
+
}, Pt = async (r, { sql: t }, n) => {
|
|
597
637
|
n == null || n.tracker.setCaption("Executing SQL Queries");
|
|
598
|
-
const
|
|
638
|
+
const f = `/tmp/${br()}.sql`;
|
|
599
639
|
await r.writeFile(
|
|
600
|
-
|
|
640
|
+
f,
|
|
601
641
|
new Uint8Array(await t.arrayBuffer())
|
|
602
642
|
);
|
|
603
|
-
const u = await r.documentRoot, s =
|
|
643
|
+
const u = await r.documentRoot, s = wr({ docroot: u, sqlFilename: f }), e = await r.run({
|
|
604
644
|
code: `<?php
|
|
605
645
|
require_once ${s.docroot} . '/wp-load.php';
|
|
606
646
|
|
|
@@ -618,8 +658,8 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
618
658
|
}
|
|
619
659
|
`
|
|
620
660
|
});
|
|
621
|
-
return await
|
|
622
|
-
},
|
|
661
|
+
return await Er(r, { path: f }), e;
|
|
662
|
+
}, _t = async (r, { request: t }) => {
|
|
623
663
|
ae.warn(
|
|
624
664
|
'Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.'
|
|
625
665
|
);
|
|
@@ -629,14 +669,14 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
629
669
|
`Request failed with status ${n.httpStatusCode}`
|
|
630
670
|
);
|
|
631
671
|
return n;
|
|
632
|
-
},
|
|
672
|
+
}, lr = async (r, { consts: t, method: n = "define-before-run" }) => {
|
|
633
673
|
switch (n) {
|
|
634
674
|
case "define-before-run":
|
|
635
|
-
await
|
|
675
|
+
await kt(r, t);
|
|
636
676
|
break;
|
|
637
677
|
case "rewrite-wp-config": {
|
|
638
|
-
const
|
|
639
|
-
await
|
|
678
|
+
const f = await r.documentRoot, u = ie(f, "/wp-config.php");
|
|
679
|
+
await et(
|
|
640
680
|
r,
|
|
641
681
|
u,
|
|
642
682
|
t,
|
|
@@ -648,11 +688,11 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
648
688
|
throw new Error(`Invalid method: ${n}`);
|
|
649
689
|
}
|
|
650
690
|
};
|
|
651
|
-
async function
|
|
691
|
+
async function kt(r, t) {
|
|
652
692
|
for (const n in t)
|
|
653
693
|
await r.defineConstant(n, t[n]);
|
|
654
694
|
}
|
|
655
|
-
const
|
|
695
|
+
const qr = async (r, { options: t }) => {
|
|
656
696
|
const n = await r.documentRoot;
|
|
657
697
|
await r.run({
|
|
658
698
|
code: `<?php
|
|
@@ -664,18 +704,18 @@ const Tr = async (r, { options: t }) => {
|
|
|
664
704
|
echo "Success";
|
|
665
705
|
`
|
|
666
706
|
});
|
|
667
|
-
},
|
|
668
|
-
const
|
|
707
|
+
}, Ot = async (r, { meta: t, userId: n }) => {
|
|
708
|
+
const f = await r.documentRoot;
|
|
669
709
|
await r.run({
|
|
670
710
|
code: `<?php
|
|
671
|
-
include ${he(
|
|
711
|
+
include ${he(f)} . '/wp-load.php';
|
|
672
712
|
$meta = ${he(t)};
|
|
673
713
|
foreach($meta as $name => $value) {
|
|
674
714
|
update_user_meta(${he(n)}, $name, $value);
|
|
675
715
|
}
|
|
676
716
|
`
|
|
677
717
|
});
|
|
678
|
-
},
|
|
718
|
+
}, fr = "/tmp/wp-cli.phar", Tt = {
|
|
679
719
|
resource: "url",
|
|
680
720
|
/**
|
|
681
721
|
* Use compression for downloading the wp-cli.phar file.
|
|
@@ -688,7 +728,7 @@ const Tr = async (r, { options: t }) => {
|
|
|
688
728
|
* like the JavaScript parser or Composer are removed.
|
|
689
729
|
*/
|
|
690
730
|
url: "https://playground.wordpress.net/wp-cli.phar"
|
|
691
|
-
},
|
|
731
|
+
}, $r = async (r, t = fr) => {
|
|
692
732
|
if (!await r.fileExists(t))
|
|
693
733
|
throw new Error(`wp-cli.phar not found at ${t}.
|
|
694
734
|
You can enable wp-cli support by adding "wp-cli" to the list of extra libraries in your blueprint as follows:
|
|
@@ -697,13 +737,13 @@ const Tr = async (r, { options: t }) => {
|
|
|
697
737
|
}
|
|
698
738
|
Read more about it in the documentation.
|
|
699
739
|
https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`);
|
|
700
|
-
},
|
|
701
|
-
await
|
|
702
|
-
let
|
|
703
|
-
if (typeof t == "string" ? (t = t.trim(),
|
|
740
|
+
}, Ar = async (r, { command: t, wpCliPath: n = fr }) => {
|
|
741
|
+
await $r(r, n);
|
|
742
|
+
let f;
|
|
743
|
+
if (typeof t == "string" ? (t = t.trim(), f = jt(t)) : f = t, f.shift() !== "wp")
|
|
704
744
|
throw new Error('The first argument must be "wp".');
|
|
705
745
|
let s = !1;
|
|
706
|
-
const e =
|
|
746
|
+
const e = f.map((N) => N.startsWith("wordpress/") ? (s = !0, `/${N}`) : N);
|
|
707
747
|
s && ae.error(
|
|
708
748
|
`
|
|
709
749
|
The wp-cli step in your Blueprint refers to a relative path.
|
|
@@ -732,9 +772,9 @@ Use:
|
|
|
732
772
|
This will ensure your code works reliably regardless of the current working directory.
|
|
733
773
|
`.trim()
|
|
734
774
|
);
|
|
735
|
-
const
|
|
775
|
+
const d = await r.documentRoot;
|
|
736
776
|
await r.writeFile("/tmp/stdout", ""), await r.writeFile("/tmp/stderr", ""), await r.writeFile(
|
|
737
|
-
ie(
|
|
777
|
+
ie(d, "run-cli.php"),
|
|
738
778
|
`<?php
|
|
739
779
|
// Set up the environment to emulate a shell script
|
|
740
780
|
// call.
|
|
@@ -747,7 +787,7 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
747
787
|
// Set the argv global.
|
|
748
788
|
$GLOBALS['argv'] = array_merge([
|
|
749
789
|
"/tmp/wp-cli.phar",
|
|
750
|
-
"--path=${
|
|
790
|
+
"--path=${d}"
|
|
751
791
|
], ${he(e)});
|
|
752
792
|
|
|
753
793
|
// Provide stdin, stdout, stderr streams outside of
|
|
@@ -760,24 +800,24 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
760
800
|
`
|
|
761
801
|
);
|
|
762
802
|
const y = await r.run({
|
|
763
|
-
scriptPath: ie(
|
|
803
|
+
scriptPath: ie(d, "run-cli.php")
|
|
764
804
|
});
|
|
765
805
|
if (y.errors)
|
|
766
806
|
throw new Error(y.errors);
|
|
767
807
|
return y;
|
|
768
808
|
};
|
|
769
|
-
function
|
|
770
|
-
let
|
|
809
|
+
function jt(r) {
|
|
810
|
+
let f = 0, u = "";
|
|
771
811
|
const s = [];
|
|
772
812
|
let e = "";
|
|
773
|
-
for (let
|
|
774
|
-
const y = r[
|
|
775
|
-
|
|
813
|
+
for (let d = 0; d < r.length; d++) {
|
|
814
|
+
const y = r[d];
|
|
815
|
+
f === 0 ? y === '"' || y === "'" ? (f = 1, u = y) : y.match(/\s/) ? (e && s.push(e), e = "") : e += y : f === 1 && (y === "\\" ? (d++, e += r[d]) : y === u ? (f = 0, u = "") : e += y);
|
|
776
816
|
}
|
|
777
817
|
return e && s.push(e), s;
|
|
778
818
|
}
|
|
779
|
-
const
|
|
780
|
-
await
|
|
819
|
+
const Et = async (r, { wpCliPath: t }) => {
|
|
820
|
+
await $r(r, t), await lr(r, {
|
|
781
821
|
consts: {
|
|
782
822
|
WP_ALLOW_MULTISITE: 1
|
|
783
823
|
}
|
|
@@ -787,16 +827,16 @@ const Ot = async (r, { wpCliPath: t }) => {
|
|
|
787
827
|
let s = `The current host is ${n.host}, but WordPress multisites do not support custom ports.`;
|
|
788
828
|
throw n.hostname === "localhost" && (s += " For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."), new Error(s);
|
|
789
829
|
}
|
|
790
|
-
const
|
|
791
|
-
await
|
|
830
|
+
const f = n.pathname.replace(/\/$/, "") + "/", u = `${n.protocol}//${n.hostname}${f}`;
|
|
831
|
+
await qr(r, {
|
|
792
832
|
options: {
|
|
793
833
|
siteurl: u,
|
|
794
834
|
home: u
|
|
795
835
|
}
|
|
796
|
-
}), await
|
|
836
|
+
}), await Ar(r, {
|
|
797
837
|
command: "wp core multisite-convert"
|
|
798
838
|
});
|
|
799
|
-
},
|
|
839
|
+
}, qt = async (r, { fromPath: t, toPath: n }) => {
|
|
800
840
|
(!t.startsWith("/") || !n.startsWith("/")) && ae.error(
|
|
801
841
|
`
|
|
802
842
|
The cp() step in your Blueprint refers to a relative path.
|
|
@@ -817,7 +857,7 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
817
857
|
n,
|
|
818
858
|
await r.readFileAsBuffer(t)
|
|
819
859
|
);
|
|
820
|
-
},
|
|
860
|
+
}, $t = async (r, { fromPath: t, toPath: n }) => {
|
|
821
861
|
(!t.startsWith("/") || !n.startsWith("/")) && ae.error(
|
|
822
862
|
`
|
|
823
863
|
The mv() step in your Blueprint refers to a relative path.
|
|
@@ -835,7 +875,7 @@ Use: mv({ fromPath: '/wordpress/wp-load.php', toPath: '/wordpress/wp-loa
|
|
|
835
875
|
This will ensure your code works reliably regardless of the current working directory.
|
|
836
876
|
`.trim()
|
|
837
877
|
), t.startsWith("/") || (t = `/${t}`), n.startsWith("/") || (n = `/${n}`), await r.mv(t, n);
|
|
838
|
-
},
|
|
878
|
+
}, At = async (r, { path: t }) => {
|
|
839
879
|
t.startsWith("/") || ae.error(
|
|
840
880
|
`
|
|
841
881
|
The mkdir() step in your Blueprint refers to a relative path.
|
|
@@ -853,7 +893,7 @@ Use: mkdir({ path: '/wordpress/my-new-folder' });
|
|
|
853
893
|
This will ensure your code works reliably regardless of the current working directory.
|
|
854
894
|
`.trim()
|
|
855
895
|
), await r.mkdir(t);
|
|
856
|
-
},
|
|
896
|
+
}, Rt = async (r, { path: t }) => {
|
|
857
897
|
t.startsWith("/") || (ae.error(
|
|
858
898
|
`
|
|
859
899
|
The rmdir() step in your Blueprint refers to a relative path.
|
|
@@ -871,7 +911,7 @@ Use: rmdir({ path: '/wordpress/wp-load.php' });
|
|
|
871
911
|
This will ensure your code works reliably regardless of the current working directory.
|
|
872
912
|
`.trim()
|
|
873
913
|
), t = `/${t}`), await r.rmdir(t);
|
|
874
|
-
},
|
|
914
|
+
}, dr = async (r, { path: t, data: n }) => {
|
|
875
915
|
n instanceof File && (n = new Uint8Array(await n.arrayBuffer())), t.startsWith("/") || (ae.error(
|
|
876
916
|
`
|
|
877
917
|
The writeFile() step in your Blueprint refers to a relative path.
|
|
@@ -889,7 +929,7 @@ Use: writeFile({ path: '/wordpress/wp-load.php', data: '<?php echo "Hell
|
|
|
889
929
|
This will ensure your code works reliably regardless of the current working directory.
|
|
890
930
|
`.trim()
|
|
891
931
|
), t = `/${t}`), t.startsWith("/wordpress/wp-content/mu-plugins") && !await r.fileExists("/wordpress/wp-content/mu-plugins") && await r.mkdir("/wordpress/wp-content/mu-plugins"), await r.writeFile(t, n);
|
|
892
|
-
},
|
|
932
|
+
}, Lt = async (r, { writeToPath: t, filesTree: n }) => {
|
|
893
933
|
t.startsWith("/") || (ae.error(
|
|
894
934
|
`
|
|
895
935
|
The writeFiles() step in your Blueprint refers to a relative path.
|
|
@@ -906,20 +946,20 @@ Use: writeFiles({ writeToPath: '/wordpress/wp-content/plugins/my-plugin'
|
|
|
906
946
|
|
|
907
947
|
This will ensure your code works reliably regardless of the current working directory.
|
|
908
948
|
`.trim()
|
|
909
|
-
), t = `/${t}`), await
|
|
910
|
-
},
|
|
911
|
-
await
|
|
949
|
+
), t = `/${t}`), await nr(r, t, n.files);
|
|
950
|
+
}, Rr = async (r, { siteUrl: t }) => {
|
|
951
|
+
await lr(r, {
|
|
912
952
|
consts: {
|
|
913
953
|
WP_HOME: t,
|
|
914
954
|
WP_SITEURL: t
|
|
915
955
|
}
|
|
916
956
|
});
|
|
917
|
-
},
|
|
918
|
-
await
|
|
957
|
+
}, Ft = async (r, { file: t }, n) => {
|
|
958
|
+
await St(r, t, n);
|
|
919
959
|
};
|
|
920
|
-
async function
|
|
921
|
-
var
|
|
922
|
-
(
|
|
960
|
+
async function St(r, t, n) {
|
|
961
|
+
var f;
|
|
962
|
+
(f = n == null ? void 0 : n.tracker) == null || f.setCaption("Importing content"), await dr(r, {
|
|
923
963
|
path: "/tmp/import.wxr",
|
|
924
964
|
data: t
|
|
925
965
|
}), await r.run({
|
|
@@ -979,10 +1019,10 @@ async function Rt(r, t, n) {
|
|
|
979
1019
|
}
|
|
980
1020
|
});
|
|
981
1021
|
}
|
|
982
|
-
const
|
|
1022
|
+
const Lr = async (r, { themeSlug: t = "" }, n) => {
|
|
983
1023
|
var u;
|
|
984
1024
|
(u = n == null ? void 0 : n.tracker) == null || u.setCaption("Importing theme starter content");
|
|
985
|
-
const
|
|
1025
|
+
const f = await r.documentRoot;
|
|
986
1026
|
await r.run({
|
|
987
1027
|
code: `<?php
|
|
988
1028
|
|
|
@@ -1019,7 +1059,7 @@ const $r = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1019
1059
|
}
|
|
1020
1060
|
playground_add_filter( 'plugins_loaded', 'importThemeStarterContent_plugins_loaded', 0 );
|
|
1021
1061
|
|
|
1022
|
-
require ${he(
|
|
1062
|
+
require ${he(f)} . '/wp-load.php';
|
|
1023
1063
|
|
|
1024
1064
|
// Return early if there's no starter content.
|
|
1025
1065
|
if ( ! get_theme_starter_content() ) {
|
|
@@ -1033,15 +1073,15 @@ const $r = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1033
1073
|
wp_publish_post( $wp_customize->changeset_post_id() );
|
|
1034
1074
|
`
|
|
1035
1075
|
});
|
|
1036
|
-
},
|
|
1076
|
+
}, ur = async (r, { zipFile: t, zipPath: n, extractToPath: f }) => {
|
|
1037
1077
|
if (n)
|
|
1038
1078
|
ae.warn(
|
|
1039
1079
|
'The "zipPath" option of the unzip() Blueprint step is deprecated and will be removed. Use "zipFile" instead.'
|
|
1040
1080
|
);
|
|
1041
1081
|
else if (!t)
|
|
1042
1082
|
throw new Error("Either zipPath or zipFile must be provided");
|
|
1043
|
-
await
|
|
1044
|
-
},
|
|
1083
|
+
await Pr(r, t || n, f);
|
|
1084
|
+
}, Fr = [
|
|
1045
1085
|
"db.php",
|
|
1046
1086
|
"plugins/akismet",
|
|
1047
1087
|
"plugins/hello.php",
|
|
@@ -1062,43 +1102,43 @@ const $r = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1062
1102
|
"themes/twentytwentyfour",
|
|
1063
1103
|
"themes/twentytwentyfive",
|
|
1064
1104
|
"themes/twentytwentysix"
|
|
1065
|
-
],
|
|
1066
|
-
const
|
|
1105
|
+
], Nt = async (r, { wordPressFilesZip: t, pathInZip: n = "" }) => {
|
|
1106
|
+
const f = await r.documentRoot;
|
|
1067
1107
|
let u = ie("/tmp", "import");
|
|
1068
|
-
await r.mkdir(u), await
|
|
1108
|
+
await r.mkdir(u), await ur(r, {
|
|
1069
1109
|
zipFile: t,
|
|
1070
1110
|
extractToPath: u
|
|
1071
1111
|
}), u = ie(u, n);
|
|
1072
|
-
const s = ie(u, "wp-content"), e = ie(
|
|
1073
|
-
for (const F of
|
|
1112
|
+
const s = ie(u, "wp-content"), e = ie(f, "wp-content");
|
|
1113
|
+
for (const F of Fr) {
|
|
1074
1114
|
const T = ie(
|
|
1075
1115
|
s,
|
|
1076
1116
|
F
|
|
1077
1117
|
);
|
|
1078
|
-
await
|
|
1118
|
+
await mr(r, T);
|
|
1079
1119
|
const _ = ie(e, F);
|
|
1080
|
-
await r.fileExists(_) && (await r.mkdir(
|
|
1120
|
+
await r.fileExists(_) && (await r.mkdir(gr(T)), await r.mv(_, T));
|
|
1081
1121
|
}
|
|
1082
|
-
const
|
|
1122
|
+
const d = ie(
|
|
1083
1123
|
u,
|
|
1084
1124
|
"wp-content",
|
|
1085
1125
|
"database"
|
|
1086
1126
|
);
|
|
1087
|
-
await r.fileExists(
|
|
1088
|
-
ie(
|
|
1089
|
-
|
|
1127
|
+
await r.fileExists(d) || await r.mv(
|
|
1128
|
+
ie(f, "wp-content", "database"),
|
|
1129
|
+
d
|
|
1090
1130
|
);
|
|
1091
1131
|
const y = await r.listFiles(u);
|
|
1092
1132
|
for (const F of y)
|
|
1093
|
-
await
|
|
1133
|
+
await mr(r, ie(f, F)), await r.mv(
|
|
1094
1134
|
ie(u, F),
|
|
1095
|
-
ie(
|
|
1135
|
+
ie(f, F)
|
|
1096
1136
|
);
|
|
1097
|
-
await r.rmdir(u), await
|
|
1137
|
+
await r.rmdir(u), await rt(r, f), await Rr(r, {
|
|
1098
1138
|
siteUrl: await r.absoluteUrl
|
|
1099
1139
|
});
|
|
1100
1140
|
const N = he(
|
|
1101
|
-
ie(
|
|
1141
|
+
ie(f, "wp-admin", "upgrade.php")
|
|
1102
1142
|
);
|
|
1103
1143
|
await r.run({
|
|
1104
1144
|
code: `<?php
|
|
@@ -1107,27 +1147,27 @@ const $r = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1107
1147
|
`
|
|
1108
1148
|
});
|
|
1109
1149
|
};
|
|
1110
|
-
async function
|
|
1150
|
+
async function mr(r, t) {
|
|
1111
1151
|
await r.fileExists(t) && (await r.isDir(t) ? await r.rmdir(t) : await r.unlink(t));
|
|
1112
1152
|
}
|
|
1113
|
-
async function
|
|
1153
|
+
async function xt(r) {
|
|
1114
1154
|
const t = await r.request({
|
|
1115
1155
|
url: "/wp-admin/export.php?download=true&content=all"
|
|
1116
1156
|
});
|
|
1117
1157
|
return new File([t.bytes], "export.xml");
|
|
1118
1158
|
}
|
|
1119
|
-
async function
|
|
1159
|
+
async function Sr(r, {
|
|
1120
1160
|
targetPath: t,
|
|
1121
1161
|
zipFile: n,
|
|
1122
|
-
ifAlreadyInstalled:
|
|
1162
|
+
ifAlreadyInstalled: f = "overwrite",
|
|
1123
1163
|
targetFolderName: u = ""
|
|
1124
1164
|
}) {
|
|
1125
|
-
const e = n.name.replace(/\.zip$/, ""),
|
|
1165
|
+
const e = n.name.replace(/\.zip$/, ""), d = ie(await r.documentRoot, "wp-content"), y = ie(d, br()), N = ie(y, "assets", e);
|
|
1126
1166
|
await r.fileExists(N) && await r.rmdir(y, {
|
|
1127
1167
|
recursive: !0
|
|
1128
1168
|
}), await r.mkdir(y);
|
|
1129
1169
|
try {
|
|
1130
|
-
await
|
|
1170
|
+
await ur(r, {
|
|
1131
1171
|
zipFile: n,
|
|
1132
1172
|
extractToPath: N
|
|
1133
1173
|
});
|
|
@@ -1144,18 +1184,18 @@ async function Rr(r, {
|
|
|
1144
1184
|
throw new Error(
|
|
1145
1185
|
`Cannot install asset ${_} to ${$} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`
|
|
1146
1186
|
);
|
|
1147
|
-
if (
|
|
1187
|
+
if (f === "overwrite")
|
|
1148
1188
|
await r.rmdir($, {
|
|
1149
1189
|
recursive: !0
|
|
1150
1190
|
});
|
|
1151
1191
|
else {
|
|
1152
|
-
if (
|
|
1192
|
+
if (f === "skip")
|
|
1153
1193
|
return {
|
|
1154
1194
|
assetFolderPath: $,
|
|
1155
1195
|
assetFolderName: _
|
|
1156
1196
|
};
|
|
1157
1197
|
throw new Error(
|
|
1158
|
-
`Cannot install asset ${_} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${
|
|
1198
|
+
`Cannot install asset ${_} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${f}`
|
|
1159
1199
|
);
|
|
1160
1200
|
}
|
|
1161
1201
|
}
|
|
@@ -1169,7 +1209,7 @@ async function Rr(r, {
|
|
|
1169
1209
|
});
|
|
1170
1210
|
}
|
|
1171
1211
|
}
|
|
1172
|
-
const
|
|
1212
|
+
const Dt = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: f, options: u = {} }, s) => {
|
|
1173
1213
|
n && (t = n, ae.warn(
|
|
1174
1214
|
'The "pluginZipFile" option is deprecated. Use "pluginData" instead.'
|
|
1175
1215
|
));
|
|
@@ -1177,7 +1217,7 @@ const St = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: d, o
|
|
|
1177
1217
|
await r.documentRoot,
|
|
1178
1218
|
"wp-content",
|
|
1179
1219
|
"plugins"
|
|
1180
|
-
),
|
|
1220
|
+
), d = "targetFolderName" in u ? u.targetFolderName : "";
|
|
1181
1221
|
let y = "", N = "";
|
|
1182
1222
|
const F = async (_) => {
|
|
1183
1223
|
if (_.name.toLowerCase().endsWith(".zip"))
|
|
@@ -1188,14 +1228,14 @@ const St = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: d, o
|
|
|
1188
1228
|
if (t instanceof File)
|
|
1189
1229
|
if (await F(t)) {
|
|
1190
1230
|
const _ = t.name.split("/").pop() || "plugin.zip";
|
|
1191
|
-
N =
|
|
1231
|
+
N = tr(_), s == null || s.tracker.setCaption(
|
|
1192
1232
|
`Installing the ${N} plugin`
|
|
1193
1233
|
);
|
|
1194
|
-
const k = await
|
|
1195
|
-
ifAlreadyInstalled:
|
|
1234
|
+
const k = await Sr(r, {
|
|
1235
|
+
ifAlreadyInstalled: f,
|
|
1196
1236
|
zipFile: t,
|
|
1197
1237
|
targetPath: `${await r.documentRoot}/wp-content/plugins`,
|
|
1198
|
-
targetFolderName:
|
|
1238
|
+
targetFolderName: d
|
|
1199
1239
|
});
|
|
1200
1240
|
y = k.assetFolderPath, N = k.assetFolderName;
|
|
1201
1241
|
} else if (t.name.endsWith(".php")) {
|
|
@@ -1203,7 +1243,7 @@ const St = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: d, o
|
|
|
1203
1243
|
e,
|
|
1204
1244
|
t.name
|
|
1205
1245
|
);
|
|
1206
|
-
await
|
|
1246
|
+
await dr(r, {
|
|
1207
1247
|
path: _,
|
|
1208
1248
|
data: t
|
|
1209
1249
|
}), y = e, N = t.name;
|
|
@@ -1215,13 +1255,13 @@ const St = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: d, o
|
|
|
1215
1255
|
N = t.name, s == null || s.tracker.setCaption(`Installing the ${N} plugin`);
|
|
1216
1256
|
const _ = ie(
|
|
1217
1257
|
e,
|
|
1218
|
-
|
|
1258
|
+
d || t.name
|
|
1219
1259
|
);
|
|
1220
|
-
await
|
|
1260
|
+
await nr(r, _, t.files, {
|
|
1221
1261
|
rmRoot: !0
|
|
1222
1262
|
}), y = _;
|
|
1223
1263
|
}
|
|
1224
|
-
("activate" in u ? u.activate : !0) && await
|
|
1264
|
+
("activate" in u ? u.activate : !0) && await Tr(
|
|
1225
1265
|
r,
|
|
1226
1266
|
{
|
|
1227
1267
|
pluginPath: y,
|
|
@@ -1229,54 +1269,54 @@ const St = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: d, o
|
|
|
1229
1269
|
},
|
|
1230
1270
|
s
|
|
1231
1271
|
);
|
|
1232
|
-
},
|
|
1272
|
+
}, Ct = async (r, { themeData: t, themeZipFile: n, ifAlreadyInstalled: f, options: u = {} }, s) => {
|
|
1233
1273
|
n && (t = n, ae.warn(
|
|
1234
1274
|
'The "themeZipFile" option is deprecated. Use "themeData" instead.'
|
|
1235
1275
|
));
|
|
1236
1276
|
const e = "targetFolderName" in u ? u.targetFolderName : "";
|
|
1237
|
-
let
|
|
1277
|
+
let d = "", y = "";
|
|
1238
1278
|
if (t instanceof File) {
|
|
1239
1279
|
const T = t.name.split("/").pop() || "theme.zip";
|
|
1240
|
-
y =
|
|
1241
|
-
ifAlreadyInstalled:
|
|
1280
|
+
y = tr(T), s == null || s.tracker.setCaption(`Installing the ${y} theme`), d = (await Sr(r, {
|
|
1281
|
+
ifAlreadyInstalled: f,
|
|
1242
1282
|
zipFile: t,
|
|
1243
1283
|
targetPath: `${await r.documentRoot}/wp-content/themes`,
|
|
1244
1284
|
targetFolderName: e
|
|
1245
1285
|
})).assetFolderName;
|
|
1246
1286
|
} else {
|
|
1247
|
-
y = t.name,
|
|
1287
|
+
y = t.name, d = e || y, s == null || s.tracker.setCaption(`Installing the ${y} theme`);
|
|
1248
1288
|
const T = ie(
|
|
1249
1289
|
await r.documentRoot,
|
|
1250
1290
|
"wp-content",
|
|
1251
1291
|
"themes",
|
|
1252
|
-
|
|
1292
|
+
d
|
|
1253
1293
|
);
|
|
1254
|
-
await
|
|
1294
|
+
await nr(r, T, t.files, {
|
|
1255
1295
|
rmRoot: !0
|
|
1256
1296
|
});
|
|
1257
1297
|
}
|
|
1258
|
-
("activate" in u ? u.activate : !0) && await
|
|
1298
|
+
("activate" in u ? u.activate : !0) && await jr(
|
|
1259
1299
|
r,
|
|
1260
1300
|
{
|
|
1261
|
-
themeFolderName:
|
|
1301
|
+
themeFolderName: d
|
|
1262
1302
|
},
|
|
1263
1303
|
s
|
|
1264
|
-
), ("importStarterContent" in u ? u.importStarterContent : !1) && await
|
|
1304
|
+
), ("importStarterContent" in u ? u.importStarterContent : !1) && await Lr(
|
|
1265
1305
|
r,
|
|
1266
1306
|
{
|
|
1267
|
-
themeSlug:
|
|
1307
|
+
themeSlug: d
|
|
1268
1308
|
},
|
|
1269
1309
|
s
|
|
1270
1310
|
);
|
|
1271
|
-
},
|
|
1311
|
+
}, It = async (r, { username: t = "admin" } = {}, n) => {
|
|
1272
1312
|
n == null || n.tracker.setCaption((n == null ? void 0 : n.initialCaption) || "Logging in"), r.defineConstant("PLAYGROUND_AUTO_LOGIN_AS_USER", t);
|
|
1273
|
-
},
|
|
1313
|
+
}, Wt = async (r, t, n) => {
|
|
1274
1314
|
var u;
|
|
1275
1315
|
(u = n == null ? void 0 : n.tracker) == null || u.setCaption("Resetting WordPress data");
|
|
1276
|
-
const
|
|
1316
|
+
const f = await r.documentRoot;
|
|
1277
1317
|
await r.run({
|
|
1278
1318
|
env: {
|
|
1279
|
-
DOCROOT:
|
|
1319
|
+
DOCROOT: f
|
|
1280
1320
|
},
|
|
1281
1321
|
code: `<?php
|
|
1282
1322
|
require getenv('DOCROOT') . '/wp-load.php';
|
|
@@ -1294,7 +1334,7 @@ const St = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: d, o
|
|
|
1294
1334
|
$GLOBALS['@pdo']->query("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='wp_commentmeta'");
|
|
1295
1335
|
`
|
|
1296
1336
|
});
|
|
1297
|
-
},
|
|
1337
|
+
}, Ut = async (r, { options: t }) => {
|
|
1298
1338
|
await r.request({
|
|
1299
1339
|
url: "/wp-admin/install.php?step=2",
|
|
1300
1340
|
method: "POST",
|
|
@@ -1311,24 +1351,24 @@ const St = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: d, o
|
|
|
1311
1351
|
admin_email: "admin@localhost.com"
|
|
1312
1352
|
}
|
|
1313
1353
|
});
|
|
1314
|
-
},
|
|
1315
|
-
const n = "/tmp/wordpress-playground.zip",
|
|
1316
|
-
let s =
|
|
1354
|
+
}, Bt = async (r, { selfContained: t = !1 } = {}) => {
|
|
1355
|
+
const n = "/tmp/wordpress-playground.zip", f = await r.documentRoot, u = ie(f, "wp-content");
|
|
1356
|
+
let s = Fr;
|
|
1317
1357
|
t && (s = s.filter((y) => !y.startsWith("themes/twenty")).filter(
|
|
1318
1358
|
(y) => y !== "mu-plugins/sqlite-database-integration"
|
|
1319
1359
|
));
|
|
1320
|
-
const e =
|
|
1360
|
+
const e = wr({
|
|
1321
1361
|
zipPath: n,
|
|
1322
1362
|
wpContentPath: u,
|
|
1323
|
-
documentRoot:
|
|
1363
|
+
documentRoot: f,
|
|
1324
1364
|
exceptPaths: s.map(
|
|
1325
|
-
(y) => ie(
|
|
1365
|
+
(y) => ie(f, "wp-content", y)
|
|
1326
1366
|
),
|
|
1327
1367
|
additionalPaths: t ? {
|
|
1328
|
-
[ie(
|
|
1368
|
+
[ie(f, "wp-config.php")]: "wp-config.php"
|
|
1329
1369
|
} : {}
|
|
1330
1370
|
});
|
|
1331
|
-
await
|
|
1371
|
+
await zt(
|
|
1332
1372
|
r,
|
|
1333
1373
|
`zipDir(${e.wpContentPath}, ${e.zipPath}, array(
|
|
1334
1374
|
'exclude_paths' => ${e.exceptPaths},
|
|
@@ -1336,9 +1376,9 @@ const St = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: d, o
|
|
|
1336
1376
|
'additional_paths' => ${e.additionalPaths}
|
|
1337
1377
|
));`
|
|
1338
1378
|
);
|
|
1339
|
-
const
|
|
1340
|
-
return r.unlink(n),
|
|
1341
|
-
},
|
|
1379
|
+
const d = await r.readFileAsBuffer(n);
|
|
1380
|
+
return r.unlink(n), d;
|
|
1381
|
+
}, Mt = `<?php
|
|
1342
1382
|
|
|
1343
1383
|
function zipDir($root, $output, $options = array())
|
|
1344
1384
|
{
|
|
@@ -1399,12 +1439,12 @@ function join_paths()
|
|
|
1399
1439
|
return preg_replace('#/+#', '/', join('/', $paths));
|
|
1400
1440
|
}
|
|
1401
1441
|
`;
|
|
1402
|
-
async function
|
|
1442
|
+
async function zt(r, t) {
|
|
1403
1443
|
return await r.run({
|
|
1404
|
-
code:
|
|
1444
|
+
code: Mt + t
|
|
1405
1445
|
});
|
|
1406
1446
|
}
|
|
1407
|
-
const
|
|
1447
|
+
const Vt = async (r, t) => {
|
|
1408
1448
|
const u = (await (await fetch(
|
|
1409
1449
|
`https://api.wordpress.org/translations/core/1.0/?version=${r}`
|
|
1410
1450
|
)).json()).translations.find(
|
|
@@ -1415,22 +1455,22 @@ const Mt = async (r, t) => {
|
|
|
1415
1455
|
`Failed to get ${t} translation package for WordPress ${r}.`
|
|
1416
1456
|
);
|
|
1417
1457
|
return u.package;
|
|
1418
|
-
},
|
|
1458
|
+
}, Ht = async (r, { language: t }, n) => {
|
|
1419
1459
|
n == null || n.tracker.setCaption((n == null ? void 0 : n.initialCaption) || "Translating"), await r.defineConstant("WPLANG", t);
|
|
1420
|
-
const
|
|
1460
|
+
const f = await r.documentRoot, u = (await r.run({
|
|
1421
1461
|
code: `<?php
|
|
1422
|
-
require '${
|
|
1462
|
+
require '${f}/wp-includes/version.php';
|
|
1423
1463
|
echo $wp_version;
|
|
1424
1464
|
`
|
|
1425
1465
|
})).text, s = [
|
|
1426
1466
|
{
|
|
1427
|
-
url: await
|
|
1467
|
+
url: await Vt(u, t),
|
|
1428
1468
|
type: "core"
|
|
1429
1469
|
}
|
|
1430
|
-
],
|
|
1470
|
+
], d = (await r.run({
|
|
1431
1471
|
code: `<?php
|
|
1432
|
-
require_once('${
|
|
1433
|
-
require_once('${
|
|
1472
|
+
require_once('${f}/wp-load.php');
|
|
1473
|
+
require_once('${f}/wp-admin/includes/plugin.php');
|
|
1434
1474
|
echo json_encode(
|
|
1435
1475
|
array_values(
|
|
1436
1476
|
array_map(
|
|
@@ -1450,15 +1490,15 @@ const Mt = async (r, t) => {
|
|
|
1450
1490
|
)
|
|
1451
1491
|
);`
|
|
1452
1492
|
})).json;
|
|
1453
|
-
for (const { slug: _, version: k } of
|
|
1493
|
+
for (const { slug: _, version: k } of d)
|
|
1454
1494
|
s.push({
|
|
1455
1495
|
url: `https://downloads.wordpress.org/translation/plugin/${_}/${k}/${t}.zip`,
|
|
1456
1496
|
type: "plugin"
|
|
1457
1497
|
});
|
|
1458
1498
|
const N = (await r.run({
|
|
1459
1499
|
code: `<?php
|
|
1460
|
-
require_once('${
|
|
1461
|
-
require_once('${
|
|
1500
|
+
require_once('${f}/wp-load.php');
|
|
1501
|
+
require_once('${f}/wp-admin/includes/theme.php');
|
|
1462
1502
|
echo json_encode(
|
|
1463
1503
|
array_values(
|
|
1464
1504
|
array_map(
|
|
@@ -1478,8 +1518,8 @@ const Mt = async (r, t) => {
|
|
|
1478
1518
|
url: `https://downloads.wordpress.org/translation/theme/${_}/${k}/${t}.zip`,
|
|
1479
1519
|
type: "theme"
|
|
1480
1520
|
});
|
|
1481
|
-
await r.isDir(`${
|
|
1482
|
-
const F = new
|
|
1521
|
+
await r.isDir(`${f}/wp-content/languages/plugins`) || await r.mkdir(`${f}/wp-content/languages/plugins`), await r.isDir(`${f}/wp-content/languages/themes`) || await r.mkdir(`${f}/wp-content/languages/themes`);
|
|
1522
|
+
const F = new vr({ concurrency: 5 }), T = s.map(
|
|
1483
1523
|
({ url: _, type: k }) => F.run(async () => {
|
|
1484
1524
|
try {
|
|
1485
1525
|
const $ = await fetch(_);
|
|
@@ -1487,8 +1527,8 @@ const Mt = async (r, t) => {
|
|
|
1487
1527
|
throw new Error(
|
|
1488
1528
|
`Failed to download translations for ${k}: ${$.statusText}`
|
|
1489
1529
|
);
|
|
1490
|
-
let m = `${
|
|
1491
|
-
k === "plugin" ? m += "/plugins" : k === "theme" && (m += "/themes"), await
|
|
1530
|
+
let m = `${f}/wp-content/languages`;
|
|
1531
|
+
k === "plugin" ? m += "/plugins" : k === "theme" && (m += "/themes"), await Pr(
|
|
1492
1532
|
r,
|
|
1493
1533
|
new File(
|
|
1494
1534
|
[await $.blob()],
|
|
@@ -1508,40 +1548,40 @@ const Mt = async (r, t) => {
|
|
|
1508
1548
|
})
|
|
1509
1549
|
);
|
|
1510
1550
|
await Promise.all(T);
|
|
1511
|
-
},
|
|
1551
|
+
}, Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1512
1552
|
__proto__: null,
|
|
1513
|
-
activatePlugin:
|
|
1514
|
-
activateTheme:
|
|
1515
|
-
cp:
|
|
1516
|
-
defineSiteUrl:
|
|
1517
|
-
defineWpConfigConsts:
|
|
1518
|
-
enableMultisite:
|
|
1519
|
-
exportWXR:
|
|
1520
|
-
importThemeStarterContent:
|
|
1521
|
-
importWordPressFiles:
|
|
1522
|
-
importWxr:
|
|
1523
|
-
installPlugin:
|
|
1524
|
-
installTheme:
|
|
1525
|
-
login:
|
|
1526
|
-
mkdir:
|
|
1527
|
-
mv:
|
|
1528
|
-
request:
|
|
1529
|
-
resetData:
|
|
1530
|
-
rm:
|
|
1531
|
-
rmdir:
|
|
1532
|
-
runPHP:
|
|
1533
|
-
runPHPWithOptions:
|
|
1534
|
-
runSql:
|
|
1535
|
-
runWpInstallationWizard:
|
|
1536
|
-
setSiteLanguage:
|
|
1537
|
-
setSiteOptions:
|
|
1538
|
-
unzip:
|
|
1539
|
-
updateUserMeta:
|
|
1540
|
-
wpCLI:
|
|
1541
|
-
writeFile:
|
|
1542
|
-
writeFiles:
|
|
1543
|
-
zipWpContent:
|
|
1544
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1553
|
+
activatePlugin: Tr,
|
|
1554
|
+
activateTheme: jr,
|
|
1555
|
+
cp: qt,
|
|
1556
|
+
defineSiteUrl: Rr,
|
|
1557
|
+
defineWpConfigConsts: lr,
|
|
1558
|
+
enableMultisite: Et,
|
|
1559
|
+
exportWXR: xt,
|
|
1560
|
+
importThemeStarterContent: Lr,
|
|
1561
|
+
importWordPressFiles: Nt,
|
|
1562
|
+
importWxr: Ft,
|
|
1563
|
+
installPlugin: Dt,
|
|
1564
|
+
installTheme: Ct,
|
|
1565
|
+
login: It,
|
|
1566
|
+
mkdir: At,
|
|
1567
|
+
mv: $t,
|
|
1568
|
+
request: _t,
|
|
1569
|
+
resetData: Wt,
|
|
1570
|
+
rm: Er,
|
|
1571
|
+
rmdir: Rt,
|
|
1572
|
+
runPHP: wt,
|
|
1573
|
+
runPHPWithOptions: vt,
|
|
1574
|
+
runSql: Pt,
|
|
1575
|
+
runWpInstallationWizard: Ut,
|
|
1576
|
+
setSiteLanguage: Ht,
|
|
1577
|
+
setSiteOptions: qr,
|
|
1578
|
+
unzip: ur,
|
|
1579
|
+
updateUserMeta: Ot,
|
|
1580
|
+
wpCLI: Ar,
|
|
1581
|
+
writeFile: dr,
|
|
1582
|
+
writeFiles: Lt,
|
|
1583
|
+
zipWpContent: Bt
|
|
1584
|
+
}, Symbol.toStringTag, { value: "Module" })), Yt = {
|
|
1545
1585
|
properties: {
|
|
1546
1586
|
landingPage: {
|
|
1547
1587
|
type: "string",
|
|
@@ -1667,26 +1707,26 @@ const Mt = async (r, t) => {
|
|
|
1667
1707
|
},
|
|
1668
1708
|
$schema: { type: "string" }
|
|
1669
1709
|
}
|
|
1670
|
-
},
|
|
1710
|
+
}, Gt = {
|
|
1671
1711
|
enum: ["8.4", "8.3", "8.2", "8.1", "8.0", "7.4", "7.3", "7.2"]
|
|
1672
|
-
},
|
|
1712
|
+
}, Qt = {
|
|
1673
1713
|
additionalProperties: { type: ["string", "boolean", "number"] }
|
|
1674
|
-
},
|
|
1675
|
-
function X(r, { instancePath: t = "", parentData: n, parentDataProperty:
|
|
1714
|
+
}, Nr = Object.prototype.hasOwnProperty;
|
|
1715
|
+
function X(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: u = r } = {}) {
|
|
1676
1716
|
let s = null, e = 0;
|
|
1677
|
-
const
|
|
1717
|
+
const d = e;
|
|
1678
1718
|
let y = !1;
|
|
1679
1719
|
const N = e;
|
|
1680
1720
|
if (e === e)
|
|
1681
1721
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
1682
|
-
let
|
|
1683
|
-
if (r.resource === void 0 && (
|
|
1722
|
+
let B;
|
|
1723
|
+
if (r.resource === void 0 && (B = "resource") || r.path === void 0 && (B = "path")) {
|
|
1684
1724
|
const re = {
|
|
1685
1725
|
instancePath: t,
|
|
1686
1726
|
schemaPath: "#/definitions/VFSReference/required",
|
|
1687
1727
|
keyword: "required",
|
|
1688
|
-
params: { missingProperty:
|
|
1689
|
-
message: "must have required property '" +
|
|
1728
|
+
params: { missingProperty: B },
|
|
1729
|
+
message: "must have required property '" + B + "'"
|
|
1690
1730
|
};
|
|
1691
1731
|
s === null ? s = [re] : s.push(re), e++;
|
|
1692
1732
|
} else {
|
|
@@ -1749,18 +1789,18 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
1749
1789
|
}
|
|
1750
1790
|
}
|
|
1751
1791
|
} else {
|
|
1752
|
-
const
|
|
1792
|
+
const B = {
|
|
1753
1793
|
instancePath: t,
|
|
1754
1794
|
schemaPath: "#/definitions/VFSReference/type",
|
|
1755
1795
|
keyword: "type",
|
|
1756
1796
|
params: { type: "object" },
|
|
1757
1797
|
message: "must be object"
|
|
1758
1798
|
};
|
|
1759
|
-
s === null ? s = [
|
|
1799
|
+
s === null ? s = [B] : s.push(B), e++;
|
|
1760
1800
|
}
|
|
1761
1801
|
var _ = N === e;
|
|
1762
1802
|
if (y = y || _, !y) {
|
|
1763
|
-
const
|
|
1803
|
+
const B = e;
|
|
1764
1804
|
if (e === e)
|
|
1765
1805
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
1766
1806
|
let S;
|
|
@@ -1865,15 +1905,15 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
1865
1905
|
s === null ? s = [U] : s.push(U), e++;
|
|
1866
1906
|
} else {
|
|
1867
1907
|
const U = e;
|
|
1868
|
-
for (const
|
|
1869
|
-
if (!(
|
|
1870
|
-
let I = w[
|
|
1908
|
+
for (const C in w)
|
|
1909
|
+
if (!(C === "BYTES_PER_ELEMENT" || C === "buffer" || C === "byteLength" || C === "byteOffset" || C === "length")) {
|
|
1910
|
+
let I = w[C];
|
|
1871
1911
|
const ee = e;
|
|
1872
1912
|
if (!(typeof I == "number" && isFinite(
|
|
1873
1913
|
I
|
|
1874
1914
|
))) {
|
|
1875
1915
|
const A = {
|
|
1876
|
-
instancePath: t + "/contents/" +
|
|
1916
|
+
instancePath: t + "/contents/" + C.replace(
|
|
1877
1917
|
/~/g,
|
|
1878
1918
|
"~0"
|
|
1879
1919
|
).replace(
|
|
@@ -1899,10 +1939,10 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
1899
1939
|
}
|
|
1900
1940
|
if (U === e) {
|
|
1901
1941
|
if (w.BYTES_PER_ELEMENT !== void 0) {
|
|
1902
|
-
let
|
|
1942
|
+
let C = w.BYTES_PER_ELEMENT;
|
|
1903
1943
|
const I = e;
|
|
1904
|
-
if (!(typeof
|
|
1905
|
-
|
|
1944
|
+
if (!(typeof C == "number" && isFinite(
|
|
1945
|
+
C
|
|
1906
1946
|
))) {
|
|
1907
1947
|
const ee = {
|
|
1908
1948
|
instancePath: t + "/contents/BYTES_PER_ELEMENT",
|
|
@@ -1924,14 +1964,14 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
1924
1964
|
var W = !0;
|
|
1925
1965
|
if (W) {
|
|
1926
1966
|
if (w.buffer !== void 0) {
|
|
1927
|
-
let
|
|
1967
|
+
let C = w.buffer;
|
|
1928
1968
|
const I = e;
|
|
1929
1969
|
if (e === I)
|
|
1930
|
-
if (
|
|
1931
|
-
|
|
1970
|
+
if (C && typeof C == "object" && !Array.isArray(
|
|
1971
|
+
C
|
|
1932
1972
|
)) {
|
|
1933
1973
|
let A;
|
|
1934
|
-
if (
|
|
1974
|
+
if (C.byteLength === void 0 && (A = "byteLength")) {
|
|
1935
1975
|
const Z = {
|
|
1936
1976
|
instancePath: t + "/contents/buffer",
|
|
1937
1977
|
schemaPath: "#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",
|
|
@@ -1948,14 +1988,14 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
1948
1988
|
), e++;
|
|
1949
1989
|
} else {
|
|
1950
1990
|
const Z = e;
|
|
1951
|
-
for (const
|
|
1952
|
-
if (
|
|
1991
|
+
for (const M in C)
|
|
1992
|
+
if (M !== "byteLength") {
|
|
1953
1993
|
const V = {
|
|
1954
1994
|
instancePath: t + "/contents/buffer",
|
|
1955
1995
|
schemaPath: "#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",
|
|
1956
1996
|
keyword: "additionalProperties",
|
|
1957
1997
|
params: {
|
|
1958
|
-
additionalProperty:
|
|
1998
|
+
additionalProperty: M
|
|
1959
1999
|
},
|
|
1960
2000
|
message: "must NOT have additional properties"
|
|
1961
2001
|
};
|
|
@@ -1966,10 +2006,10 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
1966
2006
|
), e++;
|
|
1967
2007
|
break;
|
|
1968
2008
|
}
|
|
1969
|
-
if (Z === e &&
|
|
1970
|
-
let
|
|
1971
|
-
if (!(typeof
|
|
1972
|
-
|
|
2009
|
+
if (Z === e && C.byteLength !== void 0) {
|
|
2010
|
+
let M = C.byteLength;
|
|
2011
|
+
if (!(typeof M == "number" && isFinite(
|
|
2012
|
+
M
|
|
1973
2013
|
))) {
|
|
1974
2014
|
const V = {
|
|
1975
2015
|
instancePath: t + "/contents/buffer/byteLength",
|
|
@@ -2009,10 +2049,10 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2009
2049
|
var W = !0;
|
|
2010
2050
|
if (W) {
|
|
2011
2051
|
if (w.byteLength !== void 0) {
|
|
2012
|
-
let
|
|
2052
|
+
let C = w.byteLength;
|
|
2013
2053
|
const I = e;
|
|
2014
|
-
if (!(typeof
|
|
2015
|
-
|
|
2054
|
+
if (!(typeof C == "number" && isFinite(
|
|
2055
|
+
C
|
|
2016
2056
|
))) {
|
|
2017
2057
|
const A = {
|
|
2018
2058
|
instancePath: t + "/contents/byteLength",
|
|
@@ -2034,10 +2074,10 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2034
2074
|
var W = !0;
|
|
2035
2075
|
if (W) {
|
|
2036
2076
|
if (w.byteOffset !== void 0) {
|
|
2037
|
-
let
|
|
2077
|
+
let C = w.byteOffset;
|
|
2038
2078
|
const I = e;
|
|
2039
|
-
if (!(typeof
|
|
2040
|
-
|
|
2079
|
+
if (!(typeof C == "number" && isFinite(
|
|
2080
|
+
C
|
|
2041
2081
|
))) {
|
|
2042
2082
|
const A = {
|
|
2043
2083
|
instancePath: t + "/contents/byteOffset",
|
|
@@ -2059,10 +2099,10 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2059
2099
|
var W = !0;
|
|
2060
2100
|
if (W)
|
|
2061
2101
|
if (w.length !== void 0) {
|
|
2062
|
-
let
|
|
2102
|
+
let C = w.length;
|
|
2063
2103
|
const I = e;
|
|
2064
|
-
if (!(typeof
|
|
2065
|
-
|
|
2104
|
+
if (!(typeof C == "number" && isFinite(
|
|
2105
|
+
C
|
|
2066
2106
|
))) {
|
|
2067
2107
|
const A = {
|
|
2068
2108
|
instancePath: t + "/contents/length",
|
|
@@ -2128,7 +2168,7 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2128
2168
|
};
|
|
2129
2169
|
s === null ? s = [S] : s.push(S), e++;
|
|
2130
2170
|
}
|
|
2131
|
-
var _ =
|
|
2171
|
+
var _ = B === e;
|
|
2132
2172
|
if (y = y || _, !y) {
|
|
2133
2173
|
const S = e;
|
|
2134
2174
|
if (e === e)
|
|
@@ -2233,20 +2273,20 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2233
2273
|
const q = e;
|
|
2234
2274
|
for (const R in r)
|
|
2235
2275
|
if (!(R === "resource" || R === "slug")) {
|
|
2236
|
-
const
|
|
2276
|
+
const D = {
|
|
2237
2277
|
instancePath: t,
|
|
2238
2278
|
schemaPath: "#/definitions/CorePluginReference/additionalProperties",
|
|
2239
2279
|
keyword: "additionalProperties",
|
|
2240
2280
|
params: { additionalProperty: R },
|
|
2241
2281
|
message: "must NOT have additional properties"
|
|
2242
2282
|
};
|
|
2243
|
-
s === null ? s = [
|
|
2283
|
+
s === null ? s = [D] : s.push(D), e++;
|
|
2244
2284
|
break;
|
|
2245
2285
|
}
|
|
2246
2286
|
if (q === e) {
|
|
2247
2287
|
if (r.resource !== void 0) {
|
|
2248
2288
|
let R = r.resource;
|
|
2249
|
-
const
|
|
2289
|
+
const D = e;
|
|
2250
2290
|
if (typeof R != "string") {
|
|
2251
2291
|
const L = {
|
|
2252
2292
|
instancePath: t + "/resource",
|
|
@@ -2269,7 +2309,7 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2269
2309
|
};
|
|
2270
2310
|
s === null ? s = [L] : s.push(L), e++;
|
|
2271
2311
|
}
|
|
2272
|
-
var Y =
|
|
2312
|
+
var Y = D === e;
|
|
2273
2313
|
} else
|
|
2274
2314
|
var Y = !0;
|
|
2275
2315
|
if (Y)
|
|
@@ -2305,21 +2345,21 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2305
2345
|
const b = e;
|
|
2306
2346
|
if (e === e)
|
|
2307
2347
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
2308
|
-
let
|
|
2309
|
-
if (r.resource === void 0 && (
|
|
2348
|
+
let D;
|
|
2349
|
+
if (r.resource === void 0 && (D = "resource") || r.url === void 0 && (D = "url")) {
|
|
2310
2350
|
const L = {
|
|
2311
2351
|
instancePath: t,
|
|
2312
2352
|
schemaPath: "#/definitions/UrlReference/required",
|
|
2313
2353
|
keyword: "required",
|
|
2314
|
-
params: { missingProperty:
|
|
2315
|
-
message: "must have required property '" +
|
|
2354
|
+
params: { missingProperty: D },
|
|
2355
|
+
message: "must have required property '" + D + "'"
|
|
2316
2356
|
};
|
|
2317
2357
|
s === null ? s = [L] : s.push(L), e++;
|
|
2318
2358
|
} else {
|
|
2319
2359
|
const L = e;
|
|
2320
2360
|
for (const U in r)
|
|
2321
2361
|
if (!(U === "resource" || U === "url" || U === "caption")) {
|
|
2322
|
-
const
|
|
2362
|
+
const C = {
|
|
2323
2363
|
instancePath: t,
|
|
2324
2364
|
schemaPath: "#/definitions/UrlReference/additionalProperties",
|
|
2325
2365
|
keyword: "additionalProperties",
|
|
@@ -2328,13 +2368,13 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2328
2368
|
},
|
|
2329
2369
|
message: "must NOT have additional properties"
|
|
2330
2370
|
};
|
|
2331
|
-
s === null ? s = [
|
|
2371
|
+
s === null ? s = [C] : s.push(C), e++;
|
|
2332
2372
|
break;
|
|
2333
2373
|
}
|
|
2334
2374
|
if (L === e) {
|
|
2335
2375
|
if (r.resource !== void 0) {
|
|
2336
2376
|
let U = r.resource;
|
|
2337
|
-
const
|
|
2377
|
+
const C = e;
|
|
2338
2378
|
if (typeof U != "string") {
|
|
2339
2379
|
const I = {
|
|
2340
2380
|
instancePath: t + "/resource",
|
|
@@ -2355,7 +2395,7 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2355
2395
|
};
|
|
2356
2396
|
s === null ? s = [I] : s.push(I), e++;
|
|
2357
2397
|
}
|
|
2358
|
-
var j =
|
|
2398
|
+
var j = C === e;
|
|
2359
2399
|
} else
|
|
2360
2400
|
var j = !0;
|
|
2361
2401
|
if (j) {
|
|
@@ -2396,28 +2436,28 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2396
2436
|
}
|
|
2397
2437
|
}
|
|
2398
2438
|
} else {
|
|
2399
|
-
const
|
|
2439
|
+
const D = {
|
|
2400
2440
|
instancePath: t,
|
|
2401
2441
|
schemaPath: "#/definitions/UrlReference/type",
|
|
2402
2442
|
keyword: "type",
|
|
2403
2443
|
params: { type: "object" },
|
|
2404
2444
|
message: "must be object"
|
|
2405
2445
|
};
|
|
2406
|
-
s === null ? s = [
|
|
2446
|
+
s === null ? s = [D] : s.push(D), e++;
|
|
2407
2447
|
}
|
|
2408
2448
|
var _ = b === e;
|
|
2409
2449
|
if (y = y || _, !y) {
|
|
2410
|
-
const
|
|
2450
|
+
const D = e;
|
|
2411
2451
|
if (e === e)
|
|
2412
2452
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
2413
|
-
let
|
|
2414
|
-
if (r.resource === void 0 && (
|
|
2453
|
+
let C;
|
|
2454
|
+
if (r.resource === void 0 && (C = "resource") || r.path === void 0 && (C = "path")) {
|
|
2415
2455
|
const I = {
|
|
2416
2456
|
instancePath: t,
|
|
2417
2457
|
schemaPath: "#/definitions/BundledReference/required",
|
|
2418
2458
|
keyword: "required",
|
|
2419
|
-
params: { missingProperty:
|
|
2420
|
-
message: "must have required property '" +
|
|
2459
|
+
params: { missingProperty: C },
|
|
2460
|
+
message: "must have required property '" + C + "'"
|
|
2421
2461
|
};
|
|
2422
2462
|
s === null ? s = [I] : s.push(I), e++;
|
|
2423
2463
|
} else {
|
|
@@ -2486,16 +2526,16 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2486
2526
|
}
|
|
2487
2527
|
}
|
|
2488
2528
|
} else {
|
|
2489
|
-
const
|
|
2529
|
+
const C = {
|
|
2490
2530
|
instancePath: t,
|
|
2491
2531
|
schemaPath: "#/definitions/BundledReference/type",
|
|
2492
2532
|
keyword: "type",
|
|
2493
2533
|
params: { type: "object" },
|
|
2494
2534
|
message: "must be object"
|
|
2495
2535
|
};
|
|
2496
|
-
s === null ? s = [
|
|
2536
|
+
s === null ? s = [C] : s.push(C), e++;
|
|
2497
2537
|
}
|
|
2498
|
-
var _ =
|
|
2538
|
+
var _ = D === e;
|
|
2499
2539
|
y = y || _;
|
|
2500
2540
|
}
|
|
2501
2541
|
}
|
|
@@ -2503,16 +2543,16 @@ function X(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
2503
2543
|
}
|
|
2504
2544
|
}
|
|
2505
2545
|
if (y)
|
|
2506
|
-
e =
|
|
2546
|
+
e = d, s !== null && (d ? s.length = d : s = null);
|
|
2507
2547
|
else {
|
|
2508
|
-
const
|
|
2548
|
+
const B = {
|
|
2509
2549
|
instancePath: t,
|
|
2510
2550
|
schemaPath: "#/anyOf",
|
|
2511
2551
|
keyword: "anyOf",
|
|
2512
2552
|
params: {},
|
|
2513
2553
|
message: "must match a schema in anyOf"
|
|
2514
2554
|
};
|
|
2515
|
-
return s === null ? s = [
|
|
2555
|
+
return s === null ? s = [B] : s.push(B), e++, X.errors = s, !1;
|
|
2516
2556
|
}
|
|
2517
2557
|
return X.errors = s, e === 0;
|
|
2518
2558
|
}
|
|
@@ -3237,15 +3277,15 @@ Only the username field is required for user authentication.`
|
|
|
3237
3277
|
required: ["language", "step"]
|
|
3238
3278
|
}
|
|
3239
3279
|
]
|
|
3240
|
-
},
|
|
3280
|
+
}, Jt = {
|
|
3241
3281
|
additionalProperties: {
|
|
3242
3282
|
anyOf: [
|
|
3243
3283
|
{ $ref: "#/definitions/FileTree" },
|
|
3244
3284
|
{ type: ["object", "string"] }
|
|
3245
3285
|
]
|
|
3246
3286
|
}
|
|
3247
|
-
},
|
|
3248
|
-
function Se(r, { instancePath: t = "", parentData: n, parentDataProperty:
|
|
3287
|
+
}, ar = { validate: Se };
|
|
3288
|
+
function Se(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: u = r } = {}) {
|
|
3249
3289
|
let s = null, e = 0;
|
|
3250
3290
|
if (e === 0)
|
|
3251
3291
|
if (r && typeof r == "object" && !Array.isArray(r))
|
|
@@ -3254,14 +3294,14 @@ function Se(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3254
3294
|
const T = e, _ = e;
|
|
3255
3295
|
let k = !1;
|
|
3256
3296
|
const $ = e;
|
|
3257
|
-
|
|
3297
|
+
ar.validate(F, {
|
|
3258
3298
|
instancePath: t + "/" + N.replace(/~/g, "~0").replace(/\//g, "~1"),
|
|
3259
3299
|
parentData: r,
|
|
3260
3300
|
parentDataProperty: N,
|
|
3261
3301
|
rootData: u
|
|
3262
|
-
}) || (s = s === null ?
|
|
3263
|
-
var
|
|
3264
|
-
if (k = k ||
|
|
3302
|
+
}) || (s = s === null ? ar.validate.errors : s.concat(ar.validate.errors), e = s.length);
|
|
3303
|
+
var d = $ === e;
|
|
3304
|
+
if (k = k || d, !k) {
|
|
3265
3305
|
const m = e;
|
|
3266
3306
|
if (!(F && typeof F == "object" && !Array.isArray(F)) && typeof F != "string") {
|
|
3267
3307
|
const z = {
|
|
@@ -3269,14 +3309,14 @@ function Se(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3269
3309
|
schemaPath: "#/additionalProperties/anyOf/1/type",
|
|
3270
3310
|
keyword: "type",
|
|
3271
3311
|
params: {
|
|
3272
|
-
type:
|
|
3312
|
+
type: Jt.additionalProperties.anyOf[1].type
|
|
3273
3313
|
},
|
|
3274
3314
|
message: "must be object,string"
|
|
3275
3315
|
};
|
|
3276
3316
|
s === null ? s = [z] : s.push(z), e++;
|
|
3277
3317
|
}
|
|
3278
|
-
var
|
|
3279
|
-
k = k ||
|
|
3318
|
+
var d = m === e;
|
|
3319
|
+
k = k || d;
|
|
3280
3320
|
}
|
|
3281
3321
|
if (k)
|
|
3282
3322
|
e = _, s !== null && (_ ? s.length = _ : s = null);
|
|
@@ -3306,7 +3346,7 @@ function Se(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3306
3346
|
], !1;
|
|
3307
3347
|
return Se.errors = s, e === 0;
|
|
3308
3348
|
}
|
|
3309
|
-
function Oe(r, { instancePath: t = "", parentData: n, parentDataProperty:
|
|
3349
|
+
function Oe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: u = r } = {}) {
|
|
3310
3350
|
let s = null, e = 0;
|
|
3311
3351
|
if (e === 0)
|
|
3312
3352
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
@@ -3360,10 +3400,10 @@ function Oe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3360
3400
|
message: "must be equal to constant"
|
|
3361
3401
|
}
|
|
3362
3402
|
], !1;
|
|
3363
|
-
var
|
|
3403
|
+
var d = T === e;
|
|
3364
3404
|
} else
|
|
3365
|
-
var
|
|
3366
|
-
if (
|
|
3405
|
+
var d = !0;
|
|
3406
|
+
if (d) {
|
|
3367
3407
|
if (r.files !== void 0) {
|
|
3368
3408
|
const F = e;
|
|
3369
3409
|
Se(r.files, {
|
|
@@ -3372,10 +3412,10 @@ function Oe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3372
3412
|
parentDataProperty: "files",
|
|
3373
3413
|
rootData: u
|
|
3374
3414
|
}) || (s = s === null ? Se.errors : s.concat(Se.errors), e = s.length);
|
|
3375
|
-
var
|
|
3415
|
+
var d = F === e;
|
|
3376
3416
|
} else
|
|
3377
|
-
var
|
|
3378
|
-
if (
|
|
3417
|
+
var d = !0;
|
|
3418
|
+
if (d)
|
|
3379
3419
|
if (r.name !== void 0) {
|
|
3380
3420
|
const F = e;
|
|
3381
3421
|
if (typeof r.name != "string")
|
|
@@ -3388,9 +3428,9 @@ function Oe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3388
3428
|
message: "must be string"
|
|
3389
3429
|
}
|
|
3390
3430
|
], !1;
|
|
3391
|
-
var
|
|
3431
|
+
var d = F === e;
|
|
3392
3432
|
} else
|
|
3393
|
-
var
|
|
3433
|
+
var d = !0;
|
|
3394
3434
|
}
|
|
3395
3435
|
}
|
|
3396
3436
|
}
|
|
@@ -3406,9 +3446,9 @@ function Oe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3406
3446
|
], !1;
|
|
3407
3447
|
return Oe.errors = s, e === 0;
|
|
3408
3448
|
}
|
|
3409
|
-
function ge(r, { instancePath: t = "", parentData: n, parentDataProperty:
|
|
3449
|
+
function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: u = r } = {}) {
|
|
3410
3450
|
let s = null, e = 0;
|
|
3411
|
-
const
|
|
3451
|
+
const d = e;
|
|
3412
3452
|
let y = !1;
|
|
3413
3453
|
const N = e;
|
|
3414
3454
|
if (e === e)
|
|
@@ -3532,14 +3572,14 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3532
3572
|
Oe(r, {
|
|
3533
3573
|
instancePath: t,
|
|
3534
3574
|
parentData: n,
|
|
3535
|
-
parentDataProperty:
|
|
3575
|
+
parentDataProperty: f,
|
|
3536
3576
|
rootData: u
|
|
3537
3577
|
}) || (s = s === null ? Oe.errors : s.concat(Oe.errors), e = s.length);
|
|
3538
3578
|
var _ = k === e;
|
|
3539
3579
|
y = y || _;
|
|
3540
3580
|
}
|
|
3541
3581
|
if (y)
|
|
3542
|
-
e =
|
|
3582
|
+
e = d, s !== null && (d ? s.length = d : s = null);
|
|
3543
3583
|
else {
|
|
3544
3584
|
const k = {
|
|
3545
3585
|
instancePath: t,
|
|
@@ -3552,10 +3592,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3552
3592
|
}
|
|
3553
3593
|
return ge.errors = s, e === 0;
|
|
3554
3594
|
}
|
|
3555
|
-
const
|
|
3595
|
+
const xr = {
|
|
3556
3596
|
enum: ["GET", "POST", "HEAD", "OPTIONS", "PATCH", "PUT", "DELETE"]
|
|
3557
3597
|
};
|
|
3558
|
-
function ye(r, { instancePath: t = "", parentData: n, parentDataProperty:
|
|
3598
|
+
function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: u = r } = {}) {
|
|
3559
3599
|
let s = null, e = 0;
|
|
3560
3600
|
if (e === 0)
|
|
3561
3601
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
@@ -3603,14 +3643,14 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3603
3643
|
instancePath: t + "/method",
|
|
3604
3644
|
schemaPath: "#/definitions/HTTPMethod/enum",
|
|
3605
3645
|
keyword: "enum",
|
|
3606
|
-
params: { allowedValues:
|
|
3646
|
+
params: { allowedValues: xr.enum },
|
|
3607
3647
|
message: "must be equal to one of the allowed values"
|
|
3608
3648
|
}
|
|
3609
3649
|
], !1;
|
|
3610
|
-
var
|
|
3650
|
+
var d = K === e;
|
|
3611
3651
|
} else
|
|
3612
|
-
var
|
|
3613
|
-
if (
|
|
3652
|
+
var d = !0;
|
|
3653
|
+
if (d) {
|
|
3614
3654
|
if (r.url !== void 0) {
|
|
3615
3655
|
const j = e;
|
|
3616
3656
|
if (typeof r.url != "string")
|
|
@@ -3623,10 +3663,10 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3623
3663
|
message: "must be string"
|
|
3624
3664
|
}
|
|
3625
3665
|
], !1;
|
|
3626
|
-
var
|
|
3666
|
+
var d = j === e;
|
|
3627
3667
|
} else
|
|
3628
|
-
var
|
|
3629
|
-
if (
|
|
3668
|
+
var d = !0;
|
|
3669
|
+
if (d) {
|
|
3630
3670
|
if (r.headers !== void 0) {
|
|
3631
3671
|
let j = r.headers;
|
|
3632
3672
|
const K = e;
|
|
@@ -3666,13 +3706,13 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3666
3706
|
message: "must be object"
|
|
3667
3707
|
}
|
|
3668
3708
|
], !1;
|
|
3669
|
-
var
|
|
3709
|
+
var d = K === e;
|
|
3670
3710
|
} else
|
|
3671
|
-
var
|
|
3672
|
-
if (
|
|
3711
|
+
var d = !0;
|
|
3712
|
+
if (d)
|
|
3673
3713
|
if (r.body !== void 0) {
|
|
3674
3714
|
let j = r.body;
|
|
3675
|
-
const K = e,
|
|
3715
|
+
const K = e, B = e;
|
|
3676
3716
|
let re = !1;
|
|
3677
3717
|
const c = e;
|
|
3678
3718
|
if (typeof j != "string") {
|
|
@@ -3771,7 +3811,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3771
3811
|
)) {
|
|
3772
3812
|
let R;
|
|
3773
3813
|
if (h.byteLength === void 0 && (R = "byteLength")) {
|
|
3774
|
-
const
|
|
3814
|
+
const D = {
|
|
3775
3815
|
instancePath: t + "/body/buffer",
|
|
3776
3816
|
schemaPath: "#/properties/body/anyOf/1/properties/buffer/required",
|
|
3777
3817
|
keyword: "required",
|
|
@@ -3781,12 +3821,12 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3781
3821
|
message: "must have required property '" + R + "'"
|
|
3782
3822
|
};
|
|
3783
3823
|
s === null ? s = [
|
|
3784
|
-
|
|
3824
|
+
D
|
|
3785
3825
|
] : s.push(
|
|
3786
|
-
|
|
3826
|
+
D
|
|
3787
3827
|
), e++;
|
|
3788
3828
|
} else {
|
|
3789
|
-
const
|
|
3829
|
+
const D = e;
|
|
3790
3830
|
for (const L in h)
|
|
3791
3831
|
if (L !== "byteLength") {
|
|
3792
3832
|
const U = {
|
|
@@ -3805,7 +3845,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3805
3845
|
), e++;
|
|
3806
3846
|
break;
|
|
3807
3847
|
}
|
|
3808
|
-
if (
|
|
3848
|
+
if (D === e && h.byteLength !== void 0) {
|
|
3809
3849
|
let L = h.byteLength;
|
|
3810
3850
|
if (!(typeof L == "number" && isFinite(
|
|
3811
3851
|
L
|
|
@@ -3944,7 +3984,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3944
3984
|
for (const h in j) {
|
|
3945
3985
|
let b = j[h];
|
|
3946
3986
|
const q = e, R = e;
|
|
3947
|
-
let
|
|
3987
|
+
let D = !1;
|
|
3948
3988
|
const L = e;
|
|
3949
3989
|
if (typeof b != "string") {
|
|
3950
3990
|
const U = {
|
|
@@ -3969,7 +4009,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
3969
4009
|
), e++;
|
|
3970
4010
|
}
|
|
3971
4011
|
var _ = L === e;
|
|
3972
|
-
if (
|
|
4012
|
+
if (D = D || _, !D) {
|
|
3973
4013
|
const U = e;
|
|
3974
4014
|
if (e === U)
|
|
3975
4015
|
if (b && typeof b == "object" && !Array.isArray(
|
|
@@ -4002,7 +4042,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4002
4042
|
for (const A in b)
|
|
4003
4043
|
if (!(A === "BYTES_PER_ELEMENT" || A === "buffer" || A === "byteLength" || A === "byteOffset" || A === "length")) {
|
|
4004
4044
|
let Z = b[A];
|
|
4005
|
-
const
|
|
4045
|
+
const M = e;
|
|
4006
4046
|
if (!(typeof Z == "number" && isFinite(
|
|
4007
4047
|
Z
|
|
4008
4048
|
))) {
|
|
@@ -4033,7 +4073,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4033
4073
|
V
|
|
4034
4074
|
), e++;
|
|
4035
4075
|
}
|
|
4036
|
-
var k =
|
|
4076
|
+
var k = M === e;
|
|
4037
4077
|
if (!k)
|
|
4038
4078
|
break;
|
|
4039
4079
|
}
|
|
@@ -4044,7 +4084,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4044
4084
|
if (!(typeof A == "number" && isFinite(
|
|
4045
4085
|
A
|
|
4046
4086
|
))) {
|
|
4047
|
-
const
|
|
4087
|
+
const M = {
|
|
4048
4088
|
instancePath: t + "/body/" + h.replace(
|
|
4049
4089
|
/~/g,
|
|
4050
4090
|
"~0"
|
|
@@ -4060,9 +4100,9 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4060
4100
|
message: "must be number"
|
|
4061
4101
|
};
|
|
4062
4102
|
s === null ? s = [
|
|
4063
|
-
|
|
4103
|
+
M
|
|
4064
4104
|
] : s.push(
|
|
4065
|
-
|
|
4105
|
+
M
|
|
4066
4106
|
), e++;
|
|
4067
4107
|
}
|
|
4068
4108
|
var $ = Z === e;
|
|
@@ -4298,7 +4338,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4298
4338
|
), e++;
|
|
4299
4339
|
}
|
|
4300
4340
|
var _ = U === e;
|
|
4301
|
-
if (
|
|
4341
|
+
if (D = D || _, !D) {
|
|
4302
4342
|
const I = e;
|
|
4303
4343
|
if (e === I)
|
|
4304
4344
|
if (b && typeof b == "object" && !Array.isArray(
|
|
@@ -4328,8 +4368,8 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4328
4368
|
), e++;
|
|
4329
4369
|
} else {
|
|
4330
4370
|
const Z = e;
|
|
4331
|
-
for (const
|
|
4332
|
-
if (!(
|
|
4371
|
+
for (const M in b)
|
|
4372
|
+
if (!(M === "size" || M === "type" || M === "lastModified" || M === "name" || M === "webkitRelativePath")) {
|
|
4333
4373
|
const V = {
|
|
4334
4374
|
instancePath: t + "/body/" + h.replace(
|
|
4335
4375
|
/~/g,
|
|
@@ -4341,7 +4381,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4341
4381
|
schemaPath: "#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",
|
|
4342
4382
|
keyword: "additionalProperties",
|
|
4343
4383
|
params: {
|
|
4344
|
-
additionalProperty:
|
|
4384
|
+
additionalProperty: M
|
|
4345
4385
|
},
|
|
4346
4386
|
message: "must NOT have additional properties"
|
|
4347
4387
|
};
|
|
@@ -4354,10 +4394,10 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4354
4394
|
}
|
|
4355
4395
|
if (Z === e) {
|
|
4356
4396
|
if (b.size !== void 0) {
|
|
4357
|
-
let
|
|
4397
|
+
let M = b.size;
|
|
4358
4398
|
const V = e;
|
|
4359
|
-
if (!(typeof
|
|
4360
|
-
|
|
4399
|
+
if (!(typeof M == "number" && isFinite(
|
|
4400
|
+
M
|
|
4361
4401
|
))) {
|
|
4362
4402
|
const oe = {
|
|
4363
4403
|
instancePath: t + "/body/" + h.replace(
|
|
@@ -4385,7 +4425,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4385
4425
|
var m = !0;
|
|
4386
4426
|
if (m) {
|
|
4387
4427
|
if (b.type !== void 0) {
|
|
4388
|
-
const
|
|
4428
|
+
const M = e;
|
|
4389
4429
|
if (typeof b.type != "string") {
|
|
4390
4430
|
const oe = {
|
|
4391
4431
|
instancePath: t + "/body/" + h.replace(
|
|
@@ -4408,15 +4448,15 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4408
4448
|
oe
|
|
4409
4449
|
), e++;
|
|
4410
4450
|
}
|
|
4411
|
-
var m =
|
|
4451
|
+
var m = M === e;
|
|
4412
4452
|
} else
|
|
4413
4453
|
var m = !0;
|
|
4414
4454
|
if (m) {
|
|
4415
4455
|
if (b.lastModified !== void 0) {
|
|
4416
|
-
let
|
|
4456
|
+
let M = b.lastModified;
|
|
4417
4457
|
const V = e;
|
|
4418
|
-
if (!(typeof
|
|
4419
|
-
|
|
4458
|
+
if (!(typeof M == "number" && isFinite(
|
|
4459
|
+
M
|
|
4420
4460
|
))) {
|
|
4421
4461
|
const de = {
|
|
4422
4462
|
instancePath: t + "/body/" + h.replace(
|
|
@@ -4444,7 +4484,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4444
4484
|
var m = !0;
|
|
4445
4485
|
if (m) {
|
|
4446
4486
|
if (b.name !== void 0) {
|
|
4447
|
-
const
|
|
4487
|
+
const M = e;
|
|
4448
4488
|
if (typeof b.name != "string") {
|
|
4449
4489
|
const oe = {
|
|
4450
4490
|
instancePath: t + "/body/" + h.replace(
|
|
@@ -4467,12 +4507,12 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4467
4507
|
oe
|
|
4468
4508
|
), e++;
|
|
4469
4509
|
}
|
|
4470
|
-
var m =
|
|
4510
|
+
var m = M === e;
|
|
4471
4511
|
} else
|
|
4472
4512
|
var m = !0;
|
|
4473
4513
|
if (m)
|
|
4474
4514
|
if (b.webkitRelativePath !== void 0) {
|
|
4475
|
-
const
|
|
4515
|
+
const M = e;
|
|
4476
4516
|
if (typeof b.webkitRelativePath != "string") {
|
|
4477
4517
|
const oe = {
|
|
4478
4518
|
instancePath: t + "/body/" + h.replace(
|
|
@@ -4495,7 +4535,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4495
4535
|
oe
|
|
4496
4536
|
), e++;
|
|
4497
4537
|
}
|
|
4498
|
-
var m =
|
|
4538
|
+
var m = M === e;
|
|
4499
4539
|
} else
|
|
4500
4540
|
var m = !0;
|
|
4501
4541
|
}
|
|
@@ -4526,10 +4566,10 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4526
4566
|
), e++;
|
|
4527
4567
|
}
|
|
4528
4568
|
var _ = I === e;
|
|
4529
|
-
|
|
4569
|
+
D = D || _;
|
|
4530
4570
|
}
|
|
4531
4571
|
}
|
|
4532
|
-
if (
|
|
4572
|
+
if (D)
|
|
4533
4573
|
e = R, s !== null && (R ? s.length = R : s = null);
|
|
4534
4574
|
else {
|
|
4535
4575
|
const U = {
|
|
@@ -4572,7 +4612,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4572
4612
|
}
|
|
4573
4613
|
}
|
|
4574
4614
|
if (re)
|
|
4575
|
-
e =
|
|
4615
|
+
e = B, s !== null && (B ? s.length = B : s = null);
|
|
4576
4616
|
else {
|
|
4577
4617
|
const g = {
|
|
4578
4618
|
instancePath: t + "/body",
|
|
@@ -4583,9 +4623,9 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4583
4623
|
};
|
|
4584
4624
|
return s === null ? s = [g] : s.push(g), e++, ye.errors = s, !1;
|
|
4585
4625
|
}
|
|
4586
|
-
var
|
|
4626
|
+
var d = K === e;
|
|
4587
4627
|
} else
|
|
4588
|
-
var
|
|
4628
|
+
var d = !0;
|
|
4589
4629
|
}
|
|
4590
4630
|
}
|
|
4591
4631
|
}
|
|
@@ -4602,7 +4642,7 @@ function ye(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4602
4642
|
], !1;
|
|
4603
4643
|
return ye.errors = s, e === 0;
|
|
4604
4644
|
}
|
|
4605
|
-
const
|
|
4645
|
+
const Xt = {
|
|
4606
4646
|
properties: {
|
|
4607
4647
|
relativeUri: {
|
|
4608
4648
|
type: "string",
|
|
@@ -4666,13 +4706,13 @@ const Gt = {
|
|
|
4666
4706
|
}
|
|
4667
4707
|
}
|
|
4668
4708
|
};
|
|
4669
|
-
function pe(r, { instancePath: t = "", parentData: n, parentDataProperty:
|
|
4709
|
+
function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: u = r } = {}) {
|
|
4670
4710
|
let s = null, e = 0;
|
|
4671
4711
|
if (e === 0)
|
|
4672
4712
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
4673
4713
|
const $ = e;
|
|
4674
4714
|
for (const m in r)
|
|
4675
|
-
if (!
|
|
4715
|
+
if (!Nr.call(Xt.properties, m))
|
|
4676
4716
|
return pe.errors = [
|
|
4677
4717
|
{
|
|
4678
4718
|
instancePath: t,
|
|
@@ -4695,10 +4735,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4695
4735
|
message: "must be string"
|
|
4696
4736
|
}
|
|
4697
4737
|
], !1;
|
|
4698
|
-
var
|
|
4738
|
+
var d = m === e;
|
|
4699
4739
|
} else
|
|
4700
|
-
var
|
|
4701
|
-
if (
|
|
4740
|
+
var d = !0;
|
|
4741
|
+
if (d) {
|
|
4702
4742
|
if (r.scriptPath !== void 0) {
|
|
4703
4743
|
const m = e;
|
|
4704
4744
|
if (typeof r.scriptPath != "string")
|
|
@@ -4711,10 +4751,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4711
4751
|
message: "must be string"
|
|
4712
4752
|
}
|
|
4713
4753
|
], !1;
|
|
4714
|
-
var
|
|
4754
|
+
var d = m === e;
|
|
4715
4755
|
} else
|
|
4716
|
-
var
|
|
4717
|
-
if (
|
|
4756
|
+
var d = !0;
|
|
4757
|
+
if (d) {
|
|
4718
4758
|
if (r.protocol !== void 0) {
|
|
4719
4759
|
const m = e;
|
|
4720
4760
|
if (typeof r.protocol != "string")
|
|
@@ -4727,10 +4767,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4727
4767
|
message: "must be string"
|
|
4728
4768
|
}
|
|
4729
4769
|
], !1;
|
|
4730
|
-
var
|
|
4770
|
+
var d = m === e;
|
|
4731
4771
|
} else
|
|
4732
|
-
var
|
|
4733
|
-
if (
|
|
4772
|
+
var d = !0;
|
|
4773
|
+
if (d) {
|
|
4734
4774
|
if (r.method !== void 0) {
|
|
4735
4775
|
let m = r.method;
|
|
4736
4776
|
const W = e;
|
|
@@ -4751,15 +4791,15 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4751
4791
|
schemaPath: "#/definitions/HTTPMethod/enum",
|
|
4752
4792
|
keyword: "enum",
|
|
4753
4793
|
params: {
|
|
4754
|
-
allowedValues:
|
|
4794
|
+
allowedValues: xr.enum
|
|
4755
4795
|
},
|
|
4756
4796
|
message: "must be equal to one of the allowed values"
|
|
4757
4797
|
}
|
|
4758
4798
|
], !1;
|
|
4759
|
-
var
|
|
4799
|
+
var d = W === e;
|
|
4760
4800
|
} else
|
|
4761
|
-
var
|
|
4762
|
-
if (
|
|
4801
|
+
var d = !0;
|
|
4802
|
+
if (d) {
|
|
4763
4803
|
if (r.headers !== void 0) {
|
|
4764
4804
|
let m = r.headers;
|
|
4765
4805
|
const W = e;
|
|
@@ -4799,29 +4839,29 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
4799
4839
|
message: "must be object"
|
|
4800
4840
|
}
|
|
4801
4841
|
], !1;
|
|
4802
|
-
var
|
|
4842
|
+
var d = W === e;
|
|
4803
4843
|
} else
|
|
4804
|
-
var
|
|
4805
|
-
if (
|
|
4844
|
+
var d = !0;
|
|
4845
|
+
if (d) {
|
|
4806
4846
|
if (r.body !== void 0) {
|
|
4807
4847
|
let m = r.body;
|
|
4808
4848
|
const W = e, z = e;
|
|
4809
4849
|
let Y = !1;
|
|
4810
4850
|
const j = e;
|
|
4811
4851
|
if (typeof m != "string") {
|
|
4812
|
-
const
|
|
4852
|
+
const B = {
|
|
4813
4853
|
instancePath: t + "/body",
|
|
4814
4854
|
schemaPath: "#/properties/body/anyOf/0/type",
|
|
4815
4855
|
keyword: "type",
|
|
4816
4856
|
params: { type: "string" },
|
|
4817
4857
|
message: "must be string"
|
|
4818
4858
|
};
|
|
4819
|
-
s === null ? s = [
|
|
4859
|
+
s === null ? s = [B] : s.push(B), e++;
|
|
4820
4860
|
}
|
|
4821
4861
|
var N = j === e;
|
|
4822
4862
|
if (Y = Y || N, !Y) {
|
|
4823
|
-
const
|
|
4824
|
-
if (e ===
|
|
4863
|
+
const B = e;
|
|
4864
|
+
if (e === B)
|
|
4825
4865
|
if (m && typeof m == "object" && !Array.isArray(m)) {
|
|
4826
4866
|
let c;
|
|
4827
4867
|
if (m.BYTES_PER_ELEMENT === void 0 && (c = "BYTES_PER_ELEMENT") || m.buffer === void 0 && (c = "buffer") || m.byteLength === void 0 && (c = "byteLength") || m.byteOffset === void 0 && (c = "byteOffset") || m.length === void 0 && (c = "length")) {
|
|
@@ -5071,25 +5111,25 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
5071
5111
|
};
|
|
5072
5112
|
s === null ? s = [c] : s.push(c), e++;
|
|
5073
5113
|
}
|
|
5074
|
-
var N =
|
|
5114
|
+
var N = B === e;
|
|
5075
5115
|
Y = Y || N;
|
|
5076
5116
|
}
|
|
5077
5117
|
if (Y)
|
|
5078
5118
|
e = z, s !== null && (z ? s.length = z : s = null);
|
|
5079
5119
|
else {
|
|
5080
|
-
const
|
|
5120
|
+
const B = {
|
|
5081
5121
|
instancePath: t + "/body",
|
|
5082
5122
|
schemaPath: "#/properties/body/anyOf",
|
|
5083
5123
|
keyword: "anyOf",
|
|
5084
5124
|
params: {},
|
|
5085
5125
|
message: "must match a schema in anyOf"
|
|
5086
5126
|
};
|
|
5087
|
-
return s === null ? s = [
|
|
5127
|
+
return s === null ? s = [B] : s.push(B), e++, pe.errors = s, !1;
|
|
5088
5128
|
}
|
|
5089
|
-
var
|
|
5129
|
+
var d = W === e;
|
|
5090
5130
|
} else
|
|
5091
|
-
var
|
|
5092
|
-
if (
|
|
5131
|
+
var d = !0;
|
|
5132
|
+
if (d) {
|
|
5093
5133
|
if (r.env !== void 0) {
|
|
5094
5134
|
let m = r.env;
|
|
5095
5135
|
const W = e;
|
|
@@ -5131,10 +5171,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
5131
5171
|
message: "must be object"
|
|
5132
5172
|
}
|
|
5133
5173
|
], !1;
|
|
5134
|
-
var
|
|
5174
|
+
var d = W === e;
|
|
5135
5175
|
} else
|
|
5136
|
-
var
|
|
5137
|
-
if (
|
|
5176
|
+
var d = !0;
|
|
5177
|
+
if (d) {
|
|
5138
5178
|
if (r.$_SERVER !== void 0) {
|
|
5139
5179
|
let m = r.$_SERVER;
|
|
5140
5180
|
const W = e;
|
|
@@ -5176,10 +5216,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
5176
5216
|
message: "must be object"
|
|
5177
5217
|
}
|
|
5178
5218
|
], !1;
|
|
5179
|
-
var
|
|
5219
|
+
var d = W === e;
|
|
5180
5220
|
} else
|
|
5181
|
-
var
|
|
5182
|
-
if (
|
|
5221
|
+
var d = !0;
|
|
5222
|
+
if (d)
|
|
5183
5223
|
if (r.code !== void 0) {
|
|
5184
5224
|
const m = e;
|
|
5185
5225
|
if (typeof r.code != "string")
|
|
@@ -5194,9 +5234,9 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
5194
5234
|
message: "must be string"
|
|
5195
5235
|
}
|
|
5196
5236
|
], !1;
|
|
5197
|
-
var
|
|
5237
|
+
var d = m === e;
|
|
5198
5238
|
} else
|
|
5199
|
-
var
|
|
5239
|
+
var d = !0;
|
|
5200
5240
|
}
|
|
5201
5241
|
}
|
|
5202
5242
|
}
|
|
@@ -5217,19 +5257,19 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: d, roo
|
|
|
5217
5257
|
], !1;
|
|
5218
5258
|
return pe.errors = s, e === 0;
|
|
5219
5259
|
}
|
|
5220
|
-
function o(r, { instancePath: t = "", parentData: n, parentDataProperty:
|
|
5260
|
+
function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: u = r } = {}) {
|
|
5221
5261
|
let s = null, e = 0;
|
|
5222
5262
|
if (e === 0)
|
|
5223
5263
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
5224
|
-
let
|
|
5225
|
-
if (r.step === void 0 && (
|
|
5264
|
+
let or;
|
|
5265
|
+
if (r.step === void 0 && (or = "step"))
|
|
5226
5266
|
return o.errors = [
|
|
5227
5267
|
{
|
|
5228
5268
|
instancePath: t,
|
|
5229
5269
|
schemaPath: "#/required",
|
|
5230
5270
|
keyword: "required",
|
|
5231
|
-
params: { missingProperty:
|
|
5232
|
-
message: "must have required property '" +
|
|
5271
|
+
params: { missingProperty: or },
|
|
5272
|
+
message: "must have required property '" + or + "'"
|
|
5233
5273
|
}
|
|
5234
5274
|
], !1;
|
|
5235
5275
|
{
|
|
@@ -5304,10 +5344,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
5304
5344
|
message: "must be number"
|
|
5305
5345
|
}
|
|
5306
5346
|
], !1;
|
|
5307
|
-
var
|
|
5347
|
+
var d = E === e;
|
|
5308
5348
|
} else
|
|
5309
|
-
var
|
|
5310
|
-
if (
|
|
5349
|
+
var d = !0;
|
|
5350
|
+
if (d)
|
|
5311
5351
|
if (i.caption !== void 0) {
|
|
5312
5352
|
const a = e;
|
|
5313
5353
|
if (typeof i.caption != "string")
|
|
@@ -5322,9 +5362,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
5322
5362
|
message: "must be string"
|
|
5323
5363
|
}
|
|
5324
5364
|
], !1;
|
|
5325
|
-
var
|
|
5365
|
+
var d = a === e;
|
|
5326
5366
|
} else
|
|
5327
|
-
var
|
|
5367
|
+
var d = !0;
|
|
5328
5368
|
}
|
|
5329
5369
|
} else
|
|
5330
5370
|
return o.errors = [
|
|
@@ -6600,10 +6640,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
6600
6640
|
message: "must be number"
|
|
6601
6641
|
}
|
|
6602
6642
|
], !1;
|
|
6603
|
-
var
|
|
6643
|
+
var B = E === e;
|
|
6604
6644
|
} else
|
|
6605
|
-
var
|
|
6606
|
-
if (
|
|
6645
|
+
var B = !0;
|
|
6646
|
+
if (B)
|
|
6607
6647
|
if (i.caption !== void 0) {
|
|
6608
6648
|
const a = e;
|
|
6609
6649
|
if (typeof i.caption != "string")
|
|
@@ -6618,9 +6658,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
6618
6658
|
message: "must be string"
|
|
6619
6659
|
}
|
|
6620
6660
|
], !1;
|
|
6621
|
-
var
|
|
6661
|
+
var B = a === e;
|
|
6622
6662
|
} else
|
|
6623
|
-
var
|
|
6663
|
+
var B = !0;
|
|
6624
6664
|
}
|
|
6625
6665
|
} else
|
|
6626
6666
|
return o.errors = [
|
|
@@ -7629,10 +7669,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
7629
7669
|
message: "must be number"
|
|
7630
7670
|
}
|
|
7631
7671
|
], !1;
|
|
7632
|
-
var
|
|
7672
|
+
var D = E === e;
|
|
7633
7673
|
} else
|
|
7634
|
-
var
|
|
7635
|
-
if (
|
|
7674
|
+
var D = !0;
|
|
7675
|
+
if (D)
|
|
7636
7676
|
if (i.caption !== void 0) {
|
|
7637
7677
|
const a = e;
|
|
7638
7678
|
if (typeof i.caption != "string")
|
|
@@ -7647,9 +7687,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
7647
7687
|
message: "must be string"
|
|
7648
7688
|
}
|
|
7649
7689
|
], !1;
|
|
7650
|
-
var
|
|
7690
|
+
var D = a === e;
|
|
7651
7691
|
} else
|
|
7652
|
-
var
|
|
7692
|
+
var D = !0;
|
|
7653
7693
|
}
|
|
7654
7694
|
} else
|
|
7655
7695
|
return o.errors = [
|
|
@@ -7850,10 +7890,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
7850
7890
|
message: "must be object"
|
|
7851
7891
|
}
|
|
7852
7892
|
], !1;
|
|
7853
|
-
var
|
|
7893
|
+
var C = p === e;
|
|
7854
7894
|
} else
|
|
7855
|
-
var
|
|
7856
|
-
if (
|
|
7895
|
+
var C = !0;
|
|
7896
|
+
if (C) {
|
|
7857
7897
|
if (r.step !== void 0) {
|
|
7858
7898
|
let i = r.step;
|
|
7859
7899
|
const p = e;
|
|
@@ -7881,10 +7921,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
7881
7921
|
message: "must be equal to constant"
|
|
7882
7922
|
}
|
|
7883
7923
|
], !1;
|
|
7884
|
-
var
|
|
7924
|
+
var C = p === e;
|
|
7885
7925
|
} else
|
|
7886
|
-
var
|
|
7887
|
-
if (
|
|
7926
|
+
var C = !0;
|
|
7927
|
+
if (C)
|
|
7888
7928
|
if (r.path !== void 0) {
|
|
7889
7929
|
const i = e;
|
|
7890
7930
|
if (typeof r.path != "string")
|
|
@@ -7899,9 +7939,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
7899
7939
|
message: "must be string"
|
|
7900
7940
|
}
|
|
7901
7941
|
], !1;
|
|
7902
|
-
var
|
|
7942
|
+
var C = i === e;
|
|
7903
7943
|
} else
|
|
7904
|
-
var
|
|
7944
|
+
var C = !0;
|
|
7905
7945
|
}
|
|
7906
7946
|
}
|
|
7907
7947
|
}
|
|
@@ -8320,10 +8360,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
8320
8360
|
message: "must be number"
|
|
8321
8361
|
}
|
|
8322
8362
|
], !1;
|
|
8323
|
-
var
|
|
8363
|
+
var M = E === e;
|
|
8324
8364
|
} else
|
|
8325
|
-
var
|
|
8326
|
-
if (
|
|
8365
|
+
var M = !0;
|
|
8366
|
+
if (M)
|
|
8327
8367
|
if (i.caption !== void 0) {
|
|
8328
8368
|
const a = e;
|
|
8329
8369
|
if (typeof i.caption != "string")
|
|
@@ -8338,9 +8378,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
8338
8378
|
message: "must be string"
|
|
8339
8379
|
}
|
|
8340
8380
|
], !1;
|
|
8341
|
-
var
|
|
8381
|
+
var M = a === e;
|
|
8342
8382
|
} else
|
|
8343
|
-
var
|
|
8383
|
+
var M = !0;
|
|
8344
8384
|
}
|
|
8345
8385
|
} else
|
|
8346
8386
|
return o.errors = [
|
|
@@ -8823,10 +8863,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
8823
8863
|
message: "must be number"
|
|
8824
8864
|
}
|
|
8825
8865
|
], !1;
|
|
8826
|
-
var
|
|
8866
|
+
var Ce = E === e;
|
|
8827
8867
|
} else
|
|
8828
|
-
var
|
|
8829
|
-
if (
|
|
8868
|
+
var Ce = !0;
|
|
8869
|
+
if (Ce)
|
|
8830
8870
|
if (i.caption !== void 0) {
|
|
8831
8871
|
const a = e;
|
|
8832
8872
|
if (typeof i.caption != "string")
|
|
@@ -8841,9 +8881,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
8841
8881
|
message: "must be string"
|
|
8842
8882
|
}
|
|
8843
8883
|
], !1;
|
|
8844
|
-
var
|
|
8884
|
+
var Ce = a === e;
|
|
8845
8885
|
} else
|
|
8846
|
-
var
|
|
8886
|
+
var Ce = !0;
|
|
8847
8887
|
}
|
|
8848
8888
|
} else
|
|
8849
8889
|
return o.errors = [
|
|
@@ -8909,8 +8949,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
8909
8949
|
};
|
|
8910
8950
|
s === null ? s = [J] : s.push(J), e++;
|
|
8911
8951
|
}
|
|
8912
|
-
var
|
|
8913
|
-
if (a = a ||
|
|
8952
|
+
var sr = E === e;
|
|
8953
|
+
if (a = a || sr, !a) {
|
|
8914
8954
|
const J = e;
|
|
8915
8955
|
if (e === J)
|
|
8916
8956
|
if (i && typeof i == "object" && !Array.isArray(
|
|
@@ -9014,8 +9054,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
9014
9054
|
le
|
|
9015
9055
|
), e++;
|
|
9016
9056
|
}
|
|
9017
|
-
var
|
|
9018
|
-
a = a ||
|
|
9057
|
+
var sr = J === e;
|
|
9058
|
+
a = a || sr;
|
|
9019
9059
|
}
|
|
9020
9060
|
if (a)
|
|
9021
9061
|
e = O, s !== null && (O ? s.length = O : s = null);
|
|
@@ -9386,10 +9426,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
9386
9426
|
message: "must be string"
|
|
9387
9427
|
}
|
|
9388
9428
|
], !1;
|
|
9389
|
-
var
|
|
9429
|
+
var Be = se === e;
|
|
9390
9430
|
} else
|
|
9391
|
-
var
|
|
9392
|
-
if (
|
|
9431
|
+
var Be = !0;
|
|
9432
|
+
if (Be)
|
|
9393
9433
|
if (i.adminPassword !== void 0) {
|
|
9394
9434
|
const se = e;
|
|
9395
9435
|
if (typeof i.adminPassword != "string")
|
|
@@ -9404,9 +9444,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
9404
9444
|
message: "must be string"
|
|
9405
9445
|
}
|
|
9406
9446
|
], !1;
|
|
9407
|
-
var
|
|
9447
|
+
var Be = se === e;
|
|
9408
9448
|
} else
|
|
9409
|
-
var
|
|
9449
|
+
var Be = !0;
|
|
9410
9450
|
}
|
|
9411
9451
|
} else
|
|
9412
9452
|
return o.errors = [
|
|
@@ -9505,10 +9545,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
9505
9545
|
message: "must be number"
|
|
9506
9546
|
}
|
|
9507
9547
|
], !1;
|
|
9508
|
-
var
|
|
9548
|
+
var Me = E === e;
|
|
9509
9549
|
} else
|
|
9510
|
-
var
|
|
9511
|
-
if (
|
|
9550
|
+
var Me = !0;
|
|
9551
|
+
if (Me)
|
|
9512
9552
|
if (i.caption !== void 0) {
|
|
9513
9553
|
const a = e;
|
|
9514
9554
|
if (typeof i.caption != "string")
|
|
@@ -9523,9 +9563,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
9523
9563
|
message: "must be string"
|
|
9524
9564
|
}
|
|
9525
9565
|
], !1;
|
|
9526
|
-
var
|
|
9566
|
+
var Me = a === e;
|
|
9527
9567
|
} else
|
|
9528
|
-
var
|
|
9568
|
+
var Me = !0;
|
|
9529
9569
|
}
|
|
9530
9570
|
} else
|
|
9531
9571
|
return o.errors = [
|
|
@@ -10413,8 +10453,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
10413
10453
|
fe
|
|
10414
10454
|
), e++;
|
|
10415
10455
|
}
|
|
10416
|
-
var
|
|
10417
|
-
if (!
|
|
10456
|
+
var Cr = Je === e;
|
|
10457
|
+
if (!Cr)
|
|
10418
10458
|
break;
|
|
10419
10459
|
}
|
|
10420
10460
|
if (ke === e) {
|
|
@@ -10470,7 +10510,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
10470
10510
|
const Xe = e;
|
|
10471
10511
|
for (const xe in G)
|
|
10472
10512
|
if (xe !== "byteLength") {
|
|
10473
|
-
const
|
|
10513
|
+
const De = {
|
|
10474
10514
|
instancePath: t + "/data/buffer",
|
|
10475
10515
|
schemaPath: "#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",
|
|
10476
10516
|
keyword: "additionalProperties",
|
|
@@ -10480,9 +10520,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
10480
10520
|
message: "must NOT have additional properties"
|
|
10481
10521
|
};
|
|
10482
10522
|
s === null ? s = [
|
|
10483
|
-
|
|
10523
|
+
De
|
|
10484
10524
|
] : s.push(
|
|
10485
|
-
|
|
10525
|
+
De
|
|
10486
10526
|
), e++;
|
|
10487
10527
|
break;
|
|
10488
10528
|
}
|
|
@@ -10491,7 +10531,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
10491
10531
|
if (!(typeof xe == "number" && isFinite(
|
|
10492
10532
|
xe
|
|
10493
10533
|
))) {
|
|
10494
|
-
const
|
|
10534
|
+
const De = {
|
|
10495
10535
|
instancePath: t + "/data/buffer/byteLength",
|
|
10496
10536
|
schemaPath: "#/oneOf/25/properties/data/anyOf/2/properties/buffer/properties/byteLength/type",
|
|
10497
10537
|
keyword: "type",
|
|
@@ -10501,9 +10541,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
10501
10541
|
message: "must be number"
|
|
10502
10542
|
};
|
|
10503
10543
|
s === null ? s = [
|
|
10504
|
-
|
|
10544
|
+
De
|
|
10505
10545
|
] : s.push(
|
|
10506
|
-
|
|
10546
|
+
De
|
|
10507
10547
|
), e++;
|
|
10508
10548
|
}
|
|
10509
10549
|
}
|
|
@@ -11001,14 +11041,14 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11001
11041
|
};
|
|
11002
11042
|
s === null ? s = [J] : s.push(J), e++;
|
|
11003
11043
|
}
|
|
11004
|
-
var
|
|
11005
|
-
if (a = a ||
|
|
11044
|
+
var ir = E === e;
|
|
11045
|
+
if (a = a || ir, !a) {
|
|
11006
11046
|
const J = e;
|
|
11007
11047
|
if (e === J)
|
|
11008
11048
|
if (Array.isArray(
|
|
11009
11049
|
i
|
|
11010
11050
|
)) {
|
|
11011
|
-
var
|
|
11051
|
+
var cr = !0;
|
|
11012
11052
|
const le = i.length;
|
|
11013
11053
|
for (let je = 0; je < le; je++) {
|
|
11014
11054
|
const ne = e;
|
|
@@ -11028,8 +11068,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11028
11068
|
G
|
|
11029
11069
|
), e++;
|
|
11030
11070
|
}
|
|
11031
|
-
var
|
|
11032
|
-
if (!
|
|
11071
|
+
var cr = ne === e;
|
|
11072
|
+
if (!cr)
|
|
11033
11073
|
break;
|
|
11034
11074
|
}
|
|
11035
11075
|
} else {
|
|
@@ -11048,8 +11088,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11048
11088
|
le
|
|
11049
11089
|
), e++;
|
|
11050
11090
|
}
|
|
11051
|
-
var
|
|
11052
|
-
a = a ||
|
|
11091
|
+
var ir = J === e;
|
|
11092
|
+
a = a || ir;
|
|
11053
11093
|
}
|
|
11054
11094
|
if (a)
|
|
11055
11095
|
e = O, s !== null && (O ? s.length = O : s = null);
|
|
@@ -11307,13 +11347,13 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11307
11347
|
], !1;
|
|
11308
11348
|
return o.errors = s, e === 0;
|
|
11309
11349
|
}
|
|
11310
|
-
function H(r, { instancePath: t = "", parentData: n, parentDataProperty:
|
|
11350
|
+
function H(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: u = r } = {}) {
|
|
11311
11351
|
let s = null, e = 0;
|
|
11312
11352
|
if (e === 0)
|
|
11313
11353
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
11314
11354
|
const re = e;
|
|
11315
11355
|
for (const c in r)
|
|
11316
|
-
if (!
|
|
11356
|
+
if (!Nr.call(Yt.properties, c))
|
|
11317
11357
|
return H.errors = [
|
|
11318
11358
|
{
|
|
11319
11359
|
instancePath: t,
|
|
@@ -11336,10 +11376,10 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11336
11376
|
message: "must be string"
|
|
11337
11377
|
}
|
|
11338
11378
|
], !1;
|
|
11339
|
-
var
|
|
11379
|
+
var d = c === e;
|
|
11340
11380
|
} else
|
|
11341
|
-
var
|
|
11342
|
-
if (
|
|
11381
|
+
var d = !0;
|
|
11382
|
+
if (d) {
|
|
11343
11383
|
if (r.description !== void 0) {
|
|
11344
11384
|
const c = e;
|
|
11345
11385
|
if (typeof r.description != "string")
|
|
@@ -11352,10 +11392,10 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11352
11392
|
message: "must be string"
|
|
11353
11393
|
}
|
|
11354
11394
|
], !1;
|
|
11355
|
-
var
|
|
11395
|
+
var d = c === e;
|
|
11356
11396
|
} else
|
|
11357
|
-
var
|
|
11358
|
-
if (
|
|
11397
|
+
var d = !0;
|
|
11398
|
+
if (d) {
|
|
11359
11399
|
if (r.meta !== void 0) {
|
|
11360
11400
|
let c = r.meta;
|
|
11361
11401
|
const S = e;
|
|
@@ -11454,7 +11494,7 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11454
11494
|
var N = !0;
|
|
11455
11495
|
const q = v.length;
|
|
11456
11496
|
for (let R = 0; R < q; R++) {
|
|
11457
|
-
const
|
|
11497
|
+
const D = e;
|
|
11458
11498
|
if (typeof v[R] != "string")
|
|
11459
11499
|
return H.errors = [
|
|
11460
11500
|
{
|
|
@@ -11467,7 +11507,7 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11467
11507
|
message: "must be string"
|
|
11468
11508
|
}
|
|
11469
11509
|
], !1;
|
|
11470
|
-
var N =
|
|
11510
|
+
var N = D === e;
|
|
11471
11511
|
if (!N)
|
|
11472
11512
|
break;
|
|
11473
11513
|
}
|
|
@@ -11500,10 +11540,10 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11500
11540
|
message: "must be object"
|
|
11501
11541
|
}
|
|
11502
11542
|
], !1;
|
|
11503
|
-
var
|
|
11543
|
+
var d = S === e;
|
|
11504
11544
|
} else
|
|
11505
|
-
var
|
|
11506
|
-
if (
|
|
11545
|
+
var d = !0;
|
|
11546
|
+
if (d) {
|
|
11507
11547
|
if (r.preferredVersions !== void 0) {
|
|
11508
11548
|
let c = r.preferredVersions;
|
|
11509
11549
|
const S = e;
|
|
@@ -11544,7 +11584,7 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11544
11584
|
let q = !1;
|
|
11545
11585
|
const R = e;
|
|
11546
11586
|
if (typeof v != "string") {
|
|
11547
|
-
const
|
|
11587
|
+
const D = {
|
|
11548
11588
|
instancePath: t + "/preferredVersions/php",
|
|
11549
11589
|
schemaPath: "#/definitions/SupportedPHPVersion/type",
|
|
11550
11590
|
keyword: "type",
|
|
@@ -11553,23 +11593,23 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11553
11593
|
},
|
|
11554
11594
|
message: "must be string"
|
|
11555
11595
|
};
|
|
11556
|
-
s === null ? s = [
|
|
11596
|
+
s === null ? s = [D] : s.push(D), e++;
|
|
11557
11597
|
}
|
|
11558
11598
|
if (!(v === "8.4" || v === "8.3" || v === "8.2" || v === "8.1" || v === "8.0" || v === "7.4" || v === "7.3" || v === "7.2")) {
|
|
11559
|
-
const
|
|
11599
|
+
const D = {
|
|
11560
11600
|
instancePath: t + "/preferredVersions/php",
|
|
11561
11601
|
schemaPath: "#/definitions/SupportedPHPVersion/enum",
|
|
11562
11602
|
keyword: "enum",
|
|
11563
11603
|
params: {
|
|
11564
|
-
allowedValues:
|
|
11604
|
+
allowedValues: Gt.enum
|
|
11565
11605
|
},
|
|
11566
11606
|
message: "must be equal to one of the allowed values"
|
|
11567
11607
|
};
|
|
11568
|
-
s === null ? s = [
|
|
11608
|
+
s === null ? s = [D] : s.push(D), e++;
|
|
11569
11609
|
}
|
|
11570
11610
|
var F = R === e;
|
|
11571
11611
|
if (q = q || F, !q) {
|
|
11572
|
-
const
|
|
11612
|
+
const D = e;
|
|
11573
11613
|
if (typeof v != "string") {
|
|
11574
11614
|
const U = {
|
|
11575
11615
|
instancePath: t + "/preferredVersions/php",
|
|
@@ -11602,20 +11642,20 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11602
11642
|
U
|
|
11603
11643
|
), e++;
|
|
11604
11644
|
}
|
|
11605
|
-
var F =
|
|
11645
|
+
var F = D === e;
|
|
11606
11646
|
q = q || F;
|
|
11607
11647
|
}
|
|
11608
11648
|
if (q)
|
|
11609
11649
|
e = b, s !== null && (b ? s.length = b : s = null);
|
|
11610
11650
|
else {
|
|
11611
|
-
const
|
|
11651
|
+
const D = {
|
|
11612
11652
|
instancePath: t + "/preferredVersions/php",
|
|
11613
11653
|
schemaPath: "#/properties/preferredVersions/properties/php/anyOf",
|
|
11614
11654
|
keyword: "anyOf",
|
|
11615
11655
|
params: {},
|
|
11616
11656
|
message: "must match a schema in anyOf"
|
|
11617
11657
|
};
|
|
11618
|
-
return s === null ? s = [
|
|
11658
|
+
return s === null ? s = [D] : s.push(D), e++, H.errors = s, !1;
|
|
11619
11659
|
}
|
|
11620
11660
|
var T = h === e;
|
|
11621
11661
|
} else
|
|
@@ -11650,10 +11690,10 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11650
11690
|
message: "must be object"
|
|
11651
11691
|
}
|
|
11652
11692
|
], !1;
|
|
11653
|
-
var
|
|
11693
|
+
var d = S === e;
|
|
11654
11694
|
} else
|
|
11655
|
-
var
|
|
11656
|
-
if (
|
|
11695
|
+
var d = !0;
|
|
11696
|
+
if (d) {
|
|
11657
11697
|
if (r.features !== void 0) {
|
|
11658
11698
|
let c = r.features;
|
|
11659
11699
|
const S = e;
|
|
@@ -11720,10 +11760,10 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11720
11760
|
message: "must be object"
|
|
11721
11761
|
}
|
|
11722
11762
|
], !1;
|
|
11723
|
-
var
|
|
11763
|
+
var d = S === e;
|
|
11724
11764
|
} else
|
|
11725
|
-
var
|
|
11726
|
-
if (
|
|
11765
|
+
var d = !0;
|
|
11766
|
+
if (d) {
|
|
11727
11767
|
if (r.extraLibraries !== void 0) {
|
|
11728
11768
|
let c = r.extraLibraries;
|
|
11729
11769
|
const S = e;
|
|
@@ -11774,10 +11814,10 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11774
11814
|
message: "must be array"
|
|
11775
11815
|
}
|
|
11776
11816
|
], !1;
|
|
11777
|
-
var
|
|
11817
|
+
var d = S === e;
|
|
11778
11818
|
} else
|
|
11779
|
-
var
|
|
11780
|
-
if (
|
|
11819
|
+
var d = !0;
|
|
11820
|
+
if (d) {
|
|
11781
11821
|
if (r.constants !== void 0) {
|
|
11782
11822
|
let c = r.constants;
|
|
11783
11823
|
const S = e;
|
|
@@ -11799,7 +11839,7 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11799
11839
|
schemaPath: "#/definitions/PHPConstants/additionalProperties/type",
|
|
11800
11840
|
keyword: "type",
|
|
11801
11841
|
params: {
|
|
11802
|
-
type:
|
|
11842
|
+
type: Qt.additionalProperties.type
|
|
11803
11843
|
},
|
|
11804
11844
|
message: "must be string,boolean,number"
|
|
11805
11845
|
}
|
|
@@ -11820,10 +11860,10 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11820
11860
|
message: "must be object"
|
|
11821
11861
|
}
|
|
11822
11862
|
], !1;
|
|
11823
|
-
var
|
|
11863
|
+
var d = S === e;
|
|
11824
11864
|
} else
|
|
11825
|
-
var
|
|
11826
|
-
if (
|
|
11865
|
+
var d = !0;
|
|
11866
|
+
if (d) {
|
|
11827
11867
|
if (r.plugins !== void 0) {
|
|
11828
11868
|
let c = r.plugins;
|
|
11829
11869
|
const S = e;
|
|
@@ -11901,10 +11941,10 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11901
11941
|
message: "must be array"
|
|
11902
11942
|
}
|
|
11903
11943
|
], !1;
|
|
11904
|
-
var
|
|
11944
|
+
var d = S === e;
|
|
11905
11945
|
} else
|
|
11906
|
-
var
|
|
11907
|
-
if (
|
|
11946
|
+
var d = !0;
|
|
11947
|
+
if (d) {
|
|
11908
11948
|
if (r.siteOptions !== void 0) {
|
|
11909
11949
|
let c = r.siteOptions;
|
|
11910
11950
|
const S = e;
|
|
@@ -11962,10 +12002,10 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
11962
12002
|
message: "must be object"
|
|
11963
12003
|
}
|
|
11964
12004
|
], !1;
|
|
11965
|
-
var
|
|
12005
|
+
var d = S === e;
|
|
11966
12006
|
} else
|
|
11967
|
-
var
|
|
11968
|
-
if (
|
|
12007
|
+
var d = !0;
|
|
12008
|
+
if (d) {
|
|
11969
12009
|
if (r.login !== void 0) {
|
|
11970
12010
|
let c = r.login;
|
|
11971
12011
|
const S = e, g = e;
|
|
@@ -12012,14 +12052,14 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12012
12052
|
), e++;
|
|
12013
12053
|
} else {
|
|
12014
12054
|
const R = e;
|
|
12015
|
-
for (const
|
|
12016
|
-
if (!(
|
|
12055
|
+
for (const D in c)
|
|
12056
|
+
if (!(D === "username" || D === "password")) {
|
|
12017
12057
|
const L = {
|
|
12018
12058
|
instancePath: t + "/login",
|
|
12019
12059
|
schemaPath: "#/properties/login/anyOf/1/additionalProperties",
|
|
12020
12060
|
keyword: "additionalProperties",
|
|
12021
12061
|
params: {
|
|
12022
|
-
additionalProperty:
|
|
12062
|
+
additionalProperty: D
|
|
12023
12063
|
},
|
|
12024
12064
|
message: "must NOT have additional properties"
|
|
12025
12065
|
};
|
|
@@ -12032,7 +12072,7 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12032
12072
|
}
|
|
12033
12073
|
if (R === e) {
|
|
12034
12074
|
if (c.username !== void 0) {
|
|
12035
|
-
const
|
|
12075
|
+
const D = e;
|
|
12036
12076
|
if (typeof c.username != "string") {
|
|
12037
12077
|
const L = {
|
|
12038
12078
|
instancePath: t + "/login/username",
|
|
@@ -12049,12 +12089,12 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12049
12089
|
L
|
|
12050
12090
|
), e++;
|
|
12051
12091
|
}
|
|
12052
|
-
var j =
|
|
12092
|
+
var j = D === e;
|
|
12053
12093
|
} else
|
|
12054
12094
|
var j = !0;
|
|
12055
12095
|
if (j)
|
|
12056
12096
|
if (c.password !== void 0) {
|
|
12057
|
-
const
|
|
12097
|
+
const D = e;
|
|
12058
12098
|
if (typeof c.password != "string") {
|
|
12059
12099
|
const U = {
|
|
12060
12100
|
instancePath: t + "/login/password",
|
|
@@ -12071,7 +12111,7 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12071
12111
|
U
|
|
12072
12112
|
), e++;
|
|
12073
12113
|
}
|
|
12074
|
-
var j =
|
|
12114
|
+
var j = D === e;
|
|
12075
12115
|
} else
|
|
12076
12116
|
var j = !0;
|
|
12077
12117
|
}
|
|
@@ -12111,10 +12151,10 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12111
12151
|
h
|
|
12112
12152
|
), e++, H.errors = s, !1;
|
|
12113
12153
|
}
|
|
12114
|
-
var
|
|
12154
|
+
var d = S === e;
|
|
12115
12155
|
} else
|
|
12116
|
-
var
|
|
12117
|
-
if (
|
|
12156
|
+
var d = !0;
|
|
12157
|
+
if (d) {
|
|
12118
12158
|
if (r.steps !== void 0) {
|
|
12119
12159
|
let c = r.steps;
|
|
12120
12160
|
const S = e;
|
|
@@ -12140,11 +12180,11 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12140
12180
|
) || (s = s === null ? o.errors : s.concat(
|
|
12141
12181
|
o.errors
|
|
12142
12182
|
), e = s.length);
|
|
12143
|
-
var
|
|
12144
|
-
if (q = q ||
|
|
12183
|
+
var B = R === e;
|
|
12184
|
+
if (q = q || B, !q) {
|
|
12145
12185
|
const L = e;
|
|
12146
12186
|
if (typeof v != "string") {
|
|
12147
|
-
const
|
|
12187
|
+
const C = {
|
|
12148
12188
|
instancePath: t + "/steps/" + P,
|
|
12149
12189
|
schemaPath: "#/properties/steps/items/anyOf/1/type",
|
|
12150
12190
|
keyword: "type",
|
|
@@ -12154,14 +12194,14 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12154
12194
|
message: "must be string"
|
|
12155
12195
|
};
|
|
12156
12196
|
s === null ? s = [
|
|
12157
|
-
|
|
12197
|
+
C
|
|
12158
12198
|
] : s.push(
|
|
12159
|
-
|
|
12199
|
+
C
|
|
12160
12200
|
), e++;
|
|
12161
12201
|
}
|
|
12162
|
-
var
|
|
12163
|
-
if (q = q ||
|
|
12164
|
-
const
|
|
12202
|
+
var B = L === e;
|
|
12203
|
+
if (q = q || B, !q) {
|
|
12204
|
+
const C = e, I = {
|
|
12165
12205
|
instancePath: t + "/steps/" + P,
|
|
12166
12206
|
schemaPath: "#/properties/steps/items/anyOf/2/not",
|
|
12167
12207
|
keyword: "not",
|
|
@@ -12173,11 +12213,11 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12173
12213
|
] : s.push(
|
|
12174
12214
|
I
|
|
12175
12215
|
), e++;
|
|
12176
|
-
var
|
|
12177
|
-
if (q = q ||
|
|
12216
|
+
var B = C === e;
|
|
12217
|
+
if (q = q || B, !q) {
|
|
12178
12218
|
const A = e;
|
|
12179
12219
|
if (typeof v != "boolean") {
|
|
12180
|
-
const
|
|
12220
|
+
const M = {
|
|
12181
12221
|
instancePath: t + "/steps/" + P,
|
|
12182
12222
|
schemaPath: "#/properties/steps/items/anyOf/3/type",
|
|
12183
12223
|
keyword: "type",
|
|
@@ -12187,13 +12227,13 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12187
12227
|
message: "must be boolean"
|
|
12188
12228
|
};
|
|
12189
12229
|
s === null ? s = [
|
|
12190
|
-
|
|
12230
|
+
M
|
|
12191
12231
|
] : s.push(
|
|
12192
|
-
|
|
12232
|
+
M
|
|
12193
12233
|
), e++;
|
|
12194
12234
|
}
|
|
12195
12235
|
if (v !== !1) {
|
|
12196
|
-
const
|
|
12236
|
+
const M = {
|
|
12197
12237
|
instancePath: t + "/steps/" + P,
|
|
12198
12238
|
schemaPath: "#/properties/steps/items/anyOf/3/const",
|
|
12199
12239
|
keyword: "const",
|
|
@@ -12203,14 +12243,14 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12203
12243
|
message: "must be equal to constant"
|
|
12204
12244
|
};
|
|
12205
12245
|
s === null ? s = [
|
|
12206
|
-
|
|
12246
|
+
M
|
|
12207
12247
|
] : s.push(
|
|
12208
|
-
|
|
12248
|
+
M
|
|
12209
12249
|
), e++;
|
|
12210
12250
|
}
|
|
12211
|
-
var
|
|
12212
|
-
if (q = q ||
|
|
12213
|
-
const
|
|
12251
|
+
var B = A === e;
|
|
12252
|
+
if (q = q || B, !q) {
|
|
12253
|
+
const M = e;
|
|
12214
12254
|
if (v !== null) {
|
|
12215
12255
|
const oe = {
|
|
12216
12256
|
instancePath: t + "/steps/" + P,
|
|
@@ -12227,8 +12267,8 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12227
12267
|
oe
|
|
12228
12268
|
), e++;
|
|
12229
12269
|
}
|
|
12230
|
-
var
|
|
12231
|
-
q = q ||
|
|
12270
|
+
var B = M === e;
|
|
12271
|
+
q = q || B;
|
|
12232
12272
|
}
|
|
12233
12273
|
}
|
|
12234
12274
|
}
|
|
@@ -12265,10 +12305,10 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12265
12305
|
message: "must be array"
|
|
12266
12306
|
}
|
|
12267
12307
|
], !1;
|
|
12268
|
-
var
|
|
12308
|
+
var d = S === e;
|
|
12269
12309
|
} else
|
|
12270
|
-
var
|
|
12271
|
-
if (
|
|
12310
|
+
var d = !0;
|
|
12311
|
+
if (d)
|
|
12272
12312
|
if (r.$schema !== void 0) {
|
|
12273
12313
|
const c = e;
|
|
12274
12314
|
if (typeof r.$schema != "string")
|
|
@@ -12283,9 +12323,9 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12283
12323
|
message: "must be string"
|
|
12284
12324
|
}
|
|
12285
12325
|
], !1;
|
|
12286
|
-
var
|
|
12326
|
+
var d = c === e;
|
|
12287
12327
|
} else
|
|
12288
|
-
var
|
|
12328
|
+
var d = !0;
|
|
12289
12329
|
}
|
|
12290
12330
|
}
|
|
12291
12331
|
}
|
|
@@ -12309,54 +12349,54 @@ function H(r, { instancePath: t = "", parentData: n, parentDataProperty: d, root
|
|
|
12309
12349
|
], !1;
|
|
12310
12350
|
return H.errors = s, e === 0;
|
|
12311
12351
|
}
|
|
12312
|
-
function er(r, { instancePath: t = "", parentData: n, parentDataProperty:
|
|
12352
|
+
function er(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: u = r } = {}) {
|
|
12313
12353
|
let s = null, e = 0;
|
|
12314
12354
|
return H(r, {
|
|
12315
12355
|
instancePath: t,
|
|
12316
12356
|
parentData: n,
|
|
12317
|
-
parentDataProperty:
|
|
12357
|
+
parentDataProperty: f,
|
|
12318
12358
|
rootData: u
|
|
12319
12359
|
}) || (s = s === null ? H.errors : s.concat(H.errors), e = s.length), er.errors = s, e === 0;
|
|
12320
12360
|
}
|
|
12321
|
-
const { wpCLI:
|
|
12322
|
-
...
|
|
12323
|
-
"wp-cli":
|
|
12324
|
-
importFile:
|
|
12361
|
+
const { wpCLI: Kt, ...yr } = Zt, es = {
|
|
12362
|
+
...yr,
|
|
12363
|
+
"wp-cli": Kt,
|
|
12364
|
+
importFile: yr.importWxr
|
|
12325
12365
|
};
|
|
12326
|
-
async function
|
|
12366
|
+
async function rs(r, t = {}) {
|
|
12327
12367
|
const n = {
|
|
12328
12368
|
...t
|
|
12329
12369
|
};
|
|
12330
|
-
let
|
|
12331
|
-
return
|
|
12370
|
+
let f;
|
|
12371
|
+
return Dr(r) ? (f = await ts(r), n.streamBundledFile = function(...u) {
|
|
12332
12372
|
return r.read(...u);
|
|
12333
|
-
}) :
|
|
12373
|
+
}) : f = r, ss(f, n);
|
|
12334
12374
|
}
|
|
12335
|
-
function
|
|
12375
|
+
function Dr(r) {
|
|
12336
12376
|
return r && "read" in r && typeof r.read == "function";
|
|
12337
12377
|
}
|
|
12338
|
-
async function
|
|
12339
|
-
if (!
|
|
12378
|
+
async function ts(r) {
|
|
12379
|
+
if (!Dr(r))
|
|
12340
12380
|
return r;
|
|
12341
12381
|
const n = await (await r.read("blueprint.json")).text();
|
|
12342
12382
|
return JSON.parse(n);
|
|
12343
12383
|
}
|
|
12344
|
-
function
|
|
12345
|
-
progress: t = new
|
|
12346
|
-
semaphore: n = new
|
|
12347
|
-
onStepCompleted:
|
|
12384
|
+
function ss(r, {
|
|
12385
|
+
progress: t = new Ur(),
|
|
12386
|
+
semaphore: n = new vr({ concurrency: 3 }),
|
|
12387
|
+
onStepCompleted: f = () => {
|
|
12348
12388
|
},
|
|
12349
12389
|
onBlueprintValidated: u = () => {
|
|
12350
12390
|
},
|
|
12351
12391
|
corsProxy: s,
|
|
12352
12392
|
streamBundledFile: e,
|
|
12353
|
-
additionalSteps:
|
|
12393
|
+
additionalSteps: d
|
|
12354
12394
|
} = {}) {
|
|
12355
|
-
var m, W, z, Y, j, K,
|
|
12395
|
+
var m, W, z, Y, j, K, B, re, c, S;
|
|
12356
12396
|
r = structuredClone(r), r = {
|
|
12357
12397
|
...r,
|
|
12358
|
-
steps: (r.steps || []).filter(
|
|
12359
|
-
}, r.steps = [...r.steps || [], ...
|
|
12398
|
+
steps: (r.steps || []).filter(as).filter(ns)
|
|
12399
|
+
}, r.steps = [...r.steps || [], ...d || []];
|
|
12360
12400
|
for (const g of r.steps)
|
|
12361
12401
|
!g || typeof g != "object" || (g.step === "importFile" ? (g.step = "importWxr", ae.warn(
|
|
12362
12402
|
'The "importFile" step is deprecated. Use "importWxr" instead.'
|
|
@@ -12394,8 +12434,8 @@ function Kt(r, {
|
|
|
12394
12434
|
if ((W = r == null ? void 0 : r.extraLibraries) != null && W.includes("wp-cli") || y !== -1) {
|
|
12395
12435
|
const g = {
|
|
12396
12436
|
step: "writeFile",
|
|
12397
|
-
data:
|
|
12398
|
-
path:
|
|
12437
|
+
data: Tt,
|
|
12438
|
+
path: fr
|
|
12399
12439
|
};
|
|
12400
12440
|
y === -1 ? (z = r.steps) == null || z.push(g) : (Y = r.steps) == null || Y.splice(
|
|
12401
12441
|
y,
|
|
@@ -12413,7 +12453,7 @@ function Kt(r, {
|
|
|
12413
12453
|
slug: "wordpress-importer"
|
|
12414
12454
|
}
|
|
12415
12455
|
}));
|
|
12416
|
-
const { valid: F, errors: T } =
|
|
12456
|
+
const { valid: F, errors: T } = is(r);
|
|
12417
12457
|
if (!F) {
|
|
12418
12458
|
const g = new Error(
|
|
12419
12459
|
`Invalid blueprint: ${T[0].message} at ${T[0].instancePath}`
|
|
@@ -12428,7 +12468,7 @@ function Kt(r, {
|
|
|
12428
12468
|
},
|
|
12429
12469
|
0
|
|
12430
12470
|
), $ = _.map(
|
|
12431
|
-
(g) =>
|
|
12471
|
+
(g) => ps(g, {
|
|
12432
12472
|
semaphore: n,
|
|
12433
12473
|
rootProgressTracker: t,
|
|
12434
12474
|
totalProgressWeight: k,
|
|
@@ -12438,10 +12478,10 @@ function Kt(r, {
|
|
|
12438
12478
|
);
|
|
12439
12479
|
return {
|
|
12440
12480
|
versions: {
|
|
12441
|
-
php:
|
|
12442
|
-
(
|
|
12481
|
+
php: os(
|
|
12482
|
+
(B = r.preferredVersions) == null ? void 0 : B.php,
|
|
12443
12483
|
Mr,
|
|
12444
|
-
|
|
12484
|
+
Br
|
|
12445
12485
|
),
|
|
12446
12486
|
wp: ((re = r.preferredVersions) == null ? void 0 : re.wp) || "latest"
|
|
12447
12487
|
},
|
|
@@ -12461,7 +12501,7 @@ function Kt(r, {
|
|
|
12461
12501
|
for (const [w, { run: P, step: v }] of Object.entries($))
|
|
12462
12502
|
try {
|
|
12463
12503
|
const h = await P(g);
|
|
12464
|
-
|
|
12504
|
+
f(h, v);
|
|
12465
12505
|
} catch (h) {
|
|
12466
12506
|
throw new Error(
|
|
12467
12507
|
`Error when executing the blueprint step #${w} (${JSON.stringify(
|
|
@@ -12483,7 +12523,7 @@ function Kt(r, {
|
|
|
12483
12523
|
}
|
|
12484
12524
|
};
|
|
12485
12525
|
}
|
|
12486
|
-
function
|
|
12526
|
+
function is(r) {
|
|
12487
12527
|
var u;
|
|
12488
12528
|
const t = er(r);
|
|
12489
12529
|
if (t)
|
|
@@ -12491,50 +12531,50 @@ function es(r) {
|
|
|
12491
12531
|
const n = /* @__PURE__ */ new Set();
|
|
12492
12532
|
for (const s of er.errors)
|
|
12493
12533
|
s.schemaPath.startsWith("#/properties/steps/items/anyOf") || n.add(s.instancePath);
|
|
12494
|
-
const
|
|
12534
|
+
const f = (u = er.errors) == null ? void 0 : u.filter(
|
|
12495
12535
|
(s) => !(s.schemaPath.startsWith("#/properties/steps/items/anyOf") && n.has(s.instancePath))
|
|
12496
12536
|
);
|
|
12497
12537
|
return {
|
|
12498
12538
|
valid: t,
|
|
12499
|
-
errors:
|
|
12539
|
+
errors: f
|
|
12500
12540
|
};
|
|
12501
12541
|
}
|
|
12502
|
-
function
|
|
12542
|
+
function os(r, t, n) {
|
|
12503
12543
|
return r && t.includes(r) ? r : n;
|
|
12504
12544
|
}
|
|
12505
|
-
function
|
|
12545
|
+
function as(r) {
|
|
12506
12546
|
return !!(typeof r == "object" && r);
|
|
12507
12547
|
}
|
|
12508
|
-
function
|
|
12548
|
+
function ns(r) {
|
|
12509
12549
|
return ["setPhpIniEntry", "request"].includes(r.step) ? (ae.warn(
|
|
12510
12550
|
`The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`
|
|
12511
12551
|
), !1) : !0;
|
|
12512
12552
|
}
|
|
12513
|
-
function
|
|
12553
|
+
function ps(r, {
|
|
12514
12554
|
semaphore: t,
|
|
12515
12555
|
rootProgressTracker: n,
|
|
12516
|
-
totalProgressWeight:
|
|
12556
|
+
totalProgressWeight: f,
|
|
12517
12557
|
corsProxy: u,
|
|
12518
12558
|
streamBundledFile: s
|
|
12519
12559
|
}) {
|
|
12520
12560
|
var _;
|
|
12521
12561
|
const e = n.stage(
|
|
12522
|
-
(((_ = r.progress) == null ? void 0 : _.weight) || 1) /
|
|
12523
|
-
),
|
|
12562
|
+
(((_ = r.progress) == null ? void 0 : _.weight) || 1) / f
|
|
12563
|
+
), d = {};
|
|
12524
12564
|
for (const k of Object.keys(r)) {
|
|
12525
12565
|
let $ = r[k];
|
|
12526
|
-
|
|
12566
|
+
ot($) && ($ = Te.create($, {
|
|
12527
12567
|
semaphore: t,
|
|
12528
12568
|
corsProxy: u,
|
|
12529
12569
|
streamBundledFile: s
|
|
12530
|
-
})),
|
|
12570
|
+
})), d[k] = $;
|
|
12531
12571
|
}
|
|
12532
12572
|
const y = async (k) => {
|
|
12533
12573
|
var $;
|
|
12534
12574
|
try {
|
|
12535
|
-
return e.fillSlowly(), await
|
|
12575
|
+
return e.fillSlowly(), await es[r.step](
|
|
12536
12576
|
k,
|
|
12537
|
-
await
|
|
12577
|
+
await ls(d),
|
|
12538
12578
|
{
|
|
12539
12579
|
tracker: e,
|
|
12540
12580
|
initialCaption: ($ = r.progress) == null ? void 0 : $.caption
|
|
@@ -12543,33 +12583,33 @@ function is(r, {
|
|
|
12543
12583
|
} finally {
|
|
12544
12584
|
e.finish();
|
|
12545
12585
|
}
|
|
12546
|
-
}, N =
|
|
12586
|
+
}, N = hr(d), F = hr(d).filter(
|
|
12547
12587
|
(k) => k.isAsync
|
|
12548
12588
|
), T = 1 / (F.length + 1);
|
|
12549
12589
|
for (const k of F)
|
|
12550
12590
|
k.progress = e.stage(T);
|
|
12551
12591
|
return { run: y, step: r, resources: N };
|
|
12552
12592
|
}
|
|
12553
|
-
function
|
|
12593
|
+
function hr(r) {
|
|
12554
12594
|
const t = [];
|
|
12555
12595
|
for (const n in r) {
|
|
12556
|
-
const
|
|
12557
|
-
|
|
12596
|
+
const f = r[n];
|
|
12597
|
+
f instanceof Te && t.push(f);
|
|
12558
12598
|
}
|
|
12559
12599
|
return t;
|
|
12560
12600
|
}
|
|
12561
|
-
async function
|
|
12601
|
+
async function ls(r) {
|
|
12562
12602
|
const t = {};
|
|
12563
12603
|
for (const n in r) {
|
|
12564
|
-
const
|
|
12565
|
-
|
|
12604
|
+
const f = r[n];
|
|
12605
|
+
f instanceof Te ? t[n] = await f.resolve() : t[n] = f;
|
|
12566
12606
|
}
|
|
12567
12607
|
return t;
|
|
12568
12608
|
}
|
|
12569
|
-
async function
|
|
12609
|
+
async function ks(r, t) {
|
|
12570
12610
|
await r.run(t);
|
|
12571
12611
|
}
|
|
12572
|
-
async function
|
|
12612
|
+
async function fs() {
|
|
12573
12613
|
const r = (
|
|
12574
12614
|
// @ts-ignore
|
|
12575
12615
|
(await import("./blueprints-Dg6flSLH.js")).default
|
|
@@ -12578,7 +12618,7 @@ async function as() {
|
|
|
12578
12618
|
type: "application/zip"
|
|
12579
12619
|
});
|
|
12580
12620
|
}
|
|
12581
|
-
function
|
|
12621
|
+
function ds(r) {
|
|
12582
12622
|
if (typeof r == "object" && "type" in r && ["inline-file", "file-reference"].includes(r.type))
|
|
12583
12623
|
return r;
|
|
12584
12624
|
if (!r)
|
|
@@ -12603,7 +12643,7 @@ function ns(r) {
|
|
|
12603
12643
|
};
|
|
12604
12644
|
}
|
|
12605
12645
|
}
|
|
12606
|
-
async function
|
|
12646
|
+
async function Os(r) {
|
|
12607
12647
|
var F, T;
|
|
12608
12648
|
const t = r.cliArgs || [];
|
|
12609
12649
|
for (const _ of t)
|
|
@@ -12612,28 +12652,28 @@ async function Ps(r) {
|
|
|
12612
12652
|
"The --site-path CLI argument must not be provided. In Playground, it is always set to /wordpress."
|
|
12613
12653
|
);
|
|
12614
12654
|
t.push("--site-path=/wordpress"), t.find((_) => _.startsWith("--db-engine=")) || t.push("--db-engine=sqlite");
|
|
12615
|
-
const
|
|
12616
|
-
}), s = await
|
|
12617
|
-
|
|
12655
|
+
const f = r.php, u = (r == null ? void 0 : r.onMessage) || (() => {
|
|
12656
|
+
}), s = await fs();
|
|
12657
|
+
f.writeFile(
|
|
12618
12658
|
"/tmp/blueprints.phar",
|
|
12619
12659
|
new Uint8Array(await s.arrayBuffer())
|
|
12620
12660
|
);
|
|
12621
|
-
const e =
|
|
12661
|
+
const e = ds(
|
|
12622
12662
|
r.blueprint
|
|
12623
12663
|
);
|
|
12624
|
-
let
|
|
12664
|
+
let d = "";
|
|
12625
12665
|
switch (e.type) {
|
|
12626
12666
|
case "inline-file":
|
|
12627
|
-
|
|
12667
|
+
f.writeFile(
|
|
12628
12668
|
"/tmp/blueprint.json",
|
|
12629
12669
|
e.contents
|
|
12630
|
-
),
|
|
12670
|
+
), d = "/tmp/blueprint.json";
|
|
12631
12671
|
break;
|
|
12632
12672
|
case "file-reference":
|
|
12633
|
-
|
|
12673
|
+
d = e.reference;
|
|
12634
12674
|
break;
|
|
12635
12675
|
}
|
|
12636
|
-
const y = await
|
|
12676
|
+
const y = await f.onMessage(async (_) => {
|
|
12637
12677
|
try {
|
|
12638
12678
|
const k = typeof _ == "string" ? JSON.parse(_) : _;
|
|
12639
12679
|
if (!k)
|
|
@@ -12643,7 +12683,7 @@ async function Ps(r) {
|
|
|
12643
12683
|
ae.warn("Failed to parse message as JSON:", _, k);
|
|
12644
12684
|
}
|
|
12645
12685
|
});
|
|
12646
|
-
await (
|
|
12686
|
+
await (f == null ? void 0 : f.writeFile(
|
|
12647
12687
|
"/tmp/run-blueprints.php",
|
|
12648
12688
|
`<?php
|
|
12649
12689
|
function playground_http_client_factory() {
|
|
@@ -12732,16 +12772,16 @@ playground_add_filter('blueprint.progress_reporter', 'playground_progress_report
|
|
|
12732
12772
|
require( "/tmp/blueprints.phar" );
|
|
12733
12773
|
`
|
|
12734
12774
|
));
|
|
12735
|
-
const N = await
|
|
12775
|
+
const N = await f.cli([
|
|
12736
12776
|
"/internal/shared/bin/php",
|
|
12737
12777
|
"/tmp/run-blueprints.php",
|
|
12738
12778
|
"exec",
|
|
12739
|
-
|
|
12779
|
+
d,
|
|
12740
12780
|
...t
|
|
12741
12781
|
]);
|
|
12742
12782
|
return N.finished.finally(y), N;
|
|
12743
12783
|
}
|
|
12744
|
-
async function
|
|
12784
|
+
async function Ts(r) {
|
|
12745
12785
|
const t = await fetch(r, {
|
|
12746
12786
|
credentials: "omit"
|
|
12747
12787
|
});
|
|
@@ -12749,73 +12789,107 @@ async function _s(r) {
|
|
|
12749
12789
|
throw new Error(`Failed to fetch blueprint from ${r}`);
|
|
12750
12790
|
const n = await t.arrayBuffer();
|
|
12751
12791
|
try {
|
|
12752
|
-
const
|
|
12753
|
-
return JSON.parse(
|
|
12754
|
-
new Yr({
|
|
12755
|
-
"blueprint.json": d
|
|
12756
|
-
}),
|
|
12792
|
+
const f = new TextDecoder().decode(n);
|
|
12793
|
+
return JSON.parse(f), new Yr([
|
|
12757
12794
|
new Gr({
|
|
12795
|
+
"blueprint.json": f
|
|
12796
|
+
}),
|
|
12797
|
+
new Qr({
|
|
12758
12798
|
baseUrl: r
|
|
12759
12799
|
})
|
|
12760
12800
|
]);
|
|
12761
12801
|
} catch {
|
|
12762
|
-
if (await
|
|
12763
|
-
return
|
|
12802
|
+
if (await us(n))
|
|
12803
|
+
return Jr.fromArrayBuffer(n);
|
|
12764
12804
|
throw new Error(
|
|
12765
12805
|
`Blueprint file at ${r} is neither a valid JSON nor a ZIP file.`
|
|
12766
12806
|
);
|
|
12767
12807
|
}
|
|
12768
12808
|
}
|
|
12769
|
-
async function
|
|
12809
|
+
async function us(r) {
|
|
12770
12810
|
if (r.byteLength < 4)
|
|
12771
12811
|
return !1;
|
|
12772
12812
|
const t = new Uint8Array(r, 0, 4);
|
|
12773
12813
|
return t[0] === 80 && t[1] === 75 && t[2] === 3 && t[3] === 4;
|
|
12774
12814
|
}
|
|
12775
|
-
function
|
|
12815
|
+
async function js(r) {
|
|
12816
|
+
if ((await rr.create(r)).getVersion() === 1) {
|
|
12817
|
+
const n = await rs(
|
|
12818
|
+
r
|
|
12819
|
+
);
|
|
12820
|
+
return {
|
|
12821
|
+
wpVersion: n.versions.wp,
|
|
12822
|
+
phpVersion: n.versions.php,
|
|
12823
|
+
intl: n.features.intl,
|
|
12824
|
+
networking: n.features.networking,
|
|
12825
|
+
extraLibraries: n.extraLibraries,
|
|
12826
|
+
/*
|
|
12827
|
+
* Constants don't matter so much for temporary sites so let's
|
|
12828
|
+
* use an empty object here. We can't easily figure out which
|
|
12829
|
+
* additional constants were applied via playground.defineConstant()
|
|
12830
|
+
* at this stage anyway.
|
|
12831
|
+
*
|
|
12832
|
+
* This property is only relevant for stored sites to ensure they're
|
|
12833
|
+
* consistently applied across page reloads.
|
|
12834
|
+
*/
|
|
12835
|
+
constants: {}
|
|
12836
|
+
};
|
|
12837
|
+
} else
|
|
12838
|
+
return {
|
|
12839
|
+
phpVersion: tt,
|
|
12840
|
+
wpVersion: "latest",
|
|
12841
|
+
intl: !1,
|
|
12842
|
+
networking: !0,
|
|
12843
|
+
constants: {},
|
|
12844
|
+
extraLibraries: []
|
|
12845
|
+
};
|
|
12846
|
+
}
|
|
12847
|
+
function Es() {
|
|
12776
12848
|
}
|
|
12777
12849
|
export {
|
|
12778
|
-
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
-
|
|
12783
|
-
|
|
12784
|
-
|
|
12785
|
-
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
|
|
12790
|
-
|
|
12791
|
-
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
|
|
12811
|
-
|
|
12812
|
-
|
|
12813
|
-
|
|
12814
|
-
|
|
12815
|
-
|
|
12816
|
-
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12850
|
+
rr as BlueprintReflection,
|
|
12851
|
+
Tr as activatePlugin,
|
|
12852
|
+
jr as activateTheme,
|
|
12853
|
+
rs as compileBlueprint,
|
|
12854
|
+
rs as compileBlueprintV1,
|
|
12855
|
+
qt as cp,
|
|
12856
|
+
Rr as defineSiteUrl,
|
|
12857
|
+
lr as defineWpConfigConsts,
|
|
12858
|
+
Et as enableMultisite,
|
|
12859
|
+
xt as exportWXR,
|
|
12860
|
+
ts as getBlueprintDeclaration,
|
|
12861
|
+
fs as getV2Runner,
|
|
12862
|
+
Lr as importThemeStarterContent,
|
|
12863
|
+
Nt as importWordPressFiles,
|
|
12864
|
+
Ft as importWxr,
|
|
12865
|
+
Dt as installPlugin,
|
|
12866
|
+
Ct as installTheme,
|
|
12867
|
+
Dr as isBlueprintBundle,
|
|
12868
|
+
It as login,
|
|
12869
|
+
At as mkdir,
|
|
12870
|
+
$t as mv,
|
|
12871
|
+
_t as request,
|
|
12872
|
+
Wt as resetData,
|
|
12873
|
+
Ts as resolveRemoteBlueprint,
|
|
12874
|
+
js as resolveRuntimeConfiguration,
|
|
12875
|
+
Er as rm,
|
|
12876
|
+
Rt as rmdir,
|
|
12877
|
+
ks as runBlueprintSteps,
|
|
12878
|
+
ks as runBlueprintV1Steps,
|
|
12879
|
+
Os as runBlueprintV2,
|
|
12880
|
+
wt as runPHP,
|
|
12881
|
+
vt as runPHPWithOptions,
|
|
12882
|
+
Pt as runSql,
|
|
12883
|
+
Ut as runWpInstallationWizard,
|
|
12884
|
+
Es as setPluginProxyURL,
|
|
12885
|
+
Ht as setSiteLanguage,
|
|
12886
|
+
qr as setSiteOptions,
|
|
12887
|
+
ur as unzip,
|
|
12888
|
+
Ot as updateUserMeta,
|
|
12889
|
+
Ar as wpCLI,
|
|
12890
|
+
Fr as wpContentFilesExcludedFromExport,
|
|
12891
|
+
dr as writeFile,
|
|
12892
|
+
Lt as writeFiles,
|
|
12893
|
+
Bt as zipWpContent
|
|
12820
12894
|
};
|
|
12821
12895
|
//# sourceMappingURL=index.js.map
|