@clxmedia/emailhub-client 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/dist/client.js +1 -7
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.EmailHubClient = exports.EmailHubPriorityLevel = void 0;
13
- const pubsub_1 = require("@google-cloud/pubsub");
14
13
  const uuid = require("uuid");
15
14
  const Pako = require("pako");
16
15
  const axios_1 = require("axios");
@@ -22,12 +21,6 @@ var EmailHubPriorityLevel;
22
21
  const DEFAULT_EMAIL_HUB_URL = 'https://emailhub.clxp.us';
23
22
  class EmailHubClient {
24
23
  constructor(cfg) {
25
- try {
26
- this.cloudPubSub = new pubsub_1.PubSub();
27
- }
28
- catch (e) {
29
- this.cloudPubSub = null;
30
- }
31
24
  this.sender = cfg.sender;
32
25
  this.server = cfg.server ? cfg.server : DEFAULT_EMAIL_HUB_URL;
33
26
  }
@@ -36,6 +29,7 @@ class EmailHubClient {
36
29
  }
37
30
  sendEmail(msg, options) {
38
31
  return __awaiter(this, void 0, void 0, function* () {
32
+ this.cloudPubSub = null;
39
33
  const xMailGuid = options && options.xMailGuid ? options.xMailGuid : uuid.v4();
40
34
  msg.CustomID = xMailGuid;
41
35
  const topic = options && options.priority && options.priority === EmailHubPriorityLevel.BULK ? 'send-new-email-bulk' : 'send-new-email';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/emailhub-client",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "CLXperience EmailHub Client",
5
5
  "author": "Brandon Thompson <brandont@clxmedia.com>",
6
6
  "license": "MIT",