From 7991098880670e1899e8001ca6291b5eac28ab0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Wed, 17 Aug 2022 11:45:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=A8=A1=E5=9D=97=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E6=97=B6=E5=9C=A8=E6=A8=A1=E5=9D=97=E7=9A=84ini=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=86=85=E6=A0=87=E8=AE=B0=E4=BE=9D=E8=B5=96=E5=BE=85?= =?UTF-8?q?=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/ba/module/Manage.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/extend/ba/module/Manage.php b/extend/ba/module/Manage.php index 765f93dd..00a98548 100644 --- a/extend/ba/module/Manage.php +++ b/extend/ba/module/Manage.php @@ -150,6 +150,7 @@ class Manage */ public function conflictHandle() { + $info = $this->getInfo(); // 文件冲突 $fileConflict = Server::getFileList($this->modulesDir, true); // 依赖冲突 @@ -223,20 +224,31 @@ class Manage } if ($installDepend) { + $npm = false; + $composer = false; foreach ($installDepend as $key => $item) { if ($key == 'require') { + $composer = true; $dependObj->addComposerRequire($item, false, true); } elseif ($key == 'require-dev') { + $composer = true; $dependObj->addComposerRequire($item, true, true); } elseif ($key == 'dependencies') { + $npm = true; $dependObj->addNpmDependencies($item, false, true); } elseif ($key == 'devDependencies') { + $npm = true; $dependObj->addNpmDependencies($item, true, true); } } - $this->setInfo([ - 'state' => self::DEPENDENT_WAIT_INSTALL, - ]); + if ($npm) { + $info['npm_dependent_wait_install'] = 1; + } + if ($composer) { + $info['composer_dependent_wait_install'] = 1; + } + $info['state'] = self::DEPENDENT_WAIT_INSTALL; + $this->setInfo([], $info); } // 备份将被覆盖的文件