Compare commits

...

3 commits

Author SHA1 Message Date
Traines
785f5fcc37 add checks back to release, fix readme
[skip ci]
2025-10-24 20:16:32 +00:00
Traines
ca6ceabbed fix bestprice for db profile 2025-10-24 19:40:50 +00:00
Jannis
d0120439e6
chore: CI: publish to npm using OIDC tokens (#36)
Some checks failed
test / lint-and-spellcheck (push) Has been cancelled
test / unit-tests (18.x) (push) Has been cancelled
test / unit-tests (20.x) (push) Has been cancelled
test / unit-tests (22.x) (push) Has been cancelled
test / integration-tests (18.x) (push) Has been cancelled
test / integration-tests (20.x) (push) Has been cancelled
test / integration-tests (22.x) (push) Has been cancelled
test / e2e-tests (18.x) (push) Has been cancelled
see also https://docs.npmjs.com/trusted-publishers
2025-10-22 20:44:53 +02:00
5 changed files with 15 additions and 8 deletions

View file

@ -10,6 +10,9 @@ env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions:
id-token: write # for OIDC-based publishing to npm
jobs:
build-and-push-docker:
runs-on: ubuntu-latest
@ -53,7 +56,9 @@ jobs:
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
# for OIDC-based publishing to npm
- name: setup npm v11
run: npm install -g npm@11
- run: npm ci
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View file

@ -4,6 +4,7 @@ import {products} from '../../lib/products.js';
// journeys()
import {formatJourneysReq} from '../dbnav/journeys-req.js';
const {journeysEndpoint} = base;
const {bestpriceEndpoint} = base;
// refreshJourneys()
import {formatRefreshJourneyReq} from '../dbnav/journeys-req.js';
@ -39,6 +40,7 @@ const profile = {
formatJourneysReq,
journeysEndpoint,
bestpriceEndpoint,
formatRefreshJourneyReq,
refreshJourneysEndpointTickets, refreshJourneysEndpointPolyline,

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "db-vendo-client",
"version": "6.10.4",
"version": "6.10.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "db-vendo-client",
"version": "6.10.4",
"version": "6.10.5",
"license": "ISC",
"dependencies": {
"content-type": "^1.0.5",

View file

@ -1,7 +1,7 @@
{
"name": "db-vendo-client",
"description": "Client for bahn.de public transport APIs.",
"version": "6.10.4",
"version": "6.10.5",
"type": "module",
"main": "index.js",
"files": [
@ -95,7 +95,7 @@
"test-e2e": "VCR_OFF=true tap -t60 -j16 test/e2e/*.js",
"test-spelling": "cspell .",
"test": "npm run test-unit && npm run test-integration && npm run test-spelling",
"prepublishOnly": "npm run lint",
"prepublishOnly": "npm run lint && npm test",
"api": "node api.js"
},
"tap": {

View file

@ -25,7 +25,7 @@ Depending on the configured profile, db-vendo-client will use multiple different
| Profile | `db` | `dbnav` | `dbweb` | `dbris` |
| ------------- | ------------- | ------------- | ------------- | ------------- |
| no API key required | ✅ | ✅ | ✅ | ✅ | ❌ |
| no API key required | ✅ | ✅ | ✅ | ❌ |
| all above endpoints supported | ✅ | ✅ | except `stop()` | only boards |
| duration for boards | always 1h | always 1h | always 1h | up to 12h |
| remarks | for boards only most important remarks | for boards only most important remarks | all remarks on boards and journeys | all remarks |
@ -37,7 +37,7 @@ Depending on the configured profile, db-vendo-client will use multiple different
| adminCode/operator | only for journeys | only for journeys | only operator | ✅ |
| stopovers | not in boards | not in boards | ✅ | ✅ |
| assumed backend API stability | less stable | more stable | less stable | more stable |
| quotas | 60 requests per minute (IPv4) | 60 requests per minute (IPv4), possibly aggressive blocking | aggressive blocking (IPv4/IPv6) | depends on API key |
| quotas | 60 requests per minute (IPv4), current backend possibly shut off soon | 60 requests per minute (IPv4), possibly aggressive blocking | aggressive blocking (IPv4/IPv6) | depends on API key |
> [!IMPORTANT]