@forzalabs/remora 0.0.22 → 0.0.23

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/Constants.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const CONSTANTS = {
4
- cliVersion: '0.0.22',
4
+ cliVersion: '0.0.23',
5
5
  lambdaVersion: 1,
6
6
  port: 5069,
7
7
  defaults: {
@@ -130,9 +130,16 @@ class ValidatorClass {
130
130
  const errors = [];
131
131
  const trxsFields = fields.filter(x => x.transform);
132
132
  for (const field of trxsFields) {
133
- const transformations = Object.keys(field.transform);
134
- if (transformations.length !== 1)
135
- errors.push(`There can only be 1 transformation type in your transformation pipeline. Field "${field.key}" got ${transformations.length}`);
133
+ const trxToValidate = [];
134
+ if (Array.isArray(field.transform))
135
+ trxToValidate.push(...field.transform);
136
+ else
137
+ trxToValidate.push(field.transform);
138
+ for (const trans of trxToValidate) {
139
+ const trxKeys = Object.keys(trans);
140
+ if (trxKeys.length !== 1)
141
+ errors.push(`There can only be 1 transformation type in your transformation pipeline. Field "${field.key}" got ${trxKeys.length}`);
142
+ }
136
143
  }
137
144
  return errors;
138
145
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forzalabs/remora",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "A powerful CLI tool for seamless data translation.",
5
5
  "main": "index.js",
6
6
  "private": false,