Skip to content

Commit

Permalink
Merge pull request #2359 from SSPanel-UIM/dev
Browse files Browse the repository at this point in the history
Dev 20240210
  • Loading branch information
M1Screw authored Feb 10, 2024
2 parents 9b88790 + a2476dd commit fe0c20f
Show file tree
Hide file tree
Showing 12 changed files with 200 additions and 99 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,24 @@ on:
workflow_dispatch:

jobs:
php-file-changed:
runs-on: ubuntu-latest
outputs:
php: ${{ steps.filter.outputs.php }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
php:
- '**/*.php'
unit-test-php82:
needs: php-file-changed
if: ${{ needs.php-file-changed.outputs.php == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -20,6 +37,8 @@ jobs:
php vendor/bin/phpunit
unit-test-php83:
needs: php-file-changed
if: ${{ needs.php-file-changed.outputs.php == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
30 changes: 15 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@
"ext-xml": "*",
"ext-yaml": "*",
"ext-zip": "*",
"anankke/omnipay-alipay": "^3.1.3",
"anankke/omnipay-alipay": "^3",
"aws/aws-sdk-php": "^3",
"geoip2/geoip2": "^3",
"guzzlehttp/guzzle": "^7.8.1",
"guzzlehttp/psr7": "^2.6.2",
"illuminate/database": "^10.34.2",
"illuminate/pagination": "^10.34.2",
"irazasyed/telegram-bot-sdk": "^3.13",
"lcobucci/jwt": "^5.2",
"league/omnipay": "^3.2.1",
"guzzlehttp/guzzle": "^7",
"guzzlehttp/psr7": "^2",
"illuminate/database": "^10",
"illuminate/pagination": "^10",
"irazasyed/telegram-bot-sdk": "^3",
"lcobucci/jwt": "^5",
"league/omnipay": "^3",
"mailgun/mailgun-php": "^4",
"nikolaposa/rate-limit": "^3",
"openai-php/client": "^0",
"ozdemir/datatables": "^2.3.7",
"phpmailer/phpmailer": "^6.9.1",
"ozdemir/datatables": "^2",
"phpmailer/phpmailer": "^6",
"postal/postal": "^2",
"ramsey/uuid": "^4.7.5",
"ramsey/uuid": "^4",
"sendgrid/sendgrid": "^8",
"sentry/sdk": "^4",
"slim/http": "^1.3",
"slim/http": "^1",
"slim/slim": "^4",
"smarty/smarty": "^4",
"srmklive/paypal": "^3",
"stripe/stripe-php": "^13",
"symfony/http-client": "^7",
"symfony/translation": "^6",
"tronovav/geoip2-update": "^2.3.1",
"symfony/translation": "^6|^7",
"tronovav/geoip2-update": "^2",
"twig/twig": "^3",
"vectorface/googleauthenticator": "^3",
"voku/anti-xss": "^4"
Expand All @@ -60,7 +60,7 @@
},
"require-dev": {
"nunomaduro/phpinsights": "*",
"phpunit/phpunit": "^10.5.1"
"phpunit/phpunit": "^10|^11"
},
"scripts": {
"update-dev-windows": [
Expand Down
60 changes: 32 additions & 28 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions config/.config.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,18 @@
$_ENV['geoip_locale'] = 'en';

// Large language model powered ticket reply and more
$_ENV['llm_backend'] = 'openai'; // openai/palm/huggingface/cf-workers-ai
$_ENV['llm_backend'] = 'openai'; // openai/google-ai/huggingface/cf-workers-ai
// OpenAI ChatGPT
$_ENV['openai_api_key'] = '';
$_ENV['openai_model'] = 'gpt-3.5-turbo-1106';
// Google PaLM API
$_ENV['palm_api_key'] = '';
$_ENV['palm_text_model'] = 'text-bison-001';
$_ENV['openai_model'] = 'gpt-4-turbo-preview';
// Google AI API
$_ENV['google_ai_api_key'] = '';
$_ENV['google_ai_model_id'] = 'gemini-pro';
// Vertex AI API
$_ENV['vertex_ai_access_token'] = '';
$_ENV['vertex_ai_location'] = 'us-central1';
$_ENV['vertex_ai_model_id'] = 'gemini-pro';
$_ENV['vertex_ai_project_id'] = '';
// Hugging Face Inference API
$_ENV['huggingface_api_key'] = '';
$_ENV['huggingface_endpoint_url'] = '';
Expand Down
2 changes: 1 addition & 1 deletion config/clients.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Clash Verge",
"tagMethod": "github_release",
"gitRepo": "zzzgydi/clash-verge",
"gitRepo": "clash-verge-rev/clash-verge-rev",
"savePath": "public/clients/",
"downloads": [
{
Expand Down
3 changes: 1 addition & 2 deletions db/2022.12_to_2022.12.1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ ALTER TABLE detect_log DROP FOREIGN KEY detect_log_ibfk_5;
ALTER TABLE link DROP FOREIGN KEY link_ibfk_1;
ALTER TABLE login_ip DROP FOREIGN KEY login_ip_ibfk_1;
ALTER TABLE paylist DROP FOREIGN KEY paylist_ibfk_1;
ALTER TABLE user_hourly_usage DROP FOREIGN KEY user_hourly_usage_ibfk_1;
ALTER TABLE user_invite_code DROP FOREIGN KEY user_invite_code_ibfk_1;
ALTER TABLE user_invite_code DROP FOREIGN KEY user_invite_code_ibfk_1;
2 changes: 1 addition & 1 deletion db/migrations/2023020100-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public function up(): int

public function down(): int
{
echo "No reverse operation for initial migration\n";
echo 'No reverse operation for initial migration' . PHP_EOL . PHP_EOL;

return 2023020100;
}
Expand Down
5 changes: 0 additions & 5 deletions db/migrations/2023061800-update_new_shop_data_type.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,6 @@ public function up(): int
ALTER TABLE user_coupon MODIFY COLUMN `use_count` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '累计使用次数';
ALTER TABLE user_coupon MODIFY COLUMN `create_time` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '创建时间';
ALTER TABLE user_coupon MODIFY COLUMN `expire_time` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '过期时间';
ALTER TABLE user_hourly_usage MODIFY COLUMN `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '记录ID';
ALTER TABLE user_hourly_usage MODIFY COLUMN `user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '用户ID';
ALTER TABLE user_hourly_usage MODIFY COLUMN `traffic` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '当前总流量';
ALTER TABLE user_hourly_usage MODIFY COLUMN `hourly_usage` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '过去一小时流量';
ALTER TABLE user_hourly_usage MODIFY COLUMN `datetime` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '记录时间';
ALTER TABLE user_invite_code MODIFY COLUMN `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '记录ID';
ALTER TABLE user_invite_code MODIFY COLUMN `code` varchar(255) NOT NULL DEFAULT '' COMMENT '邀请码';
ALTER TABLE user_invite_code MODIFY COLUMN `user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '用户ID';
Expand Down
Loading

0 comments on commit fe0c20f

Please sign in to comment.