@prismatic-io/spectral 7.3.7 → 7.3.9

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/testing.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { TriggerPayload, TriggerResult, ConnectionValue, ActionLogger, Component, ActionContext, ActionPerformReturn, DataSourceResult, DataSourceContext } from "./serverTypes";
8
8
  import { ConnectionDefinition, ActionDefinition, TriggerDefinition, Inputs, ActionInputParameters, DataSourceDefinition, ActionPerformReturn as InvokeActionPerformReturn, TriggerResult as InvokeTriggerResult, DataSourceResult as InvokeDataSourceResult } from "./types";
9
- export declare const createConnection: <T extends ConnectionDefinition>({ key }: T, values: Record<string, unknown>) => ConnectionValue;
9
+ export declare const createConnection: <T extends ConnectionDefinition>({ key }: T, values: Record<string, unknown>, tokenValues?: Record<string, unknown> | undefined) => ConnectionValue;
10
10
  /**
11
11
  * Pre-built mock of ActionLogger. Suitable for asserting logs are created as expected.
12
12
  * See https://prismatic.io/docs/custom-components/writing-custom-components/#verifying-correct-logging-in-action-tests for information on testing correct logging behavior in your custom component.
package/dist/testing.js CHANGED
@@ -17,10 +17,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.createHarness = exports.ComponentTestHarness = exports.invokeDataSource = exports.invokeTrigger = exports.defaultTriggerPayload = exports.invoke = exports.loggerMock = exports.createConnection = void 0;
19
19
  const jest_mock_1 = require("jest-mock");
20
- const createConnection = ({ key }, values) => ({
20
+ const createConnection = ({ key }, values, tokenValues) => ({
21
21
  configVarKey: "",
22
22
  key,
23
23
  fields: values,
24
+ token: tokenValues,
24
25
  });
25
26
  exports.createConnection = createConnection;
26
27
  /**
@@ -76,7 +76,7 @@ export interface StringInputField extends BaseInputField {
76
76
  /** Dictates possible choices for the input. */
77
77
  model?: InputFieldChoice[];
78
78
  /** Clean function */
79
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
79
+ clean?: InputCleanFunction<this["default"]>;
80
80
  }
81
81
  export interface DataInputField extends BaseInputField {
82
82
  /** Data type the InputField will collect. */
@@ -88,7 +88,7 @@ export interface DataInputField extends BaseInputField {
88
88
  /** Dictates possible choices for the input. */
89
89
  model?: InputFieldChoice[];
90
90
  /** Clean function */
91
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
91
+ clean?: InputCleanFunction<this["default"]>;
92
92
  }
93
93
  export interface TextInputField extends BaseInputField {
94
94
  /** Data type the InputField will collect. */
@@ -100,7 +100,7 @@ export interface TextInputField extends BaseInputField {
100
100
  /** Dictates possible choices for the input. */
101
101
  model?: InputFieldChoice[];
102
102
  /** Clean function */
103
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
103
+ clean?: InputCleanFunction<this["default"]>;
104
104
  }
105
105
  export interface PasswordInputField extends BaseInputField {
106
106
  /** Data type the InputField will collect. */
@@ -112,7 +112,7 @@ export interface PasswordInputField extends BaseInputField {
112
112
  /** Dictates possible choices for the input. */
113
113
  model?: InputFieldChoice[];
114
114
  /** Clean function */
115
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
115
+ clean?: InputCleanFunction<this["default"]>;
116
116
  }
117
117
  export interface BooleanInputField extends BaseInputField {
118
118
  /** Data type the InputField will collect. */
@@ -124,7 +124,7 @@ export interface BooleanInputField extends BaseInputField {
124
124
  /** Dictates possible choices for the input. */
125
125
  model?: InputFieldChoice[];
126
126
  /** Clean function */
127
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
127
+ clean?: InputCleanFunction<this["default"]>;
128
128
  }
129
129
  /** Defines attributes of a CodeInputField. */
130
130
  export interface CodeInputField extends BaseInputField {
@@ -139,7 +139,7 @@ export interface CodeInputField extends BaseInputField {
139
139
  /** Dictates possible choices for the input. */
140
140
  model?: InputFieldChoice[];
141
141
  /** Clean function */
142
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
142
+ clean?: InputCleanFunction<this["default"]>;
143
143
  }
144
144
  /** Defines attributes of a ConditionalInputField. */
145
145
  export interface ConditionalInputField extends BaseInputField {
@@ -150,7 +150,7 @@ export interface ConditionalInputField extends BaseInputField {
150
150
  /** Default value for this field. */
151
151
  default?: ConditionalExpression;
152
152
  /** Clean function */
153
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
153
+ clean?: InputCleanFunction<this["default"] | null>;
154
154
  }
155
155
  /** Defines attributes of a ConnectionInputField. */
156
156
  export interface ConnectionInputField extends BaseInputField {
@@ -161,7 +161,7 @@ export interface ConnectionInputField extends BaseInputField {
161
161
  /** Default value for this field. */
162
162
  default?: Connection;
163
163
  /** Clean function */
164
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
164
+ clean?: InputCleanFunction<this["default"] | null>;
165
165
  }
166
166
  export interface Connection {
167
167
  /** Key of the Connection type. */
@@ -184,7 +184,7 @@ export interface ObjectSelectionInputField extends BaseInputField {
184
184
  /** Default value for this field. */
185
185
  default?: ObjectSelection;
186
186
  /** Clean function */
187
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
187
+ clean?: InputCleanFunction<this["default"]>;
188
188
  }
189
189
  /** Defines attributes of an ObjectFieldMapInputField. */
190
190
  export interface ObjectFieldMapInputField extends BaseInputField {
@@ -195,7 +195,7 @@ export interface ObjectFieldMapInputField extends BaseInputField {
195
195
  /** Default value for this field. */
196
196
  default?: ObjectFieldMap;
197
197
  /** Clean function */
198
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
198
+ clean?: InputCleanFunction<this["default"]>;
199
199
  }
200
200
  /** Defines attributes of a JSONFormInputField. */
201
201
  export interface JSONFormInputField extends BaseInputField {
@@ -206,7 +206,7 @@ export interface JSONFormInputField extends BaseInputField {
206
206
  /** Default value for this field. */
207
207
  default?: JSONForm;
208
208
  /** Clean function */
209
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
209
+ clean?: InputCleanFunction<this["default"]>;
210
210
  }
211
211
  /** Defines attributes of a DynamicObjectSelectionInputField */
212
212
  export interface DynamicObjectSelectionInputField extends BaseInputField {
@@ -217,7 +217,7 @@ export interface DynamicObjectSelectionInputField extends BaseInputField {
217
217
  /** Default value for this field. */
218
218
  default?: unknown;
219
219
  /** Clean function */
220
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
220
+ clean?: InputCleanFunction<this["default"]>;
221
221
  }
222
222
  /** Defines attributes of a SelectedFieldInputField */
223
223
  export interface DynamicFieldSelectionInputField extends BaseInputField {
@@ -228,7 +228,7 @@ export interface DynamicFieldSelectionInputField extends BaseInputField {
228
228
  /** Default value for this field. */
229
229
  default?: unknown;
230
230
  /** Clean function */
231
- clean?: InputCleanFunction<NonNullable<this["default"]>>;
231
+ clean?: InputCleanFunction<this["default"]>;
232
232
  }
233
233
  /** Defines a single Choice option for a InputField. */
234
234
  export interface InputFieldChoice {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "7.3.7",
3
+ "version": "7.3.9",
4
4
  "description": "Utility library for building Prismatic components",
5
5
  "keywords": [
6
6
  "prismatic"