Socket
Socket
Sign inDemoInstall

@prismatic-io/spectral

Package Overview
Dependencies
Maintainers
0
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 9.1.2 to 9.1.3

dist/generators/utils/escapeSpecialCharacters.d.ts

2

dist/generators/componentManifest/createActions.js

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

key: action.key || actionKey,
label: action.display.description,
label: action.display.label,
description: action.display.description,

@@ -54,0 +54,0 @@ inputs,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addPunctuation = exports.addLine = exports.DOC_BLOCK_DEFAULT = void 0;
const escapeSpecialCharacters_1 = require("../utils/escapeSpecialCharacters");
const DOC_BLOCK_DEFAULT = (input) => {

@@ -26,5 +27,5 @@ const comments = (0, exports.addPunctuation)(input.comments);

}
const sanitizedValue = JSON.stringify(value)
const sanitizedValue = (0, escapeSpecialCharacters_1.escapeSpecialCharacters)(JSON.stringify(value)
.replace(/(^"|"$)|(^'|'$)/g, "")
.trim();
.trim());
return ` * ${key ? `@${key} ${sanitizedValue}` : sanitizedValue}\n`;

@@ -31,0 +32,0 @@ };

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.INPUT_TYPE_MAP = exports.getInputs = void 0;
const escapeSpecialCharacters_1 = require("../utils/escapeSpecialCharacters");
const docBlock_1 = require("./docBlock");
const getDefaultValue = (value) => {
if (value === undefined || value === "" || typeof value === "string") {
if (value === undefined || value === "") {
return value;
}
return JSON.stringify(value);
const stringValue = typeof value === "string" ? value : JSON.stringify(value);
return (0, escapeSpecialCharacters_1.escapeSpecialCharacters)(stringValue);
};

@@ -11,0 +13,0 @@ const getInputs = ({ inputs, docBlock = docBlock_1.DOC_BLOCK_DEFAULT }) => {

@@ -1,3 +0,6 @@

import { IntegrationDefinition } from "../types";
import { IntegrationDefinition, ConfigVar, ComponentRegistry } from "../types";
import { Component as ServerComponent } from ".";
import { RequiredConfigVariable as ServerRequiredConfigVariable } from "./integration";
export declare const convertIntegration: (definition: IntegrationDefinition) => ServerComponent;
/** Converts a Config Var into the structure necessary for YAML generation. */
export declare const convertConfigVar: (key: string, configVar: ConfigVar, referenceKey: string, componentRegistry: ComponentRegistry) => ServerRequiredConfigVariable;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.convertIntegration = void 0;
exports.convertConfigVar = exports.convertIntegration = void 0;
const yaml_1 = __importDefault(require("yaml"));

@@ -103,3 +103,3 @@ const uuid_1 = require("uuid");

labels,
requiredConfigVars: Object.entries(configVars || {}).map(([key, configVar]) => convertConfigVar(key, configVar, referenceKey, componentRegistry)),
requiredConfigVars: Object.entries(configVars || {}).map(([key, configVar]) => (0, exports.convertConfigVar)(key, configVar, referenceKey, componentRegistry)),
endpointType,

@@ -333,6 +333,20 @@ preprocessFlowName: hasPreprocessFlow ? preprocessFlows[0].name : undefined,

const meta = convertInputPermissionAndVisibility((0, lodash_1.pick)(input, ["permissionAndVisibilityType", "visibleToOrgDeployer"]));
const defaultValue = input.collection ? [] : "";
const defaultValue = input.collection
? (input.default || []).map((defaultValue) => {
if (typeof defaultValue === "string") {
return {
type: "value",
value: defaultValue,
};
}
return {
name: defaultValue.key,
type: "value",
value: defaultValue.value,
};
})
: input.default || "";
return Object.assign(Object.assign({}, result), { [key]: {
type: input.collection ? "complex" : "value",
value: input.default || defaultValue,
value: defaultValue,
meta,

@@ -401,2 +415,3 @@ } });

};
exports.convertConfigVar = convertConfigVar;
/** Maps the step name field to a fully qualified input. */

@@ -403,0 +418,0 @@ const fieldNameToReferenceInput = (stepName, fieldName) => fieldName ? { type: "reference", value: `${stepName}.results.${fieldName}` } : undefined;

{
"name": "@prismatic-io/spectral",
"version": "9.1.2",
"version": "9.1.3",
"description": "Utility library for building Prismatic components",

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

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