初始化-安装依赖

This commit is contained in:
2026-03-03 10:06:12 +08:00
parent 3f349a35a4
commit ec8cac4221
187 changed files with 26292 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
<?php
use support\Request;
return [
'debug' => true,
'controller_suffix' => 'Controller',
'controller_reuse' => false,
'version' => '6.0.1'
];

View File

@@ -0,0 +1,6 @@
<?php
return [
'files' => [
base_path() . '/plugin/saipackage/app/functions.php',
]
];

View File

@@ -0,0 +1,2 @@
<?php
return new Webman\Container;

View File

@@ -0,0 +1,2 @@
<?php
return [];

View File

@@ -0,0 +1,5 @@
<?php
return [
'' => \plugin\saiadmin\app\exception\Handler::class,
];

View File

@@ -0,0 +1,20 @@
<?php
return [
'default' => [
'handlers' => [
[
'class' => Monolog\Handler\RotatingFileHandler::class,
'constructor' => [
runtime_path() . '/logs/saipackage.log',
7,
Monolog\Logger::DEBUG,
],
'formatter' => [
'class' => Monolog\Formatter\LineFormatter::class,
'constructor' => [null, 'Y-m-d H:i:s', true],
],
]
],
],
];

View File

@@ -0,0 +1,6 @@
<?php
return [
'' => [
]
];

View File

@@ -0,0 +1,2 @@
<?php
return [];

View File

@@ -0,0 +1,14 @@
<?php
use Webman\Route;
Route::group('/tool/install', function () {
// 商店代理接口(在线安装)
Route::get('/online/appList', [plugin\saipackage\app\controller\InstallController::class, 'appList']);
Route::get('/online/storeCaptcha', [plugin\saipackage\app\controller\InstallController::class, 'storeCaptcha']);
Route::post('/online/storeLogin', [plugin\saipackage\app\controller\InstallController::class, 'storeLogin']);
Route::get('/online/storeUserInfo', [plugin\saipackage\app\controller\InstallController::class, 'storeUserInfo']);
Route::get('/online/storePurchasedApps', [plugin\saipackage\app\controller\InstallController::class, 'storePurchasedApps']);
Route::get('/online/storeAppVersions', [plugin\saipackage\app\controller\InstallController::class, 'storeAppVersions']);
Route::post('/online/storeDownloadApp', [plugin\saipackage\app\controller\InstallController::class, 'storeDownloadApp']);
});

View File

@@ -0,0 +1,6 @@
<?php
return [
'enable' => true,
'middleware' => [], // Static file Middleware
];

View File

@@ -0,0 +1,79 @@
<?php
return [
// 允许执行的命令
'commands' => [
// 查看版本的命令
'version' => [
'npm' => 'npm -v',
'yarn' => 'yarn -v',
'pnpm' => 'pnpm -v',
'node' => 'node -v',
],
// 测试命令
'test' => [
'npm' => [
'cwd' => public_path() . DIRECTORY_SEPARATOR . 'npm-install-test',
'command' => 'npm install',
],
'yarn' => [
'cwd' => public_path() . DIRECTORY_SEPARATOR . 'npm-install-test',
'command' => 'yarn install',
],
'pnpm' => [
'cwd' => public_path() . DIRECTORY_SEPARATOR . 'npm-install-test',
'command' => 'pnpm install',
],
],
// 安装 WEB 依赖包
'web-install' => [
'npm' => [
'cwd' => dirname(base_path()) . DIRECTORY_SEPARATOR . env('FRONTEND_DIR', 'saiadmin-artd'),
'command' => 'npm install',
],
'yarn' => [
'cwd' => dirname(base_path()) . DIRECTORY_SEPARATOR . env('FRONTEND_DIR', 'saiadmin-artd'),
'command' => 'yarn install',
],
'pnpm' => [
'cwd' => dirname(base_path()) . DIRECTORY_SEPARATOR . env('FRONTEND_DIR', 'saiadmin-artd'),
'command' => 'pnpm install',
],
],
// 构建 WEB 端
'web-build' => [
'npm' => [
'cwd' => dirname(base_path()) . DIRECTORY_SEPARATOR . env('FRONTEND_DIR', 'saiadmin-artd'),
'command' => 'npm run build',
],
'yarn' => [
'cwd' => dirname(base_path()) . DIRECTORY_SEPARATOR . env('FRONTEND_DIR', 'saiadmin-artd'),
'command' => 'yarn run build',
],
'pnpm' => [
'cwd' => dirname(base_path()) . DIRECTORY_SEPARATOR . env('FRONTEND_DIR', 'saiadmin-artd'),
'command' => 'pnpm run build',
],
],
// 设置 NPM 源
'set-npm-registry' => [
'npm' => 'npm config set registry https://registry.npmjs.org/ && npm config get registry',
'taobao' => 'npm config set registry https://registry.npmmirror.com/ && npm config get registry',
'tencent' => 'npm config set registry https://mirrors.cloud.tencent.com/npm/ && npm config get registry'
],
// 设置 composer 源
'set-composer-registry' => [
'composer' => 'composer config --unset repos.packagist',
'tencent' => 'composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/',
'huawei' => 'composer config -g repos.packagist composer https://mirrors.huaweicloud.com/repository/php/',
'kkame' => 'composer config -g repos.packagist composer https://packagist.kr',
],
// 安装 composer 包
'composer' => [
'update' => [
'cwd' => base_path(),
'command' => 'composer update --no-interaction',
],
]
],
];

View File

@@ -0,0 +1,10 @@
<?php
return [
// Default language
'locale' => 'zh_CN',
// Fallback language
'fallback_locale' => ['zh_CN', 'en'],
// Folder where language files are stored
'path' => base_path() . "/plugin/saipackage/resource/translations",
];

View File

@@ -0,0 +1,5 @@
<?php
return [
'type' => ['zip'],
'size' => 1024 * 1024 * 5, // 5MB
];

View File

@@ -0,0 +1,10 @@
<?php
use support\view\Raw;
use support\view\Twig;
use support\view\Blade;
use support\view\ThinkPHP;
return [
'handler' => Raw::class
];