Socket
Socket
Sign inDemoInstall

@prismatic-io/spectral

Package Overview
Dependencies
Maintainers
8
Versions
172
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 8.1.5 to 8.1.6

6

dist/index.d.ts

@@ -6,3 +6,3 @@ /**

*/
import { ActionDefinition, InputFieldDefinition, ComponentDefinition, DefaultConnectionDefinition, OAuth2ConnectionDefinition, Inputs, TriggerDefinition, ActionPerformReturn, TriggerResult, DataSourceDefinition, IntegrationDefinition, Flow, ConfigPage, StandardConfigVar, ConnectionConfigVar, ConfigVarResultCollection, TriggerPayload, DataSourceConfigVar, ConfigPages, OnPremiseConnectionDefinition, ScheduleConfigVar, ComponentSelector } from "./types";
import { ActionDefinition, InputFieldDefinition, ComponentDefinition, DefaultConnectionDefinition, OAuth2ConnectionDefinition, Inputs, TriggerDefinition, ActionPerformReturn, TriggerResult, DataSourceDefinition, IntegrationDefinition, Flow, ConfigPage, StandardConfigVar, ConnectionConfigVar, ConfigVarResultCollection, TriggerPayload, DataSourceConfigVar, ConfigPages, OnPremConnectionDefinition, ScheduleConfigVar, ComponentSelector } from "./types";
import { convertComponent } from "./serverTypes/convert";

@@ -132,6 +132,6 @@ import { convertIntegration } from "./serverTypes/convertIntegration";

* https://prismatic.io/docs/custom-components/writing-custom-components/#adding-connections.
* @param definition An OnPremiseConnectionDefinition object that describes the type of a connection for a custom component action or trigger, and information on how it should be displayed in the Prismatic WebApp.
* @param definition An OnPremConnectionDefinition object that describes the type of a connection for a custom component action or trigger, and information on how it should be displayed in the Prismatic WebApp.
* @returns This function validates the shape of the `definition` object provided and returns the same connection object.
*/
export declare const onPremiseConnection: <T extends OnPremiseConnectionDefinition>(definition: T) => T;
export declare const onPremConnection: <T extends OnPremConnectionDefinition>(definition: T) => T;
/**

@@ -138,0 +138,0 @@ * For information on writing custom component connections, see

@@ -25,3 +25,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.testing = exports.util = exports.oauth2Connection = exports.onPremiseConnection = exports.connection = exports.input = exports.dataSource = exports.trigger = exports.action = exports.component = exports.connectionConfigVar = exports.dataSourceConfigVar = exports.configVar = exports.reference = exports.configPage = exports.flow = exports.integration = void 0;
exports.testing = exports.util = exports.oauth2Connection = exports.onPremConnection = exports.connection = exports.input = exports.dataSource = exports.trigger = exports.action = exports.component = exports.connectionConfigVar = exports.dataSourceConfigVar = exports.configVar = exports.reference = exports.configPage = exports.flow = exports.integration = void 0;
const convert_1 = require("./serverTypes/convert");

@@ -157,7 +157,7 @@ const convertIntegration_1 = require("./serverTypes/convertIntegration");

* https://prismatic.io/docs/custom-components/writing-custom-components/#adding-connections.
* @param definition An OnPremiseConnectionDefinition object that describes the type of a connection for a custom component action or trigger, and information on how it should be displayed in the Prismatic WebApp.
* @param definition An OnPremConnectionDefinition object that describes the type of a connection for a custom component action or trigger, and information on how it should be displayed in the Prismatic WebApp.
* @returns This function validates the shape of the `definition` object provided and returns the same connection object.
*/
const onPremiseConnection = (definition) => definition;
exports.onPremiseConnection = onPremiseConnection;
const onPremConnection = (definition) => definition;
exports.onPremConnection = onPremConnection;
/**

@@ -164,0 +164,0 @@ * For information on writing custom component connections, see

@@ -1,4 +0,4 @@

import { InputFieldDefinition, ComponentDefinition } from "../types";
import { InputFieldDefinition, ComponentDefinition, OnPremConnectionInput } from "../types";
import { Component as ServerComponent, Input as ServerInput } from ".";
export declare const convertInput: (key: string, { default: defaultValue, type, label, collection, ...rest }: InputFieldDefinition) => ServerInput;
export declare const convertInput: (key: string, { default: defaultValue, type, label, collection, ...rest }: InputFieldDefinition | OnPremConnectionInput) => ServerInput;
export declare const convertComponent: <TPublic extends boolean, TKey extends string>({ connections, actions, triggers, dataSources, hooks, ...definition }: ComponentDefinition<TPublic, TKey>) => ServerComponent;

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

const perform_1 = require("./perform");
const lodash_1 = require("lodash");
const convertInput = (key, _a) => {

@@ -23,4 +24,4 @@ var { default: defaultValue, type, label, collection } = _a, rest = __rest(_a, ["default", "type", "label", "collection"]);

: undefined;
return Object.assign(Object.assign({}, rest), { key,
type, default: defaultValue !== null && defaultValue !== void 0 ? defaultValue : types_1.InputFieldDefaultMap[type], collection, label: typeof label === "string" ? label : label.value, keyLabel });
return Object.assign(Object.assign({}, (0, lodash_1.omit)(rest, ["onPremControlled"])), { key,
type, default: defaultValue !== null && defaultValue !== void 0 ? defaultValue : types_1.InputFieldDefaultMap[type], collection, label: typeof label === "string" ? label : label.value, keyLabel, onPremiseControlled: ("onPremControlled" in rest && rest.onPremControlled) || undefined });
};

@@ -27,0 +28,0 @@ exports.convertInput = convertInput;

@@ -177,3 +177,3 @@ /// <reference types="node" />

shown?: boolean;
onPremiseControlled?: boolean;
onPremControlled?: boolean;
})[];

@@ -239,2 +239,3 @@ }

language?: string;
onPremiseControlled?: boolean;
}

@@ -1,2 +0,2 @@

import { ConnectionInput } from ".";
import { ConnectionInput, OnPremConnectionInput } from ".";
export declare enum OAuth2Type {

@@ -22,9 +22,6 @@ ClientCredentials = "client_credentials",

}
declare type OnPremiseConnectionInput = ConnectionInput & {
onPremiseControlled: true;
};
export interface OnPremiseConnectionDefinition extends BaseConnectionDefinition {
export interface OnPremConnectionDefinition extends BaseConnectionDefinition {
inputs: {
host: OnPremiseConnectionInput;
port: OnPremiseConnectionInput;
host: OnPremConnectionInput;
port: OnPremConnectionInput;
[key: string]: ConnectionInput;

@@ -57,3 +54,3 @@ };

export declare type OAuth2ConnectionDefinition = OAuth2AuthorizationCodeConnectionDefinition | OAuth2ClientCredentialConnectionDefinition;
export declare type ConnectionDefinition = DefaultConnectionDefinition | OnPremiseConnectionDefinition | OAuth2ConnectionDefinition;
export declare type ConnectionDefinition = DefaultConnectionDefinition | OnPremConnectionDefinition | OAuth2ConnectionDefinition;
export {};

@@ -70,2 +70,5 @@ import { ConditionalExpression } from "./conditional-logic";

};
export declare type OnPremConnectionInput = ConnectionInput & {
onPremControlled: true;
};
export declare type InputFieldDefinition = StringInputField | DataInputField | TextInputField | PasswordInputField | BooleanInputField | CodeInputField | ConditionalInputField | ConnectionInputField | ObjectSelectionInputField | ObjectFieldMapInputField | JSONFormInputField | DynamicObjectSelectionInputField | DynamicFieldSelectionInputField;

@@ -72,0 +75,0 @@ export declare type InputCleanFunction<TValue, TResult = TValue> = (value: TValue) => TResult;

{
"name": "@prismatic-io/spectral",
"version": "8.1.5",
"version": "8.1.6",
"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