Skip to content

@betterdb/agent 1.6.2

Choose a tag to compare

@KIvanow KIvanow released this 19 Sep 18:43
· 147 commits to master since this release
074c0d3

Fixed

  • Agent no longer crash-loops with Cannot find module '@betterdb/shared'. 1.5.0 through 1.6.1 shipped a build that left a bare require('@betterdb/shared') in the output, but @betterdb/shared is a private, unpublished package and was absent from the image and npm tarball, so the process exited at startup before doing any work. The agent is now bundled with esbuild, inlining @betterdb/shared into dist/index.js, so there is nothing to resolve at runtime. This affected both the Docker image and the npm package. (#465)

Changed

  • Self-contained esbuild build. @betterdb/shared is inlined; runtime deps (@aws-sdk/, @smithy/, iovalkey, ws, zod) stay external and installed normally, so they remain visible to vulnerability scanners in node_modules. Bundle size dropped from ~751 KB to ~81 KB.
  • Type-checking restored in CI. The build runs tsc --noEmit before bundling, so type errors are caught at PR time, not at release.
  • Docker image hardening. The production stage installs only runtime dependencies, drops the workspace dependency with a JSON-safe npm pkg delete (instead of an in-place sed), and runs a build-time smoke test of the entrypoint so a broken bundle fails the image build rather than shipping.