Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edb04bfdd9 | ||
|
|
982c2cdb77 | ||
|
|
86a260c646 | ||
|
|
eff273f7f2 |
No files matched your search
@@ -0,0 +1,13 @@
|
||||
# Unified Woodpecker CI for a Rust component.
|
||||
#
|
||||
# One published `marqdo-ci-rust` image (Rust 1.100, rustfmt/clippy, warm cargo
|
||||
# cache, released CLI/Bundle) is reused. No per-repository toolchain download or
|
||||
# CLI rebuild; the repository only runs its own CI entry.
|
||||
when:
|
||||
event: [push, pull_request, manual]
|
||||
|
||||
steps:
|
||||
test:
|
||||
image: git.cflmy.cn/cflmy/marqdo-ci-rust:3.0.0-rc.5
|
||||
commands:
|
||||
- scripts/ci.sh
|
||||
@@ -1,5 +1,10 @@
|
||||
# AGENTS.md:marqdo-web-preview 维护指引
|
||||
|
||||
<!-- marqdo:repo-conventions v1 -->
|
||||
|
||||
生态级仓库开发规范:https://git.cflmy.cn/cflmy/marqdo/src/branch/main/docs/REPOSITORY-CONVENTIONS.md
|
||||
|
||||
|
||||
本文件约束在本仓库工作的维护者与 AI Coding Agent。仓库状态为 `planned`:只有文档,
|
||||
没有实现源码、`Cargo.toml`/`Cargo.lock`、`tool.json` 实体、CI 入口或发布制品,也没有
|
||||
接入 `marqdo-ext-web` 的 gitlink。
|
||||
|
||||
Generated
+1
-1
@@ -11,7 +11,7 @@ checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4"
|
||||
[[package]]
|
||||
name = "marqdo-web-design"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.cflmy.cn/cflmy/marqdo-web-design?rev=2f18dede8540c82611819e2c24a19db138d5ac14#2f18dede8540c82611819e2c24a19db138d5ac14"
|
||||
source = "git+https://git.cflmy.cn/cflmy/marqdo-web-design?rev=1b6607fd3cc09801b4f6eacd2fba547caa0ec637#1b6607fd3cc09801b4f6eacd2fba547caa0ec637"
|
||||
dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
+1
-1
@@ -7,5 +7,5 @@ license = "MIT OR Apache-2.0"
|
||||
description = "Offline Web design preview and the unique marqdo web Tool"
|
||||
|
||||
[dependencies]
|
||||
marqdo-web-design = { git = "https://git.cflmy.cn/cflmy/marqdo-web-design", rev = "2f18dede8540c82611819e2c24a19db138d5ac14" }
|
||||
marqdo-web-design = { git = "https://git.cflmy.cn/cflmy/marqdo-web-design", rev = "1b6607fd3cc09801b4f6eacd2fba547caa0ec637" }
|
||||
serde_json = "1"
|
||||
@@ -4,7 +4,7 @@
|
||||
`marqdo-web-design` 已经解释好的设计模型,生成不依赖服务器、可用本地浏览器直接打开的
|
||||
离线 HTML 原型,并以 `web` 命令注册为生态中唯一的 Web Tool 入口。
|
||||
|
||||
- **状态:`planned`**。本仓库目前只有文档:没有实现源码、`Cargo.toml`/`Cargo.lock`、
|
||||
- **状态:`active`**。已实现独立 executable、`tool.json`、离线预览与 `scripts/ci.sh`;
|
||||
`tool.json` 实体、`scripts/ci.sh`、CI 流水线或发布制品,也没有接入领域仓库
|
||||
`marqdo-ext-web` 的子 gitlink。本文中“将/目标”描述的是接入后必须满足的合同,不是
|
||||
已实现能力,也不是已验收结果。
|
||||
@@ -16,8 +16,8 @@
|
||||
- **上游实现**:[marqdo-web-design](https://git.cflmy.cn/cflmy/marqdo-web-design)
|
||||
(唯一设计解释实现,Rust library;本仓库通过其公开 API 消费设计模型)。
|
||||
- **仓库远端**:`https://git.cflmy.cn/cflmy/marqdo-web-preview`。远端已创建并推送
|
||||
初始开发文档;领域 `components.toml` 已登记为 planned,开发工单也已建立;gitlink、
|
||||
独立 CI 与发布仍属于后续激活工作,当前 `planned`。
|
||||
实现/证据;领域 `components.toml` 已登记为 active 并固定 gitlink;真实浏览器/资产等
|
||||
剩余验收项在组件工单跟踪,不得把未验证项写成 PASS。
|
||||
|
||||
## 职责与禁止
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
| 对象 | 身份 |
|
||||
| --- | --- |
|
||||
| CLI | 由根固定 `cli/deadf6e` 构建的 `marqdo 3.0.0-rc.4`,SHA-256 `sha256:6ede3b9e...` |
|
||||
| Design 依赖 | `marqdo-web-design@2f18dede8540c82611819e2c24a19db138d5ac14`(`Cargo.lock` 固定 git rev;不是 `../design` 路径依赖) |
|
||||
| Design 依赖 | `marqdo-web-design@1b6607fd3cc09801b4f6eacd2fba547caa0ec637`(WEB-03 handoff/图/切片)(`Cargo.lock` 固定 git rev;不是 `../design` 路径依赖) |
|
||||
| 平台 | Linux x86_64(本机验证) |
|
||||
|
||||
## 执行
|
||||
@@ -33,7 +33,7 @@ MARQDO_BIN=<verified marqdo> scripts/ci.sh
|
||||
|
||||
## 未验证 / 后续(不隐藏)
|
||||
|
||||
- 真实浏览器(Playwright/file://)行为、responsive 390px 无横向溢出、按钮实际状态切换的 DOM 断言未执行;当前只有静态制品断言。
|
||||
- WEB-03 交付内容由图/切片/漂移提供,Preview 已验证相对链接;真实浏览器(Playwright/file://)行为、responsive 390px 无横向溢出、按钮实际状态切换的 DOM 断言未执行;当前只有静态制品断言。
|
||||
- 图片/本地 raster 资产复制、魔数/大小校验、远端图片文本占位尚未实现(当前不渲染图片)。
|
||||
- 完整安全负例矩阵(`</script>`/Unicode/双引号 fixture、输出预算边界、超时/进程限制)未系统性覆盖。
|
||||
- 冷安装(root 生态 `web` Tool 与 WEB-05)未开始;WEB-04 生产交付试验未开始。
|
||||
@@ -27,6 +27,16 @@ handoff="$work/handoff.md"
|
||||
"$MARQDO_BIN" web handoff tests/fixture/index.mq.md --unit 工作台 --out "$handoff"
|
||||
test -s "$handoff"
|
||||
grep -q "Design handoff" "$handoff"
|
||||
grep -q "components/nav.mq.md#导航" "$handoff"
|
||||
python3 - "$handoff" <<'PY'
|
||||
import pathlib, sys, re
|
||||
text = pathlib.Path(sys.argv[1]).read_text()
|
||||
assert "](" in text
|
||||
for target in re.findall(r"\]\(([^)]+)\)", text):
|
||||
assert not target.startswith("/"), target
|
||||
assert not target.startswith("file:"), target
|
||||
print("handoff links are relative")
|
||||
PY
|
||||
if "$MARQDO_BIN" web preview tests/fixture/index.mq.md --unit 工作台 --out "$preview" 2>/dev/null; then
|
||||
echo "preview overwrote an existing directory" >&2
|
||||
exit 1
|
||||
|
||||
+10
-3
@@ -13,7 +13,8 @@ use std::path::{Path, PathBuf};
|
||||
use std::process::ExitCode;
|
||||
|
||||
use marqdo_web_design::{
|
||||
handoff, load, ComponentDef, ContentBlock, Design, Error, Instance, LoadConfig, Scenario, Width,
|
||||
handoff_relative_to, load, ComponentDef, ContentBlock, Design, Error, Instance, LoadConfig,
|
||||
Scenario, Width,
|
||||
};
|
||||
|
||||
const CSS: &str = r#"
|
||||
@@ -574,12 +575,18 @@ fn run_handoff(args: &Args) -> ExitCode {
|
||||
return ExitCode::from(code);
|
||||
}
|
||||
};
|
||||
let text = handoff(&design);
|
||||
let out = PathBuf::from(out);
|
||||
let base = out
|
||||
.parent()
|
||||
.filter(|parent| !parent.as_os_str().is_empty())
|
||||
.map(Path::to_path_buf)
|
||||
.unwrap_or_else(|| PathBuf::from("."));
|
||||
let base = base.canonicalize().unwrap_or(base);
|
||||
let text = handoff_relative_to(&design, &base);
|
||||
if text.len() > 4 * 1024 * 1024 {
|
||||
eprintln!("web handoff: error: handoff exceeds the 4 MiB budget");
|
||||
return ExitCode::from(2);
|
||||
}
|
||||
let out = PathBuf::from(out);
|
||||
if let Some(parent) = out.parent() {
|
||||
if !parent.as_os_str().is_empty() && !parent.is_dir() {
|
||||
eprintln!("web handoff: error: output parent is not a directory");
|
||||
|
||||
Reference in new issue
Block a user