cardbuddy 0.24.0 → 0.25.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 +2 -2
- package/dist/init.js +9 -2
- package/dist/preview-editor/assets/{index-BumNBo-n.js → index-DL4ZCJCA.js} +13 -13
- package/dist/preview-editor/index.html +1 -1
- package/dist/skills-upgrade.js +59 -0
- package/dist/vendored/server/core/browser.js +7 -4
- package/dist/vendored/skills/dsl-card-generator/references/generation_pitfalls.md +1 -1
- package/dist/vendored/skills/mbank-design-gen/tools/screenshot.mjs +15 -7
- package/dist/vendored/skills/platform-card-sync/scripts/api_batch_sync.mjs +12 -4
- package/dist/vendored/skills/platform-session-navigator/scripts/package-lock.json +1 -16
- package/dist/vendored/skills/platform-session-navigator/scripts/package.json +2 -2
- package/dist/vendored/skills/platform-session-navigator/scripts/platform_login.mjs +12 -1
- package/dist/vendored/skills/platform-session-navigator/scripts/session-manager.mjs +1 -1
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -249,7 +249,7 @@ DSL_DEV_HTTPS=1 cardbuddy
|
|
|
249
249
|
| `GET /__node-models/:id` | 自包含 + 内嵌 Vite SSR | 节点 Property 树模型 |
|
|
250
250
|
| `GET /__import-meta/:id` | 自包含 | 导入侧车元数据 |
|
|
251
251
|
| `GET /__history` | 自包含 | 编辑历史 |
|
|
252
|
-
| `GET /__screenshot/:id` | 自包含(需
|
|
252
|
+
| `GET /__screenshot/:id` | 自包含(需 playwright-core + 系统 Chrome)| 无头截图 |
|
|
253
253
|
| `GET /__events` (SSE) | 自包含 | `cards-changed` 实时推送 |
|
|
254
254
|
| `POST /__code-bridge` | 自包含 | 代码桥:代码写临时 js 并拉起外部编辑器,返回 `{ id, file }` |
|
|
255
255
|
| `GET /__code-bridge/:id` | 自包含 | 代码桥:拉取外部保存后的最新代码(LF 归一) |
|
|
@@ -292,7 +292,7 @@ DSL_DEV_HTTPS=1 cardbuddy
|
|
|
292
292
|
3. 包内快照 `dist/vendored/skills/` —— 随 npm 包发布的全量技能库,没跑 `init` 也能只读兜底。
|
|
293
293
|
|
|
294
294
|
> 远端能力(同步 / 保存 / 切图上传)还需要 `.env.cb` 里的 `PLATFORM_BASE_URL` 等配置,
|
|
295
|
-
> 以及 `playwright
|
|
295
|
+
> 以及 `playwright-core`(本包普通依赖,`npm install` 即带上;免浏览器下载,浏览器走系统 Chrome)与一次远端登录。
|
|
296
296
|
> 写入类文件(凭据等)**永远落项目根**,不会写进 `node_modules`。
|
|
297
297
|
|
|
298
298
|
---
|
package/dist/init.js
CHANGED
|
@@ -251,8 +251,9 @@ npx cardbuddy skills upgrade --dry-run # 先看会动哪些文件(四类:
|
|
|
251
251
|
|
|
252
252
|
## 远端能力(可选)
|
|
253
253
|
|
|
254
|
-
同步 / 保存 / 切图上传需要已登录的远端会话与 \`playwright\`
|
|
255
|
-
|
|
254
|
+
同步 / 保存 / 切图上传需要已登录的远端会话与 \`playwright-core\`
|
|
255
|
+
(本工程 devDependencies 与 cardbuddy 依赖均已显式声明,\`npm install\` 即带上;
|
|
256
|
+
它是免浏览器下载的纯 JS API 包,浏览器走系统 Chrome + CDP)。凭据只落在本机
|
|
256
257
|
\`skills/platform-session-navigator/.local/credentials.json\`,已被 .gitignore 忽略。
|
|
257
258
|
`
|
|
258
259
|
}
|
|
@@ -281,6 +282,12 @@ function projectPackageJson(projectName, version) {
|
|
|
281
282
|
},
|
|
282
283
|
devDependencies: {
|
|
283
284
|
cardbuddy: `^${version}`,
|
|
285
|
+
// 远端同步技能脚本(platform_login.mjs 等)运行时必需。
|
|
286
|
+
// 必须是普通依赖显式声明:曾经的 playwright 是 cardbuddy 的
|
|
287
|
+
// optionalDependency,postinstall 下载浏览器失败时被 npm 静默跳过,
|
|
288
|
+
// 运行脚本才报 Cannot find package。playwright-core 免浏览器下载
|
|
289
|
+
//(浏览器走系统 Chrome + CDP),普通依赖安装失败会在 npm install 期直接报错。
|
|
290
|
+
'playwright-core': '^1.62.1',
|
|
284
291
|
},
|
|
285
292
|
},
|
|
286
293
|
null,
|