chore: update version to 2025.0.7, restore module entry in package.json, and simplify HttpMethod enum

This commit is contained in:
2025-08-20 13:22:33 -04:00
parent b12aef225a
commit 069c4bf405
4 changed files with 8 additions and 4 deletions

View File

@@ -1,7 +1,6 @@
{ {
"name": "@techniker-me/pcast-api", "name": "@techniker-me/pcast-api",
"version": "2025.0.6", "version": "2025.0.7",
"module": "dist/node/index.js",
"type": "module", "type": "module",
"scripts": { "scripts": {
"ci-build": "bun run build:node && bun run build:browser && bun run build:types", "ci-build": "bun run build:node && bun run build:browser && bun run build:types",
@@ -42,6 +41,7 @@
"dependencies": { "dependencies": {
"phenix-edge-auth": "1.2.7" "phenix-edge-auth": "1.2.7"
}, },
"module": "dist/node/index.js",
"main": "./dist/node/index.js", "main": "./dist/node/index.js",
"types": "./dist/types/index.d.ts", "types": "./dist/types/index.d.ts",
"exports": { "exports": {

View File

@@ -9,7 +9,6 @@ export class PCastApi {
private readonly _reporting: Reporting; private readonly _reporting: Reporting;
constructor(pcastUri: string, applicationCredentials: ApplicationCredentials) { constructor(pcastUri: string, applicationCredentials: ApplicationCredentials) {
// in `src/PCastApi.ts` constructor
const normalized = pcastUri.replace(/\/+$/, ''); const normalized = pcastUri.replace(/\/+$/, '');
this._pcastUri = normalized.endsWith('/pcast') ? normalized : `${normalized}/pcast`; this._pcastUri = normalized.endsWith('/pcast') ? normalized : `${normalized}/pcast`;

View File

@@ -1,4 +1,3 @@
// Replace entire file with simplified string enum
export enum HttpMethod { export enum HttpMethod {
GET = 'GET', GET = 'GET',
POST = 'POST', POST = 'POST',

View File

@@ -116,6 +116,12 @@ export class Channels {
throw new ChannelError('Invalid response format - missing channels data', 'INVALID_RESPONSE'); 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; return response.channels;
} }