@mhubcloud/tms_core 3.4.4 → 3.4.6

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/dist/index.js CHANGED
@@ -359,6 +359,8 @@ function matchEvent(event, publisherEvent) {
359
359
  if (!paramMatch) {
360
360
  return false;
361
361
  }
362
+ } else if (publisherEventParam && !eventParam) {
363
+ return false;
362
364
  } else {
363
365
  throw new Error("Unexpected formatting in publisher configuration");
364
366
  }
@@ -891,7 +893,7 @@ var publisher = {
891
893
  Facebook: facebook,
892
894
  // eslint-disable-next-line @typescript-eslint/naming-convention
893
895
  CJ: cj,
894
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unnecessary-type-assertion
896
+ // eslint-disable-next-line @typescript-eslint/naming-convention
895
897
  GoogleAds: googleAds,
896
898
  // eslint-disable-next-line @typescript-eslint/naming-convention
897
899
  GoogleAnalytics4: googleAnalytics4,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhubcloud/tms_core",
3
- "version": "3.4.4",
3
+ "version": "3.4.6",
4
4
  "description": "Core function for mHub Cloud TMS publishers",
5
5
  "homepage": "https://mhubcloud.com/",
6
6
  "license": "Apache 2.0",
@@ -41,10 +41,7 @@ export async function defaultPublisher(
41
41
  if (result.status === 'rejected') {
42
42
  if (result.reason instanceof Error) {
43
43
  const formattedError = utils.formatError(result.reason);
44
- utils.logException(
45
- azureFunctionContext.log,
46
- new Error(formattedError.message),
47
- );
44
+ utils.logException(new Error(formattedError.message));
48
45
  throw formattedError;
49
46
  } else {
50
47
  const formattedError = utils.formatError(
@@ -52,10 +49,7 @@ export async function defaultPublisher(
52
49
  ? JSON.stringify(result.reason)
53
50
  : (result.reason as Error['message']),
54
51
  );
55
- utils.logException(
56
- azureFunctionContext.log,
57
- new Error(formattedError.message),
58
- );
52
+ utils.logException(new Error(formattedError.message));
59
53
  throw formattedError;
60
54
  }
61
55
  }
@@ -112,7 +106,6 @@ async function processMessage(
112
106
  publishedAny = true;
113
107
  } else {
114
108
  utils.logException(
115
- log,
116
109
  new Error(
117
110
  `The message has not been published. Source: ${platformPublisher.source}`,
118
111
  ),
@@ -121,7 +114,6 @@ async function processMessage(
121
114
  }
122
115
  if (!publishedAny) {
123
116
  utils.logException(
124
- log,
125
117
  new Error(
126
118
  'The message has not been published to any publisher configuration',
127
119
  ),