From 8106d73046255f4ece97c619f30b68a5db8ef3c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 6 Dec 2019 20:10:17 +0800 Subject: [PATCH] ComposerUpdate --- composer.lock | 8 +++---- vendor/composer/installed.json | 8 +++---- vendor/services.php | 2 +- .../zoujingli/think-library/src/Library.php | 4 +++- .../zoujingli/think-library/src/Service.php | 2 +- vendor/zoujingli/think-library/src/common.php | 23 +++++++++++++++++++ .../think-library/src/queue/ListenQueue.php | 2 +- .../think-library/src/queue/QueryQueue.php | 4 ++-- .../think-library/src/queue/StartQueue.php | 10 ++++---- .../think-library/src/queue/StateQueue.php | 6 ++--- .../think-library/src/queue/StopQueue.php | 7 +++--- .../think-library/src/queue/WorkQueue.php | 1 + 12 files changed, 51 insertions(+), 26 deletions(-) diff --git a/composer.lock b/composer.lock index 4ab132388..b1646fc9c 100644 --- a/composer.lock +++ b/composer.lock @@ -783,12 +783,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "15fd0b9204728f69861ed7a4c7ba01be1ac4b687" + "reference": "e919d8616a5e1497d5bb917d4a39c6ea7c4ccd56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/15fd0b9204728f69861ed7a4c7ba01be1ac4b687", - "reference": "15fd0b9204728f69861ed7a4c7ba01be1ac4b687", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/e919d8616a5e1497d5bb917d4a39c6ea7c4ccd56", + "reference": "e919d8616a5e1497d5bb917d4a39c6ea7c4ccd56", "shasum": "", "mirrors": [ { @@ -832,7 +832,7 @@ ], "description": "ThinkPHP v6.0 Development Library", "homepage": "http://framework.thinkadmin.top", - "time": "2019-12-04T12:47:56+00:00" + "time": "2019-12-06T09:02:27+00:00" } ], "packages-dev": [], diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index db6ef8b03..0cae271de 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -805,12 +805,12 @@ "source": { "type": "git", "url": "https://github.com/zoujingli/ThinkLibrary.git", - "reference": "15fd0b9204728f69861ed7a4c7ba01be1ac4b687" + "reference": "e919d8616a5e1497d5bb917d4a39c6ea7c4ccd56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/15fd0b9204728f69861ed7a4c7ba01be1ac4b687", - "reference": "15fd0b9204728f69861ed7a4c7ba01be1ac4b687", + "url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/e919d8616a5e1497d5bb917d4a39c6ea7c4ccd56", + "reference": "e919d8616a5e1497d5bb917d4a39c6ea7c4ccd56", "shasum": "", "mirrors": [ { @@ -826,7 +826,7 @@ "ext-json": "*", "topthink/framework": "^6.0" }, - "time": "2019-12-04T12:47:56+00:00", + "time": "2019-12-06T09:02:27+00:00", "type": "library", "extra": { "think": { diff --git a/vendor/services.php b/vendor/services.php index e0662f559..7c511165d 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\app\\Service', diff --git a/vendor/zoujingli/think-library/src/Library.php b/vendor/zoujingli/think-library/src/Library.php index 9a80db163..7b2ecaff4 100644 --- a/vendor/zoujingli/think-library/src/Library.php +++ b/vendor/zoujingli/think-library/src/Library.php @@ -38,7 +38,9 @@ class Library extends Service } } else { // 注册会话中间键 - $this->app->middleware->add(SessionInit::class); + if ($this->app->request->request('not_init_session', 0) == 0) { + $this->app->middleware->add(SessionInit::class); + } // 注册访问中间键 $this->app->middleware->add(function (Request $request, \Closure $next) { $header = []; diff --git a/vendor/zoujingli/think-library/src/Service.php b/vendor/zoujingli/think-library/src/Service.php index a4f0636a3..469618a0f 100644 --- a/vendor/zoujingli/think-library/src/Service.php +++ b/vendor/zoujingli/think-library/src/Service.php @@ -42,7 +42,7 @@ abstract class Service } /** - * 服务初始化 + * 初始化服务 * @return $this */ protected function initialize(): Service diff --git a/vendor/zoujingli/think-library/src/common.php b/vendor/zoujingli/think-library/src/common.php index b40c15d85..ad1b651c2 100644 --- a/vendor/zoujingli/think-library/src/common.php +++ b/vendor/zoujingli/think-library/src/common.php @@ -224,4 +224,27 @@ if (!function_exists('format_datetime')) { return date($format, strtotime($datetime)); } } +} + +if (!function_exists('enbase64url')) { + /** + * Base64安全URL编码 + * @param string $string + * @return string + */ + function enbase64url(string $string): string + { + return rtrim(strtr(base64_encode($string), '+/', '-_'), '='); + } +} +if (!function_exists('debase64url')) { + /** + * Base64安全URL解码 + * @param string $string + * @return string + */ + function debase64url(string $string): string + { + return base64_decode(str_pad(strtr($string, '-_', '+/'), strlen($string) % 4, '=', STR_PAD_RIGHT)); + } } \ No newline at end of file diff --git a/vendor/zoujingli/think-library/src/queue/ListenQueue.php b/vendor/zoujingli/think-library/src/queue/ListenQueue.php index a7ff4c9e9..34a40c8c3 100644 --- a/vendor/zoujingli/think-library/src/queue/ListenQueue.php +++ b/vendor/zoujingli/think-library/src/queue/ListenQueue.php @@ -36,7 +36,7 @@ class ListenQueue extends Command } /** - * 执行进程守护监听 + * 启动进程守护监听 * @param Input $input 输入对象 * @param Output $output 输出对象 * @throws \think\db\exception\DataNotFoundException diff --git a/vendor/zoujingli/think-library/src/queue/QueryQueue.php b/vendor/zoujingli/think-library/src/queue/QueryQueue.php index 575137f46..ea7d3e803 100644 --- a/vendor/zoujingli/think-library/src/queue/QueryQueue.php +++ b/vendor/zoujingli/think-library/src/queue/QueryQueue.php @@ -42,8 +42,8 @@ class QueryQueue extends Command */ protected function execute(Input $input, Output $output) { - $process = ProcessService::instance(); - $result = $process->query($process->think("xtask:")); + $service = ProcessService::instance(); + $result = $service->query($service->think("xtask:")); if (count($result) > 0) foreach ($result as $item) { $output->writeln("{$item['pid']}\t{$item['cmd']}"); } else { diff --git a/vendor/zoujingli/think-library/src/queue/StartQueue.php b/vendor/zoujingli/think-library/src/queue/StartQueue.php index a5ec67dd1..eb576d6ed 100644 --- a/vendor/zoujingli/think-library/src/queue/StartQueue.php +++ b/vendor/zoujingli/think-library/src/queue/StartQueue.php @@ -44,14 +44,14 @@ class StartQueue extends Command protected function execute(Input $input, Output $output) { $this->app->db->name('SystemQueue')->count(); - $process = ProcessService::instance(); - $command = $process->think("xtask:listen"); - if (count($result = $process->query($command)) > 0) { + $service = ProcessService::instance(); + $command = $service->think("xtask:listen"); + if (count($result = $service->query($command)) > 0) { $output->info("监听主进程{$result['0']['pid']}已经启动!"); } else { - $process->create($command); + $service->create($command); sleep(1); - if (count($result = $process->query($command)) > 0) { + if (count($result = $service->query($command)) > 0) { $output->info("监听主进程{$result['0']['pid']}启动成功!"); } else { $output->error('监听主进程创建失败!'); diff --git a/vendor/zoujingli/think-library/src/queue/StateQueue.php b/vendor/zoujingli/think-library/src/queue/StateQueue.php index 164196e10..d99517b40 100644 --- a/vendor/zoujingli/think-library/src/queue/StateQueue.php +++ b/vendor/zoujingli/think-library/src/queue/StateQueue.php @@ -42,9 +42,9 @@ class StateQueue extends Command */ protected function execute(Input $input, Output $output) { - $process = ProcessService::instance(); - $command = $process->think('xtask:listen'); - if (count($result = $process->query($command)) > 0) { + $service = ProcessService::instance(); + $command = $service->think('xtask:listen'); + if (count($result = $service->query($command)) > 0) { $output->info("任务监听主进程{$result[0]['pid']}正在运行..."); } else { $output->warning("任务监听主进程没有运行哦!"); diff --git a/vendor/zoujingli/think-library/src/queue/StopQueue.php b/vendor/zoujingli/think-library/src/queue/StopQueue.php index 55b6e37a1..03e17a78e 100644 --- a/vendor/zoujingli/think-library/src/queue/StopQueue.php +++ b/vendor/zoujingli/think-library/src/queue/StopQueue.php @@ -43,12 +43,11 @@ class StopQueue extends Command */ protected function execute(Input $input, Output $output) { - $process = ProcessService::instance(); - $command = $process->think('xtask:'); - if (count($result = $process->query($command)) < 1) { + $service = ProcessService::instance(); + if (count($result = $service->query($service->think('xtask:'))) < 1) { $output->warning("没有需要结束的任务进程哦!"); } else foreach ($result as $item) { - $process->close($item['pid']); + $service->close($item['pid']); $output->info("发送结束进程{$item['pid']}信号成功!"); } } diff --git a/vendor/zoujingli/think-library/src/queue/WorkQueue.php b/vendor/zoujingli/think-library/src/queue/WorkQueue.php index 6b41f4b28..30856eb18 100644 --- a/vendor/zoujingli/think-library/src/queue/WorkQueue.php +++ b/vendor/zoujingli/think-library/src/queue/WorkQueue.php @@ -54,6 +54,7 @@ class WorkQueue extends Command } /** + * 执行指令的任务 * @param Input $input 输入对象 * @param Output $output 输出对象 * @throws \think\db\exception\DbException