@ejnshtein/nyaasi
Advanced tools
Comparing version 2.1.1 to 2.1.2
{ | ||
"name": "@ejnshtein/nyaasi", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Nyaa.si api wrapper for Node written in Typescript", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"scripts": { | ||
@@ -8,0 +8,0 @@ "build-ts": "tsc", |
@@ -62,25 +62,2 @@ import request, { RequestOptions, RequestResult } from '@ejnshtein/smol-request' | ||
const cookieToString = (cookie: Cookie) => | ||
Object.entries(cookie) | ||
.map(([name, value]) => { | ||
switch (name) { | ||
case 'expires': { | ||
return `Expires=${value.toGMTString()}` | ||
} | ||
case 'domain': { | ||
return `Domain=${value}` | ||
} | ||
case 'httponly': { | ||
return 'HttpOnly' | ||
} | ||
case 'path': { | ||
return `Path=${value}` | ||
} | ||
default: { | ||
return `${name}=${value}` | ||
} | ||
} | ||
}) | ||
.join('; ') | ||
export class Agent { | ||
@@ -87,0 +64,0 @@ host: string |
@@ -10,2 +10,3 @@ import cheerio from 'cheerio' | ||
} from './types/nyaa' | ||
import { URL } from 'url' | ||
@@ -12,0 +13,0 @@ export const getCSRFToken = (html: string): string => { |
@@ -5,6 +5,9 @@ { | ||
"target": "es2015", | ||
"lib": ["ES6"], | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"outDir": "./dist" | ||
"outDir": "./dist", | ||
"moduleResolution": "node", | ||
"types": ["node"] | ||
}, | ||
@@ -11,0 +14,0 @@ "include": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1
25551
15
827