@prismatic-io/spectral 10.4.3-alpha.0 → 10.4.3-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -41,8 +41,9 @@ const convertAction = (actionKey, _a, hooks) => {
|
|
|
41
41
|
}) });
|
|
42
42
|
};
|
|
43
43
|
const convertTrigger = (triggerKey, trigger, hooks) => {
|
|
44
|
+
var _a;
|
|
44
45
|
const { onInstanceDeploy, onInstanceDelete } = trigger;
|
|
45
|
-
const inputs = trigger.inputs;
|
|
46
|
+
const inputs = (_a = trigger.inputs) !== null && _a !== void 0 ? _a : {};
|
|
46
47
|
const isPollingTrigger = (0, PollingTriggerDefinition_1.isPollingTriggerDefinition)(trigger);
|
|
47
48
|
const triggerInputKeys = Object.keys(inputs);
|
|
48
49
|
const convertedTriggerInputs = Object.entries(inputs).map(([key, value]) => {
|
|
@@ -64,7 +64,7 @@ const convertConfigPages = (pages, userLevelConfigured) => {
|
|
|
64
64
|
value: key,
|
|
65
65
|
}) })));
|
|
66
66
|
};
|
|
67
|
-
const codeNativeIntegrationYaml = ({ name, description, category, documentation, version, labels, endpointType, triggerPreprocessFlowConfig, flows, configPages, userLevelConfigPages, scopedConfigVars,
|
|
67
|
+
const codeNativeIntegrationYaml = ({ name, description, category, documentation, version, labels, endpointType, triggerPreprocessFlowConfig, flows, configPages, userLevelConfigPages, scopedConfigVars, componentRegistry = {}, }, referenceKey, configVars) => {
|
|
68
68
|
// Find the preprocess flow config on the flow, if one exists.
|
|
69
69
|
const preprocessFlows = flows.filter((flow) => flow.preprocessFlowConfig);
|
|
70
70
|
// Do some validation of preprocess flow configs.
|
|
@@ -108,7 +108,6 @@ const codeNativeIntegrationYaml = ({ name, description, category, documentation,
|
|
|
108
108
|
externalCustomerUserIdField: fieldNameToReferenceInput(hasPreprocessFlow ? "onExecution" : "payload", preprocessFlowConfig === null || preprocessFlowConfig === void 0 ? void 0 : preprocessFlowConfig.externalCustomerUserIdField),
|
|
109
109
|
flowNameField: fieldNameToReferenceInput(hasPreprocessFlow ? "onExecution" : "payload", preprocessFlowConfig === null || preprocessFlowConfig === void 0 ? void 0 : preprocessFlowConfig.flowNameField),
|
|
110
110
|
flows: flows.map((flow) => (0, exports.convertFlow)(flow, componentRegistry, referenceKey)),
|
|
111
|
-
defaultInstanceProfile: instanceProfile,
|
|
112
111
|
configPages: [
|
|
113
112
|
...convertConfigPages(configPages, false),
|
|
114
113
|
...convertConfigPages(userLevelConfigPages, true),
|
package/dist/types/Inputs.d.ts
CHANGED
|
@@ -87,6 +87,8 @@ interface BaseInputField {
|
|
|
87
87
|
example?: string;
|
|
88
88
|
/** Indicate if this InputField is required. */
|
|
89
89
|
required?: boolean;
|
|
90
|
+
/** Key of the data source that can be used to set the value of this input. */
|
|
91
|
+
dataSource?: string;
|
|
90
92
|
}
|
|
91
93
|
type CollectionOptions<T> = SingleValue<T> | ValueListCollection<T> | KeyValueListCollection<T>;
|
|
92
94
|
interface SingleValue<T> {
|
|
@@ -30,10 +30,6 @@ export type IntegrationDefinition = {
|
|
|
30
30
|
userLevelConfigPages?: UserLevelConfigPages;
|
|
31
31
|
/** Scoped ConfigVars for this Integration. */
|
|
32
32
|
scopedConfigVars?: ScopedConfigVarMap;
|
|
33
|
-
/** Instance Profile used for this integration.
|
|
34
|
-
* @default "Default Instance Profile"
|
|
35
|
-
*/
|
|
36
|
-
instanceProfile?: string;
|
|
37
33
|
componentRegistry?: ComponentRegistry;
|
|
38
34
|
};
|
|
39
35
|
export type FlowOnExecution<TTriggerPayload extends TriggerPayload> = ActionPerformFunction<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismatic-io/spectral",
|
|
3
|
-
"version": "10.4.3-alpha.
|
|
3
|
+
"version": "10.4.3-alpha.1",
|
|
4
4
|
"description": "Utility library for building Prismatic connectors and code-native integrations",
|
|
5
5
|
"keywords": ["prismatic"],
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
"@types/jest": "29.5.12",
|
|
64
64
|
"@types/lodash": "4.17.0",
|
|
65
65
|
"@types/node": "14.14.35",
|
|
66
|
-
"@types/prettier": "2.6.2",
|
|
67
66
|
"@types/sax": "1.2.4",
|
|
68
67
|
"@types/url-join": "4.0.1",
|
|
69
68
|
"@types/uuid": "8.3.4",
|