Merge pull request #1446 from coollabsio/next

v4.0.0-beta.130
This commit is contained in:
Andras Bacsai 2023-11-13 17:09:10 +01:00 committed by GitHub
commit 945157b30c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 125 additions and 81 deletions

View File

@ -111,24 +111,36 @@ public function extraFields()
$postgres_user = $this->environment_variables()->whereIn('key', $userVariables)->first(); $postgres_user = $this->environment_variables()->whereIn('key', $userVariables)->first();
$postgres_password = $this->environment_variables()->whereIn('key', $passwordVariables)->first(); $postgres_password = $this->environment_variables()->whereIn('key', $passwordVariables)->first();
$postgres_db_name = $this->environment_variables()->whereIn('key', $dbNameVariables)->first(); $postgres_db_name = $this->environment_variables()->whereIn('key', $dbNameVariables)->first();
$fields->put('PostgreSQL', [ $data = collect([]);
if ($postgres_user) {
$data = $data->merge([
'User' => [ 'User' => [
'key' => data_get($postgres_user, 'key'), 'key' => data_get($postgres_user, 'key'),
'value' => data_get($postgres_user, 'value'), 'value' => data_get($postgres_user, 'value'),
'rules' => 'required', 'rules' => 'required',
], ],
]);
}
if ($postgres_password) {
$data = $data->merge([
'Password' => [ 'Password' => [
'key' => data_get($postgres_password, 'key'), 'key' => data_get($postgres_password, 'key'),
'value' => data_get($postgres_password, 'value'), 'value' => data_get($postgres_password, 'value'),
'rules' => 'required', 'rules' => 'required',
'isPassword' => true, 'isPassword' => true,
], ],
]);
}
if ($postgres_db_name) {
$data = $data->merge([
'Database Name' => [ 'Database Name' => [
'key' => data_get($postgres_db_name, 'key'), 'key' => data_get($postgres_db_name, 'key'),
'value' => data_get($postgres_db_name, 'value'), 'value' => data_get($postgres_db_name, 'value'),
'rules' => 'required', 'rules' => 'required',
], ],
]); ]);
}
$fields->put('PostgreSQL', $data->toArray());
break; break;
case str($image)->contains('mysql'): case str($image)->contains('mysql'):
$userVariables = ['SERVICE_USER_MYSQL', 'SERVICE_USER_WORDPRESS']; $userVariables = ['SERVICE_USER_MYSQL', 'SERVICE_USER_WORDPRESS'];
@ -139,30 +151,46 @@ public function extraFields()
$mysql_password = $this->environment_variables()->whereIn('key', $passwordVariables)->first(); $mysql_password = $this->environment_variables()->whereIn('key', $passwordVariables)->first();
$mysql_root_password = $this->environment_variables()->whereIn('key', $rootPasswordVariables)->first(); $mysql_root_password = $this->environment_variables()->whereIn('key', $rootPasswordVariables)->first();
$mysql_db_name = $this->environment_variables()->whereIn('key', $dbNameVariables)->first(); $mysql_db_name = $this->environment_variables()->whereIn('key', $dbNameVariables)->first();
$fields->put('MySQL', [ $data = collect([]);
if ($mysql_user) {
$data = $data->merge([
'User' => [ 'User' => [
'key' => data_get($mysql_user, 'key'), 'key' => data_get($mysql_user, 'key'),
'value' => data_get($mysql_user, 'value'), 'value' => data_get($mysql_user, 'value'),
'rules' => 'required', 'rules' => 'required',
], ],
]);
}
if ($mysql_password) {
$data = $data->merge([
'Password' => [ 'Password' => [
'key' => data_get($mysql_password, 'key'), 'key' => data_get($mysql_password, 'key'),
'value' => data_get($mysql_password, 'value'), 'value' => data_get($mysql_password, 'value'),
'rules' => 'required', 'rules' => 'required',
'isPassword' => true, 'isPassword' => true,
], ],
]);
}
if ($mysql_root_password) {
$data = $data->merge([
'Root Password' => [ 'Root Password' => [
'key' => data_get($mysql_root_password, 'key'), 'key' => data_get($mysql_root_password, 'key'),
'value' => data_get($mysql_root_password, 'value'), 'value' => data_get($mysql_root_password, 'value'),
'rules' => 'required', 'rules' => 'required',
'isPassword' => true, 'isPassword' => true,
], ],
]);
}
if ($mysql_db_name) {
$data = $data->merge([
'Database Name' => [ 'Database Name' => [
'key' => data_get($mysql_db_name, 'key'), 'key' => data_get($mysql_db_name, 'key'),
'value' => data_get($mysql_db_name, 'value'), 'value' => data_get($mysql_db_name, 'value'),
'rules' => 'required', 'rules' => 'required',
], ],
]); ]);
}
$fields->put('MySQL', $data->toArray());
break; break;
case str($image)->contains('mariadb'): case str($image)->contains('mariadb'):
$userVariables = ['SERVICE_USER_MARIADB', 'SERVICE_USER_WORDPRESS', '_APP_DB_USER']; $userVariables = ['SERVICE_USER_MARIADB', 'SERVICE_USER_WORDPRESS', '_APP_DB_USER'];
@ -173,31 +201,47 @@ public function extraFields()
$mariadb_password = $this->environment_variables()->whereIn('key', $passwordVariables)->first(); $mariadb_password = $this->environment_variables()->whereIn('key', $passwordVariables)->first();
$mariadb_root_password = $this->environment_variables()->whereIn('key', $rootPasswordVariables)->first(); $mariadb_root_password = $this->environment_variables()->whereIn('key', $rootPasswordVariables)->first();
$mariadb_db_name = $this->environment_variables()->whereIn('key', $dbNameVariables)->first(); $mariadb_db_name = $this->environment_variables()->whereIn('key', $dbNameVariables)->first();
$fields->put('MariaDB', [ $data = collect([]);
if ($mariadb_user) {
$data = $data->merge([
'User' => [ 'User' => [
'key' => data_get($mariadb_user, 'key'), 'key' => data_get($mariadb_user, 'key'),
'value' => data_get($mariadb_user, 'value'), 'value' => data_get($mariadb_user, 'value'),
'rules' => 'required', 'rules' => 'required',
], ],
]);
}
if ($mariadb_password) {
$data = $data->merge([
'Password' => [ 'Password' => [
'key' => data_get($mariadb_password, 'key'), 'key' => data_get($mariadb_password, 'key'),
'value' => data_get($mariadb_password, 'value'), 'value' => data_get($mariadb_password, 'value'),
'rules' => 'required', 'rules' => 'required',
'isPassword' => true, 'isPassword' => true,
], ],
]);
}
if ($mariadb_root_password) {
$data = $data->merge([
'Root Password' => [ 'Root Password' => [
'key' => data_get($mariadb_root_password, 'key'), 'key' => data_get($mariadb_root_password, 'key'),
'value' => data_get($mariadb_root_password, 'value'), 'value' => data_get($mariadb_root_password, 'value'),
'rules' => 'required', 'rules' => 'required',
'isPassword' => true, 'isPassword' => true,
], ],
]);
}
if ($mariadb_db_name) {
$data = $data->merge([
'Database Name' => [ 'Database Name' => [
'key' => data_get($mariadb_db_name, 'key'), 'key' => data_get($mariadb_db_name, 'key'),
'value' => data_get($mariadb_db_name, 'value'), 'value' => data_get($mariadb_db_name, 'value'),
'rules' => data_get($mariadb_db_name, 'value') && 'required', 'rules' => 'required',
], ],
]); ]);
}
$fields->put('MariaDB', $data->toArray());
break; break;
} }
} }

View File

@ -7,7 +7,7 @@
// The release version of your application // The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => '4.0.0-beta.129', 'release' => '4.0.0-beta.130',
// When left empty or `null` the Laravel environment will be used // When left empty or `null` the Laravel environment will be used
'environment' => config('app.env'), 'environment' => config('app.env'),

View File

@ -1,3 +1,3 @@
<?php <?php
return '4.0.0-beta.129'; return '4.0.0-beta.130';

24
package-lock.json generated
View File

@ -16,7 +16,7 @@
"axios": "1.5.1", "axios": "1.5.1",
"laravel-vite-plugin": "0.8.1", "laravel-vite-plugin": "0.8.1",
"postcss": "8.4.31", "postcss": "8.4.31",
"tailwindcss": "3.3.3", "tailwindcss": "3.3.5",
"vite": "4.4.11", "vite": "4.4.11",
"vue": "3.3.4" "vue": "3.3.4"
} }
@ -1051,9 +1051,9 @@
"dev": true "dev": true
}, },
"node_modules/fast-glob": { "node_modules/fast-glob": {
"version": "3.2.12", "version": "3.3.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
"integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
"dependencies": { "dependencies": {
"@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3", "@nodelib/fs.walk": "^1.2.3",
@ -1283,9 +1283,9 @@
} }
}, },
"node_modules/jiti": { "node_modules/jiti": {
"version": "1.18.2", "version": "1.21.0",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
"integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==", "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==",
"bin": { "bin": {
"jiti": "bin/jiti.js" "jiti": "bin/jiti.js"
} }
@ -1808,19 +1808,19 @@
} }
}, },
"node_modules/tailwindcss": { "node_modules/tailwindcss": {
"version": "3.3.3", "version": "3.3.5",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz",
"integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==", "integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==",
"dependencies": { "dependencies": {
"@alloc/quick-lru": "^5.2.0", "@alloc/quick-lru": "^5.2.0",
"arg": "^5.0.2", "arg": "^5.0.2",
"chokidar": "^3.5.3", "chokidar": "^3.5.3",
"didyoumean": "^1.2.2", "didyoumean": "^1.2.2",
"dlv": "^1.1.3", "dlv": "^1.1.3",
"fast-glob": "^3.2.12", "fast-glob": "^3.3.0",
"glob-parent": "^6.0.2", "glob-parent": "^6.0.2",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
"jiti": "^1.18.2", "jiti": "^1.19.1",
"lilconfig": "^2.1.0", "lilconfig": "^2.1.0",
"micromatch": "^4.0.5", "micromatch": "^4.0.5",
"normalize-path": "^3.0.0", "normalize-path": "^3.0.0",

View File

@ -4,7 +4,7 @@
"version": "3.12.36" "version": "3.12.36"
}, },
"v4": { "v4": {
"version": "4.0.0-beta.129" "version": "4.0.0-beta.130"
} }
} }
} }