gcf-common-lib 0.23.26 → 0.23.28

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gcf-common-lib",
3
3
  "description": "",
4
- "version": "0.23.26",
4
+ "version": "0.23.28",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "branches": [
package/src/utils.js CHANGED
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.sentToQueueAsync = exports.withAmqpCh = exports.withAmqpConn = exports.A1ToColNum = exports.colNumToA1 = exports.A1ToIndex = exports.indexToA1 = exports.delay = exports.timeoutAfter = void 0;
15
+ exports.sendToQueueAsync = exports.withAmqpCh = exports.withAmqpConn = exports.A1ToColNum = exports.colNumToA1 = exports.A1ToIndex = exports.indexToA1 = exports.delay = exports.timeoutAfter = void 0;
16
16
  const amqplib_1 = require("amqplib");
17
17
  const bluebird_1 = __importDefault(require("bluebird"));
18
18
  /**
@@ -104,7 +104,7 @@ function withAmqpCh(fn, url) {
104
104
  });
105
105
  }
106
106
  exports.withAmqpCh = withAmqpCh;
107
- function sentToQueueAsync(ch, queue, json, options) {
107
+ function sendToQueueAsync(ch, queue, json, options) {
108
108
  return __awaiter(this, void 0, void 0, function* () {
109
109
  const payload = Buffer.from(JSON.stringify(json));
110
110
  const keepSending = ch.sendToQueue(queue, payload, options);
@@ -112,4 +112,4 @@ function sentToQueueAsync(ch, queue, json, options) {
112
112
  yield new Promise(resolve => ch.once('drain', () => resolve));
113
113
  });
114
114
  }
115
- exports.sentToQueueAsync = sentToQueueAsync;
115
+ exports.sendToQueueAsync = sendToQueueAsync;
package/src/utils.ts CHANGED
@@ -92,7 +92,7 @@ export async function withAmqpCh(fn: (ch: Channel) => Promise<any>, url: string)
92
92
  }, url);
93
93
  }
94
94
 
95
- export async function sentToQueueAsync(ch: Channel, queue: string, json: Dictionary<any>, options: Options.Publish) {
95
+ export async function sendToQueueAsync(ch: Channel, queue: string, json: Dictionary<any>, options?: Options.Publish) {
96
96
  const payload = Buffer.from(JSON.stringify(json));
97
97
  const keepSending = ch.sendToQueue(queue, payload, options);
98
98
  if (!keepSending) await new Promise(resolve => ch.once('drain', () => resolve));