niceeval 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -34
- package/README.zh.md +18 -15
- package/docs/architecture.md +20 -20
- package/docs/view.md +5 -2
- package/package.json +1 -1
- package/src/cli.ts +2 -2
- package/src/i18n/en.ts +8 -3
- package/src/i18n/zh-CN.ts +7 -3
- package/src/runner/reporters/console.ts +3 -3
- package/src/runner/reporters/live.ts +17 -5
- package/src/runner/reporters/shared.ts +3 -0
- package/src/runner/reporters/table.ts +1 -0
- package/src/runner/run.ts +2 -0
- package/src/runner/types.ts +3 -1
- package/src/shared/format.ts +8 -2
- package/src/view/app/components/AttemptModal.tsx +9 -2
- package/src/view/app/components/CodeView.tsx +2 -2
- package/src/view/app/components/LazyArtifact.tsx +2 -1
- package/src/view/app/i18n.ts +3 -0
- package/src/view/app/lib/artifact-url.ts +6 -0
- package/src/view/client-dist/app.js +16 -16
- package/src/view/index.ts +41 -6
- package/src/view/server.ts +7 -0
package/src/view/app/i18n.ts
CHANGED
|
@@ -98,6 +98,7 @@ export type MessageKey =
|
|
|
98
98
|
| "code.checks"
|
|
99
99
|
| "code.conversation"
|
|
100
100
|
| "code.noSource"
|
|
101
|
+
| "code.sourceUnavailable"
|
|
101
102
|
| "assert.pass"
|
|
102
103
|
| "assert.fail"
|
|
103
104
|
| "assert.soft"
|
|
@@ -208,6 +209,7 @@ const dictionaries: Record<Locale, Dictionary> = {
|
|
|
208
209
|
"code.checks": "checks",
|
|
209
210
|
"code.conversation": "conversation",
|
|
210
211
|
"code.noSource": "Source was not captured. This run may predate source-loc or the source may be unavailable. Re-run this eval to see the code view.",
|
|
212
|
+
"code.sourceUnavailable": "Source was captured for this run, but its artifact files are missing from this deployment. Re-export with `niceeval view --out <dir>` (directory mode bundles artifacts), or open the results locally with `niceeval view`.",
|
|
211
213
|
"assert.pass": "pass",
|
|
212
214
|
"assert.fail": "fail",
|
|
213
215
|
"assert.soft": "soft",
|
|
@@ -315,6 +317,7 @@ const dictionaries: Record<Locale, Dictionary> = {
|
|
|
315
317
|
"code.checks": "检查",
|
|
316
318
|
"code.conversation": "会话",
|
|
317
319
|
"code.noSource": "源码未捕获。此 run 可能早于 source-loc,或源码不可读。重跑此 eval 即可看到代码视图。",
|
|
320
|
+
"code.sourceUnavailable": "此 run 捕获过源码,但当前部署里缺少它的工件文件。用 `niceeval view --out <目录>` 重新导出(目录模式会带上工件),或在本地 `niceeval view` 查看。",
|
|
318
321
|
"assert.pass": "通过",
|
|
319
322
|
"assert.fail": "失败",
|
|
320
323
|
"assert.soft": "soft",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// 工件 fetch 的 URL:相对路径 `artifact/<rel>`。
|
|
2
|
+
// 本地 dev server(server.ts 的 /artifact/ 路由)和目录式静态导出(buildView 拷到 <out>/artifact/)
|
|
3
|
+
// 共用同一布局,前端不需要知道自己被谁托管。相对路径也保证子路径部署(如 host/foo/)不断链。
|
|
4
|
+
export function artifactUrl(rel: string): string {
|
|
5
|
+
return "artifact/" + rel.split("/").map(encodeURIComponent).join("/");
|
|
6
|
+
}
|