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:
@@ -1,4 +1,3 @@
|
|||||||
# @techniker-me/pcast-api
|
# @techniker-me/pcast-api
|
||||||
|
|
||||||
WIP...
|
WIP...
|
||||||
|
|
||||||
|
|||||||
11
package.json
11
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@techniker-me/pcast-api",
|
"name": "@techniker-me/pcast-api",
|
||||||
"version": "2025.0.2",
|
"version": "2025.0.3",
|
||||||
"module": "src/index.ts",
|
"module": "src/index.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -13,18 +13,15 @@
|
|||||||
"build:node": "bun build src/index.ts --outdir dist/node --target node --format esm --minify --production",
|
"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:browser": "bun build src/index.ts --outdir dist/browser --target browser --format esm --minify --production",
|
||||||
"build:types": "tsc --outDir dist/types",
|
"build:types": "tsc --outDir dist/types",
|
||||||
"prepublishOnly": "bun run build",
|
|
||||||
"clean": "rm -rf dist"
|
"clean": "rm -rf dist"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bun": "latest",
|
"@types/bun": "latest",
|
||||||
"chai": "5.2.1",
|
"chai": "5.3.1",
|
||||||
"chai-as-promised": "8.0.1",
|
"chai-as-promised": "8.0.1",
|
||||||
"mocha": "11.7.1",
|
"mocha": "11.7.1",
|
||||||
"prettier": "3.6.2"
|
"prettier": "3.6.2",
|
||||||
},
|
"typescript": "5.9.2"
|
||||||
"peerDependencies": {
|
|
||||||
"typescript": "^5"
|
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export class HttpRequests {
|
|||||||
const abortSignal = abortController.signal;
|
const abortSignal = abortController.signal;
|
||||||
const requestOptions: RequestInit = {
|
const requestOptions: RequestInit = {
|
||||||
headers: this._baseHeaders,
|
headers: this._baseHeaders,
|
||||||
method: HttpMethod[method], // Convert enum to string
|
method,
|
||||||
signal: abortSignal,
|
signal: abortSignal,
|
||||||
...options
|
...options
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -104,11 +104,7 @@ export class Reporting {
|
|||||||
const requestPublishingOptions = {
|
const requestPublishingOptions = {
|
||||||
body: JSON.stringify({publishingReport: publishingReportOptions})
|
body: JSON.stringify({publishingReport: publishingReportOptions})
|
||||||
};
|
};
|
||||||
const response = await this._httpRequests.request<PublishingReportResponse>(
|
const response = await this._httpRequests.request<PublishingReportResponse>(HttpMethod.PUT, '/pcast/reporting/publishing', requestPublishingOptions);
|
||||||
HttpMethod.PUT,
|
|
||||||
'/pcast/reporting/publishing',
|
|
||||||
requestPublishingOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!response.publishingReport) {
|
if (!response.publishingReport) {
|
||||||
throw new Error('[Reporting] [requestPublishingReport] Invalid response format - missing publishingReport data');
|
throw new Error('[Reporting] [requestPublishingReport] Invalid response format - missing publishingReport data');
|
||||||
|
|||||||
@@ -28,4 +28,4 @@
|
|||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": ["test", "dist", "node_modules"]
|
"exclude": ["test", "dist", "node_modules"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user