mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix: deps
This commit is contained in:
parent
f0cf399522
commit
7fb2d53048
@ -76,20 +76,15 @@ class AppGenerator extends Generator {
|
||||
const env = this.env;
|
||||
const envs = [];
|
||||
const dependencies = [];
|
||||
const { dbDialect, allDbDialect } = this.args;
|
||||
const { dbDialect } = this.args;
|
||||
|
||||
if (allDbDialect) {
|
||||
dependencies.push(`"mysql2": "^3.11.0"`);
|
||||
dependencies.push(`"mariadb": "^2.5.6"`);
|
||||
dependencies.push(`"pg": "^8.7.3"`);
|
||||
dependencies.push(`"mysql2": "^3.14.0"`);
|
||||
dependencies.push(`"mariadb": "^3.4.1"`);
|
||||
dependencies.push(`"pg": "^8.14.1"`);
|
||||
dependencies.push(`"pg-hstore": "^2.3.4"`);
|
||||
}
|
||||
|
||||
switch (dbDialect) {
|
||||
case 'mysql':
|
||||
if (!allDbDialect) {
|
||||
dependencies.push(`"mysql2": "^3.11.0"`);
|
||||
}
|
||||
envs.push(`DB_HOST=${env.DB_HOST || 'localhost'}`);
|
||||
envs.push(`DB_PORT=${env.DB_PORT || 3306}`);
|
||||
envs.push(`DB_DATABASE=${env.DB_DATABASE || ''}`);
|
||||
@ -97,9 +92,6 @@ class AppGenerator extends Generator {
|
||||
envs.push(`DB_PASSWORD=${env.DB_PASSWORD || ''}`);
|
||||
break;
|
||||
case 'mariadb':
|
||||
if (!allDbDialect) {
|
||||
dependencies.push(`"mariadb": "^2.5.6"`);
|
||||
}
|
||||
envs.push(`DB_HOST=${env.DB_HOST || 'localhost'}`);
|
||||
envs.push(`DB_PORT=${env.DB_PORT || 3306}`);
|
||||
envs.push(`DB_DATABASE=${env.DB_DATABASE || ''}`);
|
||||
@ -108,10 +100,6 @@ class AppGenerator extends Generator {
|
||||
break;
|
||||
case 'kingbase':
|
||||
case 'postgres':
|
||||
if (!allDbDialect) {
|
||||
dependencies.push(`"pg": "^8.7.3"`);
|
||||
dependencies.push(`"pg-hstore": "^2.3.4"`);
|
||||
}
|
||||
envs.push(`DB_HOST=${env.DB_HOST || 'localhost'}`);
|
||||
envs.push(`DB_PORT=${env.DB_PORT || 5432}`);
|
||||
envs.push(`DB_DATABASE=${env.DB_DATABASE || ''}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user