gcf-common-lib 0.13.0 → 0.13.1

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 (3) hide show
  1. package/index.js +2 -2
  2. package/index.ts +2 -2
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -62,14 +62,14 @@ class GcfCommon {
62
62
  });
63
63
  }
64
64
  static publish(event, context, json, attributes) {
65
- var _a, _b;
65
+ var _a, _b, _c;
66
66
  return __awaiter(this, void 0, void 0, function* () {
67
67
  const topic = yield this.getTopic(event, context);
68
68
  console.log('publish:', topic === null || topic === void 0 ? void 0 : topic.name, json);
69
69
  if (topic) {
70
70
  return yield topic.publishMessage({
71
71
  json,
72
- attributes: Object.assign(Object.assign({}, attributes), { requestId: (_b = (_a = event) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b.requestId, type: 'response', response: true }),
72
+ attributes: Object.assign(Object.assign({}, attributes), { requestId: (_c = (_b = (_a = event) === null || _a === void 0 ? void 0 : _a.attributes) === null || _b === void 0 ? void 0 : _b.requestId) !== null && _c !== void 0 ? _c : undefined, type: 'response', response: '1' }),
73
73
  });
74
74
  }
75
75
  });
package/index.ts CHANGED
@@ -110,9 +110,9 @@ export class GcfCommon {
110
110
  json,
111
111
  attributes: {
112
112
  ...attributes,
113
- requestId: (event as TPSEvent)?.attributes?.requestId,
113
+ requestId: (event as TPSEvent)?.attributes?.requestId ?? undefined,
114
114
  type: 'response',
115
- response: true,
115
+ response: '1',
116
116
  },
117
117
  });
118
118
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gcf-common-lib",
3
3
  "description": "",
4
- "version": "0.13.0",
4
+ "version": "0.13.1",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "branches": [