@dereekb/nestjs 5.0.1 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [5.2.1](https://github.com/dereekb/dbx-components/compare/v5.2.0-dev...v5.2.1) (2022-05-29)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# [5.2.0](https://github.com/dereekb/dbx-components/compare/v5.1.0-dev...v5.2.0) (2022-05-29)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# [5.1.0](https://github.com/dereekb/dbx-components/compare/v5.0.1-dev...v5.1.0) (2022-05-27)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* added FirebaseAppCheckMiddleware ([25ddc4e](https://github.com/dereekb/dbx-components/commit/25ddc4e7ae18d6ef96c38ed529c71313884b7544))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
5
22
|
## [5.0.1](https://github.com/dereekb/dbx-components/compare/v5.0.0-dev...v5.0.1) (2022-05-26)
|
|
6
23
|
|
|
7
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/nestjs",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@nestjs/common": "^8.4.0",
|
|
22
22
|
"@nestjs/config": "^2.0.1",
|
|
23
|
-
"@dereekb/util": "5.
|
|
23
|
+
"@dereekb/util": "5.2.1",
|
|
24
24
|
"make-error": "^1.3.0",
|
|
25
25
|
"extra-set": "^2.2.11",
|
|
26
26
|
"tslib": "^2.0.0"
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { MiddlewareConsumer, NestModule } from '@nestjs/common';
|
|
2
|
+
import { RouteInfo } from '@nestjs/common/interfaces';
|
|
3
|
+
export declare const DEFAULT_BASE_WEBHOOK_PATH = "/webhook";
|
|
4
|
+
export declare const DEFAULT_WEBHOOK_MIDDLEWARE_ROUTE_INFO: RouteInfo;
|
|
2
5
|
/**
|
|
3
6
|
* Convenience class that configures a nestjs module (typically the root app module) to apply the proper middleware for handling webhooks.
|
|
4
7
|
*/
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.consumeWebhooksWithRawBodyMiddleware = exports.ConfigureWebhookMiddlewareModule = exports.AppModuleWithWebhooksEnabled = void 0;
|
|
3
|
+
exports.consumeWebhooksWithRawBodyMiddleware = exports.ConfigureWebhookMiddlewareModule = exports.AppModuleWithWebhooksEnabled = exports.DEFAULT_WEBHOOK_MIDDLEWARE_ROUTE_INFO = exports.DEFAULT_BASE_WEBHOOK_PATH = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const common_1 = require("@nestjs/common");
|
|
6
6
|
const json_middleware_1 = require("./json.middleware");
|
|
7
7
|
const rawbody_middleware_1 = require("./rawbody.middleware");
|
|
8
|
+
exports.DEFAULT_BASE_WEBHOOK_PATH = '/webhook';
|
|
9
|
+
exports.DEFAULT_WEBHOOK_MIDDLEWARE_ROUTE_INFO = {
|
|
10
|
+
path: `${exports.DEFAULT_BASE_WEBHOOK_PATH}/*`,
|
|
11
|
+
method: common_1.RequestMethod.POST
|
|
12
|
+
};
|
|
8
13
|
/**
|
|
9
14
|
* Convenience class that configures a nestjs module (typically the root app module) to apply the proper middleware for handling webhooks.
|
|
10
15
|
*/
|
|
@@ -43,14 +48,7 @@ exports.ConfigureWebhookMiddlewareModule = ConfigureWebhookMiddlewareModule;
|
|
|
43
48
|
function consumeWebhooksWithRawBodyMiddleware(consumer) {
|
|
44
49
|
// Configure the app to not parse the body for our webhook routes.
|
|
45
50
|
// https://stackoverflow.com/questions/54346465/access-raw-body-of-stripe-webhook-in-nest-js
|
|
46
|
-
consumer
|
|
47
|
-
.apply(rawbody_middleware_1.RawBodyMiddleware)
|
|
48
|
-
.forRoutes({
|
|
49
|
-
path: '/webhook/*',
|
|
50
|
-
method: common_1.RequestMethod.POST
|
|
51
|
-
})
|
|
52
|
-
.apply(json_middleware_1.JsonBodyMiddleware)
|
|
53
|
-
.forRoutes('*');
|
|
51
|
+
consumer.apply(rawbody_middleware_1.RawBodyMiddleware).forRoutes(exports.DEFAULT_WEBHOOK_MIDDLEWARE_ROUTE_INFO).apply(json_middleware_1.JsonBodyMiddleware).forRoutes('*');
|
|
54
52
|
}
|
|
55
53
|
exports.consumeWebhooksWithRawBodyMiddleware = consumeWebhooksWithRawBodyMiddleware;
|
|
56
54
|
//# sourceMappingURL=webhook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../../../../packages/nestjs/src/lib/middlewares/webhook.ts"],"names":[],"mappings":";;;;AAAA,2CAA+F;
|
|
1
|
+
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../../../../packages/nestjs/src/lib/middlewares/webhook.ts"],"names":[],"mappings":";;;;AAAA,2CAA+F;AAE/F,uDAAuD;AACvD,6DAAyD;AAE5C,QAAA,yBAAyB,GAAG,UAAU,CAAC;AAEvC,QAAA,qCAAqC,GAAc;IAC9D,IAAI,EAAE,GAAG,iCAAyB,IAAI;IACtC,MAAM,EAAE,sBAAa,CAAC,IAAI;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAsB,4BAA4B;IACzC,SAAS,CAAC,QAA4B;QAC3C,oCAAoC,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC;CACF;AAJD,oEAIC;AAED;;GAEG;AAEH,IAAa,gCAAgC,GAA7C,MAAa,gCAAiC,SAAQ,4BAA4B;IAAlF;;QACmB,WAAM,GAAG,IAAI,eAAM,CAAC,kCAAkC,CAAC,CAAC;IAM3E,CAAC;IAJQ,SAAS,CAAC,QAA4B;QAC3C,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACzE,CAAC;CACF,CAAA;AAPY,gCAAgC;IAD5C,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,gCAAgC,CAO5C;AAPY,4EAAgC;AAS7C;;;;;;;;GAQG;AACH,SAAgB,oCAAoC,CAAC,QAA4B;IAC/E,kEAAkE;IAClE,4FAA4F;IAC5F,QAAQ,CAAC,KAAK,CAAC,sCAAiB,CAAC,CAAC,SAAS,CAAC,6CAAqC,CAAC,CAAC,KAAK,CAAC,oCAAkB,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9H,CAAC;AAJD,oFAIC"}
|
package/stripe/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [5.2.1](https://github.com/dereekb/dbx-components/compare/v5.2.0-dev...v5.2.1) (2022-05-29)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# [5.2.0](https://github.com/dereekb/dbx-components/compare/v5.1.0-dev...v5.2.0) (2022-05-29)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# [5.1.0](https://github.com/dereekb/dbx-components/compare/v5.0.1-dev...v5.1.0) (2022-05-27)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
5
17
|
## [5.0.1](https://github.com/dereekb/dbx-components/compare/v5.0.0-dev...v5.0.1) (2022-05-26)
|
|
6
18
|
|
|
7
19
|
|
package/stripe/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/nestjs/stripe",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./src/index.d.ts",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"stripe": "^9.1.0",
|
|
10
10
|
"@nestjs/common": "^8.4.0",
|
|
11
11
|
"@nestjs/config": "^2.0.1",
|
|
12
|
-
"@dereekb/nestjs": "5.
|
|
13
|
-
"@dereekb/util": "5.
|
|
12
|
+
"@dereekb/nestjs": "5.2.1",
|
|
13
|
+
"@dereekb/util": "5.2.1",
|
|
14
14
|
"make-error": "^1.3.0",
|
|
15
15
|
"extra-set": "^2.2.11",
|
|
16
16
|
"tslib": "^2.0.0"
|