fix: remove unused code

* Update version to 2025.0.3, and remove unused code
* Upgrade chai to 5.3.1
* Streamline HTTP request method usage
This commit is contained in:
2025-08-18 19:04:03 -04:00
parent 06f71c60dd
commit 6ef0b5cf38
5 changed files with 7 additions and 15 deletions

View File

@@ -1,4 +1,3 @@
# @techniker-me/pcast-api
WIP...

View File

@@ -1,6 +1,6 @@
{
"name": "@techniker-me/pcast-api",
"version": "2025.0.2",
"version": "2025.0.3",
"module": "src/index.ts",
"type": "module",
"scripts": {
@@ -13,18 +13,15 @@
"build:node": "bun build src/index.ts --outdir dist/node --target node --format esm --minify --production",
"build:browser": "bun build src/index.ts --outdir dist/browser --target browser --format esm --minify --production",
"build:types": "tsc --outDir dist/types",
"prepublishOnly": "bun run build",
"clean": "rm -rf dist"
},
"devDependencies": {
"@types/bun": "latest",
"chai": "5.2.1",
"chai": "5.3.1",
"chai-as-promised": "8.0.1",
"mocha": "11.7.1",
"prettier": "3.6.2"
},
"peerDependencies": {
"typescript": "^5"
"prettier": "3.6.2",
"typescript": "5.9.2"
},
"exports": {
".": {

View File

@@ -31,7 +31,7 @@ export class HttpRequests {
const abortSignal = abortController.signal;
const requestOptions: RequestInit = {
headers: this._baseHeaders,
method: HttpMethod[method], // Convert enum to string
method,
signal: abortSignal,
...options
};

View File

@@ -104,11 +104,7 @@ export class Reporting {
const requestPublishingOptions = {
body: JSON.stringify({publishingReport: publishingReportOptions})
};
const response = await this._httpRequests.request<PublishingReportResponse>(
HttpMethod.PUT,
'/pcast/reporting/publishing',
requestPublishingOptions
);
const response = await this._httpRequests.request<PublishingReportResponse>(HttpMethod.PUT, '/pcast/reporting/publishing', requestPublishingOptions);
if (!response.publishingReport) {
throw new Error('[Reporting] [requestPublishingReport] Invalid response format - missing publishingReport data');