From 069c4bf405ee021a8204a7031d2fdc75eb37196b Mon Sep 17 00:00:00 2001 From: Alexander Zinn Date: Wed, 20 Aug 2025 13:22:33 -0400 Subject: [PATCH] chore: update version to 2025.0.7, restore module entry in package.json, and simplify HttpMethod enum --- package.json | 4 ++-- src/PCastApi.ts | 1 - src/net/http/HttpMethod.ts | 1 - src/pcast/Channels.ts | 6 ++++++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6979cb3..dcc0a6c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,6 @@ { "name": "@techniker-me/pcast-api", - "version": "2025.0.6", - "module": "dist/node/index.js", + "version": "2025.0.7", "type": "module", "scripts": { "ci-build": "bun run build:node && bun run build:browser && bun run build:types", @@ -42,6 +41,7 @@ "dependencies": { "phenix-edge-auth": "1.2.7" }, + "module": "dist/node/index.js", "main": "./dist/node/index.js", "types": "./dist/types/index.d.ts", "exports": { diff --git a/src/PCastApi.ts b/src/PCastApi.ts index 13bc57b..c05b0ab 100644 --- a/src/PCastApi.ts +++ b/src/PCastApi.ts @@ -9,7 +9,6 @@ export class PCastApi { private readonly _reporting: Reporting; constructor(pcastUri: string, applicationCredentials: ApplicationCredentials) { - // in `src/PCastApi.ts` constructor const normalized = pcastUri.replace(/\/+$/, ''); this._pcastUri = normalized.endsWith('/pcast') ? normalized : `${normalized}/pcast`; diff --git a/src/net/http/HttpMethod.ts b/src/net/http/HttpMethod.ts index a4d244a..2d48a2e 100644 --- a/src/net/http/HttpMethod.ts +++ b/src/net/http/HttpMethod.ts @@ -1,4 +1,3 @@ -// Replace entire file with simplified string enum export enum HttpMethod { GET = 'GET', POST = 'POST', diff --git a/src/pcast/Channels.ts b/src/pcast/Channels.ts index 12e81c3..83c0348 100644 --- a/src/pcast/Channels.ts +++ b/src/pcast/Channels.ts @@ -116,6 +116,12 @@ export class Channels { throw new ChannelError('Invalid response format - missing channels data', 'INVALID_RESPONSE'); } + this._channelsByAlias.clear(); + + for (const channel of response.channels) { + this._channelsByAlias.set(channel.alias, channel); + } + return response.channels; }