@wp-playground/blueprints 3.0.53 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +35 -33
- package/index.cjs.map +1 -1
- package/index.js +653 -645
- package/index.js.map +1 -1
- package/package.json +15 -18
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@php-wasm/node-polyfills";
|
|
2
2
|
import { cloneStreamMonitorProgress as Vr, cloneResponseMonitorProgress as Hr, ProgressTracker as Qr } from "@php-wasm/progress";
|
|
3
|
-
import { randomFilename as ir, phpVars as mr, joinPaths as ie, phpVar as
|
|
3
|
+
import { randomFilename as ir, phpVars as mr, joinPaths as ie, phpVar as be, dirname as Yr, Semaphore as $r } from "@php-wasm/util";
|
|
4
4
|
import { writeFiles as yr, LatestSupportedPHPVersion as Zr, SupportedPHPVersions as Gr } from "@php-wasm/universal";
|
|
5
5
|
import { resolveCommitHash as Jr, listGitFiles as Kr, listDescendantFiles as Xr, sparseCheckout as et, createDotGitDirectory as rt, GitAuthenticationError as _r, OverlayFilesystem as tt, InMemoryFilesystem as st, FetchFilesystem as it, ZipFilesystem as ot } from "@wp-playground/storage";
|
|
6
6
|
import { fetchWithCorsProxy as at } from "@php-wasm/web-service-worker";
|
|
@@ -107,33 +107,33 @@ function wt(r) {
|
|
|
107
107
|
const n = t.pathname.slice(1);
|
|
108
108
|
if (n.startsWith("https://github.com/") || n.startsWith("http://github.com/"))
|
|
109
109
|
return { resource: "url", url: n };
|
|
110
|
-
const f = t.searchParams,
|
|
111
|
-
if (!
|
|
110
|
+
const f = t.searchParams, d = f.get("repo");
|
|
111
|
+
if (!d)
|
|
112
112
|
return null;
|
|
113
113
|
const s = f.get("release"), e = f.get("asset");
|
|
114
114
|
if (s && e) {
|
|
115
115
|
const $ = s === "latest" ? "releases/latest/download" : `releases/download/${s}`;
|
|
116
116
|
return {
|
|
117
117
|
resource: "url",
|
|
118
|
-
url: `https://github.com/${
|
|
118
|
+
url: `https://github.com/${d}/${$}/${e}`
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
let p,
|
|
122
|
-
const
|
|
123
|
-
|
|
121
|
+
let p, u;
|
|
122
|
+
const y = f.get("pr"), _ = f.get("commit"), h = f.get("branch");
|
|
123
|
+
y ? p = `refs/pull/${y}/head` : _ ? (p = _, u = "commit") : s ? (p = s, u = "tag") : p = h || "HEAD";
|
|
124
124
|
const k = f.get("directory");
|
|
125
125
|
return {
|
|
126
126
|
resource: "zip",
|
|
127
127
|
inner: {
|
|
128
128
|
resource: "git:directory",
|
|
129
|
-
url: `https://github.com/${
|
|
129
|
+
url: `https://github.com/${d}`,
|
|
130
130
|
ref: p,
|
|
131
|
-
...
|
|
131
|
+
...u && { refType: u },
|
|
132
132
|
...k && { path: k }
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
class
|
|
136
|
+
class we {
|
|
137
137
|
get progress() {
|
|
138
138
|
return this._progress;
|
|
139
139
|
}
|
|
@@ -157,15 +157,15 @@ class be {
|
|
|
157
157
|
static create(t, {
|
|
158
158
|
semaphore: n,
|
|
159
159
|
progress: f,
|
|
160
|
-
corsProxy:
|
|
160
|
+
corsProxy: d,
|
|
161
161
|
streamBundledFile: s,
|
|
162
162
|
gitAdditionalHeadersCallback: e
|
|
163
163
|
}) {
|
|
164
164
|
if (t.resource === "url" && bt(t.url)) {
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
`[Blueprints] github-proxy.com is deprecated and will stop working soon. The URL "${t.url}" has been automatically converted to a ${
|
|
168
|
-
), t =
|
|
165
|
+
const u = wt(t.url);
|
|
166
|
+
u && (console.warn(
|
|
167
|
+
`[Blueprints] github-proxy.com is deprecated and will stop working soon. The URL "${t.url}" has been automatically converted to a ${u.resource} resource. Please update your Blueprint to use native resource types. See: https://wordpress.github.io/wordpress-playground/blueprints/steps/resources`
|
|
168
|
+
), t = u);
|
|
169
169
|
}
|
|
170
170
|
let p;
|
|
171
171
|
switch (t.resource) {
|
|
@@ -182,11 +182,11 @@ class be {
|
|
|
182
182
|
p = new qt(t, f);
|
|
183
183
|
break;
|
|
184
184
|
case "url":
|
|
185
|
-
p = new Ot(t, f, { corsProxy:
|
|
185
|
+
p = new Ot(t, f, { corsProxy: d });
|
|
186
186
|
break;
|
|
187
187
|
case "git:directory":
|
|
188
188
|
p = new Tt(t, f, {
|
|
189
|
-
corsProxy:
|
|
189
|
+
corsProxy: d,
|
|
190
190
|
additionalHeaders: e
|
|
191
191
|
});
|
|
192
192
|
break;
|
|
@@ -203,14 +203,14 @@ class be {
|
|
|
203
203
|
);
|
|
204
204
|
break;
|
|
205
205
|
case "zip": {
|
|
206
|
-
const
|
|
206
|
+
const u = we.create(t.inner, {
|
|
207
207
|
semaphore: n,
|
|
208
208
|
progress: f,
|
|
209
|
-
corsProxy:
|
|
209
|
+
corsProxy: d,
|
|
210
210
|
streamBundledFile: s,
|
|
211
211
|
gitAdditionalHeadersCallback: e
|
|
212
212
|
});
|
|
213
|
-
p = new Lt(t,
|
|
213
|
+
p = new Lt(t, u, f);
|
|
214
214
|
break;
|
|
215
215
|
}
|
|
216
216
|
default:
|
|
@@ -221,7 +221,7 @@ class be {
|
|
|
221
221
|
return n && (p = new Rt(p, n)), new At(p);
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
class Ar extends
|
|
224
|
+
class Ar extends we {
|
|
225
225
|
constructor(t) {
|
|
226
226
|
super(), this.resource = t;
|
|
227
227
|
}
|
|
@@ -246,7 +246,7 @@ class Ar extends be {
|
|
|
246
246
|
this.resource.setPlayground(t);
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
class vt extends
|
|
249
|
+
class vt extends we {
|
|
250
250
|
/**
|
|
251
251
|
* Creates a new instance of `VFSResource`.
|
|
252
252
|
* @param playground The playground client.
|
|
@@ -269,7 +269,7 @@ class vt extends be {
|
|
|
269
269
|
return this.resource.path.split("/").pop() || "";
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
class Pt extends
|
|
272
|
+
class Pt extends we {
|
|
273
273
|
/**
|
|
274
274
|
* Creates a new instance of `LiteralResource`.
|
|
275
275
|
* @param resource The literal reference.
|
|
@@ -288,7 +288,7 @@ class Pt extends be {
|
|
|
288
288
|
return this.resource.name;
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
class hr extends
|
|
291
|
+
class hr extends we {
|
|
292
292
|
/**
|
|
293
293
|
* Creates a new instance of `FetchResource`.
|
|
294
294
|
* @param progress The progress tracker.
|
|
@@ -298,7 +298,7 @@ class hr extends be {
|
|
|
298
298
|
}
|
|
299
299
|
/** @inheritDoc */
|
|
300
300
|
async resolve() {
|
|
301
|
-
var n, f,
|
|
301
|
+
var n, f, d;
|
|
302
302
|
(n = this.progress) == null || n.setCaption(this.caption);
|
|
303
303
|
const t = this.getURL();
|
|
304
304
|
try {
|
|
@@ -315,7 +315,7 @@ class hr extends be {
|
|
|
315
315
|
);
|
|
316
316
|
if (s = await Hr(
|
|
317
317
|
s,
|
|
318
|
-
((
|
|
318
|
+
((d = this.progress) == null ? void 0 : d.loadingListener) ?? kt
|
|
319
319
|
), s.status !== 200)
|
|
320
320
|
throw new fr(
|
|
321
321
|
`Could not download "${t}"`,
|
|
@@ -383,12 +383,12 @@ class Ot extends hr {
|
|
|
383
383
|
*/
|
|
384
384
|
constructor(t, n, f) {
|
|
385
385
|
if (super(n, f == null ? void 0 : f.corsProxy), this.resource = t, this.options = f, this.resource.url.startsWith("https://github.com/")) {
|
|
386
|
-
const
|
|
386
|
+
const d = this.resource.url.match(
|
|
387
387
|
/^https:\/\/github\.com\/(?<owner>[^/]+)\/(?<repo>[^/]+)\/(?:blob|raw)\/(?<branch>[^/]+)\/(?<path>.+[^/])$/
|
|
388
388
|
);
|
|
389
|
-
|
|
389
|
+
d != null && d.groups && (this.resource = {
|
|
390
390
|
...this.resource,
|
|
391
|
-
url: `https://raw.githubusercontent.com/${
|
|
391
|
+
url: `https://raw.githubusercontent.com/${d.groups.owner}/${d.groups.repo}/${d.groups.branch}/${d.groups.path}`
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
394
|
}
|
|
@@ -401,13 +401,13 @@ class Ot extends hr {
|
|
|
401
401
|
return this.resource.caption ?? super.caption;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
class Tt extends
|
|
404
|
+
class Tt extends we {
|
|
405
405
|
constructor(t, n, f) {
|
|
406
406
|
super(), this.reference = t, this._progress = n, this.options = f;
|
|
407
407
|
}
|
|
408
408
|
async resolve() {
|
|
409
|
-
var f,
|
|
410
|
-
const t = ((
|
|
409
|
+
var f, d, s;
|
|
410
|
+
const t = ((d = (f = this.options) == null ? void 0 : f.additionalHeaders) == null ? void 0 : d.call(f, this.reference.url)) ?? {}, n = (s = this.options) != null && s.corsProxy ? `${this.options.corsProxy}${this.reference.url}` : this.reference.url;
|
|
411
411
|
try {
|
|
412
412
|
const e = await Jr(
|
|
413
413
|
n,
|
|
@@ -420,23 +420,23 @@ class Tt extends be {
|
|
|
420
420
|
n,
|
|
421
421
|
e,
|
|
422
422
|
t
|
|
423
|
-
),
|
|
423
|
+
), u = (this.reference.path ?? "").replace(
|
|
424
424
|
/^\/+/,
|
|
425
425
|
""
|
|
426
|
-
),
|
|
426
|
+
), y = Xr(p, u), _ = await et(
|
|
427
427
|
n,
|
|
428
428
|
e,
|
|
429
|
-
|
|
429
|
+
y,
|
|
430
430
|
{
|
|
431
431
|
withObjects: this.reference[".git"],
|
|
432
432
|
additionalHeaders: t
|
|
433
433
|
}
|
|
434
434
|
);
|
|
435
|
-
let
|
|
436
|
-
return
|
|
437
|
-
|
|
438
|
-
(k) => k.substring(
|
|
439
|
-
), this.reference[".git"] && (
|
|
435
|
+
let h = _.files;
|
|
436
|
+
return h = Et(
|
|
437
|
+
h,
|
|
438
|
+
(k) => k.substring(u.length).replace(/^\/+/, "")
|
|
439
|
+
), this.reference[".git"] && (h = {
|
|
440
440
|
...await rt({
|
|
441
441
|
repoUrl: this.reference.url,
|
|
442
442
|
commitHash: e,
|
|
@@ -444,12 +444,12 @@ class Tt extends be {
|
|
|
444
444
|
refType: this.reference.refType,
|
|
445
445
|
objects: _.objects ?? [],
|
|
446
446
|
fileOids: _.fileOids ?? {},
|
|
447
|
-
pathPrefix:
|
|
447
|
+
pathPrefix: u
|
|
448
448
|
}),
|
|
449
|
-
...
|
|
449
|
+
...h
|
|
450
450
|
}), {
|
|
451
451
|
name: this.filename,
|
|
452
|
-
files:
|
|
452
|
+
files: h
|
|
453
453
|
};
|
|
454
454
|
} catch (e) {
|
|
455
455
|
throw e instanceof _r ? new _r(
|
|
@@ -479,7 +479,7 @@ function Et(r, t) {
|
|
|
479
479
|
Object.entries(r).map(([n, f]) => [t(n), f])
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
|
-
class $t extends
|
|
482
|
+
class $t extends we {
|
|
483
483
|
constructor(t, n) {
|
|
484
484
|
super(), this.reference = t, this._progress = n;
|
|
485
485
|
}
|
|
@@ -533,7 +533,7 @@ class Rt extends Ar {
|
|
|
533
533
|
return this.isAsync ? this.semaphore.run(() => this.resource.resolve()) : this.resource.resolve();
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
class St extends
|
|
536
|
+
class St extends we {
|
|
537
537
|
/**
|
|
538
538
|
* Creates a new instance of `BlueprintResource`.
|
|
539
539
|
* @param resource The blueprint reference.
|
|
@@ -552,15 +552,15 @@ class St extends be {
|
|
|
552
552
|
var t, n, f;
|
|
553
553
|
(t = this.progress) == null || t.set(0);
|
|
554
554
|
try {
|
|
555
|
-
const
|
|
555
|
+
const d = await this.streamBundledFile(this.resource.path), s = d.filesize;
|
|
556
556
|
if (!s)
|
|
557
|
-
return (n = this.progress) == null || n.set(100),
|
|
557
|
+
return (n = this.progress) == null || n.set(100), d;
|
|
558
558
|
const e = Vr(
|
|
559
|
-
|
|
559
|
+
d.stream(),
|
|
560
560
|
s,
|
|
561
561
|
(p) => {
|
|
562
|
-
var
|
|
563
|
-
(
|
|
562
|
+
var u;
|
|
563
|
+
(u = this.progress) == null || u.set(
|
|
564
564
|
p.detail.loaded / p.detail.total * 100
|
|
565
565
|
);
|
|
566
566
|
}
|
|
@@ -568,12 +568,12 @@ class St extends be {
|
|
|
568
568
|
return new lt(e, this.name, {
|
|
569
569
|
filesize: s
|
|
570
570
|
});
|
|
571
|
-
} catch (
|
|
571
|
+
} catch (d) {
|
|
572
572
|
throw (f = this.progress) == null || f.set(100), new Error(
|
|
573
573
|
`Failed to read file from blueprint. This Blueprint refers to a resource of type "bundled" with path "${this.resource.path}" that was not available. Please ensure that the entire bundle, such as a blueprint.zip file, is loaded. If you are trying to load the Blueprint directly from a URL or a local directory, make sure that all the necessary files are accessible and located relative to the blueprint file.
|
|
574
574
|
|
|
575
|
-
Error details: ${
|
|
576
|
-
{ cause:
|
|
575
|
+
Error details: ${d instanceof Error ? d.message : String(d)}`,
|
|
576
|
+
{ cause: d }
|
|
577
577
|
);
|
|
578
578
|
}
|
|
579
579
|
}
|
|
@@ -586,7 +586,7 @@ Error details: ${u instanceof Error ? u.message : String(u)}`,
|
|
|
586
586
|
return !0;
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
class Lt extends
|
|
589
|
+
class Lt extends we {
|
|
590
590
|
constructor(t, n, f) {
|
|
591
591
|
super(), this.reference = t, this.innerResource = n, this._progress = f;
|
|
592
592
|
}
|
|
@@ -597,8 +597,8 @@ class Lt extends be {
|
|
|
597
597
|
const t = await this.innerResource.resolve();
|
|
598
598
|
let n;
|
|
599
599
|
t instanceof File ? n = [t] : n = Ft(t.files, t.name);
|
|
600
|
-
const f = nt(n),
|
|
601
|
-
return (e = this.progress) == null || e.set(100),
|
|
600
|
+
const f = nt(n), d = await pt(this.name, f);
|
|
601
|
+
return (e = this.progress) == null || e.set(100), d;
|
|
602
602
|
}
|
|
603
603
|
/** @inheritDoc */
|
|
604
604
|
get name() {
|
|
@@ -614,22 +614,22 @@ class Lt extends be {
|
|
|
614
614
|
}
|
|
615
615
|
function Ft(r, t) {
|
|
616
616
|
const n = [];
|
|
617
|
-
function f(
|
|
618
|
-
for (const [e, p] of Object.entries(
|
|
619
|
-
const
|
|
620
|
-
p instanceof Uint8Array ? n.push(new File([p], `${t}/${
|
|
617
|
+
function f(d, s) {
|
|
618
|
+
for (const [e, p] of Object.entries(d)) {
|
|
619
|
+
const u = s ? `${s}/${e}` : e;
|
|
620
|
+
p instanceof Uint8Array ? n.push(new File([p], `${t}/${u}`)) : typeof p == "string" ? n.push(
|
|
621
621
|
new File(
|
|
622
622
|
[new TextEncoder().encode(p)],
|
|
623
|
-
`${t}/${
|
|
623
|
+
`${t}/${u}`
|
|
624
624
|
)
|
|
625
|
-
) : f(p,
|
|
625
|
+
) : f(p, u);
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
628
|
return f(r, ""), n;
|
|
629
629
|
}
|
|
630
630
|
const Sr = async (r, { pluginPath: t, pluginName: n }, f) => {
|
|
631
631
|
f == null || f.tracker.setCaption(`Activating ${n || t}`);
|
|
632
|
-
const
|
|
632
|
+
const d = await r.documentRoot, s = await r.run({
|
|
633
633
|
code: `<?php
|
|
634
634
|
define( 'WP_ADMIN', true );
|
|
635
635
|
require_once( getenv('DOCROOT') . "/wp-load.php" );
|
|
@@ -663,7 +663,7 @@ const Sr = async (r, { pluginPath: t, pluginName: n }, f) => {
|
|
|
663
663
|
`,
|
|
664
664
|
env: {
|
|
665
665
|
PLUGIN_PATH: t,
|
|
666
|
-
DOCROOT:
|
|
666
|
+
DOCROOT: d
|
|
667
667
|
}
|
|
668
668
|
});
|
|
669
669
|
s.text && ae.warn(
|
|
@@ -705,7 +705,7 @@ const Sr = async (r, { pluginPath: t, pluginName: n }, f) => {
|
|
|
705
705
|
});
|
|
706
706
|
`,
|
|
707
707
|
env: {
|
|
708
|
-
DOCROOT:
|
|
708
|
+
DOCROOT: d,
|
|
709
709
|
PLUGIN_PATH: t
|
|
710
710
|
}
|
|
711
711
|
})).text ?? "").trim();
|
|
@@ -719,11 +719,11 @@ const Sr = async (r, { pluginPath: t, pluginName: n }, f) => {
|
|
|
719
719
|
);
|
|
720
720
|
}, Lr = async (r, { themeFolderName: t }, n) => {
|
|
721
721
|
n == null || n.tracker.setCaption(`Activating ${t}`);
|
|
722
|
-
const f = await r.documentRoot,
|
|
723
|
-
if (!await r.fileExists(
|
|
722
|
+
const f = await r.documentRoot, d = `${f}/wp-content/themes/${t}`;
|
|
723
|
+
if (!await r.fileExists(d))
|
|
724
724
|
throw new Error(`
|
|
725
725
|
Couldn't activate theme ${t}.
|
|
726
|
-
Theme not found at the provided theme path: ${
|
|
726
|
+
Theme not found at the provided theme path: ${d}.
|
|
727
727
|
Check the theme path to ensure it's correct.
|
|
728
728
|
If the theme is not installed, you can install it using the installTheme step.
|
|
729
729
|
More info can be found in the Blueprint documentation: https://wordpress.github.io/wordpress-playground/blueprints/steps/#ActivateThemeStep
|
|
@@ -799,7 +799,7 @@ Use: rm({ path: '/wordpress/wp-load.php' });
|
|
|
799
799
|
This will ensure your code works reliably regardless of the current working directory.
|
|
800
800
|
`.trim()
|
|
801
801
|
), t = `/${t}`), await r.unlink(t);
|
|
802
|
-
},
|
|
802
|
+
}, Ct = `<?php
|
|
803
803
|
|
|
804
804
|
/**
|
|
805
805
|
* Naively splits an SQL string into a sequence of queries. It
|
|
@@ -962,17 +962,17 @@ class WP_MySQL_Naive_Query_Stream {
|
|
|
962
962
|
return $this->state;
|
|
963
963
|
}
|
|
964
964
|
|
|
965
|
-
}`,
|
|
965
|
+
}`, Dt = async (r, { sql: t }, n) => {
|
|
966
966
|
n == null || n.tracker.setCaption("Executing SQL Queries");
|
|
967
|
-
const f = `/tmp/${ir()}.sql`,
|
|
967
|
+
const f = `/tmp/${ir()}.sql`, d = `/tmp/${ir()}.php`;
|
|
968
968
|
await r.writeFile(
|
|
969
969
|
f,
|
|
970
970
|
new Uint8Array(await t.arrayBuffer())
|
|
971
971
|
), await r.writeFile(
|
|
972
|
-
|
|
973
|
-
new TextEncoder().encode(
|
|
972
|
+
d,
|
|
973
|
+
new TextEncoder().encode(Ct)
|
|
974
974
|
);
|
|
975
|
-
const s = await r.documentRoot, e = mr({ docroot: s, sqlFilename: f, streamClassFilename:
|
|
975
|
+
const s = await r.documentRoot, e = mr({ docroot: s, sqlFilename: f, streamClassFilename: d }), p = await r.run({
|
|
976
976
|
code: `<?php
|
|
977
977
|
define('WP_SQLITE_AST_DRIVER', true);
|
|
978
978
|
require_once ${e.docroot} . '/wp-load.php';
|
|
@@ -1019,7 +1019,7 @@ class WP_MySQL_Naive_Query_Stream {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
`
|
|
1021
1021
|
});
|
|
1022
|
-
return await cr(r, { path: f }), await cr(r, { path:
|
|
1022
|
+
return await cr(r, { path: f }), await cr(r, { path: d }), p;
|
|
1023
1023
|
}, Ut = async (r, { request: t }) => {
|
|
1024
1024
|
ae.warn(
|
|
1025
1025
|
'Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.'
|
|
@@ -1036,10 +1036,10 @@ class WP_MySQL_Naive_Query_Stream {
|
|
|
1036
1036
|
await It(r, t);
|
|
1037
1037
|
break;
|
|
1038
1038
|
case "rewrite-wp-config": {
|
|
1039
|
-
const f = await r.documentRoot,
|
|
1039
|
+
const f = await r.documentRoot, d = ie(f, "/wp-config.php");
|
|
1040
1040
|
await ft(
|
|
1041
1041
|
r,
|
|
1042
|
-
|
|
1042
|
+
d,
|
|
1043
1043
|
t,
|
|
1044
1044
|
"rewrite"
|
|
1045
1045
|
);
|
|
@@ -1057,8 +1057,8 @@ const Fr = async (r, { options: t }) => {
|
|
|
1057
1057
|
const n = await r.documentRoot;
|
|
1058
1058
|
await r.run({
|
|
1059
1059
|
code: `<?php
|
|
1060
|
-
include ${
|
|
1061
|
-
$site_options = ${
|
|
1060
|
+
include ${be(n)} . '/wp-load.php';
|
|
1061
|
+
$site_options = ${be(t)};
|
|
1062
1062
|
foreach($site_options as $name => $value) {
|
|
1063
1063
|
update_option($name, $value);
|
|
1064
1064
|
}
|
|
@@ -1069,10 +1069,10 @@ const Fr = async (r, { options: t }) => {
|
|
|
1069
1069
|
const f = await r.documentRoot;
|
|
1070
1070
|
await r.run({
|
|
1071
1071
|
code: `<?php
|
|
1072
|
-
include ${
|
|
1073
|
-
$meta = ${
|
|
1072
|
+
include ${be(f)} . '/wp-load.php';
|
|
1073
|
+
$meta = ${be(t)};
|
|
1074
1074
|
foreach($meta as $name => $value) {
|
|
1075
|
-
update_user_meta(${
|
|
1075
|
+
update_user_meta(${be(n)}, $name, $value);
|
|
1076
1076
|
}
|
|
1077
1077
|
`
|
|
1078
1078
|
});
|
|
@@ -1104,7 +1104,7 @@ const Fr = async (r, { options: t }) => {
|
|
|
1104
1104
|
if (typeof t == "string" ? (t = t.trim(), f = Bt(t)) : f = t, f.shift() !== "wp")
|
|
1105
1105
|
throw new Error('The first argument must be "wp".');
|
|
1106
1106
|
let s = !1;
|
|
1107
|
-
const e = f.map((
|
|
1107
|
+
const e = f.map((y) => y.startsWith("wordpress/") ? (s = !0, `/${y}`) : y);
|
|
1108
1108
|
s && ae.error(
|
|
1109
1109
|
`
|
|
1110
1110
|
The wp-cli step in your Blueprint refers to a relative path.
|
|
@@ -1149,7 +1149,7 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
1149
1149
|
$GLOBALS['argv'] = array_merge([
|
|
1150
1150
|
"/tmp/wp-cli.phar",
|
|
1151
1151
|
"--path=${p}"
|
|
1152
|
-
], ${
|
|
1152
|
+
], ${be(e)});
|
|
1153
1153
|
|
|
1154
1154
|
// Provide stdin, stdout, stderr streams outside of
|
|
1155
1155
|
// the CLI SAPI.
|
|
@@ -1157,23 +1157,23 @@ This will ensure your code works reliably regardless of the current working dire
|
|
|
1157
1157
|
define('STDOUT', fopen('php://stdout', 'wb'));
|
|
1158
1158
|
define('STDERR', fopen('php://stderr', 'wb'));
|
|
1159
1159
|
|
|
1160
|
-
require( ${
|
|
1160
|
+
require( ${be(n)} );
|
|
1161
1161
|
`
|
|
1162
1162
|
);
|
|
1163
|
-
const
|
|
1163
|
+
const u = await r.run({
|
|
1164
1164
|
scriptPath: ie(p, "run-cli.php")
|
|
1165
1165
|
});
|
|
1166
|
-
if (
|
|
1167
|
-
throw new Error(
|
|
1168
|
-
return
|
|
1166
|
+
if (u.exitCode !== 0)
|
|
1167
|
+
throw new Error(u.errors);
|
|
1168
|
+
return u;
|
|
1169
1169
|
};
|
|
1170
1170
|
function Bt(r) {
|
|
1171
|
-
let f = 0,
|
|
1171
|
+
let f = 0, d = "";
|
|
1172
1172
|
const s = [];
|
|
1173
1173
|
let e = "";
|
|
1174
1174
|
for (let p = 0; p < r.length; p++) {
|
|
1175
|
-
const
|
|
1176
|
-
f === 0 ?
|
|
1175
|
+
const u = r[p];
|
|
1176
|
+
f === 0 ? u === '"' || u === "'" ? (f = 1, d = u) : u.match(/\s/) ? (e && s.push(e), e = "") : e += u : f === 1 && (u === "\\" ? (p++, e += r[p]) : u === d ? (f = 0, d = "") : e += u);
|
|
1177
1177
|
}
|
|
1178
1178
|
return e && s.push(e), s;
|
|
1179
1179
|
}
|
|
@@ -1185,18 +1185,26 @@ const zt = async (r, { wpCliPath: t }) => {
|
|
|
1185
1185
|
});
|
|
1186
1186
|
const n = new URL(await r.absoluteUrl);
|
|
1187
1187
|
if (n.port !== "") {
|
|
1188
|
-
let
|
|
1189
|
-
throw n.hostname === "localhost" && (
|
|
1188
|
+
let y = `The current host is ${n.host}, but WordPress multisites do not support custom ports.`;
|
|
1189
|
+
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);
|
|
1190
1190
|
}
|
|
1191
|
-
const f = n.pathname.replace(/\/$/, "") + "/",
|
|
1191
|
+
const f = n.pathname.replace(/\/$/, "") + "/", d = `${n.protocol}//${n.hostname}${f}`;
|
|
1192
1192
|
await Fr(r, {
|
|
1193
1193
|
options: {
|
|
1194
|
-
siteurl:
|
|
1195
|
-
home:
|
|
1194
|
+
siteurl: d,
|
|
1195
|
+
home: d
|
|
1196
1196
|
}
|
|
1197
1197
|
}), await xr(r, {
|
|
1198
1198
|
command: `wp core multisite-convert --base="${f}"`
|
|
1199
1199
|
});
|
|
1200
|
+
const e = `${await r.documentRoot}/wp-config.php`, p = await r.readFileAsText(e);
|
|
1201
|
+
let u = p;
|
|
1202
|
+
p.includes("$_SERVER['HTTP_HOST']") || (u = p.replace(
|
|
1203
|
+
/^<\?php\s*/i,
|
|
1204
|
+
`<?php
|
|
1205
|
+
$_SERVER['HTTP_HOST'] = ${be(n.hostname)};
|
|
1206
|
+
`
|
|
1207
|
+
)), await r.writeFile(e, u);
|
|
1200
1208
|
}, Vt = async (r, { fromPath: t, toPath: n }) => {
|
|
1201
1209
|
(!t.startsWith("/") || !n.startsWith("/")) && ae.error(
|
|
1202
1210
|
`
|
|
@@ -1308,7 +1316,7 @@ Use: writeFiles({ writeToPath: '/wordpress/wp-content/plugins/my-plugin'
|
|
|
1308
1316
|
This will ensure your code works reliably regardless of the current working directory.
|
|
1309
1317
|
`.trim()
|
|
1310
1318
|
), t = `/${t}`), await yr(r, t, n.files);
|
|
1311
|
-
},
|
|
1319
|
+
}, Cr = async (r, { siteUrl: t }) => {
|
|
1312
1320
|
await gr(r, {
|
|
1313
1321
|
consts: {
|
|
1314
1322
|
WP_HOME: t,
|
|
@@ -1389,9 +1397,9 @@ async function Jt(r, t, n) {
|
|
|
1389
1397
|
}
|
|
1390
1398
|
});
|
|
1391
1399
|
}
|
|
1392
|
-
const
|
|
1393
|
-
var
|
|
1394
|
-
(
|
|
1400
|
+
const Dr = async (r, { themeSlug: t = "" }, n) => {
|
|
1401
|
+
var d;
|
|
1402
|
+
(d = n == null ? void 0 : n.tracker) == null || d.setCaption("Importing theme starter content");
|
|
1395
1403
|
const f = await r.documentRoot;
|
|
1396
1404
|
await r.run({
|
|
1397
1405
|
code: `<?php
|
|
@@ -1417,7 +1425,7 @@ const Cr = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1417
1425
|
* See _wp_customize_include()
|
|
1418
1426
|
*/
|
|
1419
1427
|
$_REQUEST['wp_customize'] = 'on';
|
|
1420
|
-
$_REQUEST['customize_theme'] = ${
|
|
1428
|
+
$_REQUEST['customize_theme'] = ${be(t)} ?: get_stylesheet();
|
|
1421
1429
|
|
|
1422
1430
|
/*
|
|
1423
1431
|
* Claim this is a ajax request saving settings, to avoid the preview filters being applied.
|
|
@@ -1429,7 +1437,7 @@ const Cr = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1429
1437
|
}
|
|
1430
1438
|
playground_add_filter( 'plugins_loaded', 'importThemeStarterContent_plugins_loaded', 0 );
|
|
1431
1439
|
|
|
1432
|
-
require ${
|
|
1440
|
+
require ${be(f)} . '/wp-load.php';
|
|
1433
1441
|
|
|
1434
1442
|
// Return early if there's no starter content.
|
|
1435
1443
|
if ( ! get_theme_starter_content() ) {
|
|
@@ -1474,12 +1482,12 @@ const Cr = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1474
1482
|
"themes/twentytwentysix"
|
|
1475
1483
|
], Kt = async (r, { wordPressFilesZip: t, pathInZip: n = "" }) => {
|
|
1476
1484
|
const f = await r.documentRoot;
|
|
1477
|
-
let
|
|
1478
|
-
await r.mkdir(
|
|
1485
|
+
let d = ie("/tmp", "import");
|
|
1486
|
+
await r.mkdir(d), await vr(r, {
|
|
1479
1487
|
zipFile: t,
|
|
1480
|
-
extractToPath:
|
|
1481
|
-
}),
|
|
1482
|
-
const s = ie(
|
|
1488
|
+
extractToPath: d
|
|
1489
|
+
}), d = ie(d, n);
|
|
1490
|
+
const s = ie(d, "playground-export.json");
|
|
1483
1491
|
let e = null;
|
|
1484
1492
|
if (await r.fileExists(s))
|
|
1485
1493
|
try {
|
|
@@ -1487,37 +1495,37 @@ const Cr = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1487
1495
|
e = JSON.parse(E).siteUrl, await r.unlink(s);
|
|
1488
1496
|
} catch {
|
|
1489
1497
|
}
|
|
1490
|
-
const p = ie(
|
|
1498
|
+
const p = ie(d, "wp-content"), u = ie(f, "wp-content");
|
|
1491
1499
|
for (const E of Ur) {
|
|
1492
1500
|
const $ = ie(
|
|
1493
1501
|
p,
|
|
1494
1502
|
E
|
|
1495
1503
|
);
|
|
1496
1504
|
await Or(r, $);
|
|
1497
|
-
const
|
|
1498
|
-
await r.fileExists(
|
|
1505
|
+
const g = ie(u, E);
|
|
1506
|
+
await r.fileExists(g) && (await r.mkdir(Yr($)), await r.mv(g, $));
|
|
1499
1507
|
}
|
|
1500
|
-
const
|
|
1501
|
-
|
|
1508
|
+
const y = ie(
|
|
1509
|
+
d,
|
|
1502
1510
|
"wp-content",
|
|
1503
1511
|
"database"
|
|
1504
1512
|
);
|
|
1505
|
-
await r.fileExists(
|
|
1513
|
+
await r.fileExists(y) || await r.mv(
|
|
1506
1514
|
ie(f, "wp-content", "database"),
|
|
1507
|
-
|
|
1515
|
+
y
|
|
1508
1516
|
);
|
|
1509
|
-
const _ = await r.listFiles(
|
|
1517
|
+
const _ = await r.listFiles(d);
|
|
1510
1518
|
for (const E of _)
|
|
1511
1519
|
await Or(r, ie(f, E)), await r.mv(
|
|
1512
|
-
ie(
|
|
1520
|
+
ie(d, E),
|
|
1513
1521
|
ie(f, E)
|
|
1514
1522
|
);
|
|
1515
|
-
await r.rmdir(
|
|
1516
|
-
const
|
|
1517
|
-
e || (e = await es(r, f)), await
|
|
1518
|
-
siteUrl:
|
|
1523
|
+
await r.rmdir(d), await ut(r, f);
|
|
1524
|
+
const h = await r.absoluteUrl;
|
|
1525
|
+
e || (e = await es(r, f)), await Cr(r, {
|
|
1526
|
+
siteUrl: h
|
|
1519
1527
|
});
|
|
1520
|
-
const k =
|
|
1528
|
+
const k = be(
|
|
1521
1529
|
ie(f, "wp-admin", "upgrade.php")
|
|
1522
1530
|
);
|
|
1523
1531
|
await r.run({
|
|
@@ -1525,15 +1533,15 @@ const Cr = async (r, { themeSlug: t = "" }, n) => {
|
|
|
1525
1533
|
$_GET['step'] = 'upgrade_db';
|
|
1526
1534
|
require ${k};
|
|
1527
1535
|
`
|
|
1528
|
-
}), e && e !==
|
|
1536
|
+
}), e && e !== h && await Xt(r, f, e, h);
|
|
1529
1537
|
};
|
|
1530
1538
|
function kr(r) {
|
|
1531
1539
|
const t = r.match(/\/scope:[^/]+\/?/);
|
|
1532
1540
|
return t ? t[0].replace(/\/?$/, "/") : null;
|
|
1533
1541
|
}
|
|
1534
1542
|
async function Xt(r, t, n, f) {
|
|
1535
|
-
const
|
|
1536
|
-
!
|
|
1543
|
+
const d = kr(n), s = kr(f);
|
|
1544
|
+
!d || !s || d !== s && await r.run({
|
|
1537
1545
|
code: `<?php
|
|
1538
1546
|
require_once getenv('DOCUMENT_ROOT') . '/wp-load.php';
|
|
1539
1547
|
global $wpdb;
|
|
@@ -1591,7 +1599,7 @@ async function Xt(r, t, n, f) {
|
|
|
1591
1599
|
`,
|
|
1592
1600
|
env: {
|
|
1593
1601
|
DOCUMENT_ROOT: t,
|
|
1594
|
-
OLD_SCOPE:
|
|
1602
|
+
OLD_SCOPE: d,
|
|
1595
1603
|
NEW_SCOPE: s
|
|
1596
1604
|
}
|
|
1597
1605
|
});
|
|
@@ -1620,24 +1628,24 @@ async function Ir(r, {
|
|
|
1620
1628
|
targetPath: t,
|
|
1621
1629
|
zipFile: n,
|
|
1622
1630
|
ifAlreadyInstalled: f = "overwrite",
|
|
1623
|
-
targetFolderName:
|
|
1631
|
+
targetFolderName: d = ""
|
|
1624
1632
|
}) {
|
|
1625
|
-
const e = n.name.replace(/\.zip$/, ""), p = ie(await r.documentRoot, "wp-content"),
|
|
1626
|
-
await r.fileExists(
|
|
1633
|
+
const e = n.name.replace(/\.zip$/, ""), p = ie(await r.documentRoot, "wp-content"), u = ie(p, ir()), y = ie(u, "assets", e);
|
|
1634
|
+
await r.fileExists(y) && await r.rmdir(u, {
|
|
1627
1635
|
recursive: !0
|
|
1628
|
-
}), await r.mkdir(
|
|
1636
|
+
}), await r.mkdir(u);
|
|
1629
1637
|
try {
|
|
1630
1638
|
await vr(r, {
|
|
1631
1639
|
zipFile: n,
|
|
1632
|
-
extractToPath:
|
|
1640
|
+
extractToPath: y
|
|
1633
1641
|
});
|
|
1634
|
-
let _ = await r.listFiles(
|
|
1642
|
+
let _ = await r.listFiles(y, {
|
|
1635
1643
|
prependPath: !0
|
|
1636
1644
|
});
|
|
1637
|
-
_ = _.filter((
|
|
1638
|
-
const
|
|
1645
|
+
_ = _.filter((g) => !g.endsWith("/__MACOSX"));
|
|
1646
|
+
const h = _.length === 1 && await r.isDir(_[0]);
|
|
1639
1647
|
let k, E = "";
|
|
1640
|
-
|
|
1648
|
+
h ? (E = _[0], k = _[0].split("/").pop()) : (E = y, k = e), d && d.length && (k = d);
|
|
1641
1649
|
const $ = `${t}/${k}`;
|
|
1642
1650
|
if (await r.fileExists($)) {
|
|
1643
1651
|
if (!await r.isDir($))
|
|
@@ -1664,12 +1672,12 @@ async function Ir(r, {
|
|
|
1664
1672
|
assetFolderName: k
|
|
1665
1673
|
};
|
|
1666
1674
|
} finally {
|
|
1667
|
-
await r.rmdir(
|
|
1675
|
+
await r.rmdir(u, {
|
|
1668
1676
|
recursive: !0
|
|
1669
1677
|
});
|
|
1670
1678
|
}
|
|
1671
1679
|
}
|
|
1672
|
-
const ts = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: f, options:
|
|
1680
|
+
const ts = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: f, options: d = {} }, s) => {
|
|
1673
1681
|
n && (t = n, ae.warn(
|
|
1674
1682
|
'The "pluginZipFile" option is deprecated. Use "pluginData" instead.'
|
|
1675
1683
|
));
|
|
@@ -1677,8 +1685,8 @@ const ts = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: f, o
|
|
|
1677
1685
|
await r.documentRoot,
|
|
1678
1686
|
"wp-content",
|
|
1679
1687
|
"plugins"
|
|
1680
|
-
), p = "targetFolderName" in
|
|
1681
|
-
let
|
|
1688
|
+
), p = "targetFolderName" in d ? d.targetFolderName : "";
|
|
1689
|
+
let u = "", y = "";
|
|
1682
1690
|
const _ = async (k) => {
|
|
1683
1691
|
if (k.name.toLowerCase().endsWith(".zip"))
|
|
1684
1692
|
return !0;
|
|
@@ -1688,8 +1696,8 @@ const ts = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: f, o
|
|
|
1688
1696
|
if (t instanceof File)
|
|
1689
1697
|
if (await _(t)) {
|
|
1690
1698
|
const k = t.name.split("/").pop() || "plugin.zip";
|
|
1691
|
-
|
|
1692
|
-
`Installing the ${
|
|
1699
|
+
y = ar(k), s == null || s.tracker.setCaption(
|
|
1700
|
+
`Installing the ${y} plugin`
|
|
1693
1701
|
);
|
|
1694
1702
|
const E = await Ir(r, {
|
|
1695
1703
|
ifAlreadyInstalled: f,
|
|
@@ -1697,7 +1705,7 @@ const ts = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: f, o
|
|
|
1697
1705
|
targetPath: `${await r.documentRoot}/wp-content/plugins`,
|
|
1698
1706
|
targetFolderName: p
|
|
1699
1707
|
});
|
|
1700
|
-
|
|
1708
|
+
u = E.assetFolderPath, y = E.assetFolderName;
|
|
1701
1709
|
} else if (t.name.endsWith(".php")) {
|
|
1702
1710
|
const k = ie(
|
|
1703
1711
|
e,
|
|
@@ -1706,62 +1714,62 @@ const ts = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: f, o
|
|
|
1706
1714
|
await wr(r, {
|
|
1707
1715
|
path: k,
|
|
1708
1716
|
data: t
|
|
1709
|
-
}),
|
|
1717
|
+
}), u = e, y = t.name;
|
|
1710
1718
|
} else
|
|
1711
1719
|
throw new Error(
|
|
1712
1720
|
"pluginData looks like a file but does not look like a .zip or .php file."
|
|
1713
1721
|
);
|
|
1714
1722
|
else if (t) {
|
|
1715
|
-
|
|
1723
|
+
y = t.name, s == null || s.tracker.setCaption(`Installing the ${y} plugin`);
|
|
1716
1724
|
const k = ie(
|
|
1717
1725
|
e,
|
|
1718
1726
|
p || t.name
|
|
1719
1727
|
);
|
|
1720
1728
|
await yr(r, k, t.files, {
|
|
1721
1729
|
rmRoot: !0
|
|
1722
|
-
}),
|
|
1730
|
+
}), u = k;
|
|
1723
1731
|
}
|
|
1724
|
-
("activate" in
|
|
1732
|
+
("activate" in d ? d.activate : !0) && await Sr(
|
|
1725
1733
|
r,
|
|
1726
1734
|
{
|
|
1727
|
-
pluginPath:
|
|
1728
|
-
pluginName:
|
|
1735
|
+
pluginPath: u,
|
|
1736
|
+
pluginName: y
|
|
1729
1737
|
},
|
|
1730
1738
|
s
|
|
1731
1739
|
);
|
|
1732
|
-
}, ss = async (r, { themeData: t, themeZipFile: n, ifAlreadyInstalled: f, options:
|
|
1740
|
+
}, ss = async (r, { themeData: t, themeZipFile: n, ifAlreadyInstalled: f, options: d = {} }, s) => {
|
|
1733
1741
|
n && (t = n, ae.warn(
|
|
1734
1742
|
'The "themeZipFile" option is deprecated. Use "themeData" instead.'
|
|
1735
1743
|
));
|
|
1736
|
-
const e = "targetFolderName" in
|
|
1737
|
-
let p = "",
|
|
1744
|
+
const e = "targetFolderName" in d ? d.targetFolderName : "";
|
|
1745
|
+
let p = "", u = "";
|
|
1738
1746
|
if (t instanceof File) {
|
|
1739
|
-
const
|
|
1740
|
-
|
|
1747
|
+
const h = t.name.split("/").pop() || "theme.zip";
|
|
1748
|
+
u = ar(h), s == null || s.tracker.setCaption(`Installing the ${u} theme`), p = (await Ir(r, {
|
|
1741
1749
|
ifAlreadyInstalled: f,
|
|
1742
1750
|
zipFile: t,
|
|
1743
1751
|
targetPath: `${await r.documentRoot}/wp-content/themes`,
|
|
1744
1752
|
targetFolderName: e
|
|
1745
1753
|
})).assetFolderName;
|
|
1746
1754
|
} else {
|
|
1747
|
-
|
|
1748
|
-
const
|
|
1755
|
+
u = t.name, p = e || u, s == null || s.tracker.setCaption(`Installing the ${u} theme`);
|
|
1756
|
+
const h = ie(
|
|
1749
1757
|
await r.documentRoot,
|
|
1750
1758
|
"wp-content",
|
|
1751
1759
|
"themes",
|
|
1752
1760
|
p
|
|
1753
1761
|
);
|
|
1754
|
-
await yr(r,
|
|
1762
|
+
await yr(r, h, t.files, {
|
|
1755
1763
|
rmRoot: !0
|
|
1756
1764
|
});
|
|
1757
1765
|
}
|
|
1758
|
-
("activate" in
|
|
1766
|
+
("activate" in d ? d.activate : !0) && await Lr(
|
|
1759
1767
|
r,
|
|
1760
1768
|
{
|
|
1761
1769
|
themeFolderName: p
|
|
1762
1770
|
},
|
|
1763
1771
|
s
|
|
1764
|
-
), ("importStarterContent" in
|
|
1772
|
+
), ("importStarterContent" in d ? d.importStarterContent : !1) && await Dr(
|
|
1765
1773
|
r,
|
|
1766
1774
|
{
|
|
1767
1775
|
themeSlug: p
|
|
@@ -1771,8 +1779,8 @@ const ts = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: f, o
|
|
|
1771
1779
|
}, is = async (r, { username: t = "admin" } = {}, n) => {
|
|
1772
1780
|
n == null || n.tracker.setCaption((n == null ? void 0 : n.initialCaption) || "Logging in"), r.defineConstant("PLAYGROUND_AUTO_LOGIN_AS_USER", t);
|
|
1773
1781
|
}, os = async (r, t, n) => {
|
|
1774
|
-
var
|
|
1775
|
-
(
|
|
1782
|
+
var d;
|
|
1783
|
+
(d = n == null ? void 0 : n.tracker) == null || d.setCaption("Resetting WordPress data");
|
|
1776
1784
|
const f = await r.documentRoot;
|
|
1777
1785
|
await r.run({
|
|
1778
1786
|
env: {
|
|
@@ -1812,34 +1820,34 @@ const ts = async (r, { pluginData: t, pluginZipFile: n, ifAlreadyInstalled: f, o
|
|
|
1812
1820
|
}
|
|
1813
1821
|
});
|
|
1814
1822
|
}, ns = async (r, { selfContained: t = !1 } = {}) => {
|
|
1815
|
-
const n = "/tmp/wordpress-playground.zip", f = "/tmp/playground-export.json",
|
|
1823
|
+
const n = "/tmp/wordpress-playground.zip", f = "/tmp/playground-export.json", d = await r.documentRoot, s = ie(d, "wp-content"), e = await r.absoluteUrl;
|
|
1816
1824
|
await r.writeFile(
|
|
1817
1825
|
f,
|
|
1818
1826
|
new TextEncoder().encode(JSON.stringify({ siteUrl: e }))
|
|
1819
1827
|
);
|
|
1820
1828
|
let p = Ur;
|
|
1821
|
-
t && (p = p.filter((
|
|
1822
|
-
(
|
|
1829
|
+
t && (p = p.filter((h) => !h.startsWith("themes/twenty")).filter(
|
|
1830
|
+
(h) => h !== "mu-plugins/sqlite-database-integration"
|
|
1823
1831
|
));
|
|
1824
|
-
const
|
|
1832
|
+
const u = {
|
|
1825
1833
|
[f]: "playground-export.json"
|
|
1826
1834
|
};
|
|
1827
|
-
t && (
|
|
1828
|
-
const
|
|
1835
|
+
t && (u[ie(d, "wp-config.php")] = "wp-config.php");
|
|
1836
|
+
const y = mr({
|
|
1829
1837
|
zipPath: n,
|
|
1830
1838
|
wpContentPath: s,
|
|
1831
|
-
documentRoot:
|
|
1839
|
+
documentRoot: d,
|
|
1832
1840
|
exceptPaths: p.map(
|
|
1833
|
-
(
|
|
1841
|
+
(h) => ie(d, "wp-content", h)
|
|
1834
1842
|
),
|
|
1835
|
-
additionalPaths:
|
|
1843
|
+
additionalPaths: u
|
|
1836
1844
|
});
|
|
1837
1845
|
await ls(
|
|
1838
1846
|
r,
|
|
1839
|
-
`zipDir(${
|
|
1840
|
-
'exclude_paths' => ${
|
|
1841
|
-
'zip_root' => ${
|
|
1842
|
-
'additional_paths' => ${
|
|
1847
|
+
`zipDir(${y.wpContentPath}, ${y.zipPath}, array(
|
|
1848
|
+
'exclude_paths' => ${y.exceptPaths},
|
|
1849
|
+
'zip_root' => ${y.documentRoot},
|
|
1850
|
+
'additional_paths' => ${y.additionalPaths}
|
|
1843
1851
|
));`
|
|
1844
1852
|
);
|
|
1845
1853
|
const _ = await r.readFileAsBuffer(n);
|
|
@@ -1911,26 +1919,26 @@ async function ls(r, t) {
|
|
|
1911
1919
|
});
|
|
1912
1920
|
}
|
|
1913
1921
|
const fs = async (r, t) => {
|
|
1914
|
-
const
|
|
1922
|
+
const d = (await (await fetch(
|
|
1915
1923
|
`https://api.wordpress.org/translations/core/1.0/?version=${r}`
|
|
1916
1924
|
)).json()).translations.find(
|
|
1917
1925
|
(s) => s.language.toLowerCase() === t.toLowerCase()
|
|
1918
1926
|
);
|
|
1919
|
-
if (!
|
|
1927
|
+
if (!d)
|
|
1920
1928
|
throw new Error(
|
|
1921
1929
|
`Failed to get ${t} translation package for WordPress ${r}.`
|
|
1922
1930
|
);
|
|
1923
|
-
return
|
|
1931
|
+
return d.package;
|
|
1924
1932
|
}, us = async (r, { language: t }, n) => {
|
|
1925
1933
|
n == null || n.tracker.setCaption((n == null ? void 0 : n.initialCaption) || "Translating"), await r.defineConstant("WPLANG", t);
|
|
1926
|
-
const f = await r.documentRoot,
|
|
1934
|
+
const f = await r.documentRoot, d = (await r.run({
|
|
1927
1935
|
code: `<?php
|
|
1928
1936
|
require '${f}/wp-includes/version.php';
|
|
1929
1937
|
echo $wp_version;
|
|
1930
1938
|
`
|
|
1931
1939
|
})).text, s = [
|
|
1932
1940
|
{
|
|
1933
|
-
url: await fs(
|
|
1941
|
+
url: await fs(d, t),
|
|
1934
1942
|
type: "core"
|
|
1935
1943
|
}
|
|
1936
1944
|
], p = (await r.run({
|
|
@@ -1961,7 +1969,7 @@ const fs = async (r, t) => {
|
|
|
1961
1969
|
url: `https://downloads.wordpress.org/translation/plugin/${k}/${E}/${t}.zip`,
|
|
1962
1970
|
type: "plugin"
|
|
1963
1971
|
});
|
|
1964
|
-
const
|
|
1972
|
+
const y = (await r.run({
|
|
1965
1973
|
code: `<?php
|
|
1966
1974
|
require_once('${f}/wp-load.php');
|
|
1967
1975
|
require_once('${f}/wp-admin/includes/theme.php');
|
|
@@ -1979,13 +1987,13 @@ const fs = async (r, t) => {
|
|
|
1979
1987
|
)
|
|
1980
1988
|
);`
|
|
1981
1989
|
})).json;
|
|
1982
|
-
for (const { slug: k, version: E } of
|
|
1990
|
+
for (const { slug: k, version: E } of y)
|
|
1983
1991
|
s.push({
|
|
1984
1992
|
url: `https://downloads.wordpress.org/translation/theme/${k}/${E}/${t}.zip`,
|
|
1985
1993
|
type: "theme"
|
|
1986
1994
|
});
|
|
1987
1995
|
await r.isDir(`${f}/wp-content/languages/plugins`) || await r.mkdir(`${f}/wp-content/languages/plugins`), await r.isDir(`${f}/wp-content/languages/themes`) || await r.mkdir(`${f}/wp-content/languages/themes`);
|
|
1988
|
-
const _ = new $r({ concurrency: 5 }),
|
|
1996
|
+
const _ = new $r({ concurrency: 5 }), h = s.map(
|
|
1989
1997
|
({ url: k, type: E }) => _.run(async () => {
|
|
1990
1998
|
try {
|
|
1991
1999
|
const $ = await fetch(k);
|
|
@@ -1993,14 +2001,14 @@ const fs = async (r, t) => {
|
|
|
1993
2001
|
throw new Error(
|
|
1994
2002
|
`Failed to download translations for ${E}: ${$.statusText}`
|
|
1995
2003
|
);
|
|
1996
|
-
let
|
|
1997
|
-
E === "plugin" ?
|
|
2004
|
+
let g = `${f}/wp-content/languages`;
|
|
2005
|
+
E === "plugin" ? g += "/plugins" : E === "theme" && (g += "/themes"), await jr(
|
|
1998
2006
|
r,
|
|
1999
2007
|
new File(
|
|
2000
2008
|
[await $.arrayBuffer()],
|
|
2001
2009
|
`${t}-${E}.zip`
|
|
2002
2010
|
),
|
|
2003
|
-
|
|
2011
|
+
g
|
|
2004
2012
|
);
|
|
2005
2013
|
} catch ($) {
|
|
2006
2014
|
if (E === "core")
|
|
@@ -2013,17 +2021,17 @@ const fs = async (r, t) => {
|
|
|
2013
2021
|
}
|
|
2014
2022
|
})
|
|
2015
2023
|
);
|
|
2016
|
-
await Promise.all(
|
|
2024
|
+
await Promise.all(h);
|
|
2017
2025
|
}, ds = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2018
2026
|
__proto__: null,
|
|
2019
2027
|
activatePlugin: Sr,
|
|
2020
2028
|
activateTheme: Lr,
|
|
2021
2029
|
cp: Vt,
|
|
2022
|
-
defineSiteUrl:
|
|
2030
|
+
defineSiteUrl: Cr,
|
|
2023
2031
|
defineWpConfigConsts: gr,
|
|
2024
2032
|
enableMultisite: zt,
|
|
2025
2033
|
exportWXR: rs,
|
|
2026
|
-
importThemeStarterContent:
|
|
2034
|
+
importThemeStarterContent: Dr,
|
|
2027
2035
|
importWordPressFiles: Kt,
|
|
2028
2036
|
importWxr: Gt,
|
|
2029
2037
|
installPlugin: ts,
|
|
@@ -2037,7 +2045,7 @@ const fs = async (r, t) => {
|
|
|
2037
2045
|
rmdir: Yt,
|
|
2038
2046
|
runPHP: Nt,
|
|
2039
2047
|
runPHPWithOptions: xt,
|
|
2040
|
-
runSql:
|
|
2048
|
+
runSql: Dt,
|
|
2041
2049
|
runWpInstallationWizard: as,
|
|
2042
2050
|
setSiteLanguage: us,
|
|
2043
2051
|
setSiteOptions: Fr,
|
|
@@ -2183,34 +2191,34 @@ Note: PHP 7.2 and 7.3 are deprecated and will be automatically upgraded to 7.4.`
|
|
|
2183
2191
|
}, Wr = Object.prototype.hasOwnProperty, ys = {
|
|
2184
2192
|
enum: ["8.5", "8.4", "8.3", "8.2", "8.1", "8.0", "7.4"]
|
|
2185
2193
|
};
|
|
2186
|
-
function Ie(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
2194
|
+
function Ie(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
2187
2195
|
let s = null, e = 0;
|
|
2188
2196
|
const p = e;
|
|
2189
|
-
let
|
|
2190
|
-
const
|
|
2197
|
+
let u = !1;
|
|
2198
|
+
const y = e;
|
|
2191
2199
|
if (typeof r != "string") {
|
|
2192
|
-
const
|
|
2200
|
+
const h = {
|
|
2193
2201
|
instancePath: t,
|
|
2194
2202
|
schemaPath: "#/definitions/SupportedPHPVersion/type",
|
|
2195
2203
|
keyword: "type",
|
|
2196
2204
|
params: { type: "string" },
|
|
2197
2205
|
message: "must be string"
|
|
2198
2206
|
};
|
|
2199
|
-
s === null ? s = [
|
|
2207
|
+
s === null ? s = [h] : s.push(h), e++;
|
|
2200
2208
|
}
|
|
2201
2209
|
if (!(r === "8.5" || r === "8.4" || r === "8.3" || r === "8.2" || r === "8.1" || r === "8.0" || r === "7.4")) {
|
|
2202
|
-
const
|
|
2210
|
+
const h = {
|
|
2203
2211
|
instancePath: t,
|
|
2204
2212
|
schemaPath: "#/definitions/SupportedPHPVersion/enum",
|
|
2205
2213
|
keyword: "enum",
|
|
2206
2214
|
params: { allowedValues: ys.enum },
|
|
2207
2215
|
message: "must be equal to one of the allowed values"
|
|
2208
2216
|
};
|
|
2209
|
-
s === null ? s = [
|
|
2217
|
+
s === null ? s = [h] : s.push(h), e++;
|
|
2210
2218
|
}
|
|
2211
|
-
var _ =
|
|
2212
|
-
if (
|
|
2213
|
-
const
|
|
2219
|
+
var _ = y === e;
|
|
2220
|
+
if (u = u || _, !u) {
|
|
2221
|
+
const h = e;
|
|
2214
2222
|
if (typeof r != "string") {
|
|
2215
2223
|
const E = {
|
|
2216
2224
|
instancePath: t,
|
|
@@ -2231,80 +2239,80 @@ function Ie(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2231
2239
|
};
|
|
2232
2240
|
s === null ? s = [E] : s.push(E), e++;
|
|
2233
2241
|
}
|
|
2234
|
-
var _ =
|
|
2235
|
-
if (
|
|
2242
|
+
var _ = h === e;
|
|
2243
|
+
if (u = u || _, !u) {
|
|
2236
2244
|
const E = e;
|
|
2237
2245
|
if (typeof r != "string") {
|
|
2238
|
-
const
|
|
2246
|
+
const g = {
|
|
2239
2247
|
instancePath: t,
|
|
2240
2248
|
schemaPath: "#/anyOf/2/type",
|
|
2241
2249
|
keyword: "type",
|
|
2242
2250
|
params: { type: "string" },
|
|
2243
2251
|
message: "must be string"
|
|
2244
2252
|
};
|
|
2245
|
-
s === null ? s = [
|
|
2253
|
+
s === null ? s = [g] : s.push(g), e++;
|
|
2246
2254
|
}
|
|
2247
2255
|
if (r !== "7.3") {
|
|
2248
|
-
const
|
|
2256
|
+
const g = {
|
|
2249
2257
|
instancePath: t,
|
|
2250
2258
|
schemaPath: "#/anyOf/2/const",
|
|
2251
2259
|
keyword: "const",
|
|
2252
2260
|
params: { allowedValue: "7.3" },
|
|
2253
2261
|
message: "must be equal to constant"
|
|
2254
2262
|
};
|
|
2255
|
-
s === null ? s = [
|
|
2263
|
+
s === null ? s = [g] : s.push(g), e++;
|
|
2256
2264
|
}
|
|
2257
2265
|
var _ = E === e;
|
|
2258
|
-
|
|
2266
|
+
u = u || _;
|
|
2259
2267
|
}
|
|
2260
2268
|
}
|
|
2261
|
-
if (
|
|
2269
|
+
if (u)
|
|
2262
2270
|
e = p, s !== null && (p ? s.length = p : s = null);
|
|
2263
2271
|
else {
|
|
2264
|
-
const
|
|
2272
|
+
const h = {
|
|
2265
2273
|
instancePath: t,
|
|
2266
2274
|
schemaPath: "#/anyOf",
|
|
2267
2275
|
keyword: "anyOf",
|
|
2268
2276
|
params: {},
|
|
2269
2277
|
message: "must match a schema in anyOf"
|
|
2270
2278
|
};
|
|
2271
|
-
return s === null ? s = [
|
|
2279
|
+
return s === null ? s = [h] : s.push(h), e++, Ie.errors = s, !1;
|
|
2272
2280
|
}
|
|
2273
2281
|
return Ie.errors = s, e === 0;
|
|
2274
2282
|
}
|
|
2275
2283
|
const ur = { validate: Z }, hs = {
|
|
2276
2284
|
enum: ["branch", "tag", "commit", "refname"]
|
|
2277
2285
|
};
|
|
2278
|
-
function de(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
2286
|
+
function de(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
2279
2287
|
let s = null, e = 0;
|
|
2280
2288
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
2281
|
-
let
|
|
2282
|
-
if (r.resource === void 0 && (
|
|
2289
|
+
let u;
|
|
2290
|
+
if (r.resource === void 0 && (u = "resource") || r.url === void 0 && (u = "url") || r.ref === void 0 && (u = "ref"))
|
|
2283
2291
|
return de.errors = [
|
|
2284
2292
|
{
|
|
2285
2293
|
instancePath: t,
|
|
2286
2294
|
schemaPath: "#/required",
|
|
2287
2295
|
keyword: "required",
|
|
2288
|
-
params: { missingProperty:
|
|
2289
|
-
message: "must have required property '" +
|
|
2296
|
+
params: { missingProperty: u },
|
|
2297
|
+
message: "must have required property '" + u + "'"
|
|
2290
2298
|
}
|
|
2291
2299
|
], !1;
|
|
2292
|
-
for (const
|
|
2293
|
-
if (!(
|
|
2300
|
+
for (const y in r)
|
|
2301
|
+
if (!(y === "resource" || y === "url" || y === "ref" || y === "refType" || y === "path" || y === ".git"))
|
|
2294
2302
|
return de.errors = [
|
|
2295
2303
|
{
|
|
2296
2304
|
instancePath: t,
|
|
2297
2305
|
schemaPath: "#/additionalProperties",
|
|
2298
2306
|
keyword: "additionalProperties",
|
|
2299
|
-
params: { additionalProperty:
|
|
2307
|
+
params: { additionalProperty: y },
|
|
2300
2308
|
message: "must NOT have additional properties"
|
|
2301
2309
|
}
|
|
2302
2310
|
], !1;
|
|
2303
2311
|
{
|
|
2304
2312
|
if (r.resource !== void 0) {
|
|
2305
|
-
let
|
|
2313
|
+
let y = r.resource;
|
|
2306
2314
|
const _ = e;
|
|
2307
|
-
if (typeof
|
|
2315
|
+
if (typeof y != "string")
|
|
2308
2316
|
return de.errors = [
|
|
2309
2317
|
{
|
|
2310
2318
|
instancePath: t + "/resource",
|
|
@@ -2314,7 +2322,7 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2314
2322
|
message: "must be string"
|
|
2315
2323
|
}
|
|
2316
2324
|
], !1;
|
|
2317
|
-
if (
|
|
2325
|
+
if (y !== "git:directory")
|
|
2318
2326
|
return de.errors = [
|
|
2319
2327
|
{
|
|
2320
2328
|
instancePath: t + "/resource",
|
|
@@ -2329,7 +2337,7 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2329
2337
|
var p = !0;
|
|
2330
2338
|
if (p) {
|
|
2331
2339
|
if (r.url !== void 0) {
|
|
2332
|
-
const
|
|
2340
|
+
const y = e;
|
|
2333
2341
|
if (typeof r.url != "string")
|
|
2334
2342
|
return de.errors = [
|
|
2335
2343
|
{
|
|
@@ -2340,12 +2348,12 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2340
2348
|
message: "must be string"
|
|
2341
2349
|
}
|
|
2342
2350
|
], !1;
|
|
2343
|
-
var p =
|
|
2351
|
+
var p = y === e;
|
|
2344
2352
|
} else
|
|
2345
2353
|
var p = !0;
|
|
2346
2354
|
if (p) {
|
|
2347
2355
|
if (r.ref !== void 0) {
|
|
2348
|
-
const
|
|
2356
|
+
const y = e;
|
|
2349
2357
|
if (typeof r.ref != "string")
|
|
2350
2358
|
return de.errors = [
|
|
2351
2359
|
{
|
|
@@ -2356,14 +2364,14 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2356
2364
|
message: "must be string"
|
|
2357
2365
|
}
|
|
2358
2366
|
], !1;
|
|
2359
|
-
var p =
|
|
2367
|
+
var p = y === e;
|
|
2360
2368
|
} else
|
|
2361
2369
|
var p = !0;
|
|
2362
2370
|
if (p) {
|
|
2363
2371
|
if (r.refType !== void 0) {
|
|
2364
|
-
let
|
|
2372
|
+
let y = r.refType;
|
|
2365
2373
|
const _ = e;
|
|
2366
|
-
if (typeof
|
|
2374
|
+
if (typeof y != "string")
|
|
2367
2375
|
return de.errors = [
|
|
2368
2376
|
{
|
|
2369
2377
|
instancePath: t + "/refType",
|
|
@@ -2373,7 +2381,7 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2373
2381
|
message: "must be string"
|
|
2374
2382
|
}
|
|
2375
2383
|
], !1;
|
|
2376
|
-
if (!(
|
|
2384
|
+
if (!(y === "branch" || y === "tag" || y === "commit" || y === "refname"))
|
|
2377
2385
|
return de.errors = [
|
|
2378
2386
|
{
|
|
2379
2387
|
instancePath: t + "/refType",
|
|
@@ -2390,7 +2398,7 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2390
2398
|
var p = !0;
|
|
2391
2399
|
if (p) {
|
|
2392
2400
|
if (r.path !== void 0) {
|
|
2393
|
-
const
|
|
2401
|
+
const y = e;
|
|
2394
2402
|
if (typeof r.path != "string")
|
|
2395
2403
|
return de.errors = [
|
|
2396
2404
|
{
|
|
@@ -2401,12 +2409,12 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2401
2409
|
message: "must be string"
|
|
2402
2410
|
}
|
|
2403
2411
|
], !1;
|
|
2404
|
-
var p =
|
|
2412
|
+
var p = y === e;
|
|
2405
2413
|
} else
|
|
2406
2414
|
var p = !0;
|
|
2407
2415
|
if (p)
|
|
2408
2416
|
if (r[".git"] !== void 0) {
|
|
2409
|
-
const
|
|
2417
|
+
const y = e;
|
|
2410
2418
|
if (typeof r[".git"] != "boolean")
|
|
2411
2419
|
return de.errors = [
|
|
2412
2420
|
{
|
|
@@ -2419,7 +2427,7 @@ function de(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2419
2427
|
message: "must be boolean"
|
|
2420
2428
|
}
|
|
2421
2429
|
], !1;
|
|
2422
|
-
var p =
|
|
2430
|
+
var p = y === e;
|
|
2423
2431
|
} else
|
|
2424
2432
|
var p = !0;
|
|
2425
2433
|
}
|
|
@@ -2447,27 +2455,27 @@ const gs = {
|
|
|
2447
2455
|
]
|
|
2448
2456
|
}
|
|
2449
2457
|
}, dr = { validate: xe };
|
|
2450
|
-
function xe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
2458
|
+
function xe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
2451
2459
|
let s = null, e = 0;
|
|
2452
2460
|
if (e === 0)
|
|
2453
2461
|
if (r && typeof r == "object" && !Array.isArray(r))
|
|
2454
|
-
for (const
|
|
2455
|
-
let _ = r[
|
|
2456
|
-
const
|
|
2462
|
+
for (const y in r) {
|
|
2463
|
+
let _ = r[y];
|
|
2464
|
+
const h = e, k = e;
|
|
2457
2465
|
let E = !1;
|
|
2458
2466
|
const $ = e;
|
|
2459
2467
|
dr.validate(_, {
|
|
2460
|
-
instancePath: t + "/" +
|
|
2468
|
+
instancePath: t + "/" + y.replace(/~/g, "~0").replace(/\//g, "~1"),
|
|
2461
2469
|
parentData: r,
|
|
2462
|
-
parentDataProperty:
|
|
2463
|
-
rootData:
|
|
2470
|
+
parentDataProperty: y,
|
|
2471
|
+
rootData: d
|
|
2464
2472
|
}) || (s = s === null ? dr.validate.errors : s.concat(dr.validate.errors), e = s.length);
|
|
2465
2473
|
var p = $ === e;
|
|
2466
2474
|
if (E = E || p, !E) {
|
|
2467
|
-
const
|
|
2475
|
+
const g = e;
|
|
2468
2476
|
if (!(_ && typeof _ == "object" && !Array.isArray(_)) && typeof _ != "string") {
|
|
2469
2477
|
const K = {
|
|
2470
|
-
instancePath: t + "/" +
|
|
2478
|
+
instancePath: t + "/" + y.replace(/~/g, "~0").replace(/\//g, "~1"),
|
|
2471
2479
|
schemaPath: "#/additionalProperties/anyOf/1/type",
|
|
2472
2480
|
keyword: "type",
|
|
2473
2481
|
params: {
|
|
@@ -2477,23 +2485,23 @@ function xe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2477
2485
|
};
|
|
2478
2486
|
s === null ? s = [K] : s.push(K), e++;
|
|
2479
2487
|
}
|
|
2480
|
-
var p =
|
|
2488
|
+
var p = g === e;
|
|
2481
2489
|
E = E || p;
|
|
2482
2490
|
}
|
|
2483
2491
|
if (E)
|
|
2484
2492
|
e = k, s !== null && (k ? s.length = k : s = null);
|
|
2485
2493
|
else {
|
|
2486
|
-
const
|
|
2487
|
-
instancePath: t + "/" +
|
|
2494
|
+
const g = {
|
|
2495
|
+
instancePath: t + "/" + y.replace(/~/g, "~0").replace(/\//g, "~1"),
|
|
2488
2496
|
schemaPath: "#/additionalProperties/anyOf",
|
|
2489
2497
|
keyword: "anyOf",
|
|
2490
2498
|
params: {},
|
|
2491
2499
|
message: "must match a schema in anyOf"
|
|
2492
2500
|
};
|
|
2493
|
-
return s === null ? s = [
|
|
2501
|
+
return s === null ? s = [g] : s.push(g), e++, xe.errors = s, !1;
|
|
2494
2502
|
}
|
|
2495
|
-
var
|
|
2496
|
-
if (!
|
|
2503
|
+
var u = h === e;
|
|
2504
|
+
if (!u)
|
|
2497
2505
|
break;
|
|
2498
2506
|
}
|
|
2499
2507
|
else
|
|
@@ -2508,23 +2516,23 @@ function xe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2508
2516
|
], !1;
|
|
2509
2517
|
return xe.errors = s, e === 0;
|
|
2510
2518
|
}
|
|
2511
|
-
function $e(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
2519
|
+
function $e(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
2512
2520
|
let s = null, e = 0;
|
|
2513
2521
|
if (e === 0)
|
|
2514
2522
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
2515
|
-
let
|
|
2516
|
-
if (r.files === void 0 && (
|
|
2523
|
+
let u;
|
|
2524
|
+
if (r.files === void 0 && (u = "files") || r.name === void 0 && (u = "name") || r.resource === void 0 && (u = "resource"))
|
|
2517
2525
|
return $e.errors = [
|
|
2518
2526
|
{
|
|
2519
2527
|
instancePath: t,
|
|
2520
2528
|
schemaPath: "#/required",
|
|
2521
2529
|
keyword: "required",
|
|
2522
|
-
params: { missingProperty:
|
|
2523
|
-
message: "must have required property '" +
|
|
2530
|
+
params: { missingProperty: u },
|
|
2531
|
+
message: "must have required property '" + u + "'"
|
|
2524
2532
|
}
|
|
2525
2533
|
], !1;
|
|
2526
2534
|
{
|
|
2527
|
-
const
|
|
2535
|
+
const y = e;
|
|
2528
2536
|
for (const _ in r)
|
|
2529
2537
|
if (!(_ === "resource" || _ === "files" || _ === "name"))
|
|
2530
2538
|
return $e.errors = [
|
|
@@ -2536,10 +2544,10 @@ function $e(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2536
2544
|
message: "must NOT have additional properties"
|
|
2537
2545
|
}
|
|
2538
2546
|
], !1;
|
|
2539
|
-
if (
|
|
2547
|
+
if (y === e) {
|
|
2540
2548
|
if (r.resource !== void 0) {
|
|
2541
2549
|
let _ = r.resource;
|
|
2542
|
-
const
|
|
2550
|
+
const h = e;
|
|
2543
2551
|
if (typeof _ != "string")
|
|
2544
2552
|
return $e.errors = [
|
|
2545
2553
|
{
|
|
@@ -2562,7 +2570,7 @@ function $e(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2562
2570
|
message: "must be equal to constant"
|
|
2563
2571
|
}
|
|
2564
2572
|
], !1;
|
|
2565
|
-
var p =
|
|
2573
|
+
var p = h === e;
|
|
2566
2574
|
} else
|
|
2567
2575
|
var p = !0;
|
|
2568
2576
|
if (p) {
|
|
@@ -2572,7 +2580,7 @@ function $e(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2572
2580
|
instancePath: t + "/files",
|
|
2573
2581
|
parentData: r,
|
|
2574
2582
|
parentDataProperty: "files",
|
|
2575
|
-
rootData:
|
|
2583
|
+
rootData: d
|
|
2576
2584
|
}) || (s = s === null ? xe.errors : s.concat(xe.errors), e = s.length);
|
|
2577
2585
|
var p = _ === e;
|
|
2578
2586
|
} else
|
|
@@ -2608,76 +2616,76 @@ function $e(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2608
2616
|
], !1;
|
|
2609
2617
|
return $e.errors = s, e === 0;
|
|
2610
2618
|
}
|
|
2611
|
-
function ce(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
2619
|
+
function ce(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
2612
2620
|
let s = null, e = 0;
|
|
2613
2621
|
const p = e;
|
|
2614
|
-
let
|
|
2615
|
-
const
|
|
2622
|
+
let u = !1;
|
|
2623
|
+
const y = e;
|
|
2616
2624
|
de(r, {
|
|
2617
2625
|
instancePath: t,
|
|
2618
2626
|
parentData: n,
|
|
2619
2627
|
parentDataProperty: f,
|
|
2620
|
-
rootData:
|
|
2628
|
+
rootData: d
|
|
2621
2629
|
}) || (s = s === null ? de.errors : s.concat(de.errors), e = s.length);
|
|
2622
|
-
var _ =
|
|
2623
|
-
if (
|
|
2624
|
-
const
|
|
2630
|
+
var _ = y === e;
|
|
2631
|
+
if (u = u || _, !u) {
|
|
2632
|
+
const h = e;
|
|
2625
2633
|
$e(r, {
|
|
2626
2634
|
instancePath: t,
|
|
2627
2635
|
parentData: n,
|
|
2628
2636
|
parentDataProperty: f,
|
|
2629
|
-
rootData:
|
|
2637
|
+
rootData: d
|
|
2630
2638
|
}) || (s = s === null ? $e.errors : s.concat($e.errors), e = s.length);
|
|
2631
|
-
var _ =
|
|
2632
|
-
|
|
2639
|
+
var _ = h === e;
|
|
2640
|
+
u = u || _;
|
|
2633
2641
|
}
|
|
2634
|
-
if (
|
|
2642
|
+
if (u)
|
|
2635
2643
|
e = p, s !== null && (p ? s.length = p : s = null);
|
|
2636
2644
|
else {
|
|
2637
|
-
const
|
|
2645
|
+
const h = {
|
|
2638
2646
|
instancePath: t,
|
|
2639
2647
|
schemaPath: "#/anyOf",
|
|
2640
2648
|
keyword: "anyOf",
|
|
2641
2649
|
params: {},
|
|
2642
2650
|
message: "must match a schema in anyOf"
|
|
2643
2651
|
};
|
|
2644
|
-
return s === null ? s = [
|
|
2652
|
+
return s === null ? s = [h] : s.push(h), e++, ce.errors = s, !1;
|
|
2645
2653
|
}
|
|
2646
2654
|
return ce.errors = s, e === 0;
|
|
2647
2655
|
}
|
|
2648
|
-
function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
2656
|
+
function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
2649
2657
|
let s = null, e = 0;
|
|
2650
2658
|
if (e === 0)
|
|
2651
2659
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
2652
|
-
let
|
|
2653
|
-
if (r.resource === void 0 && (
|
|
2660
|
+
let y;
|
|
2661
|
+
if (r.resource === void 0 && (y = "resource") || r.inner === void 0 && (y = "inner"))
|
|
2654
2662
|
return ve.errors = [
|
|
2655
2663
|
{
|
|
2656
2664
|
instancePath: t,
|
|
2657
2665
|
schemaPath: "#/required",
|
|
2658
2666
|
keyword: "required",
|
|
2659
|
-
params: { missingProperty:
|
|
2660
|
-
message: "must have required property '" +
|
|
2667
|
+
params: { missingProperty: y },
|
|
2668
|
+
message: "must have required property '" + y + "'"
|
|
2661
2669
|
}
|
|
2662
2670
|
], !1;
|
|
2663
2671
|
{
|
|
2664
2672
|
const _ = e;
|
|
2665
|
-
for (const
|
|
2666
|
-
if (!(
|
|
2673
|
+
for (const h in r)
|
|
2674
|
+
if (!(h === "resource" || h === "inner" || h === "name"))
|
|
2667
2675
|
return ve.errors = [
|
|
2668
2676
|
{
|
|
2669
2677
|
instancePath: t,
|
|
2670
2678
|
schemaPath: "#/additionalProperties",
|
|
2671
2679
|
keyword: "additionalProperties",
|
|
2672
|
-
params: { additionalProperty:
|
|
2680
|
+
params: { additionalProperty: h },
|
|
2673
2681
|
message: "must NOT have additional properties"
|
|
2674
2682
|
}
|
|
2675
2683
|
], !1;
|
|
2676
2684
|
if (_ === e) {
|
|
2677
2685
|
if (r.resource !== void 0) {
|
|
2678
|
-
let
|
|
2686
|
+
let h = r.resource;
|
|
2679
2687
|
const k = e;
|
|
2680
|
-
if (typeof
|
|
2688
|
+
if (typeof h != "string")
|
|
2681
2689
|
return ve.errors = [
|
|
2682
2690
|
{
|
|
2683
2691
|
instancePath: t + "/resource",
|
|
@@ -2687,7 +2695,7 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2687
2695
|
message: "must be string"
|
|
2688
2696
|
}
|
|
2689
2697
|
], !1;
|
|
2690
|
-
if (
|
|
2698
|
+
if (h !== "zip")
|
|
2691
2699
|
return ve.errors = [
|
|
2692
2700
|
{
|
|
2693
2701
|
instancePath: t + "/resource",
|
|
@@ -2702,29 +2710,29 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2702
2710
|
var p = !0;
|
|
2703
2711
|
if (p) {
|
|
2704
2712
|
if (r.inner !== void 0) {
|
|
2705
|
-
let
|
|
2713
|
+
let h = r.inner;
|
|
2706
2714
|
const k = e, E = e;
|
|
2707
2715
|
let $ = !1;
|
|
2708
|
-
const
|
|
2709
|
-
ur.validate(
|
|
2716
|
+
const g = e;
|
|
2717
|
+
ur.validate(h, {
|
|
2710
2718
|
instancePath: t + "/inner",
|
|
2711
2719
|
parentData: r,
|
|
2712
2720
|
parentDataProperty: "inner",
|
|
2713
|
-
rootData:
|
|
2721
|
+
rootData: d
|
|
2714
2722
|
}) || (s = s === null ? ur.validate.errors : s.concat(
|
|
2715
2723
|
ur.validate.errors
|
|
2716
2724
|
), e = s.length);
|
|
2717
|
-
var
|
|
2718
|
-
if ($ = $ ||
|
|
2725
|
+
var u = g === e;
|
|
2726
|
+
if ($ = $ || u, !$) {
|
|
2719
2727
|
const K = e;
|
|
2720
|
-
ce(
|
|
2728
|
+
ce(h, {
|
|
2721
2729
|
instancePath: t + "/inner",
|
|
2722
2730
|
parentData: r,
|
|
2723
2731
|
parentDataProperty: "inner",
|
|
2724
|
-
rootData:
|
|
2732
|
+
rootData: d
|
|
2725
2733
|
}) || (s = s === null ? ce.errors : s.concat(ce.errors), e = s.length);
|
|
2726
|
-
var
|
|
2727
|
-
$ = $ ||
|
|
2734
|
+
var u = K === e;
|
|
2735
|
+
$ = $ || u;
|
|
2728
2736
|
}
|
|
2729
2737
|
if ($)
|
|
2730
2738
|
e = E, s !== null && (E ? s.length = E : s = null);
|
|
@@ -2743,7 +2751,7 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2743
2751
|
var p = !0;
|
|
2744
2752
|
if (p)
|
|
2745
2753
|
if (r.name !== void 0) {
|
|
2746
|
-
const
|
|
2754
|
+
const h = e;
|
|
2747
2755
|
if (typeof r.name != "string")
|
|
2748
2756
|
return ve.errors = [
|
|
2749
2757
|
{
|
|
@@ -2754,7 +2762,7 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2754
2762
|
message: "must be string"
|
|
2755
2763
|
}
|
|
2756
2764
|
], !1;
|
|
2757
|
-
var p =
|
|
2765
|
+
var p = h === e;
|
|
2758
2766
|
} else
|
|
2759
2767
|
var p = !0;
|
|
2760
2768
|
}
|
|
@@ -2772,11 +2780,11 @@ function ve(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
2772
2780
|
], !1;
|
|
2773
2781
|
return ve.errors = s, e === 0;
|
|
2774
2782
|
}
|
|
2775
|
-
function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
2783
|
+
function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
2776
2784
|
let s = null, e = 0;
|
|
2777
2785
|
const p = e;
|
|
2778
|
-
let
|
|
2779
|
-
const
|
|
2786
|
+
let u = !1;
|
|
2787
|
+
const y = e;
|
|
2780
2788
|
if (e === e)
|
|
2781
2789
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
2782
2790
|
let W;
|
|
@@ -2827,10 +2835,10 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
2827
2835
|
};
|
|
2828
2836
|
s === null ? s = [w] : s.push(w), e++;
|
|
2829
2837
|
}
|
|
2830
|
-
var
|
|
2838
|
+
var h = N === e;
|
|
2831
2839
|
} else
|
|
2832
|
-
var
|
|
2833
|
-
if (
|
|
2840
|
+
var h = !0;
|
|
2841
|
+
if (h)
|
|
2834
2842
|
if (r.path !== void 0) {
|
|
2835
2843
|
const m = e;
|
|
2836
2844
|
if (typeof r.path != "string") {
|
|
@@ -2843,9 +2851,9 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
2843
2851
|
};
|
|
2844
2852
|
s === null ? s = [w] : s.push(w), e++;
|
|
2845
2853
|
}
|
|
2846
|
-
var
|
|
2854
|
+
var h = m === e;
|
|
2847
2855
|
} else
|
|
2848
|
-
var
|
|
2856
|
+
var h = !0;
|
|
2849
2857
|
}
|
|
2850
2858
|
}
|
|
2851
2859
|
} else {
|
|
@@ -2858,8 +2866,8 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
2858
2866
|
};
|
|
2859
2867
|
s === null ? s = [W] : s.push(W), e++;
|
|
2860
2868
|
}
|
|
2861
|
-
var k =
|
|
2862
|
-
if (
|
|
2869
|
+
var k = y === e;
|
|
2870
|
+
if (u = u || k, !u) {
|
|
2863
2871
|
const W = e;
|
|
2864
2872
|
if (e === e)
|
|
2865
2873
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
@@ -2965,15 +2973,15 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
2965
2973
|
s === null ? s = [I] : s.push(I), e++;
|
|
2966
2974
|
} else {
|
|
2967
2975
|
const I = e;
|
|
2968
|
-
for (const
|
|
2969
|
-
if (!(
|
|
2970
|
-
let
|
|
2976
|
+
for (const C in v)
|
|
2977
|
+
if (!(C === "BYTES_PER_ELEMENT" || C === "buffer" || C === "byteLength" || C === "byteOffset" || C === "length")) {
|
|
2978
|
+
let D = v[C];
|
|
2971
2979
|
const ee = e;
|
|
2972
|
-
if (!(typeof
|
|
2973
|
-
|
|
2980
|
+
if (!(typeof D == "number" && isFinite(
|
|
2981
|
+
D
|
|
2974
2982
|
))) {
|
|
2975
2983
|
const S = {
|
|
2976
|
-
instancePath: t + "/contents/" +
|
|
2984
|
+
instancePath: t + "/contents/" + C.replace(
|
|
2977
2985
|
/~/g,
|
|
2978
2986
|
"~0"
|
|
2979
2987
|
).replace(
|
|
@@ -2993,16 +3001,16 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
2993
3001
|
S
|
|
2994
3002
|
), e++;
|
|
2995
3003
|
}
|
|
2996
|
-
var
|
|
2997
|
-
if (!
|
|
3004
|
+
var g = ee === e;
|
|
3005
|
+
if (!g)
|
|
2998
3006
|
break;
|
|
2999
3007
|
}
|
|
3000
3008
|
if (I === e) {
|
|
3001
3009
|
if (v.BYTES_PER_ELEMENT !== void 0) {
|
|
3002
|
-
let
|
|
3003
|
-
const
|
|
3004
|
-
if (!(typeof
|
|
3005
|
-
|
|
3010
|
+
let C = v.BYTES_PER_ELEMENT;
|
|
3011
|
+
const D = e;
|
|
3012
|
+
if (!(typeof C == "number" && isFinite(
|
|
3013
|
+
C
|
|
3006
3014
|
))) {
|
|
3007
3015
|
const ee = {
|
|
3008
3016
|
instancePath: t + "/contents/BYTES_PER_ELEMENT",
|
|
@@ -3019,19 +3027,19 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3019
3027
|
ee
|
|
3020
3028
|
), e++;
|
|
3021
3029
|
}
|
|
3022
|
-
var M =
|
|
3030
|
+
var M = D === e;
|
|
3023
3031
|
} else
|
|
3024
3032
|
var M = !0;
|
|
3025
3033
|
if (M) {
|
|
3026
3034
|
if (v.buffer !== void 0) {
|
|
3027
|
-
let
|
|
3028
|
-
const
|
|
3029
|
-
if (e ===
|
|
3030
|
-
if (
|
|
3031
|
-
|
|
3035
|
+
let C = v.buffer;
|
|
3036
|
+
const D = e;
|
|
3037
|
+
if (e === D)
|
|
3038
|
+
if (C && typeof C == "object" && !Array.isArray(
|
|
3039
|
+
C
|
|
3032
3040
|
)) {
|
|
3033
3041
|
let S;
|
|
3034
|
-
if (
|
|
3042
|
+
if (C.byteLength === void 0 && (S = "byteLength")) {
|
|
3035
3043
|
const H = {
|
|
3036
3044
|
instancePath: t + "/contents/buffer",
|
|
3037
3045
|
schemaPath: "#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",
|
|
@@ -3048,7 +3056,7 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3048
3056
|
), e++;
|
|
3049
3057
|
} else {
|
|
3050
3058
|
const H = e;
|
|
3051
|
-
for (const B in
|
|
3059
|
+
for (const B in C)
|
|
3052
3060
|
if (B !== "byteLength") {
|
|
3053
3061
|
const z = {
|
|
3054
3062
|
instancePath: t + "/contents/buffer",
|
|
@@ -3066,8 +3074,8 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3066
3074
|
), e++;
|
|
3067
3075
|
break;
|
|
3068
3076
|
}
|
|
3069
|
-
if (H === e &&
|
|
3070
|
-
let B =
|
|
3077
|
+
if (H === e && C.byteLength !== void 0) {
|
|
3078
|
+
let B = C.byteLength;
|
|
3071
3079
|
if (!(typeof B == "number" && isFinite(
|
|
3072
3080
|
B
|
|
3073
3081
|
))) {
|
|
@@ -3104,15 +3112,15 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3104
3112
|
S
|
|
3105
3113
|
), e++;
|
|
3106
3114
|
}
|
|
3107
|
-
var M =
|
|
3115
|
+
var M = D === e;
|
|
3108
3116
|
} else
|
|
3109
3117
|
var M = !0;
|
|
3110
3118
|
if (M) {
|
|
3111
3119
|
if (v.byteLength !== void 0) {
|
|
3112
|
-
let
|
|
3113
|
-
const
|
|
3114
|
-
if (!(typeof
|
|
3115
|
-
|
|
3120
|
+
let C = v.byteLength;
|
|
3121
|
+
const D = e;
|
|
3122
|
+
if (!(typeof C == "number" && isFinite(
|
|
3123
|
+
C
|
|
3116
3124
|
))) {
|
|
3117
3125
|
const S = {
|
|
3118
3126
|
instancePath: t + "/contents/byteLength",
|
|
@@ -3129,15 +3137,15 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3129
3137
|
S
|
|
3130
3138
|
), e++;
|
|
3131
3139
|
}
|
|
3132
|
-
var M =
|
|
3140
|
+
var M = D === e;
|
|
3133
3141
|
} else
|
|
3134
3142
|
var M = !0;
|
|
3135
3143
|
if (M) {
|
|
3136
3144
|
if (v.byteOffset !== void 0) {
|
|
3137
|
-
let
|
|
3138
|
-
const
|
|
3139
|
-
if (!(typeof
|
|
3140
|
-
|
|
3145
|
+
let C = v.byteOffset;
|
|
3146
|
+
const D = e;
|
|
3147
|
+
if (!(typeof C == "number" && isFinite(
|
|
3148
|
+
C
|
|
3141
3149
|
))) {
|
|
3142
3150
|
const S = {
|
|
3143
3151
|
instancePath: t + "/contents/byteOffset",
|
|
@@ -3154,15 +3162,15 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3154
3162
|
S
|
|
3155
3163
|
), e++;
|
|
3156
3164
|
}
|
|
3157
|
-
var M =
|
|
3165
|
+
var M = D === e;
|
|
3158
3166
|
} else
|
|
3159
3167
|
var M = !0;
|
|
3160
3168
|
if (M)
|
|
3161
3169
|
if (v.length !== void 0) {
|
|
3162
|
-
let
|
|
3163
|
-
const
|
|
3164
|
-
if (!(typeof
|
|
3165
|
-
|
|
3170
|
+
let C = v.length;
|
|
3171
|
+
const D = e;
|
|
3172
|
+
if (!(typeof C == "number" && isFinite(
|
|
3173
|
+
C
|
|
3166
3174
|
))) {
|
|
3167
3175
|
const S = {
|
|
3168
3176
|
instancePath: t + "/contents/length",
|
|
@@ -3179,7 +3187,7 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3179
3187
|
S
|
|
3180
3188
|
), e++;
|
|
3181
3189
|
}
|
|
3182
|
-
var M =
|
|
3190
|
+
var M = D === e;
|
|
3183
3191
|
} else
|
|
3184
3192
|
var M = !0;
|
|
3185
3193
|
}
|
|
@@ -3229,7 +3237,7 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3229
3237
|
s === null ? s = [N] : s.push(N), e++;
|
|
3230
3238
|
}
|
|
3231
3239
|
var k = W === e;
|
|
3232
|
-
if (
|
|
3240
|
+
if (u = u || k, !u) {
|
|
3233
3241
|
const N = e;
|
|
3234
3242
|
if (e === e)
|
|
3235
3243
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
@@ -3315,7 +3323,7 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3315
3323
|
s === null ? s = [O] : s.push(O), e++;
|
|
3316
3324
|
}
|
|
3317
3325
|
var k = N === e;
|
|
3318
|
-
if (
|
|
3326
|
+
if (u = u || k, !u) {
|
|
3319
3327
|
const O = e;
|
|
3320
3328
|
if (e === e)
|
|
3321
3329
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
@@ -3401,7 +3409,7 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3401
3409
|
s === null ? s = [b] : s.push(b), e++;
|
|
3402
3410
|
}
|
|
3403
3411
|
var k = O === e;
|
|
3404
|
-
if (
|
|
3412
|
+
if (u = u || k, !u) {
|
|
3405
3413
|
const b = e;
|
|
3406
3414
|
if (e === e)
|
|
3407
3415
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
@@ -3419,7 +3427,7 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3419
3427
|
const F = e;
|
|
3420
3428
|
for (const I in r)
|
|
3421
3429
|
if (!(I === "resource" || I === "url" || I === "caption")) {
|
|
3422
|
-
const
|
|
3430
|
+
const C = {
|
|
3423
3431
|
instancePath: t,
|
|
3424
3432
|
schemaPath: "#/definitions/UrlReference/additionalProperties",
|
|
3425
3433
|
keyword: "additionalProperties",
|
|
@@ -3428,48 +3436,48 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3428
3436
|
},
|
|
3429
3437
|
message: "must NOT have additional properties"
|
|
3430
3438
|
};
|
|
3431
|
-
s === null ? s = [
|
|
3439
|
+
s === null ? s = [C] : s.push(C), e++;
|
|
3432
3440
|
break;
|
|
3433
3441
|
}
|
|
3434
3442
|
if (F === e) {
|
|
3435
3443
|
if (r.resource !== void 0) {
|
|
3436
3444
|
let I = r.resource;
|
|
3437
|
-
const
|
|
3445
|
+
const C = e;
|
|
3438
3446
|
if (typeof I != "string") {
|
|
3439
|
-
const
|
|
3447
|
+
const D = {
|
|
3440
3448
|
instancePath: t + "/resource",
|
|
3441
3449
|
schemaPath: "#/definitions/UrlReference/properties/resource/type",
|
|
3442
3450
|
keyword: "type",
|
|
3443
3451
|
params: { type: "string" },
|
|
3444
3452
|
message: "must be string"
|
|
3445
3453
|
};
|
|
3446
|
-
s === null ? s = [
|
|
3454
|
+
s === null ? s = [D] : s.push(D), e++;
|
|
3447
3455
|
}
|
|
3448
3456
|
if (I !== "url") {
|
|
3449
|
-
const
|
|
3457
|
+
const D = {
|
|
3450
3458
|
instancePath: t + "/resource",
|
|
3451
3459
|
schemaPath: "#/definitions/UrlReference/properties/resource/const",
|
|
3452
3460
|
keyword: "const",
|
|
3453
3461
|
params: { allowedValue: "url" },
|
|
3454
3462
|
message: "must be equal to constant"
|
|
3455
3463
|
};
|
|
3456
|
-
s === null ? s = [
|
|
3464
|
+
s === null ? s = [D] : s.push(D), e++;
|
|
3457
3465
|
}
|
|
3458
|
-
var q =
|
|
3466
|
+
var q = C === e;
|
|
3459
3467
|
} else
|
|
3460
3468
|
var q = !0;
|
|
3461
3469
|
if (q) {
|
|
3462
3470
|
if (r.url !== void 0) {
|
|
3463
3471
|
const I = e;
|
|
3464
3472
|
if (typeof r.url != "string") {
|
|
3465
|
-
const
|
|
3473
|
+
const D = {
|
|
3466
3474
|
instancePath: t + "/url",
|
|
3467
3475
|
schemaPath: "#/definitions/UrlReference/properties/url/type",
|
|
3468
3476
|
keyword: "type",
|
|
3469
3477
|
params: { type: "string" },
|
|
3470
3478
|
message: "must be string"
|
|
3471
3479
|
};
|
|
3472
|
-
s === null ? s = [
|
|
3480
|
+
s === null ? s = [D] : s.push(D), e++;
|
|
3473
3481
|
}
|
|
3474
3482
|
var q = I === e;
|
|
3475
3483
|
} else
|
|
@@ -3478,7 +3486,7 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3478
3486
|
if (r.caption !== void 0) {
|
|
3479
3487
|
const I = e;
|
|
3480
3488
|
if (typeof r.caption != "string") {
|
|
3481
|
-
const
|
|
3489
|
+
const D = {
|
|
3482
3490
|
instancePath: t + "/caption",
|
|
3483
3491
|
schemaPath: "#/definitions/UrlReference/properties/caption/type",
|
|
3484
3492
|
keyword: "type",
|
|
@@ -3487,7 +3495,7 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3487
3495
|
},
|
|
3488
3496
|
message: "must be string"
|
|
3489
3497
|
};
|
|
3490
|
-
s === null ? s = [
|
|
3498
|
+
s === null ? s = [D] : s.push(D), e++;
|
|
3491
3499
|
}
|
|
3492
3500
|
var q = I === e;
|
|
3493
3501
|
} else
|
|
@@ -3506,22 +3514,22 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3506
3514
|
s === null ? s = [U] : s.push(U), e++;
|
|
3507
3515
|
}
|
|
3508
3516
|
var k = b === e;
|
|
3509
|
-
if (
|
|
3517
|
+
if (u = u || k, !u) {
|
|
3510
3518
|
const U = e;
|
|
3511
3519
|
if (e === e)
|
|
3512
3520
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
3513
|
-
let
|
|
3514
|
-
if (r.resource === void 0 && (
|
|
3515
|
-
const
|
|
3521
|
+
let C;
|
|
3522
|
+
if (r.resource === void 0 && (C = "resource") || r.path === void 0 && (C = "path")) {
|
|
3523
|
+
const D = {
|
|
3516
3524
|
instancePath: t,
|
|
3517
3525
|
schemaPath: "#/definitions/BundledReference/required",
|
|
3518
3526
|
keyword: "required",
|
|
3519
|
-
params: { missingProperty:
|
|
3520
|
-
message: "must have required property '" +
|
|
3527
|
+
params: { missingProperty: C },
|
|
3528
|
+
message: "must have required property '" + C + "'"
|
|
3521
3529
|
};
|
|
3522
|
-
s === null ? s = [
|
|
3530
|
+
s === null ? s = [D] : s.push(D), e++;
|
|
3523
3531
|
} else {
|
|
3524
|
-
const
|
|
3532
|
+
const D = e;
|
|
3525
3533
|
for (const ee in r)
|
|
3526
3534
|
if (!(ee === "resource" || ee === "path")) {
|
|
3527
3535
|
const S = {
|
|
@@ -3536,7 +3544,7 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3536
3544
|
s === null ? s = [S] : s.push(S), e++;
|
|
3537
3545
|
break;
|
|
3538
3546
|
}
|
|
3539
|
-
if (
|
|
3547
|
+
if (D === e) {
|
|
3540
3548
|
if (r.resource !== void 0) {
|
|
3541
3549
|
let ee = r.resource;
|
|
3542
3550
|
const S = e;
|
|
@@ -3586,33 +3594,33 @@ function Z(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
3586
3594
|
}
|
|
3587
3595
|
}
|
|
3588
3596
|
} else {
|
|
3589
|
-
const
|
|
3597
|
+
const C = {
|
|
3590
3598
|
instancePath: t,
|
|
3591
3599
|
schemaPath: "#/definitions/BundledReference/type",
|
|
3592
3600
|
keyword: "type",
|
|
3593
3601
|
params: { type: "object" },
|
|
3594
3602
|
message: "must be object"
|
|
3595
3603
|
};
|
|
3596
|
-
s === null ? s = [
|
|
3604
|
+
s === null ? s = [C] : s.push(C), e++;
|
|
3597
3605
|
}
|
|
3598
3606
|
var k = U === e;
|
|
3599
|
-
if (
|
|
3600
|
-
const
|
|
3607
|
+
if (u = u || k, !u) {
|
|
3608
|
+
const C = e;
|
|
3601
3609
|
ve(r, {
|
|
3602
3610
|
instancePath: t,
|
|
3603
3611
|
parentData: n,
|
|
3604
3612
|
parentDataProperty: f,
|
|
3605
|
-
rootData:
|
|
3613
|
+
rootData: d
|
|
3606
3614
|
}) || (s = s === null ? ve.errors : s.concat(ve.errors), e = s.length);
|
|
3607
|
-
var k =
|
|
3608
|
-
|
|
3615
|
+
var k = C === e;
|
|
3616
|
+
u = u || k;
|
|
3609
3617
|
}
|
|
3610
3618
|
}
|
|
3611
3619
|
}
|
|
3612
3620
|
}
|
|
3613
3621
|
}
|
|
3614
3622
|
}
|
|
3615
|
-
if (
|
|
3623
|
+
if (u)
|
|
3616
3624
|
e = p, s !== null && (p ? s.length = p : s = null);
|
|
3617
3625
|
else {
|
|
3618
3626
|
const W = {
|
|
@@ -4350,7 +4358,7 @@ Only the username field is required for user authentication.`
|
|
|
4350
4358
|
}, Mr = {
|
|
4351
4359
|
enum: ["GET", "POST", "HEAD", "OPTIONS", "PATCH", "PUT", "DELETE"]
|
|
4352
4360
|
};
|
|
4353
|
-
function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
4361
|
+
function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
4354
4362
|
let s = null, e = 0;
|
|
4355
4363
|
if (e === 0)
|
|
4356
4364
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
@@ -4447,8 +4455,8 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
4447
4455
|
message: "must be string"
|
|
4448
4456
|
}
|
|
4449
4457
|
], !1;
|
|
4450
|
-
var
|
|
4451
|
-
if (!
|
|
4458
|
+
var u = N === e;
|
|
4459
|
+
if (!u)
|
|
4452
4460
|
break;
|
|
4453
4461
|
}
|
|
4454
4462
|
else
|
|
@@ -4480,8 +4488,8 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
4480
4488
|
};
|
|
4481
4489
|
s === null ? s = [w] : s.push(w), e++;
|
|
4482
4490
|
}
|
|
4483
|
-
var
|
|
4484
|
-
if (re = re ||
|
|
4491
|
+
var y = m === e;
|
|
4492
|
+
if (re = re || y, !re) {
|
|
4485
4493
|
const w = e;
|
|
4486
4494
|
if (e === w)
|
|
4487
4495
|
if (q && typeof q == "object" && !Array.isArray(q)) {
|
|
@@ -4553,10 +4561,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
4553
4561
|
R
|
|
4554
4562
|
), e++;
|
|
4555
4563
|
}
|
|
4556
|
-
var
|
|
4564
|
+
var h = b === e;
|
|
4557
4565
|
} else
|
|
4558
|
-
var
|
|
4559
|
-
if (
|
|
4566
|
+
var h = !0;
|
|
4567
|
+
if (h) {
|
|
4560
4568
|
if (q.buffer !== void 0) {
|
|
4561
4569
|
let P = q.buffer;
|
|
4562
4570
|
const b = e;
|
|
@@ -4638,10 +4646,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
4638
4646
|
L
|
|
4639
4647
|
), e++;
|
|
4640
4648
|
}
|
|
4641
|
-
var
|
|
4649
|
+
var h = b === e;
|
|
4642
4650
|
} else
|
|
4643
|
-
var
|
|
4644
|
-
if (
|
|
4651
|
+
var h = !0;
|
|
4652
|
+
if (h) {
|
|
4645
4653
|
if (q.byteLength !== void 0) {
|
|
4646
4654
|
let P = q.byteLength;
|
|
4647
4655
|
const b = e;
|
|
@@ -4663,10 +4671,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
4663
4671
|
L
|
|
4664
4672
|
), e++;
|
|
4665
4673
|
}
|
|
4666
|
-
var
|
|
4674
|
+
var h = b === e;
|
|
4667
4675
|
} else
|
|
4668
|
-
var
|
|
4669
|
-
if (
|
|
4676
|
+
var h = !0;
|
|
4677
|
+
if (h) {
|
|
4670
4678
|
if (q.byteOffset !== void 0) {
|
|
4671
4679
|
let P = q.byteOffset;
|
|
4672
4680
|
const b = e;
|
|
@@ -4688,10 +4696,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
4688
4696
|
L
|
|
4689
4697
|
), e++;
|
|
4690
4698
|
}
|
|
4691
|
-
var
|
|
4699
|
+
var h = b === e;
|
|
4692
4700
|
} else
|
|
4693
|
-
var
|
|
4694
|
-
if (
|
|
4701
|
+
var h = !0;
|
|
4702
|
+
if (h)
|
|
4695
4703
|
if (q.length !== void 0) {
|
|
4696
4704
|
let P = q.length;
|
|
4697
4705
|
const b = e;
|
|
@@ -4713,9 +4721,9 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
4713
4721
|
L
|
|
4714
4722
|
), e++;
|
|
4715
4723
|
}
|
|
4716
|
-
var
|
|
4724
|
+
var h = b === e;
|
|
4717
4725
|
} else
|
|
4718
|
-
var
|
|
4726
|
+
var h = !0;
|
|
4719
4727
|
}
|
|
4720
4728
|
}
|
|
4721
4729
|
}
|
|
@@ -4731,8 +4739,8 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
4731
4739
|
};
|
|
4732
4740
|
s === null ? s = [O] : s.push(O), e++;
|
|
4733
4741
|
}
|
|
4734
|
-
var
|
|
4735
|
-
if (re = re ||
|
|
4742
|
+
var y = w === e;
|
|
4743
|
+
if (re = re || y, !re) {
|
|
4736
4744
|
const O = e;
|
|
4737
4745
|
if (e === O)
|
|
4738
4746
|
if (q && typeof q == "object" && !Array.isArray(q))
|
|
@@ -4770,8 +4778,8 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
4770
4778
|
if (b && typeof b == "object" && !Array.isArray(
|
|
4771
4779
|
b
|
|
4772
4780
|
)) {
|
|
4773
|
-
let
|
|
4774
|
-
if (b.BYTES_PER_ELEMENT === void 0 && (
|
|
4781
|
+
let D;
|
|
4782
|
+
if (b.BYTES_PER_ELEMENT === void 0 && (D = "BYTES_PER_ELEMENT") || b.buffer === void 0 && (D = "buffer") || b.byteLength === void 0 && (D = "byteLength") || b.byteOffset === void 0 && (D = "byteOffset") || b.length === void 0 && (D = "length")) {
|
|
4775
4783
|
const ee = {
|
|
4776
4784
|
instancePath: t + "/body/" + P.replace(
|
|
4777
4785
|
/~/g,
|
|
@@ -4783,9 +4791,9 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
4783
4791
|
schemaPath: "#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",
|
|
4784
4792
|
keyword: "required",
|
|
4785
4793
|
params: {
|
|
4786
|
-
missingProperty:
|
|
4794
|
+
missingProperty: D
|
|
4787
4795
|
},
|
|
4788
|
-
message: "must have required property '" +
|
|
4796
|
+
message: "must have required property '" + D + "'"
|
|
4789
4797
|
};
|
|
4790
4798
|
s === null ? s = [
|
|
4791
4799
|
ee
|
|
@@ -5071,7 +5079,7 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5071
5079
|
}
|
|
5072
5080
|
}
|
|
5073
5081
|
} else {
|
|
5074
|
-
const
|
|
5082
|
+
const D = {
|
|
5075
5083
|
instancePath: t + "/body/" + P.replace(
|
|
5076
5084
|
/~/g,
|
|
5077
5085
|
"~0"
|
|
@@ -5087,15 +5095,15 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5087
5095
|
message: "must be object"
|
|
5088
5096
|
};
|
|
5089
5097
|
s === null ? s = [
|
|
5090
|
-
|
|
5098
|
+
D
|
|
5091
5099
|
] : s.push(
|
|
5092
|
-
|
|
5100
|
+
D
|
|
5093
5101
|
), e++;
|
|
5094
5102
|
}
|
|
5095
5103
|
var k = I === e;
|
|
5096
5104
|
if (U = U || k, !U) {
|
|
5097
|
-
const
|
|
5098
|
-
if (e ===
|
|
5105
|
+
const D = e;
|
|
5106
|
+
if (e === D)
|
|
5099
5107
|
if (b && typeof b == "object" && !Array.isArray(
|
|
5100
5108
|
b
|
|
5101
5109
|
)) {
|
|
@@ -5175,10 +5183,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5175
5183
|
oe
|
|
5176
5184
|
), e++;
|
|
5177
5185
|
}
|
|
5178
|
-
var
|
|
5186
|
+
var g = z === e;
|
|
5179
5187
|
} else
|
|
5180
|
-
var
|
|
5181
|
-
if (
|
|
5188
|
+
var g = !0;
|
|
5189
|
+
if (g) {
|
|
5182
5190
|
if (b.type !== void 0) {
|
|
5183
5191
|
const B = e;
|
|
5184
5192
|
if (typeof b.type != "string") {
|
|
@@ -5203,10 +5211,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5203
5211
|
oe
|
|
5204
5212
|
), e++;
|
|
5205
5213
|
}
|
|
5206
|
-
var
|
|
5214
|
+
var g = B === e;
|
|
5207
5215
|
} else
|
|
5208
|
-
var
|
|
5209
|
-
if (
|
|
5216
|
+
var g = !0;
|
|
5217
|
+
if (g) {
|
|
5210
5218
|
if (b.lastModified !== void 0) {
|
|
5211
5219
|
let B = b.lastModified;
|
|
5212
5220
|
const z = e;
|
|
@@ -5234,10 +5242,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5234
5242
|
ue
|
|
5235
5243
|
), e++;
|
|
5236
5244
|
}
|
|
5237
|
-
var
|
|
5245
|
+
var g = z === e;
|
|
5238
5246
|
} else
|
|
5239
|
-
var
|
|
5240
|
-
if (
|
|
5247
|
+
var g = !0;
|
|
5248
|
+
if (g) {
|
|
5241
5249
|
if (b.name !== void 0) {
|
|
5242
5250
|
const B = e;
|
|
5243
5251
|
if (typeof b.name != "string") {
|
|
@@ -5262,10 +5270,10 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5262
5270
|
oe
|
|
5263
5271
|
), e++;
|
|
5264
5272
|
}
|
|
5265
|
-
var
|
|
5273
|
+
var g = B === e;
|
|
5266
5274
|
} else
|
|
5267
|
-
var
|
|
5268
|
-
if (
|
|
5275
|
+
var g = !0;
|
|
5276
|
+
if (g)
|
|
5269
5277
|
if (b.webkitRelativePath !== void 0) {
|
|
5270
5278
|
const B = e;
|
|
5271
5279
|
if (typeof b.webkitRelativePath != "string") {
|
|
@@ -5290,9 +5298,9 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5290
5298
|
oe
|
|
5291
5299
|
), e++;
|
|
5292
5300
|
}
|
|
5293
|
-
var
|
|
5301
|
+
var g = B === e;
|
|
5294
5302
|
} else
|
|
5295
|
-
var
|
|
5303
|
+
var g = !0;
|
|
5296
5304
|
}
|
|
5297
5305
|
}
|
|
5298
5306
|
}
|
|
@@ -5320,7 +5328,7 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5320
5328
|
S
|
|
5321
5329
|
), e++;
|
|
5322
5330
|
}
|
|
5323
|
-
var k =
|
|
5331
|
+
var k = D === e;
|
|
5324
5332
|
U = U || k;
|
|
5325
5333
|
}
|
|
5326
5334
|
}
|
|
@@ -5362,8 +5370,8 @@ function ge(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5362
5370
|
};
|
|
5363
5371
|
s === null ? s = [P] : s.push(P), e++;
|
|
5364
5372
|
}
|
|
5365
|
-
var
|
|
5366
|
-
re = re ||
|
|
5373
|
+
var y = O === e;
|
|
5374
|
+
re = re || y;
|
|
5367
5375
|
}
|
|
5368
5376
|
}
|
|
5369
5377
|
if (re)
|
|
@@ -5461,25 +5469,25 @@ const bs = {
|
|
|
5461
5469
|
}
|
|
5462
5470
|
}
|
|
5463
5471
|
};
|
|
5464
|
-
function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
5472
|
+
function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
5465
5473
|
let s = null, e = 0;
|
|
5466
5474
|
if (e === 0)
|
|
5467
5475
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
5468
5476
|
const $ = e;
|
|
5469
|
-
for (const
|
|
5470
|
-
if (!Wr.call(bs.properties,
|
|
5477
|
+
for (const g in r)
|
|
5478
|
+
if (!Wr.call(bs.properties, g))
|
|
5471
5479
|
return pe.errors = [
|
|
5472
5480
|
{
|
|
5473
5481
|
instancePath: t,
|
|
5474
5482
|
schemaPath: "#/additionalProperties",
|
|
5475
5483
|
keyword: "additionalProperties",
|
|
5476
|
-
params: { additionalProperty:
|
|
5484
|
+
params: { additionalProperty: g },
|
|
5477
5485
|
message: "must NOT have additional properties"
|
|
5478
5486
|
}
|
|
5479
5487
|
], !1;
|
|
5480
5488
|
if ($ === e) {
|
|
5481
5489
|
if (r.relativeUri !== void 0) {
|
|
5482
|
-
const
|
|
5490
|
+
const g = e;
|
|
5483
5491
|
if (typeof r.relativeUri != "string")
|
|
5484
5492
|
return pe.errors = [
|
|
5485
5493
|
{
|
|
@@ -5490,12 +5498,12 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5490
5498
|
message: "must be string"
|
|
5491
5499
|
}
|
|
5492
5500
|
], !1;
|
|
5493
|
-
var p =
|
|
5501
|
+
var p = g === e;
|
|
5494
5502
|
} else
|
|
5495
5503
|
var p = !0;
|
|
5496
5504
|
if (p) {
|
|
5497
5505
|
if (r.scriptPath !== void 0) {
|
|
5498
|
-
const
|
|
5506
|
+
const g = e;
|
|
5499
5507
|
if (typeof r.scriptPath != "string")
|
|
5500
5508
|
return pe.errors = [
|
|
5501
5509
|
{
|
|
@@ -5506,12 +5514,12 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5506
5514
|
message: "must be string"
|
|
5507
5515
|
}
|
|
5508
5516
|
], !1;
|
|
5509
|
-
var p =
|
|
5517
|
+
var p = g === e;
|
|
5510
5518
|
} else
|
|
5511
5519
|
var p = !0;
|
|
5512
5520
|
if (p) {
|
|
5513
5521
|
if (r.protocol !== void 0) {
|
|
5514
|
-
const
|
|
5522
|
+
const g = e;
|
|
5515
5523
|
if (typeof r.protocol != "string")
|
|
5516
5524
|
return pe.errors = [
|
|
5517
5525
|
{
|
|
@@ -5522,14 +5530,14 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5522
5530
|
message: "must be string"
|
|
5523
5531
|
}
|
|
5524
5532
|
], !1;
|
|
5525
|
-
var p =
|
|
5533
|
+
var p = g === e;
|
|
5526
5534
|
} else
|
|
5527
5535
|
var p = !0;
|
|
5528
5536
|
if (p) {
|
|
5529
5537
|
if (r.method !== void 0) {
|
|
5530
|
-
let
|
|
5538
|
+
let g = r.method;
|
|
5531
5539
|
const M = e;
|
|
5532
|
-
if (typeof
|
|
5540
|
+
if (typeof g != "string")
|
|
5533
5541
|
return pe.errors = [
|
|
5534
5542
|
{
|
|
5535
5543
|
instancePath: t + "/method",
|
|
@@ -5539,7 +5547,7 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5539
5547
|
message: "must be string"
|
|
5540
5548
|
}
|
|
5541
5549
|
], !1;
|
|
5542
|
-
if (!(
|
|
5550
|
+
if (!(g === "GET" || g === "POST" || g === "HEAD" || g === "OPTIONS" || g === "PATCH" || g === "PUT" || g === "DELETE"))
|
|
5543
5551
|
return pe.errors = [
|
|
5544
5552
|
{
|
|
5545
5553
|
instancePath: t + "/method",
|
|
@@ -5556,13 +5564,13 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5556
5564
|
var p = !0;
|
|
5557
5565
|
if (p) {
|
|
5558
5566
|
if (r.headers !== void 0) {
|
|
5559
|
-
let
|
|
5567
|
+
let g = r.headers;
|
|
5560
5568
|
const M = e;
|
|
5561
5569
|
if (e === e)
|
|
5562
|
-
if (
|
|
5563
|
-
for (const q in
|
|
5570
|
+
if (g && typeof g == "object" && !Array.isArray(g))
|
|
5571
|
+
for (const q in g) {
|
|
5564
5572
|
const X = e;
|
|
5565
|
-
if (typeof
|
|
5573
|
+
if (typeof g[q] != "string")
|
|
5566
5574
|
return pe.errors = [
|
|
5567
5575
|
{
|
|
5568
5576
|
instancePath: t + "/headers/" + q.replace(
|
|
@@ -5580,8 +5588,8 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5580
5588
|
message: "must be string"
|
|
5581
5589
|
}
|
|
5582
5590
|
], !1;
|
|
5583
|
-
var
|
|
5584
|
-
if (!
|
|
5591
|
+
var u = X === e;
|
|
5592
|
+
if (!u)
|
|
5585
5593
|
break;
|
|
5586
5594
|
}
|
|
5587
5595
|
else
|
|
@@ -5599,11 +5607,11 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5599
5607
|
var p = !0;
|
|
5600
5608
|
if (p) {
|
|
5601
5609
|
if (r.body !== void 0) {
|
|
5602
|
-
let
|
|
5610
|
+
let g = r.body;
|
|
5603
5611
|
const M = e, K = e;
|
|
5604
5612
|
let Q = !1;
|
|
5605
5613
|
const q = e;
|
|
5606
|
-
if (typeof
|
|
5614
|
+
if (typeof g != "string") {
|
|
5607
5615
|
const W = {
|
|
5608
5616
|
instancePath: t + "/body",
|
|
5609
5617
|
schemaPath: "#/properties/body/anyOf/0/type",
|
|
@@ -5613,13 +5621,13 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5613
5621
|
};
|
|
5614
5622
|
s === null ? s = [W] : s.push(W), e++;
|
|
5615
5623
|
}
|
|
5616
|
-
var
|
|
5617
|
-
if (Q = Q ||
|
|
5624
|
+
var y = q === e;
|
|
5625
|
+
if (Q = Q || y, !Q) {
|
|
5618
5626
|
const W = e;
|
|
5619
5627
|
if (e === W)
|
|
5620
|
-
if (
|
|
5628
|
+
if (g && typeof g == "object" && !Array.isArray(g)) {
|
|
5621
5629
|
let m;
|
|
5622
|
-
if (
|
|
5630
|
+
if (g.BYTES_PER_ELEMENT === void 0 && (m = "BYTES_PER_ELEMENT") || g.buffer === void 0 && (m = "buffer") || g.byteLength === void 0 && (m = "byteLength") || g.byteOffset === void 0 && (m = "byteOffset") || g.length === void 0 && (m = "length")) {
|
|
5623
5631
|
const N = {
|
|
5624
5632
|
instancePath: t + "/body",
|
|
5625
5633
|
schemaPath: "#/properties/body/anyOf/1/required",
|
|
@@ -5632,9 +5640,9 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5632
5640
|
s === null ? s = [N] : s.push(N), e++;
|
|
5633
5641
|
} else {
|
|
5634
5642
|
const N = e;
|
|
5635
|
-
for (const w in
|
|
5643
|
+
for (const w in g)
|
|
5636
5644
|
if (!(w === "BYTES_PER_ELEMENT" || w === "buffer" || w === "byteLength" || w === "byteOffset" || w === "length")) {
|
|
5637
|
-
let v =
|
|
5645
|
+
let v = g[w];
|
|
5638
5646
|
const O = e;
|
|
5639
5647
|
if (!(typeof v == "number" && isFinite(
|
|
5640
5648
|
v
|
|
@@ -5665,8 +5673,8 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5665
5673
|
break;
|
|
5666
5674
|
}
|
|
5667
5675
|
if (N === e) {
|
|
5668
|
-
if (
|
|
5669
|
-
let w =
|
|
5676
|
+
if (g.BYTES_PER_ELEMENT !== void 0) {
|
|
5677
|
+
let w = g.BYTES_PER_ELEMENT;
|
|
5670
5678
|
const v = e;
|
|
5671
5679
|
if (!(typeof w == "number" && isFinite(
|
|
5672
5680
|
w
|
|
@@ -5686,12 +5694,12 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5686
5694
|
O
|
|
5687
5695
|
), e++;
|
|
5688
5696
|
}
|
|
5689
|
-
var
|
|
5697
|
+
var h = v === e;
|
|
5690
5698
|
} else
|
|
5691
|
-
var
|
|
5692
|
-
if (
|
|
5693
|
-
if (
|
|
5694
|
-
let w =
|
|
5699
|
+
var h = !0;
|
|
5700
|
+
if (h) {
|
|
5701
|
+
if (g.buffer !== void 0) {
|
|
5702
|
+
let w = g.buffer;
|
|
5695
5703
|
const v = e;
|
|
5696
5704
|
if (e === v)
|
|
5697
5705
|
if (w && typeof w == "object" && !Array.isArray(
|
|
@@ -5771,12 +5779,12 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5771
5779
|
T
|
|
5772
5780
|
), e++;
|
|
5773
5781
|
}
|
|
5774
|
-
var
|
|
5782
|
+
var h = v === e;
|
|
5775
5783
|
} else
|
|
5776
|
-
var
|
|
5777
|
-
if (
|
|
5778
|
-
if (
|
|
5779
|
-
let w =
|
|
5784
|
+
var h = !0;
|
|
5785
|
+
if (h) {
|
|
5786
|
+
if (g.byteLength !== void 0) {
|
|
5787
|
+
let w = g.byteLength;
|
|
5780
5788
|
const v = e;
|
|
5781
5789
|
if (!(typeof w == "number" && isFinite(
|
|
5782
5790
|
w
|
|
@@ -5796,12 +5804,12 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5796
5804
|
T
|
|
5797
5805
|
), e++;
|
|
5798
5806
|
}
|
|
5799
|
-
var
|
|
5807
|
+
var h = v === e;
|
|
5800
5808
|
} else
|
|
5801
|
-
var
|
|
5802
|
-
if (
|
|
5803
|
-
if (
|
|
5804
|
-
let w =
|
|
5809
|
+
var h = !0;
|
|
5810
|
+
if (h) {
|
|
5811
|
+
if (g.byteOffset !== void 0) {
|
|
5812
|
+
let w = g.byteOffset;
|
|
5805
5813
|
const v = e;
|
|
5806
5814
|
if (!(typeof w == "number" && isFinite(
|
|
5807
5815
|
w
|
|
@@ -5821,12 +5829,12 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5821
5829
|
T
|
|
5822
5830
|
), e++;
|
|
5823
5831
|
}
|
|
5824
|
-
var
|
|
5832
|
+
var h = v === e;
|
|
5825
5833
|
} else
|
|
5826
|
-
var
|
|
5827
|
-
if (
|
|
5828
|
-
if (
|
|
5829
|
-
let w =
|
|
5834
|
+
var h = !0;
|
|
5835
|
+
if (h)
|
|
5836
|
+
if (g.length !== void 0) {
|
|
5837
|
+
let w = g.length;
|
|
5830
5838
|
const v = e;
|
|
5831
5839
|
if (!(typeof w == "number" && isFinite(
|
|
5832
5840
|
w
|
|
@@ -5846,9 +5854,9 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5846
5854
|
T
|
|
5847
5855
|
), e++;
|
|
5848
5856
|
}
|
|
5849
|
-
var
|
|
5857
|
+
var h = v === e;
|
|
5850
5858
|
} else
|
|
5851
|
-
var
|
|
5859
|
+
var h = !0;
|
|
5852
5860
|
}
|
|
5853
5861
|
}
|
|
5854
5862
|
}
|
|
@@ -5866,8 +5874,8 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5866
5874
|
};
|
|
5867
5875
|
s === null ? s = [m] : s.push(m), e++;
|
|
5868
5876
|
}
|
|
5869
|
-
var
|
|
5870
|
-
Q = Q ||
|
|
5877
|
+
var y = W === e;
|
|
5878
|
+
Q = Q || y;
|
|
5871
5879
|
}
|
|
5872
5880
|
if (Q)
|
|
5873
5881
|
e = K, s !== null && (K ? s.length = K : s = null);
|
|
@@ -5886,13 +5894,13 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5886
5894
|
var p = !0;
|
|
5887
5895
|
if (p) {
|
|
5888
5896
|
if (r.env !== void 0) {
|
|
5889
|
-
let
|
|
5897
|
+
let g = r.env;
|
|
5890
5898
|
const M = e;
|
|
5891
5899
|
if (e === M)
|
|
5892
|
-
if (
|
|
5893
|
-
for (const Q in
|
|
5900
|
+
if (g && typeof g == "object" && !Array.isArray(g))
|
|
5901
|
+
for (const Q in g) {
|
|
5894
5902
|
const q = e;
|
|
5895
|
-
if (typeof
|
|
5903
|
+
if (typeof g[Q] != "string")
|
|
5896
5904
|
return pe.errors = [
|
|
5897
5905
|
{
|
|
5898
5906
|
instancePath: t + "/env/" + Q.replace(
|
|
@@ -5931,13 +5939,13 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5931
5939
|
var p = !0;
|
|
5932
5940
|
if (p) {
|
|
5933
5941
|
if (r.$_SERVER !== void 0) {
|
|
5934
|
-
let
|
|
5942
|
+
let g = r.$_SERVER;
|
|
5935
5943
|
const M = e;
|
|
5936
5944
|
if (e === M)
|
|
5937
|
-
if (
|
|
5938
|
-
for (const Q in
|
|
5945
|
+
if (g && typeof g == "object" && !Array.isArray(g))
|
|
5946
|
+
for (const Q in g) {
|
|
5939
5947
|
const q = e;
|
|
5940
|
-
if (typeof
|
|
5948
|
+
if (typeof g[Q] != "string")
|
|
5941
5949
|
return pe.errors = [
|
|
5942
5950
|
{
|
|
5943
5951
|
instancePath: t + "/$_SERVER/" + Q.replace(
|
|
@@ -5976,7 +5984,7 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5976
5984
|
var p = !0;
|
|
5977
5985
|
if (p)
|
|
5978
5986
|
if (r.code !== void 0) {
|
|
5979
|
-
const
|
|
5987
|
+
const g = e;
|
|
5980
5988
|
if (typeof r.code != "string")
|
|
5981
5989
|
return pe.errors = [
|
|
5982
5990
|
{
|
|
@@ -5989,7 +5997,7 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
5989
5997
|
message: "must be string"
|
|
5990
5998
|
}
|
|
5991
5999
|
], !1;
|
|
5992
|
-
var p =
|
|
6000
|
+
var p = g === e;
|
|
5993
6001
|
} else
|
|
5994
6002
|
var p = !0;
|
|
5995
6003
|
}
|
|
@@ -6012,7 +6020,7 @@ function pe(r, { instancePath: t = "", parentData: n, parentDataProperty: f, roo
|
|
|
6012
6020
|
], !1;
|
|
6013
6021
|
return pe.errors = s, e === 0;
|
|
6014
6022
|
}
|
|
6015
|
-
function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
6023
|
+
function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
6016
6024
|
let s = null, e = 0;
|
|
6017
6025
|
if (e === 0)
|
|
6018
6026
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
@@ -6133,10 +6141,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
6133
6141
|
message: "must be object"
|
|
6134
6142
|
}
|
|
6135
6143
|
], !1;
|
|
6136
|
-
var
|
|
6144
|
+
var u = l === e;
|
|
6137
6145
|
} else
|
|
6138
|
-
var
|
|
6139
|
-
if (
|
|
6146
|
+
var u = !0;
|
|
6147
|
+
if (u) {
|
|
6140
6148
|
if (r.step !== void 0) {
|
|
6141
6149
|
let i = r.step;
|
|
6142
6150
|
const l = e;
|
|
@@ -6164,10 +6172,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
6164
6172
|
message: "must be equal to constant"
|
|
6165
6173
|
}
|
|
6166
6174
|
], !1;
|
|
6167
|
-
var
|
|
6175
|
+
var u = l === e;
|
|
6168
6176
|
} else
|
|
6169
|
-
var
|
|
6170
|
-
if (
|
|
6177
|
+
var u = !0;
|
|
6178
|
+
if (u) {
|
|
6171
6179
|
if (r.pluginPath !== void 0) {
|
|
6172
6180
|
const i = e;
|
|
6173
6181
|
if (typeof r.pluginPath != "string")
|
|
@@ -6182,10 +6190,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
6182
6190
|
message: "must be string"
|
|
6183
6191
|
}
|
|
6184
6192
|
], !1;
|
|
6185
|
-
var
|
|
6193
|
+
var u = i === e;
|
|
6186
6194
|
} else
|
|
6187
|
-
var
|
|
6188
|
-
if (
|
|
6195
|
+
var u = !0;
|
|
6196
|
+
if (u)
|
|
6189
6197
|
if (r.pluginName !== void 0) {
|
|
6190
6198
|
const i = e;
|
|
6191
6199
|
if (typeof r.pluginName != "string")
|
|
@@ -6200,9 +6208,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
6200
6208
|
message: "must be string"
|
|
6201
6209
|
}
|
|
6202
6210
|
], !1;
|
|
6203
|
-
var
|
|
6211
|
+
var u = i === e;
|
|
6204
6212
|
} else
|
|
6205
|
-
var
|
|
6213
|
+
var u = !0;
|
|
6206
6214
|
}
|
|
6207
6215
|
}
|
|
6208
6216
|
}
|
|
@@ -6286,10 +6294,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
6286
6294
|
message: "must be number"
|
|
6287
6295
|
}
|
|
6288
6296
|
], !1;
|
|
6289
|
-
var
|
|
6297
|
+
var y = A === e;
|
|
6290
6298
|
} else
|
|
6291
|
-
var
|
|
6292
|
-
if (
|
|
6299
|
+
var y = !0;
|
|
6300
|
+
if (y)
|
|
6293
6301
|
if (i.caption !== void 0) {
|
|
6294
6302
|
const a = e;
|
|
6295
6303
|
if (typeof i.caption != "string")
|
|
@@ -6304,9 +6312,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
6304
6312
|
message: "must be string"
|
|
6305
6313
|
}
|
|
6306
6314
|
], !1;
|
|
6307
|
-
var
|
|
6315
|
+
var y = a === e;
|
|
6308
6316
|
} else
|
|
6309
|
-
var
|
|
6317
|
+
var y = !0;
|
|
6310
6318
|
}
|
|
6311
6319
|
} else
|
|
6312
6320
|
return o.errors = [
|
|
@@ -6454,10 +6462,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
6454
6462
|
message: "must be number"
|
|
6455
6463
|
}
|
|
6456
6464
|
], !1;
|
|
6457
|
-
var
|
|
6465
|
+
var h = A === e;
|
|
6458
6466
|
} else
|
|
6459
|
-
var
|
|
6460
|
-
if (
|
|
6467
|
+
var h = !0;
|
|
6468
|
+
if (h)
|
|
6461
6469
|
if (i.caption !== void 0) {
|
|
6462
6470
|
const a = e;
|
|
6463
6471
|
if (typeof i.caption != "string")
|
|
@@ -6472,9 +6480,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
6472
6480
|
message: "must be string"
|
|
6473
6481
|
}
|
|
6474
6482
|
], !1;
|
|
6475
|
-
var
|
|
6483
|
+
var h = a === e;
|
|
6476
6484
|
} else
|
|
6477
|
-
var
|
|
6485
|
+
var h = !0;
|
|
6478
6486
|
}
|
|
6479
6487
|
} else
|
|
6480
6488
|
return o.errors = [
|
|
@@ -6863,10 +6871,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
6863
6871
|
message: "must be number"
|
|
6864
6872
|
}
|
|
6865
6873
|
], !1;
|
|
6866
|
-
var
|
|
6874
|
+
var g = A === e;
|
|
6867
6875
|
} else
|
|
6868
|
-
var
|
|
6869
|
-
if (
|
|
6876
|
+
var g = !0;
|
|
6877
|
+
if (g)
|
|
6870
6878
|
if (i.caption !== void 0) {
|
|
6871
6879
|
const a = e;
|
|
6872
6880
|
if (typeof i.caption != "string")
|
|
@@ -6881,9 +6889,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
6881
6889
|
message: "must be string"
|
|
6882
6890
|
}
|
|
6883
6891
|
], !1;
|
|
6884
|
-
var
|
|
6892
|
+
var g = a === e;
|
|
6885
6893
|
} else
|
|
6886
|
-
var
|
|
6894
|
+
var g = !0;
|
|
6887
6895
|
}
|
|
6888
6896
|
} else
|
|
6889
6897
|
return o.errors = [
|
|
@@ -7274,7 +7282,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
7274
7282
|
instancePath: t + "/file",
|
|
7275
7283
|
parentData: r,
|
|
7276
7284
|
parentDataProperty: "file",
|
|
7277
|
-
rootData:
|
|
7285
|
+
rootData: d
|
|
7278
7286
|
}) || (s = s === null ? Z.errors : s.concat(
|
|
7279
7287
|
Z.errors
|
|
7280
7288
|
), e = s.length);
|
|
@@ -7640,7 +7648,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
7640
7648
|
instancePath: t + "/wordPressFilesZip",
|
|
7641
7649
|
parentData: r,
|
|
7642
7650
|
parentDataProperty: "wordPressFilesZip",
|
|
7643
|
-
rootData:
|
|
7651
|
+
rootData: d
|
|
7644
7652
|
}
|
|
7645
7653
|
) || (s = s === null ? Z.errors : s.concat(
|
|
7646
7654
|
Z.errors
|
|
@@ -7860,7 +7868,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
7860
7868
|
instancePath: t + "/pluginData",
|
|
7861
7869
|
parentData: r,
|
|
7862
7870
|
parentDataProperty: "pluginData",
|
|
7863
|
-
rootData:
|
|
7871
|
+
rootData: d
|
|
7864
7872
|
}
|
|
7865
7873
|
) || (s = s === null ? Z.errors : s.concat(
|
|
7866
7874
|
Z.errors
|
|
@@ -7874,7 +7882,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
7874
7882
|
instancePath: t + "/pluginData",
|
|
7875
7883
|
parentData: r,
|
|
7876
7884
|
parentDataProperty: "pluginData",
|
|
7877
|
-
rootData:
|
|
7885
|
+
rootData: d
|
|
7878
7886
|
}
|
|
7879
7887
|
) || (s = s === null ? ce.errors : s.concat(
|
|
7880
7888
|
ce.errors
|
|
@@ -7910,7 +7918,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
7910
7918
|
instancePath: t + "/pluginZipFile",
|
|
7911
7919
|
parentData: r,
|
|
7912
7920
|
parentDataProperty: "pluginZipFile",
|
|
7913
|
-
rootData:
|
|
7921
|
+
rootData: d
|
|
7914
7922
|
}
|
|
7915
7923
|
) || (s = s === null ? Z.errors : s.concat(
|
|
7916
7924
|
Z.errors
|
|
@@ -8188,7 +8196,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
8188
8196
|
instancePath: t + "/themeData",
|
|
8189
8197
|
parentData: r,
|
|
8190
8198
|
parentDataProperty: "themeData",
|
|
8191
|
-
rootData:
|
|
8199
|
+
rootData: d
|
|
8192
8200
|
}
|
|
8193
8201
|
) || (s = s === null ? Z.errors : s.concat(
|
|
8194
8202
|
Z.errors
|
|
@@ -8202,7 +8210,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
8202
8210
|
instancePath: t + "/themeData",
|
|
8203
8211
|
parentData: r,
|
|
8204
8212
|
parentDataProperty: "themeData",
|
|
8205
|
-
rootData:
|
|
8213
|
+
rootData: d
|
|
8206
8214
|
}
|
|
8207
8215
|
) || (s = s === null ? ce.errors : s.concat(
|
|
8208
8216
|
ce.errors
|
|
@@ -8238,7 +8246,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
8238
8246
|
instancePath: t + "/themeZipFile",
|
|
8239
8247
|
parentData: r,
|
|
8240
8248
|
parentDataProperty: "themeZipFile",
|
|
8241
|
-
rootData:
|
|
8249
|
+
rootData: d
|
|
8242
8250
|
}
|
|
8243
8251
|
) || (s = s === null ? Z.errors : s.concat(
|
|
8244
8252
|
Z.errors
|
|
@@ -8645,10 +8653,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
8645
8653
|
message: "must be object"
|
|
8646
8654
|
}
|
|
8647
8655
|
], !1;
|
|
8648
|
-
var
|
|
8656
|
+
var C = l === e;
|
|
8649
8657
|
} else
|
|
8650
|
-
var
|
|
8651
|
-
if (
|
|
8658
|
+
var C = !0;
|
|
8659
|
+
if (C) {
|
|
8652
8660
|
if (r.step !== void 0) {
|
|
8653
8661
|
let i = r.step;
|
|
8654
8662
|
const l = e;
|
|
@@ -8676,10 +8684,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
8676
8684
|
message: "must be equal to constant"
|
|
8677
8685
|
}
|
|
8678
8686
|
], !1;
|
|
8679
|
-
var
|
|
8687
|
+
var C = l === e;
|
|
8680
8688
|
} else
|
|
8681
|
-
var
|
|
8682
|
-
if (
|
|
8689
|
+
var C = !0;
|
|
8690
|
+
if (C)
|
|
8683
8691
|
if (r.path !== void 0) {
|
|
8684
8692
|
const i = e;
|
|
8685
8693
|
if (typeof r.path != "string")
|
|
@@ -8694,9 +8702,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
8694
8702
|
message: "must be string"
|
|
8695
8703
|
}
|
|
8696
8704
|
], !1;
|
|
8697
|
-
var
|
|
8705
|
+
var C = i === e;
|
|
8698
8706
|
} else
|
|
8699
|
-
var
|
|
8707
|
+
var C = !0;
|
|
8700
8708
|
}
|
|
8701
8709
|
}
|
|
8702
8710
|
}
|
|
@@ -8779,10 +8787,10 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
8779
8787
|
message: "must be number"
|
|
8780
8788
|
}
|
|
8781
8789
|
], !1;
|
|
8782
|
-
var
|
|
8790
|
+
var D = A === e;
|
|
8783
8791
|
} else
|
|
8784
|
-
var
|
|
8785
|
-
if (
|
|
8792
|
+
var D = !0;
|
|
8793
|
+
if (D)
|
|
8786
8794
|
if (i.caption !== void 0) {
|
|
8787
8795
|
const a = e;
|
|
8788
8796
|
if (typeof i.caption != "string")
|
|
@@ -8797,9 +8805,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
8797
8805
|
message: "must be string"
|
|
8798
8806
|
}
|
|
8799
8807
|
], !1;
|
|
8800
|
-
var
|
|
8808
|
+
var D = a === e;
|
|
8801
8809
|
} else
|
|
8802
|
-
var
|
|
8810
|
+
var D = !0;
|
|
8803
8811
|
}
|
|
8804
8812
|
} else
|
|
8805
8813
|
return o.errors = [
|
|
@@ -9192,7 +9200,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
9192
9200
|
instancePath: t + "/request",
|
|
9193
9201
|
parentData: r,
|
|
9194
9202
|
parentDataProperty: "request",
|
|
9195
|
-
rootData:
|
|
9203
|
+
rootData: d
|
|
9196
9204
|
}
|
|
9197
9205
|
) || (s = s === null ? ge.errors : s.concat(
|
|
9198
9206
|
ge.errors
|
|
@@ -9986,7 +9994,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
9986
9994
|
instancePath: t + "/options",
|
|
9987
9995
|
parentData: r,
|
|
9988
9996
|
parentDataProperty: "options",
|
|
9989
|
-
rootData:
|
|
9997
|
+
rootData: d
|
|
9990
9998
|
}
|
|
9991
9999
|
) || (s = s === null ? pe.errors : s.concat(
|
|
9992
10000
|
pe.errors
|
|
@@ -10375,7 +10383,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
10375
10383
|
instancePath: t + "/sql",
|
|
10376
10384
|
parentData: r,
|
|
10377
10385
|
parentDataProperty: "sql",
|
|
10378
|
-
rootData:
|
|
10386
|
+
rootData: d
|
|
10379
10387
|
}) || (s = s === null ? Z.errors : s.concat(
|
|
10380
10388
|
Z.errors
|
|
10381
10389
|
), e = s.length);
|
|
@@ -10712,7 +10720,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
10712
10720
|
instancePath: t + "/zipFile",
|
|
10713
10721
|
parentData: r,
|
|
10714
10722
|
parentDataProperty: "zipFile",
|
|
10715
|
-
rootData:
|
|
10723
|
+
rootData: d
|
|
10716
10724
|
}
|
|
10717
10725
|
) || (s = s === null ? Z.errors : s.concat(
|
|
10718
10726
|
Z.errors
|
|
@@ -11131,13 +11139,13 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
11131
11139
|
instancePath: t + "/data",
|
|
11132
11140
|
parentData: r,
|
|
11133
11141
|
parentDataProperty: "data",
|
|
11134
|
-
rootData:
|
|
11142
|
+
rootData: d
|
|
11135
11143
|
}
|
|
11136
11144
|
) || (s = s === null ? Z.errors : s.concat(
|
|
11137
11145
|
Z.errors
|
|
11138
11146
|
), e = s.length);
|
|
11139
|
-
var
|
|
11140
|
-
if (a = a ||
|
|
11147
|
+
var Ce = A === e;
|
|
11148
|
+
if (a = a || Ce, !a) {
|
|
11141
11149
|
const J = e;
|
|
11142
11150
|
if (typeof i != "string") {
|
|
11143
11151
|
const le = {
|
|
@@ -11155,8 +11163,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
11155
11163
|
le
|
|
11156
11164
|
), e++;
|
|
11157
11165
|
}
|
|
11158
|
-
var
|
|
11159
|
-
if (a = a ||
|
|
11166
|
+
var Ce = J === e;
|
|
11167
|
+
if (a = a || Ce, !a) {
|
|
11160
11168
|
const le = e;
|
|
11161
11169
|
if (e === le)
|
|
11162
11170
|
if (i && typeof i == "object" && !Array.isArray(
|
|
@@ -11263,14 +11271,14 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
11263
11271
|
), e++;
|
|
11264
11272
|
} else {
|
|
11265
11273
|
const rr = e;
|
|
11266
|
-
for (const
|
|
11267
|
-
if (
|
|
11274
|
+
for (const De in Y)
|
|
11275
|
+
if (De !== "byteLength") {
|
|
11268
11276
|
const Ue = {
|
|
11269
11277
|
instancePath: t + "/data/buffer",
|
|
11270
11278
|
schemaPath: "#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",
|
|
11271
11279
|
keyword: "additionalProperties",
|
|
11272
11280
|
params: {
|
|
11273
|
-
additionalProperty:
|
|
11281
|
+
additionalProperty: De
|
|
11274
11282
|
},
|
|
11275
11283
|
message: "must NOT have additional properties"
|
|
11276
11284
|
};
|
|
@@ -11282,9 +11290,9 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
11282
11290
|
break;
|
|
11283
11291
|
}
|
|
11284
11292
|
if (rr === e && Y.byteLength !== void 0) {
|
|
11285
|
-
let
|
|
11286
|
-
if (!(typeof
|
|
11287
|
-
|
|
11293
|
+
let De = Y.byteLength;
|
|
11294
|
+
if (!(typeof De == "number" && isFinite(
|
|
11295
|
+
De
|
|
11288
11296
|
))) {
|
|
11289
11297
|
const Ue = {
|
|
11290
11298
|
instancePath: t + "/data/buffer/byteLength",
|
|
@@ -11418,8 +11426,8 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
11418
11426
|
ne
|
|
11419
11427
|
), e++;
|
|
11420
11428
|
}
|
|
11421
|
-
var
|
|
11422
|
-
a = a ||
|
|
11429
|
+
var Ce = le === e;
|
|
11430
|
+
a = a || Ce;
|
|
11423
11431
|
}
|
|
11424
11432
|
}
|
|
11425
11433
|
if (a)
|
|
@@ -11619,7 +11627,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
11619
11627
|
instancePath: t + "/filesTree",
|
|
11620
11628
|
parentData: r,
|
|
11621
11629
|
parentDataProperty: "filesTree",
|
|
11622
|
-
rootData:
|
|
11630
|
+
rootData: d
|
|
11623
11631
|
}
|
|
11624
11632
|
) || (s = s === null ? ce.errors : s.concat(
|
|
11625
11633
|
ce.errors
|
|
@@ -12102,7 +12110,7 @@ function o(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12102
12110
|
], !1;
|
|
12103
12111
|
return o.errors = s, e === 0;
|
|
12104
12112
|
}
|
|
12105
|
-
function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
12113
|
+
function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
12106
12114
|
let s = null, e = 0;
|
|
12107
12115
|
if (e === 0)
|
|
12108
12116
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
@@ -12199,10 +12207,10 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12199
12207
|
message: "must be string"
|
|
12200
12208
|
}
|
|
12201
12209
|
], !1;
|
|
12202
|
-
var
|
|
12210
|
+
var u = T === e;
|
|
12203
12211
|
} else
|
|
12204
|
-
var
|
|
12205
|
-
if (
|
|
12212
|
+
var u = !0;
|
|
12213
|
+
if (u) {
|
|
12206
12214
|
if (m.description !== void 0) {
|
|
12207
12215
|
const T = e;
|
|
12208
12216
|
if (typeof m.description != "string")
|
|
@@ -12217,10 +12225,10 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12217
12225
|
message: "must be string"
|
|
12218
12226
|
}
|
|
12219
12227
|
], !1;
|
|
12220
|
-
var
|
|
12228
|
+
var u = T === e;
|
|
12221
12229
|
} else
|
|
12222
|
-
var
|
|
12223
|
-
if (
|
|
12230
|
+
var u = !0;
|
|
12231
|
+
if (u) {
|
|
12224
12232
|
if (m.author !== void 0) {
|
|
12225
12233
|
const T = e;
|
|
12226
12234
|
if (typeof m.author != "string")
|
|
@@ -12235,10 +12243,10 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12235
12243
|
message: "must be string"
|
|
12236
12244
|
}
|
|
12237
12245
|
], !1;
|
|
12238
|
-
var
|
|
12246
|
+
var u = T === e;
|
|
12239
12247
|
} else
|
|
12240
|
-
var
|
|
12241
|
-
if (
|
|
12248
|
+
var u = !0;
|
|
12249
|
+
if (u)
|
|
12242
12250
|
if (m.categories !== void 0) {
|
|
12243
12251
|
let T = m.categories;
|
|
12244
12252
|
const P = e;
|
|
@@ -12246,7 +12254,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12246
12254
|
if (Array.isArray(
|
|
12247
12255
|
T
|
|
12248
12256
|
)) {
|
|
12249
|
-
var
|
|
12257
|
+
var y = !0;
|
|
12250
12258
|
const R = T.length;
|
|
12251
12259
|
for (let L = 0; L < R; L++) {
|
|
12252
12260
|
const U = e;
|
|
@@ -12262,8 +12270,8 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12262
12270
|
message: "must be string"
|
|
12263
12271
|
}
|
|
12264
12272
|
], !1;
|
|
12265
|
-
var
|
|
12266
|
-
if (!
|
|
12273
|
+
var y = U === e;
|
|
12274
|
+
if (!y)
|
|
12267
12275
|
break;
|
|
12268
12276
|
}
|
|
12269
12277
|
} else
|
|
@@ -12278,9 +12286,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12278
12286
|
message: "must be array"
|
|
12279
12287
|
}
|
|
12280
12288
|
], !1;
|
|
12281
|
-
var
|
|
12289
|
+
var u = P === e;
|
|
12282
12290
|
} else
|
|
12283
|
-
var
|
|
12291
|
+
var u = !0;
|
|
12284
12292
|
}
|
|
12285
12293
|
}
|
|
12286
12294
|
}
|
|
@@ -12342,7 +12350,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12342
12350
|
instancePath: t + "/preferredVersions/php",
|
|
12343
12351
|
parentData: m,
|
|
12344
12352
|
parentDataProperty: "php",
|
|
12345
|
-
rootData:
|
|
12353
|
+
rootData: d
|
|
12346
12354
|
}) || (s = s === null ? Ie.errors : s.concat(
|
|
12347
12355
|
Ie.errors
|
|
12348
12356
|
), e = s.length);
|
|
@@ -12396,10 +12404,10 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12396
12404
|
};
|
|
12397
12405
|
return s === null ? s = [U] : s.push(U), e++, V.errors = s, !1;
|
|
12398
12406
|
}
|
|
12399
|
-
var
|
|
12407
|
+
var h = P === e;
|
|
12400
12408
|
} else
|
|
12401
|
-
var
|
|
12402
|
-
if (
|
|
12409
|
+
var h = !0;
|
|
12410
|
+
if (h)
|
|
12403
12411
|
if (m.wp !== void 0) {
|
|
12404
12412
|
const T = e;
|
|
12405
12413
|
if (typeof m.wp != "string")
|
|
@@ -12414,9 +12422,9 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12414
12422
|
message: "must be string"
|
|
12415
12423
|
}
|
|
12416
12424
|
], !1;
|
|
12417
|
-
var
|
|
12425
|
+
var h = T === e;
|
|
12418
12426
|
} else
|
|
12419
|
-
var
|
|
12427
|
+
var h = !0;
|
|
12420
12428
|
}
|
|
12421
12429
|
}
|
|
12422
12430
|
} else
|
|
@@ -12608,7 +12616,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12608
12616
|
const N = e;
|
|
12609
12617
|
if (e === N)
|
|
12610
12618
|
if (Array.isArray(m)) {
|
|
12611
|
-
var
|
|
12619
|
+
var g = !0;
|
|
12612
12620
|
const v = m.length;
|
|
12613
12621
|
for (let O = 0; O < v; O++) {
|
|
12614
12622
|
let T = m[O];
|
|
@@ -12640,7 +12648,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12640
12648
|
instancePath: t + "/plugins/" + O,
|
|
12641
12649
|
parentData: m,
|
|
12642
12650
|
parentDataProperty: O,
|
|
12643
|
-
rootData:
|
|
12651
|
+
rootData: d
|
|
12644
12652
|
}
|
|
12645
12653
|
) || (s = s === null ? Z.errors : s.concat(
|
|
12646
12654
|
Z.errors
|
|
@@ -12664,8 +12672,8 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12664
12672
|
F
|
|
12665
12673
|
), e++, V.errors = s, !1;
|
|
12666
12674
|
}
|
|
12667
|
-
var
|
|
12668
|
-
if (!
|
|
12675
|
+
var g = P === e;
|
|
12676
|
+
if (!g)
|
|
12669
12677
|
break;
|
|
12670
12678
|
}
|
|
12671
12679
|
} else
|
|
@@ -12914,7 +12922,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12914
12922
|
instancePath: t + "/steps/" + O,
|
|
12915
12923
|
parentData: m,
|
|
12916
12924
|
parentDataProperty: O,
|
|
12917
|
-
rootData:
|
|
12925
|
+
rootData: d
|
|
12918
12926
|
}
|
|
12919
12927
|
) || (s = s === null ? o.errors : s.concat(
|
|
12920
12928
|
o.errors
|
|
@@ -12923,7 +12931,7 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12923
12931
|
if (R = R || W, !R) {
|
|
12924
12932
|
const F = e;
|
|
12925
12933
|
if (typeof T != "string") {
|
|
12926
|
-
const
|
|
12934
|
+
const C = {
|
|
12927
12935
|
instancePath: t + "/steps/" + O,
|
|
12928
12936
|
schemaPath: "#/properties/steps/items/anyOf/1/type",
|
|
12929
12937
|
keyword: "type",
|
|
@@ -12933,14 +12941,14 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12933
12941
|
message: "must be string"
|
|
12934
12942
|
};
|
|
12935
12943
|
s === null ? s = [
|
|
12936
|
-
|
|
12944
|
+
C
|
|
12937
12945
|
] : s.push(
|
|
12938
|
-
|
|
12946
|
+
C
|
|
12939
12947
|
), e++;
|
|
12940
12948
|
}
|
|
12941
12949
|
var W = F === e;
|
|
12942
12950
|
if (R = R || W, !R) {
|
|
12943
|
-
const
|
|
12951
|
+
const C = e, D = {
|
|
12944
12952
|
instancePath: t + "/steps/" + O,
|
|
12945
12953
|
schemaPath: "#/properties/steps/items/anyOf/2/not",
|
|
12946
12954
|
keyword: "not",
|
|
@@ -12948,11 +12956,11 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
12948
12956
|
message: "must NOT be valid"
|
|
12949
12957
|
};
|
|
12950
12958
|
s === null ? s = [
|
|
12951
|
-
|
|
12959
|
+
D
|
|
12952
12960
|
] : s.push(
|
|
12953
|
-
|
|
12961
|
+
D
|
|
12954
12962
|
), e++;
|
|
12955
|
-
var W =
|
|
12963
|
+
var W = C === e;
|
|
12956
12964
|
if (R = R || W, !R) {
|
|
12957
12965
|
const S = e;
|
|
12958
12966
|
if (typeof T != "boolean") {
|
|
@@ -13088,13 +13096,13 @@ function V(r, { instancePath: t = "", parentData: n, parentDataProperty: f, root
|
|
|
13088
13096
|
], !1;
|
|
13089
13097
|
return V.errors = s, e === 0;
|
|
13090
13098
|
}
|
|
13091
|
-
function sr(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData:
|
|
13099
|
+
function sr(r, { instancePath: t = "", parentData: n, parentDataProperty: f, rootData: d = r } = {}) {
|
|
13092
13100
|
let s = null, e = 0;
|
|
13093
13101
|
return V(r, {
|
|
13094
13102
|
instancePath: t,
|
|
13095
13103
|
parentData: n,
|
|
13096
13104
|
parentDataProperty: f,
|
|
13097
|
-
rootData:
|
|
13105
|
+
rootData: d
|
|
13098
13106
|
}) || (s = s === null ? V.errors : s.concat(V.errors), e = s.length), sr.errors = s, e === 0;
|
|
13099
13107
|
}
|
|
13100
13108
|
const { wpCLI: ws, ...Tr } = ds, vs = {
|
|
@@ -13109,9 +13117,9 @@ class Ps extends Error {
|
|
|
13109
13117
|
}
|
|
13110
13118
|
class _s extends Error {
|
|
13111
13119
|
constructor(t) {
|
|
13112
|
-
const { stepNumber: n, step: f, cause:
|
|
13120
|
+
const { stepNumber: n, step: f, cause: d } = t, s = d instanceof Error ? d : new Error(String(d)), e = `Error when executing the blueprint step #${n}`, p = s.message ? `${e}: ${s.message}` : e;
|
|
13113
13121
|
super(p, { cause: s }), this.name = "BlueprintStepExecutionError", this.stepNumber = n, this.step = f, this.messages = (s.message || "").split(`
|
|
13114
|
-
`).map((
|
|
13122
|
+
`).map((u) => u.trim()).filter(Boolean);
|
|
13115
13123
|
}
|
|
13116
13124
|
}
|
|
13117
13125
|
async function ks(r, t = {}) {
|
|
@@ -13119,8 +13127,8 @@ async function ks(r, t = {}) {
|
|
|
13119
13127
|
...t
|
|
13120
13128
|
};
|
|
13121
13129
|
let f;
|
|
13122
|
-
return Br(r) ? (f = await Os(r), n.streamBundledFile = function(...
|
|
13123
|
-
return r.read(...
|
|
13130
|
+
return Br(r) ? (f = await Os(r), n.streamBundledFile = function(...d) {
|
|
13131
|
+
return r.read(...d);
|
|
13124
13132
|
}) : f = r, Ts(f, n);
|
|
13125
13133
|
}
|
|
13126
13134
|
function Br(r) {
|
|
@@ -13137,18 +13145,18 @@ function Ts(r, {
|
|
|
13137
13145
|
semaphore: n = new $r({ concurrency: 3 }),
|
|
13138
13146
|
onStepCompleted: f = () => {
|
|
13139
13147
|
},
|
|
13140
|
-
onBlueprintValidated:
|
|
13148
|
+
onBlueprintValidated: d = () => {
|
|
13141
13149
|
},
|
|
13142
13150
|
corsProxy: s,
|
|
13143
13151
|
streamBundledFile: e,
|
|
13144
13152
|
gitAdditionalHeadersCallback: p,
|
|
13145
|
-
additionalSteps:
|
|
13153
|
+
additionalSteps: u
|
|
13146
13154
|
} = {}) {
|
|
13147
|
-
var
|
|
13155
|
+
var g, M, K, Q, q, X, W, re, m, N;
|
|
13148
13156
|
r = structuredClone(r), r = {
|
|
13149
13157
|
...r,
|
|
13150
13158
|
steps: (r.steps || []).filter(qs).filter(As)
|
|
13151
|
-
}, r.steps = [...r.steps || [], ...
|
|
13159
|
+
}, r.steps = [...r.steps || [], ...u || []];
|
|
13152
13160
|
for (const w of r.steps)
|
|
13153
13161
|
!w || typeof w != "object" || (w.step === "importFile" ? (w.step = "importWxr", ae.warn(
|
|
13154
13162
|
'The "importFile" step is deprecated. Use "importWxr" instead.'
|
|
@@ -13180,17 +13188,17 @@ function Ts(r, {
|
|
|
13180
13188
|
step: "login",
|
|
13181
13189
|
...r.login === !0 ? { username: "admin" } : r.login
|
|
13182
13190
|
});
|
|
13183
|
-
const
|
|
13191
|
+
const y = ((g = r.steps) == null ? void 0 : g.findIndex(
|
|
13184
13192
|
(w) => typeof w == "object" && (w == null ? void 0 : w.step) && ["wp-cli", "enableMultisite"].includes(w.step)
|
|
13185
13193
|
)) ?? -1;
|
|
13186
|
-
if ((M = r == null ? void 0 : r.extraLibraries) != null && M.includes("wp-cli") ||
|
|
13194
|
+
if ((M = r == null ? void 0 : r.extraLibraries) != null && M.includes("wp-cli") || y !== -1) {
|
|
13187
13195
|
const w = {
|
|
13188
13196
|
step: "writeFile",
|
|
13189
13197
|
data: Mt,
|
|
13190
13198
|
path: br
|
|
13191
13199
|
};
|
|
13192
|
-
|
|
13193
|
-
|
|
13200
|
+
y === -1 ? (K = r.steps) == null || K.push(w) : (Q = r.steps) == null || Q.splice(
|
|
13201
|
+
y,
|
|
13194
13202
|
0,
|
|
13195
13203
|
w
|
|
13196
13204
|
);
|
|
@@ -13205,9 +13213,9 @@ function Ts(r, {
|
|
|
13205
13213
|
slug: "wordpress-importer"
|
|
13206
13214
|
}
|
|
13207
13215
|
}));
|
|
13208
|
-
const
|
|
13209
|
-
if (!
|
|
13210
|
-
const { errors: w } =
|
|
13216
|
+
const h = $s(r);
|
|
13217
|
+
if (!h.valid) {
|
|
13218
|
+
const { errors: w } = h, v = Es(r, w);
|
|
13211
13219
|
throw new Ps(
|
|
13212
13220
|
`Invalid Blueprint: The Blueprint does not conform to the schema.
|
|
13213
13221
|
|
|
@@ -13219,7 +13227,7 @@ Please review your Blueprint and fix these issues. Learn more about the Blueprin
|
|
|
13219
13227
|
w
|
|
13220
13228
|
);
|
|
13221
13229
|
}
|
|
13222
|
-
|
|
13230
|
+
d(r);
|
|
13223
13231
|
const k = r.steps || [], E = k.reduce(
|
|
13224
13232
|
(w, v) => {
|
|
13225
13233
|
var O;
|
|
@@ -13286,23 +13294,23 @@ Please review your Blueprint and fix these issues. Learn more about the Blueprin
|
|
|
13286
13294
|
function Es(r, t) {
|
|
13287
13295
|
return t.map((n, f) => {
|
|
13288
13296
|
var p;
|
|
13289
|
-
const
|
|
13297
|
+
const d = n.instancePath || "/";
|
|
13290
13298
|
let s = n.message || "validation failed", e = "";
|
|
13291
13299
|
if (s.includes("must NOT have additional properties")) {
|
|
13292
|
-
const
|
|
13293
|
-
if (
|
|
13294
|
-
s = `has unexpected property "${
|
|
13300
|
+
const u = (p = n.params) == null ? void 0 : p.additionalProperty;
|
|
13301
|
+
if (u) {
|
|
13302
|
+
s = `has unexpected property "${u}"`;
|
|
13295
13303
|
try {
|
|
13296
|
-
const
|
|
13304
|
+
const y = d.split("/").filter(Boolean);
|
|
13297
13305
|
let _ = r;
|
|
13298
|
-
for (const
|
|
13299
|
-
_ && typeof _ == "object" && (_ = _[
|
|
13306
|
+
for (const h of y)
|
|
13307
|
+
_ && typeof _ == "object" && (_ = _[h]);
|
|
13300
13308
|
if (_ && typeof _ == "object") {
|
|
13301
|
-
const
|
|
13309
|
+
const h = _[u], k = JSON.stringify(h);
|
|
13302
13310
|
e = `
|
|
13303
|
-
"${
|
|
13311
|
+
"${u}": ${k}
|
|
13304
13312
|
${"^".repeat(
|
|
13305
|
-
|
|
13313
|
+
u.length + 2
|
|
13306
13314
|
)} This property is not recognized`;
|
|
13307
13315
|
}
|
|
13308
13316
|
} catch {
|
|
@@ -13310,24 +13318,24 @@ function Es(r, t) {
|
|
|
13310
13318
|
}
|
|
13311
13319
|
} else
|
|
13312
13320
|
try {
|
|
13313
|
-
const
|
|
13314
|
-
let
|
|
13315
|
-
for (const _ of
|
|
13316
|
-
|
|
13317
|
-
if (
|
|
13318
|
-
const _ = JSON.stringify(
|
|
13321
|
+
const u = d.split("/").filter(Boolean);
|
|
13322
|
+
let y = r;
|
|
13323
|
+
for (const _ of u)
|
|
13324
|
+
y && typeof y == "object" && (y = y[_]);
|
|
13325
|
+
if (y !== void 0) {
|
|
13326
|
+
const _ = JSON.stringify(y, null, 2);
|
|
13319
13327
|
e = `
|
|
13320
13328
|
Value: ${_.length > 200 ? _.substring(0, 200) + "..." : _}`;
|
|
13321
13329
|
}
|
|
13322
13330
|
} catch {
|
|
13323
13331
|
}
|
|
13324
|
-
return `${f + 1}. At path "${
|
|
13332
|
+
return `${f + 1}. At path "${d}": ${s}${e}`;
|
|
13325
13333
|
}).join(`
|
|
13326
13334
|
|
|
13327
13335
|
`);
|
|
13328
13336
|
}
|
|
13329
13337
|
function $s(r) {
|
|
13330
|
-
var
|
|
13338
|
+
var d;
|
|
13331
13339
|
const t = sr(r);
|
|
13332
13340
|
if (t)
|
|
13333
13341
|
return { valid: t };
|
|
@@ -13336,7 +13344,7 @@ function $s(r) {
|
|
|
13336
13344
|
s.schemaPath.startsWith("#/properties/steps/items/anyOf") || n.add(s.instancePath);
|
|
13337
13345
|
return {
|
|
13338
13346
|
valid: !1,
|
|
13339
|
-
errors: ((
|
|
13347
|
+
errors: ((d = sr.errors) == null ? void 0 : d.filter(
|
|
13340
13348
|
(s) => !(s.schemaPath.startsWith(
|
|
13341
13349
|
"#/properties/steps/items/anyOf"
|
|
13342
13350
|
) && n.has(s.instancePath))
|
|
@@ -13360,49 +13368,49 @@ function Rs(r, {
|
|
|
13360
13368
|
semaphore: t,
|
|
13361
13369
|
rootProgressTracker: n,
|
|
13362
13370
|
totalProgressWeight: f,
|
|
13363
|
-
corsProxy:
|
|
13371
|
+
corsProxy: d,
|
|
13364
13372
|
streamBundledFile: s,
|
|
13365
13373
|
gitAdditionalHeadersCallback: e
|
|
13366
13374
|
}) {
|
|
13367
13375
|
var E;
|
|
13368
13376
|
const p = n.stage(
|
|
13369
13377
|
(((E = r.progress) == null ? void 0 : E.weight) || 1) / f
|
|
13370
|
-
),
|
|
13378
|
+
), u = {};
|
|
13371
13379
|
for (const $ of Object.keys(r)) {
|
|
13372
|
-
let
|
|
13373
|
-
gt(
|
|
13380
|
+
let g = r[$];
|
|
13381
|
+
gt(g) && (g = we.create(g, {
|
|
13374
13382
|
semaphore: t,
|
|
13375
|
-
corsProxy:
|
|
13383
|
+
corsProxy: d,
|
|
13376
13384
|
streamBundledFile: s,
|
|
13377
13385
|
gitAdditionalHeadersCallback: e
|
|
13378
|
-
})),
|
|
13386
|
+
})), u[$] = g;
|
|
13379
13387
|
}
|
|
13380
|
-
const
|
|
13381
|
-
var
|
|
13388
|
+
const y = async ($) => {
|
|
13389
|
+
var g;
|
|
13382
13390
|
try {
|
|
13383
13391
|
return p.fillSlowly(), await vs[r.step](
|
|
13384
13392
|
$,
|
|
13385
|
-
await Ss(
|
|
13393
|
+
await Ss(u),
|
|
13386
13394
|
{
|
|
13387
13395
|
tracker: p,
|
|
13388
|
-
initialCaption: (
|
|
13396
|
+
initialCaption: (g = r.progress) == null ? void 0 : g.caption
|
|
13389
13397
|
}
|
|
13390
13398
|
);
|
|
13391
13399
|
} finally {
|
|
13392
13400
|
p.finish();
|
|
13393
13401
|
}
|
|
13394
|
-
}, _ = Er(
|
|
13402
|
+
}, _ = Er(u), h = Er(u).filter(
|
|
13395
13403
|
($) => $.isAsync
|
|
13396
|
-
), k = 1 / (
|
|
13397
|
-
for (const $ of
|
|
13404
|
+
), k = 1 / (h.length + 1);
|
|
13405
|
+
for (const $ of h)
|
|
13398
13406
|
$.progress = p.stage(k);
|
|
13399
|
-
return { run:
|
|
13407
|
+
return { run: y, step: r, resources: _ };
|
|
13400
13408
|
}
|
|
13401
13409
|
function Er(r) {
|
|
13402
13410
|
const t = [];
|
|
13403
13411
|
for (const n in r) {
|
|
13404
13412
|
const f = r[n];
|
|
13405
|
-
f instanceof
|
|
13413
|
+
f instanceof we && t.push(f);
|
|
13406
13414
|
}
|
|
13407
13415
|
return t;
|
|
13408
13416
|
}
|
|
@@ -13410,7 +13418,7 @@ async function Ss(r) {
|
|
|
13410
13418
|
const t = {};
|
|
13411
13419
|
for (const n in r) {
|
|
13412
13420
|
const f = r[n];
|
|
13413
|
-
f instanceof
|
|
13421
|
+
f instanceof we ? t[n] = await f.resolve() : t[n] = f;
|
|
13414
13422
|
}
|
|
13415
13423
|
return t;
|
|
13416
13424
|
}
|
|
@@ -13452,7 +13460,7 @@ function Fs(r) {
|
|
|
13452
13460
|
}
|
|
13453
13461
|
}
|
|
13454
13462
|
async function Ys(r) {
|
|
13455
|
-
var _,
|
|
13463
|
+
var _, h;
|
|
13456
13464
|
const t = r.cliArgs || [];
|
|
13457
13465
|
for (const k of t)
|
|
13458
13466
|
if (k.startsWith("--site-path="))
|
|
@@ -13460,7 +13468,7 @@ async function Ys(r) {
|
|
|
13460
13468
|
"The --site-path CLI argument must not be provided. In Playground, it is always set to /wordpress."
|
|
13461
13469
|
);
|
|
13462
13470
|
t.push("--site-path=/wordpress"), t.find((k) => k.startsWith("--db-engine=")) || t.push("--db-engine=sqlite");
|
|
13463
|
-
const f = r.php,
|
|
13471
|
+
const f = r.php, d = (r == null ? void 0 : r.onMessage) || (() => {
|
|
13464
13472
|
}), s = await Ls();
|
|
13465
13473
|
f.writeFile(
|
|
13466
13474
|
"/tmp/blueprints.phar",
|
|
@@ -13481,12 +13489,12 @@ async function Ys(r) {
|
|
|
13481
13489
|
p = e.reference;
|
|
13482
13490
|
break;
|
|
13483
13491
|
}
|
|
13484
|
-
const
|
|
13492
|
+
const u = await f.onMessage(async (k) => {
|
|
13485
13493
|
try {
|
|
13486
13494
|
const E = typeof k == "string" ? JSON.parse(k) : k;
|
|
13487
13495
|
if (!E)
|
|
13488
13496
|
return;
|
|
13489
|
-
await new Promise(($) => setTimeout($, 0)), E.type.startsWith("blueprint.") && await
|
|
13497
|
+
await new Promise(($) => setTimeout($, 0)), E.type.startsWith("blueprint.") && await d(E);
|
|
13490
13498
|
} catch (E) {
|
|
13491
13499
|
ae.warn("Failed to parse message as JSON:", k, E);
|
|
13492
13500
|
}
|
|
@@ -13512,7 +13520,7 @@ playground_add_filter('blueprint.target_resolved', 'playground_on_blueprint_targ
|
|
|
13512
13520
|
|
|
13513
13521
|
playground_add_filter('blueprint.resolved', 'playground_on_blueprint_resolved');
|
|
13514
13522
|
function playground_on_blueprint_resolved($blueprint) {
|
|
13515
|
-
$additional_blueprint_steps = json_decode(${
|
|
13523
|
+
$additional_blueprint_steps = json_decode(${be(
|
|
13516
13524
|
JSON.stringify(((_ = r.blueprintOverrides) == null ? void 0 : _.additionalSteps) || [])
|
|
13517
13525
|
)}, true);
|
|
13518
13526
|
if(count($additional_blueprint_steps) > 0) {
|
|
@@ -13522,8 +13530,8 @@ function playground_on_blueprint_resolved($blueprint) {
|
|
|
13522
13530
|
);
|
|
13523
13531
|
}
|
|
13524
13532
|
|
|
13525
|
-
$wp_version_override = json_decode(${
|
|
13526
|
-
JSON.stringify(((
|
|
13533
|
+
$wp_version_override = json_decode(${be(
|
|
13534
|
+
JSON.stringify(((h = r.blueprintOverrides) == null ? void 0 : h.wordpressVersion) || null)
|
|
13527
13535
|
)}, true);
|
|
13528
13536
|
if($wp_version_override) {
|
|
13529
13537
|
$blueprint['wordpressVersion'] = $wp_version_override;
|
|
@@ -13580,14 +13588,14 @@ playground_add_filter('blueprint.progress_reporter', 'playground_progress_report
|
|
|
13580
13588
|
require( "/tmp/blueprints.phar" );
|
|
13581
13589
|
`
|
|
13582
13590
|
));
|
|
13583
|
-
const
|
|
13591
|
+
const y = await f.cli([
|
|
13584
13592
|
"/internal/shared/bin/php",
|
|
13585
13593
|
"/tmp/run-blueprints.php",
|
|
13586
13594
|
"exec",
|
|
13587
13595
|
p,
|
|
13588
13596
|
...t
|
|
13589
13597
|
]);
|
|
13590
|
-
return
|
|
13598
|
+
return y.finished.finally(u), y;
|
|
13591
13599
|
}
|
|
13592
13600
|
class Ns extends Error {
|
|
13593
13601
|
constructor(t, n, f) {
|
|
@@ -13681,13 +13689,13 @@ export {
|
|
|
13681
13689
|
ks as compileBlueprint,
|
|
13682
13690
|
ks as compileBlueprintV1,
|
|
13683
13691
|
Vt as cp,
|
|
13684
|
-
|
|
13692
|
+
Cr as defineSiteUrl,
|
|
13685
13693
|
gr as defineWpConfigConsts,
|
|
13686
13694
|
zt as enableMultisite,
|
|
13687
13695
|
rs as exportWXR,
|
|
13688
13696
|
Os as getBlueprintDeclaration,
|
|
13689
13697
|
Ls as getV2Runner,
|
|
13690
|
-
|
|
13698
|
+
Dr as importThemeStarterContent,
|
|
13691
13699
|
Kt as importWordPressFiles,
|
|
13692
13700
|
Gt as importWxr,
|
|
13693
13701
|
ts as installPlugin,
|
|
@@ -13708,7 +13716,7 @@ export {
|
|
|
13708
13716
|
Ys as runBlueprintV2,
|
|
13709
13717
|
Nt as runPHP,
|
|
13710
13718
|
xt as runPHPWithOptions,
|
|
13711
|
-
|
|
13719
|
+
Dt as runSql,
|
|
13712
13720
|
as as runWpInstallationWizard,
|
|
13713
13721
|
Js as setPluginProxyURL,
|
|
13714
13722
|
us as setSiteLanguage,
|