瀏覽代碼

ComposerUpdate

Anyon 5 年之前
父節點
當前提交
f16ff6c921

+ 2 - 1
app/admin/controller/api/Update.php

@@ -17,6 +17,7 @@ namespace app\admin\controller\api;
 
 use think\admin\Controller;
 use think\admin\extend\PlugsExtend;
+use think\admin\install\ExtendInstall;
 
 /**
  * 系统更新接口
@@ -30,7 +31,7 @@ class Update extends Controller
      */
     public function tree()
     {
-        $extend = PlugsExtend::instance($this->app);
+        $extend = ExtendInstall::instance($this->app);
         $this->rules = unserialize($this->request->post('rules', 'a:0:{}', ''));
         $this->ignore = unserialize($this->request->post('ignore', 'a:0:{}', ''));
         $this->success('获取当前文件列表成功!', $extend->buildFileList($this->rules, $this->ignore));

+ 4 - 4
composer.lock

@@ -783,12 +783,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/zoujingli/ThinkLibrary.git",
-                "reference": "246980334faacab77128f653365478c7c5086451"
+                "reference": "b48c8d60ba7463049de08c403df5e326d4b5002c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/246980334faacab77128f653365478c7c5086451",
-                "reference": "246980334faacab77128f653365478c7c5086451",
+                "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/b48c8d60ba7463049de08c403df5e326d4b5002c",
+                "reference": "b48c8d60ba7463049de08c403df5e326d4b5002c",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -832,7 +832,7 @@
             ],
             "description": "ThinkPHP v6.0 Development Library",
             "homepage": "http://framework.thinkadmin.top",
-            "time": "2019-11-01T11:22:17+00:00"
+            "time": "2019-11-02T07:13:53+00:00"
         }
     ],
     "packages-dev": [],

+ 1 - 1
vendor/autoload.php

@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer/autoload_real.php';
 
-return ComposerAutoloaderInita51eb218b1f5b76290775d4f6b984645::getLoader();
+return ComposerAutoloaderInitf141db0785048027c24f92d1492ab3c5::getLoader();

+ 2 - 4
vendor/composer/autoload_classmap.php

@@ -150,7 +150,6 @@ return array(
     'think\\admin\\extend\\ExpressExtend' => $vendorDir . '/zoujingli/think-library/src/extend/ExpressExtend.php',
     'think\\admin\\extend\\HttpExtend' => $vendorDir . '/zoujingli/think-library/src/extend/HttpExtend.php',
     'think\\admin\\extend\\NodeExtend' => $vendorDir . '/zoujingli/think-library/src/extend/NodeExtend.php',
-    'think\\admin\\extend\\PlugsExtend' => $vendorDir . '/zoujingli/think-library/src/extend/PlugsExtend.php',
     'think\\admin\\extend\\ProcessExtend' => $vendorDir . '/zoujingli/think-library/src/extend/ProcessExtend.php',
     'think\\admin\\extend\\TokenExtend' => $vendorDir . '/zoujingli/think-library/src/extend/TokenExtend.php',
     'think\\admin\\helper\\DeleteHelper' => $vendorDir . '/zoujingli/think-library/src/helper/DeleteHelper.php',
@@ -160,9 +159,8 @@ return array(
     'think\\admin\\helper\\QueryHelper' => $vendorDir . '/zoujingli/think-library/src/helper/QueryHelper.php',
     'think\\admin\\helper\\SaveHelper' => $vendorDir . '/zoujingli/think-library/src/helper/SaveHelper.php',
     'think\\admin\\helper\\TokenHelper' => $vendorDir . '/zoujingli/think-library/src/helper/TokenHelper.php',
-    'think\\admin\\plugs\\AdminPlugs' => $vendorDir . '/zoujingli/think-library/src/plugs/AdminPlugs.php',
-    'think\\admin\\plugs\\Plugs' => $vendorDir . '/zoujingli/think-library/src/plugs/Plugs.php',
-    'think\\admin\\plugs\\StaticPlugs' => $vendorDir . '/zoujingli/think-library/src/plugs/StaticPlugs.php',
+    'think\\admin\\install\\CommandInstall' => $vendorDir . '/zoujingli/think-library/src/install/CommandInstall.php',
+    'think\\admin\\install\\ExtendInstall' => $vendorDir . '/zoujingli/think-library/src/install/ExtendInstall.php',
     'think\\admin\\queue\\ListenQueue' => $vendorDir . '/zoujingli/think-library/src/queue/ListenQueue.php',
     'think\\admin\\queue\\QueryQueue' => $vendorDir . '/zoujingli/think-library/src/queue/QueryQueue.php',
     'think\\admin\\queue\\StartQueue' => $vendorDir . '/zoujingli/think-library/src/queue/StartQueue.php',

+ 7 - 7
vendor/composer/autoload_real.php

@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInita51eb218b1f5b76290775d4f6b984645
+class ComposerAutoloaderInitf141db0785048027c24f92d1492ab3c5
 {
     private static $loader;
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInita51eb218b1f5b76290775d4f6b984645
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInita51eb218b1f5b76290775d4f6b984645', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInitf141db0785048027c24f92d1492ab3c5', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInita51eb218b1f5b76290775d4f6b984645', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInitf141db0785048027c24f92d1492ab3c5', 'loadClassLoader'));
 
         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
         if ($useStaticLoader) {
             require_once __DIR__ . '/autoload_static.php';
 
-            call_user_func(\Composer\Autoload\ComposerStaticInita51eb218b1f5b76290775d4f6b984645::getInitializer($loader));
+            call_user_func(\Composer\Autoload\ComposerStaticInitf141db0785048027c24f92d1492ab3c5::getInitializer($loader));
         } else {
             $map = require __DIR__ . '/autoload_namespaces.php';
             foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInita51eb218b1f5b76290775d4f6b984645
         $loader->register(true);
 
         if ($useStaticLoader) {
-            $includeFiles = Composer\Autoload\ComposerStaticInita51eb218b1f5b76290775d4f6b984645::$files;
+            $includeFiles = Composer\Autoload\ComposerStaticInitf141db0785048027c24f92d1492ab3c5::$files;
         } else {
             $includeFiles = require __DIR__ . '/autoload_files.php';
         }
         foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequirea51eb218b1f5b76290775d4f6b984645($fileIdentifier, $file);
+            composerRequiref141db0785048027c24f92d1492ab3c5($fileIdentifier, $file);
         }
 
         return $loader;
     }
 }
 
-function composerRequirea51eb218b1f5b76290775d4f6b984645($fileIdentifier, $file)
+function composerRequiref141db0785048027c24f92d1492ab3c5($fileIdentifier, $file)
 {
     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
         require $file;

+ 6 - 8
vendor/composer/autoload_static.php

@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInita51eb218b1f5b76290775d4f6b984645
+class ComposerStaticInitf141db0785048027c24f92d1492ab3c5
 {
     public static $files = array (
         '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
@@ -241,7 +241,6 @@ class ComposerStaticInita51eb218b1f5b76290775d4f6b984645
         'think\\admin\\extend\\ExpressExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/ExpressExtend.php',
         'think\\admin\\extend\\HttpExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/HttpExtend.php',
         'think\\admin\\extend\\NodeExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/NodeExtend.php',
-        'think\\admin\\extend\\PlugsExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/PlugsExtend.php',
         'think\\admin\\extend\\ProcessExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/ProcessExtend.php',
         'think\\admin\\extend\\TokenExtend' => __DIR__ . '/..' . '/zoujingli/think-library/src/extend/TokenExtend.php',
         'think\\admin\\helper\\DeleteHelper' => __DIR__ . '/..' . '/zoujingli/think-library/src/helper/DeleteHelper.php',
@@ -251,9 +250,8 @@ class ComposerStaticInita51eb218b1f5b76290775d4f6b984645
         'think\\admin\\helper\\QueryHelper' => __DIR__ . '/..' . '/zoujingli/think-library/src/helper/QueryHelper.php',
         'think\\admin\\helper\\SaveHelper' => __DIR__ . '/..' . '/zoujingli/think-library/src/helper/SaveHelper.php',
         'think\\admin\\helper\\TokenHelper' => __DIR__ . '/..' . '/zoujingli/think-library/src/helper/TokenHelper.php',
-        'think\\admin\\plugs\\AdminPlugs' => __DIR__ . '/..' . '/zoujingli/think-library/src/plugs/AdminPlugs.php',
-        'think\\admin\\plugs\\Plugs' => __DIR__ . '/..' . '/zoujingli/think-library/src/plugs/Plugs.php',
-        'think\\admin\\plugs\\StaticPlugs' => __DIR__ . '/..' . '/zoujingli/think-library/src/plugs/StaticPlugs.php',
+        'think\\admin\\install\\CommandInstall' => __DIR__ . '/..' . '/zoujingli/think-library/src/install/CommandInstall.php',
+        'think\\admin\\install\\ExtendInstall' => __DIR__ . '/..' . '/zoujingli/think-library/src/install/ExtendInstall.php',
         'think\\admin\\queue\\ListenQueue' => __DIR__ . '/..' . '/zoujingli/think-library/src/queue/ListenQueue.php',
         'think\\admin\\queue\\QueryQueue' => __DIR__ . '/..' . '/zoujingli/think-library/src/queue/QueryQueue.php',
         'think\\admin\\queue\\StartQueue' => __DIR__ . '/..' . '/zoujingli/think-library/src/queue/StartQueue.php',
@@ -470,9 +468,9 @@ class ComposerStaticInita51eb218b1f5b76290775d4f6b984645
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = ComposerStaticInita51eb218b1f5b76290775d4f6b984645::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = ComposerStaticInita51eb218b1f5b76290775d4f6b984645::$prefixDirsPsr4;
-            $loader->classMap = ComposerStaticInita51eb218b1f5b76290775d4f6b984645::$classMap;
+            $loader->prefixLengthsPsr4 = ComposerStaticInitf141db0785048027c24f92d1492ab3c5::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInitf141db0785048027c24f92d1492ab3c5::$prefixDirsPsr4;
+            $loader->classMap = ComposerStaticInitf141db0785048027c24f92d1492ab3c5::$classMap;
 
         }, null, ClassLoader::class);
     }

+ 4 - 4
vendor/composer/installed.json

@@ -805,12 +805,12 @@
         "source": {
             "type": "git",
             "url": "https://github.com/zoujingli/ThinkLibrary.git",
-            "reference": "246980334faacab77128f653365478c7c5086451"
+            "reference": "b48c8d60ba7463049de08c403df5e326d4b5002c"
         },
         "dist": {
             "type": "zip",
-            "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/246980334faacab77128f653365478c7c5086451",
-            "reference": "246980334faacab77128f653365478c7c5086451",
+            "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/b48c8d60ba7463049de08c403df5e326d4b5002c",
+            "reference": "b48c8d60ba7463049de08c403df5e326d4b5002c",
             "shasum": "",
             "mirrors": [
                 {
@@ -826,7 +826,7 @@
             "ext-json": "*",
             "topthink/framework": "^6.0"
         },
-        "time": "2019-11-01T11:22:17+00:00",
+        "time": "2019-11-02T07:13:53+00:00",
         "type": "library",
         "extra": {
             "think": {

+ 1 - 1
vendor/services.php

@@ -1,5 +1,5 @@
 <?php 
-// This file is automatically generated at:2019-11-01 19:25:53
+// This file is automatically generated at:2019-11-02 15:17:49
 declare (strict_types = 1);
 return array (
   0 => 'think\\app\\Service',

+ 1 - 2
vendor/zoujingli/think-library/src/ThinkLibrary.php

@@ -66,8 +66,7 @@ class ThinkLibrary extends Service
             'think\admin\queue\StartQueue',
             'think\admin\queue\QueryQueue',
             'think\admin\queue\ListenQueue',
-            'think\admin\plugs\AdminPlugs',
-            'think\admin\plugs\StaticPlugs',
+            'think\admin\plugs\CommandInstall',
         ]);
     }
 

+ 1 - 1
vendor/zoujingli/think-library/src/extend/CaptchaExtend.php

@@ -50,7 +50,7 @@ class CaptchaExtend
             $this->code .= $this->charset[mt_rand(0, $length)];
         }
         // 设置字体文件路径
-        $this->font = __DIR__ . '/font/icon.ttf';
+        $this->font = __DIR__ . '/bin/font.ttf';
         // 缓存验证码字符串
         app()->cache->set($this->uniqid, $this->code, 360);
     }

+ 0 - 0
vendor/zoujingli/think-library/src/extend/font/icon.ttf → vendor/zoujingli/think-library/src/extend/bin/font.ttf


+ 123 - 0
vendor/zoujingli/think-library/src/install/CommandInstall.php

@@ -0,0 +1,123 @@
+<?php
+
+// +----------------------------------------------------------------------
+// | Library for ThinkAdmin
+// +----------------------------------------------------------------------
+// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
+// +----------------------------------------------------------------------
+// | 官方网站: http://demo.thinkadmin.top
+// +----------------------------------------------------------------------
+// | 开源协议 ( https://mit-license.org )
+// +----------------------------------------------------------------------
+// | gitee 仓库地址 :https://gitee.com/zoujingli/ThinkLibrary
+// | github 仓库地址 :https://github.com/zoujingli/ThinkLibrary
+// +----------------------------------------------------------------------
+
+namespace think\admin\install;
+
+use think\console\Command;
+use think\console\Input;
+use think\console\input\Argument;
+use think\console\Output;
+
+/**
+ * 插件基础指令类
+ * Class CommandInstall
+ * @package think\admin\install
+ */
+class CommandInstall extends Command
+{
+    /**
+     * 查询规则
+     * @var array
+     */
+    protected $rules = [];
+
+    /**
+     * 忽略规则
+     * @var array
+     */
+    protected $ignore = [];
+
+    /**
+     * 插件工具实例
+     * @var ExtendInstall
+     */
+    protected $extend;
+
+    /**
+     * 指定模块名称
+     * @var string
+     */
+    protected $name;
+
+    /**
+     * 规则配置
+     * @var array
+     */
+    protected $bind = [
+        'admin'  => [
+            'rules'  => ['think', 'app/admin'],
+            'ignore' => [],
+        ],
+        'static' => [
+            'rules'  => ['public/static'],
+            'ignore' => ['public/static/self'],
+        ],
+    ];
+
+    protected function configure()
+    {
+        $this->setName('xtask:plugs');
+        $this->addArgument('name', Argument::OPTIONAL, '模块名称');
+        $this->setDescription('[同步]在线安装指定功能模块');
+    }
+
+    /**
+     * @param Input $input
+     * @param Output $output
+     */
+    protected function execute(Input $input, Output $output)
+    {
+        $this->name = trim($input->getArgument('name'));
+        if (empty($this->name)) {
+            $this->output->error('=== 在线安装模块名称不能为空');
+        } else {
+            $this->extend = ExtendInstall::instance($this->app);
+            if (isset($this->bind[$this->name])) {
+                $this->rules = empty($this->bind[$this->name]['rules']) ? [] : $this->bind[$this->name]['rules'];
+                $this->ignore = empty($this->bind[$this->name]['ignore']) ? [] : $this->bind[$this->name]['ignore'];
+                $this->output->comment("=== 准备下载安装{$this->name}模块{$this->extend->getVersion()} ===");
+                $this->installFile();
+                $this->output->comment("=== 下载安装{$this->name}模块{$this->extend->getVersion()}完成 ===");
+                $this->installDatabase();
+            } else {
+                $this->output->error("指定模块 {$this->name} 未配置安装规则");
+            }
+        }
+    }
+
+    protected function installFile()
+    {
+        $data = $this->extend->grenerateDifference($this->rules, $this->ignore);
+        if (empty($data)) $this->output->info('--- 本地文件与线上文件一致,无需更新文件');
+        else foreach ($data as $file) {
+            list($state, $mode, $name) = $this->extend->fileSynchronization($file);
+            if ($state) {
+                if ($mode === 'add') $this->output->info("--- 下载 {$name} 添加成功");
+                if ($mode === 'mod') $this->output->info("--- 下载 {$name} 更新成功");
+                if ($mode === 'del') $this->output->info("--- 删除 {$name} 文件成功");
+            } else {
+                if ($mode === 'add') $this->output->error("--- 下载 {$name} 添加失败");
+                if ($mode === 'mod') $this->output->error("--- 下载 {$name} 更新失败");
+                if ($mode === 'del') $this->output->error("--- 删除 {$name} 文件失败");
+            }
+        }
+    }
+
+    protected function installDatabase()
+    {
+
+    }
+
+}

+ 17 - 21
vendor/zoujingli/think-library/src/extend/PlugsExtend.php → vendor/zoujingli/think-library/src/install/ExtendInstall.php

@@ -13,16 +13,17 @@
 // | github 仓库地址 :https://github.com/zoujingli/ThinkLibrary
 // +----------------------------------------------------------------------
 
-namespace think\admin\extend;
+namespace think\admin\install;
 
+use think\admin\extend\HttpExtend;
 use think\App;
-use think\console\Output;
 
 /**
- * Class PlugsExtend
- * @package think\admin\extend
+ * 模块安装服务扩展
+ * Class ExtendInstall
+ * @package think\admin\install
  */
-class PlugsExtend
+class ExtendInstall
 {
     /**
      * 当前应用
@@ -49,12 +50,6 @@ class PlugsExtend
     protected $version;
 
     /**
-     * 输出对象
-     * @var Output
-     */
-    protected $output;
-
-    /**
      * 文件规则
      * @var array
      */
@@ -92,8 +87,7 @@ class PlugsExtend
     public function __construct(App $app)
     {
         $this->app = $app;
-        $this->output = new Output();
-        // 应用框架版本号
+        // 应用框架版本
         $this->version = $this->app->config->get('app.thinkadmin_ver');
         if (empty($this->version)) $this->version = 'v4';
         // 线上应用代码
@@ -112,24 +106,25 @@ class PlugsExtend
     }
 
     /**
-     * 同步指定文件
+     * 同步更新文件
      * @param array $file
+     * @return array
      */
     public function fileSynchronization($file)
     {
         if (in_array($file['type'], ['add', 'mod'])) {
             if ($this->downloadFile(encode($file['name']))) {
-                $this->output->writeln("--- 下载 {$file['name']} 更新成功");
+                return [true, $file['type'], $file['name']];
             } else {
-                $this->output->writeln("--- 下载 {$file['name']} 更新失败");
+                return [false, $file['type'], $file['name']];
             }
         } elseif (in_array($file['type'], ['del'])) {
             $real = $this->path . $file['name'];
             if (is_file($real) && unlink($real)) {
                 $this->removeEmptyDirectory(dirname($real));
-                $this->output->writeln("--- 删除 {$file['name']} 文件成功");
+                return [true, $file['type'], $file['name']];
             } else {
-                $this->output->error("--- 删除 {$file['name']} 文件失败");
+                return [false, $file['type'], $file['name']];
             }
         }
     }
@@ -220,11 +215,12 @@ class PlugsExtend
     {
         // 扫描规则文件
         foreach ($rules as $key => $rule) {
-            $data = array_merge($data, $this->scanFileList(strtr("{$this->path}{$rule}", '\\', '/')));
+            $name = strtr(trim($rule, '\\/'), '\\', '/');
+            $data = array_merge($data, $this->scanFileList("{$this->path}{$name}"));
         }
         // 清除忽略文件
-        foreach ($data as $key => $map) foreach ($ignore as $ingore) {
-            if (stripos($map['name'], $ingore) === 0) unset($data[$key]);
+        foreach ($data as $key => $item) foreach ($ignore as $ingore) {
+            if (stripos($item['name'], $ingore) === 0) unset($data[$key]);
         }
         return ['rules' => $rules, 'ignore' => $ignore, 'list' => $data];
     }

+ 0 - 35
vendor/zoujingli/think-library/src/plugs/AdminPlugs.php

@@ -1,35 +0,0 @@
-<?php
-
-// +----------------------------------------------------------------------
-// | Library for ThinkAdmin
-// +----------------------------------------------------------------------
-// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
-// +----------------------------------------------------------------------
-// | 官方网站: http://demo.thinkadmin.top
-// +----------------------------------------------------------------------
-// | 开源协议 ( https://mit-license.org )
-// +----------------------------------------------------------------------
-// | gitee 仓库地址 :https://gitee.com/zoujingli/ThinkLibrary
-// | github 仓库地址 :https://github.com/zoujingli/ThinkLibrary
-// +----------------------------------------------------------------------
-
-namespace think\admin\plugs;
-
-/**
- * Class AdminPlugs
- * @package think\admin\plugs
- */
-class AdminPlugs extends Plugs
-{
-    /**
-     * 文件规则
-     * @var array
-     */
-    protected $rules = ['think', 'app/admin'];
-
-    protected function configure()
-    {
-        $this->setName('xplugs:admin')->setDescription('[同步]覆盖本地Admin模块代码');
-    }
-
-}

+ 0 - 62
vendor/zoujingli/think-library/src/plugs/Plugs.php

@@ -1,62 +0,0 @@
-<?php
-
-// +----------------------------------------------------------------------
-// | Library for ThinkAdmin
-// +----------------------------------------------------------------------
-// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
-// +----------------------------------------------------------------------
-// | 官方网站: http://demo.thinkadmin.top
-// +----------------------------------------------------------------------
-// | 开源协议 ( https://mit-license.org )
-// +----------------------------------------------------------------------
-// | gitee 仓库地址 :https://gitee.com/zoujingli/ThinkLibrary
-// | github 仓库地址 :https://github.com/zoujingli/ThinkLibrary
-// +----------------------------------------------------------------------
-
-namespace think\admin\plugs;
-
-use think\admin\extend\PlugsExtend;
-use think\console\Command;
-use think\console\Input;
-use think\console\Output;
-
-/**
- * 插件基础指令类
- * Class Plugs
- * @package think\admin\plugs
- */
-class Plugs extends Command
-{
-    /**
-     * 查询规则
-     * @var array
-     */
-    protected $rules = [];
-
-    /**
-     * 忽略规则
-     * @var array
-     */
-    protected $ignore = [];
-
-    /**
-     * @param Input $input
-     * @param Output $output
-     */
-    protected function execute(Input $input, Output $output)
-    {
-        $extend = PlugsExtend::instance($this->app);
-        $output->comment("=== 准备从代码仓库下载更新{$extend->getVersion()}版本文件 ===");
-        $data = $extend->grenerateDifference($this->rules, $this->ignore);
-        if (empty($data)) $output->info('--- 本地文件与线上文件一致,无需更新文件');
-        else foreach ($data as $file) $extend->fileSynchronization($file);
-        $output->comment("=== 从代码仓库下载{$extend->getVersion()}版本同步更新成功 ===");
-        $this->install();
-    }
-
-    protected function install()
-    {
-
-    }
-
-}

+ 0 - 31
vendor/zoujingli/think-library/src/plugs/StaticPlugs.php

@@ -1,31 +0,0 @@
-<?php
-
-// +----------------------------------------------------------------------
-// | Library for ThinkAdmin
-// +----------------------------------------------------------------------
-// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
-// +----------------------------------------------------------------------
-// | 官方网站: http://demo.thinkadmin.top
-// +----------------------------------------------------------------------
-// | 开源协议 ( https://mit-license.org )
-// +----------------------------------------------------------------------
-// | gitee 仓库地址 :https://gitee.com/zoujingli/ThinkLibrary
-// | github 仓库地址 :https://github.com/zoujingli/ThinkLibrary
-// +----------------------------------------------------------------------
-
-namespace think\admin\plugs;
-
-/**
- * Class StaticPlugs
- * @package think\admin\plugs
- */
-class StaticPlugs extends Plugs
-{
-    protected $rules = ['public/static'];
-    protected $ignore = ['public/static/self'];
-
-    protected function configure()
-    {
-        $this->setName('xplugs:static')->setDescription('[同步]覆盖本地Static插件代码');
-    }
-}