Browse Source

ComposerUpdate

Anyon 5 years ago
parent
commit
b243f65420

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

@@ -30,10 +30,9 @@ class Update extends Controller
      */
     public function tree()
     {
-        $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));
+        $this->success('获取文件列表成功!', ExtendInstall::instance($this->app)->buildFileList($this->rules, $this->ignore));
     }
 
     /**

+ 4 - 4
composer.lock

@@ -783,12 +783,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/zoujingli/ThinkLibrary.git",
-                "reference": "ad104af398f4789b38b0c28c6966485fd9ade24b"
+                "reference": "8fe807f96681e800b32c5fe775e2b92def2396d3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/ad104af398f4789b38b0c28c6966485fd9ade24b",
-                "reference": "ad104af398f4789b38b0c28c6966485fd9ade24b",
+                "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/8fe807f96681e800b32c5fe775e2b92def2396d3",
+                "reference": "8fe807f96681e800b32c5fe775e2b92def2396d3",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -832,7 +832,7 @@
             ],
             "description": "ThinkPHP v6.0 Development Library",
             "homepage": "http://framework.thinkadmin.top",
-            "time": "2019-11-02T09:08:57+00:00"
+            "time": "2019-11-04T11:04:29+00:00"
         }
     ],
     "packages-dev": [],

+ 1 - 1
vendor/autoload.php

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

+ 1 - 0
vendor/composer/autoload_classmap.php

@@ -105,6 +105,7 @@ return array(
     'app\\admin\\controller\\User' => $baseDir . '/app/admin/controller/User.php',
     'app\\admin\\controller\\api\\Plugs' => $baseDir . '/app/admin/controller/api/Plugs.php',
     'app\\admin\\controller\\api\\Update' => $baseDir . '/app/admin/controller/api/Update.php',
+    'app\\admin\\controller\\api\\Upload' => $baseDir . '/app/admin/controller/api/Upload.php',
     'app\\admin\\service\\AuthService' => $baseDir . '/app/admin/service/AuthService.php',
     'app\\admin\\service\\MenuService' => $baseDir . '/app/admin/service/MenuService.php',
     'app\\index\\controller\\Index' => $baseDir . '/app/index/controller/Index.php',

+ 7 - 7
vendor/composer/autoload_real.php

@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInit86df1673e77272f489819ff9f281822c
+class ComposerAutoloaderInitbb2a3f4400fe342cca606415142844d9
 {
     private static $loader;
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit86df1673e77272f489819ff9f281822c
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInit86df1673e77272f489819ff9f281822c', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInitbb2a3f4400fe342cca606415142844d9', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInit86df1673e77272f489819ff9f281822c', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInitbb2a3f4400fe342cca606415142844d9', '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\ComposerStaticInit86df1673e77272f489819ff9f281822c::getInitializer($loader));
+            call_user_func(\Composer\Autoload\ComposerStaticInitbb2a3f4400fe342cca606415142844d9::getInitializer($loader));
         } else {
             $map = require __DIR__ . '/autoload_namespaces.php';
             foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit86df1673e77272f489819ff9f281822c
         $loader->register(true);
 
         if ($useStaticLoader) {
-            $includeFiles = Composer\Autoload\ComposerStaticInit86df1673e77272f489819ff9f281822c::$files;
+            $includeFiles = Composer\Autoload\ComposerStaticInitbb2a3f4400fe342cca606415142844d9::$files;
         } else {
             $includeFiles = require __DIR__ . '/autoload_files.php';
         }
         foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequire86df1673e77272f489819ff9f281822c($fileIdentifier, $file);
+            composerRequirebb2a3f4400fe342cca606415142844d9($fileIdentifier, $file);
         }
 
         return $loader;
     }
 }
 
-function composerRequire86df1673e77272f489819ff9f281822c($fileIdentifier, $file)
+function composerRequirebb2a3f4400fe342cca606415142844d9($fileIdentifier, $file)
 {
     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
         require $file;

+ 5 - 4
vendor/composer/autoload_static.php

@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInit86df1673e77272f489819ff9f281822c
+class ComposerStaticInitbb2a3f4400fe342cca606415142844d9
 {
     public static $files = array (
         '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
@@ -196,6 +196,7 @@ class ComposerStaticInit86df1673e77272f489819ff9f281822c
         'app\\admin\\controller\\User' => __DIR__ . '/../..' . '/app/admin/controller/User.php',
         'app\\admin\\controller\\api\\Plugs' => __DIR__ . '/../..' . '/app/admin/controller/api/Plugs.php',
         'app\\admin\\controller\\api\\Update' => __DIR__ . '/../..' . '/app/admin/controller/api/Update.php',
+        'app\\admin\\controller\\api\\Upload' => __DIR__ . '/../..' . '/app/admin/controller/api/Upload.php',
         'app\\admin\\service\\AuthService' => __DIR__ . '/../..' . '/app/admin/service/AuthService.php',
         'app\\admin\\service\\MenuService' => __DIR__ . '/../..' . '/app/admin/service/MenuService.php',
         'app\\index\\controller\\Index' => __DIR__ . '/../..' . '/app/index/controller/Index.php',
@@ -468,9 +469,9 @@ class ComposerStaticInit86df1673e77272f489819ff9f281822c
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = ComposerStaticInit86df1673e77272f489819ff9f281822c::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = ComposerStaticInit86df1673e77272f489819ff9f281822c::$prefixDirsPsr4;
-            $loader->classMap = ComposerStaticInit86df1673e77272f489819ff9f281822c::$classMap;
+            $loader->prefixLengthsPsr4 = ComposerStaticInitbb2a3f4400fe342cca606415142844d9::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInitbb2a3f4400fe342cca606415142844d9::$prefixDirsPsr4;
+            $loader->classMap = ComposerStaticInitbb2a3f4400fe342cca606415142844d9::$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": "ad104af398f4789b38b0c28c6966485fd9ade24b"
+            "reference": "8fe807f96681e800b32c5fe775e2b92def2396d3"
         },
         "dist": {
             "type": "zip",
-            "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/ad104af398f4789b38b0c28c6966485fd9ade24b",
-            "reference": "ad104af398f4789b38b0c28c6966485fd9ade24b",
+            "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/8fe807f96681e800b32c5fe775e2b92def2396d3",
+            "reference": "8fe807f96681e800b32c5fe775e2b92def2396d3",
             "shasum": "",
             "mirrors": [
                 {
@@ -826,7 +826,7 @@
             "ext-json": "*",
             "topthink/framework": "^6.0"
         },
-        "time": "2019-11-02T09:08:57+00:00",
+        "time": "2019-11-04T11:04:29+00:00",
         "type": "library",
         "extra": {
             "think": {

+ 1 - 1
vendor/services.php

@@ -1,5 +1,5 @@
 <?php 
-// This file is automatically generated at:2019-11-04 09:31:54
+// This file is automatically generated at:2019-11-04 19:13:52
 declare (strict_types = 1);
 return array (
   0 => 'think\\app\\Service',

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

@@ -40,18 +40,18 @@ class CommandInstall extends Command
     protected $ignore = [];
 
     /**
-     * 插件工具实例
-     * @var ExtendInstall
-     */
-    protected $extend;
-
-    /**
      * 指定模块名称
      * @var string
      */
     protected $name;
 
     /**
+     * 插件工具实例
+     * @var ExtendInstall
+     */
+    protected $extend;
+
+    /**
      * 规则配置
      * @var array
      */
@@ -69,8 +69,8 @@ class CommandInstall extends Command
     protected function configure()
     {
         $this->setName('xtask:install');
-        $this->addArgument('name', Argument::OPTIONAL, '模块名称');
         $this->setDescription("[安装]在线安装或更新指定模块文件");
+        $this->addArgument('name', Argument::OPTIONAL, '模块名称', '');
     }
 
     /**

+ 8 - 8
vendor/zoujingli/think-library/src/install/ExtendInstall.php

@@ -167,7 +167,7 @@ class ExtendInstall
             'rules' => serialize($this->rules), 'ignore' => serialize($this->ignore),
         ]), true);
         if (!empty($result['code'])) {
-            $new = $this->buildFileList($result['data']['rules'], $result['data']['ignore']);
+            $new = $this->getList($result['data']['rules'], $result['data']['ignore']);
             foreach ($this->grenerateDifferenceContrast($result['data']['list'], $new['list']) as $file) {
                 if (in_array($file['type'], ['add', 'del', 'mod'])) foreach ($this->rules as $rule) {
                     if (stripos($file['name'], $rule) === 0) $data[] = $file;
@@ -211,12 +211,12 @@ class ExtendInstall
      * @param array $data 扫描结果列表
      * @return array
      */
-    public function buildFileList(array $rules, array $ignore = [], array $data = [])
+    public function getList(array $rules, array $ignore = [], array $data = [])
     {
         // 扫描规则文件
         foreach ($rules as $key => $rule) {
             $name = strtr(trim($rule, '\\/'), '\\', '/');
-            $data = array_merge($data, $this->scanFileList("{$this->path}{$name}"));
+            $data = array_merge($data, $this->scanList("{$this->path}{$name}"));
         }
         // 清除忽略文件
         foreach ($data as $key => $item) foreach ($ignore as $ingore) {
@@ -231,16 +231,16 @@ class ExtendInstall
      * @param array $data 扫描结果
      * @return array
      */
-    private function scanFileList($path, $data = [])
+    private function scanList($path, $data = [])
     {
         if (file_exists($path)) if (is_dir($path)) foreach (scandir($path) as $sub) {
             if (strpos($sub, '.') !== 0) if (is_dir($temp = "{$path}/{$sub}")) {
-                $data = array_merge($data, $this->scanFileList($temp));
+                $data = array_merge($data, $this->scanList($temp));
             } else {
-                array_push($data, $this->getFileInfo($temp));
+                array_push($data, $this->getInfo($temp));
             }
         } else {
-            return [$this->getFileInfo($path)];
+            return [$this->getInfo($path)];
         }
         return $data;
     }
@@ -250,7 +250,7 @@ class ExtendInstall
      * @param string $filename
      * @return array
      */
-    private function getFileInfo($filename)
+    private function getInfo($filename)
     {
         return [
             'name' => str_replace($this->path, '', $filename),