Commit 8dffd53
committed
feat(builders): add platform/arch arguments and use socket-lib parseArgs
Changes:
- Update node-smol-builder to accept --platform= and --arch= arguments for cross-compilation
- Replace custom parseArgs functions with @socketsecurity/lib/argv/parse in both builders
- Update publish-socketbin.yml workflow to pass platform/arch to smol builder
- Add IS_WINDOWS constant and use TARGET_PLATFORM/TARGET_ARCH throughout smol builder
Benefits:
- Consistent argument parsing across all builders
- Support for cross-compilation in smol builder (matching SEA builder)
- Reduced code duplication with shared parseArgs utility
- Better validation and error handling from socket-lib parseArgs1 parent 6871d5a commit 8dffd53
File tree
3 files changed
+54
-69
lines changed- .github/workflows
- packages
- node-sea-builder/scripts
- node-smol-builder/scripts
3 files changed
+54
-69
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
| 132 | + | |
| 133 | + | |
134 | 134 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | 135 | | |
144 | | - | |
| 136 | + | |
| 137 | + | |
145 | 138 | | |
146 | 139 | | |
147 | 140 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 141 | + | |
| 142 | + | |
158 | 143 | | |
159 | | - | |
160 | | - | |
161 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
162 | 155 | | |
163 | 156 | | |
164 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
628 | 629 | | |
629 | 630 | | |
630 | 631 | | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | 632 | | |
666 | 633 | | |
667 | 634 | | |
668 | 635 | | |
669 | | - | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
670 | 646 | | |
671 | 647 | | |
672 | 648 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
156 | 171 | | |
157 | 172 | | |
158 | 173 | | |
| |||
304 | 319 | | |
305 | 320 | | |
306 | 321 | | |
307 | | - | |
308 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
309 | 325 | | |
310 | 326 | | |
311 | 327 | | |
| |||
963 | 979 | | |
964 | 980 | | |
965 | 981 | | |
966 | | - | |
| 982 | + | |
967 | 983 | | |
968 | 984 | | |
969 | 985 | | |
| |||
1770 | 1786 | | |
1771 | 1787 | | |
1772 | 1788 | | |
1773 | | - | |
| 1789 | + | |
1774 | 1790 | | |
1775 | 1791 | | |
1776 | 1792 | | |
| |||
0 commit comments