From fd119040fcc49f1c33fea75a6917d48d62f379cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Sun, 4 Aug 2019 13:26:14 -0300 Subject: [PATCH] Exporting the receiver and emitter for binary 0.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- test/sdk_test.js | 9 ++++++--- v03/index.js | 8 ++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/test/sdk_test.js b/test/sdk_test.js index 8a09540..f429ac3 100644 --- a/test/sdk_test.js +++ b/test/sdk_test.js @@ -42,18 +42,21 @@ describe("The SDK Requirements", () => { expect(v03).to.have.property("Spec"); }); - it("should exports 'StructuredHTTPEmitter'", () => { expect(v03).to.have.property("StructuredHTTPEmitter"); }); - // StructuredHTTPReceiver + it("should exports 'StructuredHTTPReceiver'", () => { + expect(v03).to.have.property("StructuredHTTPReceiver"); + }); it("should exports 'BinaryHTTPEmitter'", () => { expect(v03).to.have.property("BinaryHTTPEmitter"); }); - // BinaryHTTPReceiver + it("should exports 'BinaryHTTPReceiver'", () => { + expect(v03).to.have.property("BinaryHTTPReceiver"); + }); it("should exports 'event'", () => { expect(v03).to.have.property("event"); diff --git a/v03/index.js b/v03/index.js index 6012245..f6437e0 100644 --- a/v03/index.js +++ b/v03/index.js @@ -4,6 +4,12 @@ const StructuredHTTPEmitter = require("../lib/bindings/http/emitter_structured.js"); const BinaryHTTPEmitter = require("../lib/bindings/http/emitter_binary_0_3.js"); +const StructuredHTTPReceiver = + require("../lib/bindings/http/receiver_structured_0_3.js"); + +const BinaryHTTPReceiver = + require("../lib/bindings/http/receiver_binary_0_3.js"); + function event() { return new Cloudevent(Spec); } @@ -11,6 +17,8 @@ function event() { module.exports = { Spec, StructuredHTTPEmitter, + StructuredHTTPReceiver, BinaryHTTPEmitter, + BinaryHTTPReceiver, event };