From 3a00f1b859dee337d1397c0717a2839c3603794a Mon Sep 17 00:00:00 2001 From: phamnazage-jpg Date: Thu, 28 May 2026 07:30:02 +0800 Subject: [PATCH] feat(admin): publish provider drafts into pack repo --- deploy/README.md | 2 +- deploy/tksea-portal/admin/index.html | 10 +- deploy/tksea-portal/admin/providers.html | 48 +++- docs/DEPLOYMENT.md | 23 +- docs/EXECUTION_BOARD.md | 15 + internal/app/app_test.go | 158 +++++++++++ internal/app/coverage_helpers_test.go | 2 +- internal/app/http_api.go | 186 ++++++++++++ internal/config/config.go | 15 +- internal/config/config_test.go | 8 + internal/pack/publisher.go | 316 +++++++++++++++++++++ internal/pack/publisher_test.go | 171 +++++++++++ scripts/test/test_tksea_portal_assets.sh | 5 +- tests/integration/config_bootstrap_test.go | 5 + 14 files changed, 948 insertions(+), 16 deletions(-) create mode 100644 internal/pack/publisher.go create mode 100644 internal/pack/publisher_test.go diff --git a/deploy/README.md b/deploy/README.md index 847e6436..b572973f 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -14,7 +14,7 @@ - `tksea-portal/admin/providers.html` - `https://sub.tksea.top/portal/admin/providers.html` - 用现有 CRM API 做 pack/provider 浏览、preview-import、import,以及 provider manifest 草稿生成 - - 当前也可直接调用服务端 `provider_drafts` API,把 manifest 草稿持久化到 CRM SQLite,并支持更新 / 删除 + - 当前也可直接调用服务端 `provider_drafts` API,把 manifest 草稿持久化到 CRM SQLite,并支持更新 / 删除 / 发布到 pack 仓库 - `tksea-portal/admin/batch-import.html` - `https://sub.tksea.top/portal/admin/batch-import.html` - 结构化入口地址,当前跳转到 legacy `admin-batch-import.html` diff --git a/deploy/tksea-portal/admin/index.html b/deploy/tksea-portal/admin/index.html index 554f330c..1beb908a 100644 --- a/deploy/tksea-portal/admin/index.html +++ b/deploy/tksea-portal/admin/index.html @@ -292,8 +292,8 @@

新增模型 / 供应商目录

这页负责浏览已安装 pack、选择 provider、调用 preview-import / - import,同时提供 provider manifest 草稿生成器。当前版本不直接在浏览器里写入 pack 仓库, - 但已经把“新增模型”的准备动作收进同一条操作链。 + import,同时提供 provider manifest 草稿生成与发布。当前版本已经支持先保存草稿,再经由 CRM + 服务端写入 pack/provider 文件并自动提交到仓库。

打开供应商页 @@ -302,7 +302,7 @@