@anchan828/nest-cloud-run-queue-pubsub-publisher 3.1.1 → 3.1.3

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.
@@ -24,10 +24,13 @@ let PubSubPublisherService = class PubSubPublisherService {
24
24
  async publish(message, options) {
25
25
  const topicName = this.getTopicName(options);
26
26
  const topic = this.pubsub.topic(topicName, Object.assign({}, this.options.publishConfig, options));
27
- const { attributes, ...json } = this.options.extraConfig?.prePublish
27
+ const { attributes, ...data } = this.options.extraConfig?.prePublish
28
28
  ? await this.options.extraConfig?.prePublish(message)
29
29
  : message;
30
- const messageId = await topic.publishMessage({ attributes, json: json || {} });
30
+ const messageId = await topic.publishMessage({
31
+ attributes,
32
+ data: Buffer.from(JSON.stringify(data, this.options.extraConfig?.stringifyReplacer)),
33
+ });
31
34
  if (this.options.extraConfig?.postPublish) {
32
35
  await this.options.extraConfig?.postPublish(message, messageId);
33
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchan828/nest-cloud-run-queue-pubsub-publisher",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "https://github.com/anchan828/nest-cloud-run-queue/tree/master/packages/pubsub-publish#readme",
6
6
  "bugs": {
@@ -33,7 +33,7 @@
33
33
  "watch": "tsc -w"
34
34
  },
35
35
  "dependencies": {
36
- "@anchan828/nest-cloud-run-queue-common": "^3.1.1",
36
+ "@anchan828/nest-cloud-run-queue-common": "^3.1.3",
37
37
  "@google-cloud/pubsub": "^4.0.6"
38
38
  },
39
39
  "devDependencies": {
@@ -47,5 +47,5 @@
47
47
  "access": "public"
48
48
  },
49
49
  "packageManager": "npm@10.8.2",
50
- "gitHead": "aa316926176b40816565704e5372ceb0d3938543"
50
+ "gitHead": "c33cfa67028e79e9bf101108d7392e73ba26edca"
51
51
  }