diff --git a/.gitignore b/.gitignore index 5340fa68..1bd073c7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ yarn-error.log* # Generated files *.d.ts index.js -lib +/lib # Runtime data pids diff --git a/src/lib/bindings/http/emitter_binary.js b/src/lib/bindings/http/emitter_binary.js index bd9781b1..ab9288ce 100644 --- a/src/lib/bindings/http/emitter_binary.js +++ b/src/lib/bindings/http/emitter_binary.js @@ -11,7 +11,7 @@ const { DATA_ATTRIBUTE, SPEC_V1, SPEC_V03 -} = require("./constants.js"); +} = require("./constants"); const defaults = { [HEADERS]: { diff --git a/src/lib/bindings/http/emitter_structured.js b/src/lib/bindings/http/emitter_structured.js index 7b237693..6a76a51d 100644 --- a/src/lib/bindings/http/emitter_structured.js +++ b/src/lib/bindings/http/emitter_structured.js @@ -7,7 +7,7 @@ const { DEFAULT_CE_CONTENT_TYPE, HEADERS, HEADER_CONTENT_TYPE -} = require("./constants.js"); +} = require("./constants"); const defaults = { [HEADERS]: { diff --git a/src/lib/bindings/http/receiver_binary.js b/src/lib/bindings/http/receiver_binary.js index 664e3fec..64a54818 100644 --- a/src/lib/bindings/http/receiver_binary.js +++ b/src/lib/bindings/http/receiver_binary.js @@ -1,7 +1,7 @@ const ReceiverV1 = require("./v1/receiver_binary_1.js"); const ReceiverV3 = require("./v03/receiver_binary_0_3.js"); -const { SPEC_V03, SPEC_V1 } = require("./constants.js"); +const { SPEC_V03, SPEC_V1 } = require("./constants"); const { check, parse } = require("./validation/binary.js"); /** @typedef {import("../../cloudevent")} CloudEvent */ diff --git a/src/lib/bindings/http/receiver_structured.js b/src/lib/bindings/http/receiver_structured.js index 2d8f7d9b..70a0c5e1 100644 --- a/src/lib/bindings/http/receiver_structured.js +++ b/src/lib/bindings/http/receiver_structured.js @@ -1,7 +1,7 @@ const ReceiverV1 = require("./v1/receiver_structured_1.js"); const ReceiverV3 = require("./v03/receiver_structured_0_3.js"); -const { SPEC_V03, SPEC_V1 } = require("./constants.js"); +const { SPEC_V03, SPEC_V1 } = require("./constants"); const { check, parse } = require("./validation/structured.js"); /** @typedef {import("../../cloudevent")} CloudEvent */ diff --git a/src/lib/bindings/http/v03/emitter_binary_0_3.js b/src/lib/bindings/http/v03/emitter_binary_0_3.js index 204fd5e7..5ae9b604 100644 --- a/src/lib/bindings/http/v03/emitter_binary_0_3.js +++ b/src/lib/bindings/http/v03/emitter_binary_0_3.js @@ -10,7 +10,7 @@ const { TIME, SCHEMA_URL } -} = require("../constants.js"); +} = require("../constants"); function parser(header, parser = (v) => v) { return { headerName: header, parse: parser }; diff --git a/src/lib/bindings/http/v03/receiver_binary_0_3.js b/src/lib/bindings/http/v03/receiver_binary_0_3.js index cdc0898d..7b3227ec 100644 --- a/src/lib/bindings/http/v03/receiver_binary_0_3.js +++ b/src/lib/bindings/http/v03/receiver_binary_0_3.js @@ -5,7 +5,7 @@ const { ENCODING_BASE64, HEADER_CONTENT_TYPE, BINARY_HEADERS_03 -} = require("../constants.js"); +} = require("../constants"); const Spec = require("./spec_0_3.js"); const JSONParser = require("../../../formats/json/parser.js"); diff --git a/src/lib/bindings/http/v03/receiver_structured_0_3.js b/src/lib/bindings/http/v03/receiver_structured_0_3.js index 3dbdac01..411e7471 100644 --- a/src/lib/bindings/http/v03/receiver_structured_0_3.js +++ b/src/lib/bindings/http/v03/receiver_structured_0_3.js @@ -13,7 +13,7 @@ const { SUBJECT, DATA } -} = require("../constants.js"); +} = require("../constants"); const Spec = require("./spec_0_3.js"); const JSONParser = require("../../../formats/json/parser.js"); diff --git a/src/lib/bindings/http/v1/emitter_binary_1.js b/src/lib/bindings/http/v1/emitter_binary_1.js index 60a71d1d..40b1c74b 100644 --- a/src/lib/bindings/http/v1/emitter_binary_1.js +++ b/src/lib/bindings/http/v1/emitter_binary_1.js @@ -9,7 +9,7 @@ const { TIME, DATA_SCHEMA } -} = require("../constants.js"); +} = require("../constants"); function parser(header, parser = (v) => v) { return { headerName: header, parse: parser }; diff --git a/src/lib/bindings/http/v1/receiver_structured_1.js b/src/lib/bindings/http/v1/receiver_structured_1.js index 9a1ca5a3..02f80bb9 100644 --- a/src/lib/bindings/http/v1/receiver_structured_1.js +++ b/src/lib/bindings/http/v1/receiver_structured_1.js @@ -13,7 +13,7 @@ const { DATA_BASE64, MIME_JSON } -} = require("../constants.js"); +} = require("../constants"); const Spec = require("./spec_1.js"); const JSONParser = require("../../../formats/json/parser.js"); diff --git a/src/lib/bindings/http/validation/binary.js b/src/lib/bindings/http/validation/binary.js index 4db5ff48..8cd3f387 100644 --- a/src/lib/bindings/http/validation/binary.js +++ b/src/lib/bindings/http/validation/binary.js @@ -9,7 +9,7 @@ const { HEADER_CONTENT_TYPE, MIME_JSON, DEFAULT_SPEC_VERSION_HEADER -} = require("../constants.js"); +} = require("../constants"); const { isString, diff --git a/src/lib/bindings/http/validation/commons.js b/src/lib/bindings/http/validation/commons.js index df85397f..7f438ba0 100644 --- a/src/lib/bindings/http/validation/commons.js +++ b/src/lib/bindings/http/validation/commons.js @@ -1,5 +1,5 @@ const ValidationError = require("./validation_error.js"); -const Constants = require("../constants.js"); +const Constants = require("../constants"); const { isDefinedOrThrow, isStringOrObjectOrThrow diff --git a/src/lib/bindings/http/validation/structured.js b/src/lib/bindings/http/validation/structured.js index a7688028..547da33f 100644 --- a/src/lib/bindings/http/validation/structured.js +++ b/src/lib/bindings/http/validation/structured.js @@ -6,7 +6,7 @@ const { } = require("./commons.js"); const { HEADER_CONTENT_TYPE -} = require("../constants.js"); +} = require("../constants"); function check(payload, headers, receiver) { validateArgs(payload, headers); diff --git a/src/lib/cloudevent.ts b/src/lib/cloudevent.ts index 1c891196..76bb94e4 100644 --- a/src/lib/cloudevent.ts +++ b/src/lib/cloudevent.ts @@ -6,7 +6,7 @@ import Spec03 from "./bindings/http/v03/spec_0_3.js"; import Formatter from "./formats/json/formatter.js"; import { isBinary } from "./bindings/http/validation/fun.js"; -const { SPEC_V1, SPEC_V03 } = require("./bindings/http/constants.js"); +const { SPEC_V1, SPEC_V03 } = require("./bindings/http/constants"); export type CE = CloudEventV1 | CloudEventV1Attributes | CloudEventV03 | CloudEventV03Attributes