@prismatic-io/spectral 10.6.7 → 10.7.0

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.
@@ -123,7 +123,7 @@ const fetchComponentDataForManifest = (_a) => __awaiter(void 0, [_a], void 0, fu
123
123
  };
124
124
  });
125
125
  return {
126
- key: componentKey,
126
+ key: component.key,
127
127
  signature: component.signature,
128
128
  public: !isPrivate,
129
129
  display: {
@@ -49,6 +49,7 @@ const createTriggers = (_a) => __awaiter(void 0, [_a], void 0, function* ({ comp
49
49
  label: trigger.display.description,
50
50
  description: trigger.display.description,
51
51
  inputs,
52
+ componentKey: component.key,
52
53
  },
53
54
  dryRun,
54
55
  imports,
@@ -10,6 +10,7 @@ export interface <%= connection.typeInterface %>Values {
10
10
  * <%= connection.label %>
11
11
  *
12
12
  * @comments <%- connection.comments %>
13
+ * This object is used to support type hinting.
13
14
  */
14
15
  export const <%= connection.import %> = {
15
16
  key: "<%= connection.key %>",
@@ -27,7 +28,7 @@ export const <%= connection.import %> = {
27
28
  /**
28
29
  * <%= connection.label %> Connection Helper
29
30
  *
30
- * @comments Helper for direct usage in config wizard definitions.
31
+ * @comments This wrapper function can be used directly in config wizard definitions.
31
32
  */
32
33
  export const <%= helpers.camelCase(connection.componentKey) %><%= helpers.capitalizeFirstLetter(helpers.camelCase(connection.key)) %> = (
33
34
  stableKey: string,
@@ -10,6 +10,7 @@ export interface <%= dataSource.typeInterface %>Values {
10
10
  * <%= dataSource.label %>
11
11
  *
12
12
  * @description <%- dataSource.description %>
13
+ * This object is used to support type hinting.
13
14
  */
14
15
  export const <%= dataSource.import %> = {
15
16
  key: "<%= dataSource.key %>",
@@ -25,7 +26,7 @@ export const <%= dataSource.import %> = {
25
26
  /**
26
27
  * <%= dataSource.label %> DataSource Helper
27
28
  *
28
- * @comments Helper for direct usage in config wizard definitions.
29
+ * @comments This wrapper function can be used directly in config wizard definitions.
29
30
  */
30
31
  export const <%= helpers.camelCase(dataSource.componentKey) %><%= helpers.capitalizeFirstLetter(helpers.camelCase(dataSource.key)) %> = (
31
32
  stableKey: string,
@@ -1,5 +1,6 @@
1
1
  <%- include('../partials/generatedHeader.ejs') -%>
2
2
  <%- include('../partials/imports.ejs', { imports, helpers }) %>
3
+ import { ConfigVarExpression } from "@prismatic-io/spectral";
3
4
 
4
5
  export interface <%= trigger.typeInterface %>Values {
5
6
  <%- include('../partials/performArgs.ejs', { inputs: trigger.inputs, helpers }) -%>
@@ -9,6 +10,7 @@ export interface <%= trigger.typeInterface %>Values {
9
10
  * <%= trigger.label %>
10
11
  *
11
12
  * @description <%- trigger.description %>
13
+ * This object is used to support type hinting.
12
14
  */
13
15
  export const <%= trigger.import %> = {
14
16
  key: "<%= trigger.key %>",
@@ -18,4 +20,23 @@ export const <%= trigger.import %> = {
18
20
  inputs: {
19
21
  <%- include('../partials/inputs.ejs', { inputs: trigger.inputs, helpers }) -%>
20
22
  }
21
- } as const;
23
+ } as const;
24
+
25
+ /**
26
+ * <%= trigger.label %> Trigger Helper
27
+ *
28
+ * @comments This wrapper function can be used directly in flow definitions.
29
+ */
30
+ export const <%= helpers.camelCase(trigger.componentKey) %><%= helpers.capitalizeFirstLetter(trigger.import) %> = (values: {
31
+ <% trigger.inputs.forEach((input) => { -%>
32
+ <%- helpers.formatType(input.key) %><%= input.required ? "" : "?" %>: ({
33
+ value: <%- input.valueType.type ? input.valueType.type : input.valueType %>;
34
+ } | ConfigVarExpression);
35
+ <% }); -%>
36
+ }) => {
37
+ return {
38
+ component: "<%= helpers.camelCase(trigger.componentKey) %>",
39
+ key: "<%= trigger.key %>",
40
+ values,
41
+ } as const;
42
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "10.6.7",
3
+ "version": "10.7.0",
4
4
  "description": "Utility library for building Prismatic connectors and code-native integrations",
5
5
  "keywords": ["prismatic"],
6
6
  "main": "dist/index.js",