Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cardserver

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cardserver - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

22

cardserver.js

@@ -32,15 +32,19 @@ #!/usr/bin/env node

const result = await page.goto(url)
await page.evaluateHandle('document.fonts.ready')
const status = result.status()
try {
const result = await page.goto(url)
res.status(status)
await page.evaluateHandle('document.fonts.ready')
if (!result.ok()) {
if (!result.ok()) {
res.status(result.status())
return res.send()
}
const screenshot = await page.screenshot({ path: imagePath })
serve(screenshot, res)
} catch (err) {
res.status(502)
return res.send()
}
const screenshot = await page.screenshot({ path: imagePath })
serve(screenshot, res)
})

@@ -47,0 +51,0 @@ }

{
"name": "cardserver",
"version": "2.1.0",
"version": "2.1.1",
"description": "A simple social media card renderer written using Puppeteer – screenshot card-like webpages on-the-fly",

@@ -5,0 +5,0 @@ "main": "cardserver.js",

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