Summary
The canvas:a2ui:bundle script currently uses bash scripts/bundle-a2ui.sh command, which is not friendly for Windows development environments and prevents successful builds on Windows. This limits the project's cross-platform development capabilities.
Proposed solution
Migrate the canvas:a2ui:bundle script from a bash script to a Node.js script, enabling it to run on all platforms (including Windows, macOS, and Linux).
Specific change:
"canvas:a2ui:bundle": "node --import tsx scripts/bundle-a2ui.ts",
This would require creating a TypeScript/JavaScript version of bundle-a2ui.ts to replace the existing bash script.
Alternatives considered
- Use cross-platform shell scripting tools: Such as PowerShell scripts or configuring WSL (Windows Subsystem for Linux), but this would increase development environment configuration complexity.
- Maintain the current approach: But this excludes Windows developers and limits the project's contributor pool.
- Use third-party build tools: Such as using Rollup or ESBuild APIs, but this might add unnecessary dependencies and complexity.
Additional context
- Currently running
pnpm build on Windows fails because bash scripts cannot be executed directly in Windows Command Prompt or PowerShell.
- The project already extensively uses Node.js scripts (e.g.,
scripts/ui.js, scripts/protocol-gen.ts), indicating that Node.js scripts are the preferred cross-platform solution for the project.
- Migrating to a Node.js script will ensure all developers can build the project regardless of their operating system, improving the project's accessibility.
Summary
The
canvas:a2ui:bundlescript currently usesbash scripts/bundle-a2ui.shcommand, which is not friendly for Windows development environments and prevents successful builds on Windows. This limits the project's cross-platform development capabilities.Proposed solution
Migrate the
canvas:a2ui:bundlescript from a bash script to a Node.js script, enabling it to run on all platforms (including Windows, macOS, and Linux).Specific change:
This would require creating a TypeScript/JavaScript version of
bundle-a2ui.tsto replace the existing bash script.Alternatives considered
Additional context
pnpm buildon Windows fails because bash scripts cannot be executed directly in Windows Command Prompt or PowerShell.scripts/ui.js,scripts/protocol-gen.ts), indicating that Node.js scripts are the preferred cross-platform solution for the project.