@prismatic-io/spectral 10.6.6 → 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.
- package/dist/generators/cniComponentManifest/index.js +1 -1
- package/dist/generators/componentManifest/createTriggers.js +1 -0
- package/dist/generators/componentManifest/templates/connections/connection.ts.ejs +3 -2
- package/dist/generators/componentManifest/templates/dataSources/dataSource.ts.ejs +3 -2
- package/dist/generators/componentManifest/templates/triggers/trigger.ts.ejs +22 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%- include('../partials/generatedHeader.ejs') -%>
|
|
2
|
-
import { connectionConfigVar } from "@prismatic-io/spectral/integration";
|
|
2
|
+
import { connectionConfigVar } from "@prismatic-io/spectral/dist/integration";
|
|
3
3
|
<%- include('../partials/imports.ejs', { imports, helpers }) %>
|
|
4
4
|
|
|
5
5
|
export interface <%= connection.typeInterface %>Values {
|
|
@@ -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
|
|
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,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%- include('../partials/generatedHeader.ejs') -%>
|
|
2
|
-
import { dataSourceConfigVar } from "@prismatic-io/spectral/integration";
|
|
2
|
+
import { dataSourceConfigVar } from "@prismatic-io/spectral/dist/integration";
|
|
3
3
|
<%- include('../partials/imports.ejs', { imports, helpers }) %>
|
|
4
4
|
|
|
5
5
|
export interface <%= dataSource.typeInterface %>Values {
|
|
@@ -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
|
|
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
|
+
};
|