chore: update version to 2025.0.7, restore module entry in package.json, and simplify HttpMethod enum
This commit is contained in:
@@ -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": {
|
||||
|
||||
@@ -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`;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// Replace entire file with simplified string enum
|
||||
export enum HttpMethod {
|
||||
GET = 'GET',
|
||||
POST = 'POST',
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user