← Back to PRs

#19905: build: replace bash script with cross-platform node script for a2ui bundling

by luolin-ai open 2026-02-18 08:54 View on GitHub →
docs app: web-ui cli scripts commands agents size: XL
### Problem The `canvas:a2ui:bundle` command failed on Windows because it tried to run a [.sh](cci:7://file:///k:/github/GitHub/openclawWeComzh/scripts/bundle-a2ui.sh:0:0-0:0) script. ### Solution Converted the A2UI bundle script to a cross-platform Node.mjs script. ### Changes - **NEW**: [scripts/bundle-a2ui.mjs](cci:7://file:///k:/github/GitHub/openclawWeComzh/scripts/bundle-a2ui.mjs:0:0-0:0) - **DELETE**: [scripts/bundle-a2ui.sh](cci:7://file:///k:/github/GitHub/openclawWeComzh/scripts/bundle-a2ui.sh:0:0-0:0) - **MODIFY**: [package.json](cci:7://file:///k:/github/GitHub/openclawWeComzh/package.json:0:0-0:0) - **MODIFY**: [AGENTS.md](cci:7://file:///k:/github/GitHub/openclawWeComzh/AGENTS.md:0:0-0:0) ### Verification - Verified by running `pnpm canvas:a2ui:bundle` on Windows. <!-- greptile_comment --> <h3>Greptile Summary</h3> Replaces the bash-only `scripts/bundle-a2ui.sh` with a cross-platform `scripts/bundle-a2ui.mjs` Node script, fixing the `canvas:a2ui:bundle` command on Windows. - The new Node script faithfully reproduces the original logic: source existence checks, SHA-256 content hashing for incremental builds, `tsc` + `rolldown` invocations, and hash file caching - Hash computation is identical between old and new scripts, so existing `.bundle.hash` files remain valid - `package.json` command updated from `bash scripts/bundle-a2ui.sh` to `node scripts/bundle-a2ui.mjs` - `AGENTS.md` reference updated accordingly; no stale references remain - The old bash script is properly deleted <h3>Confidence Score: 4/5</h3> - This PR is safe to merge — it is a straightforward, faithful port of a bash script to Node.js with no logic changes. - The new Node script faithfully mirrors the original bash script's logic. Hash computation is identical (no forced rebuilds). All references to the old script have been updated. The change has been verified on Windows per the PR description. - No files require special attention. <sub>Last reviewed commit: f2b903a</sub> <!-- greptile_other_comments_section --> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs