Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/pmb/node_modules/webpack-dev-server/node_modules/ajv/dist/vocabularies/unevaluated/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require("../../compile/codegen");
const util_1 = require("../../compile/util");
const names_1 = require("../../compile/names");
const error = {
message: "must NOT have unevaluated properties",
params: ({ params }) => (0, codegen_1._) `{unevaluatedProperty: ${params.unevaluatedProperty}}`,
};
const def = {
keyword: "unevaluatedProperties",
type: "object",
schemaType: ["boolean", "object"],
trackErrors: true,
error,
code(cxt) {
const { gen, schema, data, errsCount, it } = cxt;
/* istanbul ignore if */
if (!errsCount)
throw new Error("ajv implementation error");
const { allErrors, props } = it;
if (props instanceof codegen_1.Name) {
gen.if((0, codegen_1._) `${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
}
else if (props !== true) {
gen.forIn("key", data, (key) => props === undefined
? unevaluatedPropCode(key)
: gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
}
it.props = true;
cxt.ok((0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);
function unevaluatedPropCode(key) {
if (schema === false) {
cxt.setParams({ unevaluatedProperty: key });
cxt.error();
if (!allErrors)
gen.break();
return;
}
if (!(0, util_1.alwaysValidSchema)(it, schema)) {
const valid = gen.name("valid");
cxt.subschema({
keyword: "unevaluatedProperties",
dataProp: key,
dataPropType: util_1.Type.Str,
}, valid);
if (!allErrors)
gen.if((0, codegen_1.not)(valid), () => gen.break());
}
}
function unevaluatedDynamic(evaluatedProps, key) {
return (0, codegen_1._) `!${evaluatedProps} || !${evaluatedProps}[${key}]`;
}
function unevaluatedStatic(evaluatedProps, key) {
const ps = [];
for (const p in evaluatedProps) {
if (evaluatedProps[p] === true)
ps.push((0, codegen_1._) `${key} !== ${p}`);
}
return (0, codegen_1.and)(...ps);
}
},
};
exports.default = def;
//# sourceMappingURL=unevaluatedProperties.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0209 ]-- |