Socket
Socket
Sign inDemoInstall

@prismatic-io/spectral

Package Overview
Dependencies
Maintainers
8
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.10 to 9.0.0

dist/generators/componentManifest/docBlock.d.ts

15

dist/generators/componentManifest/createActions.js

@@ -21,16 +21,2 @@ "use strict";

const createTemplate_1 = require("../utils/createTemplate");
const DOC_BLOCK = [
{
propertyKey: "comments",
},
{
propertyKey: "default",
},
{
propertyKey: "example",
},
{
propertyKey: "placeholder",
},
];
const createActions = ({ component, dryRun, verbose, sourceDir, destinationDir, }) => __awaiter(void 0, void 0, void 0, function* () {

@@ -55,3 +41,2 @@ var _a, _b;

inputs: action.inputs,
docBlock: DOC_BLOCK,
});

@@ -58,0 +43,0 @@ const imports = (0, getImports_1.getImports)({ inputs });

@@ -21,26 +21,2 @@ "use strict";

const createTemplate_1 = require("../utils/createTemplate");
const DOC_BLOCK = [
{
propertyKey: "comments",
},
{
propertyKey: "default",
},
{
propertyKey: "example",
},
{
propertyKey: "placeholder",
},
{
propertyKey: "onPremControlled",
propertyValue: true,
output: "This input will be supplied when using an on prem resource.",
},
{
propertyKey: "onPremiseControlled",
propertyValue: true,
output: "This input will be supplied when using an on prem resource.",
},
];
const createConnections = ({ component, dryRun, verbose, sourceDir, destinationDir, }) => __awaiter(void 0, void 0, void 0, function* () {

@@ -65,3 +41,2 @@ var _a, _b;

inputs: connection.inputs,
docBlock: DOC_BLOCK,
});

@@ -68,0 +43,0 @@ const imports = (0, getImports_1.getImports)({ inputs });

16

dist/generators/componentManifest/createDataSources.js

@@ -21,16 +21,2 @@ "use strict";

const createTemplate_1 = require("../utils/createTemplate");
const DOC_BLOCK = [
{
propertyKey: "comments",
},
{
propertyKey: "default",
},
{
propertyKey: "example",
},
{
propertyKey: "placeholder",
},
];
const createDataSources = ({ component, dryRun, verbose, sourceDir, destinationDir, }) => __awaiter(void 0, void 0, void 0, function* () {

@@ -55,3 +41,2 @@ var _a, _b;

inputs: dataSource.inputs,
docBlock: DOC_BLOCK,
});

@@ -64,2 +49,3 @@ const imports = (0, getImports_1.getImports)({ inputs });

description: dataSource.display.description,
dataSourceType: dataSource.dataSourceType,
inputs,

@@ -66,0 +52,0 @@ },

@@ -21,16 +21,2 @@ "use strict";

const createTemplate_1 = require("../utils/createTemplate");
const DOC_BLOCK = [
{
propertyKey: "comments",
},
{
propertyKey: "default",
},
{
propertyKey: "example",
},
{
propertyKey: "placeholder",
},
];
const createTriggers = ({ component, dryRun, verbose, sourceDir, destinationDir, }) => __awaiter(void 0, void 0, void 0, function* () {

@@ -55,3 +41,2 @@ var _a, _b;

inputs: trigger.inputs,
docBlock: DOC_BLOCK,
});

@@ -58,0 +43,0 @@ const imports = (0, getImports_1.getImports)({ inputs });

import type { Input as InputBase } from "../../serverTypes";
import type { InputFieldDefinition } from "../../types/Inputs";
declare type ServerTypeInput = InputBase & {
export declare type ServerTypeInput = InputBase & {
onPremControlled?: boolean;

@@ -12,7 +12,4 @@ shown?: boolean;

valueType: ValueType;
docBlock: string;
required: boolean | undefined;
properties: {
key: keyof ServerTypeInput;
value: string;
}[];
}

@@ -31,6 +28,6 @@ export declare type ValueType = string | {

inputs: ServerTypeInput[];
docBlock: DocBlock;
docBlock?: (input: ServerTypeInput) => string;
}
export declare const getInputs: ({ inputs, docBlock }: GetInputsProps) => Input[];
export declare const getInputs: ({ inputs, docBlock, }: GetInputsProps) => Input[];
export declare const INPUT_TYPE_MAP: Record<InputFieldDefinition["type"], ValueType>;
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.INPUT_TYPE_MAP = exports.getInputs = void 0;
const getInputs = ({ inputs, docBlock }) => {
const docBlock_1 = require("./docBlock");
const getInputs = ({ inputs, docBlock = docBlock_1.DOC_BLOCK_DEFAULT, }) => {
return inputs.reduce((acc, input) => {

@@ -22,34 +23,3 @@ if ((typeof input.shown === "boolean" && input.shown === false) ||

onPremControlled: input.onPremiseControlled || input.onPremControlled,
properties: docBlock.reduce((acc, { propertyKey, inputKey, propertyValue, output }) => {
if (inputKey && inputKey !== input.key) {
return acc;
}
if (output &&
(input[propertyKey] === propertyValue ||
typeof propertyValue === "undefined")) {
return [
...acc,
{
key: propertyKey,
value: output,
},
];
}
if (typeof input[propertyKey] === "undefined" ||
input[propertyKey] === null ||
input[propertyKey] === "" ||
(typeof propertyValue !== "undefined" &&
input[propertyKey] !== propertyValue)) {
return acc;
}
return [
...acc,
{
key: propertyKey,
value: JSON.stringify(input[propertyKey])
.replace(/(^"|"$)|(^'|'$)/g, "")
.trim(),
},
];
}, []),
docBlock: docBlock(input),
},

@@ -56,0 +26,0 @@ ];

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

const path_1 = __importDefault(require("path"));
const prettier_1 = require("prettier");
const createTemplate = ({ source, destination = source.replace(/\.ejs$/, ""), data = {}, dryRun, verbose, }) => __awaiter(void 0, void 0, void 0, function* () {

@@ -26,3 +27,8 @@ if (!source) {

if (path_1.default.extname(source) === ".ejs") {
const rendered = yield (0, ejs_1.renderFile)(source, data);
const render = yield (0, ejs_1.renderFile)(source, data);
const formattedRender = [".ts", ".js"].includes(path_1.default.extname(destination))
? (0, prettier_1.format)(render, {
parser: "typescript",
})
: render;
if (dryRun) {

@@ -33,3 +39,3 @@ console.info("");

console.info("---------------------------- Start ----------------------------");
console.info(rendered);
console.info(formattedRender);
console.info("---------------------------- End ----------------------------");

@@ -42,3 +48,3 @@ console.info("");

}
yield (0, fs_extra_1.outputFile)(destination, rendered, { encoding: "utf-8" });
yield (0, fs_extra_1.outputFile)(destination, formattedRender, { encoding: "utf-8" });
}

@@ -45,0 +51,0 @@ else {

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

const { ref, inputs } = convertComponentReference(configVar.connection, componentRegistry);
const { stableKey = "", description, connection: { template }, } = (0, lodash_1.pick)(configVar, ["stableKey", "description", "connection"]);
const { stableKey = "", description, connection: { template, onPremiseConnectionConfig }, } = (0, lodash_1.pick)(configVar, ["stableKey", "description", "connection"]);
return {

@@ -341,3 +341,4 @@ stableKey,

dataType: "connection",
connection: Object.assign(Object.assign({}, ref), { template }),
connection: Object.assign(Object.assign({}, ref), { template,
onPremiseConnectionConfig }),
inputs,

@@ -377,3 +378,4 @@ orgOnly,

const { ref, inputs } = convertComponentReference(configVar.dataSource, componentRegistry);
result.dataType = configVar.dataSourceType;
result.dataType =
componentRegistry[ref.component.key]["dataSources"][ref.key]["dataSourceType"];
result.dataSource = ref;

@@ -380,0 +382,0 @@ result.inputs = inputs;

@@ -10,2 +10,3 @@ export declare const DefinitionVersion = 7;

template?: string;
onPremiseConnectionConfig?: string;
} | {

@@ -19,2 +20,3 @@ component: {

template?: string;
onPremiseConnectionConfig?: string;
};

@@ -21,0 +23,0 @@ export declare type Input = {

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

import { CollectionType, InputFieldType } from ".";
import { CollectionType, DataSourceType, InputFieldType } from ".";
export interface ComponentManifest {

@@ -27,2 +27,3 @@ key: string;

perform: (values: any) => Promise<unknown>;
dataSourceType: DataSourceType;
inputs: Record<string, BaseInput>;

@@ -29,0 +30,0 @@ }

import { ComponentManifest, PermissionAndVisibilityType } from ".";
import { UnionToIntersection } from "./utils";
import { Prettify, UnionToIntersection } from "./utils";
/**

@@ -22,3 +22,3 @@ * Root ComponentRegistry type exposed for augmentation.

} : never : never>;
interface ConnectionInputPermissionAndVisibility {
export interface ConnectionInputPermissionAndVisibility {
/**

@@ -71,15 +71,21 @@ * Optional value that sets the permission and visibility of the Config Var. @default "customer"

};
declare type ComponentReferencesByType = UnionToIntersection<ComponentReferenceType extends infer TComponentReferenceType ? TComponentReferenceType extends Extract<keyof ComponentManifest, "actions" | "triggers" | "dataSources" | "connections"> ? {
[Key in TComponentReferenceType]: keyof ComponentRegistry extends infer TComponentKey ? TComponentKey extends keyof ComponentRegistry ? TComponentKey extends string ? TComponentReferenceType extends keyof ComponentRegistry[TComponentKey] ? keyof ComponentRegistry[TComponentKey][TComponentReferenceType] extends infer TComponentPropertyKey ? TComponentPropertyKey extends keyof ComponentRegistry[TComponentKey][TComponentReferenceType] ? TComponentPropertyKey extends string ? "perform" extends keyof ComponentRegistry[TComponentKey][TComponentReferenceType][TComponentPropertyKey] ? ComponentRegistry[TComponentKey][TComponentReferenceType][TComponentPropertyKey]["perform"] extends (...args: any[]) => any ? Parameters<ComponentRegistry[TComponentKey][TComponentReferenceType][TComponentPropertyKey]["perform"]>[0] extends infer TInputs ? ComponentReference<{
component: TComponentKey;
key: TComponentPropertyKey;
values: {
[Key in keyof TInputs]: ComponentReferenceTypeValueMap<TInputs[Key]>[TComponentReferenceType];
};
declare type ComponentRegistryFunctionsByType = UnionToIntersection<ComponentReferenceType extends infer TComponentReferenceType ? TComponentReferenceType extends Extract<keyof ComponentManifest, "actions" | "triggers" | "dataSources" | "connections"> ? {
[Key in TComponentReferenceType]: keyof ComponentRegistry extends infer TComponentKey ? TComponentKey extends keyof ComponentRegistry ? TComponentKey extends string ? TComponentReferenceType extends keyof ComponentRegistry[TComponentKey] ? keyof ComponentRegistry[TComponentKey][TComponentReferenceType] extends infer TComponentPropertyKey ? TComponentPropertyKey extends keyof ComponentRegistry[TComponentKey][TComponentReferenceType] ? TComponentPropertyKey extends string ? "perform" extends keyof ComponentRegistry[TComponentKey][TComponentReferenceType][TComponentPropertyKey] ? ComponentRegistry[TComponentKey][TComponentReferenceType][TComponentPropertyKey]["perform"] extends (...args: any[]) => any ? Parameters<ComponentRegistry[TComponentKey][TComponentReferenceType][TComponentPropertyKey]["perform"]>[0] extends infer TInputs ? Prettify<Omit<ComponentRegistry[TComponentKey][TComponentReferenceType][TComponentPropertyKey], "perform"> & {
reference: ComponentReference<{
component: TComponentKey;
key: TComponentPropertyKey;
values: {
[Key in keyof TInputs]: ComponentReferenceTypeValueMap<TInputs[Key]>[TComponentReferenceType];
};
}>;
}> : never : never : never : never : never : never : never : never : never : never;
} : never : never>;
export declare type TriggerReference = ComponentReferencesByType["triggers"];
export declare type ActionReference = ComponentReferencesByType["actions"];
export declare type DataSourceReference = ComponentReferencesByType["dataSources"];
export declare type ConnectionReference = ComponentReferencesByType["connections"];
export declare type ComponentRegistryTrigger = ComponentRegistryFunctionsByType["triggers"];
export declare type TriggerReference = ComponentRegistryTrigger["reference"];
export declare type ComponentRegistryAction = ComponentRegistryFunctionsByType["actions"];
export declare type ActionReference = ComponentRegistryAction["reference"];
export declare type ComponentRegistryDataSource = ComponentRegistryFunctionsByType["dataSources"];
export declare type DataSourceReference = ComponentRegistryDataSource["reference"];
export declare type ComponentRegistryConnection = ComponentRegistryFunctionsByType["connections"];
export declare type ConnectionReference = ComponentRegistryConnection["reference"];
export {};

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

import { DataSourceDefinition, ConnectionDefinition, Inputs, DataSourceType, Connection, JSONForm, ObjectFieldMap, ObjectSelection, ConfigVarResultCollection, Schedule, CollectionDataSourceType, ConnectionReference, DataSourceReference, ConfigPage, ConfigPages, UserLevelConfigPages, ConfigPageElement } from ".";
import { DataSourceDefinition, ConnectionDefinition, Inputs, DataSourceType, Connection, JSONForm, ObjectFieldMap, ObjectSelection, ConfigVarResultCollection, Schedule, CollectionDataSourceType, DataSourceReference, ConfigPage, ConfigPages, UserLevelConfigPages, ConfigPageElement, ComponentRegistryDataSource, ComponentRegistryConnection } from ".";
import { Prettify, UnionToIntersection } from "./utils";

@@ -96,13 +96,19 @@ /** Supported data types for Config Vars. */

export declare type StandardConfigVar = StringConfigVar | DateConfigVar | TimestampConfigVar | PicklistConfigVar | CodeConfigVar | BooleanConfigVar | NumberConfigVar | ScheduleConfigVar | ObjectSelectionConfigVar | ObjectFieldMapConfigVar | JsonFormConfigVar;
declare type BaseDataSourceConfigVar = ({
dataSourceType: CollectionDataSourceType;
declare type BaseDataSourceConfigVar<TDataSourceType extends DataSourceType = DataSourceType> = TDataSourceType extends CollectionDataSourceType ? {
dataSourceType: TDataSourceType;
collectionType?: CollectionType | undefined;
} | {
dataSourceType: Exclude<DataSourceType, CollectionDataSourceType>;
collectionType?: never;
}) & BaseConfigVar;
declare type DataSourceDefinitionConfigVar = BaseDataSourceConfigVar & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, DataSourceType>, "display" | "inputs" | "examplePayload" | "dataSourceType" | "detailDataSource">;
export declare type DataSourceReferenceConfigVar = BaseDataSourceConfigVar & {
dataSource: DataSourceReference;
};
} & BaseConfigVar : TDataSourceType extends Exclude<DataSourceType, CollectionDataSourceType> ? BaseConfigVar & {
dataSourceType: TDataSourceType;
collectionType?: undefined;
} : ({
dataSourceType: Extract<CollectionDataSourceType, TDataSourceType>;
collectionType: CollectionType;
} & BaseConfigVar) | (BaseConfigVar & {
dataSourceType: Extract<Exclude<DataSourceType, CollectionDataSourceType>, TDataSourceType>;
collectionType?: undefined;
});
declare type DataSourceDefinitionConfigVar = DataSourceType extends infer TDataSourceType ? TDataSourceType extends DataSourceType ? BaseDataSourceConfigVar<TDataSourceType> & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, TDataSourceType>, "display" | "inputs" | "examplePayload" | "detailDataSource"> : never : never;
declare type DataSourceReferenceConfigVar = ComponentRegistryDataSource extends infer TDataSourceReference ? TDataSourceReference extends ComponentRegistryDataSource ? Omit<BaseDataSourceConfigVar<TDataSourceReference["dataSourceType"]>, "dataSourceType"> & {
dataSource: TDataSourceReference["reference"];
} : never : never;
/** Defines attributes of a data source Config Var. */

@@ -114,7 +120,15 @@ export declare type DataSourceConfigVar = DataSourceDefinitionConfigVar | DataSourceReferenceConfigVar;

declare type ConnectionDefinitionConfigVar = BaseConnectionConfigVar & Omit<ConnectionDefinition, "label" | "comments" | "key">;
declare type ConnectionReferenceConfigVar = BaseConnectionConfigVar & {
connection: ConnectionReference & {
declare type OnPremiseConnectionConfigTypeEnum = "allowed" | "disallowed" | "required";
declare type ConnectionReferenceConfigVar = ComponentRegistryConnection extends infer TConnectionReference ? TConnectionReference extends ComponentRegistryConnection ? BaseConnectionConfigVar & {
connection: TConnectionReference["reference"] & ("onPremAvailable" extends keyof TConnectionReference ? TConnectionReference["onPremAvailable"] extends true ? {
template?: string;
};
};
onPremiseConnectionConfig?: OnPremiseConnectionConfigTypeEnum;
} : {
template?: string;
onPremiseConnectionConfig?: undefined;
} : {
template?: string;
onPremiseConnectionConfig?: undefined;
});
} : never : never;
/** Defines attributes of a Config Var that represents a Connection. */

@@ -127,3 +141,5 @@ export declare type ConnectionConfigVar = ConnectionDefinitionConfigVar | ConnectionReferenceConfigVar;

}>;
declare type ElementToRuntimeType<TElement extends ConfigPageElement> = TElement extends ConfigVar ? TElement extends ConnectionConfigVar ? Connection : TElement extends StandardConfigVar ? WithCollectionType<ConfigVarDataTypeRuntimeValueMap[TElement["dataType"]], TElement["collectionType"]> : TElement extends DataSourceConfigVar ? WithCollectionType<ConfigVarDataTypeRuntimeValueMap[TElement["dataSourceType"]], TElement["collectionType"]> : never : never;
declare type GetDataSourceReference<TComponent extends DataSourceReference["component"], TKey extends DataSourceReference["key"]> = ComponentRegistryDataSource extends infer TDataSourceReference ? TDataSourceReference extends ComponentRegistryDataSource ? TComponent extends TDataSourceReference["reference"]["component"] ? TKey extends TDataSourceReference["reference"]["key"] ? TDataSourceReference : never : never : never : never;
declare type DataSourceToRuntimeType<TElement extends ConfigPageElement> = TElement extends DataSourceDefinitionConfigVar ? TElement["dataSourceType"] extends infer TType ? TType extends DataSourceType ? ConfigVarDataTypeRuntimeValueMap[TType] : never : never : TElement extends DataSourceReferenceConfigVar ? GetDataSourceReference<TElement["dataSource"]["component"], TElement["dataSource"]["key"]>["dataSourceType"] extends infer TType ? TType extends DataSourceType ? ConfigVarDataTypeRuntimeValueMap[TType] : never : never : never;
declare type ElementToRuntimeType<TElement extends ConfigPageElement> = TElement extends ConfigVar ? TElement extends ConnectionConfigVar ? Connection : TElement extends StandardConfigVar ? WithCollectionType<ConfigVarDataTypeRuntimeValueMap[TElement["dataType"]], TElement["collectionType"]> : TElement extends DataSourceConfigVar ? WithCollectionType<DataSourceToRuntimeType<TElement>, TElement["collectionType"]> : never : never;
declare type ExtractConfigVars<TConfigPages extends {

@@ -137,6 +153,93 @@ [key: string]: ConfigPage;

export declare const isScheduleConfigVar: (cv: ConfigVar) => cv is ScheduleConfigVar;
export declare const isDataSourceDefinitionConfigVar: (cv: ConfigVar) => cv is DataSourceDefinitionConfigVar;
export declare const isDataSourceReferenceConfigVar: (cv: ConfigVar) => cv is DataSourceReferenceConfigVar;
export declare const isDataSourceDefinitionConfigVar: (cv: ConfigVar) => cv is ({
dataSourceType: "string";
collectionType?: CollectionType | undefined;
} & BaseConfigVar & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, "string">, "display" | "inputs" | "examplePayload" | "detailDataSource">) | ({
dataSourceType: "number";
collectionType?: CollectionType | undefined;
} & BaseConfigVar & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, "number">, "display" | "inputs" | "examplePayload" | "detailDataSource">) | ({
dataSourceType: "boolean";
collectionType?: CollectionType | undefined;
} & BaseConfigVar & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, "boolean">, "display" | "inputs" | "examplePayload" | "detailDataSource">) | ({
dataSourceType: "code";
collectionType?: CollectionType | undefined;
} & BaseConfigVar & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, "code">, "display" | "inputs" | "examplePayload" | "detailDataSource">) | (BaseConfigVar & {
dataSourceType: "objectSelection";
collectionType?: undefined;
} & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, "objectSelection">, "display" | "inputs" | "examplePayload" | "detailDataSource">) | (BaseConfigVar & {
dataSourceType: "objectFieldMap";
collectionType?: undefined;
} & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, "objectFieldMap">, "display" | "inputs" | "examplePayload" | "detailDataSource">) | (BaseConfigVar & {
dataSourceType: "jsonForm";
collectionType?: undefined;
} & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, "jsonForm">, "display" | "inputs" | "examplePayload" | "detailDataSource">) | ({
dataSourceType: "date";
collectionType?: CollectionType | undefined;
} & BaseConfigVar & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, "date">, "display" | "inputs" | "examplePayload" | "detailDataSource">) | ({
dataSourceType: "timestamp";
collectionType?: CollectionType | undefined;
} & BaseConfigVar & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, "timestamp">, "display" | "inputs" | "examplePayload" | "detailDataSource">) | ({
dataSourceType: "picklist";
collectionType?: CollectionType | undefined;
} & BaseConfigVar & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, "picklist">, "display" | "inputs" | "examplePayload" | "detailDataSource">) | ({
dataSourceType: "schedule";
collectionType?: CollectionType | undefined;
} & BaseConfigVar & Omit<DataSourceDefinition<Inputs, ConfigVarResultCollection, "schedule">, "display" | "inputs" | "examplePayload" | "detailDataSource">);
export declare const isDataSourceReferenceConfigVar: (cv: unknown) => cv is Omit<({
dataSourceType: "string";
collectionType?: CollectionType | undefined;
} & BaseConfigVar) | ({
dataSourceType: "number";
collectionType?: CollectionType | undefined;
} & BaseConfigVar) | ({
dataSourceType: "boolean";
collectionType?: CollectionType | undefined;
} & BaseConfigVar) | ({
dataSourceType: "code";
collectionType?: CollectionType | undefined;
} & BaseConfigVar) | (BaseConfigVar & {
dataSourceType: "objectSelection";
collectionType?: undefined;
}) | (BaseConfigVar & {
dataSourceType: "objectFieldMap";
collectionType?: undefined;
}) | (BaseConfigVar & {
dataSourceType: "jsonForm";
collectionType?: undefined;
}) | ({
dataSourceType: "date";
collectionType?: CollectionType | undefined;
} & BaseConfigVar) | ({
dataSourceType: "timestamp";
collectionType?: CollectionType | undefined;
} & BaseConfigVar) | ({
dataSourceType: "picklist";
collectionType?: CollectionType | undefined;
} & BaseConfigVar) | ({
dataSourceType: "schedule";
collectionType?: CollectionType | undefined;
} & BaseConfigVar), "dataSourceType"> & {
dataSource: {
component: string;
key: string;
values: {
[x: string]: import("./ComponentRegistry").ConfigVarExpression | import("./ComponentRegistry").ValueExpression<any>;
};
};
};
export declare const isConnectionDefinitionConfigVar: (cv: ConfigVar) => cv is ConnectionDefinitionConfigVar;
export declare const isConnectionReferenceConfigVar: (cv: ConfigVar) => cv is ConnectionReferenceConfigVar;
export declare const isConnectionReferenceConfigVar: (cv: unknown) => cv is BaseConfigVar & {
dataType: "connection";
} & {
connection: {
component: string;
key: string;
values: {
[x: string]: (import("./ComponentRegistry").ConfigVarExpression | import("./ComponentRegistry").ValueExpression<any>) & import("./ComponentRegistry").ConnectionInputPermissionAndVisibility;
};
} & {
template?: string | undefined;
onPremiseConnectionConfig?: undefined;
};
};
export {};

@@ -11,3 +11,8 @@ "use strict";

exports.isDataSourceDefinitionConfigVar = isDataSourceDefinitionConfigVar;
const isDataSourceReferenceConfigVar = (cv) => "dataSourceType" in cv &&
const isDataSourceReferenceConfigVar = (
// FIXME: Module augmetation causes this to produce a compile error while
// running `tsd`. I'm pretty uncertain how this happens but leaving as
// `unkonwn` is fine for now.
cv) => typeof cv === "object" &&
cv !== null &&
"dataSource" in cv &&

@@ -18,3 +23,10 @@ (0, _1.isComponentReference)(cv.dataSource);

exports.isConnectionDefinitionConfigVar = isConnectionDefinitionConfigVar;
const isConnectionReferenceConfigVar = (cv) => "connection" in cv && (0, _1.isComponentReference)(cv.connection);
const isConnectionReferenceConfigVar = (
// FIXME: Module augmetation causes this to produce a compile error while
// running `tsd`. I'm pretty uncertain how this happens but leaving as
// `unkonwn` is fine for now.
cv) => typeof cv === "object" &&
cv !== null &&
"connection" in cv &&
(0, _1.isComponentReference)(cv.connection);
exports.isConnectionReferenceConfigVar = isConnectionReferenceConfigVar;

@@ -109,3 +109,3 @@ import { ConditionalExpression } from "./conditional-logic";

}
export declare type StringInputField = BaseInputField & CollectionOptions<string> & {
export declare type StringInputField = BaseInputField & {
/** Data type the InputField will collect. */

@@ -117,4 +117,4 @@ type: "string";

clean?: InputCleanFunction<unknown>;
};
export declare type DataInputField = BaseInputField & CollectionOptions<string> & {
} & CollectionOptions<string>;
export declare type DataInputField = BaseInputField & {
/** Data type the InputField will collect. */

@@ -126,4 +126,4 @@ type: "data";

clean?: InputCleanFunction<unknown>;
};
export declare type TextInputField = BaseInputField & CollectionOptions<string> & {
} & CollectionOptions<string>;
export declare type TextInputField = BaseInputField & {
/** Data type the InputField will collect. */

@@ -135,4 +135,4 @@ type: "text";

clean?: InputCleanFunction<unknown>;
};
export declare type PasswordInputField = BaseInputField & CollectionOptions<string> & {
} & CollectionOptions<string>;
export declare type PasswordInputField = BaseInputField & {
/** Data type the InputField will collect. */

@@ -144,4 +144,4 @@ type: "password";

clean?: InputCleanFunction<unknown>;
};
export declare type BooleanInputField = BaseInputField & CollectionOptions<string> & {
} & CollectionOptions<string>;
export declare type BooleanInputField = BaseInputField & {
/** Data type the InputField will collect. */

@@ -153,5 +153,5 @@ type: "boolean";

clean?: InputCleanFunction<unknown>;
};
} & CollectionOptions<string>;
/** Defines attributes of a CodeInputField. */
export declare type CodeInputField = BaseInputField & CollectionOptions<string> & {
export declare type CodeInputField = BaseInputField & {
/** Data type the InputField will collect. */

@@ -165,3 +165,3 @@ type: "code";

clean?: InputCleanFunction<unknown>;
};
} & CollectionOptions<string>;
/** Defines attributes of a ConditionalInputField. */

@@ -168,0 +168,0 @@ export interface ConditionalInputField extends BaseInputField {

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

@@ -55,2 +55,3 @@ "keywords": [

"object-sizeof": "^2.6.4",
"prettier": "2.6.2",
"safe-stable-stringify": "2.3.1",

@@ -69,2 +70,3 @@ "serialize-error": "8.1.0",

"@types/node": "14.14.35",
"@types/prettier": "2.6.2",
"@types/sax": "1.2.4",

@@ -83,3 +85,2 @@ "@types/url-join": "4.0.1",

"jest": "29.7.0",
"prettier": "2.6.2",
"ts-jest": "29.1.2",

@@ -86,0 +87,0 @@ "typedoc": "0.17.7",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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