mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
391f78e1fe
commit
c25d007246
8
composer.lock
generated
8
composer.lock
generated
@ -937,12 +937,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||
"reference": "f0c49e28928af221123c15022dc352423439dbc1"
|
||||
"reference": "5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f0c49e28928af221123c15022dc352423439dbc1",
|
||||
"reference": "f0c49e28928af221123c15022dc352423439dbc1",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c",
|
||||
"reference": "5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -987,7 +987,7 @@
|
||||
],
|
||||
"description": "ThinkPHP v6.0 Development Library",
|
||||
"homepage": "http://thinkadmin.top",
|
||||
"time": "2020-08-24T05:13:21+00:00"
|
||||
"time": "2020-08-24T05:23:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "zoujingli/wechat-developer",
|
||||
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
@ -963,12 +963,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||
"reference": "f0c49e28928af221123c15022dc352423439dbc1"
|
||||
"reference": "5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/f0c49e28928af221123c15022dc352423439dbc1",
|
||||
"reference": "f0c49e28928af221123c15022dc352423439dbc1",
|
||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c",
|
||||
"reference": "5caa2ceb15d1a311ee1cfc7cc7a4ec12a7ee540c",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -985,7 +985,7 @@
|
||||
"ext-mbstring": "*",
|
||||
"topthink/framework": "^6.0"
|
||||
},
|
||||
"time": "2020-08-24T05:13:21+00:00",
|
||||
"time": "2020-08-24T05:23:03+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"think": {
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2020-08-24 13:16:26
|
||||
// This file is automatically generated at:2020-08-24 13:26:32
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\admin\\Library',
|
||||
|
@ -148,9 +148,8 @@ class ModuleService extends Service
|
||||
foreach ($service->getModules() as $name) {
|
||||
$vars = $this->_getModuleVersion($name);
|
||||
if (is_array($vars) && isset($vars['version']) && preg_match('|^\d{4}\.\d{2}\.\d{2}\.\d{2}$|', $vars['version'])) {
|
||||
$data[$name] = $vars;
|
||||
$data[$name]['change'] = [];
|
||||
foreach ($service->scanDirectory($this->app->getBasePath() . $name . '/module/change/', [], '.md') as $file) {
|
||||
$data[$name] = array_merge($vars, ['change' => []]);
|
||||
foreach ($service->scanDirectory($this->app->getBasePath() . $name . '/module/change/', [], 'md') as $file) {
|
||||
$data[$name]['change'][pathinfo($file, PATHINFO_FILENAME)] = Parsedown::instance()->parse(file_get_contents($file));
|
||||
}
|
||||
}
|
||||
@ -199,7 +198,7 @@ class ModuleService extends Service
|
||||
private function _getModuleVersion($name)
|
||||
{
|
||||
$appdir = $this->app->getBasePath() . $name;
|
||||
$filename = $appdir . DIRECTORY_SEPARATOR . 'module' . DIRECTORY_SEPARATOR . 'version.json';
|
||||
$filename = $appdir . DIRECTORY_SEPARATOR . 'module' . DIRECTORY_SEPARATOR . 'module.json';
|
||||
if (file_exists($filename) && is_file($filename) && is_readable($filename)) {
|
||||
$vars = json_decode(file_get_contents($filename), true);
|
||||
return isset($vars['name']) && isset($vars['version']) ? $vars : null;
|
||||
|
@ -141,13 +141,13 @@ class NodeService extends Service
|
||||
* @param string $ext 文件后缀
|
||||
* @return array
|
||||
*/
|
||||
public function scanDirectory($path, $data = [], $ext = '.php')
|
||||
public function scanDirectory($path, $data = [], $ext = 'php')
|
||||
{
|
||||
foreach (scandir($path) as $item) if ($item[0] !== '.') {
|
||||
$realpath = rtrim($path, '\\/') . DIRECTORY_SEPARATOR . $item;
|
||||
if (is_readable($realpath)) if (is_dir($realpath)) {
|
||||
$data = $this->scanDirectory($realpath, $data, $ext);
|
||||
} elseif (is_file($realpath) && (is_null($ext) || strstr($realpath, '.') === $ext)) {
|
||||
} elseif (is_file($realpath) && (is_null($ext) || pathinfo($realpath, 4) === $ext)) {
|
||||
$data[] = $realpath;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user