@prismatic-io/spectral 10.3.10 → 10.3.11

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.
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "10.3.10",
3
+ "version": "10.3.11",
4
4
  "description": "Utility library for building Prismatic connectors and code-native integrations",
5
5
  "keywords": ["prismatic"],
6
6
  "main": "dist/index.js",