@darraghor/nest-backend-libs 2.32.14 → 2.34.0
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/README.md
CHANGED
|
@@ -1,8 +1,33 @@
|
|
|
1
1
|
# nest-backend-libs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Nest backend libraries is a set of NestJS modules that accelerate product builds with the NestJS framework.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This is the code that powers the backend for [Miller Start website](https://usemiller.dev) and some other apps I run.
|
|
6
|
+
|
|
7
|
+
You can see how this library is used in a NestJS application on GitHub as [use-miller](https://github.com/darraghoriordan/use-miller).
|
|
8
|
+
|
|
9
|
+
## Modules used in most applications
|
|
10
|
+
|
|
11
|
+
The library includes the following modules that can be imported into your NestJS application. They are mostly dependant on each other so you should import them all. But they are things that are common to most applications so it makes sense to have them together in this library if you use this stack.
|
|
12
|
+
|
|
13
|
+
- Authorization
|
|
14
|
+
- Auth0 for authentication
|
|
15
|
+
- Configuration
|
|
16
|
+
- Postgres + typeorm
|
|
17
|
+
- SQLite + typeorm
|
|
18
|
+
- health checks
|
|
19
|
+
- invitations
|
|
20
|
+
- logging
|
|
21
|
+
- organisations
|
|
22
|
+
- subscriptions
|
|
23
|
+
- payments (Stripe but should work with any)
|
|
24
|
+
- CLI (e.g. for running stable diffusion)
|
|
25
|
+
|
|
26
|
+
## Modules with no dependencies
|
|
27
|
+
|
|
28
|
+
- Open API
|
|
29
|
+
|
|
30
|
+
## Stripe Module Notes
|
|
6
31
|
|
|
7
32
|
A module for integrating stripe into your nest application.
|
|
8
33
|
|
|
@@ -9,7 +9,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
9
9
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
10
10
|
import "reflect-metadata";
|
|
11
11
|
import helmet from "helmet";
|
|
12
|
-
import {
|
|
12
|
+
import { ClassSerializerInterceptor, Module, ValidationPipe, } from "@nestjs/common";
|
|
13
13
|
import { Logger, LoggerModule } from "nestjs-pino";
|
|
14
14
|
import { AppController } from "./app.controller.js";
|
|
15
15
|
import { AppService } from "./app.service.js";
|
|
@@ -24,6 +24,7 @@ import { LoggerModule as LoggingConfigModule } from "../logger/logger.module.js"
|
|
|
24
24
|
import { LoggingConfigurationService } from "../logger/LoggingConfigurationService.js";
|
|
25
25
|
import { AuthzModule } from "../authorization/authz.module.js";
|
|
26
26
|
import { redisStore } from "cache-manager-redis-yet";
|
|
27
|
+
import { CacheModule } from "@nestjs/cache-manager";
|
|
27
28
|
let CoreModule = class CoreModule {
|
|
28
29
|
static initApplication(
|
|
29
30
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types,@typescript-eslint/no-explicit-any
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-app.module.js","sourceRoot":"","sources":["../../src/root-app/core-app.module.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAsD;AACtD,+DAA+D;AAC/D,4DAA4D;AAC5D,OAAO,kBAAkB,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"core-app.module.js","sourceRoot":"","sources":["../../src/root-app/core-app.module.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAsD;AACtD,+DAA+D;AAC/D,4DAA4D;AAC5D,OAAO,kBAAkB,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACH,0BAA0B,EAE1B,MAAM,EAEN,cAAc,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,WAAW,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AAC;aACJ,CAAC;SACL;QACD,WAAW,EAAE,CAAC,aAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;QACnC,OAAO,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,CAAC;KAC5E,CAAC;GACW,UAAU,CA2DtB;SA3DY,UAAU"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darraghor/nest-backend-libs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.34.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"description": "Some helpers for personal projects in nestjs",
|
|
6
6
|
"homepage": "https://github.com/darraghoriordan/nest-backend-libs",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@nestjs/axios": "2.0.0",
|
|
54
|
+
"@nestjs/bull": "0.6.3",
|
|
54
55
|
"@nestjs/common": "9.3.12",
|
|
55
56
|
"@nestjs/config": "2.3.1",
|
|
56
|
-
"@nestjs/bull": "0.6.3",
|
|
57
57
|
"@nestjs/core": "9.3.12",
|
|
58
58
|
"@nestjs/microservices": "9.3.12",
|
|
59
59
|
"@nestjs/passport": "9.0.3",
|
|
@@ -61,90 +61,91 @@
|
|
|
61
61
|
"@nestjs/swagger": "6.2.1",
|
|
62
62
|
"@nestjs/terminus": "9.2.1",
|
|
63
63
|
"@nestjs/typeorm": "9.0.1",
|
|
64
|
-
"typeorm": "0.3.12",
|
|
65
|
-
"reflect-metadata": "0.1.13",
|
|
66
64
|
"class-transformer": "0.5.1",
|
|
67
|
-
"class-validator": "0.14.0"
|
|
65
|
+
"class-validator": "0.14.0",
|
|
66
|
+
"reflect-metadata": "0.1.13",
|
|
67
|
+
"typeorm": "0.3.12"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@nestjs/axios": "
|
|
71
|
-
"@nestjs/
|
|
72
|
-
"@nestjs/
|
|
73
|
-
"@nestjs/
|
|
74
|
-
"@nestjs/
|
|
75
|
-
"@nestjs/
|
|
76
|
-
"@nestjs/
|
|
77
|
-
"@nestjs/
|
|
78
|
-
"@nestjs/
|
|
79
|
-
"@nestjs/
|
|
80
|
-
"@nestjs/
|
|
81
|
-
"typeorm": "0.
|
|
70
|
+
"@nestjs/axios": "3.0.0",
|
|
71
|
+
"@nestjs/bull": "10.0.1",
|
|
72
|
+
"@nestjs/cache-manager": "2.0.1",
|
|
73
|
+
"@nestjs/common": "10.0.5",
|
|
74
|
+
"@nestjs/config": "3.0.0",
|
|
75
|
+
"@nestjs/core": "10.0.5",
|
|
76
|
+
"@nestjs/microservices": "10.0.5",
|
|
77
|
+
"@nestjs/passport": "10.0.0",
|
|
78
|
+
"@nestjs/platform-express": "10.0.5",
|
|
79
|
+
"@nestjs/swagger": "7.1.1",
|
|
80
|
+
"@nestjs/terminus": "10.0.1",
|
|
81
|
+
"@nestjs/typeorm": "10.0.0",
|
|
82
82
|
"add": "2.0.6",
|
|
83
|
-
"auth0": "3.
|
|
83
|
+
"auth0": "3.5.0",
|
|
84
84
|
"bull": "4.10.4",
|
|
85
|
-
"cache-manager": "5.2.
|
|
86
|
-
"cache-manager-redis-yet": "4.1.
|
|
87
|
-
"chalk": "5.
|
|
85
|
+
"cache-manager": "5.2.3",
|
|
86
|
+
"cache-manager-redis-yet": "4.1.2",
|
|
87
|
+
"chalk": "5.3.0",
|
|
88
88
|
"class-transformer": "0.5.1",
|
|
89
89
|
"class-validator": "0.14.0",
|
|
90
|
-
"date-fns": "2.
|
|
91
|
-
"dotenv": "16.
|
|
92
|
-
"helmet": "
|
|
90
|
+
"date-fns": "2.30.0",
|
|
91
|
+
"dotenv": "16.3.1",
|
|
92
|
+
"helmet": "7.0.0",
|
|
93
93
|
"jwks-rsa": "3.0.1",
|
|
94
|
-
"nanoid": "4.0.
|
|
95
|
-
"nestjs-pino": "3.
|
|
96
|
-
"nodemailer": "6.9.
|
|
94
|
+
"nanoid": "4.0.2",
|
|
95
|
+
"nestjs-pino": "3.3.0",
|
|
96
|
+
"nodemailer": "6.9.3",
|
|
97
97
|
"passport": "0.6.0",
|
|
98
98
|
"passport-headerapikey": "1.2.2",
|
|
99
99
|
"passport-jwt": "4.0.1",
|
|
100
100
|
"pino-http": "8.3.3",
|
|
101
|
-
"pino-pretty": "10.0.
|
|
102
|
-
"redis": "4.6.
|
|
101
|
+
"pino-pretty": "10.0.1",
|
|
102
|
+
"redis": "4.6.7",
|
|
103
103
|
"reflect-metadata": "0.1.13",
|
|
104
|
-
"rimraf": "
|
|
105
|
-
"rxjs": "7.8.
|
|
106
|
-
"stripe": "
|
|
107
|
-
"swagger-ui-express": "
|
|
108
|
-
"twitter-api-v2": "1.
|
|
104
|
+
"rimraf": "5.0.1",
|
|
105
|
+
"rxjs": "7.8.1",
|
|
106
|
+
"stripe": "12.13.0",
|
|
107
|
+
"swagger-ui-express": "5.0.0",
|
|
108
|
+
"twitter-api-v2": "1.15.0",
|
|
109
|
+
"typeorm": "0.3.17"
|
|
109
110
|
},
|
|
110
111
|
"devDependencies": {
|
|
111
|
-
"
|
|
112
|
-
"@commitlint/
|
|
113
|
-
"@
|
|
114
|
-
"@
|
|
115
|
-
"@nestjs/
|
|
116
|
-
"@nestjs/schematics": "^9.0.4",
|
|
112
|
+
"@commitlint/cli": "17.6.6",
|
|
113
|
+
"@commitlint/config-conventional": "17.6.6",
|
|
114
|
+
"@darraghor/eslint-plugin-nestjs-typed": "3.22.6",
|
|
115
|
+
"@nestjs/cli": "10.1.8",
|
|
116
|
+
"@nestjs/schematics": "^10.0.1",
|
|
117
117
|
"@semantic-release/changelog": "6.0.3",
|
|
118
118
|
"@semantic-release/exec": "6.0.3",
|
|
119
|
-
"@types/auth0": "3.3.
|
|
119
|
+
"@types/auth0": "3.3.3",
|
|
120
120
|
"@types/express": "4.17.17",
|
|
121
|
-
"@types/jest": "29.5.
|
|
122
|
-
"@types/node": "
|
|
123
|
-
"@types/nodemailer": "6.4.
|
|
124
|
-
"@types/passport-jwt": "3.0.
|
|
121
|
+
"@types/jest": "29.5.3",
|
|
122
|
+
"@types/node": "20.4.2",
|
|
123
|
+
"@types/nodemailer": "6.4.8",
|
|
124
|
+
"@types/passport-jwt": "3.0.9",
|
|
125
125
|
"@types/supertest": "2.0.12",
|
|
126
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
127
|
-
"@typescript-eslint/parser": "5.
|
|
126
|
+
"@typescript-eslint/eslint-plugin": "5.60.0",
|
|
127
|
+
"@typescript-eslint/parser": "5.60.0",
|
|
128
128
|
"copyfiles": "2.4.1",
|
|
129
|
-
"eslint": "8.
|
|
129
|
+
"eslint": "8.45.0",
|
|
130
130
|
"eslint-config-prettier": "8.8.0",
|
|
131
131
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
132
|
-
"eslint-plugin-jest": "27.2.
|
|
133
|
-
"eslint-plugin-jsdoc": "
|
|
132
|
+
"eslint-plugin-jest": "27.2.3",
|
|
133
|
+
"eslint-plugin-jsdoc": "46.4.3",
|
|
134
134
|
"eslint-plugin-prefer-arrow": "1.2.3",
|
|
135
135
|
"eslint-plugin-promise": "6.1.1",
|
|
136
136
|
"eslint-plugin-sonarjs": "0.19.0",
|
|
137
|
-
"eslint-plugin-unicorn": "
|
|
137
|
+
"eslint-plugin-unicorn": "47.0.0",
|
|
138
138
|
"husky": "8.0.3",
|
|
139
|
-
"jest": "29.
|
|
139
|
+
"jest": "29.6.1",
|
|
140
140
|
"jest-create-mock-instance": "2.0.0",
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"ts-
|
|
141
|
+
"knip": "2.15.5",
|
|
142
|
+
"lint-staged": "13.2.3",
|
|
143
|
+
"prettier": "3.0.0",
|
|
144
|
+
"semantic-release": "21.0.7",
|
|
145
|
+
"ts-jest": "29.1.1",
|
|
146
|
+
"ts-loader": "9.4.4",
|
|
146
147
|
"ts-node": "10.9.1",
|
|
147
|
-
"tsconfig-paths": "4.
|
|
148
|
+
"tsconfig-paths": "4.2.0",
|
|
148
149
|
"typescript": "4.9.5"
|
|
149
150
|
},
|
|
150
151
|
"lint-staged": {
|