sqlite-web 0.7.2
gitea.db
package_version
Create
Query
access
access_token
action
action_artifact
action_run
action_run_index
action_run_job
action_runner
action_runner_token
action_schedule
action_schedule_spec
action_task
action_task_output
action_task_step
action_tasks_version
action_variable
app_state
attachment
auth_token
badge
branch
collaboration
comment
commit_status
commit_status_index
commit_status_summary
commit_sync_log
commit_sync_status
dbfs_data
dbfs_meta
deploy_key
email_address
email_hash
external_login_user
follow
gpg_key
gpg_key_import
hook_task
issue
issue_assignees
issue_content_history
issue_dependency
issue_index
issue_label
issue_pin
issue_user
issue_watch
label
language_stat
lfs_lock
lfs_meta_object
login_source
milestone
mirror
notice
notification
oauth2_application
oauth2_authorization_code
oauth2_grant
org_user
package
package_blob
package_blob_upload
package_cleanup_rule
package_file
package_property
package_version
project
project_board
project_issue
protected_branch
protected_tag
public_key
pull_auto_merge
pull_request
push_mirror
reaction
release
renamed_branch
repo_archiver
repo_hidden_file
repo_indexer_status
repo_license
repo_redirect
repo_topic
repo_transfer
repo_unit
repository
review
review_state
secret
session
sqlite_sequence
star
stopwatch
system_setting
task
team
team_invite
team_repo
team_unit
team_user
topic
tracked_time
two_factor
upload
user
user_badge
user_blocking
user_open_id
user_redirect
user_setting
version
watch
webauthn_credential
webhook
Toggle helper tables
Structure
Content
Query
Insert
Drop
Import
Export
Delete row 45 from package_version
id
45
package_id
19
creator_id
5
version
1.0.0-rc.7
lower_version
1.0.0-rc.7
created_unix
1791622796
is_internal
0
metadata_json
{"scope":"@juhai","name":&
{"scope":"@juhai","name":"client-public-file","description":"公共文件平台远程客户端:把 public-file-object-api.v1 的四个操作实现为对平台端点的调用;未配置即失败关闭(DEC-040 升格后由副作用半边改写而来)","license":"UNLICENSED","development_dependencies":{"@types/node":"22.19.20","typescript":"5.9.3","vitest":"2.1.9"},"readme":"# `@juhai/client-public-file`\n\n公共文件能力的**带副作用那半**:`PublicFileRef v1` 构造与路径安全判定、S3 兼容对象存储适配、clamd `INSTREAM` 扫描、按环境装配基础设施。\n\n**纯规则那半不在本包**,在 `contracts/src/domain/public-file/`(`public-file-access-planner.ts` 的授权版本回退与签名 URL 过期判定等,2026-09-14 迁入)。两半的分工就是设计方案 §5 的形态划分:契约包只放 Schema 与校验器,副作用留给适配器。\n\n## 来源与迁入\n\n逐字迁自工单仓 `packages/attachments/src/`(453 行实现 + 69 行单测 + 35 行真实基础设施验收),2026-09-18 按目录负责人「直接搬」的 G4 裁决执行。迁入**不改一行判定逻辑**:8 例单测与 1 例真实验收原样随迁,在本仓更严的 `tsconfig.base.json`(含 `noUncheckedIndexedAccess`)下一次编译通过,8/8 绿、1 例按 `ATTACHMENT_REAL_ACCEPTANCE` 跳过(与原仓同一门槛)。\n\n迁入前这份实现在工作区里有**三份复制**:工单仓(本包来源,453 行,含存储与扫描)、巨嗨报价 `packages/public-file/src/ref.ts`(91 行)、嗨赞造意 `packages/public-file/src/ref.ts`(82 行)。后两份只抄了 ref 那一段,且**已经语义分叉**——嗨赞造意那份长出了 `assertPublicFileRef`(把收到的 ref 按 owner 字段重建再比对 `storageRef`),报价那份没有;入参防御也不同(嗨赞造意先判 `typeof value !== \"string\"`,报价直接 `.trim()`,非串抛 TypeError 而不是稳定错误)。**同一个 PublicFileRef v1,两个应用对「外来 ref 可不可信」给的答案不一样**——这正是本次搬迁要终结的东西。\n\n## 接口\n\n| 导出 | 作用 |\n|---|---|\n| `createPublicFileRef` / `assertSafeStorageRef` | 构造版本化、按 app + tenant 隔离的 `storageRef`;拒绝 `.` / `..` / 控制字符 / 绝对路径 / 反斜杠 |\n| `S3AttachmentStorage` | 预签名上传(15 min)/ 下载(5 min)、`HeadObject` 事实回读、幂等删除;每个入口先过 `assertSafeStorageRef` |\n| `ClamAvScanner` | clamd `zINSTREAM` 分块投喂;响应超 4 KiB、超时、连接错误一律判 `FAILED` 而不是放行 |\n| `MemoryAttachmentStorage` / `DeterministicAcceptanceScanner` | 验收替身;`createAttachmentInfrastructure` 在 `NODE_ENV=production` 下拒绝 memory 模式 |\n| `assertAttachmentInfrastructureConfig` | 生产必须 HTTPS + 显式 host allowlist + 成对凭证;本机有显式默认值 |\n| `inspectAttachmentContent` / `contentTypeMatches` | 魔数嗅探与 OOXML↔zip 容器匹配,防止声明类型顶替真实类型 |\n\n## 与其他 `@juhai/client-*` 的不同\n\n本包**不实现任何内核端口**,因此没有 `@juhai/kernel` 的 peer 依赖,也不在 `runtime/test/port/platform-ports.conformance.ts` 的三画像范围内——那套夹具是给「端口的远程实现」用的,本包没有远端可调(公共文件的运行服务 `file-service` 按设计要 G4 之后才从 SDK 升格)。它落在 `clients/` 是因为这里是本仓对外发布、供上层 exact pin 的那一面,形态判据见 `../README.md`。\n\n## 未做(不在本轮范围)\n\n- **四个消费者尚未改接本包**:工单仓仍用自己的 `@repo/attachments`,巨嗨报价与嗨赞造意仍各用自己的复制。改接的前提是本包发布到 Gitea Registry,而发布通道自 2026-09-18 起只剩 CI 一条路、卡在 GitHub 计费。\n- **Catalog 登记未动**:`public-file` 仍 `module_e2 / E2`,`code_truth` 仍指工单仓 `packages/attachments`。代码搬过来不等于登记跟着翻——那是受控字段变更,须走 CHG。\n- **`assertPublicFileRef` 未补**:嗨赞造意那份长出来的校验函数本包没有。它是三份里唯一的语义增量,合并与否应由公共文件 Owner 裁,不在「搬」的范围内。\n","repository":{"type":"","url":""}}
...
download_count
1
Delete
Cancel