Commit 24b3cce
fix: load schema via require() for pkg/esbuild compat
The release binary failed because pkg couldn't find awf-config-schema.json
at runtime — the fs.readFileSync approach didn't work in pkg's snapshot
filesystem. Switch to require() which both esbuild (inlines into bundle)
and pkg (includes in snapshot via static analysis) handle natively.
Also add dist/awf-config-schema.json to pkg.assets as a fallback.
Fixes: Release workflow 'Smoke test binary (x64)' failure
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 08cd698 commit 24b3cce
2 files changed
Lines changed: 7 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 10 | + | |
29 | 11 | | |
30 | 12 | | |
31 | 13 | | |
32 | 14 | | |
33 | 15 | | |
34 | 16 | | |
35 | 17 | | |
36 | | - | |
| 18 | + | |
37 | 19 | | |
38 | 20 | | |
39 | 21 | | |
| |||
0 commit comments