generator-jhipster-yellowbricks-spring-boot-contextpath 1.0.1 → 1.1.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/README.md +1 -1
- package/generators/spring-boot/generator.js +8 -6
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generator-jhipster-yellowbricks-spring-boot-contextpath
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One of [](https://github.com/idNoRD/generator-jhipster-yellowbricks) - a [JHipster](https://www.jhipster.tech/) blueprint that sets `server.servlet.context-path` in `application.yml` to a configurable context path.
|
|
4
4
|
|
|
5
5
|
[![NPM version][npm-image]][npm-url]
|
|
6
6
|
[![Generator][github-generator-image]][github-generator-url]
|
|
@@ -88,7 +88,7 @@ export default class extends BaseApplicationGenerator {
|
|
|
88
88
|
const contextPath = this.blueprintConfig.contextPath;
|
|
89
89
|
if (!contextPath) {
|
|
90
90
|
this.log.warn(
|
|
91
|
-
'[
|
|
91
|
+
'[yellowbricks-spring-boot-contextpath] contextPath not configured — add {"generator-jhipster-yellowbricks-spring-boot-contextpath":{"contextPath":"/jh/"}} to .yo-rc.json',
|
|
92
92
|
);
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
@@ -96,16 +96,18 @@ export default class extends BaseApplicationGenerator {
|
|
|
96
96
|
this.editFile('src/main/resources/config/application.yml', { ignoreNonExisting: true }, content => {
|
|
97
97
|
// Drift detection: verify expected surrounding structure
|
|
98
98
|
if (!/^server:$/m.test(content)) {
|
|
99
|
-
this.log.warn('[
|
|
99
|
+
this.log.warn('[yellowbricks-spring-boot-contextpath] application.yml: server section not found — manual intervention needed');
|
|
100
100
|
return content;
|
|
101
101
|
}
|
|
102
102
|
if (!/ {2}servlet:/.test(content)) {
|
|
103
|
-
this.log.warn(
|
|
103
|
+
this.log.warn(
|
|
104
|
+
'[yellowbricks-spring-boot-contextpath] application.yml: server.servlet section not found — manual intervention needed',
|
|
105
|
+
);
|
|
104
106
|
return content;
|
|
105
107
|
}
|
|
106
108
|
if (!/^\s+session:$/m.test(content)) {
|
|
107
109
|
this.log.warn(
|
|
108
|
-
'[
|
|
110
|
+
'[yellowbricks-spring-boot-contextpath] application.yml: server.servlet.session section not found — manual intervention needed',
|
|
109
111
|
);
|
|
110
112
|
return content;
|
|
111
113
|
}
|
|
@@ -121,10 +123,10 @@ export default class extends BaseApplicationGenerator {
|
|
|
121
123
|
|
|
122
124
|
if (previousContextPath && previousContextPath !== contextPath) {
|
|
123
125
|
this.log.info(
|
|
124
|
-
`[
|
|
126
|
+
`[yellowbricks-spring-boot-contextpath] application.yml: context-path renamed from "${previousContextPath}" to "${contextPath}"`,
|
|
125
127
|
);
|
|
126
128
|
} else {
|
|
127
|
-
this.log.info(`[
|
|
129
|
+
this.log.info(`[yellowbricks-spring-boot-contextpath] application.yml: context-path "${contextPath}" added successfully`);
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
return updated;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generator-jhipster-yellowbricks-spring-boot-contextpath",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "JHipster blueprint to configure Spring Boot application context-path",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yeoman-generator",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"author": "idNoRD",
|
|
17
|
+
"type": "module",
|
|
17
18
|
"bin": {
|
|
18
19
|
"jhipster-yellowbricks-spring-boot-contextpath": "cli/cli.cjs"
|
|
19
20
|
},
|