Skip to content

Commit

Permalink
chore: release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ayZagen committed Sep 23, 2021
1 parent 1cfbf0a commit c19b8ee
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 75 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [0.1.0](https://github.com/ayZagen/secure-cookie/compare/v0.0.7...v0.1.0) (2021-09-23)


### Features

* allow empty keystore constructor params ([1cfbf0a](https://github.com/ayZagen/secure-cookie/commit/1cfbf0a5ad5d85f4a81d290340cfc0efdb28beb8))

## [0.0.7](https://github.com/ayZagen/secure-cookie/compare/v0.0.6...v0.0.7) (2021-09-21)


Expand Down
21 changes: 8 additions & 13 deletions dist/index.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* secure-cookie v0.0.7
* secure-cookie v0.1.0
* (c) Ismail H. Ayaz
* Released under the MIT License.
*/
Expand Down Expand Up @@ -167,22 +167,17 @@ var AUTH_TAG_REQUIRED = /-(gcm|ccm)/;
var KeyStore = /** @class */ (function () {
function KeyStore(opts) {
opts = opts || {};
if (opts.encryption) {
if (!Array.isArray(opts.encryption.keys) || opts.encryption.keys.length === 0) {
throw new Error("keys are required for encryption");
}
}
if (opts.signing) {
if (!Array.isArray(opts.signing.keys) || opts.signing.keys.length === 0) {
throw new Error("keys are required for signing");
}
}
this.encryption = Object.assign({
algorithm: 'aes-192-ccm',
authTagLength: 16,
encoding: 'hex', keys: []
encoding: 'hex',
keys: []
}, opts.encryption || {});
this.signing = Object.assign({ encoding: 'base64', algorithm: 'sha1', keys: [] }, opts.signing || {});
this.signing = Object.assign({
encoding: 'base64',
algorithm: 'sha1',
keys: []
}, opts.signing || {});
}
KeyStore.prototype.encrypt = function (data, options) {
if (!data) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.cjs.map

Large diffs are not rendered by default.

21 changes: 8 additions & 13 deletions dist/index.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.esm.js.map

Large diffs are not rendered by default.

21 changes: 8 additions & 13 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

21 changes: 8 additions & 13 deletions dist/index.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* secure-cookie v0.0.7
* secure-cookie v0.1.0
* (c) Ismail H. Ayaz
* Released under the MIT License.
*/
Expand Down Expand Up @@ -157,22 +157,17 @@ var AUTH_TAG_REQUIRED = /-(gcm|ccm)/;
var KeyStore = /** @class */ (function () {
function KeyStore(opts) {
opts = opts || {};
if (opts.encryption) {
if (!Array.isArray(opts.encryption.keys) || opts.encryption.keys.length === 0) {
throw new Error("keys are required for encryption");
}
}
if (opts.signing) {
if (!Array.isArray(opts.signing.keys) || opts.signing.keys.length === 0) {
throw new Error("keys are required for signing");
}
}
this.encryption = Object.assign({
algorithm: 'aes-192-ccm',
authTagLength: 16,
encoding: 'hex', keys: []
encoding: 'hex',
keys: []
}, opts.encryption || {});
this.signing = Object.assign({ encoding: 'base64', algorithm: 'sha1', keys: [] }, opts.signing || {});
this.signing = Object.assign({
encoding: 'base64',
algorithm: 'sha1',
keys: []
}, opts.signing || {});
}
KeyStore.prototype.encrypt = function (data, options) {
if (!data) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.mjs.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ secure-cookie

#### Defined in

[cookies.ts:8](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L8)
[cookies.ts:8](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L8)

___

Expand All @@ -42,7 +42,7 @@ ___

#### Defined in

[cookies.ts:39](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L39)
[cookies.ts:39](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L39)

___

Expand All @@ -52,4 +52,4 @@ ___

#### Defined in

[cookies.ts:38](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L38)
[cookies.ts:38](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L38)
28 changes: 14 additions & 14 deletions docs/classes/Cookies.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

#### Defined in

[cookies.ts:56](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L56)
[cookies.ts:56](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L56)

## Properties

Expand All @@ -53,7 +53,7 @@

#### Defined in

[cookies.ts:45](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L45)
[cookies.ts:45](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L45)

___

Expand All @@ -63,7 +63,7 @@ ___

#### Defined in

[cookies.ts:49](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L49)
[cookies.ts:49](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L49)

___

Expand All @@ -73,7 +73,7 @@ ___

#### Defined in

[cookies.ts:53](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L53)
[cookies.ts:53](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L53)

___

Expand All @@ -83,7 +83,7 @@ ___

#### Defined in

[cookies.ts:54](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L54)
[cookies.ts:54](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L54)

___

Expand All @@ -93,7 +93,7 @@ ___

#### Defined in

[cookies.ts:43](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L43)
[cookies.ts:43](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L43)

___

Expand All @@ -103,7 +103,7 @@ ___

#### Defined in

[cookies.ts:51](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L51)
[cookies.ts:51](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L51)

___

Expand All @@ -113,7 +113,7 @@ ___

#### Defined in

[cookies.ts:47](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L47)
[cookies.ts:47](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L47)

___

Expand Down Expand Up @@ -151,7 +151,7 @@ ___

#### Defined in

[cookies.ts:183](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L183)
[cookies.ts:183](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L183)

___

Expand Down Expand Up @@ -189,7 +189,7 @@ ___

#### Defined in

[cookies.ts:184](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L184)
[cookies.ts:184](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L184)

## Methods

Expand Down Expand Up @@ -227,7 +227,7 @@ If both `signed` and `encrypted` options are provided, signature check will be a

#### Defined in

[cookies.ts:87](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L87)
[cookies.ts:87](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L87)

___

Expand All @@ -251,7 +251,7 @@ This sets the given cookie in the response and returns the current context to al

#### Defined in

[cookies.ts:136](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L136)
[cookies.ts:136](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L136)

___

Expand Down Expand Up @@ -284,7 +284,7 @@ ___

#### Defined in

[cookies.ts:185](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L185)
[cookies.ts:185](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L185)

___

Expand Down Expand Up @@ -318,4 +318,4 @@ ___

#### Defined in

[cookies.ts:178](https://github.com/ayZagen/secure-cookie/blob/e57275f/src/cookies.ts#L178)
[cookies.ts:178](https://github.com/ayZagen/secure-cookie/blob/1cfbf0a/src/cookies.ts#L178)
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "secure-cookie",
"version": "0.0.7",
"version": "0.1.0",
"description": "Cookie library/middleware with signing and encryption support",
"main": "dist/index.js",
"types": "types/index.d.ts",
Expand Down

0 comments on commit c19b8ee

Please sign in to comment.