mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-11 12:57:46 +00:00
Compare commits
30 Commits
@vercel/py
...
@vercel-in
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45ae16e371 | ||
|
|
ce7e82fa7a | ||
|
|
e9026c7a69 | ||
|
|
a18ed98f2d | ||
|
|
09f1bbfa41 | ||
|
|
13efc4f04f | ||
|
|
08c5a9b0fc | ||
|
|
5349fb9181 | ||
|
|
2f51171a17 | ||
|
|
63c010a7f4 | ||
|
|
7128a65ccd | ||
|
|
d402c4350a | ||
|
|
f88afba733 | ||
|
|
ea5bc88062 | ||
|
|
eb06bd262b | ||
|
|
cb37ff2c89 | ||
|
|
2f5b0aeeb1 | ||
|
|
ab01608785 | ||
|
|
905c7b6ad4 | ||
|
|
717dd82c51 | ||
|
|
a4996e1c5a | ||
|
|
c147ead1bc | ||
|
|
2ab5ce5d90 | ||
|
|
33e43e103a | ||
|
|
3dbc75580d | ||
|
|
f6e863d4bb | ||
|
|
9f63ca60ad | ||
|
|
873327e9bd | ||
|
|
e3f9faf513 | ||
|
|
1a5bd6c5b9 |
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -91,7 +91,8 @@ jobs:
|
||||
VERCEL_TEST_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
|
||||
VERCEL_TEST_REGISTRATION_URL: ${{ secrets.VERCEL_TEST_REGISTRATION_URL }}
|
||||
FORCE_COLOR: '1'
|
||||
- name: 'Determing Turbo HIT or MISS'
|
||||
- name: 'Determine Turbo HIT or MISS'
|
||||
if: ${{ !cancelled() }}
|
||||
id: turbo-summary
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -102,7 +103,7 @@ jobs:
|
||||
if: matrix.runner != 'windows-latest'
|
||||
run: echo | openssl s_client -showcerts -servername 'api.vercel.com' -connect 76.76.21.21:443
|
||||
- name: 'Upload Test Report to Datadog'
|
||||
if: ${{ steps['turbo-summary'].outputs.misses != '0' }}
|
||||
if: ${{ steps['turbo-summary'].outputs.misses != '0' && !cancelled() }}
|
||||
run: 'npx @datadog/datadog-ci@2.18.1 junit upload --service vercel-cli .junit-reports'
|
||||
env:
|
||||
DATADOG_API_KEY: ${{secrets.DATADOG_API_KEY_CLI}}
|
||||
|
||||
620
examples/nextjs/package-lock.json
generated
620
examples/nextjs/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,17 +9,19 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": "20.6.3",
|
||||
"@types/react": "18.2.22",
|
||||
"@types/react-dom": "18.2.7",
|
||||
"autoprefixer": "10.4.15",
|
||||
"eslint": "8.49.0",
|
||||
"eslint-config-next": "13.5.2",
|
||||
"next": "13.5.2",
|
||||
"postcss": "8.4.30",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"tailwindcss": "3.3.3",
|
||||
"typescript": "5.2.2"
|
||||
"react": "latest",
|
||||
"react-dom": "latest",
|
||||
"next": "latest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "latest",
|
||||
"@types/react": "latest",
|
||||
"@types/node": "latest",
|
||||
"@types/react-dom": "latest",
|
||||
"autoprefixer": "latest",
|
||||
"postcss": "latest",
|
||||
"tailwindcss": "latest",
|
||||
"eslint": "latest",
|
||||
"eslint-config-next": "latest"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel-internals/types
|
||||
|
||||
## 1.0.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2f5b0aeeb`](https://github.com/vercel/vercel/commit/2f5b0aeeb183ed3ea8cbc68cb3bc3c949c486ada)]:
|
||||
- @vercel/build-utils@7.2.2
|
||||
|
||||
## 1.0.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@vercel-internals/types",
|
||||
"version": "1.0.11",
|
||||
"version": "1.0.12",
|
||||
"types": "index.d.ts",
|
||||
"main": "index.d.ts",
|
||||
"files": [
|
||||
@@ -10,7 +10,7 @@
|
||||
"dependencies": {
|
||||
"@types/node": "14.14.31",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"@vercel/routing-utils": "3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
"@typescript-eslint/eslint-plugin": "5.21.0",
|
||||
"@typescript-eslint/parser": "5.21.0",
|
||||
"@vercel/build-utils": "*",
|
||||
"@vercel/ncc": "0.24.0",
|
||||
"async-retry": "1.2.3",
|
||||
"buffer-replace": "1.0.0",
|
||||
"create-svelte": "2.0.1",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vercel/build-utils
|
||||
|
||||
## 7.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [cli] Update bun detection and add tests for projects with both bunlock binary and yarn.lock text files ([#10583](https://github.com/vercel/vercel/pull/10583))
|
||||
|
||||
## 7.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/build-utils",
|
||||
"version": "7.2.1",
|
||||
"version": "7.2.2",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.js",
|
||||
@@ -33,7 +33,6 @@
|
||||
"@types/semver": "6.0.0",
|
||||
"@types/yazl": "2.4.2",
|
||||
"@vercel/error-utils": "2.0.1",
|
||||
"@vercel/ncc": "0.24.0",
|
||||
"aggregate-error": "3.0.1",
|
||||
"async-retry": "1.2.3",
|
||||
"async-sema": "2.1.4",
|
||||
|
||||
@@ -311,8 +311,13 @@ export async function scanParentDirs(
|
||||
bunLockPath ? fs.readFile(bunLockPath, 'utf8') : null,
|
||||
]);
|
||||
|
||||
// Priority order is Yarn > pnpm > npm > bun
|
||||
if (hasYarnLock) {
|
||||
// Priority order is bun with yarn lock > yarn > pnpm > npm > bun
|
||||
if (bunLockBin && hasYarnLock) {
|
||||
cliType = 'bun';
|
||||
lockfilePath = bunLockPath;
|
||||
// TODO: read "bun-lockfile-format-v0"
|
||||
lockfileVersion = 0;
|
||||
} else if (hasYarnLock) {
|
||||
cliType = 'yarn';
|
||||
lockfilePath = yarnLockPath;
|
||||
} else if (pnpmLockYaml) {
|
||||
|
||||
2
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/.gitignore
vendored
Normal file
2
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.vercel
|
||||
public
|
||||
8
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/build.js
vendored
Normal file
8
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/build.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { mkdir, rm, writeFile } from 'node:fs/promises'
|
||||
import { say } from 'cowsay'
|
||||
|
||||
const text = say({ text: `bun version: ${process.versions.bun}` })
|
||||
const content = say({ text })
|
||||
await rm('./public', { recursive: true, force: true })
|
||||
await mkdir('./public', { recursive: true })
|
||||
await writeFile('./public/index.txt', content)
|
||||
BIN
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/bun.lockb
vendored
Executable file
BIN
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/bun.lockb
vendored
Executable file
Binary file not shown.
9
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/package.json
vendored
Normal file
9
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/package.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "bun build.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"cowsay": "1.5.0"
|
||||
}
|
||||
}
|
||||
8
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/probes.json
vendored
Normal file
8
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/probes.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"probes": [
|
||||
{
|
||||
"path": "/",
|
||||
"mustContain": "bun version: 1"
|
||||
}
|
||||
]
|
||||
}
|
||||
221
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/yarn.lock
vendored
Normal file
221
packages/build-utils/test/fixtures/31-bun-v1-with-yarn-lock/yarn.lock
vendored
Normal file
@@ -0,0 +1,221 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
# bun ./bun.lockb --hash: CD5862D9DB80873E-24483eaa80ed0cc4-641E4430BAAAECB3-abebd38edad3b1b9
|
||||
|
||||
|
||||
ansi-regex@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz"
|
||||
integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==
|
||||
|
||||
ansi-regex@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz"
|
||||
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||
|
||||
ansi-styles@^4.0.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz"
|
||||
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
|
||||
dependencies:
|
||||
color-convert "^2.0.1"
|
||||
|
||||
camelcase@^5.0.0:
|
||||
version "5.3.1"
|
||||
resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz"
|
||||
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
|
||||
|
||||
cliui@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz"
|
||||
integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==
|
||||
dependencies:
|
||||
string-width "^4.2.0"
|
||||
strip-ansi "^6.0.0"
|
||||
wrap-ansi "^6.2.0"
|
||||
|
||||
color-convert@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz"
|
||||
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
|
||||
dependencies:
|
||||
color-name "~1.1.4"
|
||||
|
||||
color-name@~1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
|
||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||
|
||||
cowsay@1.5.0:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.npmjs.org/cowsay/-/cowsay-1.5.0.tgz"
|
||||
integrity sha512-8Ipzr54Z8zROr/62C8f0PdhQcDusS05gKTS87xxdji8VbWefWly0k8BwGK7+VqamOrkv3eGsCkPtvlHzrhWsCA==
|
||||
dependencies:
|
||||
get-stdin "8.0.0"
|
||||
string-width "~2.1.1"
|
||||
strip-final-newline "2.0.0"
|
||||
yargs "15.4.1"
|
||||
|
||||
decamelize@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz"
|
||||
integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz"
|
||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
|
||||
find-up@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz"
|
||||
integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
|
||||
dependencies:
|
||||
locate-path "^5.0.0"
|
||||
path-exists "^4.0.0"
|
||||
|
||||
get-caller-file@^2.0.1:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz"
|
||||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||
|
||||
get-stdin@8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz"
|
||||
integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==
|
||||
|
||||
is-fullwidth-code-point@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz"
|
||||
integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==
|
||||
|
||||
is-fullwidth-code-point@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz"
|
||||
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
||||
|
||||
locate-path@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz"
|
||||
integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
|
||||
dependencies:
|
||||
p-locate "^4.1.0"
|
||||
|
||||
p-limit@^2.2.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz"
|
||||
integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
|
||||
dependencies:
|
||||
p-try "^2.0.0"
|
||||
|
||||
p-locate@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz"
|
||||
integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
|
||||
dependencies:
|
||||
p-limit "^2.2.0"
|
||||
|
||||
p-try@^2.0.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz"
|
||||
integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
|
||||
|
||||
path-exists@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz"
|
||||
integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
|
||||
|
||||
require-directory@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz"
|
||||
integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
|
||||
|
||||
require-main-filename@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz"
|
||||
integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
|
||||
|
||||
set-blocking@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz"
|
||||
integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==
|
||||
|
||||
string-width@~2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz"
|
||||
integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
|
||||
dependencies:
|
||||
is-fullwidth-code-point "^2.0.0"
|
||||
strip-ansi "^4.0.0"
|
||||
|
||||
string-width@^4.1.0, string-width@^4.2.0:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
dependencies:
|
||||
emoji-regex "^8.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.1"
|
||||
|
||||
strip-ansi@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz"
|
||||
integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==
|
||||
dependencies:
|
||||
ansi-regex "^3.0.0"
|
||||
|
||||
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
|
||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||
dependencies:
|
||||
ansi-regex "^5.0.1"
|
||||
|
||||
strip-final-newline@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz"
|
||||
integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
|
||||
|
||||
which-module@^2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz"
|
||||
integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==
|
||||
|
||||
wrap-ansi@^6.2.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz"
|
||||
integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
y18n@^4.0.0:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz"
|
||||
integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==
|
||||
|
||||
yargs@15.4.1:
|
||||
version "15.4.1"
|
||||
resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz"
|
||||
integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==
|
||||
dependencies:
|
||||
cliui "^6.0.0"
|
||||
decamelize "^1.2.0"
|
||||
find-up "^4.1.0"
|
||||
get-caller-file "^2.0.1"
|
||||
require-directory "^2.1.1"
|
||||
require-main-filename "^2.0.0"
|
||||
set-blocking "^2.0.0"
|
||||
string-width "^4.2.0"
|
||||
which-module "^2.0.0"
|
||||
y18n "^4.0.0"
|
||||
yargs-parser "^18.1.2"
|
||||
|
||||
yargs-parser@^18.1.2:
|
||||
version "18.1.3"
|
||||
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz"
|
||||
integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==
|
||||
dependencies:
|
||||
camelcase "^5.0.0"
|
||||
decamelize "^1.2.0"
|
||||
9
packages/build-utils/test/unit.test.ts
vendored
9
packages/build-utils/test/unit.test.ts
vendored
@@ -541,6 +541,15 @@ it(
|
||||
);
|
||||
|
||||
it('should return cliType bun and correct lock file for bun v1', async () => {
|
||||
const fixture = path.join(__dirname, 'fixtures', '31-bun-v1-with-yarn-lock');
|
||||
const result = await scanParentDirs(fixture);
|
||||
expect(result.cliType).toEqual('bun');
|
||||
expect(result.lockfileVersion).toEqual(0);
|
||||
expect(result.lockfilePath).toEqual(path.join(fixture, 'bun.lockb'));
|
||||
expect(result.packageJsonPath).toEqual(path.join(fixture, 'package.json'));
|
||||
});
|
||||
|
||||
it('should return cliType bun and correct lock file for bun v1 with yarn.lock file', async () => {
|
||||
const fixture = path.join(__dirname, 'fixtures', '30-bun-v1');
|
||||
const result = await scanParentDirs(fixture);
|
||||
expect(result.cliType).toEqual('bun');
|
||||
|
||||
@@ -1,5 +1,38 @@
|
||||
# vercel
|
||||
|
||||
## 32.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Restore unsetting teamId for non-team accounts ([#10612](https://github.com/vercel/vercel/pull/10612))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- remove unused source map pkg ([#10577](https://github.com/vercel/vercel/pull/10577))
|
||||
|
||||
- disable source map for prod build ([#10575](https://github.com/vercel/vercel/pull/10575))
|
||||
|
||||
- Better rendering upon authentication error in `vc cert ls` ([#10551](https://github.com/vercel/vercel/pull/10551))
|
||||
|
||||
- Updated dependencies [[`e9026c7a6`](https://github.com/vercel/vercel/commit/e9026c7a692937122e60e73b91100cf7009e022d), [`ea5bc8806`](https://github.com/vercel/vercel/commit/ea5bc8806276abf5ba14bdb4a966267497e5d14d), [`a4996e1c5`](https://github.com/vercel/vercel/commit/a4996e1c5a7e6986d5410b662014dc584c0f7c54), [`a18ed98f2`](https://github.com/vercel/vercel/commit/a18ed98f2df78fe1256410ea8676686564ed9b35), [`2f5b0aeeb`](https://github.com/vercel/vercel/commit/2f5b0aeeb183ed3ea8cbc68cb3bc3c949c486ada), [`09f1bbfa4`](https://github.com/vercel/vercel/commit/09f1bbfa41a87cf0063a3fb3022b7531d03862b5), [`ce7e82fa7`](https://github.com/vercel/vercel/commit/ce7e82fa7aa6cec5f5d7b4953353b297b7ad1694)]:
|
||||
- @vercel/next@4.0.9
|
||||
- @vercel/go@3.0.3
|
||||
- @vercel/build-utils@7.2.2
|
||||
- @vercel/node@3.0.7
|
||||
- @vercel/redwood@2.0.4
|
||||
- @vercel/remix-builder@2.0.9
|
||||
- @vercel/static-build@2.0.8
|
||||
|
||||
## 32.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Use "esbuild" to build CLI ([#10555](https://github.com/vercel/vercel/pull/10555))
|
||||
|
||||
- Updated dependencies [[`9f63ca60a`](https://github.com/vercel/vercel/commit/9f63ca60ad914af0f7ba18c9bbe1656eeea68a0a), [`e3f9faf51`](https://github.com/vercel/vercel/commit/e3f9faf513bd97900d8966f2f1116fc3ca07221b)]:
|
||||
- @vercel/next@4.0.8
|
||||
- @vercel/remix-builder@2.0.8
|
||||
|
||||
## 32.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vercel",
|
||||
"version": "32.3.0",
|
||||
"version": "32.4.0",
|
||||
"preferGlobal": true,
|
||||
"license": "Apache-2.0",
|
||||
"description": "The command-line interface for Vercel",
|
||||
@@ -16,7 +16,7 @@
|
||||
"test-e2e": "rimraf test/fixtures/integration && pnpm test test/integration-1.test.ts test/integration-2.test.ts test/integration-3.test.ts",
|
||||
"test-dev": "pnpm test test/dev/",
|
||||
"coverage": "codecov",
|
||||
"build": "ts-node ./scripts/build.ts",
|
||||
"build": "node scripts/build.mjs",
|
||||
"dev": "ts-node ./src/index.ts"
|
||||
},
|
||||
"bin": {
|
||||
@@ -24,23 +24,24 @@
|
||||
"vercel": "./dist/index.js"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"scripts/preinstall.js"
|
||||
"dist"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/go": "3.0.2",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"@vercel/fun": "1.1.0",
|
||||
"@vercel/go": "3.0.3",
|
||||
"@vercel/hydrogen": "1.0.1",
|
||||
"@vercel/next": "4.0.7",
|
||||
"@vercel/node": "3.0.6",
|
||||
"@vercel/next": "4.0.9",
|
||||
"@vercel/node": "3.0.7",
|
||||
"@vercel/python": "4.0.2",
|
||||
"@vercel/redwood": "2.0.3",
|
||||
"@vercel/remix-builder": "2.0.7",
|
||||
"@vercel/redwood": "2.0.4",
|
||||
"@vercel/remix-builder": "2.0.9",
|
||||
"@vercel/ruby": "2.0.2",
|
||||
"@vercel/static-build": "2.0.7"
|
||||
"@vercel/static-build": "2.0.8",
|
||||
"chokidar": "3.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alex_neo/jest-expect-message": "1.0.5",
|
||||
@@ -86,15 +87,12 @@
|
||||
"@types/yauzl-promise": "2.1.0",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel-internals/get-package-json": "1.0.0",
|
||||
"@vercel-internals/types": "1.0.11",
|
||||
"@vercel/client": "13.0.4",
|
||||
"@vercel-internals/types": "1.0.12",
|
||||
"@vercel/client": "13.0.5",
|
||||
"@vercel/error-utils": "2.0.1",
|
||||
"@vercel/frameworks": "2.0.2",
|
||||
"@vercel/fs-detectors": "5.1.0",
|
||||
"@vercel/fun": "1.1.0",
|
||||
"@vercel/ncc": "0.24.0",
|
||||
"@vercel/fs-detectors": "5.1.1",
|
||||
"@vercel/routing-utils": "3.0.0",
|
||||
"@zeit/source-map-support": "0.6.2",
|
||||
"ajv": "6.12.2",
|
||||
"alpha-sort": "2.0.1",
|
||||
"ansi-escapes": "4.3.2",
|
||||
@@ -106,10 +104,8 @@
|
||||
"bytes": "3.0.0",
|
||||
"chalk": "4.1.0",
|
||||
"chance": "1.1.7",
|
||||
"chokidar": "3.3.1",
|
||||
"cli-table3": "0.6.3",
|
||||
"codecov": "3.8.2",
|
||||
"cpy": "7.2.0",
|
||||
"date-fns": "1.29.0",
|
||||
"debug": "3.1.0",
|
||||
"dot": "1.1.3",
|
||||
|
||||
54
packages/cli/scripts/build.mjs
Normal file
54
packages/cli/scripts/build.mjs
Normal file
@@ -0,0 +1,54 @@
|
||||
import { join } from 'node:path';
|
||||
import { copyFileSync, readFileSync, writeFileSync } from 'node:fs';
|
||||
import { esbuild } from '../../../utils/build.mjs';
|
||||
import { compileDevTemplates } from './compile-templates.mjs';
|
||||
|
||||
const repoRoot = new URL('../', import.meta.url);
|
||||
|
||||
function createConstants() {
|
||||
const filename = new URL('src/util/constants.ts', repoRoot);
|
||||
const contents = `// This file is auto-generated
|
||||
export const GA_TRACKING_ID: string | undefined = ${envToString(
|
||||
'GA_TRACKING_ID'
|
||||
)};
|
||||
export const SENTRY_DSN: string | undefined = ${envToString('SENTRY_DSN')};
|
||||
`;
|
||||
writeFileSync(filename, contents, 'utf8');
|
||||
}
|
||||
|
||||
function envToString(key) {
|
||||
const value = process.env[key];
|
||||
if (value) {
|
||||
return JSON.stringify(value);
|
||||
}
|
||||
}
|
||||
|
||||
// Read the secrets from GitHub Actions and generate a file.
|
||||
// During local development, these secrets will be empty.
|
||||
createConstants();
|
||||
|
||||
// Compile the `doT.js` template files for `vercel dev`
|
||||
await compileDevTemplates();
|
||||
|
||||
const pkgPath = join(process.cwd(), 'package.json');
|
||||
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
||||
const externals = Object.keys(pkg.dependencies || {});
|
||||
await esbuild({
|
||||
bundle: true,
|
||||
external: externals,
|
||||
});
|
||||
|
||||
// Copy a few static files into `dist`
|
||||
const distRoot = new URL('dist/', repoRoot);
|
||||
copyFileSync(
|
||||
new URL('src/util/projects/VERCEL_DIR_README.txt', repoRoot),
|
||||
new URL('VERCEL_DIR_README.txt', distRoot)
|
||||
);
|
||||
copyFileSync(
|
||||
new URL('src/util/dev/builder-worker.js', repoRoot),
|
||||
new URL('builder-worker.js', distRoot)
|
||||
);
|
||||
copyFileSync(
|
||||
new URL('src/util/get-latest-version/get-latest-worker.js', repoRoot),
|
||||
new URL('get-latest-worker.js', distRoot)
|
||||
);
|
||||
@@ -1,100 +0,0 @@
|
||||
import cpy from 'cpy';
|
||||
import execa from 'execa';
|
||||
import { join } from 'path';
|
||||
import { remove, readJSON, writeFile } from 'fs-extra';
|
||||
|
||||
const dirRoot = join(__dirname, '..');
|
||||
const distRoot = join(dirRoot, 'dist');
|
||||
|
||||
async function createConstants() {
|
||||
console.log('Creating constants.ts');
|
||||
const filename = join(dirRoot, 'src/util/constants.ts');
|
||||
const contents = `// This file is auto-generated
|
||||
export const GA_TRACKING_ID: string | undefined = ${envToString(
|
||||
'GA_TRACKING_ID'
|
||||
)};
|
||||
export const SENTRY_DSN: string | undefined = ${envToString('SENTRY_DSN')};
|
||||
`;
|
||||
await writeFile(filename, contents, 'utf8');
|
||||
}
|
||||
|
||||
function envToString(key: string) {
|
||||
const value = process.env[key];
|
||||
if (!value) {
|
||||
console.log(`- Constant ${key} is not assigned`);
|
||||
}
|
||||
return JSON.stringify(value);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
// Read the secrets from GitHub Actions and generate a file.
|
||||
// During local development, these secrets will be empty.
|
||||
await createConstants();
|
||||
|
||||
// `vercel dev` uses chokidar to watch the filesystem, but opts-out of the
|
||||
// `fsevents` feature using `useFsEvents: false`, so delete the module here so
|
||||
// that it is not compiled by ncc, which makes the npm package size larger
|
||||
// than necessary.
|
||||
await remove(join(dirRoot, '../../node_modules/fsevents'));
|
||||
|
||||
// Compile the `doT.js` template files for `vercel dev`
|
||||
console.log();
|
||||
await execa(process.execPath, [join(__dirname, 'compile-templates.js')], {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
const pkg = await readJSON(join(dirRoot, 'package.json'));
|
||||
const dependencies = Object.keys(pkg?.dependencies ?? {});
|
||||
// Do the initial `ncc` build
|
||||
console.log('Dependencies:', dependencies);
|
||||
const externs: Array<string> = [];
|
||||
for (const dep of dependencies) {
|
||||
externs.push('--external', dep);
|
||||
}
|
||||
const args = ['ncc', 'build', 'src/index.ts', ...externs];
|
||||
await execa('pnpm', args, { stdio: 'inherit', cwd: dirRoot });
|
||||
|
||||
// `ncc` has some issues with `@vercel/fun`'s runtime files:
|
||||
// - Executable bits on the `bootstrap` files appear to be lost:
|
||||
// https://github.com/vercel/ncc/pull/182
|
||||
// - The `bootstrap.js` asset does not get copied into the output dir:
|
||||
// https://github.com/vercel/ncc/issues/278
|
||||
//
|
||||
// Aside from those issues, all the same files from the `runtimes` directory
|
||||
// should be copied into the output runtimes dir, specifically the `index.js`
|
||||
// files (correctly) do not get copied into the output bundle because they
|
||||
// get compiled into the final ncc bundle file, however, we want them to be
|
||||
// present in the npm package because the contents of those files are involved
|
||||
// with `fun`'s cache invalidation mechanism and they need to be shasum'd.
|
||||
const runtimes = join(dirRoot, 'node_modules/@vercel/fun/dist/src/runtimes');
|
||||
await cpy('**/*', join(distRoot, 'runtimes'), {
|
||||
parents: true,
|
||||
cwd: runtimes,
|
||||
});
|
||||
|
||||
// Band-aid to bundle stuff that `ncc` neglects to bundle
|
||||
await cpy(join(dirRoot, 'src/util/projects/VERCEL_DIR_README.txt'), distRoot);
|
||||
await cpy(join(dirRoot, 'src/util/dev/builder-worker.js'), distRoot);
|
||||
await cpy(
|
||||
join(dirRoot, 'src/util/get-latest-version/get-latest-worker.js'),
|
||||
distRoot
|
||||
);
|
||||
|
||||
console.log('Finished building Vercel CLI');
|
||||
}
|
||||
|
||||
process.on('unhandledRejection', (reason: any, promise: Promise<any>) => {
|
||||
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
process.on('uncaughtException', err => {
|
||||
console.error('Uncaught Exception:');
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
main().catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -1,88 +0,0 @@
|
||||
const execa = require('execa');
|
||||
const { join } = require('path');
|
||||
const { readFile, writeFile, readdir, remove } = require('fs-extra');
|
||||
|
||||
async function main() {
|
||||
const dirRoot = join(__dirname, '..');
|
||||
|
||||
// Compile the `doT.js` template files for `vercel dev`
|
||||
const templatesDir = join(dirRoot, 'src/util/dev/templates');
|
||||
const dotPacker = join(dirRoot, '../../node_modules/dot/bin/dot-packer');
|
||||
await execa(process.execPath, [dotPacker], {
|
||||
cwd: templatesDir,
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
const files = await readdir(templatesDir);
|
||||
const compiledFiles = files.filter(f => f.endsWith('.js'));
|
||||
|
||||
// Prettier
|
||||
console.log('\nMaking the compiled template functions prettier...');
|
||||
const prettier = join(dirRoot, '../../node_modules/prettier/bin-prettier.js');
|
||||
await execa(
|
||||
process.execPath,
|
||||
[prettier, '--write', '--single-quote', ...compiledFiles],
|
||||
{
|
||||
cwd: templatesDir,
|
||||
stdio: 'inherit',
|
||||
}
|
||||
);
|
||||
|
||||
console.log('\nConverting template functions to TypeScript');
|
||||
for (const file of compiledFiles) {
|
||||
const start = Date.now();
|
||||
const fnPath = join(templatesDir, file);
|
||||
const tsPath = fnPath.replace(/\.js$/, '.ts');
|
||||
const def = await readFile(fnPath.replace(/\.js$/, '.tsdef'), 'utf8');
|
||||
const interfaceName = def.match(/interface (\w+)/)[1];
|
||||
|
||||
const lines = require(fnPath).toString().split('\n');
|
||||
let errorHtmlStart = -1;
|
||||
let errorHtmlEnd = -1;
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const line = lines[i];
|
||||
if (errorHtmlStart === -1 && line.includes('encodeHTML')) {
|
||||
errorHtmlStart = i;
|
||||
} else if (errorHtmlEnd === -1 && line.includes(')();')) {
|
||||
errorHtmlEnd = i;
|
||||
}
|
||||
if (/\bvar\b/.test(line)) {
|
||||
lines[i] = line.replace(/\bvar\b/g, 'let');
|
||||
}
|
||||
}
|
||||
lines.splice(errorHtmlStart, errorHtmlEnd);
|
||||
|
||||
lines[0] = `export default ${lines[0].replace(
|
||||
'(it)',
|
||||
`(it: ${interfaceName}): string`
|
||||
)}`;
|
||||
|
||||
lines.unshift(
|
||||
"import encodeHTML from 'escape-html';",
|
||||
'',
|
||||
...def.split('\n')
|
||||
);
|
||||
|
||||
await Promise.all([writeFile(tsPath, lines.join('\n')), remove(fnPath)]);
|
||||
console.log(
|
||||
`${file} -> ${file.replace(/\.js$/, '.ts')} (${Date.now() - start}ms)`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
process.on('unhandledRejection', err => {
|
||||
console.error('Unhandled Rejection:');
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
process.on('uncaughtException', err => {
|
||||
console.error('Uncaught Exception:');
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
main().catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
63
packages/cli/scripts/compile-templates.mjs
Normal file
63
packages/cli/scripts/compile-templates.mjs
Normal file
@@ -0,0 +1,63 @@
|
||||
import execa from 'execa';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { readFile, writeFile, readdir, unlink } from 'node:fs/promises';
|
||||
|
||||
export async function compileDevTemplates() {
|
||||
const dirRoot = new URL('../', import.meta.url);
|
||||
|
||||
// Compile the `doT.js` template files for `vercel dev`
|
||||
const templatesDir = new URL('src/util/dev/templates/', dirRoot);
|
||||
const dotPacker = fileURLToPath(
|
||||
new URL('../../node_modules/dot/bin/dot-packer', dirRoot)
|
||||
);
|
||||
await execa(process.execPath, [dotPacker], {
|
||||
cwd: templatesDir,
|
||||
stdio: ['ignore', 'ignore', 'inherit'],
|
||||
});
|
||||
|
||||
const files = await readdir(templatesDir);
|
||||
const compiledFiles = files.filter(f => f.endsWith('.js'));
|
||||
|
||||
for (const file of compiledFiles) {
|
||||
const fnPath = new URL(file, templatesDir);
|
||||
const tsPath = fnPath.href.replace(/\.js$/, '.ts');
|
||||
const def = await readFile(
|
||||
new URL(fnPath.href.replace(/\.js$/, '.tsdef')),
|
||||
'utf8'
|
||||
);
|
||||
const interfaceName = def.match(/interface (\w+)/)[1];
|
||||
|
||||
const { default: fn } = await import(fnPath);
|
||||
const lines = fn.toString().split('\n');
|
||||
let errorHtmlStart = -1;
|
||||
let errorHtmlEnd = -1;
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const line = lines[i];
|
||||
if (errorHtmlStart === -1 && line.includes('encodeHTML')) {
|
||||
errorHtmlStart = i;
|
||||
} else if (errorHtmlEnd === -1 && line.includes(')();')) {
|
||||
errorHtmlEnd = i;
|
||||
}
|
||||
if (/\bvar\b/.test(line)) {
|
||||
lines[i] = line.replace(/\bvar\b/g, 'let');
|
||||
}
|
||||
}
|
||||
lines.splice(errorHtmlStart, errorHtmlEnd);
|
||||
|
||||
lines[0] = `export default ${lines[0].replace(
|
||||
'(it)',
|
||||
`(it: ${interfaceName}): string`
|
||||
)}`;
|
||||
|
||||
lines.unshift(
|
||||
"import encodeHTML from 'escape-html';",
|
||||
'',
|
||||
...def.split('\n')
|
||||
);
|
||||
|
||||
await Promise.all([
|
||||
writeFile(new URL(tsPath), lines.join('\n')),
|
||||
unlink(fnPath),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -43,10 +43,7 @@ async function ls(
|
||||
}
|
||||
|
||||
// Get the list of certificates
|
||||
const { certs, pagination } = await getCerts(
|
||||
client,
|
||||
...paginationOptions
|
||||
).catch(err => err);
|
||||
const { certs, pagination } = await getCerts(client, ...paginationOptions);
|
||||
|
||||
output.log(
|
||||
`${
|
||||
|
||||
@@ -24,6 +24,9 @@ import { updateCurrentTeamAfterLogin } from '../../util/login/update-current-tea
|
||||
export default async function login(client: Client): Promise<number> {
|
||||
const { output } = client;
|
||||
|
||||
// user is not currently authenticated on this machine
|
||||
const isInitialLogin = !client.authConfig.token;
|
||||
|
||||
const argv = getArgs(client.argv.slice(2), {
|
||||
'--oob': Boolean,
|
||||
'--github': Boolean,
|
||||
@@ -68,14 +71,22 @@ export default async function login(client: Client): Promise<number> {
|
||||
return result;
|
||||
}
|
||||
|
||||
const isNewLogin = !client.authConfig.token;
|
||||
|
||||
// Save the user's authentication token to the configuration file.
|
||||
client.authConfig.token = result.token;
|
||||
|
||||
// If we have a new login, update `currentTeam`
|
||||
if (isNewLogin) {
|
||||
await updateCurrentTeamAfterLogin(client, output, result.teamId);
|
||||
if (result.teamId) {
|
||||
client.config.currentTeam = result.teamId;
|
||||
} else {
|
||||
delete client.config.currentTeam;
|
||||
}
|
||||
|
||||
// If we have a brand new login, update `currentTeam`
|
||||
if (isInitialLogin) {
|
||||
await updateCurrentTeamAfterLogin(
|
||||
client,
|
||||
output,
|
||||
client.config.currentTeam
|
||||
);
|
||||
}
|
||||
|
||||
writeToAuthConfigFile(client.authConfig);
|
||||
|
||||
@@ -14,7 +14,6 @@ try {
|
||||
|
||||
import { join } from 'path';
|
||||
import { existsSync } from 'fs';
|
||||
import sourceMap from '@zeit/source-map-support';
|
||||
import { mkdirp } from 'fs-extra';
|
||||
import chalk from 'chalk';
|
||||
import epipebomb from 'epipebomb';
|
||||
@@ -66,8 +65,6 @@ const GLOBAL_COMMANDS = new Set(['help']);
|
||||
|
||||
epipebomb();
|
||||
|
||||
sourceMap.install();
|
||||
|
||||
// Configure the error reporting system
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
|
||||
@@ -3,6 +3,7 @@ import plural from 'pluralize';
|
||||
import npa from 'npm-package-arg';
|
||||
import { satisfies } from 'semver';
|
||||
import { dirname, join } from 'path';
|
||||
import { createRequire } from 'module';
|
||||
import { mkdirp, outputJSON, readJSON, symlink } from 'fs-extra';
|
||||
import { isStaticRuntime } from '@vercel/fs-detectors';
|
||||
import { BuilderV2, BuilderV3, PackageJson } from '@vercel/build-utils';
|
||||
@@ -28,6 +29,9 @@ type ResolveBuildersResult =
|
||||
| { buildersToAdd: Set<string> }
|
||||
| { builders: Map<string, BuilderWithPkg> };
|
||||
|
||||
// Get a real `require()` reference that esbuild won't mutate
|
||||
const require_ = createRequire(__filename);
|
||||
|
||||
/**
|
||||
* Imports the specified Vercel Builders, installing any missing ones
|
||||
* into `.vercel/builders` if necessary.
|
||||
@@ -115,10 +119,9 @@ export async function resolveBuilders(
|
||||
// If `pkgPath` wasn't found in `.vercel/builders` then try as a CLI local
|
||||
// dependency. `require.resolve()` will throw if the Builder is not a CLI
|
||||
// dep, in which case we'll install it into `.vercel/builders`.
|
||||
// NOTE: `eval('require')` is necessary to avoid bad transpilation to `__webpack_require__`
|
||||
pkgPath = eval('require').resolve(`${name}/package.json`, {
|
||||
pkgPath = require_.resolve(`${name}/package.json`, {
|
||||
paths: [__dirname],
|
||||
}) as string;
|
||||
});
|
||||
builderPkg = await readJSON(pkgPath);
|
||||
}
|
||||
|
||||
@@ -159,8 +162,7 @@ export async function resolveBuilders(
|
||||
|
||||
const path = join(dirname(pkgPath), builderPkg.main || 'index.js');
|
||||
|
||||
// NOTE: `eval('require')` is necessary to avoid bad transpilation to `__webpack_require__`
|
||||
const builder = eval('require')(path);
|
||||
const builder = require_(path);
|
||||
|
||||
builders.set(spec, {
|
||||
builder,
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
* the world, but something to be aware of.
|
||||
*
|
||||
* IMPORTANT! This file must NOT depend on any 3rd party dependencies. This
|
||||
* file is NOT bundled by `ncc` and thus any 3rd party dependencies will never
|
||||
* be available.
|
||||
* file is NOT bundled by `esbuild` and thus any 3rd party dependencies will
|
||||
* never be available.
|
||||
*/
|
||||
|
||||
const https = require('https');
|
||||
|
||||
@@ -21,4 +21,24 @@ describe('certs', () => {
|
||||
await expect(client.stdout).toOutput('dummy-1.cert');
|
||||
await expect(exitCodePromise).resolves.toEqual(0);
|
||||
});
|
||||
|
||||
it('should show permission error if user does not have permission', async () => {
|
||||
useUser();
|
||||
client.scenario.get('/v4/now/certs', (_req, res) => {
|
||||
res.status(403).json({
|
||||
error: {
|
||||
code: 'forbidden',
|
||||
message: "You don't have permission to list the domain certificate.",
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
client.setArgv('certs', 'ls');
|
||||
|
||||
const exec = certs(client);
|
||||
|
||||
await expect(exec).rejects.toThrow(
|
||||
"You don't have permission to list the domain certificate."
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"allowJs": true,
|
||||
"lib": ["ES2021"],
|
||||
"resolveJsonModule": true,
|
||||
"sourceMap": true,
|
||||
"sourceMap": false,
|
||||
"outDir": "./dist",
|
||||
"typeRoots": ["./types", "./node_modules/@types"]
|
||||
},
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
declare module '@zeit/source-map-support' {
|
||||
function install(): void;
|
||||
}
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/client
|
||||
|
||||
## 13.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2f5b0aeeb`](https://github.com/vercel/vercel/commit/2f5b0aeeb183ed3ea8cbc68cb3bc3c949c486ada)]:
|
||||
- @vercel/build-utils@7.2.2
|
||||
|
||||
## 13.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/client",
|
||||
"version": "13.0.4",
|
||||
"version": "13.0.5",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"homepage": "https://vercel.com",
|
||||
@@ -36,7 +36,7 @@
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"@vercel/routing-utils": "3.0.0",
|
||||
"@zeit/fetch": "5.2.0",
|
||||
"async-retry": "1.2.3",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vercel/fs-detectors
|
||||
|
||||
## 5.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [cli] Update bun detection and add tests for projects with both bunlock binary and yarn.lock text files ([#10583](https://github.com/vercel/vercel/pull/10583))
|
||||
|
||||
## 5.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/fs-detectors",
|
||||
"version": "5.1.0",
|
||||
"version": "5.1.1",
|
||||
"description": "Vercel filesystem detectors",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -36,7 +36,7 @@
|
||||
"@types/minimatch": "3.0.5",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "7.3.10",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"jest-junit": "16.0.0",
|
||||
"typescript": "4.9.5"
|
||||
}
|
||||
|
||||
1
packages/fs-detectors/test/fixtures/59-bun-with-binary-and-readable-lockfile/package.json
vendored
Normal file
1
packages/fs-detectors/test/fixtures/59-bun-with-binary-and-readable-lockfile/package.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
0
packages/fs-detectors/test/fixtures/59-bun-with-binary-and-readable-lockfile/yarn.lock
vendored
Normal file
0
packages/fs-detectors/test/fixtures/59-bun-with-binary-and-readable-lockfile/yarn.lock
vendored
Normal file
@@ -16,6 +16,7 @@ describe('package-managers', () => {
|
||||
['56-pnpm-with-corepack', 'pnpm'],
|
||||
['57-bun-with-lockfile', 'bun'],
|
||||
['58-bun-with-corepack', 'bun'],
|
||||
['59-bun-with-binary-and-readable-lockfile', 'bun'],
|
||||
])('with detectFramework', (fixturePath, frameworkSlug) => {
|
||||
const testName = `should detect package manager '${frameworkSlug}' for ${fixturePath}`;
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/gatsby-plugin-vercel-builder
|
||||
|
||||
## 2.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2f5b0aeeb`](https://github.com/vercel/vercel/commit/2f5b0aeeb183ed3ea8cbc68cb3bc3c949c486ada)]:
|
||||
- @vercel/build-utils@7.2.2
|
||||
|
||||
## 2.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/gatsby-plugin-vercel-builder",
|
||||
"version": "2.0.6",
|
||||
"version": "2.0.7",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
"dist",
|
||||
@@ -17,7 +17,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sinclair/typebox": "0.25.24",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"@vercel/routing-utils": "3.0.0",
|
||||
"esbuild": "0.14.47",
|
||||
"etag": "1.8.1",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vercel/go
|
||||
|
||||
## 3.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update broken documentation link ([#10579](https://github.com/vercel/vercel/pull/10579))
|
||||
|
||||
## 3.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/go",
|
||||
"version": "3.0.2",
|
||||
"version": "3.0.3",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",
|
||||
@@ -28,8 +28,7 @@
|
||||
"@types/node-fetch": "^2.3.0",
|
||||
"@types/tar": "6.1.5",
|
||||
"@types/yauzl-promise": "2.1.0",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/ncc": "0.24.0",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"async-retry": "1.3.3",
|
||||
"execa": "^1.0.0",
|
||||
"fs-extra": "^7.0.0",
|
||||
|
||||
@@ -151,7 +151,7 @@ export async function getAnalyzedEntrypoint({
|
||||
if (!analyzed) {
|
||||
const err = new Error(
|
||||
`Could not find an exported function in "${entrypoint}"
|
||||
Learn more: https://vercel.com/docs/runtimes#official-runtimes/go
|
||||
Learn more: https://vercel.com/docs/functions/serverless-functions/runtimes/go
|
||||
`
|
||||
);
|
||||
console.error(err.message);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"devDependencies": {
|
||||
"@types/jest": "27.5.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"execa": "3.2.0",
|
||||
"fs-extra": "11.1.0",
|
||||
"jest-junit": "16.0.0"
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# @vercel/next
|
||||
|
||||
## 4.0.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Correct output file tracing and limit calculation ([#10631](https://github.com/vercel/vercel/pull/10631))
|
||||
|
||||
- Fix the instrumentation hook on Next.js Edge Functions ([#10608](https://github.com/vercel/vercel/pull/10608))
|
||||
|
||||
- [next] fix lambda creation for i18n edge pages ([#10630](https://github.com/vercel/vercel/pull/10630))
|
||||
|
||||
- Revert "[next][node][redwood][remix] Update @vercel/nft (#10540)" ([#10633](https://github.com/vercel/vercel/pull/10633))
|
||||
|
||||
- Update `@vercel/nft` to 0.24.2 ([#10644](https://github.com/vercel/vercel/pull/10644))
|
||||
|
||||
## 4.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix edge case for setting `__NEXT_PRIVATE_PREBUNDLED_REACT` ([#10568](https://github.com/vercel/vercel/pull/10568))
|
||||
|
||||
## 4.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/next",
|
||||
"version": "4.0.7",
|
||||
"version": "4.0.9",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
||||
@@ -21,7 +21,7 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@vercel/nft": "0.24.1"
|
||||
"@vercel/nft": "0.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/aws-lambda": "8.10.19",
|
||||
@@ -38,7 +38,7 @@
|
||||
"@types/semver": "6.0.0",
|
||||
"@types/text-table": "0.2.1",
|
||||
"@types/webpack-sources": "3.2.0",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"@vercel/routing-utils": "3.0.0",
|
||||
"async-sema": "3.0.1",
|
||||
"buffer-crc32": "0.2.13",
|
||||
|
||||
@@ -10,5 +10,3 @@ export const EDGE_FUNCTION_SIZE_LIMIT = 4 * MIB;
|
||||
export const MAX_UNCOMPRESSED_LAMBDA_SIZE = 250 * MIB;
|
||||
|
||||
export const LAMBDA_RESERVED_UNCOMPRESSED_SIZE = 2.5 * MIB;
|
||||
|
||||
export const LAMBDA_RESERVED_COMPRESSED_SIZE = 250 * KIB;
|
||||
|
||||
@@ -30,7 +30,7 @@ export async function getNextjsEdgeFunctionSource(
|
||||
outputDir: string,
|
||||
wasm?: { filePath: string; name: string }[]
|
||||
): Promise<Source> {
|
||||
const chunks = new ConcatSource(raw(`let _ENTRIES = {};`));
|
||||
const chunks = new ConcatSource(raw(`globalThis._ENTRIES = {};`));
|
||||
for (const filePath of filePaths) {
|
||||
const fullFilePath = join(outputDir, filePath);
|
||||
const content = await readFile(fullFilePath, 'utf8');
|
||||
|
||||
@@ -1449,6 +1449,8 @@ export const build: BuildV2 = async ({
|
||||
let tracedPseudoLayer: PseudoLayerResult | undefined;
|
||||
const apiPages: string[] = [];
|
||||
const nonApiPages: string[] = [];
|
||||
const lstatSema = new Sema(25);
|
||||
const lstatResults: { [key: string]: ReturnType<typeof lstat> } = {};
|
||||
|
||||
for (const page of pageKeys) {
|
||||
const pagePath = pages[page].fsPath;
|
||||
@@ -1464,7 +1466,11 @@ export const build: BuildV2 = async ({
|
||||
|
||||
compressedPages[page] = (
|
||||
await createPseudoLayer({
|
||||
[page]: pages[page],
|
||||
files: {
|
||||
[page]: pages[page],
|
||||
},
|
||||
lstatResults,
|
||||
lstatSema,
|
||||
})
|
||||
).pseudoLayer[page] as PseudoFile;
|
||||
}
|
||||
@@ -1482,8 +1488,6 @@ export const build: BuildV2 = async ({
|
||||
}
|
||||
|
||||
const nftCache = Object.create(null);
|
||||
const lstatSema = new Sema(25);
|
||||
const lstatResults: { [key: string]: ReturnType<typeof lstat> } = {};
|
||||
const pathsToTrace = mergedPageKeys.map(page => pages[page].fsPath);
|
||||
|
||||
const result = await nodeFileTrace(pathsToTrace, {
|
||||
@@ -1512,15 +1516,16 @@ export const build: BuildV2 = async ({
|
||||
const reasons = result.reasons;
|
||||
|
||||
await Promise.all(
|
||||
Array.from(fileList).map(
|
||||
collectTracedFiles(
|
||||
Array.from(fileList).map(async file => {
|
||||
await collectTracedFiles(
|
||||
file,
|
||||
baseDir,
|
||||
lstatResults,
|
||||
lstatSema,
|
||||
reasons,
|
||||
tracedFiles
|
||||
)
|
||||
)
|
||||
);
|
||||
})
|
||||
);
|
||||
pageTraces[page] = tracedFiles;
|
||||
}
|
||||
@@ -1536,12 +1541,14 @@ export const build: BuildV2 = async ({
|
||||
if (hasLambdas) {
|
||||
console.time(zippingLabel);
|
||||
}
|
||||
tracedPseudoLayer = await createPseudoLayer(
|
||||
mergedPageKeys.reduce((prev, page) => {
|
||||
tracedPseudoLayer = await createPseudoLayer({
|
||||
files: mergedPageKeys.reduce((prev, page) => {
|
||||
Object.assign(prev, pageTraces[page]);
|
||||
return prev;
|
||||
}, {})
|
||||
);
|
||||
}, {}),
|
||||
lstatResults,
|
||||
lstatSema,
|
||||
});
|
||||
|
||||
if (hasLambdas) {
|
||||
console.timeEnd(zippingLabel);
|
||||
|
||||
@@ -111,7 +111,6 @@ export async function serverBuild({
|
||||
omittedPrerenderRoutes,
|
||||
trailingSlashRedirects,
|
||||
isCorrectLocaleAPIRoutes,
|
||||
lambdaCompressedByteLimit,
|
||||
requiredServerFilesManifest,
|
||||
variantsManifest,
|
||||
}: {
|
||||
@@ -149,7 +148,6 @@ export async function serverBuild({
|
||||
hasIsr500Page: boolean;
|
||||
trailingSlashRedirects: Route[];
|
||||
routesManifest: RoutesManifest;
|
||||
lambdaCompressedByteLimit: number;
|
||||
isCorrectLocaleAPIRoutes: boolean;
|
||||
imagesManifest?: NextImagesManifest;
|
||||
prerenderManifest: NextPrerenderedRoutes;
|
||||
@@ -303,7 +301,6 @@ export async function serverBuild({
|
||||
|
||||
if (hasLambdas) {
|
||||
const initialTracingLabel = 'Traced Next.js server files in';
|
||||
|
||||
console.time(initialTracingLabel);
|
||||
|
||||
const initialTracedFiles: {
|
||||
@@ -412,19 +409,24 @@ export async function serverBuild({
|
||||
|
||||
debug('collecting initial Next.js server files');
|
||||
await Promise.all(
|
||||
initialFileList.map(
|
||||
collectTracedFiles(
|
||||
initialFileList.map(async file => {
|
||||
await collectTracedFiles(
|
||||
file,
|
||||
baseDir,
|
||||
lstatResults,
|
||||
lstatSema,
|
||||
initialFileReasons,
|
||||
initialTracedFiles
|
||||
)
|
||||
)
|
||||
);
|
||||
})
|
||||
);
|
||||
|
||||
debug('creating initial pseudo layer');
|
||||
const initialPseudoLayer = await createPseudoLayer(initialTracedFiles);
|
||||
const initialPseudoLayer = await createPseudoLayer({
|
||||
files: initialTracedFiles,
|
||||
lstatResults,
|
||||
lstatSema,
|
||||
});
|
||||
console.timeEnd(initialTracingLabel);
|
||||
|
||||
const lambdaCreationLabel = 'Created all serverless functions in';
|
||||
@@ -435,18 +437,18 @@ export async function serverBuild({
|
||||
const appRouterPages: string[] = [];
|
||||
const appRouteHandlers: string[] = [];
|
||||
|
||||
lambdaPageKeys.forEach(page => {
|
||||
for (const page of lambdaPageKeys) {
|
||||
if (
|
||||
internalPages.includes(page) &&
|
||||
page !== '404.js' &&
|
||||
!(page === '_error.js' && !(static404Page || lambdaPages['404.js']))
|
||||
) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
const pathname = page.replace(/\.js$/, '');
|
||||
|
||||
if (nonLambdaSsgPages.has(pathname)) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
const normalizedPathname = normalizePage(pathname);
|
||||
|
||||
@@ -465,7 +467,7 @@ export async function serverBuild({
|
||||
} else {
|
||||
nonApiPages.push(page);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const requiredFiles: { [key: string]: FileFsRef } = {};
|
||||
|
||||
@@ -557,39 +559,30 @@ export async function serverBuild({
|
||||
|
||||
// add required files and internal pages to initial pseudo layer
|
||||
// so that we account for these in the size of each page group
|
||||
const requiredFilesLayer = await createPseudoLayer(requiredFiles);
|
||||
const requiredFilesLayer = await createPseudoLayer({
|
||||
files: requiredFiles,
|
||||
lstatResults,
|
||||
lstatSema,
|
||||
});
|
||||
Object.assign(
|
||||
initialPseudoLayer.pseudoLayer,
|
||||
requiredFilesLayer.pseudoLayer
|
||||
);
|
||||
initialPseudoLayer.pseudoLayerBytes += requiredFilesLayer.pseudoLayerBytes;
|
||||
|
||||
const uncompressedInitialSize = Object.keys(
|
||||
initialPseudoLayer.pseudoLayer
|
||||
).reduce((prev, cur) => {
|
||||
const file = initialPseudoLayer.pseudoLayer[cur] as PseudoFile;
|
||||
return prev + file.uncompressedSize || 0;
|
||||
}, 0);
|
||||
|
||||
debug(
|
||||
JSON.stringify(
|
||||
{
|
||||
uncompressedInitialSize,
|
||||
compressedInitialSize: initialPseudoLayer.pseudoLayerBytes,
|
||||
initializeSizeUncompressed: initialPseudoLayer.pseudoLayerBytes,
|
||||
},
|
||||
null,
|
||||
2
|
||||
)
|
||||
);
|
||||
|
||||
if (
|
||||
initialPseudoLayer.pseudoLayerBytes > lambdaCompressedByteLimit ||
|
||||
uncompressedInitialSize > MAX_UNCOMPRESSED_LAMBDA_SIZE
|
||||
) {
|
||||
if (initialPseudoLayer.pseudoLayerBytes > MAX_UNCOMPRESSED_LAMBDA_SIZE) {
|
||||
console.log(
|
||||
`Warning: Max serverless function size of ${prettyBytes(
|
||||
lambdaCompressedByteLimit
|
||||
)} compressed or ${prettyBytes(
|
||||
MAX_UNCOMPRESSED_LAMBDA_SIZE
|
||||
)} uncompressed reached`
|
||||
);
|
||||
@@ -598,12 +591,11 @@ export async function serverBuild({
|
||||
[],
|
||||
initialPseudoLayer.pseudoLayer,
|
||||
initialPseudoLayer.pseudoLayerBytes,
|
||||
uncompressedInitialSize,
|
||||
{}
|
||||
);
|
||||
|
||||
throw new NowBuildError({
|
||||
message: `Required files read using Node.js fs library and node_modules exceed max lambda size of ${lambdaCompressedByteLimit} bytes`,
|
||||
message: `Required files read using Node.js fs library and node_modules exceed max lambda size of ${MAX_UNCOMPRESSED_LAMBDA_SIZE} bytes`,
|
||||
code: 'NEXT_REQUIRED_FILES_LIMIT',
|
||||
link: 'https://vercel.com/docs/platform/limits#serverless-function-size',
|
||||
});
|
||||
@@ -633,7 +625,7 @@ export async function serverBuild({
|
||||
);
|
||||
|
||||
const appLauncher = launcher.replace(
|
||||
'// pre-next-server-target',
|
||||
'// @preserve pre-next-server-target',
|
||||
`process.env.__NEXT_PRIVATE_PREBUNDLED_REACT = "${
|
||||
requiredServerFilesManifest.config?.experimental?.serverActions
|
||||
? 'experimental'
|
||||
@@ -649,7 +641,7 @@ export async function serverBuild({
|
||||
// Next.js isn't aware of it and it isn't included in the
|
||||
// x-matched-path header
|
||||
launcher = launcher.replace(
|
||||
'// entryDirectory handler',
|
||||
'// @preserve entryDirectory handler',
|
||||
`req.url = req.url.replace(/^${path.posix
|
||||
.join('/', entryDirectory)
|
||||
.replace(/\//g, '\\/')}/, '')`
|
||||
@@ -681,16 +673,15 @@ export async function serverBuild({
|
||||
return originalPagePath;
|
||||
};
|
||||
|
||||
const getBuildTraceFile = (page: string) => {
|
||||
return (
|
||||
pageBuildTraces[page + '.nft.json'] ||
|
||||
appBuildTraces[page + '.nft.json']
|
||||
);
|
||||
};
|
||||
const getBuildTraceFile = (page: string) =>
|
||||
pageBuildTraces[page + '.nft.json'] || appBuildTraces[page + '.nft.json'];
|
||||
|
||||
const pathsToTrace: string[] = mergedPageKeys
|
||||
.map(page => {
|
||||
if (!getBuildTraceFile(page)) {
|
||||
const originalPagePath = getOriginalPagePath(page);
|
||||
const pageBuildTrace = getBuildTraceFile(originalPagePath);
|
||||
|
||||
if (!pageBuildTrace) {
|
||||
return lambdaPages[page].fsPath;
|
||||
}
|
||||
})
|
||||
@@ -700,6 +691,10 @@ export async function serverBuild({
|
||||
let parentFilesMap: Map<string, Set<string>> | undefined;
|
||||
|
||||
if (pathsToTrace.length > 0) {
|
||||
console.warn(
|
||||
`Warning: running tracing as trace files were not present for:\n`,
|
||||
JSON.stringify(pathsToTrace, null, 2)
|
||||
);
|
||||
traceResult = await nodeFileTrace(pathsToTrace, {
|
||||
base: baseDir,
|
||||
cache: traceCache,
|
||||
@@ -783,31 +778,39 @@ export async function serverBuild({
|
||||
reasons = traceResult?.reasons || new Map();
|
||||
}
|
||||
|
||||
await Promise.all(
|
||||
fileList.map(
|
||||
collectTracedFiles(
|
||||
await Promise.all([
|
||||
createPseudoLayer({
|
||||
files: {
|
||||
[page]: lambdaPages[page],
|
||||
},
|
||||
lstatResults,
|
||||
lstatSema,
|
||||
}).then(res => {
|
||||
compressedPages[page] = res.pseudoLayer[page] as PseudoFile;
|
||||
}),
|
||||
...fileList.map(async file => {
|
||||
await collectTracedFiles(
|
||||
file,
|
||||
baseDir,
|
||||
lstatResults,
|
||||
lstatSema,
|
||||
reasons,
|
||||
tracedFiles
|
||||
)
|
||||
)
|
||||
);
|
||||
);
|
||||
}),
|
||||
]);
|
||||
|
||||
pageTraces[page] = tracedFiles;
|
||||
compressedPages[page] = (
|
||||
await createPseudoLayer({
|
||||
[page]: lambdaPages[page],
|
||||
})
|
||||
).pseudoLayer[page] as PseudoFile;
|
||||
}
|
||||
|
||||
const tracedPseudoLayer = await createPseudoLayer(
|
||||
mergedPageKeys.reduce((prev, page) => {
|
||||
const tracedPseudoLayer = await createPseudoLayer({
|
||||
files: mergedPageKeys.reduce((prev, page) => {
|
||||
Object.assign(prev, pageTraces[page]);
|
||||
return prev;
|
||||
}, {})
|
||||
);
|
||||
}, {}),
|
||||
lstatResults,
|
||||
lstatSema,
|
||||
});
|
||||
|
||||
const pageExtensions = requiredServerFilesManifest.config?.pageExtensions;
|
||||
|
||||
@@ -821,8 +824,6 @@ export async function serverBuild({
|
||||
compressedPages,
|
||||
tracedPseudoLayer: tracedPseudoLayer.pseudoLayer,
|
||||
initialPseudoLayer,
|
||||
lambdaCompressedByteLimit,
|
||||
initialPseudoLayerUncompressed: uncompressedInitialSize,
|
||||
internalPages,
|
||||
pageExtensions,
|
||||
});
|
||||
@@ -841,8 +842,6 @@ export async function serverBuild({
|
||||
compressedPages,
|
||||
tracedPseudoLayer: tracedPseudoLayer.pseudoLayer,
|
||||
initialPseudoLayer,
|
||||
lambdaCompressedByteLimit,
|
||||
initialPseudoLayerUncompressed: uncompressedInitialSize,
|
||||
internalPages,
|
||||
pageExtensions,
|
||||
});
|
||||
@@ -857,8 +856,6 @@ export async function serverBuild({
|
||||
compressedPages,
|
||||
tracedPseudoLayer: tracedPseudoLayer.pseudoLayer,
|
||||
initialPseudoLayer,
|
||||
lambdaCompressedByteLimit,
|
||||
initialPseudoLayerUncompressed: uncompressedInitialSize,
|
||||
internalPages,
|
||||
pageExtensions,
|
||||
});
|
||||
@@ -888,8 +885,6 @@ export async function serverBuild({
|
||||
compressedPages,
|
||||
tracedPseudoLayer: tracedPseudoLayer.pseudoLayer,
|
||||
initialPseudoLayer,
|
||||
initialPseudoLayerUncompressed: uncompressedInitialSize,
|
||||
lambdaCompressedByteLimit,
|
||||
internalPages,
|
||||
pageExtensions,
|
||||
});
|
||||
@@ -905,26 +900,22 @@ export async function serverBuild({
|
||||
pages: group.pages,
|
||||
isPrerender: group.isPrerenders,
|
||||
pseudoLayerBytes: group.pseudoLayerBytes,
|
||||
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
|
||||
})),
|
||||
pageLambdaGroups: pageLambdaGroups.map(group => ({
|
||||
pages: group.pages,
|
||||
isPrerender: group.isPrerenders,
|
||||
pseudoLayerBytes: group.pseudoLayerBytes,
|
||||
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
|
||||
})),
|
||||
appRouterLambdaGroups: appRouterLambdaGroups.map(group => ({
|
||||
pages: group.pages,
|
||||
isPrerender: group.isPrerenders,
|
||||
pseudoLayerBytes: group.pseudoLayerBytes,
|
||||
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
|
||||
})),
|
||||
appRouteHandlersLambdaGroups: appRouteHandlersLambdaGroups.map(
|
||||
group => ({
|
||||
pages: group.pages,
|
||||
isPrerender: group.isPrerenders,
|
||||
pseudoLayerBytes: group.pseudoLayerBytes,
|
||||
uncompressedLayerBytes: group.pseudoLayerUncompressedBytes,
|
||||
})
|
||||
),
|
||||
nextServerLayerSize: initialPseudoLayer.pseudoLayerBytes,
|
||||
@@ -940,150 +931,152 @@ export async function serverBuild({
|
||||
...appRouteHandlersLambdaGroups,
|
||||
];
|
||||
|
||||
await detectLambdaLimitExceeding(
|
||||
combinedGroups,
|
||||
lambdaCompressedByteLimit,
|
||||
compressedPages
|
||||
);
|
||||
await detectLambdaLimitExceeding(combinedGroups, compressedPages);
|
||||
|
||||
for (const group of combinedGroups) {
|
||||
const groupPageFiles: { [key: string]: PseudoFile } = {};
|
||||
await Promise.all(
|
||||
combinedGroups.map(async group => {
|
||||
const groupPageFiles: { [key: string]: PseudoFile } = {};
|
||||
|
||||
for (const page of [...group.pages, ...internalPages]) {
|
||||
const pageFileName = path.normalize(
|
||||
path.relative(baseDir, lambdaPages[page].fsPath)
|
||||
);
|
||||
groupPageFiles[pageFileName] = compressedPages[page];
|
||||
}
|
||||
for (const page of [...group.pages, ...internalPages]) {
|
||||
const pageFileName = path.normalize(
|
||||
path.relative(baseDir, lambdaPages[page].fsPath)
|
||||
);
|
||||
groupPageFiles[pageFileName] = compressedPages[page];
|
||||
}
|
||||
|
||||
const updatedManifestFiles: { [name: string]: FileBlob } = {};
|
||||
const updatedManifestFiles: { [name: string]: FileBlob } = {};
|
||||
|
||||
if (isCorrectManifests) {
|
||||
// filter dynamic routes to only the included dynamic routes
|
||||
// in this specific serverless function so that we don't
|
||||
// accidentally match a dynamic route while resolving that
|
||||
// is not actually in this specific serverless function
|
||||
for (const manifest of [
|
||||
'routes-manifest.json',
|
||||
'server/pages-manifest.json',
|
||||
] as const) {
|
||||
const fsPath = path.join(entryPath, outputDirectory, manifest);
|
||||
if (isCorrectManifests) {
|
||||
// filter dynamic routes to only the included dynamic routes
|
||||
// in this specific serverless function so that we don't
|
||||
// accidentally match a dynamic route while resolving that
|
||||
// is not actually in this specific serverless function
|
||||
for (const manifest of [
|
||||
'routes-manifest.json',
|
||||
'server/pages-manifest.json',
|
||||
] as const) {
|
||||
const fsPath = path.join(entryPath, outputDirectory, manifest);
|
||||
|
||||
const relativePath = path.relative(baseDir, fsPath);
|
||||
delete group.pseudoLayer[relativePath];
|
||||
const relativePath = path.relative(baseDir, fsPath);
|
||||
delete group.pseudoLayer[relativePath];
|
||||
|
||||
const manifestData = await fs.readJSON(fsPath);
|
||||
const normalizedPages = new Set(
|
||||
group.pages.map(page => {
|
||||
page = `/${page.replace(/\.js$/, '')}`;
|
||||
if (page === '/index') page = '/';
|
||||
return page;
|
||||
})
|
||||
const manifestData = await fs.readJSON(fsPath);
|
||||
const normalizedPages = new Set(
|
||||
group.pages.map(page => {
|
||||
page = `/${page.replace(/\.js$/, '')}`;
|
||||
if (page === '/index') page = '/';
|
||||
return page;
|
||||
})
|
||||
);
|
||||
|
||||
switch (manifest) {
|
||||
case 'routes-manifest.json': {
|
||||
const filterItem = (item: { page: string }) =>
|
||||
normalizedPages.has(item.page);
|
||||
|
||||
manifestData.dynamicRoutes =
|
||||
manifestData.dynamicRoutes?.filter(filterItem);
|
||||
manifestData.staticRoutes =
|
||||
manifestData.staticRoutes?.filter(filterItem);
|
||||
break;
|
||||
}
|
||||
case 'server/pages-manifest.json': {
|
||||
for (const key of Object.keys(manifestData)) {
|
||||
if (isDynamicRoute(key) && !normalizedPages.has(key)) {
|
||||
delete manifestData[key];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw new NowBuildError({
|
||||
message: `Unexpected manifest value ${manifest}, please contact support if this continues`,
|
||||
code: 'NEXT_MANIFEST_INVARIANT',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
updatedManifestFiles[relativePath] = new FileBlob({
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify(manifestData),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const launcherFiles: { [name: string]: FileFsRef | FileBlob } = {
|
||||
[path.join(
|
||||
path.relative(baseDir, projectDir),
|
||||
'___next_launcher.cjs'
|
||||
)]: new FileBlob({
|
||||
data: group.isAppRouter ? appLauncher : launcher,
|
||||
}),
|
||||
};
|
||||
const operationType = getOperationType({ group, prerenderManifest });
|
||||
|
||||
const lambda = await createLambdaFromPseudoLayers({
|
||||
files: {
|
||||
...launcherFiles,
|
||||
...updatedManifestFiles,
|
||||
},
|
||||
layers: [group.pseudoLayer, groupPageFiles],
|
||||
handler: path.join(
|
||||
path.relative(baseDir, projectDir),
|
||||
'___next_launcher.cjs'
|
||||
),
|
||||
operationType,
|
||||
memory: group.memory,
|
||||
runtime: nodeVersion.runtime,
|
||||
maxDuration: group.maxDuration,
|
||||
isStreaming: group.isStreaming,
|
||||
nextVersion,
|
||||
});
|
||||
|
||||
for (const page of group.pages) {
|
||||
const pageNoExt = page.replace(/\.js$/, '');
|
||||
let isPrerender = prerenderRoutes.has(
|
||||
path.join('/', pageNoExt === 'index' ? '' : pageNoExt)
|
||||
);
|
||||
|
||||
switch (manifest) {
|
||||
case 'routes-manifest.json': {
|
||||
const filterItem = (item: { page: string }) =>
|
||||
normalizedPages.has(item.page);
|
||||
|
||||
manifestData.dynamicRoutes =
|
||||
manifestData.dynamicRoutes?.filter(filterItem);
|
||||
manifestData.staticRoutes =
|
||||
manifestData.staticRoutes?.filter(filterItem);
|
||||
break;
|
||||
}
|
||||
case 'server/pages-manifest.json': {
|
||||
for (const key of Object.keys(manifestData)) {
|
||||
if (isDynamicRoute(key) && !normalizedPages.has(key)) {
|
||||
delete manifestData[key];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw new NowBuildError({
|
||||
message: `Unexpected manifest value ${manifest}, please contact support if this continues`,
|
||||
code: 'NEXT_MANIFEST_INVARIANT',
|
||||
});
|
||||
}
|
||||
if (!isPrerender && routesManifest?.i18n) {
|
||||
isPrerender = routesManifest.i18n.locales.some(locale => {
|
||||
return prerenderRoutes.has(
|
||||
path.join('/', locale, pageNoExt === 'index' ? '' : pageNoExt)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
updatedManifestFiles[relativePath] = new FileBlob({
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify(manifestData),
|
||||
});
|
||||
}
|
||||
}
|
||||
const outputName = normalizeIndexOutput(
|
||||
path.posix.join(entryDirectory, pageNoExt),
|
||||
true
|
||||
);
|
||||
|
||||
const launcherFiles: { [name: string]: FileFsRef | FileBlob } = {
|
||||
[path.join(path.relative(baseDir, projectDir), '___next_launcher.cjs')]:
|
||||
new FileBlob({ data: group.isAppRouter ? appLauncher : launcher }),
|
||||
};
|
||||
const operationType = getOperationType({ group, prerenderManifest });
|
||||
|
||||
const lambda = await createLambdaFromPseudoLayers({
|
||||
files: {
|
||||
...launcherFiles,
|
||||
...updatedManifestFiles,
|
||||
},
|
||||
layers: [group.pseudoLayer, groupPageFiles],
|
||||
handler: path.join(
|
||||
path.relative(baseDir, projectDir),
|
||||
'___next_launcher.cjs'
|
||||
),
|
||||
operationType,
|
||||
memory: group.memory,
|
||||
runtime: nodeVersion.runtime,
|
||||
maxDuration: group.maxDuration,
|
||||
isStreaming: group.isStreaming,
|
||||
nextVersion,
|
||||
});
|
||||
|
||||
for (const page of group.pages) {
|
||||
const pageNoExt = page.replace(/\.js$/, '');
|
||||
let isPrerender = prerenderRoutes.has(
|
||||
path.join('/', pageNoExt === 'index' ? '' : pageNoExt)
|
||||
);
|
||||
|
||||
if (!isPrerender && routesManifest?.i18n) {
|
||||
isPrerender = routesManifest.i18n.locales.some(locale => {
|
||||
return prerenderRoutes.has(
|
||||
path.join('/', locale, pageNoExt === 'index' ? '' : pageNoExt)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
const outputName = normalizeIndexOutput(
|
||||
path.posix.join(entryDirectory, pageNoExt),
|
||||
true
|
||||
);
|
||||
|
||||
// we add locale prefixed outputs for SSR pages,
|
||||
// this is handled in onPrerenderRoute for SSG pages
|
||||
if (
|
||||
i18n &&
|
||||
!isPrerender &&
|
||||
!group.isAppRouter &&
|
||||
(!isCorrectLocaleAPIRoutes ||
|
||||
!(pageNoExt === 'api' || pageNoExt.startsWith('api/')))
|
||||
) {
|
||||
for (const locale of i18n.locales) {
|
||||
lambdas[
|
||||
normalizeIndexOutput(
|
||||
path.posix.join(
|
||||
entryDirectory,
|
||||
locale,
|
||||
pageNoExt === 'index' ? '' : pageNoExt
|
||||
),
|
||||
true
|
||||
)
|
||||
] = lambda;
|
||||
// we add locale prefixed outputs for SSR pages,
|
||||
// this is handled in onPrerenderRoute for SSG pages
|
||||
if (
|
||||
i18n &&
|
||||
!isPrerender &&
|
||||
!group.isAppRouter &&
|
||||
(!isCorrectLocaleAPIRoutes ||
|
||||
!(pageNoExt === 'api' || pageNoExt.startsWith('api/')))
|
||||
) {
|
||||
for (const locale of i18n.locales) {
|
||||
lambdas[
|
||||
normalizeIndexOutput(
|
||||
path.posix.join(
|
||||
entryDirectory,
|
||||
locale,
|
||||
pageNoExt === 'index' ? '' : pageNoExt
|
||||
),
|
||||
true
|
||||
)
|
||||
] = lambda;
|
||||
}
|
||||
} else {
|
||||
lambdas[outputName] = lambda;
|
||||
}
|
||||
} else {
|
||||
lambdas[outputName] = lambda;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
console.timeEnd(lambdaCreationLabel);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ if (process.env.NODE_ENV !== 'production' && region !== 'dev1') {
|
||||
process.env.NODE_ENV = 'production';
|
||||
}
|
||||
|
||||
// pre-next-server-target
|
||||
// @preserve pre-next-server-target
|
||||
|
||||
// eslint-disable-next-line
|
||||
const NextServer = require('__NEXT_SERVER_PATH__').default;
|
||||
@@ -34,7 +34,7 @@ const requestHandler = nextServer.getRequestHandler();
|
||||
|
||||
module.exports = async (req: IncomingMessage, res: ServerResponse) => {
|
||||
try {
|
||||
// entryDirectory handler
|
||||
// @preserve entryDirectory handler
|
||||
await requestHandler(req, res);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
Prerender,
|
||||
getLambdaOptionsFromFunction,
|
||||
getPlatformEnv,
|
||||
streamToBuffer,
|
||||
NowBuildError,
|
||||
isSymbolicLink,
|
||||
NodejsLambda,
|
||||
@@ -25,11 +24,9 @@ import type {
|
||||
RouteWithSrc,
|
||||
} from '@vercel/routing-utils';
|
||||
import { Sema } from 'async-sema';
|
||||
import crc32 from 'buffer-crc32';
|
||||
import fs, { lstat, stat } from 'fs-extra';
|
||||
import path from 'path';
|
||||
import semver from 'semver';
|
||||
import zlib from 'zlib';
|
||||
import url from 'url';
|
||||
import { createRequire } from 'module';
|
||||
import escapeStringRegexp from 'escape-string-regexp';
|
||||
@@ -44,7 +41,6 @@ import {
|
||||
MIB,
|
||||
KIB,
|
||||
MAX_UNCOMPRESSED_LAMBDA_SIZE,
|
||||
LAMBDA_RESERVED_COMPRESSED_SIZE,
|
||||
LAMBDA_RESERVED_UNCOMPRESSED_SIZE,
|
||||
} from './constants';
|
||||
|
||||
@@ -677,35 +673,34 @@ export function getFilesMapFromReasons(
|
||||
return parentFilesMap;
|
||||
}
|
||||
|
||||
export const collectTracedFiles =
|
||||
(
|
||||
baseDir: string,
|
||||
lstatResults: { [key: string]: ReturnType<typeof lstat> },
|
||||
lstatSema: Sema,
|
||||
reasons: NodeFileTraceReasons,
|
||||
files: { [filePath: string]: FileFsRef }
|
||||
) =>
|
||||
async (file: string) => {
|
||||
const reason = reasons.get(file);
|
||||
if (reason && reason.type.includes('initial')) {
|
||||
// Initial files are manually added to the lambda later
|
||||
return;
|
||||
}
|
||||
const filePath = path.join(baseDir, file);
|
||||
export const collectTracedFiles = async (
|
||||
file: string,
|
||||
baseDir: string,
|
||||
lstatResults: { [key: string]: ReturnType<typeof lstat> },
|
||||
lstatSema: Sema,
|
||||
reasons: NodeFileTraceReasons,
|
||||
files: { [filePath: string]: FileFsRef }
|
||||
) => {
|
||||
const reason = reasons.get(file);
|
||||
if (reason && reason.type.includes('initial')) {
|
||||
// Initial files are manually added to the lambda later
|
||||
return;
|
||||
}
|
||||
const filePath = path.join(baseDir, file);
|
||||
|
||||
if (!lstatResults[filePath]) {
|
||||
lstatResults[filePath] = lstatSema
|
||||
.acquire()
|
||||
.then(() => lstat(filePath))
|
||||
.finally(() => lstatSema.release());
|
||||
}
|
||||
const { mode } = await lstatResults[filePath];
|
||||
if (!lstatResults[filePath]) {
|
||||
lstatResults[filePath] = lstatSema
|
||||
.acquire()
|
||||
.then(() => lstat(filePath))
|
||||
.finally(() => lstatSema.release());
|
||||
}
|
||||
const { mode } = await lstatResults[filePath];
|
||||
|
||||
files[file] = new FileFsRef({
|
||||
fsPath: path.join(baseDir, file),
|
||||
mode,
|
||||
});
|
||||
};
|
||||
files[file] = new FileFsRef({
|
||||
fsPath: path.join(baseDir, file),
|
||||
mode,
|
||||
});
|
||||
};
|
||||
|
||||
export const ExperimentalTraceVersion = `9.0.4-canary.1`;
|
||||
|
||||
@@ -716,8 +711,6 @@ export type PseudoLayer = {
|
||||
export type PseudoFile = {
|
||||
file: FileFsRef;
|
||||
isSymlink: false;
|
||||
crc32: number;
|
||||
compBuffer: Buffer;
|
||||
uncompressedSize: number;
|
||||
};
|
||||
|
||||
@@ -727,54 +720,57 @@ export type PseudoSymbolicLink = {
|
||||
symlinkTarget: string;
|
||||
};
|
||||
|
||||
const compressBuffer = (buf: Buffer): Promise<Buffer> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
zlib.deflateRaw(
|
||||
buf,
|
||||
{ level: zlib.constants.Z_BEST_COMPRESSION },
|
||||
(err, compBuf) => {
|
||||
if (err) return reject(err);
|
||||
resolve(compBuf);
|
||||
}
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
export type PseudoLayerResult = {
|
||||
pseudoLayer: PseudoLayer;
|
||||
pseudoLayerBytes: number;
|
||||
};
|
||||
|
||||
export async function createPseudoLayer(files: {
|
||||
[fileName: string]: FileFsRef;
|
||||
export async function createPseudoLayer({
|
||||
files,
|
||||
lstatSema,
|
||||
lstatResults,
|
||||
}: {
|
||||
lstatSema: Sema;
|
||||
lstatResults: { [key: string]: ReturnType<typeof lstat> };
|
||||
files: {
|
||||
[fileName: string]: FileFsRef;
|
||||
};
|
||||
}): Promise<PseudoLayerResult> {
|
||||
const pseudoLayer: PseudoLayer = {};
|
||||
let pseudoLayerBytes = 0;
|
||||
const pseudoLayer: PseudoLayer = {};
|
||||
const fileNames = Object.keys(files);
|
||||
|
||||
for (const fileName of Object.keys(files)) {
|
||||
const file = files[fileName];
|
||||
await Promise.all(
|
||||
fileNames.map(async fileName => {
|
||||
await lstatSema.acquire();
|
||||
const file = files[fileName];
|
||||
|
||||
if (isSymbolicLink(file.mode)) {
|
||||
const symlinkTarget = await fs.readlink(file.fsPath);
|
||||
pseudoLayer[fileName] = {
|
||||
file,
|
||||
isSymlink: true,
|
||||
symlinkTarget,
|
||||
};
|
||||
} else {
|
||||
const origBuffer = await streamToBuffer(file.toStream());
|
||||
const compBuffer = await compressBuffer(origBuffer);
|
||||
pseudoLayerBytes += compBuffer.byteLength;
|
||||
pseudoLayer[fileName] = {
|
||||
file,
|
||||
compBuffer,
|
||||
isSymlink: false,
|
||||
crc32: crc32.unsigned(origBuffer),
|
||||
uncompressedSize: origBuffer.byteLength,
|
||||
};
|
||||
}
|
||||
}
|
||||
if (isSymbolicLink(file.mode)) {
|
||||
const symlinkTarget = await fs.readlink(file.fsPath);
|
||||
pseudoLayer[fileName] = {
|
||||
file,
|
||||
isSymlink: true,
|
||||
symlinkTarget,
|
||||
};
|
||||
} else {
|
||||
if (!lstatResults[file.fsPath]) {
|
||||
lstatResults[file.fsPath] = lstatSema
|
||||
.acquire()
|
||||
.then(() => lstat(file.fsPath))
|
||||
.finally(() => lstatSema.release());
|
||||
}
|
||||
const { size } = await lstatResults[file.fsPath];
|
||||
|
||||
pseudoLayerBytes += size;
|
||||
pseudoLayer[fileName] = {
|
||||
file,
|
||||
isSymlink: false,
|
||||
uncompressedSize: size,
|
||||
};
|
||||
}
|
||||
lstatSema.release();
|
||||
})
|
||||
);
|
||||
return { pseudoLayer, pseudoLayerBytes };
|
||||
}
|
||||
|
||||
@@ -784,10 +780,6 @@ interface CreateLambdaFromPseudoLayersOptions extends LambdaOptionsWithFiles {
|
||||
nextVersion?: string;
|
||||
}
|
||||
|
||||
// measured with 1, 2, 5, 10, and `os.cpus().length || 5`
|
||||
// and sema(1) produced the best results
|
||||
const createLambdaSema = new Sema(1);
|
||||
|
||||
export async function createLambdaFromPseudoLayers({
|
||||
files: baseFiles,
|
||||
layers,
|
||||
@@ -795,8 +787,6 @@ export async function createLambdaFromPseudoLayers({
|
||||
nextVersion,
|
||||
...lambdaOptions
|
||||
}: CreateLambdaFromPseudoLayersOptions) {
|
||||
await createLambdaSema.acquire();
|
||||
|
||||
const files: Files = {};
|
||||
const addedFiles = new Set();
|
||||
|
||||
@@ -823,8 +813,6 @@ export async function createLambdaFromPseudoLayers({
|
||||
addedFiles.add(fileName);
|
||||
}
|
||||
|
||||
createLambdaSema.release();
|
||||
|
||||
return new NodejsLambda({
|
||||
...lambdaOptions,
|
||||
...(isStreaming
|
||||
@@ -1421,7 +1409,6 @@ export type LambdaGroup = {
|
||||
isApiLambda: boolean;
|
||||
pseudoLayer: PseudoLayer;
|
||||
pseudoLayerBytes: number;
|
||||
pseudoLayerUncompressedBytes: number;
|
||||
};
|
||||
|
||||
export async function getPageLambdaGroups({
|
||||
@@ -1434,8 +1421,6 @@ export async function getPageLambdaGroups({
|
||||
compressedPages,
|
||||
tracedPseudoLayer,
|
||||
initialPseudoLayer,
|
||||
initialPseudoLayerUncompressed,
|
||||
lambdaCompressedByteLimit,
|
||||
internalPages,
|
||||
pageExtensions,
|
||||
}: {
|
||||
@@ -1454,8 +1439,6 @@ export async function getPageLambdaGroups({
|
||||
};
|
||||
tracedPseudoLayer: PseudoLayer;
|
||||
initialPseudoLayer: PseudoLayerResult;
|
||||
initialPseudoLayerUncompressed: number;
|
||||
lambdaCompressedByteLimit: number;
|
||||
internalPages: string[];
|
||||
pageExtensions?: string[];
|
||||
}) {
|
||||
@@ -1497,19 +1480,16 @@ export async function getPageLambdaGroups({
|
||||
group.isPrerenders === isPrerenderRoute;
|
||||
|
||||
if (matches) {
|
||||
let newTracedFilesSize = group.pseudoLayerBytes;
|
||||
let newTracedFilesUncompressedSize = group.pseudoLayerUncompressedBytes;
|
||||
let newTracedFilesUncompressedSize = group.pseudoLayerBytes;
|
||||
|
||||
for (const newPage of newPages) {
|
||||
Object.keys(pageTraces[newPage] || {}).map(file => {
|
||||
if (!group.pseudoLayer[file]) {
|
||||
const item = tracedPseudoLayer[file] as PseudoFile;
|
||||
|
||||
newTracedFilesSize += item.compBuffer?.byteLength || 0;
|
||||
newTracedFilesUncompressedSize += item.uncompressedSize || 0;
|
||||
}
|
||||
});
|
||||
newTracedFilesSize += compressedPages[newPage].compBuffer.byteLength;
|
||||
newTracedFilesUncompressedSize +=
|
||||
compressedPages[newPage].uncompressedSize;
|
||||
}
|
||||
@@ -1517,11 +1497,8 @@ export async function getPageLambdaGroups({
|
||||
const underUncompressedLimit =
|
||||
newTracedFilesUncompressedSize <
|
||||
MAX_UNCOMPRESSED_LAMBDA_SIZE - LAMBDA_RESERVED_UNCOMPRESSED_SIZE;
|
||||
const underCompressedLimit =
|
||||
newTracedFilesSize <
|
||||
lambdaCompressedByteLimit - LAMBDA_RESERVED_COMPRESSED_SIZE;
|
||||
|
||||
return underUncompressedLimit && underCompressedLimit;
|
||||
return underUncompressedLimit;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
@@ -1535,7 +1512,6 @@ export async function getPageLambdaGroups({
|
||||
isPrerenders: isPrerenderRoute,
|
||||
isApiLambda: !!isApiPage(page),
|
||||
pseudoLayerBytes: initialPseudoLayer.pseudoLayerBytes,
|
||||
pseudoLayerUncompressedBytes: initialPseudoLayerUncompressed,
|
||||
pseudoLayer: Object.assign({}, initialPseudoLayer.pseudoLayer),
|
||||
};
|
||||
groups.push(newGroup);
|
||||
@@ -1545,21 +1521,16 @@ export async function getPageLambdaGroups({
|
||||
for (const newPage of newPages) {
|
||||
Object.keys(pageTraces[newPage] || {}).map(file => {
|
||||
const pseudoItem = tracedPseudoLayer[file] as PseudoFile;
|
||||
const compressedSize = pseudoItem?.compBuffer?.byteLength || 0;
|
||||
|
||||
if (!matchingGroup!.pseudoLayer[file]) {
|
||||
matchingGroup!.pseudoLayer[file] = pseudoItem;
|
||||
matchingGroup!.pseudoLayerBytes += compressedSize;
|
||||
matchingGroup!.pseudoLayerUncompressedBytes +=
|
||||
pseudoItem.uncompressedSize || 0;
|
||||
matchingGroup!.pseudoLayerBytes += pseudoItem.uncompressedSize || 0;
|
||||
}
|
||||
});
|
||||
|
||||
// ensure the page file itself is accounted for when grouping as
|
||||
// large pages can be created that can push the group over the limit
|
||||
matchingGroup!.pseudoLayerBytes +=
|
||||
compressedPages[newPage].compBuffer.byteLength;
|
||||
matchingGroup!.pseudoLayerUncompressedBytes +=
|
||||
compressedPages[newPage].uncompressedSize;
|
||||
}
|
||||
}
|
||||
@@ -1571,7 +1542,6 @@ export const outputFunctionFileSizeInfo = (
|
||||
pages: string[],
|
||||
pseudoLayer: PseudoLayer,
|
||||
pseudoLayerBytes: number,
|
||||
pseudoLayerUncompressedBytes: number,
|
||||
compressedPages: {
|
||||
[page: string]: PseudoFile;
|
||||
}
|
||||
@@ -1583,15 +1553,10 @@ export const outputFunctionFileSizeInfo = (
|
||||
', '
|
||||
)}`
|
||||
);
|
||||
exceededLimitOutput.push([
|
||||
'Large Dependencies',
|
||||
'Uncompressed size',
|
||||
'Compressed size',
|
||||
]);
|
||||
exceededLimitOutput.push(['Large Dependencies', 'Uncompressed size']);
|
||||
|
||||
const dependencies: {
|
||||
[key: string]: {
|
||||
compressed: number;
|
||||
uncompressed: number;
|
||||
};
|
||||
} = {};
|
||||
@@ -1603,19 +1568,16 @@ export const outputFunctionFileSizeInfo = (
|
||||
|
||||
if (!dependencies[depKey]) {
|
||||
dependencies[depKey] = {
|
||||
compressed: 0,
|
||||
uncompressed: 0,
|
||||
};
|
||||
}
|
||||
|
||||
dependencies[depKey].compressed += fileItem.compBuffer.byteLength;
|
||||
dependencies[depKey].uncompressed += fileItem.uncompressedSize;
|
||||
}
|
||||
}
|
||||
|
||||
for (const page of pages) {
|
||||
dependencies[`pages/${page}`] = {
|
||||
compressed: compressedPages[page].compBuffer.byteLength,
|
||||
uncompressed: compressedPages[page].uncompressedSize,
|
||||
};
|
||||
}
|
||||
@@ -1627,10 +1589,10 @@ export const outputFunctionFileSizeInfo = (
|
||||
const aDep = dependencies[a];
|
||||
const bDep = dependencies[b];
|
||||
|
||||
if (aDep.compressed > bDep.compressed) {
|
||||
if (aDep.uncompressed > bDep.uncompressed) {
|
||||
return -1;
|
||||
}
|
||||
if (aDep.compressed < bDep.compressed) {
|
||||
if (aDep.uncompressed < bDep.uncompressed) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -1638,15 +1600,11 @@ export const outputFunctionFileSizeInfo = (
|
||||
.forEach(depKey => {
|
||||
const dep = dependencies[depKey];
|
||||
|
||||
if (dep.compressed < 100 * KIB && dep.uncompressed < 500 * KIB) {
|
||||
if (dep.uncompressed < 500 * KIB) {
|
||||
// ignore smaller dependencies to reduce noise
|
||||
return;
|
||||
}
|
||||
exceededLimitOutput.push([
|
||||
depKey,
|
||||
prettyBytes(dep.uncompressed),
|
||||
prettyBytes(dep.compressed),
|
||||
]);
|
||||
exceededLimitOutput.push([depKey, prettyBytes(dep.uncompressed)]);
|
||||
numLargeDependencies += 1;
|
||||
});
|
||||
|
||||
@@ -1657,11 +1615,7 @@ export const outputFunctionFileSizeInfo = (
|
||||
}
|
||||
|
||||
exceededLimitOutput.push([]);
|
||||
exceededLimitOutput.push([
|
||||
'All dependencies',
|
||||
prettyBytes(pseudoLayerUncompressedBytes),
|
||||
prettyBytes(pseudoLayerBytes),
|
||||
]);
|
||||
exceededLimitOutput.push(['All dependencies', prettyBytes(pseudoLayerBytes)]);
|
||||
|
||||
console.log(
|
||||
textTable(exceededLimitOutput, {
|
||||
@@ -1672,13 +1626,11 @@ export const outputFunctionFileSizeInfo = (
|
||||
|
||||
export const detectLambdaLimitExceeding = async (
|
||||
lambdaGroups: LambdaGroup[],
|
||||
compressedSizeLimit: number,
|
||||
compressedPages: {
|
||||
[page: string]: PseudoFile;
|
||||
}
|
||||
) => {
|
||||
// show debug info if within 5 MB of exceeding the limit
|
||||
const COMPRESSED_SIZE_LIMIT_CLOSE = compressedSizeLimit - 5 * MIB;
|
||||
const UNCOMPRESSED_SIZE_LIMIT_CLOSE = MAX_UNCOMPRESSED_LAMBDA_SIZE - 5 * MIB;
|
||||
|
||||
let numExceededLimit = 0;
|
||||
@@ -1688,13 +1640,9 @@ export const detectLambdaLimitExceeding = async (
|
||||
// pre-iterate to see if we are going to exceed the limit
|
||||
// or only get close so our first log line can be correct
|
||||
const filteredGroups = lambdaGroups.filter(group => {
|
||||
const exceededLimit =
|
||||
group.pseudoLayerBytes > compressedSizeLimit ||
|
||||
group.pseudoLayerUncompressedBytes > MAX_UNCOMPRESSED_LAMBDA_SIZE;
|
||||
const exceededLimit = group.pseudoLayerBytes > MAX_UNCOMPRESSED_LAMBDA_SIZE;
|
||||
|
||||
const closeToLimit =
|
||||
group.pseudoLayerBytes > COMPRESSED_SIZE_LIMIT_CLOSE ||
|
||||
group.pseudoLayerUncompressedBytes > UNCOMPRESSED_SIZE_LIMIT_CLOSE;
|
||||
const closeToLimit = group.pseudoLayerBytes > UNCOMPRESSED_SIZE_LIMIT_CLOSE;
|
||||
|
||||
if (
|
||||
closeToLimit ||
|
||||
@@ -1717,8 +1665,6 @@ export const detectLambdaLimitExceeding = async (
|
||||
if (numExceededLimit || numCloseToLimit) {
|
||||
console.log(
|
||||
`Warning: Max serverless function size of ${prettyBytes(
|
||||
compressedSizeLimit
|
||||
)} compressed or ${prettyBytes(
|
||||
MAX_UNCOMPRESSED_LAMBDA_SIZE
|
||||
)} uncompressed${numExceededLimit ? '' : ' almost'} reached`
|
||||
);
|
||||
@@ -1732,7 +1678,6 @@ export const detectLambdaLimitExceeding = async (
|
||||
group.pages,
|
||||
group.pseudoLayer,
|
||||
group.pseudoLayerBytes,
|
||||
group.pseudoLayerUncompressedBytes,
|
||||
compressedPages
|
||||
);
|
||||
}
|
||||
@@ -2567,11 +2512,15 @@ export function normalizeEdgeFunctionPath(
|
||||
appPathRoutesManifest[ogRoute] ||
|
||||
shortPath.replace(/(^|\/)(page|route)$/, '')
|
||||
).replace(/^\//, '');
|
||||
|
||||
if (!shortPath || shortPath === '/') {
|
||||
shortPath = 'index';
|
||||
}
|
||||
}
|
||||
|
||||
if (shortPath.startsWith('pages/')) {
|
||||
shortPath = shortPath.replace(/^pages\//, '');
|
||||
}
|
||||
if (!shortPath || shortPath === '/') {
|
||||
shortPath = 'index';
|
||||
}
|
||||
|
||||
return shortPath;
|
||||
}
|
||||
|
||||
|
||||
11
packages/next/test/fixtures/36-instrumentation-hook/app/api/edge/route.js
vendored
Normal file
11
packages/next/test/fixtures/36-instrumentation-hook/app/api/edge/route.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
export const runtime = 'edge'
|
||||
|
||||
export async function GET(request) {
|
||||
return NextResponse.json({
|
||||
runtime: 'edge',
|
||||
payload: `isOdd: ${globalThis.isOdd ? globalThis.isOdd(2) : 'unknown'}`,
|
||||
})
|
||||
}
|
||||
10
packages/next/test/fixtures/36-instrumentation-hook/app/api/node/route.js
vendored
Normal file
10
packages/next/test/fixtures/36-instrumentation-hook/app/api/node/route.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export async function GET(request) {
|
||||
return NextResponse.json({
|
||||
runtime: 'node',
|
||||
payload: `isOdd: ${globalThis.isOdd ? globalThis.isOdd(2) : 'unknown'}`,
|
||||
})
|
||||
}
|
||||
15
packages/next/test/fixtures/36-instrumentation-hook/app/edge/page.jsx
vendored
Normal file
15
packages/next/test/fixtures/36-instrumentation-hook/app/edge/page.jsx
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
export const dynamic = 'force-dynamic';
|
||||
export const runtime = 'edge';
|
||||
|
||||
export default async function EdgePage() {
|
||||
const { props } = await getServerSideProps();
|
||||
return `(edge) isOdd: ${props.isOdd}`;
|
||||
}
|
||||
|
||||
async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
isOdd: globalThis.isOdd ? globalThis.isOdd(2) : 'unknown',
|
||||
},
|
||||
};
|
||||
}
|
||||
9
packages/next/test/fixtures/36-instrumentation-hook/app/layout.jsx
vendored
Normal file
9
packages/next/test/fixtures/36-instrumentation-hook/app/layout.jsx
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
14
packages/next/test/fixtures/36-instrumentation-hook/app/node/page.jsx
vendored
Normal file
14
packages/next/test/fixtures/36-instrumentation-hook/app/node/page.jsx
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default async function NodePage() {
|
||||
const { props } = await getServerSideProps();
|
||||
return `(node) isOdd: ${props.isOdd}`;
|
||||
}
|
||||
|
||||
async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
isOdd: globalThis.isOdd ? globalThis.isOdd(2) : 'unknown',
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1,8 +1,56 @@
|
||||
const path = require('path');
|
||||
const { deployAndTest } = require('../../utils');
|
||||
const { describe } = require('node:test');
|
||||
const fetch = require('../../../../../test/lib/deployment/fetch-retry');
|
||||
|
||||
const ctx = {};
|
||||
|
||||
describe(`${__dirname.split(path.sep).pop()}`, () => {
|
||||
// this test needs to run first to set ctx.deploymentUrl
|
||||
it('should deploy and pass probe checks', async () => {
|
||||
await deployAndTest(__dirname);
|
||||
const info = await deployAndTest(__dirname);
|
||||
Object.assign(ctx, info);
|
||||
});
|
||||
|
||||
it('node: should be able to use the instrumentation code in a app router page', async () => {
|
||||
const endpoint = `${ctx.deploymentUrl}/node`;
|
||||
console.log(endpoint)
|
||||
const res = await fetch(endpoint);
|
||||
expect(res.status).toBe(200);
|
||||
const text = await res.text();
|
||||
expect(text).toContain(`(node) isOdd: false`);
|
||||
});
|
||||
|
||||
it('node: should be able to use the instrumentation code in a route handler', async () => {
|
||||
const endpoint = `${ctx.deploymentUrl}/api/node`;
|
||||
console.log(endpoint)
|
||||
const res = await fetch(endpoint);
|
||||
expect(res.status).toBe(200);
|
||||
const data = await res.json();
|
||||
expect(data).toEqual({
|
||||
runtime: 'node',
|
||||
payload: 'isOdd: false',
|
||||
});
|
||||
});
|
||||
|
||||
it('edge: should be able to use the instrumentation code in a app router page', async () => {
|
||||
const endpoint = `${ctx.deploymentUrl}/edge`;
|
||||
console.log(endpoint)
|
||||
const res = await fetch(endpoint);
|
||||
expect(res.status).toBe(200);
|
||||
const text = await res.text();
|
||||
expect(text).toContain(`(edge) isOdd: false`);
|
||||
});
|
||||
|
||||
it('edge: should be able to use the instrumentation code in a route handler', async () => {
|
||||
const endpoint = `${ctx.deploymentUrl}/api/edge`;
|
||||
console.log(endpoint)
|
||||
const res = await fetch(endpoint);
|
||||
expect(res.status).toBe(200);
|
||||
const data = await res.json();
|
||||
expect(data).toEqual({
|
||||
runtime: 'edge',
|
||||
payload: 'isOdd: false',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ export default function Home(props) {
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
isOdd: globalThis.isOdd(2),
|
||||
isOdd: globalThis.isOdd ? globalThis.isOdd(2) : 'unknown',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
35
packages/next/test/fixtures/38-cold-boot-lab/.gitignore
vendored
Normal file
35
packages/next/test/fixtures/38-cold-boot-lab/.gitignore
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
BIN
packages/next/test/fixtures/38-cold-boot-lab/app/favicon.ico
vendored
Normal file
BIN
packages/next/test/fixtures/38-cold-boot-lab/app/favicon.ico
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
7
packages/next/test/fixtures/38-cold-boot-lab/app/layout.js
vendored
Normal file
7
packages/next/test/fixtures/38-cold-boot-lab/app/layout.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export default function RootLayout({ children }) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
5
packages/next/test/fixtures/38-cold-boot-lab/app/page.js
vendored
Normal file
5
packages/next/test/fixtures/38-cold-boot-lab/app/page.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export default function Home() {
|
||||
return "Hello World!";
|
||||
}
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
8
packages/next/test/fixtures/38-cold-boot-lab/index.test.js
vendored
Normal file
8
packages/next/test/fixtures/38-cold-boot-lab/index.test.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
const path = require('path');
|
||||
const { deployAndTest } = require('../../utils');
|
||||
|
||||
describe(`${__dirname.split(path.sep).pop()}`, () => {
|
||||
it('should deploy and pass probe checks', async () => {
|
||||
await deployAndTest(__dirname);
|
||||
});
|
||||
});
|
||||
16
packages/next/test/fixtures/38-cold-boot-lab/package.json
vendored
Normal file
16
packages/next/test/fixtures/38-cold-boot-lab/package.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "next",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "13.4.12",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
}
|
||||
}
|
||||
270
packages/next/test/fixtures/38-cold-boot-lab/pnpm-lock.yaml
generated
vendored
Normal file
270
packages/next/test/fixtures/38-cold-boot-lab/pnpm-lock.yaml
generated
vendored
Normal file
@@ -0,0 +1,270 @@
|
||||
lockfileVersion: '6.0'
|
||||
|
||||
importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
next:
|
||||
specifier: 13.4.12
|
||||
version: 13.4.12(react-dom@18.2.0)(react@18.2.0)
|
||||
react:
|
||||
specifier: 18.2.0
|
||||
version: 18.2.0
|
||||
react-dom:
|
||||
specifier: 18.2.0
|
||||
version: 18.2.0(react@18.2.0)
|
||||
|
||||
packages:
|
||||
|
||||
/@next/env@13.4.12:
|
||||
resolution: {integrity: sha512-RmHanbV21saP/6OEPBJ7yJMuys68cIf8OBBWd7+uj40LdpmswVAwe1uzeuFyUsd6SfeITWT3XnQfn6wULeKwDQ==}
|
||||
dev: false
|
||||
|
||||
/@next/swc-darwin-arm64@13.4.12:
|
||||
resolution: {integrity: sha512-deUrbCXTMZ6ZhbOoloqecnUeNpUOupi8SE2tx4jPfNS9uyUR9zK4iXBvH65opVcA/9F5I/p8vDXSYbUlbmBjZg==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@next/swc-darwin-x64@13.4.12:
|
||||
resolution: {integrity: sha512-WRvH7RxgRHlC1yb5oG0ZLx8F7uci9AivM5/HGGv9ZyG2Als8Ij64GC3d+mQ5sJhWjusyU6T6V1WKTUoTmOB0zQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@next/swc-linux-arm64-gnu@13.4.12:
|
||||
resolution: {integrity: sha512-YEKracAWuxp54tKiAvvq73PUs9lok57cc8meYRibTWe/VdPB2vLgkTVWFcw31YDuRXdEhdX0fWS6Q+ESBhnEig==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@next/swc-linux-arm64-musl@13.4.12:
|
||||
resolution: {integrity: sha512-LhJR7/RAjdHJ2Isl2pgc/JaoxNk0KtBgkVpiDJPVExVWA1c6gzY57+3zWuxuyWzTG+fhLZo2Y80pLXgIJv7g3g==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@next/swc-linux-x64-gnu@13.4.12:
|
||||
resolution: {integrity: sha512-1DWLL/B9nBNiQRng+1aqs3OaZcxC16Nf+mOnpcrZZSdyKHek3WQh6j/fkbukObgNGwmCoVevLUa/p3UFTTqgqg==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@next/swc-linux-x64-musl@13.4.12:
|
||||
resolution: {integrity: sha512-kEAJmgYFhp0VL+eRWmUkVxLVunn7oL9Mdue/FS8yzRBVj7Z0AnIrHpTIeIUl1bbdQq1VaoOztnKicAjfkLTRCQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@next/swc-win32-arm64-msvc@13.4.12:
|
||||
resolution: {integrity: sha512-GMLuL/loR6yIIRTnPRY6UGbLL9MBdw2anxkOnANxvLvsml4F0HNIgvnU3Ej4BjbqMTNjD4hcPFdlEow4XHPdZA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@next/swc-win32-ia32-msvc@13.4.12:
|
||||
resolution: {integrity: sha512-PhgNqN2Vnkm7XaMdRmmX0ZSwZXQAtamBVSa9A/V1dfKQCV1rjIZeiy/dbBnVYGdj63ANfsOR/30XpxP71W0eww==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@next/swc-win32-x64-msvc@13.4.12:
|
||||
resolution: {integrity: sha512-Z+56e/Ljt0bUs+T+jPjhFyxYBcdY2RIq9ELFU+qAMQMteHo7ymbV7CKmlcX59RI9C4YzN8PgMgLyAoi916b5HA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/@swc/helpers@0.5.1:
|
||||
resolution: {integrity: sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==}
|
||||
dependencies:
|
||||
tslib: 2.6.1
|
||||
dev: false
|
||||
|
||||
/busboy@1.6.0:
|
||||
resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==}
|
||||
engines: {node: '>=10.16.0'}
|
||||
dependencies:
|
||||
streamsearch: 1.1.0
|
||||
dev: false
|
||||
|
||||
/caniuse-lite@1.0.30001517:
|
||||
resolution: {integrity: sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==}
|
||||
dev: false
|
||||
|
||||
/client-only@0.0.1:
|
||||
resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}
|
||||
dev: false
|
||||
|
||||
/glob-to-regexp@0.4.1:
|
||||
resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==}
|
||||
dev: false
|
||||
|
||||
/graceful-fs@4.2.11:
|
||||
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||
dev: false
|
||||
|
||||
/js-tokens@4.0.0:
|
||||
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
|
||||
dev: false
|
||||
|
||||
/loose-envify@1.4.0:
|
||||
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
js-tokens: 4.0.0
|
||||
dev: false
|
||||
|
||||
/nanoid@3.3.6:
|
||||
resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==}
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/next@13.4.12(react-dom@18.2.0)(react@18.2.0):
|
||||
resolution: {integrity: sha512-eHfnru9x6NRmTMcjQp6Nz0J4XH9OubmzOa7CkWL+AUrUxpibub3vWwttjduu9No16dug1kq04hiUUpo7J3m3Xw==}
|
||||
engines: {node: '>=16.8.0'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@opentelemetry/api': ^1.1.0
|
||||
fibers: '>= 3.1.0'
|
||||
react: ^18.2.0
|
||||
react-dom: ^18.2.0
|
||||
sass: ^1.3.0
|
||||
peerDependenciesMeta:
|
||||
'@opentelemetry/api':
|
||||
optional: true
|
||||
fibers:
|
||||
optional: true
|
||||
sass:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@next/env': 13.4.12
|
||||
'@swc/helpers': 0.5.1
|
||||
busboy: 1.6.0
|
||||
caniuse-lite: 1.0.30001517
|
||||
postcss: 8.4.14
|
||||
react: 18.2.0
|
||||
react-dom: 18.2.0(react@18.2.0)
|
||||
styled-jsx: 5.1.1(react@18.2.0)
|
||||
watchpack: 2.4.0
|
||||
zod: 3.21.4
|
||||
optionalDependencies:
|
||||
'@next/swc-darwin-arm64': 13.4.12
|
||||
'@next/swc-darwin-x64': 13.4.12
|
||||
'@next/swc-linux-arm64-gnu': 13.4.12
|
||||
'@next/swc-linux-arm64-musl': 13.4.12
|
||||
'@next/swc-linux-x64-gnu': 13.4.12
|
||||
'@next/swc-linux-x64-musl': 13.4.12
|
||||
'@next/swc-win32-arm64-msvc': 13.4.12
|
||||
'@next/swc-win32-ia32-msvc': 13.4.12
|
||||
'@next/swc-win32-x64-msvc': 13.4.12
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- babel-plugin-macros
|
||||
dev: false
|
||||
|
||||
/picocolors@1.0.0:
|
||||
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
|
||||
dev: false
|
||||
|
||||
/postcss@8.4.14:
|
||||
resolution: {integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==}
|
||||
engines: {node: ^10 || ^12 || >=14}
|
||||
dependencies:
|
||||
nanoid: 3.3.6
|
||||
picocolors: 1.0.0
|
||||
source-map-js: 1.0.2
|
||||
dev: false
|
||||
|
||||
/react-dom@18.2.0(react@18.2.0):
|
||||
resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==}
|
||||
peerDependencies:
|
||||
react: ^18.2.0
|
||||
dependencies:
|
||||
loose-envify: 1.4.0
|
||||
react: 18.2.0
|
||||
scheduler: 0.23.0
|
||||
dev: false
|
||||
|
||||
/react@18.2.0:
|
||||
resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dependencies:
|
||||
loose-envify: 1.4.0
|
||||
dev: false
|
||||
|
||||
/scheduler@0.23.0:
|
||||
resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==}
|
||||
dependencies:
|
||||
loose-envify: 1.4.0
|
||||
dev: false
|
||||
|
||||
/source-map-js@1.0.2:
|
||||
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/streamsearch@1.1.0:
|
||||
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
dev: false
|
||||
|
||||
/styled-jsx@5.1.1(react@18.2.0):
|
||||
resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==}
|
||||
engines: {node: '>= 12.0.0'}
|
||||
peerDependencies:
|
||||
'@babel/core': '*'
|
||||
babel-plugin-macros: '*'
|
||||
react: '>= 16.8.0 || 17.x.x || ^18.0.0-0'
|
||||
peerDependenciesMeta:
|
||||
'@babel/core':
|
||||
optional: true
|
||||
babel-plugin-macros:
|
||||
optional: true
|
||||
dependencies:
|
||||
client-only: 0.0.1
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
|
||||
/tslib@2.6.1:
|
||||
resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==}
|
||||
dev: false
|
||||
|
||||
/watchpack@2.4.0:
|
||||
resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
dependencies:
|
||||
glob-to-regexp: 0.4.1
|
||||
graceful-fs: 4.2.11
|
||||
dev: false
|
||||
|
||||
/zod@3.21.4:
|
||||
resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==}
|
||||
dev: false
|
||||
@@ -245,6 +245,8 @@ it('Should invoke build command with serverless-no-config', async () => {
|
||||
).toBeFalsy();
|
||||
});
|
||||
|
||||
// TODO: should we delete these tests, they are unreliable as size can fluctuate
|
||||
// and also requires creating massive lambdas (> 250MB) to test
|
||||
// eslint-disable-next-line jest/no-disabled-tests
|
||||
it.skip('Should not exceed function limit for large dependencies (server build)', async () => {
|
||||
let logs = '';
|
||||
@@ -350,7 +352,8 @@ it.skip('Should not exceed function limit for large dependencies (shared lambda)
|
||||
expect(logs).toContain('node_modules/chrome-aws-lambda/bin');
|
||||
});
|
||||
|
||||
it('Should provide lambda info when limit is hit (server build)', async () => {
|
||||
// eslint-disable-next-line jest/no-disabled-tests
|
||||
it.skip('Should provide lambda info when limit is hit (server build)', async () => {
|
||||
let logs = '';
|
||||
|
||||
const origLog = console.log;
|
||||
@@ -373,7 +376,7 @@ it('Should provide lambda info when limit is hit (server build)', async () => {
|
||||
'Max serverless function size was exceeded for 2 functions'
|
||||
);
|
||||
expect(logs).toContain(
|
||||
'Max serverless function size of 50 MB compressed or 250 MB uncompressed reached'
|
||||
'Max serverless function size of 250 MB uncompressed reached'
|
||||
);
|
||||
expect(logs).toContain(`Serverless Function's page: api/both.js`);
|
||||
expect(logs).toMatch(
|
||||
@@ -387,7 +390,8 @@ it('Should provide lambda info when limit is hit (server build)', async () => {
|
||||
expect(logs).toMatch(/big-image-2/);
|
||||
});
|
||||
|
||||
it('Should provide lambda info when limit is hit (shared lambdas)', async () => {
|
||||
// eslint-disable-next-line jest/no-disabled-tests
|
||||
it.skip('Should provide lambda info when limit is hit (shared lambdas)', async () => {
|
||||
let logs = '';
|
||||
|
||||
const origLog = console.log;
|
||||
@@ -410,7 +414,7 @@ it('Should provide lambda info when limit is hit (shared lambdas)', async () =>
|
||||
'Max serverless function size was exceeded for 1 function'
|
||||
);
|
||||
expect(logs).toContain(
|
||||
'Max serverless function size of 50 MB compressed or 250 MB uncompressed reached'
|
||||
'Max serverless function size of 250 MB uncompressed reached'
|
||||
);
|
||||
expect(logs).toContain(`Serverless Function's page: api/both.js`);
|
||||
expect(logs).toMatch(
|
||||
@@ -422,7 +426,8 @@ it('Should provide lambda info when limit is hit (shared lambdas)', async () =>
|
||||
expect(logs).toMatch(/node_modules\/@firebase\/firestore.*?\d{1}.*?MB/);
|
||||
});
|
||||
|
||||
it('Should provide lambda info when limit is hit for internal pages (server build)', async () => {
|
||||
// eslint-disable-next-line jest/no-disabled-tests
|
||||
it.skip('Should provide lambda info when limit is hit for internal pages (server build)', async () => {
|
||||
let logs = '';
|
||||
|
||||
const origLog = console.log;
|
||||
@@ -442,7 +447,7 @@ it('Should provide lambda info when limit is hit for internal pages (server buil
|
||||
console.log = origLog;
|
||||
|
||||
expect(logs).toContain(
|
||||
'Max serverless function size of 50 MB compressed or 250 MB uncompressed reached'
|
||||
'Max serverless function size of 250 MB uncompressed reached'
|
||||
);
|
||||
// expect(logs).toContain(`Serverless Function's page: api/firebase.js`);
|
||||
expect(logs).toContain(`Serverless Function's page: api/chrome.js`);
|
||||
@@ -458,7 +463,8 @@ it('Should provide lambda info when limit is hit for internal pages (server buil
|
||||
expect(logs).toMatch(/public\/big-image-2\.jpg/);
|
||||
});
|
||||
|
||||
it('Should provide lambda info when limit is hit (uncompressed)', async () => {
|
||||
// eslint-disable-next-line jest/no-disabled-tests
|
||||
it.skip('Should provide lambda info when limit is hit (uncompressed)', async () => {
|
||||
let logs = '';
|
||||
|
||||
const origLog = console.log;
|
||||
@@ -481,7 +487,7 @@ it('Should provide lambda info when limit is hit (uncompressed)', async () => {
|
||||
'Max serverless function size was exceeded for 1 function'
|
||||
);
|
||||
expect(logs).toContain(
|
||||
'Max serverless function size of 50 MB compressed or 250 MB uncompressed reached'
|
||||
'Max serverless function size of 250 MB uncompressed reached'
|
||||
);
|
||||
expect(logs).toContain(`Serverless Function's page: api/hello.js`);
|
||||
expect(logs).toMatch(
|
||||
|
||||
@@ -24,7 +24,9 @@ describe(`${__dirname.split(path.sep).pop()}`, () => {
|
||||
}, {});
|
||||
|
||||
const { output, routes } = await build({
|
||||
config: {},
|
||||
config: {
|
||||
installCommand: 'yarn',
|
||||
},
|
||||
entrypoint: 'package.json',
|
||||
files,
|
||||
meta: {
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@next/env@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.3.1.tgz#18266bd92de3b4aa4037b1927aa59e6f11879260"
|
||||
integrity sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg==
|
||||
|
||||
"@next/swc-android-arm-eabi@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.1.tgz#b15ce8ad376102a3b8c0f3c017dde050a22bb1a3"
|
||||
integrity sha512-i+BvKA8tB//srVPPQxIQN5lvfROcfv4OB23/L1nXznP+N/TyKL8lql3l7oo2LNhnH66zWhfoemg3Q4VJZSruzQ==
|
||||
|
||||
"@next/swc-android-arm64@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.3.1.tgz#85d205f568a790a137cb3c3f720d961a2436ac9c"
|
||||
integrity sha512-CmgU2ZNyBP0rkugOOqLnjl3+eRpXBzB/I2sjwcGZ7/Z6RcUJXK5Evz+N0ucOxqE4cZ3gkTeXtSzRrMK2mGYV8Q==
|
||||
|
||||
"@next/swc-darwin-arm64@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.1.tgz#b105457d6760a7916b27e46c97cb1a40547114ae"
|
||||
integrity sha512-hT/EBGNcu0ITiuWDYU9ur57Oa4LybD5DOQp4f22T6zLfpoBMfBibPtR8XktXmOyFHrL/6FC2p9ojdLZhWhvBHg==
|
||||
|
||||
"@next/swc-darwin-x64@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.1.tgz#6947b39082271378896b095b6696a7791c6e32b1"
|
||||
integrity sha512-9S6EVueCVCyGf2vuiLiGEHZCJcPAxglyckTZcEwLdJwozLqN0gtS0Eq0bQlGS3dH49Py/rQYpZ3KVWZ9BUf/WA==
|
||||
|
||||
"@next/swc-freebsd-x64@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.1.tgz#2b6c36a4d84aae8b0ea0e0da9bafc696ae27085a"
|
||||
integrity sha512-qcuUQkaBZWqzM0F1N4AkAh88lLzzpfE6ImOcI1P6YeyJSsBmpBIV8o70zV+Wxpc26yV9vpzb+e5gCyxNjKJg5Q==
|
||||
|
||||
"@next/swc-linux-arm-gnueabihf@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.1.tgz#6e421c44285cfedac1f4631d5de330dd60b86298"
|
||||
integrity sha512-diL9MSYrEI5nY2wc/h/DBewEDUzr/DqBjIgHJ3RUNtETAOB3spMNHvJk2XKUDjnQuluLmFMloet9tpEqU2TT9w==
|
||||
|
||||
"@next/swc-linux-arm64-gnu@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.1.tgz#8863f08a81f422f910af126159d2cbb9552ef717"
|
||||
integrity sha512-o/xB2nztoaC7jnXU3Q36vGgOolJpsGG8ETNjxM1VAPxRwM7FyGCPHOMk1XavG88QZSQf+1r+POBW0tLxQOJ9DQ==
|
||||
|
||||
"@next/swc-linux-arm64-musl@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.1.tgz#0038f07cf0b259d70ae0c80890d826dfc775d9f3"
|
||||
integrity sha512-2WEasRxJzgAmP43glFNhADpe8zB7kJofhEAVNbDJZANp+H4+wq+/cW1CdDi8DqjkShPEA6/ejJw+xnEyDID2jg==
|
||||
|
||||
"@next/swc-linux-x64-gnu@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.1.tgz#c66468f5e8181ffb096c537f0dbfb589baa6a9c1"
|
||||
integrity sha512-JWEaMyvNrXuM3dyy9Pp5cFPuSSvG82+yABqsWugjWlvfmnlnx9HOQZY23bFq3cNghy5V/t0iPb6cffzRWylgsA==
|
||||
|
||||
"@next/swc-linux-x64-musl@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.1.tgz#c6269f3e96ac0395bc722ad97ce410ea5101d305"
|
||||
integrity sha512-xoEWQQ71waWc4BZcOjmatuvPUXKTv6MbIFzpm4LFeCHsg2iwai0ILmNXf81rJR+L1Wb9ifEke2sQpZSPNz1Iyg==
|
||||
|
||||
"@next/swc-win32-arm64-msvc@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.1.tgz#83c639ee969cee36ce247c3abd1d9df97b5ecade"
|
||||
integrity sha512-hswVFYQYIeGHE2JYaBVtvqmBQ1CppplQbZJS/JgrVI3x2CurNhEkmds/yqvDONfwfbttTtH4+q9Dzf/WVl3Opw==
|
||||
|
||||
"@next/swc-win32-ia32-msvc@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.1.tgz#52995748b92aa8ad053440301bc2c0d9fbcf27c2"
|
||||
integrity sha512-Kny5JBehkTbKPmqulr5i+iKntO5YMP+bVM8Hf8UAmjSMVo3wehyLVc9IZkNmcbxi+vwETnQvJaT5ynYBkJ9dWA==
|
||||
|
||||
"@next/swc-win32-x64-msvc@12.3.1":
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.1.tgz#27d71a95247a9eaee03d47adee7e3bd594514136"
|
||||
integrity sha512-W1ijvzzg+kPEX6LAc+50EYYSEo0FVu7dmTE+t+DM4iOLqgGHoW9uYSz9wCVdkXOEEMP9xhXfGpcSxsfDucyPkA==
|
||||
|
||||
"@swc/helpers@0.4.11":
|
||||
version "0.4.11"
|
||||
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.11.tgz#db23a376761b3d31c26502122f349a21b592c8de"
|
||||
integrity sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==
|
||||
dependencies:
|
||||
tslib "^2.4.0"
|
||||
|
||||
caniuse-lite@^1.0.30001406:
|
||||
version "1.0.30001409"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001409.tgz#6135da9dcab34cd9761d9cdb12a68e6740c5e96e"
|
||||
integrity sha512-V0mnJ5dwarmhYv8/MzhJ//aW68UpvnQBXv8lJ2QUsvn2pHcmAuNtu8hQEDz37XnA1iE+lRR9CIfGWWpgJ5QedQ==
|
||||
|
||||
"js-tokens@^3.0.0 || ^4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
|
||||
loose-envify@^1.1.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||
dependencies:
|
||||
js-tokens "^3.0.0 || ^4.0.0"
|
||||
|
||||
nanoid@^3.3.4:
|
||||
version "3.3.4"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
|
||||
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
|
||||
|
||||
next@latest:
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/next/-/next-12.3.1.tgz#127b825ad2207faf869b33393ec8c75fe61e50f1"
|
||||
integrity sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==
|
||||
dependencies:
|
||||
"@next/env" "12.3.1"
|
||||
"@swc/helpers" "0.4.11"
|
||||
caniuse-lite "^1.0.30001406"
|
||||
postcss "8.4.14"
|
||||
styled-jsx "5.0.7"
|
||||
use-sync-external-store "1.2.0"
|
||||
optionalDependencies:
|
||||
"@next/swc-android-arm-eabi" "12.3.1"
|
||||
"@next/swc-android-arm64" "12.3.1"
|
||||
"@next/swc-darwin-arm64" "12.3.1"
|
||||
"@next/swc-darwin-x64" "12.3.1"
|
||||
"@next/swc-freebsd-x64" "12.3.1"
|
||||
"@next/swc-linux-arm-gnueabihf" "12.3.1"
|
||||
"@next/swc-linux-arm64-gnu" "12.3.1"
|
||||
"@next/swc-linux-arm64-musl" "12.3.1"
|
||||
"@next/swc-linux-x64-gnu" "12.3.1"
|
||||
"@next/swc-linux-x64-musl" "12.3.1"
|
||||
"@next/swc-win32-arm64-msvc" "12.3.1"
|
||||
"@next/swc-win32-ia32-msvc" "12.3.1"
|
||||
"@next/swc-win32-x64-msvc" "12.3.1"
|
||||
|
||||
picocolors@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
|
||||
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
|
||||
|
||||
postcss@8.4.14:
|
||||
version "8.4.14"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
|
||||
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
|
||||
dependencies:
|
||||
nanoid "^3.3.4"
|
||||
picocolors "^1.0.0"
|
||||
source-map-js "^1.0.2"
|
||||
|
||||
react-dom@latest:
|
||||
version "18.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
|
||||
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
scheduler "^0.23.0"
|
||||
|
||||
react@latest:
|
||||
version "18.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
|
||||
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
|
||||
scheduler@^0.23.0:
|
||||
version "0.23.0"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
|
||||
integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
|
||||
source-map-js@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
|
||||
|
||||
styled-jsx@5.0.7:
|
||||
version "5.0.7"
|
||||
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.7.tgz#be44afc53771b983769ac654d355ca8d019dff48"
|
||||
integrity sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==
|
||||
|
||||
tslib@^2.4.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
|
||||
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
|
||||
|
||||
use-sync-external-store@1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
|
||||
integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==
|
||||
@@ -35,7 +35,9 @@ describe(`${__dirname.split(path.sep).pop()}`, () => {
|
||||
}, {});
|
||||
|
||||
const { output } = await build({
|
||||
config: {},
|
||||
config: {
|
||||
installCommand: 'yarn',
|
||||
},
|
||||
entrypoint: 'package.json',
|
||||
files,
|
||||
meta: {
|
||||
|
||||
@@ -1,191 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@next/env@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.0.1.tgz#0361e203c7bfbc7b69679ec48f7b45a8f4cb1c2c"
|
||||
integrity sha512-gK60YoFae3s8qi5UgIzbvxOhsh5gKyEaiKH5+kLBUYXLlrPyWJR2xKBj2WqvHkO7wDX7/Hed3DAqjSpU4ijIvQ==
|
||||
|
||||
"@next/swc-android-arm-eabi@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.1.tgz#7ce2a7b6576845bc6d7f55504bf9b82a0d9a2792"
|
||||
integrity sha512-M28QSbohZlNXNn//HY6lV2T3YaMzG58Jwr0YwOdVmOQv6i+7lu6xe3GqQu4kdqInqhLrBXnL+nabFuGTVSHtTg==
|
||||
|
||||
"@next/swc-android-arm64@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.0.1.tgz#85a13d7667042394939741be218076e4e83a45a2"
|
||||
integrity sha512-szmO/i6GoHcPXcbhUKhwBMETWHNXH3ITz9wfxwOOFBNKdDU8pjKsHL88lg28aOiQYZSU1sxu1v1p9KY5kJIZCg==
|
||||
|
||||
"@next/swc-darwin-arm64@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.0.1.tgz#d615d286127bb096a8950a9d7180fcc5d307614d"
|
||||
integrity sha512-O1RxCaiDNOjGZmdAp6SQoHUITt9aVDQXoR3lZ/TloI/NKRAyAV4u0KUUofK+KaZeHOmVTnPUaQuCyZSc3i1x5Q==
|
||||
|
||||
"@next/swc-darwin-x64@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.0.1.tgz#f410beb8cbe0e82562226309f8ec8924cc6cb410"
|
||||
integrity sha512-8E6BY/VO+QqQkthhoWgB8mJMw1NcN9Vhl2OwEwxv8jy2r3zjeU+WNRxz4y8RLbcY0R1h+vHlXuP0mLnuac84tQ==
|
||||
|
||||
"@next/swc-freebsd-x64@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.0.1.tgz#16eb9652d3f638305ca16b558408f5bc5eb6edde"
|
||||
integrity sha512-ocwoOxm2KVwF50RyoAT+2RQPLlkyoF7sAqzMUVgj+S6+DTkY3iwH+Zpo0XAk2pnqT9qguOrKnEpq9EIx//+K7Q==
|
||||
|
||||
"@next/swc-linux-arm-gnueabihf@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.0.1.tgz#0da0700ccf654f813b4c86d057a998598a2fd427"
|
||||
integrity sha512-yO7e3zITfGol/N6lPQnmIRi0WyuILBMXrvH6EdmWzzqMDJFfTCII6l+B6gMO5WVDCTQUGQlQRNZ7sFqWR4I71g==
|
||||
|
||||
"@next/swc-linux-arm64-gnu@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.0.1.tgz#f34759cd41086f5b8b582081b2af54f67dc544ae"
|
||||
integrity sha512-OEs6WDPDI8RyM8SjOqTDMqMBfOlU97VnW6ZMXUvzUTyH0K9c7NF+cn7UMu+I4tKFN0uJ9WQs/6TYaFBGkgoVVA==
|
||||
|
||||
"@next/swc-linux-arm64-musl@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.0.1.tgz#bcfbf1cdfb9f4d632e7ebd67fd62b768cdd08cb7"
|
||||
integrity sha512-y5ypFK0Y3urZSFoQxbtDqvKsBx026sz+Fm+xHlPWlGHNZrbs3Q812iONjcZTo09QwRMk5X86iMWBRxV18xMhaw==
|
||||
|
||||
"@next/swc-linux-x64-gnu@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.0.1.tgz#ed77528d4a3195d5e57d5d94d12cb2206c2b19ac"
|
||||
integrity sha512-XDIHEE6SU8VCF+dUVntD6PDv6RK31N0forx9kucZBYirbe8vCZ+Yx8hYgvtIaGrTcWtGxibxmND0pIuHDq8H5g==
|
||||
|
||||
"@next/swc-linux-x64-musl@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.0.1.tgz#74cda49229d2a7fa421fee6b7dcd621a57934a5e"
|
||||
integrity sha512-yxIOuuz5EOx0F1FDtsyzaLgnDym0Ysxv8CWeJyDTKKmt9BVyITg6q/cD+RP9bEkT1TQi+PYXIMATSz675Q82xw==
|
||||
|
||||
"@next/swc-win32-arm64-msvc@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.0.1.tgz#15d6add92aa897148d6c45749bf9d2eacee87197"
|
||||
integrity sha512-+ucLe2qgQzP+FM94jD4ns6LDGyMFaX9k3lVHqu/tsQCy2giMymbport4y4p77mYcXEMlDaHMzlHgOQyHRniWFA==
|
||||
|
||||
"@next/swc-win32-ia32-msvc@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.0.1.tgz#e0c57902fe75327d092abb1ef19657775fe26f85"
|
||||
integrity sha512-Krr/qGN7OB35oZuvMAZKoXDt2IapynIWLh5A5rz6AODb7f/ZJqyAuZSK12vOa2zKdobS36Qm4IlxxBqn9c00MA==
|
||||
|
||||
"@next/swc-win32-x64-msvc@13.0.1":
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.0.1.tgz#469dde61519f6a310874af93ee5969f1d5ff6d03"
|
||||
integrity sha512-t/0G33t/6VGWZUGCOT7rG42qqvf/x+MrFp1CU+8CN6PrjSSL57R5bqkXfubV9t4eCEnUxVP+5Hn3MoEXEebtEw==
|
||||
|
||||
"@swc/helpers@0.4.11":
|
||||
version "0.4.11"
|
||||
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.11.tgz#db23a376761b3d31c26502122f349a21b592c8de"
|
||||
integrity sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==
|
||||
dependencies:
|
||||
tslib "^2.4.0"
|
||||
|
||||
caniuse-lite@^1.0.30001406:
|
||||
version "1.0.30001429"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001429.tgz#70cdae959096756a85713b36dd9cb82e62325639"
|
||||
integrity sha512-511ThLu1hF+5RRRt0zYCf2U2yRr9GPF6m5y90SBCWsvSoYoW7yAGlv/elyPaNfvGCkp6kj/KFZWU0BMA69Prsg==
|
||||
|
||||
client-only@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1"
|
||||
integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==
|
||||
|
||||
"js-tokens@^3.0.0 || ^4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
|
||||
loose-envify@^1.1.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||
dependencies:
|
||||
js-tokens "^3.0.0 || ^4.0.0"
|
||||
|
||||
nanoid@^3.3.4:
|
||||
version "3.3.4"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
|
||||
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
|
||||
|
||||
next@latest:
|
||||
version "13.0.1"
|
||||
resolved "https://registry.yarnpkg.com/next/-/next-13.0.1.tgz#8b4fc9998e58f503bdecb92f06fe6f850ac260d0"
|
||||
integrity sha512-ErCNBPIeZMKFn6hX+ZBSlqZVgJIeitEqhGTuQUNmYXJ07/A71DZ7AJI8eyHYUdBb686LUpV1/oBdTq9RpzRVPg==
|
||||
dependencies:
|
||||
"@next/env" "13.0.1"
|
||||
"@swc/helpers" "0.4.11"
|
||||
caniuse-lite "^1.0.30001406"
|
||||
postcss "8.4.14"
|
||||
styled-jsx "5.1.0"
|
||||
use-sync-external-store "1.2.0"
|
||||
optionalDependencies:
|
||||
"@next/swc-android-arm-eabi" "13.0.1"
|
||||
"@next/swc-android-arm64" "13.0.1"
|
||||
"@next/swc-darwin-arm64" "13.0.1"
|
||||
"@next/swc-darwin-x64" "13.0.1"
|
||||
"@next/swc-freebsd-x64" "13.0.1"
|
||||
"@next/swc-linux-arm-gnueabihf" "13.0.1"
|
||||
"@next/swc-linux-arm64-gnu" "13.0.1"
|
||||
"@next/swc-linux-arm64-musl" "13.0.1"
|
||||
"@next/swc-linux-x64-gnu" "13.0.1"
|
||||
"@next/swc-linux-x64-musl" "13.0.1"
|
||||
"@next/swc-win32-arm64-msvc" "13.0.1"
|
||||
"@next/swc-win32-ia32-msvc" "13.0.1"
|
||||
"@next/swc-win32-x64-msvc" "13.0.1"
|
||||
|
||||
picocolors@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
|
||||
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
|
||||
|
||||
postcss@8.4.14:
|
||||
version "8.4.14"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
|
||||
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
|
||||
dependencies:
|
||||
nanoid "^3.3.4"
|
||||
picocolors "^1.0.0"
|
||||
source-map-js "^1.0.2"
|
||||
|
||||
react-dom@latest:
|
||||
version "18.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
|
||||
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
scheduler "^0.23.0"
|
||||
|
||||
react@latest:
|
||||
version "18.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
|
||||
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
|
||||
scheduler@^0.23.0:
|
||||
version "0.23.0"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
|
||||
integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
|
||||
source-map-js@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
|
||||
|
||||
styled-jsx@5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.0.tgz#4a5622ab9714bd3fcfaeec292aa555871f057563"
|
||||
integrity sha512-/iHaRJt9U7T+5tp6TRelLnqBqiaIT0HsO0+vgyj8hK2KUk7aejFqRrumqPUlAqDwAj8IbS/1hk3IhBAAK/FCUQ==
|
||||
dependencies:
|
||||
client-only "0.0.1"
|
||||
|
||||
tslib@^2.4.0:
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e"
|
||||
integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==
|
||||
|
||||
use-sync-external-store@1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
|
||||
integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==
|
||||
@@ -1,185 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@next/env@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.1.6.tgz#c4925609f16142ded1a5cb833359ab17359b7a93"
|
||||
integrity sha512-s+W9Fdqh5MFk6ECrbnVmmAOwxKQuhGMT7xXHrkYIBMBcTiOqNWhv5KbJIboKR5STXxNXl32hllnvKaffzFaWQg==
|
||||
|
||||
"@next/swc-android-arm-eabi@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.6.tgz#d766dfc10e27814d947b20f052067c239913dbcc"
|
||||
integrity sha512-F3/6Z8LH/pGlPzR1AcjPFxx35mPqjE5xZcf+IL+KgbW9tMkp7CYi1y7qKrEWU7W4AumxX/8OINnDQWLiwLasLQ==
|
||||
|
||||
"@next/swc-android-arm64@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.1.6.tgz#f37a98d5f18927d8c9970d750d516ac779465176"
|
||||
integrity sha512-cMwQjnB8vrYkWyK/H0Rf2c2pKIH4RGjpKUDvbjVAit6SbwPDpmaijLio0LWFV3/tOnY6kvzbL62lndVA0mkYpw==
|
||||
|
||||
"@next/swc-darwin-arm64@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.6.tgz#ec1b90fd9bf809d8b81004c5182e254dced4ad96"
|
||||
integrity sha512-KKRQH4DDE4kONXCvFMNBZGDb499Hs+xcFAwvj+rfSUssIDrZOlyfJNy55rH5t2Qxed1e4K80KEJgsxKQN1/fyw==
|
||||
|
||||
"@next/swc-darwin-x64@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.6.tgz#e869ac75d16995eee733a7d1550322d9051c1eb4"
|
||||
integrity sha512-/uOky5PaZDoaU99ohjtNcDTJ6ks/gZ5ykTQDvNZDjIoCxFe3+t06bxsTPY6tAO6uEAw5f6vVFX5H5KLwhrkZCA==
|
||||
|
||||
"@next/swc-freebsd-x64@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.6.tgz#84a7b2e423a2904afc2edca21c2f1ba6b53fa4c1"
|
||||
integrity sha512-qaEALZeV7to6weSXk3Br80wtFQ7cFTpos/q+m9XVRFggu+8Ib895XhMWdJBzew6aaOcMvYR6KQ6JmHA2/eMzWw==
|
||||
|
||||
"@next/swc-linux-arm-gnueabihf@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.6.tgz#980eed1f655ff8a72187d8a6ef9e73ac39d20d23"
|
||||
integrity sha512-OybkbC58A1wJ+JrJSOjGDvZzrVEQA4sprJejGqMwiZyLqhr9Eo8FXF0y6HL+m1CPCpPhXEHz/2xKoYsl16kNqw==
|
||||
|
||||
"@next/swc-linux-arm64-gnu@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.6.tgz#87a71db21cded3f7c63d1d19079845c59813c53d"
|
||||
integrity sha512-yCH+yDr7/4FDuWv6+GiYrPI9kcTAO3y48UmaIbrKy8ZJpi7RehJe3vIBRUmLrLaNDH3rY1rwoHi471NvR5J5NQ==
|
||||
|
||||
"@next/swc-linux-arm64-musl@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.6.tgz#c5aac8619331b9fd030603bbe2b36052011e11de"
|
||||
integrity sha512-ECagB8LGX25P9Mrmlc7Q/TQBb9rGScxHbv/kLqqIWs2fIXy6Y/EiBBiM72NTwuXUFCNrWR4sjUPSooVBJJ3ESQ==
|
||||
|
||||
"@next/swc-linux-x64-gnu@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.6.tgz#9513d36d540bbfea575576746736054c31aacdea"
|
||||
integrity sha512-GT5w2mruk90V/I5g6ScuueE7fqj/d8Bui2qxdw6lFxmuTgMeol5rnzAv4uAoVQgClOUO/MULilzlODg9Ib3Y4Q==
|
||||
|
||||
"@next/swc-linux-x64-musl@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.6.tgz#d61fc6884899f5957251f4ce3f522e34a2c479b7"
|
||||
integrity sha512-keFD6KvwOPzmat4TCnlnuxJCQepPN+8j3Nw876FtULxo8005Y9Ghcl7ACcR8GoiKoddAq8gxNBrpjoxjQRHeAQ==
|
||||
|
||||
"@next/swc-win32-arm64-msvc@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.6.tgz#fac2077a8ae9768e31444c9ae90807e64117cda7"
|
||||
integrity sha512-OwertslIiGQluFvHyRDzBCIB07qJjqabAmINlXUYt7/sY7Q7QPE8xVi5beBxX/rxTGPIbtyIe3faBE6Z2KywhQ==
|
||||
|
||||
"@next/swc-win32-ia32-msvc@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.6.tgz#498bc11c91b4c482a625bf4b978f98ae91111e46"
|
||||
integrity sha512-g8zowiuP8FxUR9zslPmlju7qYbs2XBtTLVSxVikPtUDQedhcls39uKYLvOOd1JZg0ehyhopobRoH1q+MHlIN/w==
|
||||
|
||||
"@next/swc-win32-x64-msvc@13.1.6":
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.6.tgz#17ed919c723426b7d0ce1cd73d40ce3dcd342089"
|
||||
integrity sha512-Ls2OL9hi3YlJKGNdKv8k3X/lLgc3VmLG3a/DeTkAd+lAituJp8ZHmRmm9f9SL84fT3CotlzcgbdaCDfFwFA6bA==
|
||||
|
||||
"@swc/helpers@0.4.14":
|
||||
version "0.4.14"
|
||||
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.14.tgz#1352ac6d95e3617ccb7c1498ff019654f1e12a74"
|
||||
integrity sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==
|
||||
dependencies:
|
||||
tslib "^2.4.0"
|
||||
|
||||
caniuse-lite@^1.0.30001406:
|
||||
version "1.0.30001450"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001450.tgz#022225b91200589196b814b51b1bbe45144cf74f"
|
||||
integrity sha512-qMBmvmQmFXaSxexkjjfMvD5rnDL0+m+dUMZKoDYsGG8iZN29RuYh9eRoMvKsT6uMAWlyUUGDEQGJJYjzCIO9ew==
|
||||
|
||||
client-only@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1"
|
||||
integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==
|
||||
|
||||
"js-tokens@^3.0.0 || ^4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
|
||||
loose-envify@^1.1.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||
dependencies:
|
||||
js-tokens "^3.0.0 || ^4.0.0"
|
||||
|
||||
nanoid@^3.3.4:
|
||||
version "3.3.4"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
|
||||
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
|
||||
|
||||
next@latest:
|
||||
version "13.1.6"
|
||||
resolved "https://registry.yarnpkg.com/next/-/next-13.1.6.tgz#054babe20b601f21f682f197063c9b0b32f1a27c"
|
||||
integrity sha512-hHlbhKPj9pW+Cymvfzc15lvhaOZ54l+8sXDXJWm3OBNBzgrVj6hwGPmqqsXg40xO1Leq+kXpllzRPuncpC0Phw==
|
||||
dependencies:
|
||||
"@next/env" "13.1.6"
|
||||
"@swc/helpers" "0.4.14"
|
||||
caniuse-lite "^1.0.30001406"
|
||||
postcss "8.4.14"
|
||||
styled-jsx "5.1.1"
|
||||
optionalDependencies:
|
||||
"@next/swc-android-arm-eabi" "13.1.6"
|
||||
"@next/swc-android-arm64" "13.1.6"
|
||||
"@next/swc-darwin-arm64" "13.1.6"
|
||||
"@next/swc-darwin-x64" "13.1.6"
|
||||
"@next/swc-freebsd-x64" "13.1.6"
|
||||
"@next/swc-linux-arm-gnueabihf" "13.1.6"
|
||||
"@next/swc-linux-arm64-gnu" "13.1.6"
|
||||
"@next/swc-linux-arm64-musl" "13.1.6"
|
||||
"@next/swc-linux-x64-gnu" "13.1.6"
|
||||
"@next/swc-linux-x64-musl" "13.1.6"
|
||||
"@next/swc-win32-arm64-msvc" "13.1.6"
|
||||
"@next/swc-win32-ia32-msvc" "13.1.6"
|
||||
"@next/swc-win32-x64-msvc" "13.1.6"
|
||||
|
||||
picocolors@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
|
||||
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
|
||||
|
||||
postcss@8.4.14:
|
||||
version "8.4.14"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
|
||||
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
|
||||
dependencies:
|
||||
nanoid "^3.3.4"
|
||||
picocolors "^1.0.0"
|
||||
source-map-js "^1.0.2"
|
||||
|
||||
react-dom@latest:
|
||||
version "18.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
|
||||
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
scheduler "^0.23.0"
|
||||
|
||||
react@latest:
|
||||
version "18.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
|
||||
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
|
||||
scheduler@^0.23.0:
|
||||
version "0.23.0"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
|
||||
integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
|
||||
source-map-js@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
|
||||
|
||||
styled-jsx@5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f"
|
||||
integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==
|
||||
dependencies:
|
||||
client-only "0.0.1"
|
||||
|
||||
tslib@^2.4.0:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
|
||||
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
|
||||
@@ -0,0 +1,62 @@
|
||||
const fs = require('fs-extra');
|
||||
const ms = require('ms');
|
||||
const path = require('path');
|
||||
const { build } = require('../../../../dist');
|
||||
const { FileFsRef } = require('@vercel/build-utils');
|
||||
|
||||
jest.setTimeout(ms('6m'));
|
||||
|
||||
describe(`${__dirname.split(path.sep).pop()}`, () => {
|
||||
it('should normalize routes in build results output', async () => {
|
||||
// TODO: remove after bug with edge functions on Windows
|
||||
// is resolved upstream in Next.js
|
||||
if (process.platform === 'win32') {
|
||||
const indexPage = path.join(__dirname, 'pages/index.tsx');
|
||||
await fs.writeFile(
|
||||
indexPage,
|
||||
(
|
||||
await fs.readFile(indexPage, 'utf8')
|
||||
).replace('runtime: ', '// runtime: ')
|
||||
);
|
||||
}
|
||||
|
||||
const files = [
|
||||
'index.test.js',
|
||||
'next.config.js',
|
||||
'package.json',
|
||||
'tsconfig.json',
|
||||
'pages/index.tsx',
|
||||
].reduce((filesMap, file) => {
|
||||
const fsPath = path.join(__dirname, file);
|
||||
const { mode } = fs.statSync(fsPath);
|
||||
filesMap[path] = new FileFsRef({ mode, fsPath });
|
||||
return filesMap;
|
||||
}, {});
|
||||
|
||||
const { output } = await build({
|
||||
config: {
|
||||
installCommand: 'yarn',
|
||||
},
|
||||
entrypoint: 'package.json',
|
||||
files,
|
||||
meta: {
|
||||
skipDownload: true,
|
||||
},
|
||||
repoRootPath: __dirname,
|
||||
workPath: __dirname,
|
||||
});
|
||||
|
||||
const lambdaPaths = [];
|
||||
|
||||
for (const key in output) {
|
||||
if (output[key].type === 'Lambda') {
|
||||
lambdaPaths.push(key);
|
||||
}
|
||||
}
|
||||
|
||||
expect(lambdaPaths).toEqual(
|
||||
[],
|
||||
`Unexpected paths with type "Lambda": ${lambdaPaths.join(', ')}`
|
||||
);
|
||||
});
|
||||
});
|
||||
5
packages/next/test/unit/fixtures/04-edge-function-i18n/next-env.d.ts
vendored
Normal file
5
packages/next/test/unit/fixtures/04-edge-function-i18n/next-env.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
@@ -0,0 +1,10 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
i18n: {
|
||||
locales: ['en', 'fr', 'nl'],
|
||||
defaultLocale: 'en',
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "02-edge-function-basepath",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "latest",
|
||||
"react": "latest",
|
||||
"react-dom": "latest"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { NextPage } from 'next';
|
||||
|
||||
const Home: NextPage = () => {
|
||||
return <div>Home</div>;
|
||||
};
|
||||
|
||||
export default Home;
|
||||
|
||||
export const config = {
|
||||
runtime: 'experimental-edge',
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
@@ -1,5 +1,16 @@
|
||||
# @vercel/node
|
||||
|
||||
## 3.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Revert "[next][node][redwood][remix] Update @vercel/nft (#10540)" ([#10633](https://github.com/vercel/vercel/pull/10633))
|
||||
|
||||
- Update `@vercel/nft` to 0.24.2 ([#10644](https://github.com/vercel/vercel/pull/10644))
|
||||
|
||||
- Updated dependencies [[`2f5b0aeeb`](https://github.com/vercel/vercel/commit/2f5b0aeeb183ed3ea8cbc68cb3bc3c949c486ada)]:
|
||||
- @vercel/build-utils@7.2.2
|
||||
|
||||
## 3.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/node",
|
||||
"version": "3.0.6",
|
||||
"version": "3.0.7",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
|
||||
@@ -23,9 +23,9 @@
|
||||
"@edge-runtime/primitives": "3.1.1",
|
||||
"@edge-runtime/vm": "3.1.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"@vercel/error-utils": "2.0.1",
|
||||
"@vercel/nft": "0.24.1",
|
||||
"@vercel/nft": "0.24.2",
|
||||
"@vercel/static-config": "3.0.0",
|
||||
"async-listen": "3.0.0",
|
||||
"edge-runtime": "2.5.1",
|
||||
@@ -48,7 +48,6 @@
|
||||
"@types/cookie": "0.3.3",
|
||||
"@types/etag": "1.8.0",
|
||||
"@types/jest": "29.5.0",
|
||||
"@vercel/ncc": "0.24.0",
|
||||
"content-type": "1.0.5",
|
||||
"cookie": "0.4.0",
|
||||
"cross-env": "7.0.3",
|
||||
|
||||
@@ -112,7 +112,7 @@ async function compileUserCode(
|
||||
nodeCompatBindings: nodeCompatPlugin.bindings,
|
||||
};
|
||||
} catch (error: unknown) {
|
||||
// We can't easily show a meaningful stack trace from ncc -> edge-runtime.
|
||||
// We can't easily show a meaningful stack trace from esbuild -> edge-runtime.
|
||||
// So, stick with just the message for now.
|
||||
console.error(`Failed to compile user code for edge runtime.`);
|
||||
if (isError(error)) logError(error);
|
||||
@@ -162,7 +162,7 @@ async function createEdgeRuntimeServer(params?: {
|
||||
exitHook(() => server.close());
|
||||
return server;
|
||||
} catch (error: any) {
|
||||
// We can't easily show a meaningful stack trace from ncc -> edge-runtime.
|
||||
// We can't easily show a meaningful stack trace from esbuild -> edge-runtime.
|
||||
// So, stick with just the message for now.
|
||||
console.error('Failed to instantiate edge runtime.');
|
||||
logError(error);
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
"@types/execa": "^0.9.0",
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/ncc": "0.24.0",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"execa": "^1.0.0",
|
||||
"jest-junit": "16.0.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @vercel/redwood
|
||||
|
||||
## 2.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Revert "[next][node][redwood][remix] Update @vercel/nft (#10540)" ([#10633](https://github.com/vercel/vercel/pull/10633))
|
||||
|
||||
- Update `@vercel/nft` to 0.24.2 ([#10644](https://github.com/vercel/vercel/pull/10644))
|
||||
|
||||
## 2.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/redwood",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"main": "./dist/index.js",
|
||||
"license": "Apache-2.0",
|
||||
"homepage": "https://vercel.com/docs",
|
||||
@@ -19,7 +19,7 @@
|
||||
"test-unit": "pnpm test test/prepare-cache.test.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/nft": "0.24.1",
|
||||
"@vercel/nft": "0.24.2",
|
||||
"@vercel/routing-utils": "3.0.0",
|
||||
"semver": "6.3.1"
|
||||
},
|
||||
@@ -27,7 +27,7 @@
|
||||
"@types/aws-lambda": "8.10.19",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "6.0.0",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"execa": "3.2.0",
|
||||
"fs-extra": "11.1.0",
|
||||
"jest-junit": "16.0.0"
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @vercel/remix-builder
|
||||
|
||||
## 2.0.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Revert "[next][node][redwood][remix] Update @vercel/nft (#10540)" ([#10633](https://github.com/vercel/vercel/pull/10633))
|
||||
|
||||
- Update `@vercel/nft` to 0.24.2 ([#10644](https://github.com/vercel/vercel/pull/10644))
|
||||
|
||||
## 2.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update `@remix-run/dev` fork to v2.0.1 ([#10566](https://github.com/vercel/vercel/pull/10566))
|
||||
|
||||
## 2.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/remix-builder",
|
||||
"version": "2.0.7",
|
||||
"version": "2.0.9",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"homepage": "https://vercel.com/docs",
|
||||
@@ -20,16 +20,16 @@
|
||||
"defaults"
|
||||
],
|
||||
"dependencies": {
|
||||
"@vercel/nft": "0.24.1",
|
||||
"@vercel/nft": "0.24.2",
|
||||
"@vercel/static-config": "3.0.0",
|
||||
"ts-morph": "12.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@remix-run/dev": "npm:@vercel/remix-run-dev@2.0.0",
|
||||
"@remix-run/dev": "npm:@vercel/remix-run-dev@2.0.1",
|
||||
"@types/jest": "27.5.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "7.3.13",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"jest-junit": "16.0.0",
|
||||
"path-to-regexp": "6.2.1",
|
||||
"semver": "7.5.2"
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "8.0.0",
|
||||
"@types/semver": "6.0.0",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/ncc": "0.24.0",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"execa": "2.0.4",
|
||||
"fs-extra": "^7.0.1",
|
||||
"jest-junit": "16.0.0",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/static-build
|
||||
|
||||
## 2.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @vercel/gatsby-plugin-vercel-builder@2.0.7
|
||||
|
||||
## 2.0.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/static-build",
|
||||
"version": "2.0.7",
|
||||
"version": "2.0.8",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/build-step",
|
||||
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
|
||||
"@vercel/gatsby-plugin-vercel-builder": "2.0.6",
|
||||
"@vercel/gatsby-plugin-vercel-builder": "2.0.7",
|
||||
"@vercel/static-config": "3.0.0",
|
||||
"ts-morph": "12.0.0"
|
||||
},
|
||||
@@ -34,11 +34,10 @@
|
||||
"@types/node-fetch": "2.5.4",
|
||||
"@types/promise-timeout": "1.3.0",
|
||||
"@types/semver": "7.3.13",
|
||||
"@vercel/build-utils": "7.2.1",
|
||||
"@vercel/build-utils": "7.2.2",
|
||||
"@vercel/error-utils": "2.0.1",
|
||||
"@vercel/frameworks": "2.0.2",
|
||||
"@vercel/fs-detectors": "5.1.0",
|
||||
"@vercel/ncc": "0.24.0",
|
||||
"@vercel/fs-detectors": "5.1.1",
|
||||
"@vercel/routing-utils": "3.0.0",
|
||||
"execa": "3.2.0",
|
||||
"fs-extra": "10.0.0",
|
||||
|
||||
@@ -11,16 +11,23 @@
|
||||
# production
|
||||
/build
|
||||
|
||||
# production - vite
|
||||
/dist
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.vscode
|
||||
/.vscode/*
|
||||
!/.vscode/extensions.json
|
||||
.idea
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
!public
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
.vercel
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "ionic-react",
|
||||
"name": "50-ionic-react",
|
||||
"integrations": {},
|
||||
"type": "react"
|
||||
}
|
||||
|
||||
27337
packages/static-build/test/fixtures/50-ionic-react/package-lock.json
generated
vendored
Normal file
27337
packages/static-build/test/fixtures/50-ionic-react/package-lock.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,47 +1,28 @@
|
||||
{
|
||||
"name": "ionic-react",
|
||||
"name": "50-ionic-react",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ionic/react": "^4.11.0",
|
||||
"@ionic/react-router": "^4.11.0",
|
||||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.4.0",
|
||||
"@testing-library/user-event": "^8.0.3",
|
||||
"@types/jest": "^24.0.25",
|
||||
"@types/node": "^12.12.24",
|
||||
"@types/react": "^16.9.17",
|
||||
"@types/react-dom": "^16.9.4",
|
||||
"@types/react-router": "^5.1.4",
|
||||
"@types/react-router-dom": "^5.1.3",
|
||||
"ionicons": "^4.6.3",
|
||||
"react": "^16.12.0",
|
||||
"react-dom": "^16.12.0",
|
||||
"react-router": "^5.1.2",
|
||||
"react-router-dom": "^5.1.2",
|
||||
"react-scripts": "3.3.0",
|
||||
"typescript": "4.8.3"
|
||||
"@ionic/react": "^7.0.0",
|
||||
"@types/node": "^12.19.15",
|
||||
"@types/react": "^18.0.17",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-scripts": "^5.0.0",
|
||||
"typescript": "^4.1.3"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
"build": "react-scripts build"
|
||||
},
|
||||
"browserslist": [
|
||||
"Chrome >=79",
|
||||
"ChromeAndroid >=79",
|
||||
"Firefox >=70",
|
||||
"Edge >=79",
|
||||
"Safari >=14",
|
||||
"iOS >=14"
|
||||
],
|
||||
"description": "An Ionic project"
|
||||
}
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Ionic App</title>
|
||||
<title>Ionic on Vercel</title>
|
||||
|
||||
<base href="/" />
|
||||
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import React from 'react';
|
||||
import { render } from '@testing-library/react';
|
||||
import App from './App';
|
||||
|
||||
test('renders without crashing', () => {
|
||||
const { baseElement } = render(<App />);
|
||||
expect(baseElement).toBeDefined();
|
||||
});
|
||||
@@ -1,36 +1,15 @@
|
||||
import React from 'react';
|
||||
import { Redirect, Route } from 'react-router-dom';
|
||||
import { IonApp, IonRouterOutlet } from '@ionic/react';
|
||||
import { IonReactRouter } from '@ionic/react-router';
|
||||
import Home from './pages/Home';
|
||||
import { IonApp, IonContent, IonPage, setupIonicReact } from '@ionic/react';
|
||||
|
||||
/* Core CSS required for Ionic components to work properly */
|
||||
import '@ionic/react/css/core.css';
|
||||
|
||||
/* Basic CSS for apps built with Ionic */
|
||||
import '@ionic/react/css/normalize.css';
|
||||
import '@ionic/react/css/structure.css';
|
||||
import '@ionic/react/css/typography.css';
|
||||
|
||||
/* Optional CSS utils that can be commented out */
|
||||
import '@ionic/react/css/padding.css';
|
||||
import '@ionic/react/css/float-elements.css';
|
||||
import '@ionic/react/css/text-alignment.css';
|
||||
import '@ionic/react/css/text-transformation.css';
|
||||
import '@ionic/react/css/flex-utils.css';
|
||||
import '@ionic/react/css/display.css';
|
||||
|
||||
/* Theme variables */
|
||||
import './theme/variables.css';
|
||||
setupIonicReact();
|
||||
|
||||
const App: React.FC = () => (
|
||||
<IonApp>
|
||||
<IonReactRouter>
|
||||
<IonRouterOutlet>
|
||||
<Route path="/home" component={Home} exact={true} />
|
||||
<Route exact path="/" render={() => <Redirect to="/home" />} />
|
||||
</IonRouterOutlet>
|
||||
</IonReactRouter>
|
||||
<IonPage>
|
||||
<IonContent><h1>Hello, World!</h1></IonContent>
|
||||
</IonPage>
|
||||
</IonApp>
|
||||
);
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import App from './App';
|
||||
import * as serviceWorker from './serviceWorker';
|
||||
|
||||
ReactDOM.render(<App />, document.getElementById('root'));
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
// unregister() to register() below. Note this comes with some pitfalls.
|
||||
// Learn more about service workers: https://bit.ly/CRA-PWA
|
||||
serviceWorker.unregister();
|
||||
const container = document.getElementById('root');
|
||||
const root = createRoot(container!);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>
|
||||
);
|
||||
|
||||
@@ -1,23 +1,11 @@
|
||||
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';
|
||||
import React from 'react';
|
||||
import { IonContent, IonPage } from '@ionic/react';
|
||||
|
||||
const Home: React.FC = () => {
|
||||
return (
|
||||
<IonPage>
|
||||
<IonHeader>
|
||||
<IonToolbar>
|
||||
<IonTitle>Ionic Blank</IonTitle>
|
||||
</IonToolbar>
|
||||
</IonHeader>
|
||||
<IonContent className="ion-padding">
|
||||
The world is your oyster.
|
||||
<p>
|
||||
If you get lost, the{' '}
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/">
|
||||
docs
|
||||
</a>{' '}
|
||||
will be your guide.
|
||||
</p>
|
||||
<IonContent fullscreen>
|
||||
<p>Hello, World!</p>
|
||||
</IonContent>
|
||||
</IonPage>
|
||||
);
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
// This optional code is used to register a service worker.
|
||||
// register() is not called by default.
|
||||
|
||||
// This lets the app load faster on subsequent visits in production, and gives
|
||||
// it offline capabilities. However, it also means that developers (and users)
|
||||
// will only see deployed updates on subsequent visits to a page, after all the
|
||||
// existing tabs open on the page have been closed, since previously cached
|
||||
// resources are updated in the background.
|
||||
|
||||
// To learn more about the benefits of this model and instructions on how to
|
||||
// opt-in, read https://bit.ly/CRA-PWA
|
||||
|
||||
const isLocalhost = Boolean(
|
||||
window.location.hostname === 'localhost' ||
|
||||
// [::1] is the IPv6 localhost address.
|
||||
window.location.hostname === '[::1]' ||
|
||||
// 127.0.0.0/8 are considered localhost for IPv4.
|
||||
window.location.hostname.match(
|
||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||
)
|
||||
);
|
||||
|
||||
type Config = {
|
||||
onSuccess?: (registration: ServiceWorkerRegistration) => void;
|
||||
onUpdate?: (registration: ServiceWorkerRegistration) => void;
|
||||
};
|
||||
|
||||
export function register(config?: Config) {
|
||||
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
||||
// The URL constructor is available in all browsers that support SW.
|
||||
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
|
||||
if (publicUrl.origin !== window.location.origin) {
|
||||
// Our service worker won't work if PUBLIC_URL is on a different origin
|
||||
// from what our page is served on. This might happen if a CDN is used to
|
||||
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
|
||||
return;
|
||||
}
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
|
||||
|
||||
if (isLocalhost) {
|
||||
// This is running on localhost. Let's check if a service worker still exists or not.
|
||||
checkValidServiceWorker(swUrl, config);
|
||||
|
||||
// Add some additional logging to localhost, pointing developers to the
|
||||
// service worker/PWA documentation.
|
||||
navigator.serviceWorker.ready.then(() => {
|
||||
console.log(
|
||||
'This web app is being served cache-first by a service ' +
|
||||
'worker. To learn more, visit https://bit.ly/CRA-PWA'
|
||||
);
|
||||
});
|
||||
} else {
|
||||
// Is not localhost. Just register service worker
|
||||
registerValidSW(swUrl, config);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function registerValidSW(swUrl: string, config?: Config) {
|
||||
navigator.serviceWorker
|
||||
.register(swUrl)
|
||||
.then(registration => {
|
||||
registration.onupdatefound = () => {
|
||||
const installingWorker = registration.installing;
|
||||
if (installingWorker == null) {
|
||||
return;
|
||||
}
|
||||
installingWorker.onstatechange = () => {
|
||||
if (installingWorker.state === 'installed') {
|
||||
if (navigator.serviceWorker.controller) {
|
||||
// At this point, the updated precached content has been fetched,
|
||||
// but the previous service worker will still serve the older
|
||||
// content until all client tabs are closed.
|
||||
console.log(
|
||||
'New content is available and will be used when all ' +
|
||||
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
|
||||
);
|
||||
|
||||
// Execute callback
|
||||
if (config && config.onUpdate) {
|
||||
config.onUpdate(registration);
|
||||
}
|
||||
} else {
|
||||
// At this point, everything has been precached.
|
||||
// It's the perfect time to display a
|
||||
// "Content is cached for offline use." message.
|
||||
console.log('Content is cached for offline use.');
|
||||
|
||||
// Execute callback
|
||||
if (config && config.onSuccess) {
|
||||
config.onSuccess(registration);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error during service worker registration:', error);
|
||||
});
|
||||
}
|
||||
|
||||
function checkValidServiceWorker(swUrl: string, config?: Config) {
|
||||
// Check if the service worker can be found. If it can't reload the page.
|
||||
fetch(swUrl, {
|
||||
headers: { 'Service-Worker': 'script' },
|
||||
})
|
||||
.then(response => {
|
||||
// Ensure service worker exists, and that we really are getting a JS file.
|
||||
const contentType = response.headers.get('content-type');
|
||||
if (
|
||||
response.status === 404 ||
|
||||
(contentType != null && contentType.indexOf('javascript') === -1)
|
||||
) {
|
||||
// No service worker found. Probably a different app. Reload the page.
|
||||
navigator.serviceWorker.ready.then(registration => {
|
||||
registration.unregister().then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// Service worker found. Proceed as normal.
|
||||
registerValidSW(swUrl, config);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
console.log(
|
||||
'No internet connection found. App is running in offline mode.'
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export function unregister() {
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.ready.then(registration => {
|
||||
registration.unregister();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
||||
// allows you to do things like:
|
||||
// expect(element).toHaveTextContent(/react/i)
|
||||
// learn more: https://github.com/testing-library/jest-dom
|
||||
import '@testing-library/jest-dom/extend-expect';
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user