Socket
Socket
Sign inDemoInstall

@prismatic-io/spectral

Package Overview
Dependencies
Maintainers
0
Versions
171
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.0.0-rc.8 to 9.0.0-rc.9

12

dist/generators/componentManifest/getImports.js

@@ -6,12 +6,12 @@ "use strict";

return inputs.reduce((acc, input) => {
if (typeof input.type === "string") {
if (typeof input.valueType === "string") {
return acc;
}
return Object.assign(Object.assign({}, acc), { [input.type.module]: acc[input.type.module]
? !acc[input.type.module].includes(input.type.type)
? [...acc[input.type.module], input.type.type]
: acc[input.type.module]
: [input.type.type] });
return Object.assign(Object.assign({}, acc), { [input.valueType.module]: acc[input.valueType.module]
? !acc[input.valueType.module].includes(input.valueType.type)
? [...acc[input.valueType.module], input.valueType.type]
: acc[input.valueType.module]
: [input.valueType.type] });
}, {});
};
exports.getImports = getImports;

@@ -9,3 +9,4 @@ import type { Input as InputBase } from "../../serverTypes";

label: string;
type: InputType;
inputType: string;
valueType: ValueType;
required: boolean | undefined;

@@ -17,3 +18,3 @@ properties: {

}
export declare type InputType = string | {
export declare type ValueType = string | {
type: string;

@@ -33,3 +34,3 @@ module: string;

export declare const getInputs: ({ inputs, docBlock }: GetInputsProps) => Input[];
export declare const INPUT_TYPE_MAP: Record<InputFieldDefinition["type"], InputType>;
export declare const INPUT_TYPE_MAP: Record<InputFieldDefinition["type"], ValueType>;
export {};

@@ -9,7 +9,7 @@ "use strict";

label: input.label,
type: getInputType(input),
inputType: input.type,
valueType: getInputValueType(input),
required: input.required,
collection: input.collection,
inputType: input.type,
onPremiseControlled: input.onPremiseControlled || input.onPremControlled,
onPremControlled: input.onPremiseControlled || input.onPremControlled,
properties: docBlock.reduce((acc, { propertyKey, inputKey, propertyValue, output }) => {

@@ -81,3 +81,3 @@ if (inputKey && inputKey !== input.key) {

};
const getInputType = (input) => {
const getInputValueType = (input) => {
const valueType = input.model

@@ -87,3 +87,3 @@ ? input.model.map((choice) => `"${choice.value}"`).join(" | ")

if (input.collection === "keyvaluelist") {
return `Record<string, ${valueType}>`;
return `Record<string, ${valueType}> | Array<{key: string, value: ${valueType}}>`;
}

@@ -90,0 +90,0 @@ if (input.collection === "valuelist") {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeComponentManifest = void 0;
const fs_extra_1 = require("fs-extra");
const fs_1 = require("fs");
const removeComponentManifest = ({ destinationDir, verbose, }) => {

@@ -10,3 +10,5 @@ if (verbose) {

try {
(0, fs_extra_1.removeSync)(destinationDir);
if ((0, fs_1.existsSync)(destinationDir)) {
(0, fs_1.rmSync)(destinationDir, { recursive: true, force: true });
}
}

@@ -13,0 +15,0 @@ catch (err) {

@@ -391,2 +391,9 @@ "use strict";

const { collection } = action.inputs[inputKey];
if (collection === "keyvaluelist" &&
Array.isArray(inputValue)) {
transformedAccumulator[inputKey] = inputValue.reduce((acc, { key, value }) => {
return [...acc, { key, value }];
}, []);
return transformedAccumulator;
}
// Transform key-value list inputs

@@ -393,0 +400,0 @@ if (collection === "keyvaluelist" &&

{
"name": "@prismatic-io/spectral",
"version": "9.0.0-rc.8",
"version": "9.0.0-rc.9",
"description": "Utility library for building Prismatic components",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc