npm package reports / @ai-sdk/gateway
What ships in @ai-sdk/gateway?
@ai-sdk/gateway@4.0.150 ships 74 files, including 2 source map files.
“The Gateway provider for the [AI SDK](https://ai-sdk.dev/docs) allows the use of a wide variety of AI models and providers.”
Findings
- 1×Source map embeds full original source
dist/index.js.mapAnyone can rebuild your original, unminified source from this file. Remove it from the release. - 1×Source map published
dist/index.d.ts.mapSource maps expose original file names and structure, and can reconstruct source. Strip *.map from release builds or upload them privately to your error tracker.
1. Append to .npmignore# source maps
*.map2. Verify before publishingnpm pack --dry-run --json | jq -r '.[0].files[].path' | grep -E '(^|/)[^/]*\.map$' || echo "clean"- If package.json has a "files" field, npm ignores .npmignore. Narrow "files" instead, e.g. "files": ["dist", "!dist/**/*.map"].
- A new .npmignore replaces .gitignore for npm. Copy over anything from .gitignore you still want excluded.
- Or stop emitting maps for release builds: "sourceMap": false in tsconfig, or your bundler's equivalent.
Is a shipped source map a problem?
It depends. If the package is open source, the original code is public anyway, and the maps just add install size and can help with debugging. For proprietary or closed-source packages it's a real leak: a source map with sourcesContent lets anyone rebuild the original, unminified code, including comments and internal file names. This is how a major AI CLI's full source was exposed through npm in 2026.
Keep it this way: check every release in CI
This report covers one published version. ReleaseShield runs on every publish. It scans the exact tarball (npm pack), wheel or Docker image your pipeline builds and fails the release before anything unexpected reaches the registry.
# .github/workflows/release.yml
- uses: my2ctyw8h6-hash/release-shield@v1
with:
fail-on: high
env:
RELEASESHIELD_TOKEN: ${{ secrets.RELEASESHIELD_TOKEN }}See plans: from $19/mo Re-scan @ai-sdk/gateway live
Maintainer? Show it in your README
The badge reflects the latest automated scan of the published tarball and refreshes on its own.
[](https://release-shield-app.vercel.app/npm/@ai-sdk/gateway?ref=badge)Other package reports
@ai-sdk/provider · chalk · @octokit/types · @inquirer/figures · progress · cli-truncate · fast-string-width · @inquirer/prompts · import-local · ansis · uglify-js · supports-hyperlinks
Automated heuristic scan of the public tarball for @ai-sdk/gateway@4.0.150, run on 2026-11-19. Findings describe file contents and are not a judgment of the package's security or its maintainers; many are intentional. Maintainer and want this report removed or refreshed? Open an issue at github.com/my2ctyw8h6-hash/release-shield.