@wp-playground/blueprints 3.1.19 → 3.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blueprint-schema-validator.js +609 -506
- package/blueprint-schema.json +15 -1
- package/index.cjs +38 -38
- package/index.cjs.map +1 -1
- package/index.js +684 -634
- package/index.js.map +1 -1
- package/lib/types.d.ts +2 -2
- package/lib/v1/compile.d.ts +2 -2
- package/lib/v1/types.d.ts +2 -2
- package/package.json +16 -16
- package/vitest-setup-file.d.ts +0 -0
package/index.js
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import "@php-wasm/
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { encodeZip as ft, collectFile as ut, StreamedFile as dt } from "@php-wasm/stream-compression";
|
|
1
|
+
import { cloneStreamMonitorProgress as Qr, cloneResponseMonitorProgress as Yr, ProgressTracker as Gr } from "@php-wasm/progress";
|
|
2
|
+
import { randomFilename as or, phpVars as yr, joinPaths as ie, phpVar as be, dirname as hr, Semaphore as Ar, normalizePath as Jr, basename as Or } from "@php-wasm/util";
|
|
3
|
+
import { writeFiles as gr, LatestSupportedPHPVersion as Xr, AllPHPVersions as Kr } from "@php-wasm/universal";
|
|
4
|
+
import { resolveCommitHash as et, listGitFiles as rt, listDescendantFiles as tt, sparseCheckout as st, createDotGitDirectory as it, GitAuthenticationError as Tr, OverlayFilesystem as ot, InMemoryFilesystem as at, FetchFilesystem as nt, ZipFilesystem as pt, ChrootFilesystem as lt } from "@wp-playground/storage";
|
|
5
|
+
import { fetchWithCorsProxy as ft } from "@php-wasm/web-service-worker";
|
|
6
|
+
import { encodeZip as ut, collectFile as dt, StreamedFile as ct } from "@php-wasm/stream-compression";
|
|
8
7
|
import { logger as ae } from "@php-wasm/logger";
|
|
9
|
-
import { defineWpConfigConstants as
|
|
10
|
-
import { unzipFile as
|
|
11
|
-
function
|
|
8
|
+
import { defineWpConfigConstants as mt, ensureWpConfig as yt } from "@wp-playground/wordpress";
|
|
9
|
+
import { unzipFile as Rr, RecommendedPHPVersion as ht } from "@wp-playground/common";
|
|
10
|
+
function Sr(r) {
|
|
12
11
|
return r && "read" in r && typeof r.read == "function";
|
|
13
12
|
}
|
|
14
|
-
async function
|
|
15
|
-
if (!
|
|
13
|
+
async function gt(r) {
|
|
14
|
+
if (!Sr(r))
|
|
16
15
|
return r;
|
|
17
16
|
const n = await (await r.read("blueprint.json")).text();
|
|
18
17
|
return JSON.parse(n);
|
|
19
18
|
}
|
|
20
|
-
class
|
|
19
|
+
class ar {
|
|
21
20
|
static async create(t) {
|
|
22
|
-
const n = await
|
|
23
|
-
return
|
|
21
|
+
const n = await gt(t), l = Sr(t) ? t : void 0;
|
|
22
|
+
return ar.createFromDeclaration(n, l);
|
|
24
23
|
}
|
|
25
24
|
static createFromDeclaration(t, n = void 0) {
|
|
26
|
-
return new
|
|
25
|
+
return new ar(
|
|
27
26
|
t,
|
|
28
27
|
n,
|
|
29
28
|
t.version || 1
|
|
@@ -48,11 +47,11 @@ class or {
|
|
|
48
47
|
return this.getBundle() || this.getDeclaration();
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
function
|
|
50
|
+
function nr(r) {
|
|
52
51
|
const t = r.split(".").shift().replace(/-/g, " ");
|
|
53
52
|
return t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
|
|
54
53
|
}
|
|
55
|
-
const
|
|
54
|
+
const bt = `Blueprint resource of type "bundled" requires a filesystem.
|
|
56
55
|
|
|
57
56
|
This Blueprint refers to files that should be bundled with it (like images, plugins, or themes), but the filesystem needed to access these files is not available. This usually happens when:
|
|
58
57
|
|
|
@@ -65,17 +64,17 @@ To fix this:
|
|
|
65
64
|
• Check that the "resource": "bundled" references in your Blueprint match actual files in your bundle
|
|
66
65
|
|
|
67
66
|
Learn more about Blueprint resources: https://wordpress.github.io/wordpress-playground/blueprints/data-format#resources`;
|
|
68
|
-
class
|
|
69
|
-
constructor(t =
|
|
67
|
+
class wt extends Error {
|
|
68
|
+
constructor(t = bt) {
|
|
70
69
|
super(t), this.name = "BlueprintFilesystemRequiredError";
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
|
-
class
|
|
72
|
+
class ur extends Error {
|
|
74
73
|
constructor(t, n, l) {
|
|
75
74
|
super(t, l), this.name = "ResourceDownloadError", this.url = n;
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
|
-
const
|
|
77
|
+
const vt = [
|
|
79
78
|
"vfs",
|
|
80
79
|
"literal",
|
|
81
80
|
"wordpress.org/themes",
|
|
@@ -85,17 +84,17 @@ const wt = [
|
|
|
85
84
|
"bundled",
|
|
86
85
|
"zip"
|
|
87
86
|
];
|
|
88
|
-
function vt(r) {
|
|
89
|
-
return r && typeof r == "object" && typeof r.resource == "string" && wt.includes(r.resource);
|
|
90
|
-
}
|
|
91
87
|
function Pt(r) {
|
|
88
|
+
return r && typeof r == "object" && typeof r.resource == "string" && vt.includes(r.resource);
|
|
89
|
+
}
|
|
90
|
+
function _t(r) {
|
|
92
91
|
try {
|
|
93
92
|
return new URL(r).hostname === "github-proxy.com";
|
|
94
93
|
} catch {
|
|
95
94
|
return !1;
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
|
-
function
|
|
97
|
+
function kt(r) {
|
|
99
98
|
let t;
|
|
100
99
|
try {
|
|
101
100
|
t = new URL(r);
|
|
@@ -119,8 +118,8 @@ function _t(r) {
|
|
|
119
118
|
};
|
|
120
119
|
}
|
|
121
120
|
let p, d;
|
|
122
|
-
const y = l.get("pr"), _ = l.get("commit"),
|
|
123
|
-
y ? p = `refs/pull/${y}/head` : _ ? (p = _, d = "commit") : s ? (p = s, d = "tag") : p =
|
|
121
|
+
const y = l.get("pr"), _ = l.get("commit"), m = l.get("branch");
|
|
122
|
+
y ? p = `refs/pull/${y}/head` : _ ? (p = _, d = "commit") : s ? (p = s, d = "tag") : p = m || "HEAD";
|
|
124
123
|
const k = l.get("directory");
|
|
125
124
|
return {
|
|
126
125
|
resource: "zip",
|
|
@@ -161,8 +160,8 @@ class we {
|
|
|
161
160
|
streamBundledFile: s,
|
|
162
161
|
gitAdditionalHeadersCallback: e
|
|
163
162
|
}) {
|
|
164
|
-
if (t.resource === "url" &&
|
|
165
|
-
const d =
|
|
163
|
+
if (t.resource === "url" && _t(t.url)) {
|
|
164
|
+
const d = kt(t.url);
|
|
166
165
|
d && (console.warn(
|
|
167
166
|
`[Blueprints] github-proxy.com is deprecated and will stop working soon. The URL "${t.url}" has been automatically converted to a ${d.resource} resource. Please update your Blueprint to use native resource types. See: https://wordpress.github.io/wordpress-playground/blueprints/steps/resources`
|
|
168
167
|
), t = d);
|
|
@@ -170,33 +169,33 @@ class we {
|
|
|
170
169
|
let p;
|
|
171
170
|
switch (t.resource) {
|
|
172
171
|
case "vfs":
|
|
173
|
-
p = new
|
|
172
|
+
p = new Ot(t, l);
|
|
174
173
|
break;
|
|
175
174
|
case "literal":
|
|
176
|
-
p = new
|
|
175
|
+
p = new Tt(t, l);
|
|
177
176
|
break;
|
|
178
177
|
case "wordpress.org/themes":
|
|
179
|
-
p = new
|
|
178
|
+
p = new St(t, l);
|
|
180
179
|
break;
|
|
181
180
|
case "wordpress.org/plugins":
|
|
182
|
-
p = new
|
|
181
|
+
p = new Lt(t, l);
|
|
183
182
|
break;
|
|
184
183
|
case "url":
|
|
185
|
-
p = new
|
|
184
|
+
p = new jt(t, l, { corsProxy: u });
|
|
186
185
|
break;
|
|
187
186
|
case "git:directory":
|
|
188
|
-
p = new
|
|
187
|
+
p = new qt(t, l, {
|
|
189
188
|
corsProxy: u,
|
|
190
189
|
additionalHeaders: e
|
|
191
190
|
});
|
|
192
191
|
break;
|
|
193
192
|
case "literal:directory":
|
|
194
|
-
p = new
|
|
193
|
+
p = new Rt(t, l);
|
|
195
194
|
break;
|
|
196
195
|
case "bundled":
|
|
197
196
|
if (!s)
|
|
198
|
-
throw new
|
|
199
|
-
p = new
|
|
197
|
+
throw new wt();
|
|
198
|
+
p = new xt(
|
|
200
199
|
t,
|
|
201
200
|
s,
|
|
202
201
|
l
|
|
@@ -210,7 +209,7 @@ class we {
|
|
|
210
209
|
streamBundledFile: s,
|
|
211
210
|
gitAdditionalHeadersCallback: e
|
|
212
211
|
});
|
|
213
|
-
p = new
|
|
212
|
+
p = new Ct(t, d, l);
|
|
214
213
|
break;
|
|
215
214
|
}
|
|
216
215
|
default:
|
|
@@ -218,10 +217,10 @@ class we {
|
|
|
218
217
|
`Unknown resource type: ${t.resource}`
|
|
219
218
|
);
|
|
220
219
|
}
|
|
221
|
-
return n && (p = new
|
|
220
|
+
return n && (p = new Nt(p, n)), new Ft(p);
|
|
222
221
|
}
|
|
223
222
|
}
|
|
224
|
-
class
|
|
223
|
+
class Lr extends we {
|
|
225
224
|
constructor(t) {
|
|
226
225
|
super(), this.resource = t;
|
|
227
226
|
}
|
|
@@ -246,7 +245,7 @@ class Sr extends we {
|
|
|
246
245
|
this.resource.setPlayground(t);
|
|
247
246
|
}
|
|
248
247
|
}
|
|
249
|
-
class
|
|
248
|
+
class Ot extends we {
|
|
250
249
|
/**
|
|
251
250
|
* Creates a new instance of `VFSResource`.
|
|
252
251
|
* @param playground The playground client.
|
|
@@ -269,7 +268,7 @@ class kt extends we {
|
|
|
269
268
|
return this.resource.path.split("/").pop() || "";
|
|
270
269
|
}
|
|
271
270
|
}
|
|
272
|
-
class
|
|
271
|
+
class Tt extends we {
|
|
273
272
|
/**
|
|
274
273
|
* Creates a new instance of `LiteralResource`.
|
|
275
274
|
* @param resource The literal reference.
|
|
@@ -288,7 +287,7 @@ class Ot extends we {
|
|
|
288
287
|
return this.resource.name;
|
|
289
288
|
}
|
|
290
289
|
}
|
|
291
|
-
class
|
|
290
|
+
class br extends we {
|
|
292
291
|
/**
|
|
293
292
|
* Creates a new instance of `FetchResource`.
|
|
294
293
|
* @param progress The progress tracker.
|
|
@@ -302,31 +301,31 @@ class gr extends we {
|
|
|
302
301
|
(n = this.progress) == null || n.setCaption(this.caption);
|
|
303
302
|
const t = this.getURL();
|
|
304
303
|
try {
|
|
305
|
-
let s = await
|
|
304
|
+
let s = await ft(
|
|
306
305
|
t,
|
|
307
306
|
void 0,
|
|
308
307
|
this.corsProxy,
|
|
309
308
|
await ((l = this.playground) == null ? void 0 : l.absoluteUrl)
|
|
310
309
|
);
|
|
311
310
|
if (!s.ok)
|
|
312
|
-
throw new
|
|
311
|
+
throw new ur(
|
|
313
312
|
`Could not download "${t}"`,
|
|
314
313
|
t
|
|
315
314
|
);
|
|
316
|
-
if (s = await
|
|
315
|
+
if (s = await Yr(
|
|
317
316
|
s,
|
|
318
|
-
((u = this.progress) == null ? void 0 : u.loadingListener) ??
|
|
317
|
+
((u = this.progress) == null ? void 0 : u.loadingListener) ?? $t
|
|
319
318
|
), s.status !== 200)
|
|
320
|
-
throw new
|
|
319
|
+
throw new ur(
|
|
321
320
|
`Could not download "${t}"`,
|
|
322
321
|
t
|
|
323
322
|
);
|
|
324
|
-
const e = this.name ||
|
|
323
|
+
const e = this.name || Et(
|
|
325
324
|
s.headers.get("content-disposition") || ""
|
|
326
325
|
) || encodeURIComponent(t);
|
|
327
326
|
return new File([await s.arrayBuffer()], e);
|
|
328
327
|
} catch (s) {
|
|
329
|
-
throw new
|
|
328
|
+
throw new ur(
|
|
330
329
|
`Could not download "${t}".
|
|
331
330
|
|
|
332
331
|
Confirm that the URL is correct, the server is reachable, and the file is actually served at that URL. Original error:
|
|
@@ -356,7 +355,7 @@ Confirm that the URL is correct, the server is reachable, and the file is actual
|
|
|
356
355
|
return !0;
|
|
357
356
|
}
|
|
358
357
|
}
|
|
359
|
-
function
|
|
358
|
+
function Et(r) {
|
|
360
359
|
if (!r)
|
|
361
360
|
return null;
|
|
362
361
|
const t = r.match(/filename\*?=([^;]+)/i);
|
|
@@ -373,9 +372,9 @@ function Tt(r) {
|
|
|
373
372
|
}
|
|
374
373
|
return n;
|
|
375
374
|
}
|
|
376
|
-
const
|
|
375
|
+
const $t = () => {
|
|
377
376
|
};
|
|
378
|
-
class
|
|
377
|
+
class jt extends br {
|
|
379
378
|
/**
|
|
380
379
|
* Creates a new instance of `UrlResource`.
|
|
381
380
|
* @param resource The URL reference.
|
|
@@ -401,7 +400,7 @@ class $t extends gr {
|
|
|
401
400
|
return this.resource.caption ?? super.caption;
|
|
402
401
|
}
|
|
403
402
|
}
|
|
404
|
-
class
|
|
403
|
+
class qt extends we {
|
|
405
404
|
constructor(t, n, l) {
|
|
406
405
|
super(), this.reference = t, this._progress = n, this.options = l;
|
|
407
406
|
}
|
|
@@ -409,21 +408,21 @@ class jt extends we {
|
|
|
409
408
|
var l, u, s;
|
|
410
409
|
const t = ((u = (l = this.options) == null ? void 0 : l.additionalHeaders) == null ? void 0 : u.call(l, this.reference.url)) ?? {}, n = (s = this.options) != null && s.corsProxy ? `${this.options.corsProxy}${this.reference.url}` : this.reference.url;
|
|
411
410
|
try {
|
|
412
|
-
const e = await
|
|
411
|
+
const e = await et(
|
|
413
412
|
n,
|
|
414
413
|
{
|
|
415
414
|
value: this.reference.ref,
|
|
416
415
|
type: this.reference.refType ?? "infer"
|
|
417
416
|
},
|
|
418
417
|
t
|
|
419
|
-
), p = await
|
|
418
|
+
), p = await rt(
|
|
420
419
|
n,
|
|
421
420
|
e,
|
|
422
421
|
t
|
|
423
422
|
), d = (this.reference.path ?? "").replace(
|
|
424
423
|
/^\/+/,
|
|
425
424
|
""
|
|
426
|
-
), y =
|
|
425
|
+
), y = tt(p, d), _ = await st(
|
|
427
426
|
n,
|
|
428
427
|
e,
|
|
429
428
|
y,
|
|
@@ -432,12 +431,12 @@ class jt extends we {
|
|
|
432
431
|
additionalHeaders: t
|
|
433
432
|
}
|
|
434
433
|
);
|
|
435
|
-
let
|
|
436
|
-
return
|
|
437
|
-
|
|
434
|
+
let m = _.files;
|
|
435
|
+
return m = At(
|
|
436
|
+
m,
|
|
438
437
|
(k) => k.substring(d.length).replace(/^\/+/, "")
|
|
439
|
-
), this.reference[".git"] && (
|
|
440
|
-
...await
|
|
438
|
+
), this.reference[".git"] && (m = {
|
|
439
|
+
...await it({
|
|
441
440
|
repoUrl: this.reference.url,
|
|
442
441
|
commitHash: e,
|
|
443
442
|
ref: this.reference.ref,
|
|
@@ -446,13 +445,13 @@ class jt extends we {
|
|
|
446
445
|
fileOids: _.fileOids ?? {},
|
|
447
446
|
pathPrefix: d
|
|
448
447
|
}),
|
|
449
|
-
...
|
|
448
|
+
...m
|
|
450
449
|
}), {
|
|
451
450
|
name: this.filename,
|
|
452
|
-
files:
|
|
451
|
+
files: m
|
|
453
452
|
};
|
|
454
453
|
} catch (e) {
|
|
455
|
-
throw e instanceof
|
|
454
|
+
throw e instanceof Tr ? new Tr(
|
|
456
455
|
this.reference.url,
|
|
457
456
|
e.status
|
|
458
457
|
) : e;
|
|
@@ -462,7 +461,7 @@ class jt extends we {
|
|
|
462
461
|
* Generate a nice, non-empty filename – the installPlugin step depends on it.
|
|
463
462
|
*/
|
|
464
463
|
get filename() {
|
|
465
|
-
return this.name.replaceAll(/[^a-zA-Z0-9-.]/g, "-").replaceAll(/-+/g, "-").replace(/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+$/g, "") ||
|
|
464
|
+
return this.name.replaceAll(/[^a-zA-Z0-9-.]/g, "-").replaceAll(/-+/g, "-").replace(/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+$/g, "") || or();
|
|
466
465
|
}
|
|
467
466
|
/** @inheritDoc */
|
|
468
467
|
get name() {
|
|
@@ -474,12 +473,12 @@ class jt extends we {
|
|
|
474
473
|
].filter((n) => n.length > 0).join(" ");
|
|
475
474
|
}
|
|
476
475
|
}
|
|
477
|
-
function
|
|
476
|
+
function At(r, t) {
|
|
478
477
|
return Object.fromEntries(
|
|
479
478
|
Object.entries(r).map(([n, l]) => [t(n), l])
|
|
480
479
|
);
|
|
481
480
|
}
|
|
482
|
-
class
|
|
481
|
+
class Rt extends we {
|
|
483
482
|
constructor(t, n) {
|
|
484
483
|
super(), this.reference = t, this._progress = n;
|
|
485
484
|
}
|
|
@@ -491,40 +490,40 @@ class At extends we {
|
|
|
491
490
|
return this.reference.name;
|
|
492
491
|
}
|
|
493
492
|
}
|
|
494
|
-
class
|
|
493
|
+
class St extends br {
|
|
495
494
|
constructor(t, n) {
|
|
496
495
|
super(n), this.resource = t;
|
|
497
496
|
}
|
|
498
497
|
get name() {
|
|
499
|
-
return
|
|
498
|
+
return nr(this.resource.slug);
|
|
500
499
|
}
|
|
501
500
|
getURL() {
|
|
502
|
-
return `https://downloads.wordpress.org/theme/${
|
|
501
|
+
return `https://downloads.wordpress.org/theme/${Fr(this.resource.slug)}`;
|
|
503
502
|
}
|
|
504
503
|
}
|
|
505
|
-
class
|
|
504
|
+
class Lt extends br {
|
|
506
505
|
constructor(t, n) {
|
|
507
506
|
super(n), this.resource = t;
|
|
508
507
|
}
|
|
509
508
|
/** @inheritDoc */
|
|
510
509
|
get name() {
|
|
511
|
-
return
|
|
510
|
+
return nr(this.resource.slug);
|
|
512
511
|
}
|
|
513
512
|
/** @inheritDoc */
|
|
514
513
|
getURL() {
|
|
515
|
-
return `https://downloads.wordpress.org/plugin/${
|
|
514
|
+
return `https://downloads.wordpress.org/plugin/${Fr(this.resource.slug)}`;
|
|
516
515
|
}
|
|
517
516
|
}
|
|
518
|
-
function
|
|
517
|
+
function Fr(r) {
|
|
519
518
|
return !r || r.endsWith(".zip") ? r : r + ".latest-stable.zip";
|
|
520
519
|
}
|
|
521
|
-
class
|
|
520
|
+
class Ft extends Lr {
|
|
522
521
|
/** @inheritDoc */
|
|
523
522
|
async resolve() {
|
|
524
523
|
return this.promise || (this.promise = this.resource.resolve()), this.promise;
|
|
525
524
|
}
|
|
526
525
|
}
|
|
527
|
-
class
|
|
526
|
+
class Nt extends Lr {
|
|
528
527
|
constructor(t, n) {
|
|
529
528
|
super(t), this.semaphore = n;
|
|
530
529
|
}
|
|
@@ -533,7 +532,7 @@ class Ft extends Sr {
|
|
|
533
532
|
return this.isAsync ? this.semaphore.run(() => this.resource.resolve()) : this.resource.resolve();
|
|
534
533
|
}
|
|
535
534
|
}
|
|
536
|
-
class
|
|
535
|
+
class xt extends we {
|
|
537
536
|
/**
|
|
538
537
|
* Creates a new instance of `BlueprintResource`.
|
|
539
538
|
* @param resource The blueprint reference.
|
|
@@ -555,7 +554,7 @@ class Nt extends we {
|
|
|
555
554
|
const u = await this.streamBundledFile(this.resource.path), s = u.filesize;
|
|
556
555
|
if (!s)
|
|
557
556
|
return (n = this.progress) == null || n.set(100), u;
|
|
558
|
-
const e =
|
|
557
|
+
const e = Qr(
|
|
559
558
|
u.stream(),
|
|
560
559
|
s,
|
|
561
560
|
(p) => {
|
|
@@ -565,7 +564,7 @@ class Nt extends we {
|
|
|
565
564
|
);
|
|
566
565
|
}
|
|
567
566
|
);
|
|
568
|
-
return new
|
|
567
|
+
return new ct(e, this.name, {
|
|
569
568
|
filesize: s
|
|
570
569
|
});
|
|
571
570
|
} catch (u) {
|
|
@@ -586,7 +585,7 @@ Error details: ${u instanceof Error ? u.message : String(u)}`,
|
|
|
586
585
|
return !0;
|
|
587
586
|
}
|
|
588
587
|
}
|
|
589
|
-
class
|
|
588
|
+
class Ct extends we {
|
|
590
589
|
constructor(t, n, l) {
|
|
591
590
|
super(), this.reference = t, this.innerResource = n, this._progress = l;
|
|
592
591
|
}
|
|
@@ -596,8 +595,8 @@ class xt extends we {
|
|
|
596
595
|
(s = this.progress) == null || s.setCaption(`Creating ZIP: ${this.name}`);
|
|
597
596
|
const t = await this.innerResource.resolve();
|
|
598
597
|
let n;
|
|
599
|
-
t instanceof File ? n = [t] : n =
|
|
600
|
-
const l =
|
|
598
|
+
t instanceof File ? n = [t] : n = Dt(t.files, t.name);
|
|
599
|
+
const l = ut(n), u = await dt(this.name, l);
|
|
601
600
|
return (e = this.progress) == null || e.set(100), u;
|
|
602
601
|
}
|
|
603
602
|
/** @inheritDoc */
|
|
@@ -612,7 +611,7 @@ class xt extends we {
|
|
|
612
611
|
return !0;
|
|
613
612
|
}
|
|
614
613
|
}
|
|
615
|
-
function
|
|
614
|
+
function Dt(r, t) {
|
|
616
615
|
const n = [];
|
|
617
616
|
function l(u, s) {
|
|
618
617
|
for (const [e, p] of Object.entries(u)) {
|
|
@@ -627,7 +626,7 @@ function Ct(r, t) {
|
|
|
627
626
|
}
|
|
628
627
|
return l(r, ""), n;
|
|
629
628
|
}
|
|
630
|
-
const
|
|
629
|
+
const Nr = async (r, { pluginPath: t, pluginName: n }, l) => {
|
|
631
630
|
l == null || l.tracker.setCaption(`Activating ${n || t}`);
|
|
632
631
|
const u = await r.documentRoot, s = await r.run({
|
|
633
632
|
code: `<?php
|
|
@@ -717,7 +716,7 @@ const Fr = async (r, { pluginPath: t, pluginName: n }, l) => {
|
|
|
717
716
|
2
|
|
718
717
|
)}`
|
|
719
718
|
);
|
|
720
|
-
},
|
|
719
|
+
}, xr = async (r, { themeFolderName: t }, n) => {
|
|
721
720
|
n == null || n.tracker.setCaption(`Activating ${t}`);
|
|
722
721
|
const l = await r.documentRoot, u = `${l}/wp-content/themes/${t}`;
|
|
723
722
|
if (!await r.fileExists(u))
|
|
@@ -756,7 +755,7 @@ const Fr = async (r, { pluginPath: t, pluginName: n }, l) => {
|
|
|
756
755
|
2
|
|
757
756
|
)}`
|
|
758
757
|
);
|
|
759
|
-
},
|
|
758
|
+
}, Ut = async (r, { code: t }) => {
|
|
760
759
|
let n = typeof t == "string" ? t : t.content;
|
|
761
760
|
return (n.includes('"wordpress/wp-load.php"') || n.includes("'wordpress/wp-load.php'")) && (ae.error(
|
|
762
761
|
`
|
|
@@ -781,7 +780,7 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
781
780
|
'"wordpress/wp-load.php"',
|
|
782
781
|
'"/wordpress/wp-load.php"'
|
|
783
782
|
)), await r.run({ code: n });
|
|
784
|
-
},
|
|
783
|
+
}, It = async (r, { options: t }) => await r.run(t), mr = async (r, { path: t }) => {
|
|
785
784
|
t.startsWith("/") || (ae.error(
|
|
786
785
|
`
|
|
787
786
|
The rm() step in your Blueprint refers to a relative path.
|
|
@@ -799,7 +798,7 @@ Use: rm({ path: '/wordpress/wp-load.php' });
|
|
|
799
798
|
This will ensure your code works reliably regardless of the current working directory.
|
|
800
799
|
`.trim()
|
|
801
800
|
), t = `/${t}`), await r.unlink(t);
|
|
802
|
-
},
|
|
801
|
+
}, Wt = `<?php
|
|
803
802
|
|
|
804
803
|
/**
|
|
805
804
|
* Naively splits an SQL string into a sequence of queries. It
|
|
@@ -962,17 +961,17 @@ class WP_MySQL_Naive_Query_Stream {
|
|
|
962
961
|
return $this->state;
|
|
963
962
|
}
|
|
964
963
|
|
|
965
|
-
}`,
|
|
964
|
+
}`, Bt = async (r, { sql: t }, n) => {
|
|
966
965
|
n == null || n.tracker.setCaption("Executing SQL Queries");
|
|
967
|
-
const l = `/tmp/${
|
|
966
|
+
const l = `/tmp/${or()}.sql`, u = `/tmp/${or()}.php`;
|
|
968
967
|
await r.writeFile(
|
|
969
968
|
l,
|
|
970
969
|
new Uint8Array(await t.arrayBuffer())
|
|
971
970
|
), await r.writeFile(
|
|
972
971
|
u,
|
|
973
|
-
new TextEncoder().encode(
|
|
972
|
+
new TextEncoder().encode(Wt)
|
|
974
973
|
);
|
|
975
|
-
const s = await r.documentRoot, e =
|
|
974
|
+
const s = await r.documentRoot, e = yr({ docroot: s, sqlFilename: l, streamClassFilename: u }), p = await r.run({
|
|
976
975
|
code: `<?php
|
|
977
976
|
define('WP_SQLITE_AST_DRIVER', true);
|
|
978
977
|
require_once ${e.docroot} . '/wp-load.php';
|
|
@@ -1019,8 +1018,8 @@ class WP_MySQL_Naive_Query_Stream {
|
|
|
1019
1018
|
}
|
|
1020
1019
|
`
|
|
1021
1020
|
});
|
|
1022
|
-
return await
|
|
1023
|
-
},
|
|
1021
|
+
return await mr(r, { path: l }), await mr(r, { path: u }), p;
|
|
1022
|
+
}, Mt = async (r, { request: t }) => {
|
|
1024
1023
|
ae.warn(
|
|
1025
1024
|
'Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.'
|
|
1026
1025
|
);
|
|
@@ -1030,25 +1029,25 @@ class WP_MySQL_Naive_Query_Stream {
|
|
|
1030
1029
|
`Request failed with status ${n.httpStatusCode}`
|
|
1031
1030
|
);
|
|
1032
1031
|
return n;
|
|
1033
|
-
},
|
|
1032
|
+
}, wr = async (r, { consts: t, method: n = "define-before-run" }) => {
|
|
1034
1033
|
switch (n) {
|
|
1035
1034
|
case "define-before-run":
|
|
1036
|
-
await
|
|
1035
|
+
await zt(r, t);
|
|
1037
1036
|
break;
|
|
1038
1037
|
case "rewrite-wp-config": {
|
|
1039
1038
|
const l = await r.documentRoot, u = ie(l, "/wp-config.php");
|
|
1040
|
-
await
|
|
1039
|
+
await mt(r, u, t);
|
|
1041
1040
|
break;
|
|
1042
1041
|
}
|
|
1043
1042
|
default:
|
|
1044
1043
|
throw new Error(`Invalid method: ${n}`);
|
|
1045
1044
|
}
|
|
1046
1045
|
};
|
|
1047
|
-
async function
|
|
1046
|
+
async function zt(r, t) {
|
|
1048
1047
|
for (const n in t)
|
|
1049
1048
|
await r.defineConstant(n, t[n]);
|
|
1050
1049
|
}
|
|
1051
|
-
const
|
|
1050
|
+
const Cr = async (r, { options: t }) => {
|
|
1052
1051
|
const n = await r.documentRoot;
|
|
1053
1052
|
await r.run({
|
|
1054
1053
|
code: `<?php
|
|
@@ -1060,7 +1059,7 @@ const xr = async (r, { options: t }) => {
|
|
|
1060
1059
|
echo "Success";
|
|
1061
1060
|
`
|
|
1062
1061
|
});
|
|
1063
|
-
},
|
|
1062
|
+
}, Vt = async (r, { meta: t, userId: n }) => {
|
|
1064
1063
|
const l = await r.documentRoot;
|
|
1065
1064
|
await r.run({
|
|
1066
1065
|
code: `<?php
|
|
@@ -1071,7 +1070,7 @@ const xr = async (r, { options: t }) => {
|
|
|
1071
1070
|
}
|
|
1072
1071
|
`
|
|
1073
1072
|
});
|
|
1074
|
-
},
|
|
1073
|
+
}, vr = "/tmp/wp-cli.phar", Ht = {
|
|
1075
1074
|
resource: "url",
|
|
1076
1075
|
/**
|
|
1077
1076
|
* Use compression for downloading the wp-cli.phar file.
|
|
@@ -1084,7 +1083,7 @@ const xr = async (r, { options: t }) => {
|
|
|
1084
1083
|
* like the JavaScript parser or Composer are removed.
|
|
1085
1084
|
*/
|
|
1086
1085
|
url: "https://playground.wordpress.net/wp-cli.phar"
|
|
1087
|
-
},
|
|
1086
|
+
}, Dr = async (r, t = vr) => {
|
|
1088
1087
|
if (!await r.fileExists(t))
|
|
1089
1088
|
throw new Error(`wp-cli.phar not found at ${t}.
|
|
1090
1089
|
You can enable wp-cli support by adding "wp-cli" to the list of extra libraries in your blueprint as follows:
|
|
@@ -1093,10 +1092,10 @@ const xr = async (r, { options: t }) => {
|
|
|
1093
1092
|
}
|
|
1094
1093
|
Read more about it in the documentation.
|
|
1095
1094
|
https://wordpress.github.io/wordpress-playground/blueprints/data-format#extra-libraries`);
|
|
1096
|
-
},
|
|
1097
|
-
await
|
|
1095
|
+
}, Ur = async (r, { command: t, wpCliPath: n = vr }) => {
|
|
1096
|
+
await Dr(r, n);
|
|
1098
1097
|
let l;
|
|
1099
|
-
if (typeof t == "string" ? (t = t.trim(), l =
|
|
1098
|
+
if (typeof t == "string" ? (t = t.trim(), l = Zt(t)) : l = t, l.shift() !== "wp")
|
|
1100
1099
|
throw new Error('The first argument must be "wp".');
|
|
1101
1100
|
let s = !1;
|
|
1102
1101
|
const e = l.map((y) => y.startsWith("wordpress/") ? (s = !0, `/${y}`) : y);
|
|
@@ -1162,7 +1161,7 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
1162
1161
|
throw new Error(d.errors);
|
|
1163
1162
|
return d;
|
|
1164
1163
|
};
|
|
1165
|
-
function
|
|
1164
|
+
function Zt(r) {
|
|
1166
1165
|
let l = 0, u = "";
|
|
1167
1166
|
const s = [];
|
|
1168
1167
|
let e = "";
|
|
@@ -1172,8 +1171,8 @@ function Ht(r) {
|
|
|
1172
1171
|
}
|
|
1173
1172
|
return e && s.push(e), s;
|
|
1174
1173
|
}
|
|
1175
|
-
const
|
|
1176
|
-
await
|
|
1174
|
+
const Qt = async (r, { wpCliPath: t }) => {
|
|
1175
|
+
await Dr(r, t), await wr(r, {
|
|
1177
1176
|
consts: {
|
|
1178
1177
|
WP_ALLOW_MULTISITE: 1
|
|
1179
1178
|
}
|
|
@@ -1184,12 +1183,12 @@ const Zt = async (r, { wpCliPath: t }) => {
|
|
|
1184
1183
|
throw n.hostname === "localhost" && (y += " For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."), new Error(y);
|
|
1185
1184
|
}
|
|
1186
1185
|
const l = n.pathname.replace(/\/$/, "") + "/", u = `${n.protocol}//${n.hostname}${l}`;
|
|
1187
|
-
await
|
|
1186
|
+
await Cr(r, {
|
|
1188
1187
|
options: {
|
|
1189
1188
|
siteurl: u,
|
|
1190
1189
|
home: u
|
|
1191
1190
|
}
|
|
1192
|
-
}), await
|
|
1191
|
+
}), await Ur(r, {
|
|
1193
1192
|
command: `wp core multisite-convert --base="${l}"`
|
|
1194
1193
|
});
|
|
1195
1194
|
const e = `${await r.documentRoot}/wp-config.php`, p = await r.readFileAsText(e);
|
|
@@ -1200,7 +1199,7 @@ const Zt = async (r, { wpCliPath: t }) => {
|
|
|
1200
1199
|
$_SERVER['HTTP_HOST'] = ${be(n.hostname)};
|
|
1201
1200
|
`
|
|
1202
1201
|
)), await r.writeFile(e, d);
|
|
1203
|
-
},
|
|
1202
|
+
}, Yt = async (r, { fromPath: t, toPath: n }) => {
|
|
1204
1203
|
(!t.startsWith("/") || !n.startsWith("/")) && ae.error(
|
|
1205
1204
|
`
|
|
1206
1205
|
The cp() step in your Blueprint refers to a relative path.
|
|
@@ -1221,7 +1220,7 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
1221
1220
|
n,
|
|
1222
1221
|
await r.readFileAsBuffer(t)
|
|
1223
1222
|
);
|
|
1224
|
-
},
|
|
1223
|
+
}, Gt = async (r, { fromPath: t, toPath: n }) => {
|
|
1225
1224
|
(!t.startsWith("/") || !n.startsWith("/")) && ae.error(
|
|
1226
1225
|
`
|
|
1227
1226
|
The mv() step in your Blueprint refers to a relative path.
|
|
@@ -1239,7 +1238,7 @@ Use: mv({ fromPath: '/wordpress/wp-load.php', toPath: '/wordpress/wp-loa
|
|
|
1239
1238
|
This will ensure your code works reliably regardless of the current working directory.
|
|
1240
1239
|
`.trim()
|
|
1241
1240
|
), t.startsWith("/") || (t = `/${t}`), n.startsWith("/") || (n = `/${n}`), await r.mv(t, n);
|
|
1242
|
-
},
|
|
1241
|
+
}, Jt = async (r, { path: t }) => {
|
|
1243
1242
|
t.startsWith("/") || ae.error(
|
|
1244
1243
|
`
|
|
1245
1244
|
The mkdir() step in your Blueprint refers to a relative path.
|
|
@@ -1257,7 +1256,7 @@ Use: mkdir({ path: '/wordpress/my-new-folder' });
|
|
|
1257
1256
|
This will ensure your code works reliably regardless of the current working directory.
|
|
1258
1257
|
`.trim()
|
|
1259
1258
|
), await r.mkdir(t);
|
|
1260
|
-
},
|
|
1259
|
+
}, Xt = async (r, { path: t }) => {
|
|
1261
1260
|
t.startsWith("/") || (ae.error(
|
|
1262
1261
|
`
|
|
1263
1262
|
The rmdir() step in your Blueprint refers to a relative path.
|
|
@@ -1275,7 +1274,7 @@ Use: rmdir({ path: '/wordpress/wp-load.php' });
|
|
|
1275
1274
|
This will ensure your code works reliably regardless of the current working directory.
|
|
1276
1275
|
`.trim()
|
|
1277
1276
|
), t = `/${t}`), await r.rmdir(t);
|
|
1278
|
-
},
|
|
1277
|
+
}, Pr = async (r, { path: t, data: n }) => {
|
|
1279
1278
|
n instanceof File && (n = new Uint8Array(await n.arrayBuffer())), t.startsWith("/") || (ae.error(
|
|
1280
1279
|
`
|
|
1281
1280
|
The writeFile() step in your Blueprint refers to a relative path.
|
|
@@ -1293,7 +1292,7 @@ Use: writeFile({ path: '/wordpress/wp-load.php', data: '<?php echo "Hell
|
|
|
1293
1292
|
This will ensure your code works reliably regardless of the current working directory.
|
|
1294
1293
|
`.trim()
|
|
1295
1294
|
), 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);
|
|
1296
|
-
},
|
|
1295
|
+
}, Kt = async (r, { writeToPath: t, filesTree: n }) => {
|
|
1297
1296
|
t.startsWith("/") || (ae.error(
|
|
1298
1297
|
`
|
|
1299
1298
|
The writeFiles() step in your Blueprint refers to a relative path.
|
|
@@ -1310,20 +1309,20 @@ Use: writeFiles({ writeToPath: '/wordpress/wp-content/plugins/my-plugin'
|
|
|
1310
1309
|
|
|
1311
1310
|
This will ensure your code works reliably regardless of the current working directory.
|
|
1312
1311
|
`.trim()
|
|
1313
|
-
), t = `/${t}`), await
|
|
1314
|
-
},
|
|
1315
|
-
await
|
|
1312
|
+
), t = `/${t}`), await gr(r, t, n.files);
|
|
1313
|
+
}, Ir = async (r, { siteUrl: t }) => {
|
|
1314
|
+
await wr(r, {
|
|
1316
1315
|
consts: {
|
|
1317
1316
|
WP_HOME: t,
|
|
1318
1317
|
WP_SITEURL: t
|
|
1319
1318
|
}
|
|
1320
1319
|
});
|
|
1321
|
-
},
|
|
1322
|
-
await
|
|
1320
|
+
}, es = async (r, { file: t }, n) => {
|
|
1321
|
+
await rs(r, t, n);
|
|
1323
1322
|
};
|
|
1324
|
-
async function
|
|
1323
|
+
async function rs(r, t, n) {
|
|
1325
1324
|
var l;
|
|
1326
|
-
(l = n == null ? void 0 : n.tracker) == null || l.setCaption("Importing content"), await
|
|
1325
|
+
(l = n == null ? void 0 : n.tracker) == null || l.setCaption("Importing content"), await Pr(r, {
|
|
1327
1326
|
path: "/tmp/import.wxr",
|
|
1328
1327
|
data: t
|
|
1329
1328
|
}), await r.run({
|
|
@@ -1392,7 +1391,7 @@ async function es(r, t, n) {
|
|
|
1392
1391
|
}
|
|
1393
1392
|
});
|
|
1394
1393
|
}
|
|
1395
|
-
const
|
|
1394
|
+
const Wr = async (r, { themeSlug: t = "" }, n) => {
|
|
1396
1395
|
var u;
|
|
1397
1396
|
(u = n == null ? void 0 : n.tracker) == null || u.setCaption("Importing theme starter content");
|
|
1398
1397
|
const l = await r.documentRoot;
|
|
@@ -1446,15 +1445,15 @@ const Ir = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1446
1445
|
wp_publish_post( $wp_customize->changeset_post_id() );
|
|
1447
1446
|
`
|
|
1448
1447
|
});
|
|
1449
|
-
},
|
|
1448
|
+
}, _r = async (r, { zipFile: t, zipPath: n, extractToPath: l }) => {
|
|
1450
1449
|
if (n)
|
|
1451
1450
|
ae.warn(
|
|
1452
1451
|
'The "zipPath" option of the unzip() Blueprint step is deprecated and will be removed. Use "zipFile" instead.'
|
|
1453
1452
|
);
|
|
1454
1453
|
else if (!t)
|
|
1455
1454
|
throw new Error("Either zipPath or zipFile must be provided");
|
|
1456
|
-
await
|
|
1457
|
-
},
|
|
1455
|
+
await Rr(r, t || n, l);
|
|
1456
|
+
}, Br = [
|
|
1458
1457
|
"db.php",
|
|
1459
1458
|
"plugins/akismet",
|
|
1460
1459
|
"plugins/hello.php",
|
|
@@ -1475,10 +1474,10 @@ const Ir = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1475
1474
|
"themes/twentytwentyfour",
|
|
1476
1475
|
"themes/twentytwentyfive",
|
|
1477
1476
|
"themes/twentytwentysix"
|
|
1478
|
-
],
|
|
1477
|
+
], ts = async (r, { wordPressFilesZip: t, pathInZip: n = "" }) => {
|
|
1479
1478
|
const l = await r.documentRoot;
|
|
1480
1479
|
let u = ie("/tmp", "import");
|
|
1481
|
-
await r.mkdir(u), await
|
|
1480
|
+
await r.mkdir(u), await _r(r, {
|
|
1482
1481
|
zipFile: t,
|
|
1483
1482
|
extractToPath: u
|
|
1484
1483
|
}), u = ie(u, n);
|
|
@@ -1491,14 +1490,14 @@ const Ir = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1491
1490
|
} catch {
|
|
1492
1491
|
}
|
|
1493
1492
|
const p = ie(u, "wp-content"), d = ie(l, "wp-content");
|
|
1494
|
-
for (const E of
|
|
1493
|
+
for (const E of Br) {
|
|
1495
1494
|
const $ = ie(
|
|
1496
1495
|
p,
|
|
1497
1496
|
E
|
|
1498
1497
|
);
|
|
1499
|
-
await
|
|
1498
|
+
await $r(r, $);
|
|
1500
1499
|
const g = ie(d, E);
|
|
1501
|
-
await r.fileExists(g) && (await r.mkdir(
|
|
1500
|
+
await r.fileExists(g) && (await r.mkdir(hr($)), await r.mv(g, $));
|
|
1502
1501
|
}
|
|
1503
1502
|
const y = ie(
|
|
1504
1503
|
u,
|
|
@@ -1511,14 +1510,14 @@ const Ir = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1511
1510
|
);
|
|
1512
1511
|
const _ = await r.listFiles(u);
|
|
1513
1512
|
for (const E of _)
|
|
1514
|
-
await
|
|
1513
|
+
await $r(r, ie(l, E)), await r.mv(
|
|
1515
1514
|
ie(u, E),
|
|
1516
1515
|
ie(l, E)
|
|
1517
1516
|
);
|
|
1518
|
-
await r.rmdir(u), await
|
|
1519
|
-
const
|
|
1520
|
-
e || (e = await
|
|
1521
|
-
siteUrl:
|
|
1517
|
+
await r.rmdir(u), await yt(r, l);
|
|
1518
|
+
const m = await r.absoluteUrl;
|
|
1519
|
+
e || (e = await is(r, l)), await Ir(r, {
|
|
1520
|
+
siteUrl: m
|
|
1522
1521
|
});
|
|
1523
1522
|
const k = be(
|
|
1524
1523
|
ie(l, "wp-admin", "upgrade.php")
|
|
@@ -1528,14 +1527,14 @@ const Ir = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1528
1527
|
$_GET['step'] = 'upgrade_db';
|
|
1529
1528
|
require ${k};
|
|
1530
1529
|
`
|
|
1531
|
-
}), e && e !==
|
|
1530
|
+
}), e && e !== m && await ss(r, l, e, m);
|
|
1532
1531
|
};
|
|
1533
|
-
function
|
|
1532
|
+
function Er(r) {
|
|
1534
1533
|
const t = r.match(/\/scope:[^/]+\/?/);
|
|
1535
1534
|
return t ? t[0].replace(/\/?$/, "/") : null;
|
|
1536
1535
|
}
|
|
1537
|
-
async function
|
|
1538
|
-
const u =
|
|
1536
|
+
async function ss(r, t, n, l) {
|
|
1537
|
+
const u = Er(n), s = Er(l);
|
|
1539
1538
|
!u || !s || u !== s && await r.run({
|
|
1540
1539
|
code: `<?php
|
|
1541
1540
|
require_once getenv('DOCUMENT_ROOT') . '/wp-load.php';
|
|
@@ -1599,8 +1598,8 @@ async function ts(r, t, n, l) {
|
|
|
1599
1598
|
}
|
|
1600
1599
|
});
|
|
1601
1600
|
}
|
|
1602
|
-
async function
|
|
1603
|
-
const n =
|
|
1601
|
+
async function is(r, t) {
|
|
1602
|
+
const n = yr({ documentRoot: t });
|
|
1604
1603
|
return (await r.run({
|
|
1605
1604
|
code: `<?php
|
|
1606
1605
|
require_once ${n.documentRoot} . '/wp-load.php';
|
|
@@ -1610,27 +1609,27 @@ async function ss(r, t) {
|
|
|
1610
1609
|
`
|
|
1611
1610
|
})).text.trim() || null;
|
|
1612
1611
|
}
|
|
1613
|
-
async function
|
|
1612
|
+
async function $r(r, t) {
|
|
1614
1613
|
await r.fileExists(t) && (await r.isDir(t) ? await r.rmdir(t) : await r.unlink(t));
|
|
1615
1614
|
}
|
|
1616
|
-
async function
|
|
1615
|
+
async function os(r) {
|
|
1617
1616
|
const t = await r.request({
|
|
1618
1617
|
url: "/wp-admin/export.php?download=true&content=all"
|
|
1619
1618
|
});
|
|
1620
1619
|
return new File([t.bytes], "export.xml");
|
|
1621
1620
|
}
|
|
1622
|
-
async function
|
|
1621
|
+
async function Mr(r, {
|
|
1623
1622
|
targetPath: t,
|
|
1624
1623
|
zipFile: n,
|
|
1625
1624
|
ifAlreadyInstalled: l = "overwrite",
|
|
1626
1625
|
targetFolderName: u = ""
|
|
1627
1626
|
}) {
|
|
1628
|
-
const e = n.name.replace(/\.zip$/, ""), p = ie(await r.documentRoot, "wp-content"), d = ie(p,
|
|
1627
|
+
const e = n.name.replace(/\.zip$/, ""), p = ie(await r.documentRoot, "wp-content"), d = ie(p, or()), y = ie(d, "assets", e);
|
|
1629
1628
|
await r.fileExists(y) && await r.rmdir(d, {
|
|
1630
1629
|
recursive: !0
|
|
1631
1630
|
}), await r.mkdir(d);
|
|
1632
1631
|
try {
|
|
1633
|
-
await
|
|
1632
|
+
await _r(r, {
|
|
1634
1633
|
zipFile: n,
|
|
1635
1634
|
extractToPath: y
|
|
1636
1635
|
});
|
|
@@ -1638,9 +1637,9 @@ async function Br(r, {
|
|
|
1638
1637
|
prependPath: !0
|
|
1639
1638
|
});
|
|
1640
1639
|
_ = _.filter((g) => !g.endsWith("/__MACOSX"));
|
|
1641
|
-
const
|
|
1640
|
+
const m = _.length === 1 && await r.isDir(_[0]);
|
|
1642
1641
|
let k, E = "";
|
|
1643
|
-
|
|
1642
|
+
m ? (E = _[0], k = _[0].split("/").pop()) : (E = y, k = e), u && u.length && (k = u);
|
|
1644
1643
|
const $ = `${t}/${k}`;
|
|
1645
1644
|
if (await r.fileExists($)) {
|
|
1646
1645
|
if (!await r.isDir($))
|
|
@@ -1672,7 +1671,7 @@ async function Br(r, {
|
|
|
1672
1671
|
});
|
|
1673
1672
|
}
|
|
1674
1673
|
}
|
|
1675
|
-
const
|
|
1674
|
+
const as = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, options: u = {} }, s) => {
|
|
1676
1675
|
n && (t = n, ae.warn(
|
|
1677
1676
|
'The "pluginZipFile" option is deprecated. Use "pluginData" instead.'
|
|
1678
1677
|
));
|
|
@@ -1691,10 +1690,10 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
|
|
|
1691
1690
|
if (t instanceof File)
|
|
1692
1691
|
if (await _(t)) {
|
|
1693
1692
|
const k = t.name.split("/").pop() || "plugin.zip";
|
|
1694
|
-
y =
|
|
1693
|
+
y = nr(k), s == null || s.tracker.setCaption(
|
|
1695
1694
|
`Installing the ${y} plugin`
|
|
1696
1695
|
);
|
|
1697
|
-
const E = await
|
|
1696
|
+
const E = await Mr(r, {
|
|
1698
1697
|
ifAlreadyInstalled: l,
|
|
1699
1698
|
zipFile: t,
|
|
1700
1699
|
targetPath: `${await r.documentRoot}/wp-content/plugins`,
|
|
@@ -1706,7 +1705,7 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
|
|
|
1706
1705
|
e,
|
|
1707
1706
|
t.name
|
|
1708
1707
|
);
|
|
1709
|
-
await
|
|
1708
|
+
await Pr(r, {
|
|
1710
1709
|
path: k,
|
|
1711
1710
|
data: t
|
|
1712
1711
|
}), d = e, y = t.name;
|
|
@@ -1720,11 +1719,11 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
|
|
|
1720
1719
|
e,
|
|
1721
1720
|
p || t.name
|
|
1722
1721
|
);
|
|
1723
|
-
await
|
|
1722
|
+
await gr(r, k, t.files, {
|
|
1724
1723
|
rmRoot: !0
|
|
1725
1724
|
}), d = k;
|
|
1726
1725
|
}
|
|
1727
|
-
("activate" in u ? u.activate : !0) && await
|
|
1726
|
+
("activate" in u ? u.activate : !0) && await Nr(
|
|
1728
1727
|
r,
|
|
1729
1728
|
{
|
|
1730
1729
|
pluginPath: d,
|
|
@@ -1732,15 +1731,15 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
|
|
|
1732
1731
|
},
|
|
1733
1732
|
s
|
|
1734
1733
|
);
|
|
1735
|
-
},
|
|
1734
|
+
}, ns = async (r, { themeData: t, themeZipFile: n, ifAlreadyInstalled: l, options: u = {} }, s) => {
|
|
1736
1735
|
n && (t = n, ae.warn(
|
|
1737
1736
|
'The "themeZipFile" option is deprecated. Use "themeData" instead.'
|
|
1738
1737
|
));
|
|
1739
1738
|
const e = "targetFolderName" in u ? u.targetFolderName : "";
|
|
1740
1739
|
let p = "", d = "";
|
|
1741
1740
|
if (t instanceof File) {
|
|
1742
|
-
const
|
|
1743
|
-
d =
|
|
1741
|
+
const m = t.name.split("/").pop() || "theme.zip";
|
|
1742
|
+
d = nr(m), s == null || s.tracker.setCaption(`Installing the ${d} theme`), p = (await Mr(r, {
|
|
1744
1743
|
ifAlreadyInstalled: l,
|
|
1745
1744
|
zipFile: t,
|
|
1746
1745
|
targetPath: `${await r.documentRoot}/wp-content/themes`,
|
|
@@ -1748,32 +1747,32 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
|
|
|
1748
1747
|
})).assetFolderName;
|
|
1749
1748
|
} else {
|
|
1750
1749
|
d = t.name, p = e || d, s == null || s.tracker.setCaption(`Installing the ${d} theme`);
|
|
1751
|
-
const
|
|
1750
|
+
const m = ie(
|
|
1752
1751
|
await r.documentRoot,
|
|
1753
1752
|
"wp-content",
|
|
1754
1753
|
"themes",
|
|
1755
1754
|
p
|
|
1756
1755
|
);
|
|
1757
|
-
await
|
|
1756
|
+
await gr(r, m, t.files, {
|
|
1758
1757
|
rmRoot: !0
|
|
1759
1758
|
});
|
|
1760
1759
|
}
|
|
1761
|
-
("activate" in u ? u.activate : !0) && await
|
|
1760
|
+
("activate" in u ? u.activate : !0) && await xr(
|
|
1762
1761
|
r,
|
|
1763
1762
|
{
|
|
1764
1763
|
themeFolderName: p
|
|
1765
1764
|
},
|
|
1766
1765
|
s
|
|
1767
|
-
), ("importStarterContent" in u ? u.importStarterContent : !1) && await
|
|
1766
|
+
), ("importStarterContent" in u ? u.importStarterContent : !1) && await Wr(
|
|
1768
1767
|
r,
|
|
1769
1768
|
{
|
|
1770
1769
|
themeSlug: p
|
|
1771
1770
|
},
|
|
1772
1771
|
s
|
|
1773
1772
|
);
|
|
1774
|
-
},
|
|
1773
|
+
}, ps = async (r, { username: t = "admin" } = {}, n) => {
|
|
1775
1774
|
n == null || n.tracker.setCaption((n == null ? void 0 : n.initialCaption) || "Logging in"), r.defineConstant("PLAYGROUND_AUTO_LOGIN_AS_USER", t);
|
|
1776
|
-
},
|
|
1775
|
+
}, ls = async (r, t, n) => {
|
|
1777
1776
|
var u;
|
|
1778
1777
|
(u = n == null ? void 0 : n.tracker) == null || u.setCaption("Resetting WordPress data");
|
|
1779
1778
|
const l = await r.documentRoot;
|
|
@@ -1797,7 +1796,7 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
|
|
|
1797
1796
|
$GLOBALS['@pdo']->query("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='wp_commentmeta'");
|
|
1798
1797
|
`
|
|
1799
1798
|
});
|
|
1800
|
-
},
|
|
1799
|
+
}, fs = async (r, { options: t }) => {
|
|
1801
1800
|
await r.request({
|
|
1802
1801
|
url: "/wp-admin/install.php?step=2",
|
|
1803
1802
|
method: "POST",
|
|
@@ -1814,30 +1813,30 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
|
|
|
1814
1813
|
admin_email: "admin@localhost.com"
|
|
1815
1814
|
}
|
|
1816
1815
|
});
|
|
1817
|
-
},
|
|
1816
|
+
}, us = async (r, { selfContained: t = !1 } = {}) => {
|
|
1818
1817
|
const n = "/tmp/wordpress-playground.zip", l = "/tmp/playground-export.json", u = await r.documentRoot, s = ie(u, "wp-content"), e = await r.absoluteUrl;
|
|
1819
1818
|
await r.writeFile(
|
|
1820
1819
|
l,
|
|
1821
1820
|
new TextEncoder().encode(JSON.stringify({ siteUrl: e }))
|
|
1822
1821
|
);
|
|
1823
|
-
let p =
|
|
1824
|
-
t && (p = p.filter((
|
|
1825
|
-
(
|
|
1822
|
+
let p = Br;
|
|
1823
|
+
t && (p = p.filter((m) => !m.startsWith("themes/twenty")).filter(
|
|
1824
|
+
(m) => m !== "mu-plugins/sqlite-database-integration"
|
|
1826
1825
|
));
|
|
1827
1826
|
const d = {
|
|
1828
1827
|
[l]: "playground-export.json"
|
|
1829
1828
|
};
|
|
1830
1829
|
t && (d[ie(u, "wp-config.php")] = "wp-config.php");
|
|
1831
|
-
const y =
|
|
1830
|
+
const y = yr({
|
|
1832
1831
|
zipPath: n,
|
|
1833
1832
|
wpContentPath: s,
|
|
1834
1833
|
documentRoot: u,
|
|
1835
1834
|
exceptPaths: p.map(
|
|
1836
|
-
(
|
|
1835
|
+
(m) => ie(u, "wp-content", m)
|
|
1837
1836
|
),
|
|
1838
1837
|
additionalPaths: d
|
|
1839
1838
|
});
|
|
1840
|
-
await
|
|
1839
|
+
await cs(
|
|
1841
1840
|
r,
|
|
1842
1841
|
`zipDir(${y.wpContentPath}, ${y.zipPath}, array(
|
|
1843
1842
|
'exclude_paths' => ${y.exceptPaths},
|
|
@@ -1847,7 +1846,7 @@ const os = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: l, o
|
|
|
1847
1846
|
);
|
|
1848
1847
|
const _ = await r.readFileAsBuffer(n);
|
|
1849
1848
|
return r.unlink(n), r.unlink(l), _;
|
|
1850
|
-
},
|
|
1849
|
+
}, ds = `<?php
|
|
1851
1850
|
|
|
1852
1851
|
function zipDir($root, $output, $options = array())
|
|
1853
1852
|
{
|
|
@@ -1908,12 +1907,12 @@ function join_paths()
|
|
|
1908
1907
|
return preg_replace('#/+#', '/', join('/', $paths));
|
|
1909
1908
|
}
|
|
1910
1909
|
`;
|
|
1911
|
-
async function
|
|
1910
|
+
async function cs(r, t) {
|
|
1912
1911
|
return await r.run({
|
|
1913
|
-
code:
|
|
1912
|
+
code: ds + t
|
|
1914
1913
|
});
|
|
1915
1914
|
}
|
|
1916
|
-
const
|
|
1915
|
+
const ms = async (r, t) => {
|
|
1917
1916
|
const u = (await (await fetch(
|
|
1918
1917
|
`https://api.wordpress.org/translations/core/1.0/?version=${r}`
|
|
1919
1918
|
)).json()).translations.find(
|
|
@@ -1924,7 +1923,7 @@ const cs = async (r, t) => {
|
|
|
1924
1923
|
`Failed to get ${t} translation package for WordPress ${r}.`
|
|
1925
1924
|
);
|
|
1926
1925
|
return u.package;
|
|
1927
|
-
},
|
|
1926
|
+
}, ys = async (r, { language: t }, n) => {
|
|
1928
1927
|
n == null || n.tracker.setCaption((n == null ? void 0 : n.initialCaption) || "Translating"), await r.defineConstant("WPLANG", t);
|
|
1929
1928
|
const l = await r.documentRoot, u = (await r.run({
|
|
1930
1929
|
code: `<?php
|
|
@@ -1933,7 +1932,7 @@ const cs = async (r, t) => {
|
|
|
1933
1932
|
`
|
|
1934
1933
|
})).text, s = [
|
|
1935
1934
|
{
|
|
1936
|
-
url: await
|
|
1935
|
+
url: await ms(u, t),
|
|
1937
1936
|
type: "core"
|
|
1938
1937
|
}
|
|
1939
1938
|
], p = (await r.run({
|
|
@@ -1988,7 +1987,7 @@ const cs = async (r, t) => {
|
|
|
1988
1987
|
type: "theme"
|
|
1989
1988
|
});
|
|
1990
1989
|
await r.isDir(`${l}/wp-content/languages/plugins`) || await r.mkdir(`${l}/wp-content/languages/plugins`), await r.isDir(`${l}/wp-content/languages/themes`) || await r.mkdir(`${l}/wp-content/languages/themes`);
|
|
1991
|
-
const _ = new
|
|
1990
|
+
const _ = new Ar({ concurrency: 5 }), m = s.map(
|
|
1992
1991
|
({ url: k, type: E }) => _.run(async () => {
|
|
1993
1992
|
try {
|
|
1994
1993
|
const $ = await fetch(k);
|
|
@@ -1997,7 +1996,7 @@ const cs = async (r, t) => {
|
|
|
1997
1996
|
`Failed to download translations for ${E}: ${$.statusText}`
|
|
1998
1997
|
);
|
|
1999
1998
|
let g = `${l}/wp-content/languages`;
|
|
2000
|
-
E === "plugin" ? g += "/plugins" : E === "theme" && (g += "/themes"), await
|
|
1999
|
+
E === "plugin" ? g += "/plugins" : E === "theme" && (g += "/themes"), await Rr(
|
|
2001
2000
|
r,
|
|
2002
2001
|
new File(
|
|
2003
2002
|
[await $.arrayBuffer()],
|
|
@@ -2016,41 +2015,41 @@ const cs = async (r, t) => {
|
|
|
2016
2015
|
}
|
|
2017
2016
|
})
|
|
2018
2017
|
);
|
|
2019
|
-
await Promise.all(
|
|
2020
|
-
},
|
|
2018
|
+
await Promise.all(m);
|
|
2019
|
+
}, hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2021
2020
|
__proto__: null,
|
|
2022
|
-
activatePlugin:
|
|
2023
|
-
activateTheme:
|
|
2024
|
-
cp:
|
|
2025
|
-
defineSiteUrl:
|
|
2026
|
-
defineWpConfigConsts:
|
|
2027
|
-
enableMultisite:
|
|
2028
|
-
exportWXR:
|
|
2029
|
-
importThemeStarterContent:
|
|
2030
|
-
importWordPressFiles:
|
|
2031
|
-
importWxr:
|
|
2032
|
-
installPlugin:
|
|
2033
|
-
installTheme:
|
|
2034
|
-
login:
|
|
2035
|
-
mkdir:
|
|
2036
|
-
mv:
|
|
2037
|
-
request:
|
|
2038
|
-
resetData:
|
|
2039
|
-
rm:
|
|
2040
|
-
rmdir:
|
|
2041
|
-
runPHP:
|
|
2042
|
-
runPHPWithOptions:
|
|
2043
|
-
runSql:
|
|
2044
|
-
runWpInstallationWizard:
|
|
2045
|
-
setSiteLanguage:
|
|
2046
|
-
setSiteOptions:
|
|
2047
|
-
unzip:
|
|
2048
|
-
updateUserMeta:
|
|
2049
|
-
wpCLI:
|
|
2050
|
-
writeFile:
|
|
2051
|
-
writeFiles:
|
|
2052
|
-
zipWpContent:
|
|
2053
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2021
|
+
activatePlugin: Nr,
|
|
2022
|
+
activateTheme: xr,
|
|
2023
|
+
cp: Yt,
|
|
2024
|
+
defineSiteUrl: Ir,
|
|
2025
|
+
defineWpConfigConsts: wr,
|
|
2026
|
+
enableMultisite: Qt,
|
|
2027
|
+
exportWXR: os,
|
|
2028
|
+
importThemeStarterContent: Wr,
|
|
2029
|
+
importWordPressFiles: ts,
|
|
2030
|
+
importWxr: es,
|
|
2031
|
+
installPlugin: as,
|
|
2032
|
+
installTheme: ns,
|
|
2033
|
+
login: ps,
|
|
2034
|
+
mkdir: Jt,
|
|
2035
|
+
mv: Gt,
|
|
2036
|
+
request: Mt,
|
|
2037
|
+
resetData: ls,
|
|
2038
|
+
rm: mr,
|
|
2039
|
+
rmdir: Xt,
|
|
2040
|
+
runPHP: Ut,
|
|
2041
|
+
runPHPWithOptions: It,
|
|
2042
|
+
runSql: Bt,
|
|
2043
|
+
runWpInstallationWizard: fs,
|
|
2044
|
+
setSiteLanguage: ys,
|
|
2045
|
+
setSiteOptions: Cr,
|
|
2046
|
+
unzip: _r,
|
|
2047
|
+
updateUserMeta: Vt,
|
|
2048
|
+
wpCLI: Ur,
|
|
2049
|
+
writeFile: Pr,
|
|
2050
|
+
writeFiles: Kt,
|
|
2051
|
+
zipWpContent: us
|
|
2052
|
+
}, Symbol.toStringTag, { value: "Module" })), gs = {
|
|
2054
2053
|
properties: {
|
|
2055
2054
|
landingPage: {
|
|
2056
2055
|
type: "string",
|
|
@@ -2181,39 +2180,90 @@ Note: PHP 7.2 and 7.3 are deprecated and will be automatically upgraded to 7.4.`
|
|
|
2181
2180
|
},
|
|
2182
2181
|
$schema: { type: "string" }
|
|
2183
2182
|
}
|
|
2184
|
-
},
|
|
2183
|
+
}, bs = {
|
|
2185
2184
|
additionalProperties: { type: ["string", "boolean", "number"] }
|
|
2186
|
-
},
|
|
2185
|
+
}, zr = Object.prototype.hasOwnProperty, ws = {
|
|
2187
2186
|
enum: ["8.5", "8.4", "8.3", "8.2", "8.1", "8.0", "7.4"]
|
|
2188
|
-
};
|
|
2187
|
+
}, vs = { enum: ["5.2"] };
|
|
2189
2188
|
function Ie(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
|
|
2190
2189
|
let s = null, e = 0;
|
|
2191
2190
|
const p = e;
|
|
2192
2191
|
let d = !1;
|
|
2193
2192
|
const y = e;
|
|
2194
2193
|
if (typeof r != "string") {
|
|
2195
|
-
const
|
|
2194
|
+
const m = {
|
|
2196
2195
|
instancePath: t,
|
|
2197
2196
|
schemaPath: "#/definitions/SupportedPHPVersion/type",
|
|
2198
2197
|
keyword: "type",
|
|
2199
2198
|
params: { type: "string" },
|
|
2200
2199
|
message: "must be string"
|
|
2201
2200
|
};
|
|
2202
|
-
s === null ? s = [
|
|
2201
|
+
s === null ? s = [m] : s.push(m), e++;
|
|
2203
2202
|
}
|
|
2204
2203
|
if (!(r === "8.5" || r === "8.4" || r === "8.3" || r === "8.2" || r === "8.1" || r === "8.0" || r === "7.4")) {
|
|
2205
|
-
const
|
|
2204
|
+
const m = {
|
|
2206
2205
|
instancePath: t,
|
|
2207
2206
|
schemaPath: "#/definitions/SupportedPHPVersion/enum",
|
|
2208
2207
|
keyword: "enum",
|
|
2209
|
-
params: { allowedValues:
|
|
2208
|
+
params: { allowedValues: ws.enum },
|
|
2210
2209
|
message: "must be equal to one of the allowed values"
|
|
2211
2210
|
};
|
|
2212
|
-
s === null ? s = [
|
|
2211
|
+
s === null ? s = [m] : s.push(m), e++;
|
|
2213
2212
|
}
|
|
2214
2213
|
var _ = y === e;
|
|
2215
2214
|
if (d = d || _, !d) {
|
|
2216
|
-
const
|
|
2215
|
+
const m = e;
|
|
2216
|
+
if (typeof r != "string") {
|
|
2217
|
+
const E = {
|
|
2218
|
+
instancePath: t,
|
|
2219
|
+
schemaPath: "#/definitions/LegacyPHPVersion/type",
|
|
2220
|
+
keyword: "type",
|
|
2221
|
+
params: { type: "string" },
|
|
2222
|
+
message: "must be string"
|
|
2223
|
+
};
|
|
2224
|
+
s === null ? s = [E] : s.push(E), e++;
|
|
2225
|
+
}
|
|
2226
|
+
if (r !== "5.2") {
|
|
2227
|
+
const E = {
|
|
2228
|
+
instancePath: t,
|
|
2229
|
+
schemaPath: "#/definitions/LegacyPHPVersion/enum",
|
|
2230
|
+
keyword: "enum",
|
|
2231
|
+
params: { allowedValues: vs.enum },
|
|
2232
|
+
message: "must be equal to one of the allowed values"
|
|
2233
|
+
};
|
|
2234
|
+
s === null ? s = [E] : s.push(E), e++;
|
|
2235
|
+
}
|
|
2236
|
+
var _ = m === e;
|
|
2237
|
+
d = d || _;
|
|
2238
|
+
}
|
|
2239
|
+
if (d)
|
|
2240
|
+
e = p, s !== null && (p ? s.length = p : s = null);
|
|
2241
|
+
else {
|
|
2242
|
+
const m = {
|
|
2243
|
+
instancePath: t,
|
|
2244
|
+
schemaPath: "#/anyOf",
|
|
2245
|
+
keyword: "anyOf",
|
|
2246
|
+
params: {},
|
|
2247
|
+
message: "must match a schema in anyOf"
|
|
2248
|
+
};
|
|
2249
|
+
return s === null ? s = [m] : s.push(m), e++, Ie.errors = s, !1;
|
|
2250
|
+
}
|
|
2251
|
+
return Ie.errors = s, e === 0;
|
|
2252
|
+
}
|
|
2253
|
+
function We(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
|
|
2254
|
+
let s = null, e = 0;
|
|
2255
|
+
const p = e;
|
|
2256
|
+
let d = !1;
|
|
2257
|
+
const y = e;
|
|
2258
|
+
Ie(r, {
|
|
2259
|
+
instancePath: t,
|
|
2260
|
+
parentData: n,
|
|
2261
|
+
parentDataProperty: l,
|
|
2262
|
+
rootData: u
|
|
2263
|
+
}) || (s = s === null ? Ie.errors : s.concat(Ie.errors), e = s.length);
|
|
2264
|
+
var _ = y === e;
|
|
2265
|
+
if (d = d || _, !d) {
|
|
2266
|
+
const m = e;
|
|
2217
2267
|
if (typeof r != "string") {
|
|
2218
2268
|
const E = {
|
|
2219
2269
|
instancePath: t,
|
|
@@ -2234,7 +2284,7 @@ function Ie(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2234
2284
|
};
|
|
2235
2285
|
s === null ? s = [E] : s.push(E), e++;
|
|
2236
2286
|
}
|
|
2237
|
-
var _ =
|
|
2287
|
+
var _ = m === e;
|
|
2238
2288
|
if (d = d || _, !d) {
|
|
2239
2289
|
const E = e;
|
|
2240
2290
|
if (typeof r != "string") {
|
|
@@ -2264,18 +2314,18 @@ function Ie(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2264
2314
|
if (d)
|
|
2265
2315
|
e = p, s !== null && (p ? s.length = p : s = null);
|
|
2266
2316
|
else {
|
|
2267
|
-
const
|
|
2317
|
+
const m = {
|
|
2268
2318
|
instancePath: t,
|
|
2269
2319
|
schemaPath: "#/anyOf",
|
|
2270
2320
|
keyword: "anyOf",
|
|
2271
2321
|
params: {},
|
|
2272
2322
|
message: "must match a schema in anyOf"
|
|
2273
2323
|
};
|
|
2274
|
-
return s === null ? s = [
|
|
2324
|
+
return s === null ? s = [m] : s.push(m), e++, We.errors = s, !1;
|
|
2275
2325
|
}
|
|
2276
|
-
return
|
|
2326
|
+
return We.errors = s, e === 0;
|
|
2277
2327
|
}
|
|
2278
|
-
const
|
|
2328
|
+
const dr = { validate: Y }, Ps = {
|
|
2279
2329
|
enum: ["branch", "tag", "commit", "refname"]
|
|
2280
2330
|
};
|
|
2281
2331
|
function de(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
|
|
@@ -2383,7 +2433,7 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2383
2433
|
schemaPath: "#/definitions/GitDirectoryRefType/enum",
|
|
2384
2434
|
keyword: "enum",
|
|
2385
2435
|
params: {
|
|
2386
|
-
allowedValues:
|
|
2436
|
+
allowedValues: Ps.enum
|
|
2387
2437
|
},
|
|
2388
2438
|
message: "must be equal to one of the allowed values"
|
|
2389
2439
|
}
|
|
@@ -2442,29 +2492,29 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2442
2492
|
], !1;
|
|
2443
2493
|
return de.errors = s, e === 0;
|
|
2444
2494
|
}
|
|
2445
|
-
const
|
|
2495
|
+
const _s = {
|
|
2446
2496
|
additionalProperties: {
|
|
2447
2497
|
anyOf: [
|
|
2448
2498
|
{ $ref: "#/definitions/FileTree" },
|
|
2449
2499
|
{ type: ["object", "string"] }
|
|
2450
2500
|
]
|
|
2451
2501
|
}
|
|
2452
|
-
},
|
|
2502
|
+
}, cr = { validate: xe };
|
|
2453
2503
|
function xe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
|
|
2454
2504
|
let s = null, e = 0;
|
|
2455
2505
|
if (e === 0)
|
|
2456
2506
|
if (r && typeof r == "object" && !Array.isArray(r))
|
|
2457
2507
|
for (const y in r) {
|
|
2458
2508
|
let _ = r[y];
|
|
2459
|
-
const
|
|
2509
|
+
const m = e, k = e;
|
|
2460
2510
|
let E = !1;
|
|
2461
2511
|
const $ = e;
|
|
2462
|
-
|
|
2512
|
+
cr.validate(_, {
|
|
2463
2513
|
instancePath: t + "/" + y.replace(/~/g, "~0").replace(/\//g, "~1"),
|
|
2464
2514
|
parentData: r,
|
|
2465
2515
|
parentDataProperty: y,
|
|
2466
2516
|
rootData: u
|
|
2467
|
-
}) || (s = s === null ?
|
|
2517
|
+
}) || (s = s === null ? cr.validate.errors : s.concat(cr.validate.errors), e = s.length);
|
|
2468
2518
|
var p = $ === e;
|
|
2469
2519
|
if (E = E || p, !E) {
|
|
2470
2520
|
const g = e;
|
|
@@ -2474,7 +2524,7 @@ function xe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2474
2524
|
schemaPath: "#/additionalProperties/anyOf/1/type",
|
|
2475
2525
|
keyword: "type",
|
|
2476
2526
|
params: {
|
|
2477
|
-
type:
|
|
2527
|
+
type: _s.additionalProperties.anyOf[1].type
|
|
2478
2528
|
},
|
|
2479
2529
|
message: "must be object,string"
|
|
2480
2530
|
};
|
|
@@ -2495,7 +2545,7 @@ function xe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2495
2545
|
};
|
|
2496
2546
|
return s === null ? s = [g] : s.push(g), e++, xe.errors = s, !1;
|
|
2497
2547
|
}
|
|
2498
|
-
var d =
|
|
2548
|
+
var d = m === e;
|
|
2499
2549
|
if (!d)
|
|
2500
2550
|
break;
|
|
2501
2551
|
}
|
|
@@ -2542,7 +2592,7 @@ function $e(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2542
2592
|
if (y === e) {
|
|
2543
2593
|
if (r.resource !== void 0) {
|
|
2544
2594
|
let _ = r.resource;
|
|
2545
|
-
const
|
|
2595
|
+
const m = e;
|
|
2546
2596
|
if (typeof _ != "string")
|
|
2547
2597
|
return $e.errors = [
|
|
2548
2598
|
{
|
|
@@ -2565,7 +2615,7 @@ function $e(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2565
2615
|
message: "must be equal to constant"
|
|
2566
2616
|
}
|
|
2567
2617
|
], !1;
|
|
2568
|
-
var p =
|
|
2618
|
+
var p = m === e;
|
|
2569
2619
|
} else
|
|
2570
2620
|
var p = !0;
|
|
2571
2621
|
if (p) {
|
|
@@ -2624,27 +2674,27 @@ function ce(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2624
2674
|
}) || (s = s === null ? de.errors : s.concat(de.errors), e = s.length);
|
|
2625
2675
|
var _ = y === e;
|
|
2626
2676
|
if (d = d || _, !d) {
|
|
2627
|
-
const
|
|
2677
|
+
const m = e;
|
|
2628
2678
|
$e(r, {
|
|
2629
2679
|
instancePath: t,
|
|
2630
2680
|
parentData: n,
|
|
2631
2681
|
parentDataProperty: l,
|
|
2632
2682
|
rootData: u
|
|
2633
2683
|
}) || (s = s === null ? $e.errors : s.concat($e.errors), e = s.length);
|
|
2634
|
-
var _ =
|
|
2684
|
+
var _ = m === e;
|
|
2635
2685
|
d = d || _;
|
|
2636
2686
|
}
|
|
2637
2687
|
if (d)
|
|
2638
2688
|
e = p, s !== null && (p ? s.length = p : s = null);
|
|
2639
2689
|
else {
|
|
2640
|
-
const
|
|
2690
|
+
const m = {
|
|
2641
2691
|
instancePath: t,
|
|
2642
2692
|
schemaPath: "#/anyOf",
|
|
2643
2693
|
keyword: "anyOf",
|
|
2644
2694
|
params: {},
|
|
2645
2695
|
message: "must match a schema in anyOf"
|
|
2646
2696
|
};
|
|
2647
|
-
return s === null ? s = [
|
|
2697
|
+
return s === null ? s = [m] : s.push(m), e++, ce.errors = s, !1;
|
|
2648
2698
|
}
|
|
2649
2699
|
return ce.errors = s, e === 0;
|
|
2650
2700
|
}
|
|
@@ -2665,22 +2715,22 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2665
2715
|
], !1;
|
|
2666
2716
|
{
|
|
2667
2717
|
const _ = e;
|
|
2668
|
-
for (const
|
|
2669
|
-
if (!(
|
|
2718
|
+
for (const m in r)
|
|
2719
|
+
if (!(m === "resource" || m === "inner" || m === "name"))
|
|
2670
2720
|
return ve.errors = [
|
|
2671
2721
|
{
|
|
2672
2722
|
instancePath: t,
|
|
2673
2723
|
schemaPath: "#/additionalProperties",
|
|
2674
2724
|
keyword: "additionalProperties",
|
|
2675
|
-
params: { additionalProperty:
|
|
2725
|
+
params: { additionalProperty: m },
|
|
2676
2726
|
message: "must NOT have additional properties"
|
|
2677
2727
|
}
|
|
2678
2728
|
], !1;
|
|
2679
2729
|
if (_ === e) {
|
|
2680
2730
|
if (r.resource !== void 0) {
|
|
2681
|
-
let
|
|
2731
|
+
let m = r.resource;
|
|
2682
2732
|
const k = e;
|
|
2683
|
-
if (typeof
|
|
2733
|
+
if (typeof m != "string")
|
|
2684
2734
|
return ve.errors = [
|
|
2685
2735
|
{
|
|
2686
2736
|
instancePath: t + "/resource",
|
|
@@ -2690,7 +2740,7 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2690
2740
|
message: "must be string"
|
|
2691
2741
|
}
|
|
2692
2742
|
], !1;
|
|
2693
|
-
if (
|
|
2743
|
+
if (m !== "zip")
|
|
2694
2744
|
return ve.errors = [
|
|
2695
2745
|
{
|
|
2696
2746
|
instancePath: t + "/resource",
|
|
@@ -2705,22 +2755,22 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2705
2755
|
var p = !0;
|
|
2706
2756
|
if (p) {
|
|
2707
2757
|
if (r.inner !== void 0) {
|
|
2708
|
-
let
|
|
2758
|
+
let m = r.inner;
|
|
2709
2759
|
const k = e, E = e;
|
|
2710
2760
|
let $ = !1;
|
|
2711
2761
|
const g = e;
|
|
2712
|
-
|
|
2762
|
+
dr.validate(m, {
|
|
2713
2763
|
instancePath: t + "/inner",
|
|
2714
2764
|
parentData: r,
|
|
2715
2765
|
parentDataProperty: "inner",
|
|
2716
2766
|
rootData: u
|
|
2717
|
-
}) || (s = s === null ?
|
|
2718
|
-
|
|
2767
|
+
}) || (s = s === null ? dr.validate.errors : s.concat(
|
|
2768
|
+
dr.validate.errors
|
|
2719
2769
|
), e = s.length);
|
|
2720
2770
|
var d = g === e;
|
|
2721
2771
|
if ($ = $ || d, !$) {
|
|
2722
2772
|
const X = e;
|
|
2723
|
-
ce(
|
|
2773
|
+
ce(m, {
|
|
2724
2774
|
instancePath: t + "/inner",
|
|
2725
2775
|
parentData: r,
|
|
2726
2776
|
parentDataProperty: "inner",
|
|
@@ -2746,7 +2796,7 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2746
2796
|
var p = !0;
|
|
2747
2797
|
if (p)
|
|
2748
2798
|
if (r.name !== void 0) {
|
|
2749
|
-
const
|
|
2799
|
+
const m = e;
|
|
2750
2800
|
if (typeof r.name != "string")
|
|
2751
2801
|
return ve.errors = [
|
|
2752
2802
|
{
|
|
@@ -2757,7 +2807,7 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
2757
2807
|
message: "must be string"
|
|
2758
2808
|
}
|
|
2759
2809
|
], !1;
|
|
2760
|
-
var p =
|
|
2810
|
+
var p = m === e;
|
|
2761
2811
|
} else
|
|
2762
2812
|
var p = !0;
|
|
2763
2813
|
}
|
|
@@ -2794,13 +2844,13 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
2794
2844
|
s === null ? s = [re] : s.push(re), e++;
|
|
2795
2845
|
} else {
|
|
2796
2846
|
const re = e;
|
|
2797
|
-
for (const
|
|
2798
|
-
if (!(
|
|
2847
|
+
for (const h in r)
|
|
2848
|
+
if (!(h === "resource" || h === "path")) {
|
|
2799
2849
|
const N = {
|
|
2800
2850
|
instancePath: t,
|
|
2801
2851
|
schemaPath: "#/definitions/VFSReference/additionalProperties",
|
|
2802
2852
|
keyword: "additionalProperties",
|
|
2803
|
-
params: { additionalProperty:
|
|
2853
|
+
params: { additionalProperty: h },
|
|
2804
2854
|
message: "must NOT have additional properties"
|
|
2805
2855
|
};
|
|
2806
2856
|
s === null ? s = [N] : s.push(N), e++;
|
|
@@ -2808,9 +2858,9 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
2808
2858
|
}
|
|
2809
2859
|
if (re === e) {
|
|
2810
2860
|
if (r.resource !== void 0) {
|
|
2811
|
-
let
|
|
2861
|
+
let h = r.resource;
|
|
2812
2862
|
const N = e;
|
|
2813
|
-
if (typeof
|
|
2863
|
+
if (typeof h != "string") {
|
|
2814
2864
|
const v = {
|
|
2815
2865
|
instancePath: t + "/resource",
|
|
2816
2866
|
schemaPath: "#/definitions/VFSReference/properties/resource/type",
|
|
@@ -2820,7 +2870,7 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
2820
2870
|
};
|
|
2821
2871
|
s === null ? s = [v] : s.push(v), e++;
|
|
2822
2872
|
}
|
|
2823
|
-
if (
|
|
2873
|
+
if (h !== "vfs") {
|
|
2824
2874
|
const v = {
|
|
2825
2875
|
instancePath: t + "/resource",
|
|
2826
2876
|
schemaPath: "#/definitions/VFSReference/properties/resource/const",
|
|
@@ -2830,12 +2880,12 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
2830
2880
|
};
|
|
2831
2881
|
s === null ? s = [v] : s.push(v), e++;
|
|
2832
2882
|
}
|
|
2833
|
-
var
|
|
2883
|
+
var m = N === e;
|
|
2834
2884
|
} else
|
|
2835
|
-
var
|
|
2836
|
-
if (
|
|
2885
|
+
var m = !0;
|
|
2886
|
+
if (m)
|
|
2837
2887
|
if (r.path !== void 0) {
|
|
2838
|
-
const
|
|
2888
|
+
const h = e;
|
|
2839
2889
|
if (typeof r.path != "string") {
|
|
2840
2890
|
const v = {
|
|
2841
2891
|
instancePath: t + "/path",
|
|
@@ -2846,9 +2896,9 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
2846
2896
|
};
|
|
2847
2897
|
s === null ? s = [v] : s.push(v), e++;
|
|
2848
2898
|
}
|
|
2849
|
-
var
|
|
2899
|
+
var m = h === e;
|
|
2850
2900
|
} else
|
|
2851
|
-
var
|
|
2901
|
+
var m = !0;
|
|
2852
2902
|
}
|
|
2853
2903
|
}
|
|
2854
2904
|
} else {
|
|
@@ -3629,7 +3679,7 @@ function Y(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
3629
3679
|
}
|
|
3630
3680
|
return Y.errors = s, e === 0;
|
|
3631
3681
|
}
|
|
3632
|
-
const
|
|
3682
|
+
const sr = {
|
|
3633
3683
|
oneOf: [
|
|
3634
3684
|
{
|
|
3635
3685
|
type: "object",
|
|
@@ -4350,7 +4400,7 @@ Only the username field is required for user authentication.`
|
|
|
4350
4400
|
required: ["language", "step"]
|
|
4351
4401
|
}
|
|
4352
4402
|
]
|
|
4353
|
-
},
|
|
4403
|
+
}, Vr = {
|
|
4354
4404
|
enum: ["GET", "POST", "HEAD", "OPTIONS", "PATCH", "PUT", "DELETE"]
|
|
4355
4405
|
};
|
|
4356
4406
|
function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
|
|
@@ -4401,7 +4451,7 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
4401
4451
|
instancePath: t + "/method",
|
|
4402
4452
|
schemaPath: "#/definitions/HTTPMethod/enum",
|
|
4403
4453
|
keyword: "enum",
|
|
4404
|
-
params: { allowedValues:
|
|
4454
|
+
params: { allowedValues: Vr.enum },
|
|
4405
4455
|
message: "must be equal to one of the allowed values"
|
|
4406
4456
|
}
|
|
4407
4457
|
], !1;
|
|
@@ -4430,12 +4480,12 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
4430
4480
|
const K = e;
|
|
4431
4481
|
if (e === e)
|
|
4432
4482
|
if (q && typeof q == "object" && !Array.isArray(q))
|
|
4433
|
-
for (const
|
|
4483
|
+
for (const h in q) {
|
|
4434
4484
|
const N = e;
|
|
4435
|
-
if (typeof q[
|
|
4485
|
+
if (typeof q[h] != "string")
|
|
4436
4486
|
return ge.errors = [
|
|
4437
4487
|
{
|
|
4438
|
-
instancePath: t + "/headers/" +
|
|
4488
|
+
instancePath: t + "/headers/" + h.replace(
|
|
4439
4489
|
/~/g,
|
|
4440
4490
|
"~0"
|
|
4441
4491
|
).replace(
|
|
@@ -4472,7 +4522,7 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
4472
4522
|
let q = r.body;
|
|
4473
4523
|
const K = e, W = e;
|
|
4474
4524
|
let re = !1;
|
|
4475
|
-
const
|
|
4525
|
+
const h = e;
|
|
4476
4526
|
if (typeof q != "string") {
|
|
4477
4527
|
const v = {
|
|
4478
4528
|
instancePath: t + "/body",
|
|
@@ -4483,7 +4533,7 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
4483
4533
|
};
|
|
4484
4534
|
s === null ? s = [v] : s.push(v), e++;
|
|
4485
4535
|
}
|
|
4486
|
-
var y =
|
|
4536
|
+
var y = h === e;
|
|
4487
4537
|
if (re = re || y, !re) {
|
|
4488
4538
|
const v = e;
|
|
4489
4539
|
if (e === v)
|
|
@@ -4556,10 +4606,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
4556
4606
|
R
|
|
4557
4607
|
), e++;
|
|
4558
4608
|
}
|
|
4559
|
-
var
|
|
4609
|
+
var m = w === e;
|
|
4560
4610
|
} else
|
|
4561
|
-
var
|
|
4562
|
-
if (
|
|
4611
|
+
var m = !0;
|
|
4612
|
+
if (m) {
|
|
4563
4613
|
if (q.buffer !== void 0) {
|
|
4564
4614
|
let P = q.buffer;
|
|
4565
4615
|
const w = e;
|
|
@@ -4641,10 +4691,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
4641
4691
|
L
|
|
4642
4692
|
), e++;
|
|
4643
4693
|
}
|
|
4644
|
-
var
|
|
4694
|
+
var m = w === e;
|
|
4645
4695
|
} else
|
|
4646
|
-
var
|
|
4647
|
-
if (
|
|
4696
|
+
var m = !0;
|
|
4697
|
+
if (m) {
|
|
4648
4698
|
if (q.byteLength !== void 0) {
|
|
4649
4699
|
let P = q.byteLength;
|
|
4650
4700
|
const w = e;
|
|
@@ -4666,10 +4716,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
4666
4716
|
L
|
|
4667
4717
|
), e++;
|
|
4668
4718
|
}
|
|
4669
|
-
var
|
|
4719
|
+
var m = w === e;
|
|
4670
4720
|
} else
|
|
4671
|
-
var
|
|
4672
|
-
if (
|
|
4721
|
+
var m = !0;
|
|
4722
|
+
if (m) {
|
|
4673
4723
|
if (q.byteOffset !== void 0) {
|
|
4674
4724
|
let P = q.byteOffset;
|
|
4675
4725
|
const w = e;
|
|
@@ -4691,10 +4741,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
4691
4741
|
L
|
|
4692
4742
|
), e++;
|
|
4693
4743
|
}
|
|
4694
|
-
var
|
|
4744
|
+
var m = w === e;
|
|
4695
4745
|
} else
|
|
4696
|
-
var
|
|
4697
|
-
if (
|
|
4746
|
+
var m = !0;
|
|
4747
|
+
if (m)
|
|
4698
4748
|
if (q.length !== void 0) {
|
|
4699
4749
|
let P = q.length;
|
|
4700
4750
|
const w = e;
|
|
@@ -4716,9 +4766,9 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
4716
4766
|
L
|
|
4717
4767
|
), e++;
|
|
4718
4768
|
}
|
|
4719
|
-
var
|
|
4769
|
+
var m = w === e;
|
|
4720
4770
|
} else
|
|
4721
|
-
var
|
|
4771
|
+
var m = !0;
|
|
4722
4772
|
}
|
|
4723
4773
|
}
|
|
4724
4774
|
}
|
|
@@ -5400,7 +5450,7 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
5400
5450
|
], !1;
|
|
5401
5451
|
return ge.errors = s, e === 0;
|
|
5402
5452
|
}
|
|
5403
|
-
const
|
|
5453
|
+
const ks = {
|
|
5404
5454
|
properties: {
|
|
5405
5455
|
relativeUri: {
|
|
5406
5456
|
type: "string",
|
|
@@ -5470,7 +5520,7 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
5470
5520
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
5471
5521
|
const $ = e;
|
|
5472
5522
|
for (const g in r)
|
|
5473
|
-
if (!
|
|
5523
|
+
if (!zr.call(ks.properties, g))
|
|
5474
5524
|
return pe.errors = [
|
|
5475
5525
|
{
|
|
5476
5526
|
instancePath: t,
|
|
@@ -5549,7 +5599,7 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
5549
5599
|
schemaPath: "#/definitions/HTTPMethod/enum",
|
|
5550
5600
|
keyword: "enum",
|
|
5551
5601
|
params: {
|
|
5552
|
-
allowedValues:
|
|
5602
|
+
allowedValues: Vr.enum
|
|
5553
5603
|
},
|
|
5554
5604
|
message: "must be equal to one of the allowed values"
|
|
5555
5605
|
}
|
|
@@ -5621,16 +5671,16 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
5621
5671
|
const W = e;
|
|
5622
5672
|
if (e === W)
|
|
5623
5673
|
if (g && typeof g == "object" && !Array.isArray(g)) {
|
|
5624
|
-
let
|
|
5625
|
-
if (g.BYTES_PER_ELEMENT === void 0 && (
|
|
5674
|
+
let h;
|
|
5675
|
+
if (g.BYTES_PER_ELEMENT === void 0 && (h = "BYTES_PER_ELEMENT") || g.buffer === void 0 && (h = "buffer") || g.byteLength === void 0 && (h = "byteLength") || g.byteOffset === void 0 && (h = "byteOffset") || g.length === void 0 && (h = "length")) {
|
|
5626
5676
|
const N = {
|
|
5627
5677
|
instancePath: t + "/body",
|
|
5628
5678
|
schemaPath: "#/properties/body/anyOf/1/required",
|
|
5629
5679
|
keyword: "required",
|
|
5630
5680
|
params: {
|
|
5631
|
-
missingProperty:
|
|
5681
|
+
missingProperty: h
|
|
5632
5682
|
},
|
|
5633
|
-
message: "must have required property '" +
|
|
5683
|
+
message: "must have required property '" + h + "'"
|
|
5634
5684
|
};
|
|
5635
5685
|
s === null ? s = [N] : s.push(N), e++;
|
|
5636
5686
|
} else {
|
|
@@ -5689,10 +5739,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
5689
5739
|
O
|
|
5690
5740
|
), e++;
|
|
5691
5741
|
}
|
|
5692
|
-
var
|
|
5742
|
+
var m = b === e;
|
|
5693
5743
|
} else
|
|
5694
|
-
var
|
|
5695
|
-
if (
|
|
5744
|
+
var m = !0;
|
|
5745
|
+
if (m) {
|
|
5696
5746
|
if (g.buffer !== void 0) {
|
|
5697
5747
|
let v = g.buffer;
|
|
5698
5748
|
const b = e;
|
|
@@ -5774,10 +5824,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
5774
5824
|
T
|
|
5775
5825
|
), e++;
|
|
5776
5826
|
}
|
|
5777
|
-
var
|
|
5827
|
+
var m = b === e;
|
|
5778
5828
|
} else
|
|
5779
|
-
var
|
|
5780
|
-
if (
|
|
5829
|
+
var m = !0;
|
|
5830
|
+
if (m) {
|
|
5781
5831
|
if (g.byteLength !== void 0) {
|
|
5782
5832
|
let v = g.byteLength;
|
|
5783
5833
|
const b = e;
|
|
@@ -5799,10 +5849,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
5799
5849
|
T
|
|
5800
5850
|
), e++;
|
|
5801
5851
|
}
|
|
5802
|
-
var
|
|
5852
|
+
var m = b === e;
|
|
5803
5853
|
} else
|
|
5804
|
-
var
|
|
5805
|
-
if (
|
|
5854
|
+
var m = !0;
|
|
5855
|
+
if (m) {
|
|
5806
5856
|
if (g.byteOffset !== void 0) {
|
|
5807
5857
|
let v = g.byteOffset;
|
|
5808
5858
|
const b = e;
|
|
@@ -5824,10 +5874,10 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
5824
5874
|
T
|
|
5825
5875
|
), e++;
|
|
5826
5876
|
}
|
|
5827
|
-
var
|
|
5877
|
+
var m = b === e;
|
|
5828
5878
|
} else
|
|
5829
|
-
var
|
|
5830
|
-
if (
|
|
5879
|
+
var m = !0;
|
|
5880
|
+
if (m)
|
|
5831
5881
|
if (g.length !== void 0) {
|
|
5832
5882
|
let v = g.length;
|
|
5833
5883
|
const b = e;
|
|
@@ -5849,16 +5899,16 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
5849
5899
|
T
|
|
5850
5900
|
), e++;
|
|
5851
5901
|
}
|
|
5852
|
-
var
|
|
5902
|
+
var m = b === e;
|
|
5853
5903
|
} else
|
|
5854
|
-
var
|
|
5904
|
+
var m = !0;
|
|
5855
5905
|
}
|
|
5856
5906
|
}
|
|
5857
5907
|
}
|
|
5858
5908
|
}
|
|
5859
5909
|
}
|
|
5860
5910
|
} else {
|
|
5861
|
-
const
|
|
5911
|
+
const h = {
|
|
5862
5912
|
instancePath: t + "/body",
|
|
5863
5913
|
schemaPath: "#/properties/body/anyOf/1/type",
|
|
5864
5914
|
keyword: "type",
|
|
@@ -5867,7 +5917,7 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: l, roo
|
|
|
5867
5917
|
},
|
|
5868
5918
|
message: "must be object"
|
|
5869
5919
|
};
|
|
5870
|
-
s === null ? s = [
|
|
5920
|
+
s === null ? s = [h] : s.push(h), e++;
|
|
5871
5921
|
}
|
|
5872
5922
|
var y = W === e;
|
|
5873
5923
|
Z = Z || y;
|
|
@@ -6019,15 +6069,15 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
6019
6069
|
let s = null, e = 0;
|
|
6020
6070
|
if (e === 0)
|
|
6021
6071
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
6022
|
-
let
|
|
6023
|
-
if (r.step === void 0 && (
|
|
6072
|
+
let fr;
|
|
6073
|
+
if (r.step === void 0 && (fr = "step"))
|
|
6024
6074
|
return o.errors = [
|
|
6025
6075
|
{
|
|
6026
6076
|
instancePath: t,
|
|
6027
6077
|
schemaPath: "#/required",
|
|
6028
6078
|
keyword: "required",
|
|
6029
|
-
params: { missingProperty:
|
|
6030
|
-
message: "must have required property '" +
|
|
6079
|
+
params: { missingProperty: fr },
|
|
6080
|
+
message: "must have required property '" + fr + "'"
|
|
6031
6081
|
}
|
|
6032
6082
|
], !1;
|
|
6033
6083
|
{
|
|
@@ -6457,10 +6507,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
6457
6507
|
message: "must be number"
|
|
6458
6508
|
}
|
|
6459
6509
|
], !1;
|
|
6460
|
-
var
|
|
6510
|
+
var m = A === e;
|
|
6461
6511
|
} else
|
|
6462
|
-
var
|
|
6463
|
-
if (
|
|
6512
|
+
var m = !0;
|
|
6513
|
+
if (m)
|
|
6464
6514
|
if (i.caption !== void 0) {
|
|
6465
6515
|
const a = e;
|
|
6466
6516
|
if (typeof i.caption != "string")
|
|
@@ -6475,9 +6525,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
6475
6525
|
message: "must be string"
|
|
6476
6526
|
}
|
|
6477
6527
|
], !1;
|
|
6478
|
-
var
|
|
6528
|
+
var m = a === e;
|
|
6479
6529
|
} else
|
|
6480
|
-
var
|
|
6530
|
+
var m = !0;
|
|
6481
6531
|
}
|
|
6482
6532
|
} else
|
|
6483
6533
|
return o.errors = [
|
|
@@ -6756,7 +6806,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
6756
6806
|
schemaPath: "#/oneOf/3/properties/method/enum",
|
|
6757
6807
|
keyword: "enum",
|
|
6758
6808
|
params: {
|
|
6759
|
-
allowedValues:
|
|
6809
|
+
allowedValues: sr.oneOf[3].properties.method.enum
|
|
6760
6810
|
},
|
|
6761
6811
|
message: "must be equal to one of the allowed values"
|
|
6762
6812
|
}
|
|
@@ -7307,7 +7357,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
7307
7357
|
schemaPath: "#/oneOf/6/properties/importer/enum",
|
|
7308
7358
|
keyword: "enum",
|
|
7309
7359
|
params: {
|
|
7310
|
-
allowedValues:
|
|
7360
|
+
allowedValues: sr.oneOf[6].properties.importer.enum
|
|
7311
7361
|
},
|
|
7312
7362
|
message: "must be equal to one of the allowed values"
|
|
7313
7363
|
}
|
|
@@ -7566,10 +7616,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
7566
7616
|
message: "must be number"
|
|
7567
7617
|
}
|
|
7568
7618
|
], !1;
|
|
7569
|
-
var
|
|
7619
|
+
var h = A === e;
|
|
7570
7620
|
} else
|
|
7571
|
-
var
|
|
7572
|
-
if (
|
|
7621
|
+
var h = !0;
|
|
7622
|
+
if (h)
|
|
7573
7623
|
if (i.caption !== void 0) {
|
|
7574
7624
|
const a = e;
|
|
7575
7625
|
if (typeof i.caption != "string")
|
|
@@ -7584,9 +7634,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
7584
7634
|
message: "must be string"
|
|
7585
7635
|
}
|
|
7586
7636
|
], !1;
|
|
7587
|
-
var
|
|
7637
|
+
var h = a === e;
|
|
7588
7638
|
} else
|
|
7589
|
-
var
|
|
7639
|
+
var h = !0;
|
|
7590
7640
|
}
|
|
7591
7641
|
} else
|
|
7592
7642
|
return o.errors = [
|
|
@@ -7812,7 +7862,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
7812
7862
|
schemaPath: "#/oneOf/9/properties/ifAlreadyInstalled/enum",
|
|
7813
7863
|
keyword: "enum",
|
|
7814
7864
|
params: {
|
|
7815
|
-
allowedValues:
|
|
7865
|
+
allowedValues: sr.oneOf[9].properties.ifAlreadyInstalled.enum
|
|
7816
7866
|
},
|
|
7817
7867
|
message: "must be equal to one of the allowed values"
|
|
7818
7868
|
}
|
|
@@ -8140,7 +8190,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
8140
8190
|
schemaPath: "#/oneOf/10/properties/ifAlreadyInstalled/enum",
|
|
8141
8191
|
keyword: "enum",
|
|
8142
8192
|
params: {
|
|
8143
|
-
allowedValues:
|
|
8193
|
+
allowedValues: sr.oneOf[10].properties.ifAlreadyInstalled.enum
|
|
8144
8194
|
},
|
|
8145
8195
|
message: "must be equal to one of the allowed values"
|
|
8146
8196
|
}
|
|
@@ -9621,10 +9671,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
9621
9671
|
message: "must be number"
|
|
9622
9672
|
}
|
|
9623
9673
|
], !1;
|
|
9624
|
-
var
|
|
9674
|
+
var Be = A === e;
|
|
9625
9675
|
} else
|
|
9626
|
-
var
|
|
9627
|
-
if (
|
|
9676
|
+
var Be = !0;
|
|
9677
|
+
if (Be)
|
|
9628
9678
|
if (i.caption !== void 0) {
|
|
9629
9679
|
const a = e;
|
|
9630
9680
|
if (typeof i.caption != "string")
|
|
@@ -9639,9 +9689,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
9639
9689
|
message: "must be string"
|
|
9640
9690
|
}
|
|
9641
9691
|
], !1;
|
|
9642
|
-
var
|
|
9692
|
+
var Be = a === e;
|
|
9643
9693
|
} else
|
|
9644
|
-
var
|
|
9694
|
+
var Be = !0;
|
|
9645
9695
|
}
|
|
9646
9696
|
} else
|
|
9647
9697
|
return o.errors = [
|
|
@@ -9707,8 +9757,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
9707
9757
|
};
|
|
9708
9758
|
s === null ? s = [J] : s.push(J), e++;
|
|
9709
9759
|
}
|
|
9710
|
-
var
|
|
9711
|
-
if (a = a ||
|
|
9760
|
+
var pr = A === e;
|
|
9761
|
+
if (a = a || pr, !a) {
|
|
9712
9762
|
const J = e;
|
|
9713
9763
|
if (e === J)
|
|
9714
9764
|
if (i && typeof i == "object" && !Array.isArray(
|
|
@@ -9769,10 +9819,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
9769
9819
|
Ee
|
|
9770
9820
|
), e++;
|
|
9771
9821
|
}
|
|
9772
|
-
var
|
|
9822
|
+
var Me = ne === e;
|
|
9773
9823
|
} else
|
|
9774
|
-
var
|
|
9775
|
-
if (
|
|
9824
|
+
var Me = !0;
|
|
9825
|
+
if (Me)
|
|
9776
9826
|
if (i.content !== void 0) {
|
|
9777
9827
|
const ne = e;
|
|
9778
9828
|
if (typeof i.content != "string") {
|
|
@@ -9791,9 +9841,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
9791
9841
|
Q
|
|
9792
9842
|
), e++;
|
|
9793
9843
|
}
|
|
9794
|
-
var
|
|
9844
|
+
var Me = ne === e;
|
|
9795
9845
|
} else
|
|
9796
|
-
var
|
|
9846
|
+
var Me = !0;
|
|
9797
9847
|
}
|
|
9798
9848
|
}
|
|
9799
9849
|
} else {
|
|
@@ -9812,8 +9862,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
9812
9862
|
le
|
|
9813
9863
|
), e++;
|
|
9814
9864
|
}
|
|
9815
|
-
var
|
|
9816
|
-
a = a ||
|
|
9865
|
+
var pr = J === e;
|
|
9866
|
+
a = a || pr;
|
|
9817
9867
|
}
|
|
9818
9868
|
if (a)
|
|
9819
9869
|
e = j, s !== null && (j ? s.length = j : s = null);
|
|
@@ -9912,10 +9962,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
9912
9962
|
message: "must be number"
|
|
9913
9963
|
}
|
|
9914
9964
|
], !1;
|
|
9915
|
-
var
|
|
9965
|
+
var ze = A === e;
|
|
9916
9966
|
} else
|
|
9917
|
-
var
|
|
9918
|
-
if (
|
|
9967
|
+
var ze = !0;
|
|
9968
|
+
if (ze)
|
|
9919
9969
|
if (i.caption !== void 0) {
|
|
9920
9970
|
const a = e;
|
|
9921
9971
|
if (typeof i.caption != "string")
|
|
@@ -9930,9 +9980,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
9930
9980
|
message: "must be string"
|
|
9931
9981
|
}
|
|
9932
9982
|
], !1;
|
|
9933
|
-
var
|
|
9983
|
+
var ze = a === e;
|
|
9934
9984
|
} else
|
|
9935
|
-
var
|
|
9985
|
+
var ze = !0;
|
|
9936
9986
|
}
|
|
9937
9987
|
} else
|
|
9938
9988
|
return o.errors = [
|
|
@@ -10079,10 +10129,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10079
10129
|
message: "must be number"
|
|
10080
10130
|
}
|
|
10081
10131
|
], !1;
|
|
10082
|
-
var
|
|
10132
|
+
var Ve = A === e;
|
|
10083
10133
|
} else
|
|
10084
|
-
var
|
|
10085
|
-
if (
|
|
10134
|
+
var Ve = !0;
|
|
10135
|
+
if (Ve)
|
|
10086
10136
|
if (i.caption !== void 0) {
|
|
10087
10137
|
const a = e;
|
|
10088
10138
|
if (typeof i.caption != "string")
|
|
@@ -10097,9 +10147,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10097
10147
|
message: "must be string"
|
|
10098
10148
|
}
|
|
10099
10149
|
], !1;
|
|
10100
|
-
var
|
|
10150
|
+
var Ve = a === e;
|
|
10101
10151
|
} else
|
|
10102
|
-
var
|
|
10152
|
+
var Ve = !0;
|
|
10103
10153
|
}
|
|
10104
10154
|
} else
|
|
10105
10155
|
return o.errors = [
|
|
@@ -10184,10 +10234,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10184
10234
|
message: "must be string"
|
|
10185
10235
|
}
|
|
10186
10236
|
], !1;
|
|
10187
|
-
var
|
|
10237
|
+
var He = se === e;
|
|
10188
10238
|
} else
|
|
10189
|
-
var
|
|
10190
|
-
if (
|
|
10239
|
+
var He = !0;
|
|
10240
|
+
if (He)
|
|
10191
10241
|
if (i.adminPassword !== void 0) {
|
|
10192
10242
|
const se = e;
|
|
10193
10243
|
if (typeof i.adminPassword != "string")
|
|
@@ -10202,9 +10252,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10202
10252
|
message: "must be string"
|
|
10203
10253
|
}
|
|
10204
10254
|
], !1;
|
|
10205
|
-
var
|
|
10255
|
+
var He = se === e;
|
|
10206
10256
|
} else
|
|
10207
|
-
var
|
|
10257
|
+
var He = !0;
|
|
10208
10258
|
}
|
|
10209
10259
|
} else
|
|
10210
10260
|
return o.errors = [
|
|
@@ -10303,10 +10353,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10303
10353
|
message: "must be number"
|
|
10304
10354
|
}
|
|
10305
10355
|
], !1;
|
|
10306
|
-
var
|
|
10356
|
+
var Ze = A === e;
|
|
10307
10357
|
} else
|
|
10308
|
-
var
|
|
10309
|
-
if (
|
|
10358
|
+
var Ze = !0;
|
|
10359
|
+
if (Ze)
|
|
10310
10360
|
if (i.caption !== void 0) {
|
|
10311
10361
|
const a = e;
|
|
10312
10362
|
if (typeof i.caption != "string")
|
|
@@ -10321,9 +10371,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10321
10371
|
message: "must be string"
|
|
10322
10372
|
}
|
|
10323
10373
|
], !1;
|
|
10324
|
-
var
|
|
10374
|
+
var Ze = a === e;
|
|
10325
10375
|
} else
|
|
10326
|
-
var
|
|
10376
|
+
var Ze = !0;
|
|
10327
10377
|
}
|
|
10328
10378
|
} else
|
|
10329
10379
|
return o.errors = [
|
|
@@ -10467,10 +10517,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10467
10517
|
message: "must be number"
|
|
10468
10518
|
}
|
|
10469
10519
|
], !1;
|
|
10470
|
-
var
|
|
10520
|
+
var Qe = A === e;
|
|
10471
10521
|
} else
|
|
10472
|
-
var
|
|
10473
|
-
if (
|
|
10522
|
+
var Qe = !0;
|
|
10523
|
+
if (Qe)
|
|
10474
10524
|
if (i.caption !== void 0) {
|
|
10475
10525
|
const a = e;
|
|
10476
10526
|
if (typeof i.caption != "string")
|
|
@@ -10485,9 +10535,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10485
10535
|
message: "must be string"
|
|
10486
10536
|
}
|
|
10487
10537
|
], !1;
|
|
10488
|
-
var
|
|
10538
|
+
var Qe = a === e;
|
|
10489
10539
|
} else
|
|
10490
|
-
var
|
|
10540
|
+
var Qe = !0;
|
|
10491
10541
|
}
|
|
10492
10542
|
} else
|
|
10493
10543
|
return o.errors = [
|
|
@@ -10638,10 +10688,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10638
10688
|
message: "must be number"
|
|
10639
10689
|
}
|
|
10640
10690
|
], !1;
|
|
10641
|
-
var
|
|
10691
|
+
var Ye = A === e;
|
|
10642
10692
|
} else
|
|
10643
|
-
var
|
|
10644
|
-
if (
|
|
10693
|
+
var Ye = !0;
|
|
10694
|
+
if (Ye)
|
|
10645
10695
|
if (i.caption !== void 0) {
|
|
10646
10696
|
const a = e;
|
|
10647
10697
|
if (typeof i.caption != "string")
|
|
@@ -10656,9 +10706,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10656
10706
|
message: "must be string"
|
|
10657
10707
|
}
|
|
10658
10708
|
], !1;
|
|
10659
|
-
var
|
|
10709
|
+
var Ye = a === e;
|
|
10660
10710
|
} else
|
|
10661
|
-
var
|
|
10711
|
+
var Ye = !0;
|
|
10662
10712
|
}
|
|
10663
10713
|
} else
|
|
10664
10714
|
return o.errors = [
|
|
@@ -10843,10 +10893,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10843
10893
|
message: "must be number"
|
|
10844
10894
|
}
|
|
10845
10895
|
], !1;
|
|
10846
|
-
var
|
|
10896
|
+
var Ge = A === e;
|
|
10847
10897
|
} else
|
|
10848
|
-
var
|
|
10849
|
-
if (
|
|
10898
|
+
var Ge = !0;
|
|
10899
|
+
if (Ge)
|
|
10850
10900
|
if (i.caption !== void 0) {
|
|
10851
10901
|
const a = e;
|
|
10852
10902
|
if (typeof i.caption != "string")
|
|
@@ -10861,9 +10911,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
10861
10911
|
message: "must be string"
|
|
10862
10912
|
}
|
|
10863
10913
|
], !1;
|
|
10864
|
-
var
|
|
10914
|
+
var Ge = a === e;
|
|
10865
10915
|
} else
|
|
10866
|
-
var
|
|
10916
|
+
var Ge = !0;
|
|
10867
10917
|
}
|
|
10868
10918
|
} else
|
|
10869
10919
|
return o.errors = [
|
|
@@ -11036,10 +11086,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11036
11086
|
message: "must be number"
|
|
11037
11087
|
}
|
|
11038
11088
|
], !1;
|
|
11039
|
-
var
|
|
11089
|
+
var Je = A === e;
|
|
11040
11090
|
} else
|
|
11041
|
-
var
|
|
11042
|
-
if (
|
|
11091
|
+
var Je = !0;
|
|
11092
|
+
if (Je)
|
|
11043
11093
|
if (i.caption !== void 0) {
|
|
11044
11094
|
const a = e;
|
|
11045
11095
|
if (typeof i.caption != "string")
|
|
@@ -11054,9 +11104,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11054
11104
|
message: "must be string"
|
|
11055
11105
|
}
|
|
11056
11106
|
], !1;
|
|
11057
|
-
var
|
|
11107
|
+
var Je = a === e;
|
|
11058
11108
|
} else
|
|
11059
|
-
var
|
|
11109
|
+
var Je = !0;
|
|
11060
11110
|
}
|
|
11061
11111
|
} else
|
|
11062
11112
|
return o.errors = [
|
|
@@ -11186,7 +11236,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11186
11236
|
for (const Q in i)
|
|
11187
11237
|
if (!(Q === "BYTES_PER_ELEMENT" || Q === "buffer" || Q === "byteLength" || Q === "byteOffset" || Q === "length")) {
|
|
11188
11238
|
let he = i[Q];
|
|
11189
|
-
const
|
|
11239
|
+
const rr = e;
|
|
11190
11240
|
if (!(typeof he == "number" && isFinite(
|
|
11191
11241
|
he
|
|
11192
11242
|
))) {
|
|
@@ -11211,8 +11261,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11211
11261
|
fe
|
|
11212
11262
|
), e++;
|
|
11213
11263
|
}
|
|
11214
|
-
var
|
|
11215
|
-
if (!
|
|
11264
|
+
var Zr = rr === e;
|
|
11265
|
+
if (!Zr)
|
|
11216
11266
|
break;
|
|
11217
11267
|
}
|
|
11218
11268
|
if (Ee === e) {
|
|
@@ -11222,7 +11272,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11222
11272
|
if (!(typeof Q == "number" && isFinite(
|
|
11223
11273
|
Q
|
|
11224
11274
|
))) {
|
|
11225
|
-
const
|
|
11275
|
+
const rr = {
|
|
11226
11276
|
instancePath: t + "/data/BYTES_PER_ELEMENT",
|
|
11227
11277
|
schemaPath: "#/oneOf/25/properties/data/anyOf/2/properties/BYTES_PER_ELEMENT/type",
|
|
11228
11278
|
keyword: "type",
|
|
@@ -11232,9 +11282,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11232
11282
|
message: "must be number"
|
|
11233
11283
|
};
|
|
11234
11284
|
s === null ? s = [
|
|
11235
|
-
|
|
11285
|
+
rr
|
|
11236
11286
|
] : s.push(
|
|
11237
|
-
|
|
11287
|
+
rr
|
|
11238
11288
|
), e++;
|
|
11239
11289
|
}
|
|
11240
11290
|
var ye = he === e;
|
|
@@ -11250,7 +11300,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11250
11300
|
)) {
|
|
11251
11301
|
let fe;
|
|
11252
11302
|
if (Q.byteLength === void 0 && (fe = "byteLength")) {
|
|
11253
|
-
const
|
|
11303
|
+
const tr = {
|
|
11254
11304
|
instancePath: t + "/data/buffer",
|
|
11255
11305
|
schemaPath: "#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",
|
|
11256
11306
|
keyword: "required",
|
|
@@ -11260,12 +11310,12 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11260
11310
|
message: "must have required property '" + fe + "'"
|
|
11261
11311
|
};
|
|
11262
11312
|
s === null ? s = [
|
|
11263
|
-
|
|
11313
|
+
tr
|
|
11264
11314
|
] : s.push(
|
|
11265
|
-
|
|
11315
|
+
tr
|
|
11266
11316
|
), e++;
|
|
11267
11317
|
} else {
|
|
11268
|
-
const
|
|
11318
|
+
const tr = e;
|
|
11269
11319
|
for (const De in Q)
|
|
11270
11320
|
if (De !== "byteLength") {
|
|
11271
11321
|
const Ue = {
|
|
@@ -11284,7 +11334,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11284
11334
|
), e++;
|
|
11285
11335
|
break;
|
|
11286
11336
|
}
|
|
11287
|
-
if (
|
|
11337
|
+
if (tr === e && Q.byteLength !== void 0) {
|
|
11288
11338
|
let De = Q.byteLength;
|
|
11289
11339
|
if (!(typeof De == "number" && isFinite(
|
|
11290
11340
|
De
|
|
@@ -11527,10 +11577,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11527
11577
|
message: "must be number"
|
|
11528
11578
|
}
|
|
11529
11579
|
], !1;
|
|
11530
|
-
var
|
|
11580
|
+
var Xe = A === e;
|
|
11531
11581
|
} else
|
|
11532
|
-
var
|
|
11533
|
-
if (
|
|
11582
|
+
var Xe = !0;
|
|
11583
|
+
if (Xe)
|
|
11534
11584
|
if (i.caption !== void 0) {
|
|
11535
11585
|
const a = e;
|
|
11536
11586
|
if (typeof i.caption != "string")
|
|
@@ -11545,9 +11595,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11545
11595
|
message: "must be string"
|
|
11546
11596
|
}
|
|
11547
11597
|
], !1;
|
|
11548
|
-
var
|
|
11598
|
+
var Xe = a === e;
|
|
11549
11599
|
} else
|
|
11550
|
-
var
|
|
11600
|
+
var Xe = !0;
|
|
11551
11601
|
}
|
|
11552
11602
|
} else
|
|
11553
11603
|
return o.errors = [
|
|
@@ -11713,10 +11763,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11713
11763
|
message: "must be number"
|
|
11714
11764
|
}
|
|
11715
11765
|
], !1;
|
|
11716
|
-
var
|
|
11766
|
+
var Ke = A === e;
|
|
11717
11767
|
} else
|
|
11718
|
-
var
|
|
11719
|
-
if (
|
|
11768
|
+
var Ke = !0;
|
|
11769
|
+
if (Ke)
|
|
11720
11770
|
if (i.caption !== void 0) {
|
|
11721
11771
|
const a = e;
|
|
11722
11772
|
if (typeof i.caption != "string")
|
|
@@ -11731,9 +11781,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11731
11781
|
message: "must be string"
|
|
11732
11782
|
}
|
|
11733
11783
|
], !1;
|
|
11734
|
-
var
|
|
11784
|
+
var Ke = a === e;
|
|
11735
11785
|
} else
|
|
11736
|
-
var
|
|
11786
|
+
var Ke = !0;
|
|
11737
11787
|
}
|
|
11738
11788
|
} else
|
|
11739
11789
|
return o.errors = [
|
|
@@ -11799,14 +11849,14 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11799
11849
|
};
|
|
11800
11850
|
s === null ? s = [J] : s.push(J), e++;
|
|
11801
11851
|
}
|
|
11802
|
-
var
|
|
11803
|
-
if (a = a ||
|
|
11852
|
+
var lr = A === e;
|
|
11853
|
+
if (a = a || lr, !a) {
|
|
11804
11854
|
const J = e;
|
|
11805
11855
|
if (e === J)
|
|
11806
11856
|
if (Array.isArray(
|
|
11807
11857
|
i
|
|
11808
11858
|
)) {
|
|
11809
|
-
var
|
|
11859
|
+
var kr = !0;
|
|
11810
11860
|
const le = i.length;
|
|
11811
11861
|
for (let je = 0; je < le; je++) {
|
|
11812
11862
|
const ne = e;
|
|
@@ -11826,8 +11876,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11826
11876
|
Q
|
|
11827
11877
|
), e++;
|
|
11828
11878
|
}
|
|
11829
|
-
var
|
|
11830
|
-
if (!
|
|
11879
|
+
var kr = ne === e;
|
|
11880
|
+
if (!kr)
|
|
11831
11881
|
break;
|
|
11832
11882
|
}
|
|
11833
11883
|
} else {
|
|
@@ -11846,8 +11896,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11846
11896
|
le
|
|
11847
11897
|
), e++;
|
|
11848
11898
|
}
|
|
11849
|
-
var
|
|
11850
|
-
a = a ||
|
|
11899
|
+
var lr = J === e;
|
|
11900
|
+
a = a || lr;
|
|
11851
11901
|
}
|
|
11852
11902
|
if (a)
|
|
11853
11903
|
e = j, s !== null && (j ? s.length = j : s = null);
|
|
@@ -11965,10 +12015,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11965
12015
|
message: "must be number"
|
|
11966
12016
|
}
|
|
11967
12017
|
], !1;
|
|
11968
|
-
var
|
|
12018
|
+
var er = A === e;
|
|
11969
12019
|
} else
|
|
11970
|
-
var
|
|
11971
|
-
if (
|
|
12020
|
+
var er = !0;
|
|
12021
|
+
if (er)
|
|
11972
12022
|
if (i.caption !== void 0) {
|
|
11973
12023
|
const a = e;
|
|
11974
12024
|
if (typeof i.caption != "string")
|
|
@@ -11983,9 +12033,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
11983
12033
|
message: "must be string"
|
|
11984
12034
|
}
|
|
11985
12035
|
], !1;
|
|
11986
|
-
var
|
|
12036
|
+
var er = a === e;
|
|
11987
12037
|
} else
|
|
11988
|
-
var
|
|
12038
|
+
var er = !0;
|
|
11989
12039
|
}
|
|
11990
12040
|
} else
|
|
11991
12041
|
return o.errors = [
|
|
@@ -12110,20 +12160,20 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12110
12160
|
if (e === 0)
|
|
12111
12161
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
12112
12162
|
const re = e;
|
|
12113
|
-
for (const
|
|
12114
|
-
if (!
|
|
12163
|
+
for (const h in r)
|
|
12164
|
+
if (!zr.call(gs.properties, h))
|
|
12115
12165
|
return V.errors = [
|
|
12116
12166
|
{
|
|
12117
12167
|
instancePath: t,
|
|
12118
12168
|
schemaPath: "#/additionalProperties",
|
|
12119
12169
|
keyword: "additionalProperties",
|
|
12120
|
-
params: { additionalProperty:
|
|
12170
|
+
params: { additionalProperty: h },
|
|
12121
12171
|
message: "must NOT have additional properties"
|
|
12122
12172
|
}
|
|
12123
12173
|
], !1;
|
|
12124
12174
|
if (re === e) {
|
|
12125
12175
|
if (r.landingPage !== void 0) {
|
|
12126
|
-
const
|
|
12176
|
+
const h = e;
|
|
12127
12177
|
if (typeof r.landingPage != "string")
|
|
12128
12178
|
return V.errors = [
|
|
12129
12179
|
{
|
|
@@ -12134,12 +12184,12 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12134
12184
|
message: "must be string"
|
|
12135
12185
|
}
|
|
12136
12186
|
], !1;
|
|
12137
|
-
var p =
|
|
12187
|
+
var p = h === e;
|
|
12138
12188
|
} else
|
|
12139
12189
|
var p = !0;
|
|
12140
12190
|
if (p) {
|
|
12141
12191
|
if (r.description !== void 0) {
|
|
12142
|
-
const
|
|
12192
|
+
const h = e;
|
|
12143
12193
|
if (typeof r.description != "string")
|
|
12144
12194
|
return V.errors = [
|
|
12145
12195
|
{
|
|
@@ -12150,17 +12200,17 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12150
12200
|
message: "must be string"
|
|
12151
12201
|
}
|
|
12152
12202
|
], !1;
|
|
12153
|
-
var p =
|
|
12203
|
+
var p = h === e;
|
|
12154
12204
|
} else
|
|
12155
12205
|
var p = !0;
|
|
12156
12206
|
if (p) {
|
|
12157
12207
|
if (r.meta !== void 0) {
|
|
12158
|
-
let
|
|
12208
|
+
let h = r.meta;
|
|
12159
12209
|
const N = e;
|
|
12160
12210
|
if (e === N)
|
|
12161
|
-
if (
|
|
12211
|
+
if (h && typeof h == "object" && !Array.isArray(h)) {
|
|
12162
12212
|
let b;
|
|
12163
|
-
if (
|
|
12213
|
+
if (h.title === void 0 && (b = "title") || h.author === void 0 && (b = "author"))
|
|
12164
12214
|
return V.errors = [
|
|
12165
12215
|
{
|
|
12166
12216
|
instancePath: t + "/meta",
|
|
@@ -12174,7 +12224,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12174
12224
|
], !1;
|
|
12175
12225
|
{
|
|
12176
12226
|
const O = e;
|
|
12177
|
-
for (const T in
|
|
12227
|
+
for (const T in h)
|
|
12178
12228
|
if (!(T === "title" || T === "description" || T === "author" || T === "categories"))
|
|
12179
12229
|
return V.errors = [
|
|
12180
12230
|
{
|
|
@@ -12188,9 +12238,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12188
12238
|
}
|
|
12189
12239
|
], !1;
|
|
12190
12240
|
if (O === e) {
|
|
12191
|
-
if (
|
|
12241
|
+
if (h.title !== void 0) {
|
|
12192
12242
|
const T = e;
|
|
12193
|
-
if (typeof
|
|
12243
|
+
if (typeof h.title != "string")
|
|
12194
12244
|
return V.errors = [
|
|
12195
12245
|
{
|
|
12196
12246
|
instancePath: t + "/meta/title",
|
|
@@ -12206,9 +12256,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12206
12256
|
} else
|
|
12207
12257
|
var d = !0;
|
|
12208
12258
|
if (d) {
|
|
12209
|
-
if (
|
|
12259
|
+
if (h.description !== void 0) {
|
|
12210
12260
|
const T = e;
|
|
12211
|
-
if (typeof
|
|
12261
|
+
if (typeof h.description != "string")
|
|
12212
12262
|
return V.errors = [
|
|
12213
12263
|
{
|
|
12214
12264
|
instancePath: t + "/meta/description",
|
|
@@ -12224,9 +12274,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12224
12274
|
} else
|
|
12225
12275
|
var d = !0;
|
|
12226
12276
|
if (d) {
|
|
12227
|
-
if (
|
|
12277
|
+
if (h.author !== void 0) {
|
|
12228
12278
|
const T = e;
|
|
12229
|
-
if (typeof
|
|
12279
|
+
if (typeof h.author != "string")
|
|
12230
12280
|
return V.errors = [
|
|
12231
12281
|
{
|
|
12232
12282
|
instancePath: t + "/meta/author",
|
|
@@ -12242,8 +12292,8 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12242
12292
|
} else
|
|
12243
12293
|
var d = !0;
|
|
12244
12294
|
if (d)
|
|
12245
|
-
if (
|
|
12246
|
-
let T =
|
|
12295
|
+
if (h.categories !== void 0) {
|
|
12296
|
+
let T = h.categories;
|
|
12247
12297
|
const P = e;
|
|
12248
12298
|
if (e === P)
|
|
12249
12299
|
if (Array.isArray(
|
|
@@ -12303,12 +12353,12 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12303
12353
|
var p = !0;
|
|
12304
12354
|
if (p) {
|
|
12305
12355
|
if (r.preferredVersions !== void 0) {
|
|
12306
|
-
let
|
|
12356
|
+
let h = r.preferredVersions;
|
|
12307
12357
|
const N = e;
|
|
12308
12358
|
if (e === N)
|
|
12309
|
-
if (
|
|
12359
|
+
if (h && typeof h == "object" && !Array.isArray(h)) {
|
|
12310
12360
|
let b;
|
|
12311
|
-
if (
|
|
12361
|
+
if (h.php === void 0 && (b = "php") || h.wp === void 0 && (b = "wp"))
|
|
12312
12362
|
return V.errors = [
|
|
12313
12363
|
{
|
|
12314
12364
|
instancePath: t + "/preferredVersions",
|
|
@@ -12322,7 +12372,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12322
12372
|
], !1;
|
|
12323
12373
|
{
|
|
12324
12374
|
const O = e;
|
|
12325
|
-
for (const T in
|
|
12375
|
+
for (const T in h)
|
|
12326
12376
|
if (!(T === "php" || T === "wp"))
|
|
12327
12377
|
return V.errors = [
|
|
12328
12378
|
{
|
|
@@ -12336,18 +12386,18 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12336
12386
|
}
|
|
12337
12387
|
], !1;
|
|
12338
12388
|
if (O === e) {
|
|
12339
|
-
if (
|
|
12340
|
-
let T =
|
|
12389
|
+
if (h.php !== void 0) {
|
|
12390
|
+
let T = h.php;
|
|
12341
12391
|
const P = e, w = e;
|
|
12342
12392
|
let R = !1;
|
|
12343
12393
|
const L = e;
|
|
12344
|
-
|
|
12394
|
+
We(T, {
|
|
12345
12395
|
instancePath: t + "/preferredVersions/php",
|
|
12346
|
-
parentData:
|
|
12396
|
+
parentData: h,
|
|
12347
12397
|
parentDataProperty: "php",
|
|
12348
12398
|
rootData: u
|
|
12349
|
-
}) || (s = s === null ?
|
|
12350
|
-
|
|
12399
|
+
}) || (s = s === null ? We.errors : s.concat(
|
|
12400
|
+
We.errors
|
|
12351
12401
|
), e = s.length);
|
|
12352
12402
|
var _ = L === e;
|
|
12353
12403
|
if (R = R || _, !R) {
|
|
@@ -12399,13 +12449,13 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12399
12449
|
};
|
|
12400
12450
|
return s === null ? s = [U] : s.push(U), e++, V.errors = s, !1;
|
|
12401
12451
|
}
|
|
12402
|
-
var
|
|
12452
|
+
var m = P === e;
|
|
12403
12453
|
} else
|
|
12404
|
-
var
|
|
12405
|
-
if (
|
|
12406
|
-
if (
|
|
12454
|
+
var m = !0;
|
|
12455
|
+
if (m)
|
|
12456
|
+
if (h.wp !== void 0) {
|
|
12407
12457
|
const T = e;
|
|
12408
|
-
if (typeof
|
|
12458
|
+
if (typeof h.wp != "string")
|
|
12409
12459
|
return V.errors = [
|
|
12410
12460
|
{
|
|
12411
12461
|
instancePath: t + "/preferredVersions/wp",
|
|
@@ -12417,9 +12467,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12417
12467
|
message: "must be string"
|
|
12418
12468
|
}
|
|
12419
12469
|
], !1;
|
|
12420
|
-
var
|
|
12470
|
+
var m = T === e;
|
|
12421
12471
|
} else
|
|
12422
|
-
var
|
|
12472
|
+
var m = !0;
|
|
12423
12473
|
}
|
|
12424
12474
|
}
|
|
12425
12475
|
} else
|
|
@@ -12437,12 +12487,12 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12437
12487
|
var p = !0;
|
|
12438
12488
|
if (p) {
|
|
12439
12489
|
if (r.features !== void 0) {
|
|
12440
|
-
let
|
|
12490
|
+
let h = r.features;
|
|
12441
12491
|
const N = e;
|
|
12442
12492
|
if (e === N)
|
|
12443
|
-
if (
|
|
12493
|
+
if (h && typeof h == "object" && !Array.isArray(h)) {
|
|
12444
12494
|
const b = e;
|
|
12445
|
-
for (const O in
|
|
12495
|
+
for (const O in h)
|
|
12446
12496
|
if (!(O === "intl" || O === "networking"))
|
|
12447
12497
|
return V.errors = [
|
|
12448
12498
|
{
|
|
@@ -12456,9 +12506,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12456
12506
|
}
|
|
12457
12507
|
], !1;
|
|
12458
12508
|
if (b === e) {
|
|
12459
|
-
if (
|
|
12509
|
+
if (h.intl !== void 0) {
|
|
12460
12510
|
const O = e;
|
|
12461
|
-
if (typeof
|
|
12511
|
+
if (typeof h.intl != "boolean")
|
|
12462
12512
|
return V.errors = [
|
|
12463
12513
|
{
|
|
12464
12514
|
instancePath: t + "/features/intl",
|
|
@@ -12474,9 +12524,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12474
12524
|
} else
|
|
12475
12525
|
var k = !0;
|
|
12476
12526
|
if (k)
|
|
12477
|
-
if (
|
|
12527
|
+
if (h.networking !== void 0) {
|
|
12478
12528
|
const O = e;
|
|
12479
|
-
if (typeof
|
|
12529
|
+
if (typeof h.networking != "boolean")
|
|
12480
12530
|
return V.errors = [
|
|
12481
12531
|
{
|
|
12482
12532
|
instancePath: t + "/features/networking",
|
|
@@ -12507,14 +12557,14 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12507
12557
|
var p = !0;
|
|
12508
12558
|
if (p) {
|
|
12509
12559
|
if (r.extraLibraries !== void 0) {
|
|
12510
|
-
let
|
|
12560
|
+
let h = r.extraLibraries;
|
|
12511
12561
|
const N = e;
|
|
12512
12562
|
if (e === N)
|
|
12513
|
-
if (Array.isArray(
|
|
12563
|
+
if (Array.isArray(h)) {
|
|
12514
12564
|
var E = !0;
|
|
12515
|
-
const b =
|
|
12565
|
+
const b = h.length;
|
|
12516
12566
|
for (let O = 0; O < b; O++) {
|
|
12517
|
-
let T =
|
|
12567
|
+
let T = h[O];
|
|
12518
12568
|
const P = e;
|
|
12519
12569
|
if (typeof T != "string")
|
|
12520
12570
|
return V.errors = [
|
|
@@ -12561,12 +12611,12 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12561
12611
|
var p = !0;
|
|
12562
12612
|
if (p) {
|
|
12563
12613
|
if (r.constants !== void 0) {
|
|
12564
|
-
let
|
|
12614
|
+
let h = r.constants;
|
|
12565
12615
|
const N = e;
|
|
12566
12616
|
if (e === e)
|
|
12567
|
-
if (
|
|
12568
|
-
for (const O in
|
|
12569
|
-
let T =
|
|
12617
|
+
if (h && typeof h == "object" && !Array.isArray(h))
|
|
12618
|
+
for (const O in h) {
|
|
12619
|
+
let T = h[O];
|
|
12570
12620
|
const P = e;
|
|
12571
12621
|
if (typeof T != "string" && typeof T != "boolean" && !(typeof T == "number" && isFinite(T)))
|
|
12572
12622
|
return V.errors = [
|
|
@@ -12581,7 +12631,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12581
12631
|
schemaPath: "#/definitions/PHPConstants/additionalProperties/type",
|
|
12582
12632
|
keyword: "type",
|
|
12583
12633
|
params: {
|
|
12584
|
-
type:
|
|
12634
|
+
type: bs.additionalProperties.type
|
|
12585
12635
|
},
|
|
12586
12636
|
message: "must be string,boolean,number"
|
|
12587
12637
|
}
|
|
@@ -12607,14 +12657,14 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12607
12657
|
var p = !0;
|
|
12608
12658
|
if (p) {
|
|
12609
12659
|
if (r.plugins !== void 0) {
|
|
12610
|
-
let
|
|
12660
|
+
let h = r.plugins;
|
|
12611
12661
|
const N = e;
|
|
12612
12662
|
if (e === N)
|
|
12613
|
-
if (Array.isArray(
|
|
12663
|
+
if (Array.isArray(h)) {
|
|
12614
12664
|
var g = !0;
|
|
12615
|
-
const b =
|
|
12665
|
+
const b = h.length;
|
|
12616
12666
|
for (let O = 0; O < b; O++) {
|
|
12617
|
-
let T =
|
|
12667
|
+
let T = h[O];
|
|
12618
12668
|
const P = e, w = e;
|
|
12619
12669
|
let R = !1;
|
|
12620
12670
|
const L = e;
|
|
@@ -12641,7 +12691,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12641
12691
|
T,
|
|
12642
12692
|
{
|
|
12643
12693
|
instancePath: t + "/plugins/" + O,
|
|
12644
|
-
parentData:
|
|
12694
|
+
parentData: h,
|
|
12645
12695
|
parentDataProperty: O,
|
|
12646
12696
|
rootData: u
|
|
12647
12697
|
}
|
|
@@ -12688,17 +12738,17 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12688
12738
|
var p = !0;
|
|
12689
12739
|
if (p) {
|
|
12690
12740
|
if (r.siteOptions !== void 0) {
|
|
12691
|
-
let
|
|
12741
|
+
let h = r.siteOptions;
|
|
12692
12742
|
const N = e;
|
|
12693
12743
|
if (e === N)
|
|
12694
|
-
if (
|
|
12695
|
-
|
|
12744
|
+
if (h && typeof h == "object" && !Array.isArray(
|
|
12745
|
+
h
|
|
12696
12746
|
)) {
|
|
12697
12747
|
const b = e;
|
|
12698
|
-
for (const O in
|
|
12748
|
+
for (const O in h)
|
|
12699
12749
|
if (O !== "blogname") {
|
|
12700
12750
|
const T = e;
|
|
12701
|
-
if (typeof
|
|
12751
|
+
if (typeof h[O] != "string")
|
|
12702
12752
|
return V.errors = [
|
|
12703
12753
|
{
|
|
12704
12754
|
instancePath: t + "/siteOptions/" + O.replace(
|
|
@@ -12720,7 +12770,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12720
12770
|
if (!X)
|
|
12721
12771
|
break;
|
|
12722
12772
|
}
|
|
12723
|
-
if (b === e &&
|
|
12773
|
+
if (b === e && h.blogname !== void 0 && typeof h.blogname != "string")
|
|
12724
12774
|
return V.errors = [
|
|
12725
12775
|
{
|
|
12726
12776
|
instancePath: t + "/siteOptions/blogname",
|
|
@@ -12749,11 +12799,11 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12749
12799
|
var p = !0;
|
|
12750
12800
|
if (p) {
|
|
12751
12801
|
if (r.login !== void 0) {
|
|
12752
|
-
let
|
|
12802
|
+
let h = r.login;
|
|
12753
12803
|
const N = e, v = e;
|
|
12754
12804
|
let b = !1;
|
|
12755
12805
|
const O = e;
|
|
12756
|
-
if (typeof
|
|
12806
|
+
if (typeof h != "boolean") {
|
|
12757
12807
|
const P = {
|
|
12758
12808
|
instancePath: t + "/login",
|
|
12759
12809
|
schemaPath: "#/properties/login/anyOf/0/type",
|
|
@@ -12773,11 +12823,11 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12773
12823
|
if (b = b || Z, !b) {
|
|
12774
12824
|
const P = e;
|
|
12775
12825
|
if (e === P)
|
|
12776
|
-
if (
|
|
12777
|
-
|
|
12826
|
+
if (h && typeof h == "object" && !Array.isArray(
|
|
12827
|
+
h
|
|
12778
12828
|
)) {
|
|
12779
12829
|
let R;
|
|
12780
|
-
if (
|
|
12830
|
+
if (h.username === void 0 && (R = "username") || h.password === void 0 && (R = "password")) {
|
|
12781
12831
|
const L = {
|
|
12782
12832
|
instancePath: t + "/login",
|
|
12783
12833
|
schemaPath: "#/properties/login/anyOf/1/required",
|
|
@@ -12794,7 +12844,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12794
12844
|
), e++;
|
|
12795
12845
|
} else {
|
|
12796
12846
|
const L = e;
|
|
12797
|
-
for (const U in
|
|
12847
|
+
for (const U in h)
|
|
12798
12848
|
if (!(U === "username" || U === "password")) {
|
|
12799
12849
|
const F = {
|
|
12800
12850
|
instancePath: t + "/login",
|
|
@@ -12813,9 +12863,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12813
12863
|
break;
|
|
12814
12864
|
}
|
|
12815
12865
|
if (L === e) {
|
|
12816
|
-
if (
|
|
12866
|
+
if (h.username !== void 0) {
|
|
12817
12867
|
const U = e;
|
|
12818
|
-
if (typeof
|
|
12868
|
+
if (typeof h.username != "string") {
|
|
12819
12869
|
const F = {
|
|
12820
12870
|
instancePath: t + "/login/username",
|
|
12821
12871
|
schemaPath: "#/properties/login/anyOf/1/properties/username/type",
|
|
@@ -12835,9 +12885,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12835
12885
|
} else
|
|
12836
12886
|
var q = !0;
|
|
12837
12887
|
if (q)
|
|
12838
|
-
if (
|
|
12888
|
+
if (h.password !== void 0) {
|
|
12839
12889
|
const U = e;
|
|
12840
|
-
if (typeof
|
|
12890
|
+
if (typeof h.password != "string") {
|
|
12841
12891
|
const I = {
|
|
12842
12892
|
instancePath: t + "/login/password",
|
|
12843
12893
|
schemaPath: "#/properties/login/anyOf/1/properties/password/type",
|
|
@@ -12898,16 +12948,16 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12898
12948
|
var p = !0;
|
|
12899
12949
|
if (p) {
|
|
12900
12950
|
if (r.steps !== void 0) {
|
|
12901
|
-
let
|
|
12951
|
+
let h = r.steps;
|
|
12902
12952
|
const N = e;
|
|
12903
12953
|
if (e === N)
|
|
12904
12954
|
if (Array.isArray(
|
|
12905
|
-
|
|
12955
|
+
h
|
|
12906
12956
|
)) {
|
|
12907
12957
|
var K = !0;
|
|
12908
|
-
const b =
|
|
12958
|
+
const b = h.length;
|
|
12909
12959
|
for (let O = 0; O < b; O++) {
|
|
12910
|
-
let T =
|
|
12960
|
+
let T = h[O];
|
|
12911
12961
|
const P = e, w = e;
|
|
12912
12962
|
let R = !1;
|
|
12913
12963
|
const L = e;
|
|
@@ -12915,7 +12965,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
12915
12965
|
T,
|
|
12916
12966
|
{
|
|
12917
12967
|
instancePath: t + "/steps/" + O,
|
|
12918
|
-
parentData:
|
|
12968
|
+
parentData: h,
|
|
12919
12969
|
parentDataProperty: O,
|
|
12920
12970
|
rootData: u
|
|
12921
12971
|
}
|
|
@@ -13052,7 +13102,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
13052
13102
|
var p = !0;
|
|
13053
13103
|
if (p)
|
|
13054
13104
|
if (r.$schema !== void 0) {
|
|
13055
|
-
const
|
|
13105
|
+
const h = e;
|
|
13056
13106
|
if (typeof r.$schema != "string")
|
|
13057
13107
|
return V.errors = [
|
|
13058
13108
|
{
|
|
@@ -13065,7 +13115,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
13065
13115
|
message: "must be string"
|
|
13066
13116
|
}
|
|
13067
13117
|
], !1;
|
|
13068
|
-
var p =
|
|
13118
|
+
var p = h === e;
|
|
13069
13119
|
} else
|
|
13070
13120
|
var p = !0;
|
|
13071
13121
|
}
|
|
@@ -13091,53 +13141,53 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: l, root
|
|
|
13091
13141
|
], !1;
|
|
13092
13142
|
return V.errors = s, e === 0;
|
|
13093
13143
|
}
|
|
13094
|
-
function
|
|
13144
|
+
function ir(r, { instancePath: t = "", parentData: n, parentDataProperty: l, rootData: u = r } = {}) {
|
|
13095
13145
|
let s = null, e = 0;
|
|
13096
13146
|
return V(r, {
|
|
13097
13147
|
instancePath: t,
|
|
13098
13148
|
parentData: n,
|
|
13099
13149
|
parentDataProperty: l,
|
|
13100
13150
|
rootData: u
|
|
13101
|
-
}) || (s = s === null ? V.errors : s.concat(V.errors), e = s.length),
|
|
13151
|
+
}) || (s = s === null ? V.errors : s.concat(V.errors), e = s.length), ir.errors = s, e === 0;
|
|
13102
13152
|
}
|
|
13103
|
-
const { wpCLI:
|
|
13104
|
-
|
|
13105
|
-
"wp-cli":
|
|
13106
|
-
importFile:
|
|
13153
|
+
const { wpCLI: Os, ...jr } = hs, Ts = {
|
|
13154
|
+
...jr,
|
|
13155
|
+
"wp-cli": Os,
|
|
13156
|
+
importFile: jr.importWxr
|
|
13107
13157
|
};
|
|
13108
|
-
class
|
|
13158
|
+
class Es extends Error {
|
|
13109
13159
|
constructor(t, n) {
|
|
13110
13160
|
super(t), this.name = "InvalidBlueprintError", this.validationErrors = n;
|
|
13111
13161
|
}
|
|
13112
13162
|
}
|
|
13113
|
-
class
|
|
13163
|
+
class $s extends Error {
|
|
13114
13164
|
constructor(t) {
|
|
13115
13165
|
const { stepNumber: n, step: l, cause: u } = t, s = u instanceof Error ? u : new Error(String(u)), e = `Error when executing the blueprint step #${n}`, p = s.message ? `${e}: ${s.message}` : e;
|
|
13116
13166
|
super(p, { cause: s }), this.name = "BlueprintStepExecutionError", this.stepNumber = n, this.step = l, this.messages = (s.message || "").split(`
|
|
13117
13167
|
`).map((d) => d.trim()).filter(Boolean);
|
|
13118
13168
|
}
|
|
13119
13169
|
}
|
|
13120
|
-
async function
|
|
13170
|
+
async function js(r, t = {}) {
|
|
13121
13171
|
const n = {
|
|
13122
13172
|
...t
|
|
13123
13173
|
};
|
|
13124
13174
|
let l;
|
|
13125
|
-
return
|
|
13175
|
+
return Hr(r) ? (l = await qs(r), n.streamBundledFile = function(...u) {
|
|
13126
13176
|
return r.read(...u);
|
|
13127
|
-
}) : l = r,
|
|
13177
|
+
}) : l = r, As(l, n);
|
|
13128
13178
|
}
|
|
13129
|
-
function
|
|
13179
|
+
function Hr(r) {
|
|
13130
13180
|
return r && "read" in r && typeof r.read == "function";
|
|
13131
13181
|
}
|
|
13132
|
-
async function
|
|
13133
|
-
if (!
|
|
13182
|
+
async function qs(r) {
|
|
13183
|
+
if (!Hr(r))
|
|
13134
13184
|
return r;
|
|
13135
13185
|
const n = await (await r.read("blueprint.json")).text();
|
|
13136
13186
|
return JSON.parse(n);
|
|
13137
13187
|
}
|
|
13138
|
-
function
|
|
13139
|
-
progress: t = new
|
|
13140
|
-
semaphore: n = new
|
|
13188
|
+
function As(r, {
|
|
13189
|
+
progress: t = new Gr(),
|
|
13190
|
+
semaphore: n = new Ar({ concurrency: 3 }),
|
|
13141
13191
|
onStepCompleted: l = () => {
|
|
13142
13192
|
},
|
|
13143
13193
|
onBlueprintValidated: u = () => {
|
|
@@ -13147,10 +13197,10 @@ function js(r, {
|
|
|
13147
13197
|
gitAdditionalHeadersCallback: p,
|
|
13148
13198
|
additionalSteps: d
|
|
13149
13199
|
} = {}) {
|
|
13150
|
-
var g, B, X, Z, q, K, W, re,
|
|
13200
|
+
var g, B, X, Z, q, K, W, re, h, N;
|
|
13151
13201
|
r = structuredClone(r), r = {
|
|
13152
13202
|
...r,
|
|
13153
|
-
steps: (r.steps || []).filter(
|
|
13203
|
+
steps: (r.steps || []).filter(Fs).filter(Ns)
|
|
13154
13204
|
}, r.steps = [...r.steps || [], ...d || []];
|
|
13155
13205
|
for (const v of r.steps)
|
|
13156
13206
|
!v || typeof v != "object" || (v.step === "importFile" ? (v.step = "importWxr", ae.warn(
|
|
@@ -13167,7 +13217,7 @@ function js(r, {
|
|
|
13167
13217
|
step: "setSiteOptions",
|
|
13168
13218
|
options: r.siteOptions
|
|
13169
13219
|
}), r.plugins) {
|
|
13170
|
-
const v = r.plugins.map((b) => typeof b == "string" ?
|
|
13220
|
+
const v = r.plugins.map((b) => typeof b == "string" ? Ds(b) ? {
|
|
13171
13221
|
resource: "zip",
|
|
13172
13222
|
inner: {
|
|
13173
13223
|
resource: "git:directory",
|
|
@@ -13196,8 +13246,8 @@ function js(r, {
|
|
|
13196
13246
|
if ((B = r == null ? void 0 : r.extraLibraries) != null && B.includes("wp-cli") || y !== -1) {
|
|
13197
13247
|
const v = {
|
|
13198
13248
|
step: "writeFile",
|
|
13199
|
-
data:
|
|
13200
|
-
path:
|
|
13249
|
+
data: Ht,
|
|
13250
|
+
path: vr
|
|
13201
13251
|
};
|
|
13202
13252
|
y === -1 ? (X = r.steps) == null || X.push(v) : (Z = r.steps) == null || Z.splice(
|
|
13203
13253
|
y,
|
|
@@ -13215,10 +13265,10 @@ function js(r, {
|
|
|
13215
13265
|
slug: "wordpress-importer"
|
|
13216
13266
|
}
|
|
13217
13267
|
}));
|
|
13218
|
-
const
|
|
13219
|
-
if (!
|
|
13220
|
-
const { errors: v } =
|
|
13221
|
-
throw new
|
|
13268
|
+
const m = Ss(r);
|
|
13269
|
+
if (!m.valid) {
|
|
13270
|
+
const { errors: v } = m, b = Rs(r, v);
|
|
13271
|
+
throw new Es(
|
|
13222
13272
|
`Invalid Blueprint: The Blueprint does not conform to the schema.
|
|
13223
13273
|
|
|
13224
13274
|
Found ${v.length} validation error(s):
|
|
@@ -13237,7 +13287,7 @@ Please review your Blueprint and fix these issues. Learn more about the Blueprin
|
|
|
13237
13287
|
},
|
|
13238
13288
|
0
|
|
13239
13289
|
), $ = k.map(
|
|
13240
|
-
(v) =>
|
|
13290
|
+
(v) => xs(v, {
|
|
13241
13291
|
semaphore: n,
|
|
13242
13292
|
rootProgressTracker: t,
|
|
13243
13293
|
totalProgressWeight: E,
|
|
@@ -13248,16 +13298,16 @@ Please review your Blueprint and fix these issues. Learn more about the Blueprin
|
|
|
13248
13298
|
);
|
|
13249
13299
|
return {
|
|
13250
13300
|
versions: {
|
|
13251
|
-
php:
|
|
13301
|
+
php: Ls(
|
|
13252
13302
|
(W = r.preferredVersions) == null ? void 0 : W.php,
|
|
13253
|
-
|
|
13254
|
-
|
|
13303
|
+
Kr,
|
|
13304
|
+
Xr
|
|
13255
13305
|
),
|
|
13256
13306
|
wp: ((re = r.preferredVersions) == null ? void 0 : re.wp) || "latest"
|
|
13257
13307
|
},
|
|
13258
13308
|
features: {
|
|
13259
13309
|
// Disable intl by default to reduce the transfer size
|
|
13260
|
-
intl: ((
|
|
13310
|
+
intl: ((h = r.features) == null ? void 0 : h.intl) ?? !1,
|
|
13261
13311
|
// Enable network access by default
|
|
13262
13312
|
networking: ((N = r.features) == null ? void 0 : N.networking) ?? !0
|
|
13263
13313
|
},
|
|
@@ -13274,7 +13324,7 @@ Please review your Blueprint and fix these issues. Learn more about the Blueprin
|
|
|
13274
13324
|
l(P, T);
|
|
13275
13325
|
} catch (P) {
|
|
13276
13326
|
const w = Number(b) + 1;
|
|
13277
|
-
throw new
|
|
13327
|
+
throw new $s({
|
|
13278
13328
|
stepNumber: w,
|
|
13279
13329
|
step: T,
|
|
13280
13330
|
cause: P
|
|
@@ -13293,7 +13343,7 @@ Please review your Blueprint and fix these issues. Learn more about the Blueprin
|
|
|
13293
13343
|
}
|
|
13294
13344
|
};
|
|
13295
13345
|
}
|
|
13296
|
-
function
|
|
13346
|
+
function Rs(r, t) {
|
|
13297
13347
|
return t.map((n, l) => {
|
|
13298
13348
|
var p;
|
|
13299
13349
|
const u = n.instancePath || "/";
|
|
@@ -13305,10 +13355,10 @@ function qs(r, t) {
|
|
|
13305
13355
|
try {
|
|
13306
13356
|
const y = u.split("/").filter(Boolean);
|
|
13307
13357
|
let _ = r;
|
|
13308
|
-
for (const
|
|
13309
|
-
_ && typeof _ == "object" && (_ = _[
|
|
13358
|
+
for (const m of y)
|
|
13359
|
+
_ && typeof _ == "object" && (_ = _[m]);
|
|
13310
13360
|
if (_ && typeof _ == "object") {
|
|
13311
|
-
const
|
|
13361
|
+
const m = _[d], k = JSON.stringify(m);
|
|
13312
13362
|
e = `
|
|
13313
13363
|
"${d}": ${k}
|
|
13314
13364
|
${"^".repeat(
|
|
@@ -13336,37 +13386,37 @@ function qs(r, t) {
|
|
|
13336
13386
|
|
|
13337
13387
|
`);
|
|
13338
13388
|
}
|
|
13339
|
-
function
|
|
13389
|
+
function Ss(r) {
|
|
13340
13390
|
var u;
|
|
13341
|
-
const t =
|
|
13391
|
+
const t = ir(r);
|
|
13342
13392
|
if (t)
|
|
13343
13393
|
return { valid: t };
|
|
13344
13394
|
const n = /* @__PURE__ */ new Set();
|
|
13345
|
-
for (const s of
|
|
13395
|
+
for (const s of ir.errors)
|
|
13346
13396
|
s.schemaPath.startsWith("#/properties/steps/items/anyOf") || n.add(s.instancePath);
|
|
13347
13397
|
return {
|
|
13348
13398
|
valid: !1,
|
|
13349
|
-
errors: ((u =
|
|
13399
|
+
errors: ((u = ir.errors) == null ? void 0 : u.filter(
|
|
13350
13400
|
(s) => !(s.schemaPath.startsWith(
|
|
13351
13401
|
"#/properties/steps/items/anyOf"
|
|
13352
13402
|
) && n.has(s.instancePath))
|
|
13353
13403
|
)) ?? []
|
|
13354
13404
|
};
|
|
13355
13405
|
}
|
|
13356
|
-
function
|
|
13406
|
+
function Ls(r, t, n) {
|
|
13357
13407
|
return (r === "7.2" || r === "7.3") && (ae.warn(
|
|
13358
13408
|
`PHP ${r} is no longer supported. Automatically upgrading to PHP 7.4.`
|
|
13359
13409
|
), r = "7.4"), r && t.includes(r) ? r : n;
|
|
13360
13410
|
}
|
|
13361
|
-
function
|
|
13411
|
+
function Fs(r) {
|
|
13362
13412
|
return !!(typeof r == "object" && r);
|
|
13363
13413
|
}
|
|
13364
|
-
function
|
|
13414
|
+
function Ns(r) {
|
|
13365
13415
|
return ["setPhpIniEntry", "request"].includes(r.step) ? (ae.warn(
|
|
13366
13416
|
`The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`
|
|
13367
13417
|
), !1) : !0;
|
|
13368
13418
|
}
|
|
13369
|
-
function
|
|
13419
|
+
function xs(r, {
|
|
13370
13420
|
semaphore: t,
|
|
13371
13421
|
rootProgressTracker: n,
|
|
13372
13422
|
totalProgressWeight: l,
|
|
@@ -13380,7 +13430,7 @@ function Fs(r, {
|
|
|
13380
13430
|
), d = {};
|
|
13381
13431
|
for (const $ of Object.keys(r)) {
|
|
13382
13432
|
let g = r[$];
|
|
13383
|
-
|
|
13433
|
+
Pt(g) && (g = we.create(g, {
|
|
13384
13434
|
semaphore: t,
|
|
13385
13435
|
corsProxy: u,
|
|
13386
13436
|
streamBundledFile: s,
|
|
@@ -13390,9 +13440,9 @@ function Fs(r, {
|
|
|
13390
13440
|
const y = async ($) => {
|
|
13391
13441
|
var g;
|
|
13392
13442
|
try {
|
|
13393
|
-
return p.fillSlowly(), await
|
|
13443
|
+
return p.fillSlowly(), await Ts[r.step](
|
|
13394
13444
|
$,
|
|
13395
|
-
await
|
|
13445
|
+
await Cs(d),
|
|
13396
13446
|
{
|
|
13397
13447
|
tracker: p,
|
|
13398
13448
|
initialCaption: (g = r.progress) == null ? void 0 : g.caption
|
|
@@ -13401,14 +13451,14 @@ function Fs(r, {
|
|
|
13401
13451
|
} finally {
|
|
13402
13452
|
p.finish();
|
|
13403
13453
|
}
|
|
13404
|
-
}, _ =
|
|
13454
|
+
}, _ = qr(d), m = qr(d).filter(
|
|
13405
13455
|
($) => $.isAsync
|
|
13406
|
-
), k = 1 / (
|
|
13407
|
-
for (const $ of
|
|
13456
|
+
), k = 1 / (m.length + 1);
|
|
13457
|
+
for (const $ of m)
|
|
13408
13458
|
$.progress = p.stage(k);
|
|
13409
13459
|
return { run: y, step: r, resources: _ };
|
|
13410
13460
|
}
|
|
13411
|
-
function
|
|
13461
|
+
function qr(r) {
|
|
13412
13462
|
const t = [];
|
|
13413
13463
|
for (const n in r) {
|
|
13414
13464
|
const l = r[n];
|
|
@@ -13416,7 +13466,7 @@ function jr(r) {
|
|
|
13416
13466
|
}
|
|
13417
13467
|
return t;
|
|
13418
13468
|
}
|
|
13419
|
-
async function
|
|
13469
|
+
async function Cs(r) {
|
|
13420
13470
|
const t = {};
|
|
13421
13471
|
for (const n in r) {
|
|
13422
13472
|
const l = r[n];
|
|
@@ -13424,13 +13474,13 @@ async function Ns(r) {
|
|
|
13424
13474
|
}
|
|
13425
13475
|
return t;
|
|
13426
13476
|
}
|
|
13427
|
-
async function
|
|
13477
|
+
async function ei(r, t) {
|
|
13428
13478
|
await r.run(t);
|
|
13429
13479
|
}
|
|
13430
|
-
function
|
|
13480
|
+
function Ds(r) {
|
|
13431
13481
|
return !!(/^https:\/\/.+\.git\/?$/.test(r) || /^https:\/\/github\.com\/[^/]+\/[^/]+\/?$/.test(r) || /^https:\/\/gitlab\.com\/[^/]+\/[^/]+(\/[^/]+)*\/?$/.test(r));
|
|
13432
13482
|
}
|
|
13433
|
-
async function
|
|
13483
|
+
async function Us() {
|
|
13434
13484
|
const r = (
|
|
13435
13485
|
// @ts-ignore
|
|
13436
13486
|
(await import("./blueprints-pMn3V9MZ.js")).default
|
|
@@ -13439,7 +13489,7 @@ async function Cs() {
|
|
|
13439
13489
|
type: "application/zip"
|
|
13440
13490
|
});
|
|
13441
13491
|
}
|
|
13442
|
-
function
|
|
13492
|
+
function Is(r) {
|
|
13443
13493
|
if (typeof r == "object" && "type" in r && ["inline-file", "file-reference"].includes(r.type))
|
|
13444
13494
|
return r;
|
|
13445
13495
|
if (!r)
|
|
@@ -13464,8 +13514,8 @@ function Ds(r) {
|
|
|
13464
13514
|
};
|
|
13465
13515
|
}
|
|
13466
13516
|
}
|
|
13467
|
-
async function
|
|
13468
|
-
var _,
|
|
13517
|
+
async function ri(r) {
|
|
13518
|
+
var _, m;
|
|
13469
13519
|
const t = r.cliArgs || [];
|
|
13470
13520
|
for (const k of t)
|
|
13471
13521
|
if (k.startsWith("--site-path="))
|
|
@@ -13474,12 +13524,12 @@ async function ei(r) {
|
|
|
13474
13524
|
);
|
|
13475
13525
|
t.push("--site-path=/wordpress"), t.find((k) => k.startsWith("--db-engine=")) || t.push("--db-engine=sqlite");
|
|
13476
13526
|
const l = r.php, u = (r == null ? void 0 : r.onMessage) || (() => {
|
|
13477
|
-
}), s = await
|
|
13527
|
+
}), s = await Us();
|
|
13478
13528
|
l.writeFile(
|
|
13479
13529
|
"/tmp/blueprints.phar",
|
|
13480
13530
|
new Uint8Array(await s.arrayBuffer())
|
|
13481
13531
|
);
|
|
13482
|
-
const e =
|
|
13532
|
+
const e = Is(
|
|
13483
13533
|
r.blueprint
|
|
13484
13534
|
);
|
|
13485
13535
|
let p = "";
|
|
@@ -13536,7 +13586,7 @@ function playground_on_blueprint_resolved($blueprint) {
|
|
|
13536
13586
|
}
|
|
13537
13587
|
|
|
13538
13588
|
$wp_version_override = json_decode(${be(
|
|
13539
|
-
JSON.stringify(((
|
|
13589
|
+
JSON.stringify(((m = r.blueprintOverrides) == null ? void 0 : m.wordpressVersion) || null)
|
|
13540
13590
|
)}, true);
|
|
13541
13591
|
if($wp_version_override) {
|
|
13542
13592
|
$blueprint['wordpressVersion'] = $wp_version_override;
|
|
@@ -13602,12 +13652,12 @@ require( "/tmp/blueprints.phar" );
|
|
|
13602
13652
|
]);
|
|
13603
13653
|
return y.finished.finally(d), y;
|
|
13604
13654
|
}
|
|
13605
|
-
class
|
|
13655
|
+
class Ws extends Error {
|
|
13606
13656
|
constructor(t, n, l) {
|
|
13607
13657
|
super(t, l), this.name = "BlueprintFetchError", this.url = n;
|
|
13608
13658
|
}
|
|
13609
13659
|
}
|
|
13610
|
-
async function
|
|
13660
|
+
async function ti(r) {
|
|
13611
13661
|
let t;
|
|
13612
13662
|
try {
|
|
13613
13663
|
const n = await fetch(r, {
|
|
@@ -13617,7 +13667,7 @@ async function ri(r) {
|
|
|
13617
13667
|
throw new Error(`Failed to fetch blueprint from ${r}`);
|
|
13618
13668
|
t = await n.arrayBuffer();
|
|
13619
13669
|
} catch (n) {
|
|
13620
|
-
throw new
|
|
13670
|
+
throw new Ws(
|
|
13621
13671
|
`Blueprint file could not be resolved from ${r}: ${n instanceof Error ? n.message : String(n)}`,
|
|
13622
13672
|
r,
|
|
13623
13673
|
{ cause: n }
|
|
@@ -13625,31 +13675,31 @@ async function ri(r) {
|
|
|
13625
13675
|
}
|
|
13626
13676
|
try {
|
|
13627
13677
|
const n = new TextDecoder().decode(t);
|
|
13628
|
-
return JSON.parse(n), new
|
|
13629
|
-
new
|
|
13678
|
+
return JSON.parse(n), new ot([
|
|
13679
|
+
new at({
|
|
13630
13680
|
"blueprint.json": n
|
|
13631
13681
|
}),
|
|
13632
|
-
new
|
|
13682
|
+
new nt({
|
|
13633
13683
|
baseUrl: r
|
|
13634
13684
|
})
|
|
13635
13685
|
]);
|
|
13636
13686
|
} catch (n) {
|
|
13637
|
-
if (await
|
|
13638
|
-
return
|
|
13687
|
+
if (await zs(t))
|
|
13688
|
+
return Ms(t);
|
|
13639
13689
|
throw new Error(
|
|
13640
13690
|
`Blueprint file at ${r} is neither a valid JSON nor a ZIP file.`,
|
|
13641
13691
|
{ cause: n }
|
|
13642
13692
|
);
|
|
13643
13693
|
}
|
|
13644
13694
|
}
|
|
13645
|
-
function
|
|
13646
|
-
const t = r.map((l) =>
|
|
13647
|
-
if (t.some((l) =>
|
|
13695
|
+
function Bs(r) {
|
|
13696
|
+
const t = r.map((l) => Jr(l));
|
|
13697
|
+
if (t.some((l) => Or(l) === "blueprint.json" && hr(l) === ""))
|
|
13648
13698
|
return "blueprint.json";
|
|
13649
13699
|
const n = /* @__PURE__ */ new Set();
|
|
13650
13700
|
for (const l of t) {
|
|
13651
13701
|
const u = l.split("/")[0];
|
|
13652
|
-
u && u !==
|
|
13702
|
+
u && u !== Or(l) && u !== "__MACOSX" && n.add(u);
|
|
13653
13703
|
}
|
|
13654
13704
|
if (n.size > 1)
|
|
13655
13705
|
throw new Error(
|
|
@@ -13664,19 +13714,19 @@ function Is(r) {
|
|
|
13664
13714
|
"ZIP does not contain a blueprint.json. Place blueprint.json at the ZIP root or inside a single top-level directory."
|
|
13665
13715
|
);
|
|
13666
13716
|
}
|
|
13667
|
-
async function
|
|
13668
|
-
const t =
|
|
13669
|
-
return u === "" ? t : new
|
|
13717
|
+
async function Ms(r) {
|
|
13718
|
+
const t = pt.fromArrayBuffer(r), n = await t.getAllFilePaths(), l = Bs(n), u = hr(l);
|
|
13719
|
+
return u === "" ? t : new lt(u, t);
|
|
13670
13720
|
}
|
|
13671
|
-
async function
|
|
13721
|
+
async function zs(r) {
|
|
13672
13722
|
if (r.byteLength < 4)
|
|
13673
13723
|
return !1;
|
|
13674
13724
|
const t = new Uint8Array(r, 0, 4);
|
|
13675
13725
|
return t[0] === 80 && t[1] === 75 && t[2] === 3 && t[3] === 4;
|
|
13676
13726
|
}
|
|
13677
|
-
async function
|
|
13678
|
-
if ((await
|
|
13679
|
-
const n = await
|
|
13727
|
+
async function si(r) {
|
|
13728
|
+
if ((await ar.create(r)).getVersion() === 1) {
|
|
13729
|
+
const n = await js(
|
|
13680
13730
|
r
|
|
13681
13731
|
);
|
|
13682
13732
|
return {
|
|
@@ -13698,7 +13748,7 @@ async function ti(r) {
|
|
|
13698
13748
|
};
|
|
13699
13749
|
} else
|
|
13700
13750
|
return {
|
|
13701
|
-
phpVersion:
|
|
13751
|
+
phpVersion: ht,
|
|
13702
13752
|
wpVersion: "latest",
|
|
13703
13753
|
intl: !1,
|
|
13704
13754
|
networking: !0,
|
|
@@ -13706,59 +13756,59 @@ async function ti(r) {
|
|
|
13706
13756
|
extraLibraries: []
|
|
13707
13757
|
};
|
|
13708
13758
|
}
|
|
13709
|
-
function
|
|
13759
|
+
function ii() {
|
|
13710
13760
|
}
|
|
13711
13761
|
export {
|
|
13712
|
-
|
|
13713
|
-
|
|
13714
|
-
|
|
13715
|
-
|
|
13716
|
-
|
|
13717
|
-
|
|
13718
|
-
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
|
|
13742
|
-
|
|
13743
|
-
|
|
13744
|
-
|
|
13745
|
-
|
|
13746
|
-
|
|
13747
|
-
|
|
13748
|
-
|
|
13749
|
-
|
|
13750
|
-
|
|
13751
|
-
|
|
13752
|
-
|
|
13753
|
-
|
|
13754
|
-
|
|
13755
|
-
|
|
13756
|
-
|
|
13757
|
-
|
|
13758
|
-
|
|
13759
|
-
|
|
13760
|
-
|
|
13761
|
-
|
|
13762
|
-
|
|
13762
|
+
Ws as BlueprintFetchError,
|
|
13763
|
+
wt as BlueprintFilesystemRequiredError,
|
|
13764
|
+
ar as BlueprintReflection,
|
|
13765
|
+
$s as BlueprintStepExecutionError,
|
|
13766
|
+
Es as InvalidBlueprintError,
|
|
13767
|
+
ur as ResourceDownloadError,
|
|
13768
|
+
Nr as activatePlugin,
|
|
13769
|
+
xr as activateTheme,
|
|
13770
|
+
js as compileBlueprint,
|
|
13771
|
+
js as compileBlueprintV1,
|
|
13772
|
+
Yt as cp,
|
|
13773
|
+
Ir as defineSiteUrl,
|
|
13774
|
+
wr as defineWpConfigConsts,
|
|
13775
|
+
Qt as enableMultisite,
|
|
13776
|
+
os as exportWXR,
|
|
13777
|
+
qs as getBlueprintDeclaration,
|
|
13778
|
+
Us as getV2Runner,
|
|
13779
|
+
Wr as importThemeStarterContent,
|
|
13780
|
+
ts as importWordPressFiles,
|
|
13781
|
+
es as importWxr,
|
|
13782
|
+
as as installPlugin,
|
|
13783
|
+
ns as installTheme,
|
|
13784
|
+
Hr as isBlueprintBundle,
|
|
13785
|
+
Fs as isStepDefinition,
|
|
13786
|
+
ps as login,
|
|
13787
|
+
Jt as mkdir,
|
|
13788
|
+
Gt as mv,
|
|
13789
|
+
Mt as request,
|
|
13790
|
+
ls as resetData,
|
|
13791
|
+
ti as resolveRemoteBlueprint,
|
|
13792
|
+
si as resolveRuntimeConfiguration,
|
|
13793
|
+
mr as rm,
|
|
13794
|
+
Xt as rmdir,
|
|
13795
|
+
ei as runBlueprintSteps,
|
|
13796
|
+
ei as runBlueprintV1Steps,
|
|
13797
|
+
ri as runBlueprintV2,
|
|
13798
|
+
Ut as runPHP,
|
|
13799
|
+
It as runPHPWithOptions,
|
|
13800
|
+
Bt as runSql,
|
|
13801
|
+
fs as runWpInstallationWizard,
|
|
13802
|
+
ii as setPluginProxyURL,
|
|
13803
|
+
ys as setSiteLanguage,
|
|
13804
|
+
Cr as setSiteOptions,
|
|
13805
|
+
_r as unzip,
|
|
13806
|
+
Vt as updateUserMeta,
|
|
13807
|
+
Ss as validateBlueprint,
|
|
13808
|
+
Ur as wpCLI,
|
|
13809
|
+
Br as wpContentFilesExcludedFromExport,
|
|
13810
|
+
Pr as writeFile,
|
|
13811
|
+
Kt as writeFiles,
|
|
13812
|
+
us as zipWpContent
|
|
13763
13813
|
};
|
|
13764
13814
|
//# sourceMappingURL=index.js.map
|