diff --git a/package-lock.json b/package-lock.json index 14b68ed..2a6f821 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "next": "14.2.4", "next-auth": "^5.0.0-beta.20", "prettier-plugin-tailwindcss": "^0.6.5", + "puppeteer": "^23.11.0", "puppeteer-core": "^23.11.0", "react": "^18", "react-device-detect": "^2.2.3", @@ -9894,7 +9895,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true, "engines": { "node": ">=6" } @@ -18272,6 +18272,26 @@ "node": ">=6" } }, + "node_modules/puppeteer": { + "version": "23.11.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.11.0.tgz", + "integrity": "sha512-UaHfTIcg02bTahmZjrjrpU8efyjNeItrNvANu+DdnYMEcQ24X8LOkBWv2Z4bqDzkOzFymqJkADS0bdSDMUNi1A==", + "hasInstallScript": true, + "dependencies": { + "@puppeteer/browsers": "2.6.1", + "chromium-bidi": "0.11.0", + "cosmiconfig": "^9.0.0", + "devtools-protocol": "0.0.1367902", + "puppeteer-core": "23.11.0", + "typed-query-selector": "^2.12.0" + }, + "bin": { + "puppeteer": "lib/cjs/puppeteer/node/cli.js" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/puppeteer-core": { "version": "23.11.0", "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.11.0.tgz", @@ -18309,6 +18329,31 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node_modules/puppeteer/node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/pure-rand": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", diff --git a/package.json b/package.json index 77c78cd..286b459 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "next": "14.2.4", "next-auth": "^5.0.0-beta.20", "prettier-plugin-tailwindcss": "^0.6.5", + "puppeteer": "^23.11.0", "puppeteer-core": "^23.11.0", "react": "^18", "react-device-detect": "^2.2.3", diff --git a/src/app/board/api/screenshot/route.ts b/src/app/board/api/screenshot/route.ts index 1c22451..fc33608 100644 --- a/src/app/board/api/screenshot/route.ts +++ b/src/app/board/api/screenshot/route.ts @@ -1,5 +1,5 @@ import { NextResponse } from 'next/server' -import puppeteer from 'puppeteer-core' +import puppeteer from 'puppeteer' export async function POST(request: Request) { const { boardId, polaroids }: { boardId: string; polaroids: string[] } =