New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@satorijs/satori

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@satorijs/satori - npm Package Compare versions

Comparing version 3.5.3 to 3.6.0-alpha.0

18

package.json
{
"name": "@satorijs/satori",
"description": "Core components of Satorijs",
"version": "3.5.3",
"version": "3.6.0-alpha.0",
"type": "module",

@@ -38,18 +38,6 @@ "main": "lib/index.cjs",

],
"devDependencies": {
"@types/parseurl": "^1.3.3"
},
"dependencies": {
"@satorijs/core": "3.5.3",
"@types/ws": "^8.5.10",
"file-type": "^16.5.4",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.2",
"koa": "^2.14.2",
"koa-bodyparser": "^4.4.1",
"parseurl": "^1.3.3",
"path-to-regexp": "^6.2.1",
"socks-proxy-agent": "^8.0.2",
"ws": "^8.14.2"
"@satorijs/core": "3.6.0-alpha.0",
"cosmokit": "^1.5.2"
}
}

@@ -1,55 +0,2 @@

import { Quester } from '@satorijs/core'
import { base64ToArrayBuffer } from 'cosmokit'
import { ClientRequestArgs } from 'http'
import { WebSocket } from 'ws'
import { basename } from 'path'
import { promises as fs } from 'fs'
import { fileURLToPath } from 'url'
import FileType from 'file-type'
import { HttpProxyAgent } from 'http-proxy-agent'
import { HttpsProxyAgent } from 'https-proxy-agent'
import { SocksProxyAgent } from 'socks-proxy-agent'
export * from '@satorijs/core'
export * from 'cosmokit'
const oldFile = Quester.prototype.file
Quester.prototype.file = async function file(this: Quester, url: string) {
// for backward compatibility
if (url.startsWith('base64://')) {
const data = base64ToArrayBuffer(url.slice(9))
const result = await FileType.fromBuffer(data)
const filename = 'file' + (result ? '.' + result.ext : '')
return { mime: result?.mime, filename, data }
}
if (url.startsWith('file://')) {
const data = await fs.readFile(fileURLToPath(url))
const result = await FileType.fromBuffer(data)
return { mime: result?.mime, filename: basename(url), data }
}
return oldFile.call(this, url)
}
Quester.prototype.ws = function ws(this: Quester, url: string, options: ClientRequestArgs = {}) {
return new WebSocket(this.resolve(url), {
agent: this.agent(this.config.proxyAgent),
handshakeTimeout: this.config.timeout,
...options,
headers: {
...this.config.headers,
...options.headers,
},
})
}
const _prepare = Quester.prototype.prepare
Quester.prototype.prepare = function prepare(this: Quester) {
const options = _prepare.call(this)
options.httpAgent = this.agent(this.config.proxyAgent)
options.httpsAgent = this.agent(this.config.proxyAgent)
return options
}
Quester.defineAgent(['http'], HttpProxyAgent)
Quester.defineAgent(['https'], HttpsProxyAgent)
Quester.defineAgent(['socks', 'socks4', 'socks4a', 'socks5', 'socks5h'], SocksProxyAgent)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc