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
9
Versions
197
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.30 to 3.0.32

lib/formulas/formula-order-helper.d.ts

13

lib/formulas/formula-function-processor.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormulaFunctionProcessor = void 0;
const formula_order_helper_1 = require("./formula-order-helper");
class FormulaFunctionProcessor {
static async processFormulaFunctionsForEntity(entity, properties, context = {}) {
for (const property of properties) {
if (property.formulaFunction?.length) {
const value = await this.processFormulaFunction(property.formulaFunction, entity, context);
if (value) {
entity[property.slug] = value;
}
const formulaProperties = properties.filter(property => property.formulaFunction?.length || 0 > 0);
const formulaPropertiesInOrder = (0, formula_order_helper_1.getExecutionOrder)(formulaProperties);
for (const property of formulaPropertiesInOrder) {
const value = await this.processFormulaFunction(property.formulaFunction, entity, context);
if (value) {
entity[property.slug] = value;
}

@@ -13,0 +14,0 @@ }

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

const util_1 = require("@contrail/util");
const formula_order_helper_1 = require("./formula-order-helper");
class FormulaProcessor {

@@ -22,6 +23,6 @@ static processFormula(formula = '', data) {

static processFormulasForEntity(entity, properties) {
properties.forEach(property => {
if (property.propertyType === type_properties_1.PropertyType.Formula) {
entity[property.slug] = this.processFormula(property.formula, entity);
}
const formulaProperties = properties.filter(property => property.propertyType === type_properties_1.PropertyType.Formula);
const formulaPropertiesInOrder = (0, formula_order_helper_1.getExecutionOrder)(formulaProperties);
formulaPropertiesInOrder.forEach(property => {
entity[property.slug] = this.processFormula(property.formula, entity);
});

@@ -28,0 +29,0 @@ }

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

const valuesToInclude = widthLimit > 0 ? widthLimit : nextOptionSet.optionSet.length;
console.log('values to include:', valuesToInclude);
for (let i = 0; i < valuesToInclude; i++) {

@@ -26,0 +25,0 @@ const option = nextOptionSet.optionSet[i];

{
"name": "@contrail/types",
"version": "3.0.30",
"version": "3.0.32",
"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