Socket
Socket
Sign inDemoInstall

@prismatic-io/spectral

Package Overview
Dependencies
Maintainers
6
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prismatic-io/spectral - npm Package Compare versions

Comparing version 7.6.8 to 7.7.0

13

dist/conditionalLogic/index.js

@@ -120,8 +120,15 @@ "use strict";

const predicates = expression.slice(1);
const results = predicates.map(exports.evaluate);
switch (operator) {
case types_1.BooleanOperator.and:
return results.reduce((previous, current) => previous && current, true);
for (const predicate of predicates) {
if (!(0, exports.evaluate)(predicate))
return false;
}
return true;
case types_1.BooleanOperator.or:
return results.reduce((previous, current) => previous || current, false);
for (const predicate of predicates) {
if ((0, exports.evaluate)(predicate))
return true;
}
return false;
default:

@@ -128,0 +135,0 @@ throw new Error(`Invalid operator: '${operator}'`);

@@ -16,3 +16,3 @@ /**

*/
export declare const component: <T extends boolean>(definition: ComponentDefinition<T>) => ReturnType<typeof convertComponent>;
export declare const component: <TPublic extends boolean, TKey extends string>(definition: ComponentDefinition<TPublic, TKey>) => ReturnType<typeof convertComponent>;
/**

@@ -19,0 +19,0 @@ * This function creates an action object that can be referenced

import { ComponentDefinition } from "../types";
import { Component as ServerComponent } from ".";
export declare const convertComponent: <TPublic extends boolean>({ connections, actions, triggers, dataSources, hooks, ...definition }: ComponentDefinition<TPublic>) => ServerComponent;
export declare const convertComponent: <TPublic extends boolean, TKey extends string>({ connections, actions, triggers, dataSources, hooks, ...definition }: ComponentDefinition<TPublic, TKey>) => ServerComponent;

@@ -8,5 +8,5 @@ import { ActionDefinition, ConnectionDefinition, ComponentDisplayDefinition, TriggerDefinition, DataSourceDefinition } from ".";

/** Defines attributes of a Component. */
export declare type ComponentDefinition<TPublic extends boolean> = {
export declare type ComponentDefinition<TPublic extends boolean, TKey extends string> = {
/** Specifies unique key for this Component. */
key: string;
key: TKey;
/** Specifies if this Component is available for all Organizations or only your own @default false */

@@ -28,5 +28,5 @@ public?: TPublic;

/** Specified the URL for the Component Documentation. */
documentationUrl: string;
documentationUrl: `https://prismatic.io/docs/components/${TKey}/`;
} : {
documentationUrl?: string;
});
{
"name": "@prismatic-io/spectral",
"version": "7.6.8",
"version": "7.7.0",
"description": "Utility library for building Prismatic components",

@@ -5,0 +5,0 @@ "keywords": [

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