Socket
Socket
Sign inDemoInstall

@prismatic-io/spectral

Package Overview
Dependencies
Maintainers
2
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 2.0.0-beta.7 to 2.0.0-beta.8

6

dist/index.js

@@ -14,10 +14,10 @@ "use strict";

exports.input = exports.action = exports.component = void 0;
const convertAction = (action) => {
const convertAction = (actionKey, action) => {
const items = Object.entries(action.inputs);
const inputDefinitions = items.map(([key, value]) => (Object.assign({ key }, (typeof value === "object" ? value : {}))));
return Object.assign(Object.assign({}, action), { inputs: inputDefinitions, perform: action.perform, examplePayload: action.examplePayload });
return Object.assign(Object.assign({}, action), { key: actionKey, inputs: inputDefinitions, perform: action.perform, examplePayload: action.examplePayload });
};
exports.component = (definition) => (Object.assign(Object.assign({}, definition), { actions: Object.fromEntries(Object.entries(definition.actions).map(([actionKey, action]) => [
actionKey,
convertAction(action),
convertAction(actionKey, action),
])) }));

@@ -24,0 +24,0 @@ exports.action = (action) => action;

import { PerformReturn, ActionDisplayDefinition, ActionPerformFunction, Inputs } from ".";
/** Configuration of an Action. */
export interface ActionDefinition<T extends Inputs, AllowsBranching extends boolean, ReturnData extends PerformReturn<AllowsBranching, unknown>> {
/** Key used for the Actions map and to uniquely identify this Component in your tenant. */
key: string;
/** Defines how the Action is displayed in the Prismatic interface. */

@@ -7,0 +5,0 @@ display: ActionDisplayDefinition;

{
"name": "@prismatic-io/spectral",
"version": "2.0.0-beta.7",
"version": "2.0.0-beta.8",
"description": "Utility library for building Prismatic components",

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

@@ -50,3 +50,4 @@ # @prismatic-io/spectral

To build spectral locally, you'll need `yarn` and `node` installed. Run `yarn build` to build the package, or `yarn pack` to build a tarball that can be used in custom components for testing changes to spectral.
To build spectral locally, you'll need `yarn` and `node` installed.
Run `yarn build` to build the package, or `yarn pack` to build a tarball that can be used in custom components for testing changes to spectral.

@@ -53,0 +54,0 @@ ## License

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