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

@contrail/types

Package Overview
Dependencies
Maintainers
0
Versions
200
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrail/types - npm Package Compare versions

Comparing version 3.0.89 to 3.0.90

lib/formulas/utils.d.ts

10

lib/formulas/formula-function-processor.js

@@ -6,2 +6,3 @@ "use strict";

const formula_order_helper_1 = require("./formula-order-helper");
const utils_1 = require("./utils");
class FormulaFunctionProcessor {

@@ -12,8 +13,9 @@ static getFromFunctionCache(key) {

static async processFormulaFunctionsForEntity(entity, properties, context = {}, options = { useLocalCache: true }) {
const formulaProperties = properties?.filter((property) => property?.formulaFunction?.length || 0 > 0) || [];
if (!formulaProperties?.length) {
const formulaProperties = properties?.filter(property => property?.formulaFunction?.length || 0 > 0) || [];
const filteredFormulaProperties = (0, utils_1.filterPropertiesByLevel)(entity, formulaProperties);
if (!filteredFormulaProperties?.length) {
console.log('FormulaFunctionProcessor: Skipping... no formula properties found.');
return;
}
const formulaPropertiesInOrder = (0, formula_order_helper_1.getExecutionOrder)(formulaProperties);
const formulaPropertiesInOrder = (0, formula_order_helper_1.getExecutionOrder)(filteredFormulaProperties);
const formatter = new formatter_1.PropertyValueFormatter();

@@ -37,3 +39,3 @@ for (const property of formulaPropertiesInOrder) {

static processFormulasForEntities(entities, properties) {
entities.forEach((entity) => {
entities.forEach(entity => {
FormulaFunctionProcessor.processFormulaFunctionsForEntity(entity, properties);

@@ -40,0 +42,0 @@ });

@@ -8,2 +8,3 @@ "use strict";

const formatter_1 = require("../formatter");
const utils_1 = require("./utils");
class FormulaProcessor {

@@ -21,3 +22,3 @@ static processFormulaForProperty(property, data) {

static processFormulasForEntities(entities, properties) {
entities.forEach((entity) => {
entities.forEach(entity => {
this.processFormulasForEntity(entity, properties);

@@ -27,5 +28,6 @@ });

static processFormulasForEntity(entity, properties) {
const formulaProperties = properties?.filter((property) => property.propertyType === type_properties_1.PropertyType.Formula) || [];
const formulaPropertiesInOrder = (0, formula_order_helper_1.getExecutionOrder)(formulaProperties);
formulaPropertiesInOrder.forEach((property) => {
const formulaProperties = properties?.filter(property => property.propertyType === type_properties_1.PropertyType.Formula) || [];
const filteredFormulaProperties = (0, utils_1.filterPropertiesByLevel)(entity, formulaProperties);
const formulaPropertiesInOrder = (0, formula_order_helper_1.getExecutionOrder)(filteredFormulaProperties);
formulaPropertiesInOrder.forEach(property => {
entity[property.slug] = this.processFormulaForProperty(property, entity);

@@ -32,0 +34,0 @@ });

2

package.json
{
"name": "@contrail/types",
"version": "3.0.89",
"version": "3.0.90",
"description": "Types Utility module",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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