如果你用 Datasette Agent 做应用,这个版本能让代理自己打开页面跑测试,不用你手动开浏览器检查了。
datasette-apps 0.2a0 发布,针对 Datasette Agent 的创建和编辑流程做了改进。新增 app_debug() 工具,让代理在透明度为 0 的 iframe 中运行 JavaScript 测试应用。新增 app_list() 工具,列出用户有权限编辑的应用,便于代理直接修改。这两项功能依赖 datasette-agent 0.4a0 的 context.browser_task() 机制。
datasette-apps 0.2a0
Release: datasette-apps 0.2a0 Changes that improve Datasette Apps when created and edited using Datasette Agent : New app_debug() tool allowing agent to open an app (invisibly) and test it using JavaScript. #33 New app_list() tool for listing apps the user has permission to edit, so the agent can edit them. #36 The app_debug() tool is pretty neat: it works by displaying the app in a opacity: 0 iframe with pointer-events: none (so it can't be seen or interacted with) and then executing agent-provided JavaScript inside that sandboxed iframe. This means the agent can smoke test that the app is working and even do things like measure the dimensions of different elements. This uses the new context.browser_task() mechanism added in datasette-agent 0.4a0 . Tags: iframes , datasette , datasette-apps
- Greg Brockman07-31 19:52原文