@baichen_yu/mcp-guard 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -174,8 +174,9 @@ jobs:
174
174
 
175
175
  - On each push to `main`, `.github/workflows/release.yml` now:
176
176
  - runs lint/test/build
177
- - bumps patch version automatically
178
- - creates a GitHub Release with generated release notes
177
+ - computes the next available version above local and npm latest
178
+ - builds release assets (package tarball + compiled `dist` archive)
179
+ - creates/updates a GitHub Release with GitHub generated (auto/AI-style) release notes + uploaded assets
179
180
  - publishes the new package to npm (requires `NPM_TOKEN`)
180
181
  - For npm publishing in CI, set `NPM_TOKEN` to an **npm Automation token** (no interactive password/OTP required).
181
182
 
@@ -214,10 +215,10 @@ Wrap `--stdio` values in double quotes.
214
215
 
215
216
  ## Release helper
216
217
 
217
- Build release artifacts locally:
218
+ Build release artifacts locally/offline (after one online `npm ci`):
218
219
 
219
220
  ```bash
220
- ./scripts/build-release-local.sh
221
+ npm run release:offline
221
222
  ```
222
223
 
223
224
  ---
@@ -231,3 +232,10 @@ Build release artifacts locally:
231
232
  ## License
232
233
 
233
234
  MIT. See [LICENSE](LICENSE).
235
+
236
+
237
+ ### npm package run check
238
+
239
+ ```bash
240
+ npm run npm:test-run
241
+ ```
package/docs/releasing.md CHANGED
@@ -44,10 +44,11 @@ Then create a GitHub Release and include:
44
44
  On pushes to `main`, `.github/workflows/release.yml` will:
45
45
 
46
46
  1. Run `npm run lint`, `npm test`, and `npm run build`.
47
- 2. Bump patch version via `npm version patch`.
47
+ 2. Compute the next available version above both local `package.json` and npm latest, then bump to that version.
48
48
  3. Push commit + tag back to GitHub.
49
- 4. Publish to npm with provenance.
50
- 5. Create GitHub Release with generated release notes.
49
+ 4. Build release assets (`npm pack` tarball + compiled `dist` archive).
50
+ 5. Publish to npm with provenance.
51
+ 6. Create/update a GitHub Release with generated release notes and uploaded assets.
51
52
 
52
53
  Required secret: `NPM_TOKEN` with publish permission for `@baichen_yu/mcp-guard`.
53
54
 
@@ -56,3 +57,28 @@ Use an **npm Automation token** (recommended) so the workflow can publish withou
56
57
  - npm: create token at <https://www.npmjs.com/settings/tokens>
57
58
  - GitHub: add it as repository secret `NPM_TOKEN`
58
59
  - workflow preflight runs `npm whoami` to confirm auth before version bump/publish
60
+
61
+
62
+ ## Offline release package build
63
+
64
+ After dependencies are installed once (`npm ci` while online), you can build the release tarball completely offline:
65
+
66
+ ```bash
67
+ npm run release:offline
68
+ ```
69
+
70
+ If `node_modules` is missing, the script exits with guidance.
71
+
72
+ ## npm package test-run command
73
+
74
+ Use this to verify the published package entrypoint works:
75
+
76
+ ```bash
77
+ npm run npm:test-run
78
+ ```
79
+
80
+
81
+ The workflow also supports manual trigger via `workflow_dispatch` in GitHub Actions.
82
+
83
+
84
+ If a release tag already exists (for example, from a re-run), the workflow updates that release and re-uploads assets with `--clobber` instead of failing.
package/docs/testing.md CHANGED
@@ -56,3 +56,12 @@ node fixtures/servers/sse-mcp-server/server.cjs
56
56
  # new terminal
57
57
  node dist/cli.js audit --sse "http://127.0.0.1:4013/sse" --sse-post "http://127.0.0.1:4013/message" --out reports --fail-on off
58
58
  ```
59
+
60
+
61
+ ## Published npm package smoke test
62
+
63
+ ```bash
64
+ npm run npm:test-run
65
+ ```
66
+
67
+ This executes the package from npm and prints CLI help to verify install/entrypoint integrity.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baichen_yu/mcp-guard",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Security auditing and policy gating for MCP servers (STDIO/HTTP) with Markdown + SARIF reports",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,7 +20,9 @@
20
20
  "docs:dev": "vitepress dev docs",
21
21
  "docs:build": "vitepress build docs",
22
22
  "docs:preview": "vitepress preview docs",
23
- "prepublishOnly": "npm run lint && npm test"
23
+ "prepublishOnly": "npm run lint && npm test",
24
+ "release:offline": "bash scripts/build-release-local.sh",
25
+ "npm:test-run": "PKG=$(npm pack --silent | tail -n 1) && npx --yes --package \"./$PKG\" mcp-guard --help && rm -f \"$PKG\""
24
26
  },
25
27
  "dependencies": {
26
28
  "commander": "^12.1.0",