New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@opencrvs/toolkit

Package Overview
Dependencies
Maintainers
4
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencrvs/toolkit - npm Package Compare versions

Comparing version 0.0.25-events-ml to 0.0.26-events-ml

138

dist/conditionals/index.js

@@ -776,44 +776,97 @@ "use strict";

properties: {
[fieldId]: {
$form: {
type: "object",
properties: {
[fieldId]: {
type: "string",
format: "date",
formatMaximum: { $data: "2/$now" }
}
},
required: [fieldId]
},
$now: {
type: "string",
format: "date",
formatMaximum: { $data: "2/$now" }
format: "date"
}
},
required: [fieldId, "$now"],
$now: {
type: "string",
format: "date"
}
required: ["$form", "$now"]
}),
isEqualTo: (value) => addCondition({
[fieldId]: {
const: value
}
type: "object",
properties: {
$form: {
type: "object",
properties: {
[fieldId]: {
const: value
}
},
required: [fieldId]
}
},
required: ["$form"]
}),
isUndefined: () => addCondition({
not: {
type: "object",
required: [fieldId]
}
type: "object",
properties: {
$form: {
type: "object",
not: {
type: "object",
required: [fieldId]
}
}
},
required: ["$form"]
}),
inArray: (values) => addCondition({
[fieldId]: {
enum: values
}
type: "object",
properties: {
$form: {
type: "object",
properties: {
[fieldId]: {
enum: values
}
},
required: [fieldId]
}
},
required: ["$form"]
}),
not: {
inArray: (values) => addCondition({
[fieldId]: {
not: {
enum: values
type: "object",
properties: {
$form: {
type: "object",
properties: {
[fieldId]: {
not: {
enum: values
}
}
},
required: [fieldId]
}
}
},
required: ["$form"]
}),
equalTo: (value) => addCondition({
[fieldId]: {
not: {
const: value
type: "object",
properties: {
$form: {
type: "object",
properties: {
[fieldId]: {
not: {
const: value
}
}
},
required: [fieldId]
}
}
},
required: ["$form"]
})

@@ -823,17 +876,10 @@ },

const nestedConditions = callback(field2(fieldId))._apply();
return addCondition({
type: "object",
anyOf: nestedConditions
});
return addCondition(ensureWrapper(nestedConditions, "or"));
},
_apply: () => conditions,
apply: () => {
if (conditions.length === 1) {
return {
type: "object",
properties: { $form: { properties: conditions[0] } },
required: ["$form", fieldId]
};
if (conditions.length === 0) {
throw new Error("No conditions applied");
}
return { type: "object", allOf: conditions, required: ["$form", fieldId] };
return ensureWrapper(conditions, "and");
}

@@ -843,1 +889,19 @@ };

}
var ensureWrapper = (conditions, booleanConnector) => {
const conditionsWithConnector = (conditions2, connector) => connector === "and" ? { allOf: conditions2 } : { anyOf: conditions2 };
const needsWrapper = conditions.some(
(condition) => !(condition.type === "object" && condition.properties && condition.properties.$form)
);
if (needsWrapper) {
return {
type: "object",
properties: {
$form: {
type: "object",
...conditionsWithConnector(conditions, booleanConnector)
}
}
};
}
return conditionsWithConnector(conditions, booleanConnector);
};
{
"name": "@opencrvs/toolkit",
"version": "0.0.25-events-ml",
"version": "0.0.26-events-ml",
"description": "OpenCRVS toolkit for building country configurations",

@@ -5,0 +5,0 @@ "license": "MPL-2.0",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc