@rxap/plugin-nestjs 20.2.0-dev.9 → 20.2.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/CHANGELOG.md +30 -0
- package/README.md +105 -105
- package/package.json +11 -11
- package/src/generators/dynamic-configuration-module/__snapshots__/generator.spec.ts.snap +6 -6
- package/src/generators/dynamic-configuration-module/generator.js +1 -1
- package/src/generators/dynamic-configuration-module/generator.js.map +1 -1
- package/src/generators/dynamic-configuration-module/schema.json +9 -4
- package/src/generators/feature-microservice/schema.json +25 -18
- package/src/generators/frontend-microservice/schema.json +28 -20
- package/src/generators/health-indicator/generator.js +1 -1
- package/src/generators/health-indicator/generator.js.map +1 -1
- package/src/generators/health-indicator/schema.json +8 -4
- package/src/generators/health-indicator-init/generator.js +1 -1
- package/src/generators/health-indicator-init/generator.js.map +1 -1
- package/src/generators/health-indicator-init/schema.json +5 -2
- package/src/generators/init/schema.json +10 -5
- package/src/generators/init-application/coerce-environment-files.d.ts +1 -1
- package/src/generators/init-application/coerce-environment-files.js +1 -1
- package/src/generators/init-application/coerce-environment-files.js.map +1 -1
- package/src/generators/init-application/generator.js +22 -23
- package/src/generators/init-application/generator.js.map +1 -1
- package/src/generators/init-application/schema.json +41 -26
- package/src/generators/init-application/update-main-file.d.ts +1 -1
- package/src/generators/init-application/update-main-file.js +1 -1
- package/src/generators/init-application/update-main-file.js.map +1 -1
- package/src/generators/init-library/schema.json +13 -7
- package/src/generators/jwt/generator.js +4 -4
- package/src/generators/jwt/generator.js.map +1 -1
- package/src/generators/jwt/schema.json +12 -2
- package/src/generators/microservice/schema.json +102 -28
- package/src/generators/open-api/generator.js +4 -4
- package/src/generators/open-api/generator.js.map +1 -1
- package/src/generators/open-api/schema.json +12 -2
- package/src/generators/sentry/generator.js +18 -91
- package/src/generators/sentry/generator.js.map +1 -1
- package/src/generators/sentry/schema.json +19 -4
- package/src/generators/swagger/coerce-environment-files.d.ts +1 -1
- package/src/generators/swagger/coerce-environment-files.js +1 -1
- package/src/generators/swagger/coerce-environment-files.js.map +1 -1
- package/src/generators/swagger/generator.js +1 -1
- package/src/generators/swagger/generator.js.map +1 -1
- package/src/generators/swagger/schema.json +16 -3
- package/src/generators/validator/schema.json +11 -2
|
@@ -6,7 +6,7 @@ const workspace_ts_morph_1 = require("@rxap/workspace-ts-morph");
|
|
|
6
6
|
const ts_morph_2 = require("ts-morph");
|
|
7
7
|
const assert_main_statements_1 = require("./assert-main-statements");
|
|
8
8
|
function updateMainFile(tree, projectName, options) {
|
|
9
|
-
(0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
9
|
+
return (0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
10
10
|
project: projectName,
|
|
11
11
|
backend: undefined,
|
|
12
12
|
// directory: '..' // to move from the apps/demo/src/app folder into the apps/demo/src folder
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-main-file.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/nestjs/src/generators/init-application/update-main-file.ts"],"names":[],"mappings":";;AAaA,wCA8FC;AA1GD,6CAGwB;AACxB,iEAAuE;AACvE,uCAAsC;AACtC,qEAGkC;AAGlC,SAAgB,cAAc,CAC5B,IAAU,EACV,WAAmB,EACnB,OAAuC;IAGvC,IAAA,gDAA2B,EAAC,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"update-main-file.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/nestjs/src/generators/init-application/update-main-file.ts"],"names":[],"mappings":";;AAaA,wCA8FC;AA1GD,6CAGwB;AACxB,iEAAuE;AACvE,uCAAsC;AACtC,qEAGkC;AAGlC,SAAgB,cAAc,CAC5B,IAAU,EACV,WAAmB,EACnB,OAAuC;IAGvC,OAAO,IAAA,gDAA2B,EAAC,IAAI,EAAE;QACvC,OAAO,EAAE,WAAW;QACpB,OAAO,EAAE,SAAS;QAClB,6FAA6F;KAC9F,EAAE,CAAC,OAAO,EAAE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,IAAA,oCAAyB,EAAC,UAAU,EAAE,kBAAkB,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7G,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,2BAA2B,CAC7E,qBAAU,CAAC,uBAAuB,CAAC,CAAC;YACtC,IAAI,wBAAwB,GAAG,uBAAuB,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;YAC1F,IAAI,CAAC,wBAAwB,EAAE,CAAC;gBAC9B,wBAAwB,GAAG,uBAAuB,CAAC,qBAAqB,CAAC;oBACvE,IAAI,EAAE,qBAAqB;oBAC3B,WAAW,EAAE,IAAI;iBAClB,CAAC,CAAC;YACL,CAAC;YACD,MAAM,oBAAoB,GAAG,wBAAwB,CAAC,aAAa,CAAC,qBAAU,CAAC,kBAAkB,CAAC,CAAC;YACnG,MAAM,0BAA0B,GAAG,oBAAoB,CAAC,2BAA2B,CACjF,qBAAU,CAAC,uBAAuB,CAAC,CAAC;YACtC,IAAI,cAAc,GAAG,0BAA0B,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;YACvE,IAAI,CAAC,cAAc,EAAE,CAAC;gBACpB,cAAc,GAAG,0BAA0B,CAAC,qBAAqB,CAAC;oBAChE,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,qDAAqD;iBACnE,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IAGH,CAAC,EAAE,CAAE,SAAS,CAAE,CAAC,CAAC;AAEpB,CAAC"}
|
|
@@ -5,38 +5,44 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"project": {
|
|
8
|
-
"type": "string"
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name of the library project to initialize with NestJS.",
|
|
10
|
+
"examples": ["my-api-lib"]
|
|
9
11
|
},
|
|
10
12
|
"projects": {
|
|
11
13
|
"type": "array",
|
|
12
14
|
"items": {
|
|
13
15
|
"type": "string"
|
|
14
|
-
}
|
|
16
|
+
},
|
|
17
|
+
"description": "The list of library projects to initialize with NestJS.",
|
|
18
|
+
"examples": [["my-api-lib", "another-api-lib"]]
|
|
15
19
|
},
|
|
16
20
|
"overwrite": {
|
|
17
21
|
"type": "boolean",
|
|
18
22
|
"default": false,
|
|
19
|
-
"description": "Whether to overwrite existing files"
|
|
23
|
+
"description": "Whether to overwrite existing files during initialization."
|
|
20
24
|
},
|
|
21
25
|
"skipFormat": {
|
|
22
26
|
"type": "boolean",
|
|
23
|
-
"default": false
|
|
27
|
+
"default": false,
|
|
28
|
+
"description": "Whether to skip formatting files with Prettier after initialization."
|
|
24
29
|
},
|
|
25
30
|
"skipProjects": {
|
|
26
31
|
"type": "boolean",
|
|
27
32
|
"default": false,
|
|
28
|
-
"description": "Whether to skip executing project
|
|
33
|
+
"description": "Whether to skip executing project-specific initialization logic."
|
|
29
34
|
},
|
|
30
35
|
"targets": {
|
|
31
36
|
"type": "object",
|
|
37
|
+
"description": "Configuration for specific project targets.",
|
|
32
38
|
"properties": {
|
|
33
39
|
"fixDependencies": {
|
|
34
40
|
"type": "boolean",
|
|
35
|
-
"description": "
|
|
41
|
+
"description": "Whether to add the 'fix-dependencies' target to the library project."
|
|
36
42
|
},
|
|
37
43
|
"indexExport": {
|
|
38
44
|
"type": "boolean",
|
|
39
|
-
"description": "
|
|
45
|
+
"description": "Whether to add the 'index-export' target to the library project."
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
}
|
|
@@ -7,7 +7,7 @@ const workspace_ts_morph_1 = require("@rxap/workspace-ts-morph");
|
|
|
7
7
|
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
8
8
|
const ts_morph_2 = require("ts-morph");
|
|
9
9
|
function UpdateAppModule(tree, options) {
|
|
10
|
-
(0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
10
|
+
return (0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
11
11
|
project: options.project,
|
|
12
12
|
backend: undefined,
|
|
13
13
|
}, (project, [sourceFile]) => {
|
|
@@ -45,7 +45,7 @@ function UpdateAppModule(tree, options) {
|
|
|
45
45
|
}, ['/app/app.module.ts']);
|
|
46
46
|
}
|
|
47
47
|
function UpdateAppConfig(tree, options, projectName) {
|
|
48
|
-
(0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
48
|
+
return (0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
49
49
|
project: options.project,
|
|
50
50
|
backend: undefined,
|
|
51
51
|
}, (project, [sourceFile]) => {
|
|
@@ -72,8 +72,8 @@ function UpdateAppConfig(tree, options, projectName) {
|
|
|
72
72
|
function jwtGenerator(tree, options) {
|
|
73
73
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
74
74
|
console.log('nestjs application jwt generator:', options);
|
|
75
|
-
UpdateAppModule(tree, options);
|
|
76
|
-
UpdateAppConfig(tree, options, options.project);
|
|
75
|
+
yield UpdateAppModule(tree, options);
|
|
76
|
+
yield UpdateAppConfig(tree, options, options.project);
|
|
77
77
|
yield (0, workspace_utilities_1.AddPackageJsonDependency)(tree, '@rxap/nest-jwt', 'latest', { soft: true });
|
|
78
78
|
yield (0, workspace_utilities_1.AddPackageJsonDependency)(tree, '@nestjs/jwt', 'latest', { soft: true });
|
|
79
79
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/nestjs/src/generators/jwt/generator.ts"],"names":[],"mappings":";;AAqGA,oCAMC;;AA1GD,6CAKwB;AACxB,iEAAuE;AACvE,mEAAqE;AACrE,uCAAmC;AAInC,SAAS,eAAe,CAAC,IAAU,EAAE,OAA8B;IAEjE,IAAA,gDAA2B,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/nestjs/src/generators/jwt/generator.ts"],"names":[],"mappings":";;AAqGA,oCAMC;;AA1GD,6CAKwB;AACxB,iEAAuE;AACvE,mEAAqE;A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AAE,EAAE,EAAE;QAE1B,IAAA,8BAAmB,EAAC,UAAU,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,YAAY;oBAClB,YAAY,EAAE,wBAAwB;iBACvC;gBACD;oBACE,IAAI,EAAE,iBAAiB;oBACvB,IAAI,EAAE,QAAQ;oBACd,YAAY,EAAE,eAAe;iBAC9B;aACF;YACD,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC,CAAC;QAEH,IAAA,wBAAa,EAAC,UAAU,EAAE;YACxB,YAAY,EAAE,CAAE,sBAAsB,CAAE;YACxC,eAAe,EAAE,iBAAiB;SACnC,CAAC,CAAC;IAEL,CAAC,EACD,CAAE,qBAAqB,CAAE,CAC1B,CAAC;AAEJ,CAAC;AAED,SAAsB,YAAY,CAAC,IAAU,EAAE,OAA2B;;QACxE,OAAO,CAAC,GAAG,CAAC,mCAAmC,EAAE,OAAO,CAAC,CAAC;QAC1D,MAAM,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrC,MAAM,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACtD,MAAM,IAAA,8CAAwB,EAAC,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACjF,MAAM,IAAA,8CAAwB,EAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAChF,CAAC;CAAA;AAED,kBAAe,YAAY,CAAC"}
|
|
@@ -6,10 +6,20 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"project": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"description": ""
|
|
9
|
+
"description": "The name of the project to add JWT support to.",
|
|
10
|
+
"x-prompt": "Which project should be extended with JWT support?",
|
|
11
|
+
"examples": [
|
|
12
|
+
"my-api"
|
|
13
|
+
]
|
|
10
14
|
},
|
|
11
15
|
"overwrite": {
|
|
12
|
-
"type": "boolean"
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"description": "Whether to overwrite existing files.",
|
|
18
|
+
"default": false,
|
|
19
|
+
"examples": [
|
|
20
|
+
true,
|
|
21
|
+
false
|
|
22
|
+
]
|
|
13
23
|
}
|
|
14
24
|
},
|
|
15
25
|
"required": [
|
|
@@ -6,29 +6,48 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"name": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"description": "The name of microservice",
|
|
10
|
-
"x-prompt": "
|
|
9
|
+
"description": "The name of the microservice.",
|
|
10
|
+
"x-prompt": "What is the name of the microservice?",
|
|
11
|
+
"examples": [
|
|
12
|
+
"order-service"
|
|
13
|
+
]
|
|
11
14
|
},
|
|
12
15
|
"directory": {
|
|
13
16
|
"type": "string",
|
|
14
|
-
"description": "The directory
|
|
17
|
+
"description": "The directory where the microservice will be created.",
|
|
18
|
+
"examples": [
|
|
19
|
+
"services"
|
|
20
|
+
]
|
|
15
21
|
},
|
|
16
22
|
|
|
17
23
|
"sentry": {
|
|
18
24
|
"type": "boolean",
|
|
19
25
|
"default": true,
|
|
20
|
-
"description": "Whether this
|
|
21
|
-
"x-prompt": "Should this
|
|
26
|
+
"description": "Whether this microservice should use Sentry for error tracking.",
|
|
27
|
+
"x-prompt": "Should this microservice use Sentry?",
|
|
28
|
+
"examples": [
|
|
29
|
+
true,
|
|
30
|
+
false
|
|
31
|
+
]
|
|
22
32
|
},
|
|
23
33
|
"skipFormat": {
|
|
24
34
|
"type": "boolean",
|
|
25
|
-
"default": false
|
|
35
|
+
"default": false,
|
|
36
|
+
"description": "Whether to skip formatting the generated files.",
|
|
37
|
+
"examples": [
|
|
38
|
+
true,
|
|
39
|
+
false
|
|
40
|
+
]
|
|
26
41
|
},
|
|
27
42
|
"swagger": {
|
|
28
43
|
"type": "boolean",
|
|
29
44
|
"default": true,
|
|
30
|
-
"description": "Whether this
|
|
31
|
-
"x-prompt": "Should this
|
|
45
|
+
"description": "Whether this microservice should use Swagger/OpenAPI for documentation.",
|
|
46
|
+
"x-prompt": "Should this microservice support OpenAPI configuration generation?",
|
|
47
|
+
"examples": [
|
|
48
|
+
true,
|
|
49
|
+
false
|
|
50
|
+
]
|
|
32
51
|
},
|
|
33
52
|
"swaggerLive": {
|
|
34
53
|
"type": "boolean",
|
|
@@ -37,26 +56,45 @@
|
|
|
37
56
|
},
|
|
38
57
|
"generateMain": {
|
|
39
58
|
"type": "boolean",
|
|
40
|
-
"description": "Whether the main file should be generated"
|
|
59
|
+
"description": "Whether the main entry point file (`main.ts`) should be generated.",
|
|
60
|
+
"default": true,
|
|
61
|
+
"examples": [
|
|
62
|
+
true,
|
|
63
|
+
false
|
|
64
|
+
]
|
|
41
65
|
},
|
|
42
66
|
"healthIndicator": {
|
|
43
67
|
"type": "boolean",
|
|
44
68
|
"default": true,
|
|
45
|
-
"description": "Whether this
|
|
46
|
-
"x-prompt": "Should this
|
|
69
|
+
"description": "Whether this microservice should include a health indicator endpoint.",
|
|
70
|
+
"x-prompt": "Should this microservice have a health indicator endpoint?",
|
|
71
|
+
"examples": [
|
|
72
|
+
true,
|
|
73
|
+
false
|
|
74
|
+
]
|
|
47
75
|
},
|
|
48
76
|
"healthIndicatorList": {
|
|
49
77
|
"type": "array",
|
|
50
78
|
"items": {
|
|
51
79
|
"type": "string"
|
|
52
80
|
},
|
|
53
|
-
"description": "A list of health indicators"
|
|
81
|
+
"description": "A list of additional health indicators to include.",
|
|
82
|
+
"examples": [
|
|
83
|
+
[
|
|
84
|
+
"database",
|
|
85
|
+
"redis"
|
|
86
|
+
]
|
|
87
|
+
]
|
|
54
88
|
},
|
|
55
89
|
"validator": {
|
|
56
90
|
"type": "boolean",
|
|
57
91
|
"default": true,
|
|
58
|
-
"description": "Whether this
|
|
59
|
-
"x-prompt": "Should this
|
|
92
|
+
"description": "Whether this microservice should use the NestJS `ValidationPipe`.",
|
|
93
|
+
"x-prompt": "Should this microservice use the `ValidationPipe`?",
|
|
94
|
+
"examples": [
|
|
95
|
+
true,
|
|
96
|
+
false
|
|
97
|
+
]
|
|
60
98
|
},
|
|
61
99
|
"platform": {
|
|
62
100
|
"type": "string",
|
|
@@ -65,55 +103,91 @@
|
|
|
65
103
|
"fastify"
|
|
66
104
|
],
|
|
67
105
|
"default": "express",
|
|
68
|
-
"x-prompt": "
|
|
106
|
+
"x-prompt": "Which platform should be used (Express or Fastify)?",
|
|
107
|
+
"examples": [
|
|
108
|
+
"express",
|
|
109
|
+
"fastify"
|
|
110
|
+
]
|
|
69
111
|
},
|
|
70
112
|
"port": {
|
|
71
113
|
"type": "number",
|
|
72
|
-
"description": "The default port where the server
|
|
114
|
+
"description": "The default port number where the server will listen.",
|
|
115
|
+
"examples": [
|
|
116
|
+
3000,
|
|
117
|
+
8080
|
|
118
|
+
]
|
|
73
119
|
},
|
|
74
120
|
"apiPrefix": {
|
|
75
121
|
"oneOf": [
|
|
76
122
|
{
|
|
77
123
|
"type": "string",
|
|
78
|
-
"description": "The default global
|
|
124
|
+
"description": "The default global API prefix.",
|
|
125
|
+
"examples": [
|
|
126
|
+
"api"
|
|
127
|
+
]
|
|
79
128
|
},
|
|
80
129
|
{
|
|
81
|
-
"description": "Disable the global
|
|
130
|
+
"description": "Disable the global API prefix.",
|
|
82
131
|
"type": "boolean",
|
|
83
|
-
"const": false
|
|
132
|
+
"const": false,
|
|
133
|
+
"examples": [
|
|
134
|
+
false
|
|
135
|
+
]
|
|
84
136
|
}
|
|
85
137
|
]
|
|
86
138
|
},
|
|
87
139
|
"sentryDsn": {
|
|
88
140
|
"type": "string",
|
|
89
|
-
"description": "
|
|
141
|
+
"description": "The default Sentry DSN for error tracking.",
|
|
142
|
+
"examples": [
|
|
143
|
+
"https://examplePublicKey@o0.ingest.sentry.io/0"
|
|
144
|
+
]
|
|
90
145
|
},
|
|
91
146
|
"overwrite": {
|
|
92
147
|
"type": "boolean",
|
|
93
148
|
"default": false,
|
|
94
|
-
"description": "Whether to overwrite existing files"
|
|
149
|
+
"description": "Whether to overwrite existing files, if any.",
|
|
150
|
+
"examples": [
|
|
151
|
+
true,
|
|
152
|
+
false
|
|
153
|
+
]
|
|
95
154
|
},
|
|
96
155
|
"jwt": {
|
|
97
156
|
"type": "boolean",
|
|
98
157
|
"default": false,
|
|
99
|
-
"description": "Whether the
|
|
100
|
-
"x-prompt": "Should this
|
|
158
|
+
"description": "Whether the microservice should use JWT for authentication.",
|
|
159
|
+
"x-prompt": "Should this microservice use JWT?",
|
|
160
|
+
"examples": [
|
|
161
|
+
true,
|
|
162
|
+
false
|
|
163
|
+
]
|
|
101
164
|
},
|
|
102
165
|
"openApi": {
|
|
103
166
|
"type": "boolean",
|
|
104
167
|
"default": false,
|
|
105
|
-
"description": "Whether the
|
|
106
|
-
"x-prompt": "Should this
|
|
168
|
+
"description": "Whether the microservice should use an OpenAPI client.",
|
|
169
|
+
"x-prompt": "Should this microservice use an OpenAPI client?",
|
|
170
|
+
"examples": [
|
|
171
|
+
true,
|
|
172
|
+
false
|
|
173
|
+
]
|
|
107
174
|
},
|
|
108
175
|
"apiConfigurationFile": {
|
|
109
176
|
"type": "string",
|
|
110
|
-
"description": "The
|
|
177
|
+
"description": "The path to the API configuration file.",
|
|
178
|
+
"examples": [
|
|
179
|
+
"apps/my-api/src/assets/api-config.json"
|
|
180
|
+
]
|
|
111
181
|
},
|
|
112
182
|
"standalone": {
|
|
113
183
|
"type": "boolean",
|
|
114
184
|
"default": false,
|
|
115
|
-
"description": "Whether the
|
|
116
|
-
"x-prompt": "Should this
|
|
185
|
+
"description": "Whether the NestJS service should be standalone (without a module).",
|
|
186
|
+
"x-prompt": "Should this microservice be standalone?",
|
|
187
|
+
"examples": [
|
|
188
|
+
true,
|
|
189
|
+
false
|
|
190
|
+
]
|
|
117
191
|
}
|
|
118
192
|
},
|
|
119
193
|
"required": [
|
|
@@ -8,7 +8,7 @@ const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
|
8
8
|
const path_1 = require("path");
|
|
9
9
|
const ts_morph_2 = require("ts-morph");
|
|
10
10
|
function UpdateAppModule(tree, options) {
|
|
11
|
-
(0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
11
|
+
return (0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
12
12
|
project: options.project,
|
|
13
13
|
backend: undefined,
|
|
14
14
|
}, (project, [sourceFile]) => {
|
|
@@ -36,7 +36,7 @@ function UpdateAppModule(tree, options) {
|
|
|
36
36
|
}, ['/app/app.module.ts']);
|
|
37
37
|
}
|
|
38
38
|
function UpdateAppConfig(tree, options) {
|
|
39
|
-
(0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
39
|
+
return (0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
40
40
|
project: options.project,
|
|
41
41
|
backend: undefined,
|
|
42
42
|
}, (_, [sourceFile]) => {
|
|
@@ -61,13 +61,13 @@ function UpdateAppConfig(tree, options) {
|
|
|
61
61
|
}
|
|
62
62
|
function openApiGenerator(tree, options) {
|
|
63
63
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
UpdateAppModule(tree, options);
|
|
64
|
+
yield UpdateAppModule(tree, options);
|
|
65
65
|
const projectSourceRoot = (0, workspace_utilities_1.GetProjectSourceRoot)(tree, options.project);
|
|
66
66
|
if (!projectSourceRoot) {
|
|
67
67
|
throw new Error(`Could not find the source root of the project: ${options.project}`);
|
|
68
68
|
}
|
|
69
69
|
(0, workspace_utilities_1.CoerceFile)(tree, (0, path_1.join)(projectSourceRoot, 'assets', 'open-api-server-config.json'), '[]');
|
|
70
|
-
UpdateAppConfig(tree, options);
|
|
70
|
+
yield UpdateAppConfig(tree, options);
|
|
71
71
|
yield (0, workspace_utilities_1.AddPackageJsonDependency)(tree, '@rxap/nest-open-api', 'latest', { soft: true });
|
|
72
72
|
});
|
|
73
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/nestjs/src/generators/open-api/generator.ts"],"names":[],"mappings":";;AA8FA,4CAYC;;AAzGD,6CAIwB;AACxB,iEAAuE;AACvE,mEAImC;AACnC,+BAA4B;AAC5B,uCAAmC;AAInC,SAAS,eAAe,CAAC,IAAU,EAAE,OAA8B;IAEjE,IAAA,gDAA2B,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/nestjs/src/generators/open-api/generator.ts"],"names":[],"mappings":";;AA8FA,4CAYC;;AAzGD,6CAIwB;AACxB,iEAAuE;AACvE,mEAImC;AACnC,+BAA4B;AAC5B,uCAAmC;AAInC,SAAS,eAAe,CAAC,IAAU,EAAE,OAA8B;IAEjE,OAAO,IAAA,gDAA2B,EAChC,IAAI,EACJ;QACE,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,OAAO,EAAE,SAAS;KACnB,EACD,CAAC,OAAO,EAAE,CAAE,UAAU,CAAE,EAAE,EAAE;QAE1B,IAAA,iCAAsB,EACpB,UAAU,EACV;YACE,UAAU,EAAE,eAAe;YAC3B,UAAU,EAAE;gBACV;oBACE,YAAY,EAAE,CAAE,eAAe,EAAE,4BAA4B,CAAE;oBAC/D,eAAe,EAAE,qBAAqB;iBACvC;gBACD;oBACE,eAAe,EAAE,gBAAgB;oBACjC,YAAY,EAAE,CAAE,eAAe,CAAE;iBAClC;aACF;YACD,YAAY,EAAE,CAAC,CAAC,EAAE;gBAChB,CAAC,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC;gBAC5C,kBAAO,CAAC,MAAM,CAAC;oBACb,QAAQ,EAAE,MAAM;oBAChB,QAAQ,EAAE,4BAA4B;iBACvC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACN,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACf,CAAC;SACF,CACF,CAAC;IAEJ,CAAC,EACD,CAAE,oBAAoB,CAAE,CACzB,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C,IAAI,EAAE,qBAAqB,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACxF,CAAC;CAAA;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -6,10 +6,20 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"project": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"description": ""
|
|
9
|
+
"description": "The name of the project to add OpenApi support to.",
|
|
10
|
+
"x-prompt": "Which project should be extended with OpenApi support?",
|
|
11
|
+
"examples": [
|
|
12
|
+
"my-api"
|
|
13
|
+
]
|
|
10
14
|
},
|
|
11
15
|
"overwrite": {
|
|
12
|
-
"type": "boolean"
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"description": "Whether to overwrite existing files.",
|
|
18
|
+
"default": false,
|
|
19
|
+
"examples": [
|
|
20
|
+
true,
|
|
21
|
+
false
|
|
22
|
+
]
|
|
13
23
|
}
|
|
14
24
|
},
|
|
15
25
|
"required": [
|
|
@@ -12,7 +12,7 @@ function CoerceSentryModule(sourceFile, options) {
|
|
|
12
12
|
moduleName: 'SentryModule',
|
|
13
13
|
structures: [
|
|
14
14
|
{
|
|
15
|
-
moduleSpecifier: '@
|
|
15
|
+
moduleSpecifier: '@sentry/nestjs/setup',
|
|
16
16
|
namedImports: ['SentryModule'],
|
|
17
17
|
},
|
|
18
18
|
{
|
|
@@ -23,127 +23,54 @@ function CoerceSentryModule(sourceFile, options) {
|
|
|
23
23
|
namedImports: ['environment'],
|
|
24
24
|
moduleSpecifier: '../environments/environment',
|
|
25
25
|
},
|
|
26
|
+
],
|
|
27
|
+
importWriter: w => w.writeLine('SentryModule.forRoot()'),
|
|
28
|
+
});
|
|
29
|
+
(0, ts_morph_1.CoerceNestModuleImport)(sourceFile, {
|
|
30
|
+
overwrite: options.overwrite,
|
|
31
|
+
moduleName: 'SentryLoggerModule',
|
|
32
|
+
structures: [
|
|
26
33
|
{
|
|
27
|
-
namedImports: ['GetLogLevels'],
|
|
28
|
-
moduleSpecifier: '@rxap/nest-utilities',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
namedImports: ['SentryOptionsFactory'],
|
|
32
34
|
moduleSpecifier: '@rxap/nest-sentry',
|
|
35
|
+
namedImports: ['SentryLoggerModule', 'SentryModuleOptionsFactory'],
|
|
33
36
|
},
|
|
34
37
|
],
|
|
35
38
|
importWriter: w => {
|
|
36
|
-
w.writeLine('
|
|
39
|
+
w.writeLine('SentryLoggerModule.registerAsync(');
|
|
37
40
|
ts_morph_2.Writers.object({
|
|
38
|
-
|
|
39
|
-
inject: '[ ConfigService ]',
|
|
40
|
-
useFactory: 'SentryOptionsFactory(environment)',
|
|
41
|
-
})(w);
|
|
42
|
-
w.write(',');
|
|
43
|
-
ts_morph_2.Writers.object({
|
|
44
|
-
logLevels: 'GetLogLevels()',
|
|
41
|
+
useClass: 'SentryModuleOptionsFactory',
|
|
45
42
|
})(w);
|
|
46
43
|
w.write(')');
|
|
47
44
|
},
|
|
48
45
|
});
|
|
49
46
|
}
|
|
50
|
-
function CoerceSentryInterceptorOptionsProvider(sourceFile) {
|
|
51
|
-
(0, ts_morph_1.CoerceNestModuleProvider)(sourceFile, {
|
|
52
|
-
providerObject: {
|
|
53
|
-
provide: 'SENTRY_INTERCEPTOR_OPTIONS',
|
|
54
|
-
useValue: ts_morph_2.Writers.object({
|
|
55
|
-
filters: w1 => {
|
|
56
|
-
w1.write('[');
|
|
57
|
-
ts_morph_2.Writers.object({
|
|
58
|
-
type: 'HttpException',
|
|
59
|
-
filter: '(exception: HttpException) => 500 > exception.getStatus()',
|
|
60
|
-
})(w1);
|
|
61
|
-
w1.write(']');
|
|
62
|
-
},
|
|
63
|
-
}),
|
|
64
|
-
},
|
|
65
|
-
structures: [
|
|
66
|
-
{
|
|
67
|
-
namedImports: ['SENTRY_INTERCEPTOR_OPTIONS'],
|
|
68
|
-
moduleSpecifier: '@rxap/nest-sentry',
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
namedImports: ['HttpException'],
|
|
72
|
-
moduleSpecifier: '@nestjs/common',
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
function CoerceAppInterceptorProvider(sourceFile) {
|
|
78
|
-
(0, ts_morph_1.CoerceNestModuleProvider)(sourceFile, {
|
|
79
|
-
providerObject: {
|
|
80
|
-
provide: 'APP_INTERCEPTOR',
|
|
81
|
-
useClass: 'SentryInterceptor',
|
|
82
|
-
},
|
|
83
|
-
structures: [
|
|
84
|
-
{
|
|
85
|
-
namedImports: ['APP_INTERCEPTOR'],
|
|
86
|
-
moduleSpecifier: '@nestjs/core',
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
namedImports: ['SentryInterceptor'],
|
|
90
|
-
moduleSpecifier: '@rxap/nest-sentry',
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
47
|
function UpdateAppModule(tree, options) {
|
|
96
|
-
(0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
48
|
+
return (0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
97
49
|
project: options.project,
|
|
98
50
|
backend: undefined,
|
|
99
51
|
}, (project, [sourceFile]) => {
|
|
100
52
|
CoerceSentryModule(sourceFile, options);
|
|
101
|
-
// CoerceSentryInterceptorOptionsProvider(sourceFile);
|
|
102
|
-
// CoerceAppInterceptorProvider(sourceFile);
|
|
103
53
|
}, ['/app/app.module.ts']);
|
|
104
54
|
}
|
|
105
55
|
function UpdateAppConfig(tree, options, projectName) {
|
|
106
|
-
(0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
56
|
+
return (0, workspace_ts_morph_1.TsMorphNestProjectTransform)(tree, {
|
|
107
57
|
project: options.project,
|
|
108
58
|
backend: undefined,
|
|
109
59
|
}, (project, [sourceFile]) => {
|
|
110
60
|
(0, ts_morph_1.CoerceNestAppConfig)(sourceFile, {
|
|
111
|
-
|
|
112
|
-
{
|
|
113
|
-
name: 'SENTRY_DSN',
|
|
114
|
-
defaultValue: options.dsn,
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: 'SENTRY_ENABLED',
|
|
118
|
-
defaultValue: 'environment.sentry?.enabled ?? false',
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
name: 'SENTRY_ENVIRONMENT',
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
name: 'SENTRY_RELEASE',
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
name: 'SENTRY_SERVER_NAME',
|
|
128
|
-
defaultValue: `process.env.ROOT_DOMAIN ?? environment.app`,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
name: 'SENTRY_DEBUG',
|
|
132
|
-
defaultValue: 'environment.sentry?.debug ?? false',
|
|
133
|
-
},
|
|
134
|
-
],
|
|
61
|
+
expandList: ['sentryValidationSchema'],
|
|
135
62
|
overwrite: options.overwrite,
|
|
136
63
|
});
|
|
137
64
|
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
138
|
-
namedImports: ['
|
|
139
|
-
moduleSpecifier: '
|
|
65
|
+
namedImports: ['sentryValidationSchema'],
|
|
66
|
+
moduleSpecifier: '@rxap/nest-sentry',
|
|
140
67
|
});
|
|
141
68
|
}, ['/app/app.config.ts?']);
|
|
142
69
|
}
|
|
143
70
|
function sentryGenerator(tree, options) {
|
|
144
71
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
145
|
-
UpdateAppModule(tree, options);
|
|
146
|
-
UpdateAppConfig(tree, options, options.project);
|
|
72
|
+
yield UpdateAppModule(tree, options);
|
|
73
|
+
yield UpdateAppConfig(tree, options, options.project);
|
|
147
74
|
yield (0, workspace_utilities_1.AddPackageJsonDependency)(tree, '@sentry/node', 'latest', { soft: true });
|
|
148
75
|
yield (0, workspace_utilities_1.AddPackageJsonDependency)(tree, '@sentry/nestjs', 'latest', { soft: true });
|
|
149
76
|
yield (0, workspace_utilities_1.AddPackageJsonDependency)(tree, '@sentry/profiling-node', 'latest', { soft: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/nestjs/src/generators/sentry/generator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/nestjs/src/generators/sentry/generator.ts"],"names":[],"mappings":";;AA2GA,0CAUC;;AApHD,6CAIwB;AACxB,iEAAuE;AACvE,mEAAqE;AACrE,uCAGkB;AAGlB,SAAS,kBAAkB,CAAC,UAAsB,EAAE,OAA8B;IAEhF,IAAA,iCAAsB,EACpB,UAAU,EACV;QACE,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,UAAU,EAAE,cAAc;QAC1B,UAAU,EAAE;YACV;gBACE,eAAe,EAAE,sBAAsB;gBACvC,YAAY,EAAE,CAAE,cAAc,CAAE;aACjC;YACD;gBACE,eAAe,EAAE,gBAAgB;gBACjC,YAAY,EAAE,CAAE,eAAe,EAAE,cAAc,CAAE;aAClD;YACD;gBACE,YAAY,EAAE,CAAE,aAAa,CAAE;gBAC/B,eAAe,EAAE,6BAA6B;aAC/C;SACF;QACD,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC;KACzD,CACF,CAAC;IAEF,IAAA,iCAAsB,EACpB,UAAU,EACV;QACE,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,UAAU,EAAE,oBAAoB;QAChC,UAAU,EAAE;YACV;gBACE,eAAe,EAAE,mBAAmB;gBACpC,YAAY,EAAE,CAAE,oBAAoB,EAAE,4BAA4B,CAAE;aACrE;SACF;QACD,YAAY,EAAE,CAAC,CAAC,EAAE;YAChB,CAAC,CAAC,SAAS,CAAC,mCAAmC,CAAC,CAAC;YACjD,kBAAO,CAAC,MAAM,CAAC;gBACb,QAAQ,EAAE,4BA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AE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/E,MAAM,IAAA,8CAAwB,EAAC,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACjF,MAAM,IAAA,8CAAwB,EAAC,IAAI,EAAE,wBAAwB,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACzF,MAAM,IAAA,8CAAwB,EAAC,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACtF,CAAC;CAAA;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -10,20 +10,35 @@
|
|
|
10
10
|
"$default": {
|
|
11
11
|
"$source": "projectName"
|
|
12
12
|
},
|
|
13
|
-
"x-prompt": "Which project should be
|
|
13
|
+
"x-prompt": "Which project should be extended with sentry support?",
|
|
14
|
+
"examples": [
|
|
15
|
+
"my-app"
|
|
16
|
+
]
|
|
14
17
|
},
|
|
15
18
|
"dsn": {
|
|
16
19
|
"type": "string",
|
|
17
|
-
"description": "
|
|
20
|
+
"description": "The default Sentry DSN.",
|
|
21
|
+
"examples": [
|
|
22
|
+
"https://examplePublicKey@o0.ingest.sentry.io/0"
|
|
23
|
+
]
|
|
18
24
|
},
|
|
19
25
|
"required": {
|
|
20
26
|
"type": "boolean",
|
|
21
|
-
"description": "Whether or not the
|
|
27
|
+
"description": "Whether or not the Sentry DSN should be required to start the application.",
|
|
28
|
+
"default": false,
|
|
29
|
+
"examples": [
|
|
30
|
+
true,
|
|
31
|
+
false
|
|
32
|
+
]
|
|
22
33
|
},
|
|
23
34
|
"overwrite": {
|
|
24
35
|
"type": "boolean",
|
|
25
36
|
"default": false,
|
|
26
|
-
"description": "Whether to overwrite existing files"
|
|
37
|
+
"description": "Whether to overwrite existing files.",
|
|
38
|
+
"examples": [
|
|
39
|
+
true,
|
|
40
|
+
false
|
|
41
|
+
]
|
|
27
42
|
}
|
|
28
43
|
},
|
|
29
44
|
"required": [
|