commit
5ba6cf7cb7
|
@ -0,0 +1,13 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
|
||||
## [0.3.1]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Axios version to `0.18.1` due the CVE-2019-10742
|
||||
- Fix the `subject` attribute unmarshal error: issue
|
||||
[#32](https://github.com/cloudevents/sdk-javascript/issues/32)
|
|
@ -12,6 +12,11 @@ ahead of `master`.
|
|||
|
||||
- [Gitflow](https://nvie.com/posts/a-successful-git-branching-model/) by @nvie
|
||||
|
||||
## Changelog
|
||||
|
||||
Always update the [CHANGELOG.md](./CHANGELOG.md), following
|
||||
[this semantics](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Guidelines about how to perform pull requests.
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
[](https://www.npmjs.com/package/cloudevents-sdk)
|
||||
[](https://www.npmjs.com/package/cloudevents-sdk)
|
||||
[](https://david-dm.org/cloudevents/sdk-javascript)
|
||||
[](https://snyk.io/test/github/cloudevents/sdk-javascript)
|
||||
|
||||
# sdk-javascript
|
||||
|
||||
|
@ -12,6 +13,8 @@ Official CloudEvents' SDK for JavaScript.
|
|||
|
||||
<img src="https://github.com/cncf/artwork/blob/master/projects/cloudevents/horizontal/color/cloudevents-horizontal-color.png" width="300" height="58" alt="CloudEvents logo">
|
||||
|
||||
__Checkout the [changelog](./CHANGELOG.md) to see what's going on!__
|
||||
|
||||
## Contributing
|
||||
|
||||
Before create an awesome PR, please read our [guidelines](./CONTRIBUTING.md).
|
||||
|
|
|
@ -51,6 +51,10 @@ setterByAttribute[Constants.STRUCTURED_ATTRS_03.CONTENT_TYPE] = {
|
|||
name: "dataContentType",
|
||||
parser: (v) => v
|
||||
};
|
||||
setterByAttribute[Constants.STRUCTURED_ATTRS_03.SUBJECT] = {
|
||||
name: "subject",
|
||||
parser: (v) => v
|
||||
};
|
||||
setterByAttribute[Constants.STRUCTURED_ATTRS_03.DATA] = {
|
||||
name: "data",
|
||||
parser: (v) => v
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cloudevents-sdk",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"description": "CloudEvents SDK for JavaScript",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -32,7 +32,7 @@
|
|||
"homepage": "https://github.com/cloudevents/sdk-javascript#readme",
|
||||
"dependencies": {
|
||||
"ajv": "^6.7.0",
|
||||
"axios": "0.18.0",
|
||||
"axios": "0.18.1",
|
||||
"is-empty": "1.2.0",
|
||||
"uri-js": "4.2.2",
|
||||
"uuid": "3.3.2"
|
||||
|
|
|
@ -9,7 +9,7 @@ const webhook = "https://cloudevents.io/webhook";
|
|||
const contentType = "application/cloudevents+json; charset=utf-8";
|
||||
const now = new Date();
|
||||
const schemaurl = "http://cloudevents.io/schema.json";
|
||||
|
||||
const subject = "subject.ext";
|
||||
const ceContentType = "application/json";
|
||||
|
||||
const data = {
|
||||
|
@ -118,9 +118,10 @@ describe("HTTP Transport Binding Unmarshaller for CloudEvents v0.3", () => {
|
|||
new Cloudevent(v03.Spec)
|
||||
.type(type)
|
||||
.source(source)
|
||||
.contenttype(ceContentType)
|
||||
.dataContentType(ceContentType)
|
||||
.time(now)
|
||||
.schemaurl(schemaurl)
|
||||
.subject(subject)
|
||||
.data(data)
|
||||
.toString();
|
||||
|
||||
|
|
Loading…
Reference in New Issue