Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): pull release/v1.51.0 into main #2878

Merged
merged 23 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a6f7d13
chore(release): pull main into develop post release v1.50.0 (#2827)
aashishmalik Nov 14, 2023
06c6503
chore: update import and export names, default new routes (#2810)
utsabc Nov 14, 2023
ff80b88
feat(INT-305): onboard gladly destination (#2786)
mihir-4116 Nov 14, 2023
e5f8714
chore: capture correct status code on faas pod time out (#2831)
abhimanyubabbar Nov 16, 2023
5c63d2c
chore: add date mock to fix timestamp validation in tests (#2844)
sandeepdsvs Nov 21, 2023
9eda50e
feat: mixpanel set once feature onboard (#2820)
shrouti1507 Nov 23, 2023
8c02b8c
fix: unhandled error code in facebook_custom_audience (#2853)
sanpj2292 Nov 28, 2023
cd9a046
fix: sfmc bug fix for track event validations (#2852)
utsabc Nov 29, 2023
91d4cd1
fix: remove errorCategory for braze dedup error (#2850)
sanpj2292 Nov 29, 2023
3127a1c
feat: update facebook destinations API version to v18.0 (#2828)
sandeepdsvs Nov 29, 2023
0e7adc6
fix: bugsnag issue in moengage identify event (#2845)
sanpj2292 Nov 29, 2023
27f0797
feat: cm360 transformerproxy V1 flag (#2848)
aashishmalik Nov 30, 2023
571dbf5
fix: encode &, < and > to html counterparts in adobe analytics (#2854)
yashasvibajpai Nov 30, 2023
4b260e4
feat: cm360 router batching (#2836)
aashishmalik Nov 30, 2023
1a8d825
fix: updated transformerProxyV1 name (#2859)
aashishmalik Dec 1, 2023
a015460
fix: error handling in active_campaign (#2843)
sanpj2292 Dec 1, 2023
284d141
feat: onboard webhook to component tests (#2837)
aashishmalik Dec 1, 2023
80cf69d
fix: make supportTransformerProxyV1 false (#2861)
aashishmalik Dec 1, 2023
7910dba
feat: marketo: migrate config fields and fix test cases (#2789)
anantjain45823 Dec 2, 2023
e48eda6
Merge branch 'main' of github.com:rudderlabs/rudder-transformer into …
krishna2020 Dec 5, 2023
c2317a1
chore(release): pull main into develop post release v1.50.1 (#2877)
utsabc Dec 5, 2023
be6ef26
fix: add support for custom properties for braze purchase events (#2856)
utsabc Dec 6, 2023
669ed41
chore(release): 1.51.0
web-flow Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@typescript-eslint/no-explicit-any": "off",
"class-methods-use-this": "off",
"@typescript-eslint/return-await": "error",
"import/prefer-default-export": "error",
"import/prefer-default-export": "off",
"sonarjs/no-ignored-return": "error",
"no-new": "error",
"@typescript-eslint/no-shadow": "error",
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.51.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.50.1...v1.51.0) (2023-12-06)


### Features

* cm360 router batching ([#2836](https://github.com/rudderlabs/rudder-transformer/issues/2836)) ([4b260e4](https://github.com/rudderlabs/rudder-transformer/commit/4b260e4ec6d25875903830004b3e4975b3402b2d))
* cm360 transformerproxy V1 flag ([#2848](https://github.com/rudderlabs/rudder-transformer/issues/2848)) ([27f0797](https://github.com/rudderlabs/rudder-transformer/commit/27f0797c6dcd626a713c11a48c6e85a69e0a4963))
* **INT-305:** onboard gladly destination ([#2786](https://github.com/rudderlabs/rudder-transformer/issues/2786)) ([ff80b88](https://github.com/rudderlabs/rudder-transformer/commit/ff80b885fe0507c137b3c9eacffcef331010da0c))
* marketo: migrate config fields and fix test cases ([#2789](https://github.com/rudderlabs/rudder-transformer/issues/2789)) ([7910dba](https://github.com/rudderlabs/rudder-transformer/commit/7910dba2318f92cec3be1b7c7aa6b00428ecae94))
* mixpanel set once feature onboard ([#2820](https://github.com/rudderlabs/rudder-transformer/issues/2820)) ([9eda50e](https://github.com/rudderlabs/rudder-transformer/commit/9eda50e850c5a1ccb46f1b54c3d176edb915eb27))
* onboard webhook to component tests ([#2837](https://github.com/rudderlabs/rudder-transformer/issues/2837)) ([284d141](https://github.com/rudderlabs/rudder-transformer/commit/284d1411514c26dda2403a4a18967e5f40e255ea))
* update facebook destinations API version to v18.0 ([#2828](https://github.com/rudderlabs/rudder-transformer/issues/2828)) ([3127a1c](https://github.com/rudderlabs/rudder-transformer/commit/3127a1ca8dc1b887f9158a1d839c5504f40c4678))


### Bug Fixes

* add support for custom properties for braze purchase events ([#2856](https://github.com/rudderlabs/rudder-transformer/issues/2856)) ([be6ef26](https://github.com/rudderlabs/rudder-transformer/commit/be6ef2605f04e9182534b9633eeec1091cf7a431))
* bugsnag issue in moengage identify event ([#2845](https://github.com/rudderlabs/rudder-transformer/issues/2845)) ([0e7adc6](https://github.com/rudderlabs/rudder-transformer/commit/0e7adc66ff88d9510e48a5651460b4e02cc57c78))
* encode &, < and > to html counterparts in adobe analytics ([#2854](https://github.com/rudderlabs/rudder-transformer/issues/2854)) ([571dbf5](https://github.com/rudderlabs/rudder-transformer/commit/571dbf5bd65e7d0e261562ff3da3b393f27f27b6))
* error handling in active_campaign ([#2843](https://github.com/rudderlabs/rudder-transformer/issues/2843)) ([a015460](https://github.com/rudderlabs/rudder-transformer/commit/a015460f0a6d2d5320f633abc151febf22561b6b))
* make supportTransformerProxyV1 false ([#2861](https://github.com/rudderlabs/rudder-transformer/issues/2861)) ([80cf69d](https://github.com/rudderlabs/rudder-transformer/commit/80cf69dc40bb4dc7c0a6d516814f36d962018745))
* remove errorCategory for braze dedup error ([#2850](https://github.com/rudderlabs/rudder-transformer/issues/2850)) ([91d4cd1](https://github.com/rudderlabs/rudder-transformer/commit/91d4cd16f9839b0be5a663ca5010bdd72cff9bdc))
* sfmc bug fix for track event validations ([#2852](https://github.com/rudderlabs/rudder-transformer/issues/2852)) ([cd9a046](https://github.com/rudderlabs/rudder-transformer/commit/cd9a046f66eab8363373cb9a0fa1afeef3137d78))
* unhandled error code in facebook_custom_audience ([#2853](https://github.com/rudderlabs/rudder-transformer/issues/2853)) ([8c02b8c](https://github.com/rudderlabs/rudder-transformer/commit/8c02b8ccb2101147ac84b4555e7fd07235ebf9fc))
* updated transformerProxyV1 name ([#2859](https://github.com/rudderlabs/rudder-transformer/issues/2859)) ([1a8d825](https://github.com/rudderlabs/rudder-transformer/commit/1a8d825ccbb87d34d8ae5ff2cb02f4be9700eee6))

### [1.50.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.50.0...v1.50.1) (2023-12-05)


Expand Down
135 changes: 111 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rudder-transformer",
"version": "1.50.1",
"version": "1.51.0",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down Expand Up @@ -28,6 +28,7 @@
"build:ci": "tsc -p tsconfig.json",
"build:swagger": "npm run build && npm run setup:swagger",
"build": "npm run build:ci && npm run copy",
"clean:build": "npm run clean && npm run build",
"build:clean": "npm run clean && npm run build",
"verify": "eslint . || exit 1; npm run test:js || exit 1",
"test:testRouter": "jest testRouter --detectOpenHandles --coverage --notify --watchAll=false",
Expand Down Expand Up @@ -64,7 +65,7 @@
"@ndhoule/extend": "^2.0.0",
"@pyroscope/nodejs": "^0.2.6",
"@rudderstack/integrations-lib": "^0.1.8",
"@rudderstack/workflow-engine": "^0.5.7",
"@rudderstack/workflow-engine": "^0.6.9",
"ajv": "^8.12.0",
"ajv-draft-04": "^1.0.0",
"ajv-formats": "^2.1.1",
Expand Down
18 changes: 15 additions & 3 deletions src/adapters/networkHandlerFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const { getIntegrations } = require('../routes/utils');

const handlers = {
generic: GenericNetworkHandler,
v0: {},
v1: {},
};

// Dynamically import the network handlers for all
Expand All @@ -16,16 +18,26 @@ SUPPORTED_VERSIONS.forEach((version) => {
const destinations = getIntegrations(path.resolve(__dirname, `../${version}/destinations`));
destinations.forEach((dest) => {
try {
handlers[dest] = require(`../${version}/destinations/${dest}/networkHandler`).networkHandler;
// handles = {
// v0: {
// dest: handler
// },
// v1: {
// dest: handler
// },
// generic: GenericNetworkHandler,
// }
handlers[version][dest] =
require(`../${version}/destinations/${dest}/networkHandler`).networkHandler;
} catch {
// Do nothing as exception indicates
// network handler is not defined for that destination
}
});
});

const getNetworkHandler = (type) => {
const NetworkHandler = handlers[type] || handlers.generic;
const getNetworkHandler = (type, version) => {
const NetworkHandler = handlers[version][type] || handlers.generic;
return new NetworkHandler();
};

Expand Down
25 changes: 25 additions & 0 deletions src/adapters/networkHandlerFactory.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const { getNetworkHandler } = require('./networkHandlerFactory');
const { networkHandler: GenericNetworkHandler } = require('./networkhandler/genericNetworkHandler');

describe(`Network Handler Tests`, () => {
it('Should return v0 networkhandler', () => {
let proxyHandler = getNetworkHandler('campaign_manager', `v0`);
const cmProxy = require(`../v0/destinations/campaign_manager/networkHandler`).networkHandler;
expect(proxyHandler).toEqual(new cmProxy());

proxyHandler = getNetworkHandler('braze', `v0`);
const brazeProxy = require(`../v0/destinations/braze/networkHandler`).networkHandler;
expect(proxyHandler).toEqual(new brazeProxy());
});

it('Should return v1 networkhandler', () => {
let proxyHandler = getNetworkHandler('campaign_manager', `v1`);
const cmProxy = require(`../v1/destinations/campaign_manager/networkHandler`).networkHandler;
expect(proxyHandler).toEqual(new cmProxy());
});

it('Should return genericHandler if v1 proxy and handler is not present for destination', () => {
let proxyHandler = getNetworkHandler('braze', `v1`);
expect(proxyHandler).toEqual(new GenericNetworkHandler());
});
});
Loading
Loading