@intuned/runtime 1.3.2 → 1.3.3

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.
@@ -139,13 +139,13 @@ async function runApi({
139
139
  }
140
140
  (0, _cleanEnvironmentVariables.cleanEnvironmentVariables)();
141
141
  const automationFunctionParameters = [...(params !== undefined ? [params] : []), page, context];
142
- const automationFunctionResult = await automationFunction(...automationFunctionParameters);
143
- const MAX_RESULT_SIZE_BYTES = 2 * 1024 * 1024;
144
- const resultSizeInBytes = getObjectSizeInBytes(automationFunctionResult);
145
- if (resultSizeInBytes > MAX_RESULT_SIZE_BYTES) {
146
- return (0, _neverthrow.err)(new _errors.ResultTooBigError(resultSizeInBytes, MAX_RESULT_SIZE_BYTES));
147
- }
148
142
  try {
143
+ const automationFunctionResult = await automationFunction(...automationFunctionParameters);
144
+ const MAX_RESULT_SIZE_BYTES = 2 * 1024 * 1024;
145
+ const resultSizeInBytes = getObjectSizeInBytes(automationFunctionResult);
146
+ if (resultSizeInBytes > MAX_RESULT_SIZE_BYTES) {
147
+ return (0, _neverthrow.err)(new _errors.ResultTooBigError(resultSizeInBytes, MAX_RESULT_SIZE_BYTES));
148
+ }
149
149
  return (0, _neverthrow.ok)({
150
150
  result: automationFunctionResult,
151
151
  extendedPayloads: (0, _asyncLocalStorage.getExecutionContext)()?.extendedPayloads,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",