@google/events
Advanced tools
@@ -19,3 +19,3 @@ # Contributing | ||
| qt \ | ||
| --in=$PWD/../google-cloudevents/proto \ | ||
| --in=$(dirname $PWD)/google-cloudevents/proto \ | ||
| --out=$PWD \ | ||
@@ -22,0 +22,0 @@ --l=typescript |
+7
-0
| # Changelog | ||
| ### [1.4.2](https://www.github.com/googleapis/google-cloudevents-nodejs/compare/v1.4.1...v1.4.2) (2020-09-09) | ||
| ### Bug Fixes | ||
| * fix pub/sub message type ([#45](https://www.github.com/googleapis/google-cloudevents-nodejs/issues/45)) ([bdbdd2a](https://www.github.com/googleapis/google-cloudevents-nodejs/commit/bdbdd2a949e5003f0a439c164ca789fef9a7f1fe)) | ||
| ### [1.4.1](https://www.github.com/googleapis/google-cloudevents-nodejs/compare/v1.4.0...v1.4.1) (2020-09-09) | ||
@@ -4,0 +11,0 @@ |
@@ -19,3 +19,3 @@ export interface MessagePublishedDataObject { | ||
| data?: string; | ||
| message_id?: string; | ||
| messageId?: string; | ||
| } | ||
@@ -22,0 +22,0 @@ export declare class Convert { |
@@ -158,3 +158,3 @@ "use strict"; | ||
| { json: "data", js: "data", typ: u(undefined, "") }, | ||
| { json: "message_id", js: "message_id", typ: u(undefined, "") }, | ||
| { json: "messageId", js: "messageId", typ: u(undefined, "") }, | ||
| ], "any"), | ||
@@ -161,0 +161,0 @@ }; |
@@ -28,3 +28,3 @@ // To parse this data: | ||
| data?: string; | ||
| message_id?: string; | ||
| messageId?: string; | ||
| } | ||
@@ -187,3 +187,3 @@ | ||
| { json: "data", js: "data", typ: u(undefined, "") }, | ||
| { json: "message_id", js: "message_id", typ: u(undefined, "") }, | ||
| { json: "messageId", js: "messageId", typ: u(undefined, "") }, | ||
| ], "any"), | ||
@@ -190,0 +190,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
| const {toMessagePublishedData} = require('@google/events/cloud/pubsub/v1'); | ||
| const {toMessagePublishedEvent} = require('@google/events/cloud/pubsub/v1/MessagePublishedData'); | ||
@@ -15,3 +15,3 @@ /** | ||
| const jsExample = toMessagePublishedData(obj); | ||
| const jsExample = toMessagePublishedEvent(obj); | ||
| console.log(jsExample.message.data); |
@@ -1,2 +0,2 @@ | ||
| import {MessagePublishedData} from '@google/events/cloud/pubsub/v1'; | ||
| import {MessagePublishedEvent} from '@google/events/cloud/pubsub/v1/MessagePublishedData'; | ||
@@ -15,3 +15,3 @@ /** | ||
| const tsExample: MessagePublishedData = obj; | ||
| console.log(tsExample.message.messageId); | ||
| const tsExample: MessagePublishedEvent = obj; | ||
| console.log(tsExample.message.data); |
+1
-1
| { | ||
| "name": "@google/events", | ||
| "version": "1.4.1", | ||
| "version": "1.4.2", | ||
| "description": "Client library for CloudEvents issued by Google.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+11
-6
@@ -34,4 +34,7 @@ # Google CloudEvents – Node.js [](https://www.npmjs.com/package/@google/events) [](https://github.com/googleapis/google-cloudevents-nodejs/actions?query=workflow%3Aci) | ||
| ```js | ||
| const {toMessagePublishedData} = require('@google/events/cloud/pubsub/v1'); | ||
| const {toMessagePublishedEvent} = require('@google/events/cloud/pubsub/v1/MessagePublishedData'); | ||
| /** | ||
| * A Pub/Sub message as an object, for example what you'd see from a POST request. | ||
| */ | ||
| const obj = { | ||
@@ -46,4 +49,3 @@ message: { | ||
| // JavaScript example (cast to type) | ||
| const jsExample = toMessagePublishedData(obj); | ||
| const jsExample = toMessagePublishedEvent(obj); | ||
| console.log(jsExample.message.data); | ||
@@ -68,4 +70,7 @@ ``` | ||
| ```ts | ||
| import {MessagePublishedData} from '@google/events/cloud/pubsub/v1'; | ||
| import {MessagePublishedEvent} from '@google/events/cloud/pubsub/v1/MessagePublishedData'; | ||
| /** | ||
| * A Pub/Sub message as an object, for example what you'd see from a POST request. | ||
| */ | ||
| const obj = { | ||
@@ -80,4 +85,4 @@ message: { | ||
| const tsExample: MessagePublishedData = obj; | ||
| console.log(tsExample.message.messageId); | ||
| const tsExample: MessagePublishedEvent = obj; | ||
| console.log(tsExample.message.data); | ||
| ``` | ||
@@ -84,0 +89,0 @@ |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
73914
0.8%88
6.02%