meixifrontserve 2.0.68 → 2.0.70
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 +96 -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
package/scripts/apiConfig.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const apiConfig = {
|
|
2
|
-
'dev': "http://meixi.dev.meixioa.com/api",
|
|
3
|
-
'beta': "http://meixi.dev.meixioa.com/api",
|
|
4
|
-
"pre": "http://pre2.oaadmin.meixioa.com/api",
|
|
5
|
-
"prod": "https://oaadmin.meixioa.com/api"
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const ossBuckConfig = {
|
|
10
|
-
'dev': 'Web/OA/FrontMicModule/',
|
|
11
|
-
'beta': 'Web/OA/FrontMicModule/',
|
|
12
|
-
'pre': 'Web/OA/FrontMicModule/',
|
|
13
|
-
'prod': 'Web/OA/FrontMicModule/'
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
module.exports = {
|
|
18
|
-
apiConfig,
|
|
19
|
-
ossBuckConfig
|
|
20
|
-
}
|
|
21
|
-
|
|
1
|
+
const apiConfig = {
|
|
2
|
+
'dev': "http://meixi.dev.meixioa.com/api",
|
|
3
|
+
'beta': "http://meixi.dev.meixioa.com/api",
|
|
4
|
+
"pre": "http://pre2.oaadmin.meixioa.com/api",
|
|
5
|
+
"prod": "https://oaadmin.meixioa.com/api"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const ossBuckConfig = {
|
|
10
|
+
'dev': 'Web/OA/FrontMicModule/',
|
|
11
|
+
'beta': 'Web/OA/FrontMicModule/',
|
|
12
|
+
'pre': 'Web/OA/FrontMicModule/',
|
|
13
|
+
'prod': 'Web/OA/FrontMicModule/'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
module.exports = {
|
|
18
|
+
apiConfig,
|
|
19
|
+
ossBuckConfig
|
|
20
|
+
}
|
|
21
|
+
|
package/scripts/checkUpdate.js
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
const needle = require('needle');
|
|
2
|
-
const options = require('../package.json');
|
|
3
|
-
const child_process = require("child_process");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const checkUpdate = async () => {
|
|
7
|
-
console.log('正在获取网络版本号请稍等');
|
|
8
|
-
return new Promise(async (resolve, reject) => {
|
|
9
|
-
needle.get('https://registry.npmjs.org/meixifrontserve', (error, res) => {
|
|
10
|
-
|
|
11
|
-
if (error) {
|
|
12
|
-
resolve(false);
|
|
13
|
-
}
|
|
14
|
-
const netVer = arrayToNumber(res.body[`dist-tags`][`latest`].split('.'));
|
|
15
|
-
const localVer = arrayToNumber(options.version.split('.'));
|
|
16
|
-
if (netVer === localVer) {
|
|
17
|
-
resolve(true);
|
|
18
|
-
} else {
|
|
19
|
-
if (netVer > localVer) {
|
|
20
|
-
// 下载最新的依赖
|
|
21
|
-
console.log('正在下载依赖,请稍后');
|
|
22
|
-
child_process.exec(`${returnCmd()}`, (error, stdout, stderr) => {
|
|
23
|
-
if (!error) {
|
|
24
|
-
console.log('依赖下载成功,请重新执行命令。');
|
|
25
|
-
process.exit();
|
|
26
|
-
} else {
|
|
27
|
-
console.log(`依赖下载失败,请手动执行命令${returnCmd()}`);
|
|
28
|
-
process.exit();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
})
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const arrayToNumber = (array) => {
|
|
42
|
-
|
|
43
|
-
let str = '';
|
|
44
|
-
if (array instanceof Array) {
|
|
45
|
-
array.forEach(item => {
|
|
46
|
-
str += item;
|
|
47
|
-
})
|
|
48
|
-
} else {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return parseInt(str);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
//
|
|
57
|
-
|
|
58
|
-
const returnCmd = () => {
|
|
59
|
-
switch (process.platform) {
|
|
60
|
-
case 'darwin':
|
|
61
|
-
return 'sudo npm install meixifrontserve@latest -g'
|
|
62
|
-
case "win32":
|
|
63
|
-
return 'npm install meixifrontserve@latest -g'
|
|
64
|
-
|
|
65
|
-
default:
|
|
66
|
-
return 'npm install meixifrontserve@latest -g'
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
module.exports = checkUpdate
|
|
1
|
+
const needle = require('needle');
|
|
2
|
+
const options = require('../package.json');
|
|
3
|
+
const child_process = require("child_process");
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const checkUpdate = async () => {
|
|
7
|
+
console.log('正在获取网络版本号请稍等');
|
|
8
|
+
return new Promise(async (resolve, reject) => {
|
|
9
|
+
needle.get('https://registry.npmjs.org/meixifrontserve', (error, res) => {
|
|
10
|
+
|
|
11
|
+
if (error) {
|
|
12
|
+
resolve(false);
|
|
13
|
+
}
|
|
14
|
+
const netVer = arrayToNumber(res.body[`dist-tags`][`latest`].split('.'));
|
|
15
|
+
const localVer = arrayToNumber(options.version.split('.'));
|
|
16
|
+
if (netVer === localVer) {
|
|
17
|
+
resolve(true);
|
|
18
|
+
} else {
|
|
19
|
+
if (netVer > localVer) {
|
|
20
|
+
// 下载最新的依赖
|
|
21
|
+
console.log('正在下载依赖,请稍后');
|
|
22
|
+
child_process.exec(`${returnCmd()}`, (error, stdout, stderr) => {
|
|
23
|
+
if (!error) {
|
|
24
|
+
console.log('依赖下载成功,请重新执行命令。');
|
|
25
|
+
process.exit();
|
|
26
|
+
} else {
|
|
27
|
+
console.log(`依赖下载失败,请手动执行命令${returnCmd()}`);
|
|
28
|
+
process.exit();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
const arrayToNumber = (array) => {
|
|
42
|
+
|
|
43
|
+
let str = '';
|
|
44
|
+
if (array instanceof Array) {
|
|
45
|
+
array.forEach(item => {
|
|
46
|
+
str += item;
|
|
47
|
+
})
|
|
48
|
+
} else {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return parseInt(str);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
//
|
|
57
|
+
|
|
58
|
+
const returnCmd = () => {
|
|
59
|
+
switch (process.platform) {
|
|
60
|
+
case 'darwin':
|
|
61
|
+
return 'sudo npm install meixifrontserve@latest -g'
|
|
62
|
+
case "win32":
|
|
63
|
+
return 'npm install meixifrontserve@latest -g'
|
|
64
|
+
|
|
65
|
+
default:
|
|
66
|
+
return 'npm install meixifrontserve@latest -g'
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
module.exports = checkUpdate
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
const EnvByBuildController = require('./envByBuildController')
|
|
2
|
-
|
|
3
|
-
class EnvByBetaController extends EnvByBuildController {
|
|
4
|
-
constructor(projectName, envType,isV2 = false) {
|
|
5
|
-
super(projectName, envType,isV2);
|
|
6
|
-
this.envName = 'beta'
|
|
7
|
-
this.envType = 'beta'
|
|
8
|
-
this.verName = 'beta'
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
getSystemUrl() {
|
|
13
|
-
this.urlConfig.urlPrefixes.splice(0, 0, this.projectParams.urlPrefix[`${this.envType}`]);
|
|
14
|
-
return this.urlConfig.urlPrefixes.toString().replace(/,/g, '.');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
module.exports = EnvByBetaController;
|
|
1
|
+
const EnvByBuildController = require('./envByBuildController')
|
|
2
|
+
|
|
3
|
+
class EnvByBetaController extends EnvByBuildController {
|
|
4
|
+
constructor(projectName, envType,isV2 = false) {
|
|
5
|
+
super(projectName, envType,isV2);
|
|
6
|
+
this.envName = 'beta'
|
|
7
|
+
this.envType = 'beta'
|
|
8
|
+
this.verName = 'beta'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
getSystemUrl() {
|
|
13
|
+
this.urlConfig.urlPrefixes.splice(0, 0, this.projectParams.urlPrefix[`${this.envType}`]);
|
|
14
|
+
return this.urlConfig.urlPrefixes.toString().replace(/,/g, '.');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
module.exports = EnvByBetaController;
|
|
@@ -1,103 +1,103 @@
|
|
|
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
|
-
// v2
|
|
9
|
-
const packageJson = require("../config/packageV2.json");
|
|
10
|
-
const childProcess = require("child_process");
|
|
11
|
-
const {exec} = childProcess;
|
|
12
|
-
const shell = require('shelljs');
|
|
13
|
-
|
|
14
|
-
// 打包环境
|
|
15
|
-
class EnvByBuildController extends ServerController {
|
|
16
|
-
|
|
17
|
-
constructor(projectName, envType, isV2 = false) {
|
|
18
|
-
super(projectName, isV2);
|
|
19
|
-
this.port = 8888;
|
|
20
|
-
this.envName = '';
|
|
21
|
-
this.envType = envType;
|
|
22
|
-
|
|
23
|
-
this.urlConfig = null;
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async onStart() {
|
|
28
|
-
await super.onStart();
|
|
29
|
-
this.onRunServe();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
async createEnvFiles() {
|
|
34
|
-
this.urlConfig = urlConfig[`${this.verName}`];
|
|
35
|
-
|
|
36
|
-
console.log(this.urlConfig);
|
|
37
|
-
|
|
38
|
-
let envFileParams = {
|
|
39
|
-
envName: this.envName,
|
|
40
|
-
proxy: '/proxy',
|
|
41
|
-
systemId: this.projectParams.systemId,
|
|
42
|
-
systemName: this.projectParams.systemName,
|
|
43
|
-
apiUrl: '/api/',
|
|
44
|
-
systemUrl: this.getSystemUrl(),
|
|
45
|
-
authUrl: this.urlConfig.authUrl,
|
|
46
|
-
wsUrl: this.urlConfig.wsUrl,
|
|
47
|
-
verName: this.verName,
|
|
48
|
-
}
|
|
49
|
-
return getEnvFileTemplate(envFileParams);
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
async getServerPort() {
|
|
55
|
-
|
|
56
|
-
let flag = await this.isPortAvailable(this.port);
|
|
57
|
-
|
|
58
|
-
if (!flag) {
|
|
59
|
-
this.port += 1;
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
return true;
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
writeEnvFile(fileContent) {
|
|
68
|
-
const press = process.cwd();
|
|
69
|
-
const fileUrl = path.join(press, `./.env.${this.envType}`);
|
|
70
|
-
fs.writeFileSync(fileUrl, fileContent);
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
onRunServe() {
|
|
76
|
-
console.log(`V2:${this.v2}`)
|
|
77
|
-
console.log('正在下载依赖');
|
|
78
|
-
exec('npm install --legacy-peer-deps', async (error, stdout, stderr) => {
|
|
79
|
-
if (!error) {
|
|
80
|
-
if (this.v2) {
|
|
81
|
-
console.log('下载td组件')
|
|
82
|
-
exec('npm i tdesign-vue@naruto --legacy-peer-deps', async (error, stdout, stderr) => {
|
|
83
|
-
shell.exec(`npm run build:${this.envType}`, (error, stdout, stderr) => {
|
|
84
|
-
console.log(error);
|
|
85
|
-
})
|
|
86
|
-
})
|
|
87
|
-
} else {
|
|
88
|
-
shell.exec(`npm run build:${this.envType}`, (error, stdout, stderr) => {
|
|
89
|
-
console.log(error);
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
} else {
|
|
93
|
-
console.error('依赖下载失败!')
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
module.exports = EnvByBuildController;
|
|
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
|
+
// v2
|
|
9
|
+
const packageJson = require("../config/packageV2.json");
|
|
10
|
+
const childProcess = require("child_process");
|
|
11
|
+
const {exec} = childProcess;
|
|
12
|
+
const shell = require('shelljs');
|
|
13
|
+
|
|
14
|
+
// 打包环境
|
|
15
|
+
class EnvByBuildController extends ServerController {
|
|
16
|
+
|
|
17
|
+
constructor(projectName, envType, isV2 = false) {
|
|
18
|
+
super(projectName, isV2);
|
|
19
|
+
this.port = 8888;
|
|
20
|
+
this.envName = '';
|
|
21
|
+
this.envType = envType;
|
|
22
|
+
|
|
23
|
+
this.urlConfig = null;
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async onStart() {
|
|
28
|
+
await super.onStart();
|
|
29
|
+
this.onRunServe();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
async createEnvFiles() {
|
|
34
|
+
this.urlConfig = urlConfig[`${this.verName}`];
|
|
35
|
+
|
|
36
|
+
console.log(this.urlConfig);
|
|
37
|
+
|
|
38
|
+
let envFileParams = {
|
|
39
|
+
envName: this.envName,
|
|
40
|
+
proxy: '/proxy',
|
|
41
|
+
systemId: this.projectParams.systemId,
|
|
42
|
+
systemName: this.projectParams.systemName,
|
|
43
|
+
apiUrl: '/api/',
|
|
44
|
+
systemUrl: this.getSystemUrl(),
|
|
45
|
+
authUrl: this.urlConfig.authUrl,
|
|
46
|
+
wsUrl: this.urlConfig.wsUrl,
|
|
47
|
+
verName: this.verName,
|
|
48
|
+
}
|
|
49
|
+
return getEnvFileTemplate(envFileParams);
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
async getServerPort() {
|
|
55
|
+
|
|
56
|
+
let flag = await this.isPortAvailable(this.port);
|
|
57
|
+
|
|
58
|
+
if (!flag) {
|
|
59
|
+
this.port += 1;
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
return true;
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
writeEnvFile(fileContent) {
|
|
68
|
+
const press = process.cwd();
|
|
69
|
+
const fileUrl = path.join(press, `./.env.${this.envType}`);
|
|
70
|
+
fs.writeFileSync(fileUrl, fileContent);
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
onRunServe() {
|
|
76
|
+
console.log(`V2:${this.v2}`)
|
|
77
|
+
console.log('正在下载依赖');
|
|
78
|
+
exec('npm install --legacy-peer-deps', async (error, stdout, stderr) => {
|
|
79
|
+
if (!error) {
|
|
80
|
+
if (this.v2) {
|
|
81
|
+
console.log('下载td组件')
|
|
82
|
+
exec('npm i tdesign-vue@naruto --legacy-peer-deps', async (error, stdout, stderr) => {
|
|
83
|
+
shell.exec(`npm run build:${this.envType}`, (error, stdout, stderr) => {
|
|
84
|
+
console.log(error);
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
} else {
|
|
88
|
+
shell.exec(`npm run build:${this.envType}`, (error, stdout, stderr) => {
|
|
89
|
+
console.log(error);
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
console.error('依赖下载失败!')
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
module.exports = EnvByBuildController;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
#! /usr/bin/env node
|
|
2
|
-
const envByServerController = require('./envByServerController')
|
|
3
|
-
|
|
4
|
-
class EnvByDevServerController extends envByServerController {
|
|
5
|
-
constructor(projectName,isV2=false) {
|
|
6
|
-
super(projectName,isV2);
|
|
7
|
-
this.proxy = "http://meixi.wubangtu.xyz/api";
|
|
8
|
-
this.configProps='serveByDev'
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
module.exports = EnvByDevServerController;
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
const envByServerController = require('./envByServerController')
|
|
3
|
+
|
|
4
|
+
class EnvByDevServerController extends envByServerController {
|
|
5
|
+
constructor(projectName,isV2=false) {
|
|
6
|
+
super(projectName,isV2);
|
|
7
|
+
this.proxy = "http://meixi.wubangtu.xyz/api";
|
|
8
|
+
this.configProps='serveByDev'
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
module.exports = EnvByDevServerController;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class EnvByPre2Controller extends EnvByBuildController {
|
|
5
|
-
constructor(projectName, envType,isV2 = false) {
|
|
6
|
-
super(projectName, envType,isV2);
|
|
7
|
-
this.envName = 'preview'
|
|
8
|
-
this.envType = 'pre'
|
|
9
|
-
this.verName = 'pre2'
|
|
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 = EnvByPre2Controller;
|
|
1
|
+
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class EnvByPre2Controller extends EnvByBuildController {
|
|
5
|
+
constructor(projectName, envType,isV2 = false) {
|
|
6
|
+
super(projectName, envType,isV2);
|
|
7
|
+
this.envName = 'preview'
|
|
8
|
+
this.envType = 'pre'
|
|
9
|
+
this.verName = 'pre2'
|
|
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 = EnvByPre2Controller;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class EnvByPreController extends EnvByBuildController {
|
|
5
|
-
constructor(projectName, envType,isV2 = false) {
|
|
6
|
-
super(projectName, envType,isV2);
|
|
7
|
-
this.envName = 'preview'
|
|
8
|
-
this.envType = 'pre'
|
|
9
|
-
this.verName = 'pre'
|
|
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 = EnvByPreController;
|
|
1
|
+
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class EnvByPreController extends EnvByBuildController {
|
|
5
|
+
constructor(projectName, envType,isV2 = false) {
|
|
6
|
+
super(projectName, envType,isV2);
|
|
7
|
+
this.envName = 'preview'
|
|
8
|
+
this.envType = 'pre'
|
|
9
|
+
this.verName = 'pre'
|
|
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 = EnvByPreController;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class EnvByProdController extends EnvByBuildController {
|
|
5
|
-
constructor(projectName, envType,isV2 = false) {
|
|
6
|
-
super(projectName, envType,isV2);
|
|
7
|
-
this.envName = 'production'
|
|
8
|
-
this.envType = 'prod'
|
|
9
|
-
this.verName = 'prod'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
getSystemUrl() {
|
|
14
|
-
this.urlConfig.urlPrefixes.splice(0, 0, this.projectParams.urlPrefix[`${this.envType}`]);
|
|
15
|
-
return this.urlConfig.urlPrefixes.toString().replace(/,/g, '.');
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
module.exports = EnvByProdController
|
|
1
|
+
const EnvByBuildController = require('./envByBuildController');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class EnvByProdController extends EnvByBuildController {
|
|
5
|
+
constructor(projectName, envType,isV2 = false) {
|
|
6
|
+
super(projectName, envType,isV2);
|
|
7
|
+
this.envName = 'production'
|
|
8
|
+
this.envType = 'prod'
|
|
9
|
+
this.verName = 'prod'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
getSystemUrl() {
|
|
14
|
+
this.urlConfig.urlPrefixes.splice(0, 0, this.projectParams.urlPrefix[`${this.envType}`]);
|
|
15
|
+
return this.urlConfig.urlPrefixes.toString().replace(/,/g, '.');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
module.exports = EnvByProdController
|