very-express 0.5.13 → 0.5.15

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.
Files changed (48) hide show
  1. package/.eslintrc.json +0 -0
  2. package/.gitattributes +0 -0
  3. package/.github/workflows/npm-start.yml +0 -0
  4. package/LICENSE +0 -0
  5. package/README.md +62 -62
  6. package/dist/index.js +421 -314
  7. package/dist/templates/_middlewares/Authentication.ts +8 -6
  8. package/dist/templates/_projectSettings/env +21 -21
  9. package/dist/templates/_projectSettings/package.json +49 -49
  10. package/dist/templates/_routes/oauth/OAuthRouteFactory.ts +7 -42
  11. package/dist/templates/_services/VexDbConnector.ts +8 -8
  12. package/dist/templates/_services/VexSystem.ts +5 -6
  13. package/dist/templates/_services/auth/JWTService.ts +168 -0
  14. package/dist/templates/_services/oauth/OAuthProfileMap.ts +69 -0
  15. package/dist/templates/_services/oauth/OAuthStrategyService.ts +92 -0
  16. package/dist/templates/_types/VexResponseError.ts +20 -0
  17. package/dist/templates/_types/responseObject.ts +7 -0
  18. package/dist/templates/_utils/hash.ts +47 -0
  19. package/dist/templates/_utils/index.ts +5 -3
  20. package/dist/templates/_utils/response.ts +102 -32
  21. package/dist/templates/jsonSchema/User.json +85 -82
  22. package/dist/templates/root/public/css/style.css +7 -7
  23. package/dist/templates/root/public/js/logincallback.js +18 -18
  24. package/dist/templates/root/public/js/mytokens.js +10 -10
  25. package/dist/templates/root/public/js/refreshtokens.js +22 -22
  26. package/docs/ForeignKey.md +0 -0
  27. package/docs/appGenerated/auth.md +0 -0
  28. package/docs/developmentNote.md +0 -0
  29. package/docs/releaseNote/v0-5-0.md +0 -0
  30. package/docs/roadMap/released.md +0 -0
  31. package/docs/roadMap/v0-6-0.md +0 -0
  32. package/docs/roadMap/v0-7-0.md +0 -0
  33. package/docs/vexJsonSchema.md +0 -0
  34. package/package.json +51 -51
  35. package/scripts/build.js +0 -0
  36. package/scripts/copyTsTemplates.js +0 -0
  37. package/scripts/merge.js +0 -0
  38. package/tsconfig.json +121 -121
  39. package/vex.config.json +36 -35
  40. package/dist/templates/_plugins/auth/jwt.ts +0 -85
  41. package/dist/templates/_plugins/auth/oauthVerify.ts +0 -86
  42. package/dist/templates/_plugins/auth/profileMapping.ts +0 -68
  43. package/dist/templates/_plugins/auth/token.ts +0 -29
  44. package/dist/templates/_types/response/index.ts +0 -10
  45. package/dist/templates/_types/response/responseCode.ts +0 -15
  46. package/dist/templates/_types/response/responseMsg.ts +0 -28
  47. package/dist/templates/_types/response/responseStatusCodeMap.ts +0 -70
  48. /package/dist/templates/{_plugins → _services}/auth/JWTKeyStore.ts +0 -0
package/.eslintrc.json CHANGED
File without changes
package/.gitattributes CHANGED
File without changes
File without changes
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -1,62 +1,62 @@
1
- # VeryExpress
2
- this is a generator to make [Express](https://github.com/expressjs/express) app
3
- with custom REST API defined in [Json Schema](https://github.com/json-schema-org) and [Open Api](https://github.com/OAI)
4
-
5
- # Features
6
- - generate simple express.js server.
7
- - generate custom REST API.
8
- - API Validator by [express-validator](https://express-validator.github.io/docs/)
9
- - generate OpenApi
10
- - [Swagger UI Express](https://github.com/scottie1984/swagger-ui-express)
11
- - OAuth by [Passport.js](https://www.passportjs.org/)
12
- - Database Driver
13
- - MongoDB by [Mongoose](https://mongoosejs.com/)
14
-
15
- ## Why use ExpressJs
16
- express.js is a simple & flexible framework to build a web app, it provide balanced performance,
17
- as this is open-source project, i want lower the technical barrier to contribute ideas,
18
- eventually lead to a usefull and powerful framework.
19
-
20
-
21
- # Quick Start
22
- 1. install package globally.
23
- ```npm i -g very-express```
24
-
25
- 3. use cli to initialize configuration file **vex.config.json** under your project root directory.
26
- `vex -init`
27
-
28
- 2. create a empty directory and name it as value of vex.config's "jsonSchemaDir", by default `jsonSchema`.
29
- `mkdir jsonSchema`.
30
-
31
- 4. you can create your db collection/table now in directory `./jsonSchema` just created,
32
- refer to [Define Json Schmea](./docs/vexJsonSchema.md),
33
- every changes require to regenerate app.
34
-
35
- 6. generate the app with vex.config param.
36
- `vex`
37
-
38
- 7. you should saw a express typescript app being generated (with src, package.json etc) .
39
- ```
40
- ├── jsonSchema/
41
- │ └── ...
42
- ├── src/
43
- │ └── ...
44
- ├── package.json
45
- ├── tsconfig.json
46
- ├── vex.config.json
47
- └── .env
48
- ```
49
-
50
- 8. start the generated express app.
51
- ```
52
- npm i
53
- npm build
54
- npm run start
55
- ```
56
-
57
- # Resource
58
- - [Documents](./docs/)
59
- - [Road Map](./docs/roadMap/)
60
- - [ReleaseNote](./docs/releaseNote)
61
-
62
- - [Discord](https://discord.gg/PZGMzDp7)
1
+ # VeryExpress
2
+ this is a generator to make [Express](https://github.com/expressjs/express) app
3
+ with custom REST API defined in [Json Schema](https://github.com/json-schema-org) and [Open Api](https://github.com/OAI)
4
+
5
+ # Features
6
+ - generate simple express.js server.
7
+ - generate custom REST API.
8
+ - API Validator by [express-validator](https://express-validator.github.io/docs/)
9
+ - generate OpenApi
10
+ - [Swagger UI Express](https://github.com/scottie1984/swagger-ui-express)
11
+ - OAuth by [Passport.js](https://www.passportjs.org/)
12
+ - Database Driver
13
+ - MongoDB by [Mongoose](https://mongoosejs.com/)
14
+
15
+ ## Why use ExpressJs
16
+ express.js is a simple & flexible framework to build a web app, it provide balanced performance,
17
+ as this is open-source project, i want lower the technical barrier to contribute ideas,
18
+ eventually lead to a usefull and powerful framework.
19
+
20
+
21
+ # Quick Start
22
+ 1. install package globally.
23
+ ```npm i -g very-express```
24
+
25
+ 3. use cli to initialize configuration file **vex.config.json** under your project root directory.
26
+ `vex -init`
27
+
28
+ 2. create a empty directory and name it as value of vex.config's "jsonSchemaDir", by default `jsonSchema`.
29
+ `mkdir jsonSchema`.
30
+
31
+ 4. you can create your db collection/table now in directory `./jsonSchema` just created,
32
+ refer to [Define Json Schmea](./docs/vexJsonSchema.md),
33
+ every changes require to regenerate app.
34
+
35
+ 6. generate the app with vex.config param.
36
+ `vex`
37
+
38
+ 7. you should saw a express typescript app being generated (with src, package.json etc) .
39
+ ```
40
+ ├── jsonSchema/
41
+ │ └── ...
42
+ ├── src/
43
+ │ └── ...
44
+ ├── package.json
45
+ ├── tsconfig.json
46
+ ├── vex.config.json
47
+ └── .env
48
+ ```
49
+
50
+ 8. start the generated express app.
51
+ ```
52
+ npm i
53
+ npm build
54
+ npm run start
55
+ ```
56
+
57
+ # Resource
58
+ - [Documents](./docs/)
59
+ - [Road Map](./docs/roadMap/)
60
+ - [ReleaseNote](./docs/releaseNote)
61
+
62
+ - [Discord](https://discord.gg/PZGMzDp7)