• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gatewayd-io / gatewayd-plugin-js / 22265106664
64%
main: 64%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v0.2.0
DEFAULT BRANCH: main
Ran 21 Feb 2026 09:59PM UTC
Jobs 1
Files 2
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Feb 2026 09:54PM UTC coverage: 64.151%. First build
22265106664

push

github

web-flow
Fix critical bugs, improve safety, and add tests/CI (#11)

* Fix critical bugs in plugin core

- Fix OnNewPool dispatching to "onConfigLoaded" instead of "onNewPool" (copy-paste bug)
- Fix OnTraffic swallowing error by returning nil instead of err
- Add sync.Mutex to protect Goja VM from concurrent access (not goroutine-safe)
- Use checked type assertion in RunFunction to prevent panics on unexpected JS return types
- Fix hardcoded "OnTrafficFromClient" in RunFunction error log to use actual function name

* Improve helper functions and replace deprecated dependency

- Add argument bounds checking to btoa, atob, and parseSQL to prevent
  panics when called with no arguments from JS
- Handle errors from base64 decode and SQL parse instead of silently
  discarding them; throw JS TypeErrors on invalid input
- Switch btoa/atob from RawStdEncoding to StdEncoding for browser
  compatibility (standard base64 with padding)
- Replace deprecated golang.org/x/exp/maps with stdlib maps/slices

* Fix copy-paste artifacts in plugin metadata

- Fix default metrics socket path from gatewayd-plugin-cache.sock to
  gatewayd-plugin-js.sock
- Update stale "Template plugin" description to reflect actual purpose

* Update GitHub Actions to latest versions

- actions/checkout v3 -> v4
- actions/setup-go v3 -> v5
- softprops/action-gh-release v1 -> v2

* Add CI workflow for testing and linting

- Add test.yaml workflow that runs on push/PR with golangci-lint,
  govulncheck, go test with coverage, and coveralls reporting
- Add .golangci.yaml configuration matching the cache plugin's style,
  with depguard rules for this project's dependencies

* Add comprehensive unit tests for plugin core

- Test RegisterFunction/RegisterFunctions with valid and missing JS functions
- Test RunFunction for success, not-found, JS error, and wrong return type
- Test GetHooks returns only registered (non-nil) hooks
- Test GetPluginConfig returns correct metadata
- Test all 21 hook methods pass t... (continued)

38 of 96 new or added lines in 2 files covered. (39.58%)

204 of 318 relevant lines covered (64.15%)

2.83 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
96.68
plugin/plugin.go
55
0.0
main.go
Jobs
ID Job ID Ran Files Coverage
1 22265106664.1 21 Feb 2026 09:59PM UTC 2
64.15
GitHub Action Run
Source Files on build 22265106664
  • Tree
  • List 2
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 73b850de on github
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc