weapp-vite 6.13.3 → 6.14.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 CHANGED
@@ -95,10 +95,20 @@ function handleClick() {
95
95
 
96
96
  - 安装依赖后,优先阅读 `node_modules/weapp-vite/dist/docs/README.md`、`node_modules/weapp-vite/dist/docs/mcp.md` 等本地版本文档
97
97
  - CLI 同时支持 `weapp-vite` 与 `wv`
98
- - 需要做小程序截图验收时,优先使用 `weapp-vite screenshot` `wv screenshot`
98
+ - 需要做小程序截图采集时,优先使用 `weapp-vite screenshot` / `wv screenshot`
99
+ - 需要做小程序截图对比验收时,优先使用 `weapp-vite compare` / `wv compare`
99
100
  - 不要把小程序运行时截图退化成通用浏览器截图
100
101
  - 需要看 DevTools 终端日志时,优先使用 `weapp-vite ide logs --open` 或 `wv ide logs --open`
101
102
 
103
+ 推荐把下面这组意图映射写进项目根 `AGENTS.md`,让常见 AI 更稳定命中:
104
+
105
+ - 提到 `截图`、`页面快照`、`runtime screenshot`
106
+ - 默认使用 `weapp-vite screenshot` / `wv screenshot`
107
+ - 提到 `截图对比`、`diff`、`baseline`、`视觉回归`、`像素对比`
108
+ - 默认使用 `weapp-vite compare` / `wv compare`
109
+ - 提到 `运行时日志`、`DevTools 日志`
110
+ - 默认使用 `weapp-vite ide logs --open` / `wv ide logs --open`
111
+
102
112
  `dist/docs` 当前会内置这些文件:
103
113
 
104
114
  - `README.md`
@@ -123,6 +133,15 @@ weapp-vite screenshot --project ./dist/build/mp-weixin --page pages/index/index
123
133
  wv screenshot --project ./dist/build/mp-weixin --page pages/index/index --output .tmp/acceptance.png --json
124
134
  ```
125
135
 
136
+ 推荐的截图对比命令示例:
137
+
138
+ ```sh
139
+ weapp-vite compare --project ./dist/build/mp-weixin --page pages/index/index --baseline .screenshots/baseline/index.png --diff-output .tmp/index.diff.png --max-diff-pixels 100 --json
140
+
141
+ # 等价写法
142
+ wv compare --project ./dist/build/mp-weixin --page pages/index/index --baseline .screenshots/baseline/index.png --diff-output .tmp/index.diff.png --max-diff-pixels 100 --json
143
+ ```
144
+
126
145
  ## DevTools 日志桥接
127
146
 
128
147
  `weapp-vite` 现在支持把微信开发者工具里的小程序 `console` 输出桥接到当前终端。
@@ -1,2 +1,2 @@
1
- import { a as ExternalMetadataFileCandidates, c as Resolver, d as ResolverObject, f as ResolverSupportFilesStrategy, i as CreateResolver, l as ResolverFn, n as VantResolver, o as Options, r as TDesignResolver, s as ResolvedValue, t as WeuiResolver, u as ResolverMeta } from "../index-CUFOUU8V.mjs";
1
+ import { a as ExternalMetadataFileCandidates, c as Resolver, d as ResolverObject, f as ResolverSupportFilesStrategy, i as CreateResolver, l as ResolverFn, n as VantResolver, o as Options, r as TDesignResolver, s as ResolvedValue, t as WeuiResolver, u as ResolverMeta } from "../index-hN5mdpQ_.mjs";
2
2
  export { CreateResolver, ExternalMetadataFileCandidates, Options, ResolvedValue, Resolver, ResolverFn, ResolverMeta, ResolverObject, ResolverSupportFilesStrategy, TDesignResolver, VantResolver, WeuiResolver };
@@ -1,4 +1,4 @@
1
- import { n as AutoRoutesSubPackage, t as AutoRoutes } from "./routes-o20IHwXa.mjs";
1
+ import { n as AutoRoutesSubPackage, t as AutoRoutes } from "./routes-DiEBrMtj.mjs";
2
2
 
3
3
  //#region src/auto-routes.d.ts
4
4
  declare const routes: AutoRoutes;
@@ -1,4 +1,4 @@
1
- import { i as getCompilerContext, l as getRouteRuntimeGlobalKeys } from "./createContext-3UhoQl2A.mjs";
1
+ import { i as getCompilerContext, u as getRouteRuntimeGlobalKeys } from "./createContext-BolxgJjC.mjs";
2
2
  //#region src/auto-routes.ts
3
3
  const ROUTE_RUNTIME_OVERRIDE_KEY = Symbol.for("weapp-vite.route-runtime");
4
4
  function createGetter(resolver) {