@sqlanvil/cli 1.25.0 → 1.25.1
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/._LICENSE +0 -0
- package/._NOTICE +0 -0
- package/._README.md +0 -0
- package/._bundle.js +0 -0
- package/._package.json +0 -0
- package/._worker_bundle.js +0 -0
- package/bundle.js +27 -2
- package/package.json +1 -1
package/._LICENSE
ADDED
|
Binary file
|
package/._NOTICE
ADDED
|
Binary file
|
package/._README.md
ADDED
|
Binary file
|
package/._bundle.js
ADDED
|
Binary file
|
package/._package.json
ADDED
|
Binary file
|
|
Binary file
|
package/bundle.js
CHANGED
|
@@ -49219,7 +49219,15 @@ function verifyObjectMatchesProto(protoType, object, errorBehaviour = VerifyProt
|
|
|
49219
49219
|
if (Array.isArray(object)) {
|
|
49220
49220
|
throw ReferenceError(`Expected a top-level object, but found an array`);
|
|
49221
49221
|
}
|
|
49222
|
-
protoType.verify(object);
|
|
49222
|
+
const verificationError = protoType.verify(object);
|
|
49223
|
+
if (verificationError && verifyErrorIsNonPrimitiveInScalarField(verificationError, object)) {
|
|
49224
|
+
if (errorBehaviour === VerifyProtoErrorBehaviour.SUGGEST_REPORTING_TO_DATAFORM_TEAM) {
|
|
49225
|
+
throw ReferenceError(`Invalid property value: ${verificationError}, please report this to the sqlanvil team ` +
|
|
49226
|
+
`at ${REPORT_ISSUE_URL}.`);
|
|
49227
|
+
}
|
|
49228
|
+
throw ReferenceError(`Invalid property value: ${verificationError}.` +
|
|
49229
|
+
maybeGetDocsLinkPrefix(errorBehaviour, protoType));
|
|
49230
|
+
}
|
|
49223
49231
|
const proto = protoType.create(object);
|
|
49224
49232
|
const protoCastObject = protoType.toObject(proto);
|
|
49225
49233
|
function checkFields(present, desired) {
|
|
@@ -49254,6 +49262,23 @@ function verifyObjectMatchesProto(protoType, object, errorBehaviour = VerifyProt
|
|
|
49254
49262
|
checkFields(object, protoCastObject);
|
|
49255
49263
|
return proto;
|
|
49256
49264
|
}
|
|
49265
|
+
function verifyErrorIsNonPrimitiveInScalarField(message, root) {
|
|
49266
|
+
if (/object expected|array expected|\{k:/.test(message)) {
|
|
49267
|
+
return false;
|
|
49268
|
+
}
|
|
49269
|
+
const path = message.split(":")[0].trim().split(".");
|
|
49270
|
+
let value = root;
|
|
49271
|
+
for (const segment of path) {
|
|
49272
|
+
if (Array.isArray(value)) {
|
|
49273
|
+
value = value.find(element => element !== null && typeof element === "object" && segment in element);
|
|
49274
|
+
}
|
|
49275
|
+
if (value === null || typeof value !== "object" || !(segment in value)) {
|
|
49276
|
+
return false;
|
|
49277
|
+
}
|
|
49278
|
+
value = value[segment];
|
|
49279
|
+
}
|
|
49280
|
+
return value !== null && typeof value === "object";
|
|
49281
|
+
}
|
|
49257
49282
|
function maybeGetDocsLinkPrefix(errorBehaviour, protoType) {
|
|
49258
49283
|
return errorBehaviour === VerifyProtoErrorBehaviour.SHOW_DOCS_LINK
|
|
49259
49284
|
? ` See ${CONFIGS_PROTO_DOCUMENTATION_URL}#${protoType
|
|
@@ -50621,7 +50646,7 @@ function collectEvaluationQueries(queryOrAction, concatenate, queryModifier = (q
|
|
|
50621
50646
|
.filter(validationQuery => !!validationQuery.query);
|
|
50622
50647
|
}
|
|
50623
50648
|
|
|
50624
|
-
const version = "1.25.
|
|
50649
|
+
const version = "1.25.1";
|
|
50625
50650
|
const dataformVersion = "3.0.61";
|
|
50626
50651
|
|
|
50627
50652
|
async function build(compiledGraph, runConfig, dbadapter) {
|