nestjs-ip-filter 0.1.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/.eslintrc.js +29 -0
- package/.prettierrc +4 -0
- package/.vscode/settings.json +3 -0
- package/LICENSE +21 -0
- package/README.md +190 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/ipfilter-core.module.d.ts +24 -0
- package/dist/ipfilter-core.module.js +87 -0
- package/dist/ipfilter-core.module.js.map +1 -0
- package/dist/ipfilter-deny.exception.d.ts +4 -0
- package/dist/ipfilter-deny.exception.js +11 -0
- package/dist/ipfilter-deny.exception.js.map +1 -0
- package/dist/ipfilter.constants.d.ts +2 -0
- package/dist/ipfilter.constants.js +6 -0
- package/dist/ipfilter.constants.js.map +1 -0
- package/dist/ipfilter.guard.d.ts +8 -0
- package/dist/ipfilter.guard.js +57 -0
- package/dist/ipfilter.guard.js.map +1 -0
- package/dist/ipfilter.interface.d.ts +18 -0
- package/dist/ipfilter.interface.js +3 -0
- package/dist/ipfilter.interface.js.map +1 -0
- package/dist/ipfilter.module.d.ts +6 -0
- package/dist/ipfilter.module.js +22 -0
- package/dist/ipfilter.module.js.map +1 -0
- package/dist/ipfilter.providers.d.ts +3 -0
- package/dist/ipfilter.providers.js +13 -0
- package/dist/ipfilter.providers.js.map +1 -0
- package/dist/ipfilter.service.d.ts +12 -0
- package/dist/ipfilter.service.js +45 -0
- package/dist/ipfilter.service.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +6 -0
- package/index.ts +1 -0
- package/lib/index.ts +8 -0
- package/lib/ipfilter-core.module.ts +94 -0
- package/lib/ipfilter-deny.exception.ts +7 -0
- package/lib/ipfilter.constants.ts +2 -0
- package/lib/ipfilter.guard.ts +56 -0
- package/lib/ipfilter.interface.ts +28 -0
- package/lib/ipfilter.module.ts +23 -0
- package/lib/ipfilter.providers.ts +13 -0
- package/lib/ipfilter.service.ts +37 -0
- package/nest-cli.json +5 -0
- package/package.json +86 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +24 -0
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nestjs-ip-filter",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A NestJS Guard for filtering IP addresses",
|
|
5
|
+
"author": "Deokgyu Yang <secugyu@gmail.com>",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"nestjs",
|
|
8
|
+
"ip filter",
|
|
9
|
+
"whitelist",
|
|
10
|
+
"blacklist"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/awesometic/nestjs-ip-filter.git"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/awesometic/nestjs-ip-filter",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/awesometic/nestjs-ip-filter/issues"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"prebuild": "rimraf dist",
|
|
23
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
24
|
+
"format": "prettier --write \"{lib,example}/**/*.ts\"",
|
|
25
|
+
"prepublish:npm": "npm run lint && npm run format && npm run build",
|
|
26
|
+
"publish:npm": "npm publish --access public",
|
|
27
|
+
"start": "nest start",
|
|
28
|
+
"start:dev": "nest start --watch",
|
|
29
|
+
"start:debug": "nest start --debug --watch",
|
|
30
|
+
"lint": "eslint \"{lib,apps,libs,test,example/src}/**/*.ts\" --fix",
|
|
31
|
+
"test": "jest",
|
|
32
|
+
"test:watch": "jest --watch",
|
|
33
|
+
"test:cov": "jest --coverage",
|
|
34
|
+
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@nestjs/common": "^8.1.1",
|
|
38
|
+
"@nestjs/core": "^8.1.1",
|
|
39
|
+
"@nestjs/platform-express": "^8.1.1",
|
|
40
|
+
"@supercharge/request-ip": "^1.2.0",
|
|
41
|
+
"reflect-metadata": "^0.1.13",
|
|
42
|
+
"rimraf": "^3.0.2",
|
|
43
|
+
"rxjs": "^7.4.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@nestjs/cli": "^8.1.3",
|
|
47
|
+
"@nestjs/schematics": "^8.0.4",
|
|
48
|
+
"@nestjs/testing": "^8.1.1",
|
|
49
|
+
"@types/express": "^4.17.13",
|
|
50
|
+
"@types/jest": "^27.0.2",
|
|
51
|
+
"@types/node": "^16.11.1",
|
|
52
|
+
"@types/supertest": "^2.0.11",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^5.28.0",
|
|
54
|
+
"@typescript-eslint/parser": "^5.28.0",
|
|
55
|
+
"eslint": "^8.17.0",
|
|
56
|
+
"eslint-config-google": "^0.14.0",
|
|
57
|
+
"eslint-config-prettier": "^8.3.0",
|
|
58
|
+
"eslint-plugin-prettier": "^3.4.1",
|
|
59
|
+
"jest": "^27.3.0",
|
|
60
|
+
"prettier": "^2.4.1",
|
|
61
|
+
"source-map-support": "^0.5.20",
|
|
62
|
+
"supertest": "^6.1.6",
|
|
63
|
+
"ts-jest": "^27.0.7",
|
|
64
|
+
"ts-loader": "^9.2.6",
|
|
65
|
+
"ts-node": "^10.3.0",
|
|
66
|
+
"tsconfig-paths": "^3.11.0",
|
|
67
|
+
"typescript": "^4.4.4"
|
|
68
|
+
},
|
|
69
|
+
"jest": {
|
|
70
|
+
"moduleFileExtensions": [
|
|
71
|
+
"js",
|
|
72
|
+
"json",
|
|
73
|
+
"ts"
|
|
74
|
+
],
|
|
75
|
+
"rootDir": "lib",
|
|
76
|
+
"testRegex": ".*\\.spec\\.ts$",
|
|
77
|
+
"transform": {
|
|
78
|
+
"^.+\\.(t|j)s$": "ts-jest"
|
|
79
|
+
},
|
|
80
|
+
"collectCoverageFrom": [
|
|
81
|
+
"**/*.(t|j)s"
|
|
82
|
+
],
|
|
83
|
+
"coverageDirectory": "../coverage",
|
|
84
|
+
"testEnvironment": "node"
|
|
85
|
+
}
|
|
86
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"removeComments": true,
|
|
6
|
+
"emitDecoratorMetadata": true,
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"target": "es2017",
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"outDir": "./dist",
|
|
12
|
+
"baseUrl": "./",
|
|
13
|
+
"incremental": true,
|
|
14
|
+
"skipLibCheck": true
|
|
15
|
+
},
|
|
16
|
+
"include": [
|
|
17
|
+
"lib/**/*"
|
|
18
|
+
],
|
|
19
|
+
"exclude": [
|
|
20
|
+
"node_modules",
|
|
21
|
+
"**/*.spec.ts",
|
|
22
|
+
"tests",
|
|
23
|
+
]
|
|
24
|
+
}
|