@base44-preview/cli 0.0.41-pr.395.72f56e6 → 0.0.41-pr.395.7c0e611
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/dist/cli/index.js +4 -4
- package/dist/cli/index.js.map +5 -5
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -248607,7 +248607,7 @@ class Validator {
|
|
|
248607
248607
|
applyDefaults(record2, entitySchema) {
|
|
248608
248608
|
const result = {};
|
|
248609
248609
|
for (const [key2, property] of Object.entries(entitySchema.properties)) {
|
|
248610
|
-
if (property
|
|
248610
|
+
if (property.default !== undefined) {
|
|
248611
248611
|
result[key2] = property.default;
|
|
248612
248612
|
}
|
|
248613
248613
|
}
|
|
@@ -248682,7 +248682,7 @@ class Validator {
|
|
|
248682
248682
|
validateRequiredFields(record2, entitySchema) {
|
|
248683
248683
|
if (entitySchema.required && entitySchema.required.length > 0) {
|
|
248684
248684
|
for (const required2 of entitySchema.required) {
|
|
248685
|
-
if (
|
|
248685
|
+
if (record2[required2] == null) {
|
|
248686
248686
|
return {
|
|
248687
248687
|
hasError: true,
|
|
248688
248688
|
error: this.createValidationError(`Error in field ${required2}: Field required`)
|
|
@@ -248959,7 +248959,7 @@ function createEntityRoutes(db2, logger, remoteProxy, broadcast) {
|
|
|
248959
248959
|
const records = [];
|
|
248960
248960
|
for (const record2 of req.body) {
|
|
248961
248961
|
const filteredRecord = db2.prepareRecord(entityName, record2);
|
|
248962
|
-
const validation = db2.validate(entityName,
|
|
248962
|
+
const validation = db2.validate(entityName, filteredRecord);
|
|
248963
248963
|
if (validation.hasError) {
|
|
248964
248964
|
res.status(422).json(validation.error);
|
|
248965
248965
|
return;
|
|
@@ -255299,4 +255299,4 @@ export {
|
|
|
255299
255299
|
CLIExitError
|
|
255300
255300
|
};
|
|
255301
255301
|
|
|
255302
|
-
//# debugId=
|
|
255302
|
+
//# debugId=B3E6118BD3480E4164756E2164756E21
|