@tsed/components-scan 7.23.1 → 7.24.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/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/readme.md +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/components-scan",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.24.1",
|
|
4
4
|
"description": "Components scan utilities for Ts.ED Framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"lint:fix": "eslint '**/*.{ts,js}' --fix"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@tsed/normalize-path": "7.
|
|
25
|
+
"@tsed/normalize-path": "7.24.1",
|
|
26
26
|
"globby": "11.0.3",
|
|
27
27
|
"tslib": "2.5.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@tsed/core": "7.
|
|
31
|
-
"@tsed/di": "7.
|
|
32
|
-
"@tsed/eslint": "7.
|
|
33
|
-
"@tsed/typescript": "7.
|
|
30
|
+
"@tsed/core": "7.24.1",
|
|
31
|
+
"@tsed/di": "7.24.1",
|
|
32
|
+
"@tsed/eslint": "7.24.1",
|
|
33
|
+
"@tsed/typescript": "7.24.1",
|
|
34
34
|
"eslint": "^8.12.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
package/readme.md
CHANGED
|
@@ -30,6 +30,25 @@
|
|
|
30
30
|
|
|
31
31
|
A package of Ts.ED framework. See website: https://tsed.io/
|
|
32
32
|
|
|
33
|
+
## Introduction
|
|
34
|
+
|
|
35
|
+
⚠️⚠️⚠️ DON'T USE THIS PLUGIN in PRODUCTION MODE ⚠️⚠️⚠️
|
|
36
|
+
|
|
37
|
+
ComponentsScan is an option to import services using a glob pattern. It's pretty useful when you start new application.
|
|
38
|
+
|
|
39
|
+
But this option can cause some issues or misunderstood:
|
|
40
|
+
|
|
41
|
+
- When you change a location for a Controller/Service/Modules, the code isn't discovered as expected. It's normal, the
|
|
42
|
+
server have default configuration like `**/services/**/*.ts`. if the code is outside of this pattern, they won't be
|
|
43
|
+
loaded.
|
|
44
|
+
- Performance issue. The global pattern have a huge impact on the server bootstrap!
|
|
45
|
+
- Isn't compatible with Webpack or any bundler because the code imported dynamically.
|
|
46
|
+
- Importing dynamically code using glob pattern in production may be a breach exploitable by hackers to inject code.
|
|
47
|
+
|
|
48
|
+
## When I can use this package
|
|
49
|
+
|
|
50
|
+
For development purpose (mock server, test server, dev server, etc...)
|
|
51
|
+
|
|
33
52
|
# Installation
|
|
34
53
|
|
|
35
54
|
```bash
|