Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wix/motion-edm-autogen-transformations

Package Overview
Dependencies
Maintainers
32
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wix/motion-edm-autogen-transformations - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

8

dist/esm/__tests__/converters.spec.js

@@ -19,5 +19,5 @@ import { __assign, __makeTemplateObject } from "tslib";

var key = _a.key, renamedKey = _a.renamedKey;
describe.each(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n description | value\n ", " | ", "\n ", " | ", "\n "], ["\n description | value\n ", " | ", "\n ", " | ", "\n "])), 'a string', aString(), 'null', null)("with " + key + " exists and is $description", function (_a) {
describe.each(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n description | value\n ", " | ", "\n ", " | ", "\n "], ["\n description | value\n ", " | ", "\n ", " | ", "\n "])), 'a string', aString(), 'null', null)("with ".concat(key, " exists and is $description"), function (_a) {
var value = _a.value;
test("adds an " + renamedKey + " property with the same value as the " + key + " property", function () {
test("adds an ".concat(renamedKey, " property with the same value as the ").concat(key, " property"), function () {
var _a, _b;

@@ -27,3 +27,3 @@ var requestPayload = __assign(__assign({}, otherPayloadFields), (_a = {}, _a[key] = value, _a));

});
test("recursively adds " + renamedKey + " to nested objects and arrays", function () {
test("recursively adds ".concat(renamedKey, " to nested objects and arrays"), function () {
var _a, _b;

@@ -47,3 +47,3 @@ var objectWithUnderscoreId = __assign(__assign({}, otherPayloadFields), (_a = {}, _a[key] = value, _a));

var key = _a.key, renamedKey = _a.renamedKey;
describe("when " + key + " exists in the response payload", function () {
describe("when ".concat(key, " exists in the response payload"), function () {
test.each(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n description | value\n ", " | ", "\n ", " | ", "\n "], ["\n description | value\n ", " | ", "\n ", " | ", "\n "])), 'a string', aString(), 'null', null)('recursively adds it to nested objects and arrays when it is $description', function (_a) {

@@ -50,0 +50,0 @@ var _b, _c;

@@ -7,3 +7,3 @@ import { __assign, __makeTemplateObject } from "tslib";

var sourceObjectPath = 'a.b.c';
describe.each(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transformationFunction | expression | sourceFactory | undefinedFallback\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "], ["\n transformationFunction | expression | sourceFactory | undefinedFallback\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "])), transformToRequestMessage, "$[0]." + sourceObjectPath, function (sourceValue) { return [sourceValue]; }, {}, transformResponseMessage, "$." + sourceObjectPath, function (sourceValue) { return sourceValue; }, undefined)('$transformationFunction.name - omitting fields', function (_a) {
describe.each(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transformationFunction | expression | sourceFactory | undefinedFallback\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "], ["\n transformationFunction | expression | sourceFactory | undefinedFallback\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "])), transformToRequestMessage, "$[0].".concat(sourceObjectPath), function (sourceValue) { return [sourceValue]; }, {}, transformResponseMessage, "$.".concat(sourceObjectPath), function (sourceValue) { return sourceValue; }, undefined)('$transformationFunction.name - omitting fields', function (_a) {
var transformationFunction = _a.transformationFunction, expression = _a.expression, sourceFactory = _a.sourceFactory, undefinedFallback = _a.undefinedFallback;

@@ -57,3 +57,3 @@ var _b = times(2, function () { return anObject(); }), objectToKeep = _b[0], objectToOmit = _b[1];

describe('spread operator', function () {
test.each(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n transformationFunction | expression | sourceFactory\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n transformationFunction | expression | sourceFactory\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), transformToRequestMessage, "$[0]." + sourceObjectPath, function (sourceValue) { return [sourceValue]; }, transformResponseMessage, "$." + sourceObjectPath, function (sourceValue) { return sourceValue; })('$transformationFunction.name - supports complex expressions', function (_a) {
test.each(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n transformationFunction | expression | sourceFactory\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n transformationFunction | expression | sourceFactory\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), transformToRequestMessage, "$[0].".concat(sourceObjectPath), function (sourceValue) { return [sourceValue]; }, transformResponseMessage, "$.".concat(sourceObjectPath), function (sourceValue) { return sourceValue; })('$transformationFunction.name - supports complex expressions', function (_a) {
var _b, _c;

@@ -111,3 +111,3 @@ var transformationFunction = _a.transformationFunction, sourceFactory = _a.sourceFactory, expression = _a.expression;

/* eslint-disable max-len */
test.each(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n transformationFunction | transformation | source\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n transformationFunction | transformation | source\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), transformToRequestMessage, { '*': '$[0].a', b: { newC: "$[0].a.b." + keyThatShouldNotAppearInTransformed } }, [sourceBase], transformResponseMessage, { '*': '$.a', b: { newC: "$.a.b." + keyThatShouldNotAppearInTransformed } }, sourceBase)('$transformationFunction.name - does not override sibling properties at the spread target', function (_a) {
test.each(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n transformationFunction | transformation | source\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n transformationFunction | transformation | source\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), transformToRequestMessage, { '*': '$[0].a', b: { newC: "$[0].a.b.".concat(keyThatShouldNotAppearInTransformed) } }, [sourceBase], transformResponseMessage, { '*': '$.a', b: { newC: "$.a.b.".concat(keyThatShouldNotAppearInTransformed) } }, sourceBase)('$transformationFunction.name - does not override sibling properties at the spread target', function (_a) {
/* eslint-enable max-len */

@@ -123,3 +123,3 @@ var transformationFunction = _a.transformationFunction, transformation = _a.transformation, source = _a.source;

/* eslint-disable max-len */
test.each(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n transformationFunction | transformation | source\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n transformationFunction | transformation | source\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), transformToRequestMessage, { topLevel: { '*': '$[0].a', b: { newC: "$[0].a.b." + keyThatShouldNotAppearInTransformed } } }, [sourceBase], transformResponseMessage, { topLevel: { '*': '$.a', b: { newC: "$.a.b." + keyThatShouldNotAppearInTransformed } } }, sourceBase)('$transformationFunction.name - does not override nested sibling properties at the spread target', function (_a) {
test.each(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n transformationFunction | transformation | source\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n transformationFunction | transformation | source\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), transformToRequestMessage, { topLevel: { '*': '$[0].a', b: { newC: "$[0].a.b.".concat(keyThatShouldNotAppearInTransformed) } } }, [sourceBase], transformResponseMessage, { topLevel: { '*': '$.a', b: { newC: "$.a.b.".concat(keyThatShouldNotAppearInTransformed) } } }, sourceBase)('$transformationFunction.name - does not override nested sibling properties at the spread target', function (_a) {
/* eslint-enable max-len */

@@ -159,9 +159,9 @@ var transformationFunction = _a.transformationFunction, transformation = _a.transformation, source = _a.source;

var constantArgumentExpression = aString();
var functionCallSimpleTransformation = "#someCustomFunction(" + idJsonPath + ", " + constantArgumentExpression + ")";
var functionCallSimpleTransformation = "#someCustomFunction(".concat(idJsonPath, ", ").concat(constantArgumentExpression, ")");
var transformation = { id: functionCallSimpleTransformation };
var someCustomFunction = function (s1, s2) { return [s1, s1].join('>>>') + "___" + s2; };
var someCustomFunction = function (s1, s2) { return "".concat([s1, s1].join('>>>'), "___").concat(s2); };
test('are applied when transforming using complex mapping', function () {
var customFunctions = { someCustomFunction: someCustomFunction };
expect(transformationFunction(source, transformation, customFunctions)).toStrictEqual({
id: id + ">>>" + id + "___" + constantArgumentExpression,
id: "".concat(id, ">>>").concat(id, "___").concat(constantArgumentExpression),
});

@@ -171,3 +171,3 @@ });

var customFunctions = { someCustomFunction: someCustomFunction };
expect(transformationFunction(source, functionCallSimpleTransformation, customFunctions)).toStrictEqual(id + ">>>" + id + "___" + constantArgumentExpression);
expect(transformationFunction(source, functionCallSimpleTransformation, customFunctions)).toStrictEqual("".concat(id, ">>>").concat(id, "___").concat(constantArgumentExpression));
});

@@ -204,4 +204,4 @@ test('throws when the function is not recognized', function () {

]);
var sourceBase = set(validSource, sourceObjectPath + "." + nonArrayPath, nonArrayPathValue);
describe.each(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n transformationFunction | rootPathExpression | source | expectedForNonExistingPath\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "], ["\n transformationFunction | rootPathExpression | source | expectedForNonExistingPath\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "])), transformToRequestMessage, "$[0]." + sourceObjectPath, [sourceBase], {}, transformResponseMessage, "$." + sourceObjectPath, sourceBase, undefined)('$transformationFunction.name', function (_a) {
var sourceBase = set(validSource, "".concat(sourceObjectPath, ".").concat(nonArrayPath), nonArrayPathValue);
describe.each(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n transformationFunction | rootPathExpression | source | expectedForNonExistingPath\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "], ["\n transformationFunction | rootPathExpression | source | expectedForNonExistingPath\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "])), transformToRequestMessage, "$[0].".concat(sourceObjectPath), [sourceBase], {}, transformResponseMessage, "$.".concat(sourceObjectPath), sourceBase, undefined)('$transformationFunction.name', function (_a) {
var transformationFunction = _a.transformationFunction, rootPathExpression = _a.rootPathExpression, source = _a.source, expectedForNonExistingPath = _a.expectedForNonExistingPath;

@@ -256,3 +256,3 @@ test('maps each item from the source object to a new array as a top-level transformation', function () {

var transformation = {
'@path': rootPathExpression + "." + path,
'@path': "".concat(rootPathExpression, ".").concat(path),
'@itemTransformation': '$.aaa',

@@ -265,3 +265,3 @@ };

var transformation = set({}, transformationPath, {
'@path': rootPathExpression + "." + path,
'@path': "".concat(rootPathExpression, ".").concat(path),
'@itemTransformation': '$.aaa',

@@ -281,3 +281,3 @@ });

describe('constant transformation', function () {
describe.each(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n transformationFunction | expression | sourceFactory\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n transformationFunction | expression | sourceFactory\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), transformToRequestMessage, "$[0]." + sourceObjectPath, function (sourceValue) { return [sourceValue]; }, transformResponseMessage, "$." + sourceObjectPath, function (sourceValue) { return sourceValue; })('$transformationFunction.name - omitting fields', function (_a) {
describe.each(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n transformationFunction | expression | sourceFactory\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n transformationFunction | expression | sourceFactory\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), transformToRequestMessage, "$[0].".concat(sourceObjectPath), function (sourceValue) { return [sourceValue]; }, transformResponseMessage, "$.".concat(sourceObjectPath), function (sourceValue) { return sourceValue; })('$transformationFunction.name - omitting fields', function (_a) {
var transformationFunction = _a.transformationFunction, expression = _a.expression, sourceFactory = _a.sourceFactory;

@@ -284,0 +284,0 @@ var sourceValue = aString();

@@ -33,3 +33,3 @@ import { __makeTemplateObject } from "tslib";

/* eslint-disable max-len */
test.each(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n description | functionArguments | transformation | expectedPayload\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "], ["\n description | functionArguments | transformation | expectedPayload\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "])), 'primitive arguments', [stringArg, numericArg], { a: '$[0]', b: '$[1]' }, { a: stringArg, b: numericArg }, 'object argument', [stringArg, objectArg], { a: '$[0]', b: '$[1]' }, { a: stringArg, b: objectArg }, 'object argument - nested field', [stringArg, objectArg], { a: '$[0]', b: "$[1]." + objectKey }, { a: stringArg, b: objectValue }, 'array argument', [stringArg, arrayArg], { a: '$[0]', b: "$[1][0]" }, { a: stringArg, b: firstArrayItem }, 'array argument - nested field', [stringArg, arrayArg], { a: '$[0]', b: "$[1][1]." + lastArrayItemKey }, { a: stringArg, b: lastArrayItemValue })('$description', function (_a) {
test.each(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n description | functionArguments | transformation | expectedPayload\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "], ["\n description | functionArguments | transformation | expectedPayload\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n ", " | ", " | ", " | ", "\n "])), 'primitive arguments', [stringArg, numericArg], { a: '$[0]', b: '$[1]' }, { a: stringArg, b: numericArg }, 'object argument', [stringArg, objectArg], { a: '$[0]', b: '$[1]' }, { a: stringArg, b: objectArg }, 'object argument - nested field', [stringArg, objectArg], { a: '$[0]', b: "$[1].".concat(objectKey) }, { a: stringArg, b: objectValue }, 'array argument', [stringArg, arrayArg], { a: '$[0]', b: "$[1][0]" }, { a: stringArg, b: firstArrayItem }, 'array argument - nested field', [stringArg, arrayArg], { a: '$[0]', b: "$[1][1].".concat(lastArrayItemKey) }, { a: stringArg, b: lastArrayItemValue })('$description', function (_a) {
var functionArguments = _a.functionArguments, transformation = _a.transformation, expectedPayload = _a.expectedPayload;

@@ -36,0 +36,0 @@ /* eslint-enable max-len */

@@ -29,3 +29,3 @@ import { __makeTemplateObject } from "tslib";

/* eslint-disable max-len */
test.each(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n description | transformation | expectedReturnValue\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n description | transformation | expectedReturnValue\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), 'primitive value extraction', '$.someString', someString, 'object extraction', '$.someObject', someObject, 'object property extraction', "$.someObject." + objectKey, objectValue, 'entire array extraction', "$.someArray", someArray, 'array item', "$.someArray[0]", firstArrayItem, 'array item nested field', "$.someArray[1]." + lastArrayItemKey, lastArrayItemValue)('extract a $description as a return value', function (_a) {
test.each(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n description | transformation | expectedReturnValue\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n description | transformation | expectedReturnValue\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), 'primitive value extraction', '$.someString', someString, 'object extraction', '$.someObject', someObject, 'object property extraction', "$.someObject.".concat(objectKey), objectValue, 'entire array extraction', "$.someArray", someArray, 'array item', "$.someArray[0]", firstArrayItem, 'array item nested field', "$.someArray[1].".concat(lastArrayItemKey), lastArrayItemValue)('extract a $description as a return value', function (_a) {
var transformation = _a.transformation, expectedReturnValue = _a.expectedReturnValue;

@@ -39,3 +39,3 @@ /* eslint-enable max-len */

/* eslint-disable max-len */
test.each(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n description | transformation | expectedReturnValue\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n description | transformation | expectedReturnValue\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), 'primitive values', { a: '$.someString', b: '$.someNumber' }, { a: someString, b: someNumber }, 'an array', { a: '$.someArray', b: '$.someNumber' }, { a: someArray, b: someNumber }, 'an array item', { a: '$.someArray[0]', b: "$.someArray[1]" }, { a: firstArrayItem, b: lastArrayItem }, 'a nested field of an array item', { a: '$.someString', b: "$.someArray[1]." + lastArrayItemKey }, { a: someString, b: lastArrayItemValue }, 'an object', { a: '$.someObject', b: '$.someNumber' }, { a: someObject, b: someNumber }, 'an object property value', { a: "$.someObject." + objectKey, b: '$.someNumber' }, { a: objectValue, b: someNumber })('map $description to the return-value object properties', function (_a) {
test.each(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n description | transformation | expectedReturnValue\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n "], ["\n description | transformation | expectedReturnValue\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n ", " | ", " | ", "\n "])), 'primitive values', { a: '$.someString', b: '$.someNumber' }, { a: someString, b: someNumber }, 'an array', { a: '$.someArray', b: '$.someNumber' }, { a: someArray, b: someNumber }, 'an array item', { a: '$.someArray[0]', b: "$.someArray[1]" }, { a: firstArrayItem, b: lastArrayItem }, 'a nested field of an array item', { a: '$.someString', b: "$.someArray[1].".concat(lastArrayItemKey) }, { a: someString, b: lastArrayItemValue }, 'an object', { a: '$.someObject', b: '$.someNumber' }, { a: someObject, b: someNumber }, 'an object property value', { a: "$.someObject.".concat(objectKey), b: '$.someNumber' }, { a: objectValue, b: someNumber })('map $description to the return-value object properties', function (_a) {
var transformation = _a.transformation, expectedReturnValue = _a.expectedReturnValue;

@@ -42,0 +42,0 @@ /* eslint-enable max-len */

@@ -9,3 +9,3 @@ import { __makeTemplateObject } from "tslib";

var argumentNames = times(3, function () { return aString(); });
var stableArgumentNames = ["zzz" + aString(), "yyy" + aString()];
var stableArgumentNames = ["zzz".concat(aString()), "yyy".concat(aString())];
var message = aString();

@@ -146,3 +146,3 @@ describe('system errors', function () {

fieldViolations: [
{ field: argumentNames[1] + ".some.arg.field", description: description },
{ field: "".concat(argumentNames[1], ".some.arg.field"), description: description },
],

@@ -163,3 +163,3 @@ },

fieldViolations: [
{ field: fieldPathPrefix + ".someValueWrapper", description: description },
{ field: "".concat(fieldPathPrefix, ".someValueWrapper"), description: description },
],

@@ -178,3 +178,3 @@ },

fieldViolations: [
{ field: argumentNames[0] + ".something", description: description },
{ field: "".concat(argumentNames[0], ".something"), description: description },
],

@@ -220,3 +220,3 @@ },

{
field: stableArgumentNames[0] + ".maxPurchasesPerBuyer",
field: "".concat(stableArgumentNames[0], ".maxPurchasesPerBuyer"),
description: description,

@@ -223,0 +223,0 @@ },

@@ -8,3 +8,3 @@ import { aString, anObject } from '@wix/motion-runtime-test-context';

var description = aString();
var originalPath = "some.nested.path." + propertyName;
var originalPath = "some.nested.path.".concat(propertyName);
var fieldViolations = [{ field: originalPath, description: description }];

@@ -20,3 +20,3 @@ describe('identity transformation', function () {

{
field: argumentNames[0] + "." + originalPath,
field: "".concat(argumentNames[0], ".").concat(originalPath),
description: description,

@@ -36,3 +36,3 @@ },

{
field: argumentNames[1] + ".another.field",
field: "".concat(argumentNames[1], ".another.field"),
description: description,

@@ -64,9 +64,9 @@ },

var fieldName = 'emails';
var path = "info." + fieldName;
var path = "info.".concat(fieldName);
var wrapper = 'items';
var subField = aString();
var wrappedFieldViolations = [
{ field: path + "." + wrapper + "[0]." + subField, description: description },
{ field: "".concat(path, ".").concat(wrapper, "[0].").concat(subField), description: description },
];
var transformation = set({}, path, "#wrap($[0]." + fieldName + ", " + wrapper + ")");
var transformation = set({}, path, "#wrap($[0].".concat(fieldName, ", ").concat(wrapper, ")"));
expect(violationsWithRenamedFields({

@@ -78,3 +78,3 @@ transformation: transformation,

{
field: argumentNames[0] + "." + fieldName + "[0]." + subField,
field: "".concat(argumentNames[0], ".").concat(fieldName, "[0].").concat(subField),
description: description,

@@ -99,3 +99,3 @@ },

{
field: argumentNames[1] + ".another.object." + propertyName,
field: "".concat(argumentNames[1], ".another.object.").concat(propertyName),
description: description,

@@ -102,0 +102,0 @@ },

@@ -41,8 +41,8 @@ import { constantCase } from 'constant-case';

.value();
var message = "INVALID_ARGUMENT: " + transformedFieldViolations
var message = "INVALID_ARGUMENT: ".concat(transformedFieldViolations
.map(function (_a) {
var field = _a.field, description = _a.description;
return "\"" + field + "\" " + description;
return "\"".concat(field, "\" ").concat(description);
})
.join(', ');
.join(', '));
var details = {

@@ -79,3 +79,3 @@ validationError: { fieldViolations: transformedFieldViolations },

var data = get(ambassadorHTTPError, 'response.details.applicationError.data', {});
var combinedMessage = message === description ? message : message + ": " + description;
var combinedMessage = message === description ? message : "".concat(message, ": ").concat(description);
var details = {

@@ -96,3 +96,3 @@ applicationError: {

var message = ambassadorHTTPError.requestId
? "System error occurred, request-id: " + ambassadorHTTPError.requestId
? "System error occurred, request-id: ".concat(ambassadorHTTPError.requestId)
: 'System error occurred';

@@ -99,0 +99,0 @@ return buildError({

@@ -25,3 +25,3 @@ import { __assign } from "tslib";

case 'wrap':
acc.explicitPathsToArguments[path + "." + wrappingName] =
acc.explicitPathsToArguments["".concat(path, ".").concat(wrappingName)] =
transformationPath;

@@ -76,3 +76,3 @@ break;

if (transformation === JS_SINGLE_ARG_UNCHANGED) {
return __assign(__assign({}, fieldViolation), { field: argumentNames[0] + "." + fieldViolation.field });
return __assign(__assign({}, fieldViolation), { field: "".concat(argumentNames[0], ".").concat(fieldViolation.field) });
}

@@ -79,0 +79,0 @@ return fieldViolation;

@@ -5,3 +5,3 @@ import { getArgumentIndex } from '@wix/motion-edm-autogen-transformations-core';

if (argIndex !== null) {
return fieldValue.replace("$[" + argIndex + "]", argumentNames[argIndex]);
return fieldValue.replace("$[".concat(argIndex, "]"), argumentNames[argIndex]);
}

@@ -8,0 +8,0 @@ return fieldValue;

{
"name": "@wix/motion-edm-autogen-transformations",
"version": "1.4.0",
"version": "1.5.0",
"license": "UNLICENSED",

@@ -38,4 +38,4 @@ "author": {

"dependencies": {
"@wix/motion-edm-autogen-common": "1.3.0",
"@wix/motion-edm-autogen-transformations-core": "1.3.0",
"@wix/motion-edm-autogen-common": "1.4.0",
"@wix/motion-edm-autogen-transformations-core": "1.4.0",
"@babel/runtime": "^7.0.0",

@@ -42,0 +42,0 @@ "@rushstack/eslint-patch": "^1.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc