@shushed/helpers 0.0.271 → 0.0.273

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.
@@ -552,6 +552,8 @@ class EnvEngine extends runtime_1.default {
552
552
  pauseOnError429ThresholdExceededSeconds: 60 * 10,
553
553
  pauseBeforeProcessingMessagesSeconds: 0,
554
554
  maxOutstandingMessages: 5,
555
+ topicAttributes: {},
556
+ subscriptionAttributes: {},
555
557
  ackDeadline: 10,
556
558
  retryMinDelay: 60,
557
559
  retryMaxDelay: 60 * 10,
@@ -307,13 +307,12 @@ class PubSubHelper extends runtime_1.default {
307
307
  'dlq': topicName.indexOf('.dlq') > -1 ? '1' : '0',
308
308
  'env': this.envName.toLowerCase(),
309
309
  'rn': '1',
310
- ...(Object.assign({}, attributes || {}), {
311
- 'bq': topicName.indexOf('.bq') > -1 ? '1' : '0',
312
- }),
310
+ 'bq': topicName.indexOf('.bq') > -1 ? '1' : '0',
311
+ ...(Object.assign({}, attributes || {}), {}),
313
312
  }
314
313
  };
315
314
  if (topic && !process.env.PUBSUB_EMULATOR_HOST) {
316
- const simMetadata = Object.assign({}, topicMetadata?.labels || {}, metadata.labels);
315
+ const simMetadata = Object.assign({}, metadata.labels);
317
316
  if (!(0, lodash_isequal_1.default)(topicMetadata?.labels, simMetadata)) {
318
317
  try {
319
318
  await topic.setMetadata({
@@ -406,7 +405,7 @@ class PubSubHelper extends runtime_1.default {
406
405
  'topic': normalizeCore(opts.topic.name.split('/').slice(-1)[0].split('---').slice(-1)[0].split('.')[0]) + (subscriptionName.indexOf('.int') > -1 ? '.int' : ''),
407
406
  ...(Object.assign({}, inputOpts.attributes || {})),
408
407
  };
409
- const simLabels = Object.assign({}, subscriptionMetaData?.labels || {}, proposedLabels);
408
+ const simLabels = Object.assign({}, proposedLabels);
410
409
  if (!(0, lodash_isequal_1.default)(simLabels, subscriptionMetaData?.labels)) {
411
410
  nextMetadata = nextMetadata || {};
412
411
  nextMetadata.labels = simLabels;
@@ -249,6 +249,8 @@ export type RNConfiguration = {
249
249
  pauseOnErrorThresholdExceededSeconds: number;
250
250
  pauseBeforeProcessingMessagesSeconds: number;
251
251
  maxOutstandingMessages: number;
252
+ topicAttributes: Record<string, string>;
253
+ subscriptionAttributes: Record<string, string>;
252
254
  ackDeadline: number;
253
255
  tableName: string;
254
256
  tableRetryMinDelay: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shushed/helpers",
3
- "version": "0.0.271",
3
+ "version": "0.0.273",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",