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:
11
package.json
11
package.json
@@ -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": {
|
||||
".": {
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user