Commit d6c4589
fix: load schema via require() for pkg/esbuild compat (#2396)
* 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>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding 'CodeQL / Assignment to constant'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Potential fix for pull request finding 'CodeQL / Unused variable, import, function or class'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* fix: remove unused schemaJson import causing CodeQL alerts
Agent-Logs-Url: https://github.com/github/gh-aw-firewall/sessions/f2ea8212-e983-4cfc-9d6f-8bee57e01657
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>1 parent 08cd698 commit d6c4589
2 files changed
Lines changed: 8 additions & 25 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 | | - | |
| 10 | + | |
24 | 11 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 12 | + | |
29 | 13 | | |
30 | | - | |
31 | | - | |
32 | 14 | | |
33 | 15 | | |
34 | 16 | | |
35 | 17 | | |
36 | | - | |
| 18 | + | |
37 | 19 | | |
38 | 20 | | |
39 | 21 | | |
| |||
0 commit comments