
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
anyxml-meta-data
Advanced tools
This repository is mainly used to collect metadata of mini-program templates for the use of editor plugins to assist in coding.
本仓库主要用于收集小程序模板的元数据,以供编辑器插件使用辅助编码。
所有数据来源都是基于公开渠道获取的。
TODO: data- 属性所有小程序都通用 自定义属性,组件上触发的事件时,会发送给事件处理函数
git submodule update --init --recursive
将源 html 代码原封不动下载到 data/wechat/html
node src/wechat/generate.mjs 1
因为要交给大模型来生成 json 元数据,大模型对 markdown 识别更准点,但 markdown 对嵌套的 table 支持不友好,所以需要先将 html 中的嵌套 table 给打平了。
最终生成的代码保存在 data/wechat/html2 中。
另外,此步也会将文档中 a 标签的相对链接替换成绝对链接。
node src/wechat/generate.mjs 2
注意检查控制台输出的参数是否符合预期,一会会输出下面两种结构(如果不是,则要注意下了):
$ { zone: '# 通用属性', name: 'worklet:ongesture', label: 'eventhandler 回调参数' }
$ { zone: '# 通用属性', name: 'referrer-policy', label: '合法值' }
node src/wechat/generate.mjs 3
运行命令会将【属性】相关的标题及其子标题输出在控制台上,注意查看是否符合预期,一般应该会出现下面内容:
$ # 通用属性
$ # Skyline 特有属性
$ # WebView 特有属性
$ # 通用属性
$ # 错误码信息与解决方案表
src/wechat/prompts.md 塞给大模型,然后用 gen/wechat/*/attrs.md 提问获取答案后可以再执行 node src/wechat/check.mjs 脚本去校验结果
数据量比较大,可以写脚本自动去大模型上问答
node src/wechat/merge.mjs
cd data/alipay
git log # 记录本地最新一次提交(方便后续拉下代码来了之后比对有哪些变更)
git checkout main && git fetch
git diff origin/main # 和远程分支比较,看主要更新了哪些内容(方便后续看是否要手动处理)
git pull origin main # 更新本地代码
cd -
node src/alipay/generate.mjs
git diff # 查看通用组件的更新,如果有更新 attrs,可以按以下流程继续,否则可以结束
打开一个大模型聊天界面,将 src/alipay/prompts.md 中的内容喂给它,然后读取出它返回的 json 塞到 attrs.json 中。
注意,当有 attrs.md 中多个 table 时,大模型填充的数据不一定准确,有时需要手动处理。
最后,可以运行下面脚本检查下生成的结果是不是都符合预期:
node src/alipay/check.mjs
没有灵活的方案,需要用第一步查到的上一次处理时的 commit id 和最新的比,判断下是否有相关文件更新了,然后人肉处理
node src/alipay/merge.mjs
FAQs
This repository is mainly used to collect metadata of mini-program templates for the use of editor plugins to assist in coding.
We found that anyxml-meta-data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.