Fixed POST method and package scripts
This commit is contained in:
parent
9584cbc7cd
commit
8cd436f4ba
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "flaresolverr.js",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"description": "Api for bypassing cloudflare via dockered FlareSolverr",
|
||||
"files": [
|
||||
"dist",
|
||||
|
@ -31,12 +31,10 @@
|
|||
"cloudflare bypass"
|
||||
],
|
||||
"scripts": {
|
||||
"build:mjs": "rm -rf dist/mjs && tsc -p tsconfig.json",
|
||||
"build:cjs": "rm -rf dist/cjs && tsc -p tsconfig-cjs.json",
|
||||
"build": "rollup -c",
|
||||
"lint": "eslint --fix .",
|
||||
"format": "prettier --write src/** rollup.config.mjs",
|
||||
"prepublishOnly": "npm run lint && npm run build"
|
||||
"prepublishOnly": "npm run format && npm run lint && npm run build"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
|
|
|
@ -19,7 +19,7 @@ const rollupConfig = {
|
|||
entryFileNames: '[name].cjs',
|
||||
},
|
||||
],
|
||||
external: [ 'node:http' ],
|
||||
external: ['node:http'],
|
||||
plugins: [
|
||||
clean('dist'),
|
||||
eslint({
|
||||
|
|
|
@ -208,7 +208,7 @@ export class FlareSolverr {
|
|||
*/
|
||||
async post(options: IRequestPostOptions): Promise<IRequestAnswer> {
|
||||
return await this._makeRequest({
|
||||
cmd: 'request.get',
|
||||
cmd: 'request.post',
|
||||
...options,
|
||||
proxy:
|
||||
options.proxy === undefined
|
||||
|
|
|
@ -22,6 +22,7 @@ type TAPIMethodList = [
|
|||
'sessions.create',
|
||||
'sessions.destroy',
|
||||
'request.get',
|
||||
'request.post',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue