meixifrontserve 2.0.67 → 2.0.68
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 +74 -74
- package/bin/index.js +102 -102
- package/config/package.json +98 -98
- package/config/packageV2.json +98 -98
- package/config/projectConfig.js +277 -277
- package/config/urlConfig.js +51 -51
- package/package.json +1 -1
- package/scripts/apiConfig.js +21 -21
- package/scripts/checkUpdate.js +72 -72
- package/scripts/envByBetaController.js +19 -19
- package/scripts/envByBuildController.js +103 -103
- package/scripts/envByDevServerController.js +13 -13
- package/scripts/envByPre2Controller.js +21 -21
- package/scripts/envByPreController.js +21 -21
- package/scripts/envByProdController.js +20 -20
- package/scripts/envByServerController.js +196 -196
- package/scripts/envByTest2Controller.js +21 -21
- package/scripts/envByTest3Controller.js +21 -21
- package/scripts/envByTestController.js +21 -21
- package/scripts/envByTestServerController.js +15 -15
- package/scripts/rollupBuildController.js +177 -177
- package/scripts/serveController.js +110 -110
|
@@ -1,196 +1,196 @@
|
|
|
1
|
-
#! /usr/bin/env node
|
|
2
|
-
const ServerController = require('./serveController')
|
|
3
|
-
const urlConfig = require('../config/urlConfig');
|
|
4
|
-
|
|
5
|
-
const getEnvFileTemplate = require('../config/envFileTemplate')
|
|
6
|
-
const path = require("path");
|
|
7
|
-
const fs = require('fs');
|
|
8
|
-
const packageJson = require("../config/package.json");
|
|
9
|
-
const childProcess = require("child_process");
|
|
10
|
-
const {exec} = childProcess;
|
|
11
|
-
const shell = require('shelljs');
|
|
12
|
-
|
|
13
|
-
// 开发环境
|
|
14
|
-
class EnvByServerController extends ServerController {
|
|
15
|
-
|
|
16
|
-
constructor(projectName, isV2 = false) {
|
|
17
|
-
super(projectName, isV2);
|
|
18
|
-
this.port = 8888;
|
|
19
|
-
this.verName = "Dev";
|
|
20
|
-
this.configProps = null;
|
|
21
|
-
this.proxy = null;
|
|
22
|
-
this.isV2 = isV2
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async onStart() {
|
|
27
|
-
let flag = await super.onStart()
|
|
28
|
-
if (flag) {
|
|
29
|
-
|
|
30
|
-
this.writeVueConfigJs()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
this.onRunServe();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
createEnvFiles = async () => {
|
|
41
|
-
let _urlConfig = urlConfig[`${this.configProps}`];
|
|
42
|
-
let flag = await this.getServerPort();
|
|
43
|
-
if (flag) {
|
|
44
|
-
let envFileParams = {
|
|
45
|
-
envName: 'development',
|
|
46
|
-
proxy: this.proxy,
|
|
47
|
-
systemId: this.projectParams.systemId,
|
|
48
|
-
systemName: this.projectParams.systemName,
|
|
49
|
-
apiUrl: '/proxy',
|
|
50
|
-
verName: this.verName,
|
|
51
|
-
systemUrl: this.getSystemUrl(),
|
|
52
|
-
authUrl: _urlConfig.authUrl,
|
|
53
|
-
wsUrl: _urlConfig.wsUrl,
|
|
54
|
-
}
|
|
55
|
-
return getEnvFileTemplate(envFileParams);
|
|
56
|
-
} else {
|
|
57
|
-
setTimeout(() => {
|
|
58
|
-
this.onStart();
|
|
59
|
-
}, 500)
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
async getServerPort() {
|
|
68
|
-
|
|
69
|
-
let flag = await this.isPortAvailable(this.port);
|
|
70
|
-
|
|
71
|
-
if (!flag) {
|
|
72
|
-
this.port += 1;
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
return true;
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
writeEnvFile(fileContent) {
|
|
81
|
-
const press = process.cwd();
|
|
82
|
-
const fileUrl = path.join(press, `./.env`);
|
|
83
|
-
fs.writeFileSync(fileUrl, fileContent);
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
writeVueConfigJs() {
|
|
89
|
-
const press = process.cwd();
|
|
90
|
-
const fileUrl = path.join(press, './vue.config.js');
|
|
91
|
-
let fileContent = fs.readFileSync(fileUrl).toString();
|
|
92
|
-
const regex = /(?<=^|[^0-9])port: \d{4}(?=$|[^0-9])/;
|
|
93
|
-
fileContent = fileContent.replace(regex, (math, index, input) => {
|
|
94
|
-
return `port: ${this.port}`;
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
fs.writeFileSync(path.join(press, './vue.config.js'), fileContent);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
// 获取指定端口是否可以使用
|
|
103
|
-
isPortAvailable(port) {
|
|
104
|
-
return new Promise((resolve, reject) => {
|
|
105
|
-
const portUse = require('tcp-port-used');
|
|
106
|
-
portUse.check(port, this.getLocalAddress()).then(
|
|
107
|
-
((used) => {
|
|
108
|
-
if (used) {
|
|
109
|
-
resolve(false);
|
|
110
|
-
} else {
|
|
111
|
-
resolve(true)
|
|
112
|
-
}
|
|
113
|
-
})
|
|
114
|
-
).catch(
|
|
115
|
-
() => {
|
|
116
|
-
resolve(false);
|
|
117
|
-
}
|
|
118
|
-
)
|
|
119
|
-
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// 获取本机ip
|
|
124
|
-
getLocalAddress() {
|
|
125
|
-
const os = require('os');
|
|
126
|
-
const interfaces = os.networkInterfaces();
|
|
127
|
-
let ipAddress;
|
|
128
|
-
Object.keys(interfaces).forEach((interfaceName) => {
|
|
129
|
-
interfaces[interfaceName].forEach((interfaceInfo) => {
|
|
130
|
-
if (interfaceInfo.family === 'IPv4' && !interfaceInfo.internal && interfaceName.indexOf('VMware') === -1) {
|
|
131
|
-
ipAddress = interfaceInfo.address;
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
return ipAddress;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
onRunServe() {
|
|
140
|
-
console.log(`
|
|
141
|
-
:+::+:: :+:::+: ##### #####
|
|
142
|
-
:+: :+: :+: :+: :+: :+:
|
|
143
|
-
+:+ +:+ +:+ +:+ +:+ +:+
|
|
144
|
-
+#+ +#+#+ +#+ +#++#+
|
|
145
|
-
+#+ +#+ +#+ +#+ +#+
|
|
146
|
-
#+# #+# #+# #+# #+#
|
|
147
|
-
### ### ############ #####`)
|
|
148
|
-
console.error('即将开始下载依赖!')
|
|
149
|
-
exec('npm install --legacy-peer-deps', async (error, stdout, stderr) => {
|
|
150
|
-
if (this.isV2) {
|
|
151
|
-
console.error("下载td组件库")
|
|
152
|
-
exec('npm i tdesign-vue@naruto --legacy-peer-deps', async (error, stdout, stderr) => {
|
|
153
|
-
this.runServe(error)
|
|
154
|
-
})
|
|
155
|
-
} else {
|
|
156
|
-
this.runServe(error)
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
runServe(error){
|
|
162
|
-
if (!error) {
|
|
163
|
-
shell.exec('npm run serve', (error, stdout, stderr) => {
|
|
164
|
-
})
|
|
165
|
-
this.openDefaultBrowser(`http://${this.getSystemUrl()}`);
|
|
166
|
-
} else {
|
|
167
|
-
console.log(error)
|
|
168
|
-
console.error('依赖下载失败!')
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
getSystemUrl() {
|
|
174
|
-
return `${this.getLocalAddress()}:${this.port}`;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
openDefaultBrowser(url) {
|
|
179
|
-
const exec = require('child_process').exec;
|
|
180
|
-
switch (process.platform) {
|
|
181
|
-
case "darwin":
|
|
182
|
-
exec('open ' + url);
|
|
183
|
-
break;
|
|
184
|
-
case "win32":
|
|
185
|
-
exec('start ' + url);
|
|
186
|
-
break;
|
|
187
|
-
default:
|
|
188
|
-
exec('xdg-open', [url]);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
module.exports = EnvByServerController;
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
const ServerController = require('./serveController')
|
|
3
|
+
const urlConfig = require('../config/urlConfig');
|
|
4
|
+
|
|
5
|
+
const getEnvFileTemplate = require('../config/envFileTemplate')
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const packageJson = require("../config/package.json");
|
|
9
|
+
const childProcess = require("child_process");
|
|
10
|
+
const {exec} = childProcess;
|
|
11
|
+
const shell = require('shelljs');
|
|
12
|
+
|
|
13
|
+
// 开发环境
|
|
14
|
+
class EnvByServerController extends ServerController {
|
|
15
|
+
|
|
16
|
+
constructor(projectName, isV2 = false) {
|
|
17
|
+
super(projectName, isV2);
|
|
18
|
+
this.port = 8888;
|
|
19
|
+
this.verName = "Dev";
|
|
20
|
+
this.configProps = null;
|
|
21
|
+
this.proxy = null;
|
|
22
|
+
this.isV2 = isV2
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async onStart() {
|
|
27
|
+
let flag = await super.onStart()
|
|
28
|
+
if (flag) {
|
|
29
|
+
|
|
30
|
+
this.writeVueConfigJs()
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
this.onRunServe();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
createEnvFiles = async () => {
|
|
41
|
+
let _urlConfig = urlConfig[`${this.configProps}`];
|
|
42
|
+
let flag = await this.getServerPort();
|
|
43
|
+
if (flag) {
|
|
44
|
+
let envFileParams = {
|
|
45
|
+
envName: 'development',
|
|
46
|
+
proxy: this.proxy,
|
|
47
|
+
systemId: this.projectParams.systemId,
|
|
48
|
+
systemName: this.projectParams.systemName,
|
|
49
|
+
apiUrl: '/proxy',
|
|
50
|
+
verName: this.verName,
|
|
51
|
+
systemUrl: this.getSystemUrl(),
|
|
52
|
+
authUrl: _urlConfig.authUrl,
|
|
53
|
+
wsUrl: _urlConfig.wsUrl,
|
|
54
|
+
}
|
|
55
|
+
return getEnvFileTemplate(envFileParams);
|
|
56
|
+
} else {
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
this.onStart();
|
|
59
|
+
}, 500)
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
async getServerPort() {
|
|
68
|
+
|
|
69
|
+
let flag = await this.isPortAvailable(this.port);
|
|
70
|
+
|
|
71
|
+
if (!flag) {
|
|
72
|
+
this.port += 1;
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
return true;
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
writeEnvFile(fileContent) {
|
|
81
|
+
const press = process.cwd();
|
|
82
|
+
const fileUrl = path.join(press, `./.env`);
|
|
83
|
+
fs.writeFileSync(fileUrl, fileContent);
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
writeVueConfigJs() {
|
|
89
|
+
const press = process.cwd();
|
|
90
|
+
const fileUrl = path.join(press, './vue.config.js');
|
|
91
|
+
let fileContent = fs.readFileSync(fileUrl).toString();
|
|
92
|
+
const regex = /(?<=^|[^0-9])port: \d{4}(?=$|[^0-9])/;
|
|
93
|
+
fileContent = fileContent.replace(regex, (math, index, input) => {
|
|
94
|
+
return `port: ${this.port}`;
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
fs.writeFileSync(path.join(press, './vue.config.js'), fileContent);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
// 获取指定端口是否可以使用
|
|
103
|
+
isPortAvailable(port) {
|
|
104
|
+
return new Promise((resolve, reject) => {
|
|
105
|
+
const portUse = require('tcp-port-used');
|
|
106
|
+
portUse.check(port, this.getLocalAddress()).then(
|
|
107
|
+
((used) => {
|
|
108
|
+
if (used) {
|
|
109
|
+
resolve(false);
|
|
110
|
+
} else {
|
|
111
|
+
resolve(true)
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
).catch(
|
|
115
|
+
() => {
|
|
116
|
+
resolve(false);
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// 获取本机ip
|
|
124
|
+
getLocalAddress() {
|
|
125
|
+
const os = require('os');
|
|
126
|
+
const interfaces = os.networkInterfaces();
|
|
127
|
+
let ipAddress;
|
|
128
|
+
Object.keys(interfaces).forEach((interfaceName) => {
|
|
129
|
+
interfaces[interfaceName].forEach((interfaceInfo) => {
|
|
130
|
+
if (interfaceInfo.family === 'IPv4' && !interfaceInfo.internal && interfaceName.indexOf('VMware') === -1) {
|
|
131
|
+
ipAddress = interfaceInfo.address;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
return ipAddress;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
onRunServe() {
|
|
140
|
+
console.log(`
|
|
141
|
+
:+::+:: :+:::+: ##### #####
|
|
142
|
+
:+: :+: :+: :+: :+: :+:
|
|
143
|
+
+:+ +:+ +:+ +:+ +:+ +:+
|
|
144
|
+
+#+ +#+#+ +#+ +#++#+
|
|
145
|
+
+#+ +#+ +#+ +#+ +#+
|
|
146
|
+
#+# #+# #+# #+# #+#
|
|
147
|
+
### ### ############ #####`)
|
|
148
|
+
console.error('即将开始下载依赖!')
|
|
149
|
+
exec('npm install --legacy-peer-deps', async (error, stdout, stderr) => {
|
|
150
|
+
if (this.isV2) {
|
|
151
|
+
console.error("下载td组件库")
|
|
152
|
+
exec('npm i tdesign-vue@naruto --legacy-peer-deps', async (error, stdout, stderr) => {
|
|
153
|
+
this.runServe(error)
|
|
154
|
+
})
|
|
155
|
+
} else {
|
|
156
|
+
this.runServe(error)
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
runServe(error){
|
|
162
|
+
if (!error) {
|
|
163
|
+
shell.exec('npm run serve', (error, stdout, stderr) => {
|
|
164
|
+
})
|
|
165
|
+
this.openDefaultBrowser(`http://${this.getSystemUrl()}`);
|
|
166
|
+
} else {
|
|
167
|
+
console.log(error)
|
|
168
|
+
console.error('依赖下载失败!')
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
getSystemUrl() {
|
|
174
|
+
return `${this.getLocalAddress()}:${this.port}`;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
openDefaultBrowser(url) {
|
|
179
|
+
const exec = require('child_process').exec;
|
|
180
|
+
switch (process.platform) {
|
|
181
|
+
case "darwin":
|
|
182
|
+
exec('open ' + url);
|
|
183
|
+
break;
|
|
184
|
+
case "win32":
|
|
185
|
+
exec('start ' + url);
|
|
186
|
+
break;
|
|
187
|
+
default:
|
|
188
|
+
exec('xdg-open', [url]);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
module.exports = EnvByServerController;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class EnvByTest2Controller extends EnvByBuildController {
|
|
5
|
-
constructor(projectName, envType,isV2 = false) {
|
|
6
|
-
super(projectName, envType,isV2);
|
|
7
|
-
this.envName = 'testing'
|
|
8
|
-
this.envType = 'testing'
|
|
9
|
-
this.verName = 'test2ing'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
getSystemUrl() {
|
|
14
|
-
this.urlConfig.urlPrefixes.splice(1, 0, this.projectParams.urlPrefix[`${this.envType}`]);
|
|
15
|
-
return this.urlConfig.urlPrefixes.toString().replace(/,/g, '.');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
module.exports = EnvByTest2Controller;
|
|
1
|
+
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class EnvByTest2Controller extends EnvByBuildController {
|
|
5
|
+
constructor(projectName, envType,isV2 = false) {
|
|
6
|
+
super(projectName, envType,isV2);
|
|
7
|
+
this.envName = 'testing'
|
|
8
|
+
this.envType = 'testing'
|
|
9
|
+
this.verName = 'test2ing'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
getSystemUrl() {
|
|
14
|
+
this.urlConfig.urlPrefixes.splice(1, 0, this.projectParams.urlPrefix[`${this.envType}`]);
|
|
15
|
+
return this.urlConfig.urlPrefixes.toString().replace(/,/g, '.');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
module.exports = EnvByTest2Controller;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class EnvByTest3Controller extends EnvByBuildController {
|
|
5
|
-
constructor(projectName, envType,isV2 = false) {
|
|
6
|
-
super(projectName, envType,isV2);
|
|
7
|
-
this.envName = 'testing'
|
|
8
|
-
this.envType = 'testing'
|
|
9
|
-
this.verName = 'test3ing'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
getSystemUrl() {
|
|
14
|
-
this.urlConfig.urlPrefixes.splice(1, 0, this.projectParams.urlPrefix[`${this.envType}`]);
|
|
15
|
-
return this.urlConfig.urlPrefixes.toString().replace(/,/g, '.');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
module.exports = EnvByTest3Controller;
|
|
1
|
+
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class EnvByTest3Controller extends EnvByBuildController {
|
|
5
|
+
constructor(projectName, envType,isV2 = false) {
|
|
6
|
+
super(projectName, envType,isV2);
|
|
7
|
+
this.envName = 'testing'
|
|
8
|
+
this.envType = 'testing'
|
|
9
|
+
this.verName = 'test3ing'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
getSystemUrl() {
|
|
14
|
+
this.urlConfig.urlPrefixes.splice(1, 0, this.projectParams.urlPrefix[`${this.envType}`]);
|
|
15
|
+
return this.urlConfig.urlPrefixes.toString().replace(/,/g, '.');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
module.exports = EnvByTest3Controller;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class EnvByTestController extends EnvByBuildController {
|
|
5
|
-
constructor(projectName, envType,isV2 = false) {
|
|
6
|
-
super(projectName, envType,isV2);
|
|
7
|
-
this.envName = 'testing'
|
|
8
|
-
this.envType = 'testing'
|
|
9
|
-
this.verName = 'testing'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
getSystemUrl() {
|
|
14
|
-
this.urlConfig.urlPrefixes.splice(1, 0, this.projectParams.urlPrefix[`${this.envType}`]);
|
|
15
|
-
return this.urlConfig.urlPrefixes.toString().replace(/,/g, '.');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
module.exports = EnvByTestController;
|
|
1
|
+
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class EnvByTestController extends EnvByBuildController {
|
|
5
|
+
constructor(projectName, envType,isV2 = false) {
|
|
6
|
+
super(projectName, envType,isV2);
|
|
7
|
+
this.envName = 'testing'
|
|
8
|
+
this.envType = 'testing'
|
|
9
|
+
this.verName = 'testing'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
getSystemUrl() {
|
|
14
|
+
this.urlConfig.urlPrefixes.splice(1, 0, this.projectParams.urlPrefix[`${this.envType}`]);
|
|
15
|
+
return this.urlConfig.urlPrefixes.toString().replace(/,/g, '.');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
module.exports = EnvByTestController;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
#! /usr/bin/env node
|
|
2
|
-
const envByServerController = require('./envByServerController')
|
|
3
|
-
|
|
4
|
-
class EnvByTestServerController extends envByServerController {
|
|
5
|
-
constructor(projectName,isV2 = false) {
|
|
6
|
-
super(projectName,isV2);
|
|
7
|
-
this.proxy = "http://gateway.wubangtu.xyz:9999";
|
|
8
|
-
this.configProps='serveByTest'
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
module.exports = EnvByTestServerController;
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
const envByServerController = require('./envByServerController')
|
|
3
|
+
|
|
4
|
+
class EnvByTestServerController extends envByServerController {
|
|
5
|
+
constructor(projectName,isV2 = false) {
|
|
6
|
+
super(projectName,isV2);
|
|
7
|
+
this.proxy = "http://gateway.wubangtu.xyz:9999";
|
|
8
|
+
this.configProps='serveByTest'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
module.exports = EnvByTestServerController;
|