@prismatic-io/spectral 10.3.10 → 10.3.12

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.
@@ -99,6 +99,7 @@ export interface TriggerPayload {
99
99
  integration: IntegrationAttributes;
100
100
  flow: FlowAttributes;
101
101
  startedAt: string;
102
+ globalDebug: boolean;
102
103
  }
103
104
  interface HttpResponse {
104
105
  statusCode: number;
@@ -81,13 +81,20 @@ const createPerform = (performFn, { inputCleaners, errorHandler }) => {
81
81
  });
82
82
  };
83
83
  exports.createPerform = createPerform;
84
- const createInvokePollAction = (context, action, { inputCleaners, errorHandler }) => {
84
+ const createInvokePollAction = (context, action, { errorHandler }) => {
85
85
  return (params) => __awaiter(void 0, void 0, void 0, function* () {
86
86
  try {
87
87
  if (!action) {
88
88
  throw "Error: Attempted to invoke an action for a trigger with no pollAction defined.";
89
89
  }
90
- return yield action.perform(context, (0, exports.cleanParams)(params, inputCleaners));
90
+ /*
91
+ * By the time this is called, the inputs have already been cleaned
92
+ * as part of the polling trigger setup.
93
+ *
94
+ * Running clean twice can have unwanted behavior depending on how users have implemented
95
+ * their clean functions.
96
+ */
97
+ return yield action.perform(context, params);
91
98
  }
92
99
  catch (error) {
93
100
  throw errorHandler ? errorHandler(error) : error;
@@ -102,7 +109,6 @@ const createPollingPerform = (trigger, { inputCleaners, errorHandler }) => {
102
109
  invokeFlow: (0, exports.createInvokeFlow)(context),
103
110
  polling: {
104
111
  invokeAction: createInvokePollAction(context, pollAction, {
105
- inputCleaners,
106
112
  errorHandler,
107
113
  }),
108
114
  getState: () => {
package/dist/testing.js CHANGED
@@ -208,6 +208,7 @@ const defaultTriggerPayload = () => {
208
208
  name: "Flow 1",
209
209
  },
210
210
  startedAt: new Date().toISOString(),
211
+ globalDebug: false,
211
212
  };
212
213
  };
213
214
  exports.defaultTriggerPayload = defaultTriggerPayload;
@@ -40,4 +40,6 @@ export interface TriggerPayload {
40
40
  flow: FlowAttributes;
41
41
  /** The time in UTC that execution started. */
42
42
  startedAt: string;
43
+ /** Determines whether the execution will run in debug mode. */
44
+ globalDebug: boolean;
43
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "10.3.10",
3
+ "version": "10.3.12",
4
4
  "description": "Utility library for building Prismatic connectors and code-native integrations",
5
5
  "keywords": ["prismatic"],
6
6
  "main": "dist/index.js",