build: move larger scripts into tools dir in workspace (#10653)

Having the `scripts` dir re-use all packages from the top-level was
getting quite unwieldy. Created new `tools` directory that is part of
the workspace. Packages are exported with the `@tools` package
namespace.
This commit is contained in:
Elliot DeNolf
2025-01-20 11:34:51 -05:00
committed by GitHub
parent ef4b8d9b00
commit f18ca9cc2b
32 changed files with 448 additions and 262 deletions

View File

@@ -80,13 +80,13 @@ const app = nextImport({
const handle = app.getRequestHandler()
let resolveServer
let resolveServer: () => void
const serverPromise = new Promise((res) => (resolveServer = res))
const serverPromise = new Promise<void>((res) => (resolveServer = res))
void app.prepare().then(() => {
createServer(async (req, res) => {
const parsedUrl = parse(req.url, true)
const parsedUrl = parse(req.url || '', true)
await handle(req, res, parsedUrl)
}).listen(port, () => {
resolveServer()

View File

@@ -1,3 +1,4 @@
import { jest } from '@jest/globals'
import console from 'console'
global.console = console

View File

@@ -58,6 +58,7 @@
"@payloadcms/ui": "workspace:*",
"@sentry/nextjs": "^8.33.1",
"@sentry/react": "^7.77.0",
"@types/jest": "29.5.12",
"@types/react": "19.0.1",
"@types/react-dom": "19.0.1",
"babel-plugin-react-compiler": "19.0.0-beta-df7b47d-20241124",
@@ -69,6 +70,7 @@
"execa": "5.1.1",
"file-type": "19.3.0",
"http-status": "1.6.2",
"jest": "29.7.0",
"jwt-decode": "4.0.0",
"mongoose": "8.9.5",
"next": "15.1.5",