@squiz/render-runtime-lib 1.2.1-alpha.96 → 1.2.1-alpha.99
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/lib/component-runner/index.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2337 -1251
- package/lib/index.js.map +4 -4
- package/lib/migrations/20220704054051_initial.sql +6 -8
- package/lib/migrations/20220817113300_removing_null_props_from_jsonb.sql +41 -0
- package/lib/test/helpers/stack.d.ts +1 -1
- package/lib/webserver/app.d.ts +1 -1
- package/lib/webserver/index.d.ts +1 -1
- package/lib/worker/worker-root.js +200 -73
- package/lib/worker/worker-root.js.map +2 -2
- package/package.json +13 -13
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
-- CreateTable
|
|
2
2
|
|
|
3
|
-
CREATE TABLE "component" (
|
|
4
|
-
CONSTRAINT "component_pkey" PRIMARY KEY ("name"));
|
|
3
|
+
CREATE TABLE "component" ("name" VARCHAR(128) NOT NULL,
|
|
4
|
+
CONSTRAINT "component_pkey" PRIMARY KEY ("name"));
|
|
5
5
|
|
|
6
6
|
-- CreateTable
|
|
7
7
|
|
|
8
|
-
CREATE TABLE "component_version" (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"version")
|
|
13
|
-
);
|
|
8
|
+
CREATE TABLE "component_version" ("component_name" VARCHAR(128) NOT NULL,
|
|
9
|
+
"version" VARCHAR(128) NOT NULL,
|
|
10
|
+
CONSTRAINT "component_version_pkey" PRIMARY KEY ("component_name",
|
|
11
|
+
"version"));
|
|
14
12
|
|
|
15
13
|
-- AddForeignKey
|
|
16
14
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
UPDATE component_set as rc
|
|
2
|
+
set env_vars = (
|
|
3
|
+
|
|
4
|
+
-- subtract non string properties, resulting object is all keys have values
|
|
5
|
+
select COALESCE((o2.env_vars - od.nonStringProps), '{}'::jsonb) as stringProps
|
|
6
|
+
from component_set as o2 , (
|
|
7
|
+
|
|
8
|
+
-- select get an array of all properties whos value is not a string, as an array
|
|
9
|
+
select web_path, array(
|
|
10
|
+
select envK
|
|
11
|
+
from component_set, jsonb_object_keys(env_vars) as envK
|
|
12
|
+
where jsonb_typeof(component_set.env_vars->envk) <> 'string' and o.web_path = component_set.web_path
|
|
13
|
+
) as nonStringProps
|
|
14
|
+
from component_set as o
|
|
15
|
+
) as od
|
|
16
|
+
|
|
17
|
+
-- make sure all the web_paths are the same
|
|
18
|
+
where o2.web_path = od.web_path and rc.web_path = o2.web_path
|
|
19
|
+
),
|
|
20
|
+
headers = (
|
|
21
|
+
-- subtract non string properties resulting object is all keys have values
|
|
22
|
+
select COALESCE((o2.headers - od.nonStringProps), '{}'::jsonb) as stringProps
|
|
23
|
+
from component_set as o2 , (
|
|
24
|
+
|
|
25
|
+
-- select get an array of all properties whos value is not a string, as an array
|
|
26
|
+
select web_path, array(
|
|
27
|
+
select headerK
|
|
28
|
+
from component_set, jsonb_object_keys(headers) as headerK
|
|
29
|
+
where jsonb_typeof(component_set.headers->headerK) <> 'string' and o.web_path = component_set.web_path
|
|
30
|
+
) as nonStringProps
|
|
31
|
+
from component_set as o
|
|
32
|
+
) as od
|
|
33
|
+
|
|
34
|
+
-- make sure all the web_paths are the same
|
|
35
|
+
where o2.web_path = od.web_path and rc.web_path = o2.web_path
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
-- make columns not nullable
|
|
39
|
+
ALTER TABLE component_set ALTER COLUMN env_vars SET NOT NULL;
|
|
40
|
+
ALTER TABLE component_set ALTER COLUMN headers SET NOT NULL;
|
|
41
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import supertest from 'supertest';
|
|
2
2
|
import { type RenderRuntimeConfig } from '../../';
|
|
3
|
-
import { Logger } from '@squiz/
|
|
3
|
+
import { Logger } from '@squiz/dx-logger-lib';
|
|
4
4
|
export declare const testLogger: Logger;
|
|
5
5
|
export declare function getTestConfig(port: number): RenderRuntimeConfig;
|
|
6
6
|
export declare function getTestServer(): supertest.SuperTest<supertest.Test>;
|
package/lib/webserver/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type Express } from 'express';
|
|
2
|
-
import { Logger } from '@squiz/
|
|
2
|
+
import { Logger } from '@squiz/dx-logger-lib';
|
|
3
3
|
import { ComponentConnectionManager } from '@squiz/component-db-lib';
|
|
4
4
|
export declare function setupApp(logger: Logger, db?: ComponentConnectionManager): Express;
|
package/lib/webserver/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { type Server } from 'http';
|
|
3
|
-
import { Logger } from '@squiz/
|
|
3
|
+
import { Logger } from '@squiz/dx-logger-lib';
|
|
4
4
|
import { ComponentConnectionManager } from '@squiz/component-db-lib';
|
|
5
5
|
export interface WebserverConfig {
|
|
6
6
|
port?: number;
|
|
@@ -16,7 +16,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
+
mod
|
|
22
|
+
));
|
|
20
23
|
|
|
21
24
|
// node_modules/vm2/lib/bridge.js
|
|
22
25
|
var require_bridge = __commonJS({
|
|
@@ -1973,7 +1976,10 @@ var require_acorn = __commonJS({
|
|
|
1973
1976
|
var isForIn = this.type === types$1._in;
|
|
1974
1977
|
this.next();
|
|
1975
1978
|
if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
|
|
1976
|
-
this.raise(
|
|
1979
|
+
this.raise(
|
|
1980
|
+
init.start,
|
|
1981
|
+
(isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
|
|
1982
|
+
);
|
|
1977
1983
|
}
|
|
1978
1984
|
node.left = init;
|
|
1979
1985
|
node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign();
|
|
@@ -2407,7 +2413,11 @@ var require_acorn = __commonJS({
|
|
|
2407
2413
|
var node = this.startNode();
|
|
2408
2414
|
node.local = this.parseModuleExportName();
|
|
2409
2415
|
node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
|
|
2410
|
-
this.checkExport(
|
|
2416
|
+
this.checkExport(
|
|
2417
|
+
exports3,
|
|
2418
|
+
node.exported,
|
|
2419
|
+
node.exported.start
|
|
2420
|
+
);
|
|
2411
2421
|
nodes.push(this.finishNode(node, "ExportSpecifier"));
|
|
2412
2422
|
}
|
|
2413
2423
|
return nodes;
|
|
@@ -4923,7 +4933,14 @@ var require_acorn = __commonJS({
|
|
|
4923
4933
|
}
|
|
4924
4934
|
}
|
|
4925
4935
|
if (this.options.onComment) {
|
|
4926
|
-
this.options.onComment(
|
|
4936
|
+
this.options.onComment(
|
|
4937
|
+
true,
|
|
4938
|
+
this.input.slice(start + 2, end),
|
|
4939
|
+
start,
|
|
4940
|
+
this.pos,
|
|
4941
|
+
startLoc,
|
|
4942
|
+
this.curPosition()
|
|
4943
|
+
);
|
|
4927
4944
|
}
|
|
4928
4945
|
};
|
|
4929
4946
|
pp.skipLineComment = function(startSkip) {
|
|
@@ -4934,7 +4951,14 @@ var require_acorn = __commonJS({
|
|
|
4934
4951
|
ch = this.input.charCodeAt(++this.pos);
|
|
4935
4952
|
}
|
|
4936
4953
|
if (this.options.onComment) {
|
|
4937
|
-
this.options.onComment(
|
|
4954
|
+
this.options.onComment(
|
|
4955
|
+
false,
|
|
4956
|
+
this.input.slice(start + startSkip, this.pos),
|
|
4957
|
+
start,
|
|
4958
|
+
this.pos,
|
|
4959
|
+
startLoc,
|
|
4960
|
+
this.curPosition()
|
|
4961
|
+
);
|
|
4938
4962
|
}
|
|
4939
4963
|
};
|
|
4940
4964
|
pp.skipSpace = function() {
|
|
@@ -5549,11 +5573,17 @@ var require_acorn = __commonJS({
|
|
|
5549
5573
|
case 56:
|
|
5550
5574
|
case 57:
|
|
5551
5575
|
if (this.strict) {
|
|
5552
|
-
this.invalidStringToken(
|
|
5576
|
+
this.invalidStringToken(
|
|
5577
|
+
this.pos - 1,
|
|
5578
|
+
"Invalid escape sequence"
|
|
5579
|
+
);
|
|
5553
5580
|
}
|
|
5554
5581
|
if (inTemplate) {
|
|
5555
5582
|
var codePos = this.pos - 1;
|
|
5556
|
-
this.invalidStringToken(
|
|
5583
|
+
this.invalidStringToken(
|
|
5584
|
+
codePos,
|
|
5585
|
+
"Invalid escape sequence in template string"
|
|
5586
|
+
);
|
|
5557
5587
|
return null;
|
|
5558
5588
|
}
|
|
5559
5589
|
default:
|
|
@@ -5567,7 +5597,10 @@ var require_acorn = __commonJS({
|
|
|
5567
5597
|
this.pos += octalStr.length - 1;
|
|
5568
5598
|
ch = this.input.charCodeAt(this.pos);
|
|
5569
5599
|
if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) {
|
|
5570
|
-
this.invalidStringToken(
|
|
5600
|
+
this.invalidStringToken(
|
|
5601
|
+
this.pos - 1 - octalStr.length,
|
|
5602
|
+
inTemplate ? "Octal literal in template string" : "Octal literal in strict mode"
|
|
5603
|
+
);
|
|
5571
5604
|
}
|
|
5572
5605
|
return String.fromCharCode(octal);
|
|
5573
5606
|
}
|
|
@@ -6621,10 +6654,16 @@ var require_vm = __commonJS({
|
|
|
6621
6654
|
cacheTimeoutContext.fn = null;
|
|
6622
6655
|
}
|
|
6623
6656
|
}
|
|
6624
|
-
var bridgeScript = compileScript(
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
})`
|
|
6657
|
+
var bridgeScript = compileScript(
|
|
6658
|
+
`${__dirname}/bridge.js`,
|
|
6659
|
+
`(function(global) {"use strict"; const exports = {};${fs.readFileSync(`${__dirname}/bridge.js`, "utf8")}
|
|
6660
|
+
return exports;})`
|
|
6661
|
+
);
|
|
6662
|
+
var setupSandboxScript = compileScript(
|
|
6663
|
+
`${__dirname}/setup-sandbox.js`,
|
|
6664
|
+
`(function(global, host, bridge, data, context) { ${fs.readFileSync(`${__dirname}/setup-sandbox.js`, "utf8")}
|
|
6665
|
+
})`
|
|
6666
|
+
);
|
|
6628
6667
|
var getGlobalScript = compileScript("get_global.js", "this");
|
|
6629
6668
|
var getGeneratorFunctionScript = null;
|
|
6630
6669
|
var getAsyncFunctionScript = null;
|
|
@@ -7859,8 +7898,11 @@ var require_nodevm = __commonJS({
|
|
|
7859
7898
|
const resolver = resolverFromOptions(this, requireOpts, nesting && NESTING_OVERRIDE, this._compiler);
|
|
7860
7899
|
objectDefineProperty(this, "_resolver", { __proto__: null, value: resolver });
|
|
7861
7900
|
if (!cacheSandboxScript) {
|
|
7862
|
-
cacheSandboxScript = compileScript(
|
|
7863
|
-
}
|
|
7901
|
+
cacheSandboxScript = compileScript(
|
|
7902
|
+
`${__dirname}/setup-node-sandbox.js`,
|
|
7903
|
+
`(function (host, data) { ${fs.readFileSync(`${__dirname}/setup-node-sandbox.js`, "utf8")}
|
|
7904
|
+
})`
|
|
7905
|
+
);
|
|
7864
7906
|
}
|
|
7865
7907
|
const closure = this._runScript(cacheSandboxScript);
|
|
7866
7908
|
const extensions = {
|
|
@@ -13822,10 +13864,14 @@ var require_dependencies = __commonJS({
|
|
|
13822
13864
|
for (const prop in schemaDeps) {
|
|
13823
13865
|
if ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop]))
|
|
13824
13866
|
continue;
|
|
13825
|
-
gen.if(
|
|
13826
|
-
|
|
13827
|
-
|
|
13828
|
-
|
|
13867
|
+
gen.if(
|
|
13868
|
+
(0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties),
|
|
13869
|
+
() => {
|
|
13870
|
+
const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid);
|
|
13871
|
+
cxt.mergeValidEvaluated(schCxt, valid);
|
|
13872
|
+
},
|
|
13873
|
+
() => gen.var(valid, true)
|
|
13874
|
+
);
|
|
13829
13875
|
cxt.ok(valid);
|
|
13830
13876
|
}
|
|
13831
13877
|
}
|
|
@@ -15356,20 +15402,26 @@ var require_api = __commonJS({
|
|
|
15356
15402
|
} else if (escapeChar === "u") {
|
|
15357
15403
|
const hexCode = value.slice(escapeIndex + 2, escapeIndex + 6);
|
|
15358
15404
|
if (hexCode.length < 4 || /[^0-9a-f]/i.test(hexCode)) {
|
|
15359
|
-
throw new ErrorWithLocation(
|
|
15360
|
-
|
|
15361
|
-
|
|
15362
|
-
|
|
15363
|
-
|
|
15405
|
+
throw new ErrorWithLocation(
|
|
15406
|
+
`Invalid unicode escape \\u${hexCode}.`,
|
|
15407
|
+
{
|
|
15408
|
+
line: token.loc.start.line,
|
|
15409
|
+
column: token.loc.start.column + escapeIndex,
|
|
15410
|
+
offset: token.loc.start.offset + escapeIndex
|
|
15411
|
+
}
|
|
15412
|
+
);
|
|
15364
15413
|
}
|
|
15365
15414
|
result += String.fromCharCode(parseInt(hexCode, 16));
|
|
15366
15415
|
lastIndex = escapeIndex + 6;
|
|
15367
15416
|
} else {
|
|
15368
|
-
throw new ErrorWithLocation(
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15417
|
+
throw new ErrorWithLocation(
|
|
15418
|
+
`Invalid escape \\${escapeChar}.`,
|
|
15419
|
+
{
|
|
15420
|
+
line: token.loc.start.line,
|
|
15421
|
+
column: token.loc.start.column + escapeIndex,
|
|
15422
|
+
offset: token.loc.start.offset + escapeIndex
|
|
15423
|
+
}
|
|
15424
|
+
);
|
|
15373
15425
|
}
|
|
15374
15426
|
escapeIndex = value.indexOf("\\", lastIndex);
|
|
15375
15427
|
}
|
|
@@ -17237,7 +17289,10 @@ var require_source = __commonJS({
|
|
|
17237
17289
|
const arguments_ = strings.slice(1);
|
|
17238
17290
|
const parts = [firstString.raw[0]];
|
|
17239
17291
|
for (let i = 1; i < firstString.length; i++) {
|
|
17240
|
-
parts.push(
|
|
17292
|
+
parts.push(
|
|
17293
|
+
String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
|
|
17294
|
+
String(firstString.raw[i])
|
|
17295
|
+
);
|
|
17241
17296
|
}
|
|
17242
17297
|
if (template === void 0) {
|
|
17243
17298
|
template = require_templates();
|
|
@@ -20270,7 +20325,11 @@ var require_universalify = __commonJS({
|
|
|
20270
20325
|
fn.apply(this, args);
|
|
20271
20326
|
else {
|
|
20272
20327
|
return new Promise((resolve, reject) => {
|
|
20273
|
-
fn.call(
|
|
20328
|
+
fn.call(
|
|
20329
|
+
this,
|
|
20330
|
+
...args,
|
|
20331
|
+
(err, res) => err != null ? reject(err) : resolve(res)
|
|
20332
|
+
);
|
|
20274
20333
|
});
|
|
20275
20334
|
}
|
|
20276
20335
|
}, "name", { value: fn.name });
|
|
@@ -20420,19 +20479,24 @@ var require_polyfills = __commonJS({
|
|
|
20420
20479
|
}(fs.readSync);
|
|
20421
20480
|
function patchLchmod(fs2) {
|
|
20422
20481
|
fs2.lchmod = function(path, mode, callback) {
|
|
20423
|
-
fs2.open(
|
|
20424
|
-
|
|
20425
|
-
|
|
20426
|
-
|
|
20427
|
-
|
|
20428
|
-
|
|
20429
|
-
fs2.fchmod(fd, mode, function(err2) {
|
|
20430
|
-
fs2.close(fd, function(err22) {
|
|
20482
|
+
fs2.open(
|
|
20483
|
+
path,
|
|
20484
|
+
constants.O_WRONLY | constants.O_SYMLINK,
|
|
20485
|
+
mode,
|
|
20486
|
+
function(err, fd) {
|
|
20487
|
+
if (err) {
|
|
20431
20488
|
if (callback)
|
|
20432
|
-
callback(
|
|
20489
|
+
callback(err);
|
|
20490
|
+
return;
|
|
20491
|
+
}
|
|
20492
|
+
fs2.fchmod(fd, mode, function(err2) {
|
|
20493
|
+
fs2.close(fd, function(err22) {
|
|
20494
|
+
if (callback)
|
|
20495
|
+
callback(err2 || err22);
|
|
20496
|
+
});
|
|
20433
20497
|
});
|
|
20434
|
-
}
|
|
20435
|
-
|
|
20498
|
+
}
|
|
20499
|
+
);
|
|
20436
20500
|
};
|
|
20437
20501
|
fs2.lchmodSync = function(path, mode) {
|
|
20438
20502
|
var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
@@ -20883,9 +20947,19 @@ var require_graceful_fs = __commonJS({
|
|
|
20883
20947
|
if (typeof options === "function")
|
|
20884
20948
|
cb = options, options = null;
|
|
20885
20949
|
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path2, options2, cb2, startTime) {
|
|
20886
|
-
return fs$readdir(path2, fs$readdirCallback(
|
|
20950
|
+
return fs$readdir(path2, fs$readdirCallback(
|
|
20951
|
+
path2,
|
|
20952
|
+
options2,
|
|
20953
|
+
cb2,
|
|
20954
|
+
startTime
|
|
20955
|
+
));
|
|
20887
20956
|
} : function go$readdir2(path2, options2, cb2, startTime) {
|
|
20888
|
-
return fs$readdir(path2, options2, fs$readdirCallback(
|
|
20957
|
+
return fs$readdir(path2, options2, fs$readdirCallback(
|
|
20958
|
+
path2,
|
|
20959
|
+
options2,
|
|
20960
|
+
cb2,
|
|
20961
|
+
startTime
|
|
20962
|
+
));
|
|
20889
20963
|
};
|
|
20890
20964
|
return go$readdir(path, options, cb);
|
|
20891
20965
|
function fs$readdirCallback(path2, options2, cb2, startTime) {
|
|
@@ -21177,7 +21251,11 @@ var require_fs = __commonJS({
|
|
|
21177
21251
|
if (typeof fs.realpath.native === "function") {
|
|
21178
21252
|
exports.realpath.native = u(fs.realpath.native);
|
|
21179
21253
|
} else {
|
|
21180
|
-
process.emitWarning(
|
|
21254
|
+
process.emitWarning(
|
|
21255
|
+
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
21256
|
+
"Warning",
|
|
21257
|
+
"fs-extra-WARN0003"
|
|
21258
|
+
);
|
|
21181
21259
|
}
|
|
21182
21260
|
}
|
|
21183
21261
|
});
|
|
@@ -21453,7 +21531,11 @@ var require_copy = __commonJS({
|
|
|
21453
21531
|
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
21454
21532
|
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
21455
21533
|
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
21456
|
-
process.emitWarning(
|
|
21534
|
+
process.emitWarning(
|
|
21535
|
+
"Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
|
|
21536
|
+
"Warning",
|
|
21537
|
+
"fs-extra-WARN0001"
|
|
21538
|
+
);
|
|
21457
21539
|
}
|
|
21458
21540
|
stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
|
|
21459
21541
|
if (err)
|
|
@@ -21672,7 +21754,11 @@ var require_copy_sync = __commonJS({
|
|
|
21672
21754
|
opts.clobber = "clobber" in opts ? !!opts.clobber : true;
|
|
21673
21755
|
opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
|
|
21674
21756
|
if (opts.preserveTimestamps && process.arch === "ia32") {
|
|
21675
|
-
process.emitWarning(
|
|
21757
|
+
process.emitWarning(
|
|
21758
|
+
"Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269",
|
|
21759
|
+
"Warning",
|
|
21760
|
+
"fs-extra-WARN0002"
|
|
21761
|
+
);
|
|
21676
21762
|
}
|
|
21677
21763
|
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
21678
21764
|
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
@@ -23310,6 +23396,12 @@ var require_errorMiddleware = __commonJS({
|
|
|
23310
23396
|
err: error.error,
|
|
23311
23397
|
message
|
|
23312
23398
|
});
|
|
23399
|
+
} else if ((error === null || error === void 0 ? void 0 : error.name) === "ValidateError") {
|
|
23400
|
+
req.log.error(`Caught validation error for ${req.path}:`, error.fields);
|
|
23401
|
+
return res.status(error.status).json({
|
|
23402
|
+
message: "Validation failed",
|
|
23403
|
+
details: error === null || error === void 0 ? void 0 : error.fields
|
|
23404
|
+
});
|
|
23313
23405
|
} else if (error instanceof Error) {
|
|
23314
23406
|
req.log.error({ error, message });
|
|
23315
23407
|
} else {
|
|
@@ -23714,7 +23806,10 @@ var require_minimatch = __commonJS({
|
|
|
23714
23806
|
}
|
|
23715
23807
|
matchOne(file, pattern, partial) {
|
|
23716
23808
|
var options = this.options;
|
|
23717
|
-
this.debug(
|
|
23809
|
+
this.debug(
|
|
23810
|
+
"matchOne",
|
|
23811
|
+
{ "this": this, file, pattern }
|
|
23812
|
+
);
|
|
23718
23813
|
this.debug("matchOne", file.length, pattern.length);
|
|
23719
23814
|
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
23720
23815
|
this.debug("matchOne loop");
|
|
@@ -24019,7 +24114,9 @@ var require_minimatch = __commonJS({
|
|
|
24019
24114
|
const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
|
|
24020
24115
|
const flags = options.nocase ? "i" : "";
|
|
24021
24116
|
let re = set.map((pattern) => {
|
|
24022
|
-
pattern = pattern.map(
|
|
24117
|
+
pattern = pattern.map(
|
|
24118
|
+
(p) => typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR ? GLOBSTAR : p._src
|
|
24119
|
+
).reduce((set2, p) => {
|
|
24023
24120
|
if (!(set2[set2.length - 1] === GLOBSTAR && p === GLOBSTAR)) {
|
|
24024
24121
|
set2.push(p);
|
|
24025
24122
|
}
|
|
@@ -24223,22 +24320,28 @@ var require_readdir_glob = __commonJS({
|
|
|
24223
24320
|
this.matchers = [];
|
|
24224
24321
|
if (this.options.pattern) {
|
|
24225
24322
|
const matchers = Array.isArray(this.options.pattern) ? this.options.pattern : [this.options.pattern];
|
|
24226
|
-
this.matchers = matchers.map(
|
|
24227
|
-
|
|
24228
|
-
|
|
24229
|
-
|
|
24230
|
-
|
|
24231
|
-
|
|
24323
|
+
this.matchers = matchers.map(
|
|
24324
|
+
(m) => new Minimatch(m, {
|
|
24325
|
+
dot: this.options.dot,
|
|
24326
|
+
noglobstar: this.options.noglobstar,
|
|
24327
|
+
matchBase: this.options.matchBase,
|
|
24328
|
+
nocase: this.options.nocase
|
|
24329
|
+
})
|
|
24330
|
+
);
|
|
24232
24331
|
}
|
|
24233
24332
|
this.ignoreMatchers = [];
|
|
24234
24333
|
if (this.options.ignore) {
|
|
24235
24334
|
const ignorePatterns = Array.isArray(this.options.ignore) ? this.options.ignore : [this.options.ignore];
|
|
24236
|
-
this.ignoreMatchers = ignorePatterns.map(
|
|
24335
|
+
this.ignoreMatchers = ignorePatterns.map(
|
|
24336
|
+
(ignore) => new Minimatch(ignore, { dot: true })
|
|
24337
|
+
);
|
|
24237
24338
|
}
|
|
24238
24339
|
this.skipMatchers = [];
|
|
24239
24340
|
if (this.options.skip) {
|
|
24240
24341
|
const skipPatterns = Array.isArray(this.options.skip) ? this.options.skip : [this.options.skip];
|
|
24241
|
-
this.skipMatchers = skipPatterns.map(
|
|
24342
|
+
this.skipMatchers = skipPatterns.map(
|
|
24343
|
+
(skip) => new Minimatch(skip, { dot: true })
|
|
24344
|
+
);
|
|
24242
24345
|
}
|
|
24243
24346
|
this.iterator = explore(resolve(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this));
|
|
24244
24347
|
this.paused = false;
|
|
@@ -24803,7 +24906,9 @@ var require_async = __commonJS({
|
|
|
24803
24906
|
});
|
|
24804
24907
|
}
|
|
24805
24908
|
if (counter !== numTasks) {
|
|
24806
|
-
throw new Error(
|
|
24909
|
+
throw new Error(
|
|
24910
|
+
"async.auto cannot execute tasks due to a recursive dependency"
|
|
24911
|
+
);
|
|
24807
24912
|
}
|
|
24808
24913
|
}
|
|
24809
24914
|
function getDependents(taskName) {
|
|
@@ -25024,7 +25129,10 @@ var require_async = __commonJS({
|
|
|
25024
25129
|
return res(args[0]);
|
|
25025
25130
|
res(args);
|
|
25026
25131
|
}
|
|
25027
|
-
var item = q._createTaskItem(
|
|
25132
|
+
var item = q._createTaskItem(
|
|
25133
|
+
data,
|
|
25134
|
+
rejectOnError ? promiseCallback2 : callback || promiseCallback2
|
|
25135
|
+
);
|
|
25028
25136
|
if (insertAtFront) {
|
|
25029
25137
|
q._tasks.unshift(item);
|
|
25030
25138
|
} else {
|
|
@@ -25247,11 +25355,16 @@ var require_async = __commonJS({
|
|
|
25247
25355
|
} else {
|
|
25248
25356
|
cb = promiseCallback();
|
|
25249
25357
|
}
|
|
25250
|
-
reduce$1(
|
|
25251
|
-
|
|
25252
|
-
|
|
25253
|
-
|
|
25254
|
-
|
|
25358
|
+
reduce$1(
|
|
25359
|
+
_functions,
|
|
25360
|
+
args,
|
|
25361
|
+
(newargs, fn, iterCb) => {
|
|
25362
|
+
fn.apply(that, newargs.concat((err, ...nextargs) => {
|
|
25363
|
+
iterCb(err, nextargs);
|
|
25364
|
+
}));
|
|
25365
|
+
},
|
|
25366
|
+
(err, results) => cb(err, ...results)
|
|
25367
|
+
);
|
|
25255
25368
|
return cb[PROMISE_SYMBOL];
|
|
25256
25369
|
};
|
|
25257
25370
|
}
|
|
@@ -30658,7 +30771,9 @@ var require_lodash3 = __commonJS({
|
|
|
30658
30771
|
var funcToString = funcProto.toString;
|
|
30659
30772
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
30660
30773
|
var objectToString = objectProto.toString;
|
|
30661
|
-
var reIsNative = RegExp(
|
|
30774
|
+
var reIsNative = RegExp(
|
|
30775
|
+
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
30776
|
+
);
|
|
30662
30777
|
var Symbol2 = root.Symbol;
|
|
30663
30778
|
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
30664
30779
|
var splice = arrayProto.splice;
|
|
@@ -31051,7 +31166,9 @@ var require_lodash4 = __commonJS({
|
|
|
31051
31166
|
var funcToString = funcProto.toString;
|
|
31052
31167
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
31053
31168
|
var objectToString = objectProto.toString;
|
|
31054
|
-
var reIsNative = RegExp(
|
|
31169
|
+
var reIsNative = RegExp(
|
|
31170
|
+
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
31171
|
+
);
|
|
31055
31172
|
var Symbol2 = root.Symbol;
|
|
31056
31173
|
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
31057
31174
|
var splice = arrayProto.splice;
|
|
@@ -32345,7 +32462,10 @@ var require_minimatch2 = __commonJS({
|
|
|
32345
32462
|
};
|
|
32346
32463
|
Minimatch.prototype.matchOne = function(file, pattern, partial) {
|
|
32347
32464
|
var options = this.options;
|
|
32348
|
-
this.debug(
|
|
32465
|
+
this.debug(
|
|
32466
|
+
"matchOne",
|
|
32467
|
+
{ "this": this, file, pattern }
|
|
32468
|
+
);
|
|
32349
32469
|
this.debug("matchOne", file.length, pattern.length);
|
|
32350
32470
|
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
32351
32471
|
this.debug("matchOne loop");
|
|
@@ -37377,7 +37497,9 @@ var require_general_purpose_bit = __commonJS({
|
|
|
37377
37497
|
return this;
|
|
37378
37498
|
};
|
|
37379
37499
|
GeneralPurposeBit.prototype.encode = function() {
|
|
37380
|
-
return zipUtil.getShortBytes(
|
|
37500
|
+
return zipUtil.getShortBytes(
|
|
37501
|
+
(this.descriptor ? DATA_DESCRIPTOR_FLAG : 0) | (this.utf8 ? UFT8_NAMES_FLAG : 0) | (this.encryption ? ENCRYPTION_FLAG : 0) | (this.strongEncryption ? STRONG_ENCRYPTION_FLAG : 0)
|
|
37502
|
+
);
|
|
37381
37503
|
};
|
|
37382
37504
|
GeneralPurposeBit.prototype.parse = function(buf, offset) {
|
|
37383
37505
|
var flag = zipUtil.getShortBytesValue(buf, offset);
|
|
@@ -40613,10 +40735,13 @@ var require_query_string = __commonJS({
|
|
|
40613
40735
|
decode: true
|
|
40614
40736
|
}, options);
|
|
40615
40737
|
const [url_, hash] = splitOnFirst(url, "#");
|
|
40616
|
-
return Object.assign(
|
|
40617
|
-
|
|
40618
|
-
|
|
40619
|
-
|
|
40738
|
+
return Object.assign(
|
|
40739
|
+
{
|
|
40740
|
+
url: url_.split("?")[0] || "",
|
|
40741
|
+
query: parse(extract(url), options)
|
|
40742
|
+
},
|
|
40743
|
+
options && options.parseFragmentIdentifier && hash ? { fragmentIdentifier: decode(hash, options) } : {}
|
|
40744
|
+
);
|
|
40620
40745
|
};
|
|
40621
40746
|
exports.stringifyUrl = (object, options) => {
|
|
40622
40747
|
options = Object.assign({
|
|
@@ -41284,7 +41409,8 @@ var vm = new import_vm2.NodeVM({
|
|
|
41284
41409
|
builtin: getRuntimeModules()
|
|
41285
41410
|
}
|
|
41286
41411
|
});
|
|
41287
|
-
var script = new import_vm2.VMScript(
|
|
41412
|
+
var script = new import_vm2.VMScript(
|
|
41413
|
+
` const events = require('events');
|
|
41288
41414
|
const asyncHooks = require('async_hooks');
|
|
41289
41415
|
|
|
41290
41416
|
module.exports = function(id, entry, input, info, environment = {}){
|
|
@@ -41369,7 +41495,8 @@ var script = new import_vm2.VMScript(` const events = require('events');
|
|
|
41369
41495
|
})
|
|
41370
41496
|
|
|
41371
41497
|
return emitter;
|
|
41372
|
-
}`
|
|
41498
|
+
}`
|
|
41499
|
+
);
|
|
41373
41500
|
script.compile();
|
|
41374
41501
|
if (import_worker_threads.parentPort) {
|
|
41375
41502
|
vm.on("error", (...data) => {
|