@sonnechasser/ntrp 1.8.1 → 2.0.1
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 +63 -0
- package/dist/index.js +1166 -693
- package/dist/mcp/server.js +7346 -6814
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -145,6 +145,69 @@ Checkout URL overrides (optional):
|
|
|
145
145
|
- `NTRP_CHECKOUT_URL` — signup / first-run
|
|
146
146
|
- `NTRP_UPGRADE_URL` — Pro upgrade (`/upgrade`)
|
|
147
147
|
|
|
148
|
+
## Release Process
|
|
149
|
+
|
|
150
|
+
How a new version of `@sonnechasser/ntrp` reaches npm today. This is a reference for release review — it does not change how releases work.
|
|
151
|
+
|
|
152
|
+
### What triggers a release
|
|
153
|
+
|
|
154
|
+
A maintainer (or their assistant, acting on the maintainer's explicit version approval) runs `node scripts/release-ntrp.mjs X.Y.Z`. That script:
|
|
155
|
+
|
|
156
|
+
1. Bumps `package.json` / `package-lock.json` to `X.Y.Z`.
|
|
157
|
+
2. Commits `Release X.Y.Z` on `main` and pushes it.
|
|
158
|
+
3. Creates and pushes the git tag `vX.Y.Z`.
|
|
159
|
+
4. Waits for GitHub Actions and reports the result.
|
|
160
|
+
|
|
161
|
+
Pushing that `v*` tag is the trigger. The script never runs `npm publish` itself.
|
|
162
|
+
|
|
163
|
+
### What must be true first
|
|
164
|
+
|
|
165
|
+
- `main` is green and the release commit is on `main` — a tag publishes with the workflow file **as of the tagged commit**, so any workflow fix has to land on `main` before the tag is cut.
|
|
166
|
+
- The version does not already exist on npm. The script stops rather than republish.
|
|
167
|
+
- `X.Y.Z` is higher than the current `package.json` version (unless the tag already exists and only the publish needs retrying).
|
|
168
|
+
- The working tree is clean.
|
|
169
|
+
|
|
170
|
+
The exact version number is Dan's call. Naming the version is the approval to ship; nothing publishes without it.
|
|
171
|
+
|
|
172
|
+
### What GitHub Actions does automatically
|
|
173
|
+
|
|
174
|
+
`.github/workflows/publish-npm.yml` runs on any pushed `v*` tag (and can be re-dispatched manually for a tag that was pushed but never published, without moving the tag). It:
|
|
175
|
+
|
|
176
|
+
- Checks out the tagged commit.
|
|
177
|
+
- Uses **Node 22** — pinned because DuckDB's native binding has no Node 24 prebuild.
|
|
178
|
+
- Upgrades the npm CLI to `>= 11.5.1`, which trusted publishing requires.
|
|
179
|
+
- Runs `npm ci`, confirms the DuckDB binding loads, and builds.
|
|
180
|
+
- Runs the pre-publish checks `npm run test:publish-pack` (tarball contents) and `npm run test:publish-workflow` (workflow contract).
|
|
181
|
+
- Publishes with `npm publish --access public` using **npm trusted publishing over OIDC**. There is no `NPM_TOKEN` secret in this repo, and none should ever be added.
|
|
182
|
+
|
|
183
|
+
CI is the DuckDB test gate; the publish job does not repeat the full smoke suite.
|
|
184
|
+
|
|
185
|
+
### Publishing never happens outside GitHub Actions
|
|
186
|
+
|
|
187
|
+
`npm publish` must never be run from Slack, Cursor, Devin, any agent shell, or a laptop. The only path to npm is the tag-triggered GitHub Actions workflow, after Dan has approved the exact version.
|
|
188
|
+
|
|
189
|
+
### One-time npm Trusted Publisher setup
|
|
190
|
+
|
|
191
|
+
This flow depends on one piece of configuration outside the repo. On [npmjs.com](https://www.npmjs.com) → `@sonnechasser/ntrp` → **Settings** → **Trusted Publisher** → **GitHub Actions**:
|
|
192
|
+
|
|
193
|
+
| Field | Value |
|
|
194
|
+
|---|---|
|
|
195
|
+
| Organization or user | `sonnechasser` |
|
|
196
|
+
| Repository | `ntrp-cli-v2` |
|
|
197
|
+
| Workflow filename | `publish-npm.yml` (filename only, not the full path) |
|
|
198
|
+
| Allowed actions | `npm publish` |
|
|
199
|
+
|
|
200
|
+
The workflow must also exist on the default branch. These are configuration identifiers, not secrets.
|
|
201
|
+
|
|
202
|
+
### If a release fails
|
|
203
|
+
|
|
204
|
+
Do not create a second tag. Check whether the tag was pushed and whether npm has the version, then look at the two most likely causes:
|
|
205
|
+
|
|
206
|
+
- **DuckDB / Node version mismatch** — the publish run fails installing or loading `duckdb`. The tagged commit is running an old workflow that used Node 24. Get the Node 22 workflow onto `main`, then ship the next version.
|
|
207
|
+
- **Missing or misconfigured npm Trusted Publisher** — the publish step fails with a 404 or an authentication error. Re-check the four Trusted Publisher values above; the workflow filename in particular must match `publish-npm.yml` exactly.
|
|
208
|
+
|
|
209
|
+
If a tag exists but npm does not have that version, either re-dispatch the workflow for that tag from `main` (`gh workflow run publish-npm.yml --ref main -f ref=vX.Y.Z`) or ship the next version so the tagged commit includes the current workflow.
|
|
210
|
+
|
|
148
211
|
## Links
|
|
149
212
|
|
|
150
213
|
- **Website:** [ntrp.sonnechasser.com](https://ntrp.sonnechasser.com)
|