@prismatic-io/spectral 8.0.0-preview3 → 8.0.0-preview5

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.
@@ -218,7 +218,7 @@ const flowFunctionKey = (flowName, functionName) => {
218
218
  };
219
219
  /** Creates the structure necessary to import a Component as part of a
220
220
  * Code Native integration. */
221
- const codeNativeIntegrationComponent = ({ iconPath, description, flows = [], dataSources = {}, connections = [], }, referenceKey) => {
221
+ const codeNativeIntegrationComponent = ({ name, iconPath, description, flows = [], dataSources = {}, connections = [], }, referenceKey) => {
222
222
  const convertedActions = flows.reduce((result, { name, action }) => {
223
223
  const actionKey = flowFunctionKey(name, "action");
224
224
  return Object.assign(Object.assign({}, result), { [actionKey]: convertAction(actionKey, Object.assign(Object.assign({}, action), { display: { label: "action", description: "" }, inputs: {} })) });
@@ -233,7 +233,11 @@ const codeNativeIntegrationComponent = ({ iconPath, description, flows = [], dat
233
233
  const convertedDataSources = Object.entries(dataSources).reduce((result, [dataSourceKey, dataSource]) => (Object.assign(Object.assign({}, result), { [dataSourceKey]: convertDataSource(dataSourceKey, Object.assign(Object.assign({}, dataSource), { inputs: {} })) })), {});
234
234
  return {
235
235
  key: referenceKey,
236
- display: { label: referenceKey, iconPath, description: description || "" },
236
+ display: {
237
+ label: referenceKey,
238
+ iconPath,
239
+ description: description || name,
240
+ },
237
241
  connections: connections.map(convertConnection),
238
242
  actions: convertedActions,
239
243
  triggers: convertedTriggers,
package/dist/testing.js CHANGED
@@ -72,6 +72,7 @@ const baseActionContext = {
72
72
  id: "integrationId",
73
73
  name: "Integration 1",
74
74
  versionSequenceId: "1234",
75
+ externalVersion: "1.0.0",
75
76
  },
76
77
  flow: {
77
78
  id: "flowId",
@@ -138,6 +139,7 @@ const defaultTriggerPayload = () => {
138
139
  id: "integrationId",
139
140
  name: "Integration 1",
140
141
  versionSequenceId: "1234",
142
+ externalVersion: "1.0.0",
141
143
  },
142
144
  flow: {
143
145
  id: "flowId",
@@ -3,4 +3,5 @@ export interface IntegrationAttributes {
3
3
  id: string;
4
4
  name: string;
5
5
  versionSequenceId: string;
6
+ externalVersion: string;
6
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "8.0.0-preview3",
3
+ "version": "8.0.0-preview5",
4
4
  "description": "Utility library for building Prismatic components",
5
5
  "keywords": [
6
6
  "prismatic"