Compare commits

..

2 Commits

Author SHA1 Message Date
Steven
234624e67c add logs to cleanup 2023-10-10 14:27:08 -04:00
Steven
23f8e2568d debug corepack 2023-10-10 14:19:21 -04:00
411 changed files with 57694 additions and 310103 deletions

View File

@@ -0,0 +1,3 @@
---
---

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,5 @@
---
'vercel': minor
---
Indicates whether @vercel/speed-insights or @vercel/analytics are used

View File

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

View File

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

View File

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

6
.github/CODEOWNERS vendored
View File

@@ -7,11 +7,13 @@
/packages/fs-detectors @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @agadzik @chloetedder
/packages/next @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @ijjk @ztanner
/packages/routing-utils @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @ijjk
/packages/static-build @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek
/packages/edge @vercel/compute @TooTallNate @EndangeredMassa @cb1kenobi @Ethan-Arrowood @trek
/packages/edge @vercel/compute
/examples @leerob
/examples/create-react-app @Timer
/examples/nextjs @timneutkens @ijjk @styfle @ztanner @huozhi
/examples/hugo @styfle
/examples/jekyll @styfle
/examples/zola @styfle
/packages/node @TooTallNate @EndangeredMassa @styfle @cb1kenobi @Ethan-Arrowood @trek @Kikobeats
# Unrestricted Paths

View File

@@ -64,7 +64,7 @@ jobs:
fetch-depth: 2
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodeVersion || env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION }}
- name: Install Hugo
if: matrix.runner == 'macos-latest'

View File

@@ -1,6 +1,6 @@
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'
const inter = Inter({ subsets: ['latin'] })

View File

@@ -8,7 +8,7 @@
"name": "nextjs",
"version": "0.1.0",
"dependencies": {
"next": "13.5.6",
"next": "13.5.4",
"react": "^18",
"react-dom": "^18"
},
@@ -18,7 +18,7 @@
"@types/react-dom": "^18",
"autoprefixer": "^10",
"eslint": "^8",
"eslint-config-next": "13.5.6",
"eslint-config-next": "13.5.4",
"postcss": "^8",
"tailwindcss": "^3",
"typescript": "^5"
@@ -46,9 +46,9 @@
}
},
"node_modules/@babel/runtime": {
"version": "7.23.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz",
"integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==",
"version": "7.23.1",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.1.tgz",
"integrity": "sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g==",
"dev": true,
"dependencies": {
"regenerator-runtime": "^0.14.0"
@@ -105,9 +105,9 @@
}
},
"node_modules/@eslint/js": {
"version": "8.51.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.51.0.tgz",
"integrity": "sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==",
"version": "8.50.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz",
"integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -185,9 +185,9 @@
"dev": true
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
"version": "0.3.19",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz",
"integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==",
"dev": true,
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
@@ -195,23 +195,23 @@
}
},
"node_modules/@next/env": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.6.tgz",
"integrity": "sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw=="
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.4.tgz",
"integrity": "sha512-LGegJkMvRNw90WWphGJ3RMHMVplYcOfRWf2Be3td3sUa+1AaxmsYyANsA+znrGCBjXJNi4XAQlSoEfUxs/4kIQ=="
},
"node_modules/@next/eslint-plugin-next": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.5.6.tgz",
"integrity": "sha512-ng7pU/DDsxPgT6ZPvuprxrkeew3XaRf4LAT4FabaEO/hAbvVx4P7wqnqdbTdDn1kgTvsI4tpIgT4Awn/m0bGbg==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.5.4.tgz",
"integrity": "sha512-vI94U+D7RNgX6XypSyjeFrOzxGlZyxOplU0dVE5norIfZGn/LDjJYPHdvdsR5vN1eRtl6PDAsOHmycFEOljK5A==",
"dev": true,
"dependencies": {
"glob": "7.1.7"
}
},
"node_modules/@next/swc-darwin-arm64": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.6.tgz",
"integrity": "sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.4.tgz",
"integrity": "sha512-Df8SHuXgF1p+aonBMcDPEsaahNo2TCwuie7VXED4FVyECvdXfRT9unapm54NssV9tF3OQFKBFOdlje4T43VO0w==",
"cpu": [
"arm64"
],
@@ -224,9 +224,9 @@
}
},
"node_modules/@next/swc-darwin-x64": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.6.tgz",
"integrity": "sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.4.tgz",
"integrity": "sha512-siPuUwO45PnNRMeZnSa8n/Lye5ZX93IJom9wQRB5DEOdFrw0JjOMu1GINB8jAEdwa7Vdyn1oJ2xGNaQpdQQ9Pw==",
"cpu": [
"x64"
],
@@ -239,9 +239,9 @@
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.6.tgz",
"integrity": "sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.4.tgz",
"integrity": "sha512-l/k/fvRP/zmB2jkFMfefmFkyZbDkYW0mRM/LB+tH5u9pB98WsHXC0WvDHlGCYp3CH/jlkJPL7gN8nkTQVrQ/2w==",
"cpu": [
"arm64"
],
@@ -254,9 +254,9 @@
}
},
"node_modules/@next/swc-linux-arm64-musl": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.6.tgz",
"integrity": "sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.4.tgz",
"integrity": "sha512-YYGb7SlLkI+XqfQa8VPErljb7k9nUnhhRrVaOdfJNCaQnHBcvbT7cx/UjDQLdleJcfyg1Hkn5YSSIeVfjgmkTg==",
"cpu": [
"arm64"
],
@@ -269,9 +269,9 @@
}
},
"node_modules/@next/swc-linux-x64-gnu": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.6.tgz",
"integrity": "sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.4.tgz",
"integrity": "sha512-uE61vyUSClnCH18YHjA8tE1prr/PBFlBFhxBZis4XBRJoR+txAky5d7gGNUIbQ8sZZ7LVkSVgm/5Fc7mwXmRAg==",
"cpu": [
"x64"
],
@@ -284,9 +284,9 @@
}
},
"node_modules/@next/swc-linux-x64-musl": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.6.tgz",
"integrity": "sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.4.tgz",
"integrity": "sha512-qVEKFYML/GvJSy9CfYqAdUexA6M5AklYcQCW+8JECmkQHGoPxCf04iMh7CPR7wkHyWWK+XLt4Ja7hhsPJtSnhg==",
"cpu": [
"x64"
],
@@ -299,9 +299,9 @@
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.6.tgz",
"integrity": "sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.4.tgz",
"integrity": "sha512-mDSQfqxAlfpeZOLPxLymZkX0hYF3juN57W6vFHTvwKlnHfmh12Pt7hPIRLYIShk8uYRsKPtMTth/EzpwRI+u8w==",
"cpu": [
"arm64"
],
@@ -314,9 +314,9 @@
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.6.tgz",
"integrity": "sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.4.tgz",
"integrity": "sha512-aoqAT2XIekIWoriwzOmGFAvTtVY5O7JjV21giozBTP5c6uZhpvTWRbmHXbmsjZqY4HnEZQRXWkSAppsIBweKqw==",
"cpu": [
"ia32"
],
@@ -329,9 +329,9 @@
}
},
"node_modules/@next/swc-win32-x64-msvc": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.6.tgz",
"integrity": "sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.4.tgz",
"integrity": "sha512-cyRvlAxwlddlqeB9xtPSfNSCRy8BOa4wtMo0IuI9P7Y0XT2qpDrpFKRyZ7kUngZis59mPVla5k8X1oOJ8RxDYg==",
"cpu": [
"x64"
],
@@ -399,24 +399,21 @@
"dev": true
},
"node_modules/@types/node": {
"version": "20.8.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.7.tgz",
"integrity": "sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==",
"dev": true,
"dependencies": {
"undici-types": "~5.25.1"
}
"version": "20.8.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz",
"integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==",
"dev": true
},
"node_modules/@types/prop-types": {
"version": "15.7.9",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.9.tgz",
"integrity": "sha512-n1yyPsugYNSmHgxDFjicaI2+gCNjsBck8UX9kuofAKlc0h1bL+20oSF72KeNaW2DUlesbEVCFgyV2dPGTiY42g==",
"version": "15.7.8",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.8.tgz",
"integrity": "sha512-kMpQpfZKSCBqltAJwskgePRaYRFukDkm1oItcAbC3gNELR20XIBcN9VRgg4+m8DKsTfkWeA4m4Imp4DDuWy7FQ==",
"dev": true
},
"node_modules/@types/react": {
"version": "18.2.29",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.29.tgz",
"integrity": "sha512-Z+ZrIRocWtdD70j45izShRwDuiB4JZqDegqMFW/I8aG5DxxLKOzVNoq62UIO82v9bdgi+DO1jvsb9sTEZUSm+Q==",
"version": "18.2.24",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.24.tgz",
"integrity": "sha512-Ee0Jt4sbJxMu1iDcetZEIKQr99J1Zfb6D4F3qfUWoR1JpInkY1Wdg4WwCyBjL257D0+jGqSl1twBjV8iCaC0Aw==",
"dev": true,
"dependencies": {
"@types/prop-types": "*",
@@ -425,30 +422,30 @@
}
},
"node_modules/@types/react-dom": {
"version": "18.2.14",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.14.tgz",
"integrity": "sha512-V835xgdSVmyQmI1KLV2BEIUgqEuinxp9O4G6g3FqO/SqLac049E53aysv0oEFD2kHfejeKU+ZqL2bcFWj9gLAQ==",
"version": "18.2.8",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.8.tgz",
"integrity": "sha512-bAIvO5lN/U8sPGvs1Xm61rlRHHaq5rp5N3kp9C+NJ/Q41P8iqjkXSu0+/qu8POsjH9pNWb0OYabFez7taP7omw==",
"dev": true,
"dependencies": {
"@types/react": "*"
}
},
"node_modules/@types/scheduler": {
"version": "0.16.5",
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.5.tgz",
"integrity": "sha512-s/FPdYRmZR8SjLWGMCuax7r3qCWQw9QKHzXVukAuuIJkXkDRwp+Pu5LMIVFi0Fxbav35WURicYr8u1QsoybnQw==",
"version": "0.16.4",
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.4.tgz",
"integrity": "sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ==",
"dev": true
},
"node_modules/@typescript-eslint/parser": {
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.8.0.tgz",
"integrity": "sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==",
"version": "6.7.4",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.4.tgz",
"integrity": "sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "6.8.0",
"@typescript-eslint/types": "6.8.0",
"@typescript-eslint/typescript-estree": "6.8.0",
"@typescript-eslint/visitor-keys": "6.8.0",
"@typescript-eslint/scope-manager": "6.7.4",
"@typescript-eslint/types": "6.7.4",
"@typescript-eslint/typescript-estree": "6.7.4",
"@typescript-eslint/visitor-keys": "6.7.4",
"debug": "^4.3.4"
},
"engines": {
@@ -468,13 +465,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.8.0.tgz",
"integrity": "sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==",
"version": "6.7.4",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz",
"integrity": "sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.8.0",
"@typescript-eslint/visitor-keys": "6.8.0"
"@typescript-eslint/types": "6.7.4",
"@typescript-eslint/visitor-keys": "6.7.4"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
@@ -485,9 +482,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.8.0.tgz",
"integrity": "sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==",
"version": "6.7.4",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.4.tgz",
"integrity": "sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
@@ -498,13 +495,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz",
"integrity": "sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==",
"version": "6.7.4",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz",
"integrity": "sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.8.0",
"@typescript-eslint/visitor-keys": "6.8.0",
"@typescript-eslint/types": "6.7.4",
"@typescript-eslint/visitor-keys": "6.7.4",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -525,12 +522,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.8.0.tgz",
"integrity": "sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==",
"version": "6.7.4",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz",
"integrity": "sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.8.0",
"@typescript-eslint/types": "6.7.4",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
@@ -966,9 +963,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001550",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001550.tgz",
"integrity": "sha512-p82WjBYIypO0ukTsd/FG3Xxs+4tFeaY9pfT4amQL8KWtYH7H9nYwReGAbMTJ0hsmRO8IfDtsS6p3ZWj8+1c2RQ==",
"version": "1.0.30001542",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001542.tgz",
"integrity": "sha512-UrtAXVcj1mvPBFQ4sKd38daP8dEcXXr5sQe6QNNinaPd0iA/cxg9/l3VrSdL73jgw5sKyuQ6jNgiKO12W3SsVA==",
"funding": [
{
"type": "opencollective",
@@ -1139,9 +1136,9 @@
"dev": true
},
"node_modules/define-data-property": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz",
"integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz",
"integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==",
"dev": true,
"dependencies": {
"get-intrinsic": "^1.2.1",
@@ -1215,9 +1212,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.4.559",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.559.tgz",
"integrity": "sha512-iS7KhLYCSJbdo3rUSkhDTVuFNCV34RKs2UaB9Ecr7VlqzjjWW//0nfsFF5dtDmyXlZQaDYYtID5fjtC/6lpRug==",
"version": "1.4.539",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.539.tgz",
"integrity": "sha512-wRmWJ8F7rgmINuI32S6r2SLrw/h/bJQsDSvBiq9GBfvc2Lh73qTOwn73r3Cf67mjVgFGJYcYtmERzySa5jIWlg==",
"dev": true
},
"node_modules/emoji-regex": {
@@ -1376,15 +1373,15 @@
}
},
"node_modules/eslint": {
"version": "8.51.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.51.0.tgz",
"integrity": "sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==",
"version": "8.50.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz",
"integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.2",
"@eslint/js": "8.51.0",
"@eslint/js": "8.50.0",
"@humanwhocodes/config-array": "^0.11.11",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@@ -1430,12 +1427,12 @@
}
},
"node_modules/eslint-config-next": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.5.6.tgz",
"integrity": "sha512-o8pQsUHTo9aHqJ2YiZDym5gQAMRf7O2HndHo/JZeY7TDD+W4hk6Ma8Vw54RHiBeb7OWWO5dPirQB+Is/aVQ7Kg==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.5.4.tgz",
"integrity": "sha512-FzQGIj4UEszRX7fcRSJK6L1LrDiVZvDFW320VVntVKh3BSU8Fb9kpaoxQx0cdFgf3MQXdeSbrCXJ/5Z/NndDkQ==",
"dev": true,
"dependencies": {
"@next/eslint-plugin-next": "13.5.6",
"@next/eslint-plugin-next": "13.5.4",
"@rushstack/eslint-patch": "^1.3.3",
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
"eslint-import-resolver-node": "^0.3.6",
@@ -1681,12 +1678,12 @@
}
},
"node_modules/eslint-plugin-react/node_modules/resolve": {
"version": "2.0.0-next.5",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz",
"integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==",
"version": "2.0.0-next.4",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz",
"integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==",
"dev": true,
"dependencies": {
"is-core-module": "^2.13.0",
"is-core-module": "^2.9.0",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
},
@@ -1889,12 +1886,12 @@
}
},
"node_modules/flat-cache": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz",
"integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz",
"integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==",
"dev": true,
"dependencies": {
"flatted": "^3.2.9",
"flatted": "^3.2.7",
"keyv": "^4.5.3",
"rimraf": "^3.0.2"
},
@@ -1918,9 +1915,9 @@
}
},
"node_modules/fraction.js": {
"version": "4.3.7",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
"version": "4.3.6",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.6.tgz",
"integrity": "sha512-n2aZ9tNfYDwaHhvFTkhFErqOMIb8uyzSQ+vGJBjZyanAKZVbGUQ1sngfk9FdkBw7G26O7AgNjLcecLffD1c7eg==",
"dev": true,
"engines": {
"node": "*"
@@ -1951,13 +1948,10 @@
}
},
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
"node_modules/function.prototype.name": {
"version": "1.1.6",
@@ -2067,9 +2061,9 @@
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="
},
"node_modules/globals": {
"version": "13.23.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz",
"integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==",
"version": "13.22.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz",
"integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==",
"dev": true,
"dependencies": {
"type-fest": "^0.20.2"
@@ -2140,10 +2134,13 @@
"dev": true
},
"node_modules/has": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz",
"integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==",
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"dependencies": {
"function-bind": "^1.1.1"
},
"engines": {
"node": ">= 0.4.0"
}
@@ -2704,9 +2701,9 @@
}
},
"node_modules/keyv": {
"version": "4.5.4",
"resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
"integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
"version": "4.5.3",
"resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz",
"integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==",
"dev": true,
"dependencies": {
"json-buffer": "3.0.1"
@@ -2883,11 +2880,11 @@
"dev": true
},
"node_modules/next": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/next/-/next-13.5.6.tgz",
"integrity": "sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==",
"version": "13.5.4",
"resolved": "https://registry.npmjs.org/next/-/next-13.5.4.tgz",
"integrity": "sha512-+93un5S779gho8y9ASQhb/bTkQF17FNQOtXLKAj3lsNgltEcF0C5PMLLncDmH+8X1EnJH1kbqAERa29nRXqhjA==",
"dependencies": {
"@next/env": "13.5.6",
"@next/env": "13.5.4",
"@swc/helpers": "0.5.2",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
@@ -2902,15 +2899,15 @@
"node": ">=16.14.0"
},
"optionalDependencies": {
"@next/swc-darwin-arm64": "13.5.6",
"@next/swc-darwin-x64": "13.5.6",
"@next/swc-linux-arm64-gnu": "13.5.6",
"@next/swc-linux-arm64-musl": "13.5.6",
"@next/swc-linux-x64-gnu": "13.5.6",
"@next/swc-linux-x64-musl": "13.5.6",
"@next/swc-win32-arm64-msvc": "13.5.6",
"@next/swc-win32-ia32-msvc": "13.5.6",
"@next/swc-win32-x64-msvc": "13.5.6"
"@next/swc-darwin-arm64": "13.5.4",
"@next/swc-darwin-x64": "13.5.4",
"@next/swc-linux-arm64-gnu": "13.5.4",
"@next/swc-linux-arm64-musl": "13.5.4",
"@next/swc-linux-x64-gnu": "13.5.4",
"@next/swc-linux-x64-musl": "13.5.4",
"@next/swc-win32-arm64-msvc": "13.5.4",
"@next/swc-win32-ia32-msvc": "13.5.4",
"@next/swc-win32-x64-msvc": "13.5.4"
},
"peerDependencies": {
"@opentelemetry/api": "^1.1.0",
@@ -2970,9 +2967,9 @@
}
},
"node_modules/object-inspect": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz",
"integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==",
"version": "1.12.3",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
"integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -3496,9 +3493,9 @@
}
},
"node_modules/resolve": {
"version": "1.22.8",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
"integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
"version": "1.22.6",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz",
"integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==",
"dev": true,
"dependencies": {
"is-core-module": "^2.13.0",
@@ -4130,12 +4127,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/undici-types": {
"version": "5.25.3",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz",
"integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==",
"dev": true
},
"node_modules/update-browserslist-db": {
"version": "1.0.13",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
@@ -4297,9 +4288,9 @@
"dev": true
},
"node_modules/yaml": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz",
"integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz",
"integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==",
"dev": true,
"engines": {
"node": ">= 14"

View File

@@ -11,7 +11,7 @@
"dependencies": {
"react": "^18",
"react-dom": "^18",
"next": "13.5.6"
"next": "13.5.4"
},
"devDependencies": {
"typescript": "^5",
@@ -22,6 +22,6 @@
"postcss": "^8",
"tailwindcss": "^3",
"eslint": "^8",
"eslint-config-next": "13.5.6"
"eslint-config-next": "13.5.4"
}
}

View File

@@ -1,12 +1,5 @@
# @vercel-internals/types
## 1.0.13
### Patch Changes
- Updated dependencies [[`9e9fac019`](https://github.com/vercel/vercel/commit/9e9fac0191cb1428ac9e5479c3d5c8afd7b7d357)]:
- @vercel/routing-utils@3.1.0
## 1.0.12
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "@vercel-internals/types",
"version": "1.0.13",
"version": "1.0.12",
"types": "index.d.ts",
"main": "index.d.ts",
"files": [
@@ -11,7 +11,7 @@
"@types/node": "14.14.31",
"@vercel-internals/constants": "1.0.4",
"@vercel/build-utils": "7.2.2",
"@vercel/routing-utils": "3.1.0"
"@vercel/routing-utils": "3.0.0"
},
"devDependencies": {
"@vercel-internals/tsconfig": "1.0.0",

View File

@@ -33,7 +33,7 @@
"source-map-support": "0.5.12",
"ts-eager": "2.0.2",
"ts-jest": "29.1.0",
"turbo": "1.10.15",
"turbo": "1.10.14",
"typescript": "4.9.5"
},
"scripts": {

View File

@@ -1,7 +1,4 @@
{
"compilerOptions": {
"sourceMap": true
},
"extends": "../tsconfig.json",
"include": ["*.test.ts"]
}

View File

@@ -1,22 +1,5 @@
# vercel
## 32.5.0
### Minor Changes
- Indicates whether @vercel/speed-insights or @vercel/analytics are used ([#10623](https://github.com/vercel/vercel/pull/10623))
- [cli] update env var validation rule to allow name start with underscore ([#10697](https://github.com/vercel/vercel/pull/10697))
### Patch Changes
- Updated dependencies [[`da300030c`](https://github.com/vercel/vercel/commit/da300030c999b3555c608a321c9d0a4d36923a5a), [`de84743e1`](https://github.com/vercel/vercel/commit/de84743e10d4c9701d409355c0fe057f35e6e435), [`913608de4`](https://github.com/vercel/vercel/commit/913608de4dd4e37557533d732ca8449a5737d4a6), [`7fa08088e`](https://github.com/vercel/vercel/commit/7fa08088ea0d5df6955ea4af7f08513cf4027bb3)]:
- @vercel/next@4.0.11
- @vercel/python@4.1.0
- @vercel/remix-builder@2.0.10
- @vercel/redwood@2.0.5
- @vercel/static-build@2.0.9
## 32.4.1
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "vercel",
"version": "32.5.0",
"version": "32.4.1",
"preferGlobal": true,
"license": "Apache-2.0",
"description": "The command-line interface for Vercel",
@@ -35,13 +35,13 @@
"@vercel/fun": "1.1.0",
"@vercel/go": "3.0.3",
"@vercel/hydrogen": "1.0.1",
"@vercel/next": "4.0.11",
"@vercel/next": "4.0.10",
"@vercel/node": "3.0.7",
"@vercel/python": "4.1.0",
"@vercel/redwood": "2.0.5",
"@vercel/remix-builder": "2.0.10",
"@vercel/python": "4.0.2",
"@vercel/redwood": "2.0.4",
"@vercel/remix-builder": "2.0.9",
"@vercel/ruby": "2.0.2",
"@vercel/static-build": "2.0.9",
"@vercel/static-build": "2.0.8",
"chokidar": "3.3.1"
},
"devDependencies": {
@@ -88,12 +88,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.13",
"@vercel/client": "13.0.6",
"@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.2",
"@vercel/routing-utils": "3.1.0",
"@vercel/fs-detectors": "5.1.1",
"@vercel/routing-utils": "3.0.0",
"ajv": "6.12.2",
"alpha-sort": "2.0.1",
"ansi-escapes": "4.3.2",

View File

@@ -17,14 +17,12 @@ type Options = {};
export default async function buy(
client: Client,
opts: Partial<Options>,
opts: Options,
args: string[]
) {
const { output } = client;
const { contextName } = await getScope(client);
const skipConfirmation = !!process.env.CI;
const [domainName] = args;
if (!domainName) {
output.error(
@@ -80,32 +78,26 @@ export default async function buy(
'available'
)} to buy under ${chalk.bold(contextName)}! ${availableStamp()}`
);
let autoRenew;
if (skipConfirmation) {
autoRenew = true;
} else {
if (
!(await promptBool(
`Buy now for ${chalk.bold(`$${price}`)} (${`${period}yr${
period > 1 ? 's' : ''
}`})?`,
client
))
) {
return 0;
}
autoRenew = await promptBool(
renewalPrice.period === 1
? `Auto renew yearly for ${chalk.bold(`$${price}`)}?`
: `Auto renew every ${renewalPrice.period} years for ${chalk.bold(
`$${price}`
)}?`,
{ ...client, defaultValue: true }
);
if (
!(await promptBool(
`Buy now for ${chalk.bold(`$${price}`)} (${`${period}yr${
period > 1 ? 's' : ''
}`})?`,
client
))
) {
return 0;
}
const autoRenew = await promptBool(
renewalPrice.period === 1
? `Auto renew yearly for ${chalk.bold(`$${price}`)}?`
: `Auto renew every ${renewalPrice.period} years for ${chalk.bold(
`$${price}`
)}?`,
{ ...client, defaultValue: true }
);
let buyResult;
const purchaseStamp = stamp();
output.spinner('Purchasing');

View File

@@ -10,9 +10,11 @@ export async function initCorepack({
}: {
repoRootPath: string;
}): Promise<string | null> {
console.log('[debug] called initCorepack()')
if (process.env.ENABLE_EXPERIMENTAL_COREPACK !== '1') {
// Since corepack is experimental, we need to exit early
// unless the user explicitly enables it with the env var.
console.log('[debug] missing env ENABLE_EXPERIMENTAL_COREPACK')
return null;
}
const pkg = await readJSONFile<PackageJson>(
@@ -34,8 +36,11 @@ export async function initCorepack({
const corepackRootDir = join(repoRootPath, VERCEL_DIR, 'cache', 'corepack');
const corepackHomeDir = join(corepackRootDir, 'home');
const corepackShimDir = join(corepackRootDir, 'shim');
console.log({corepackRootDir, corepackHomeDir, corepackShimDir})
await fs.mkdirp(corepackHomeDir);
console.log('[debug] created corepack home')
await fs.mkdirp(corepackShimDir);
console.log('[debug] created corepack shim')
process.env.COREPACK_HOME = corepackHomeDir;
process.env.PATH = `${corepackShimDir}${delimiter}${process.env.PATH}`;
const pkgManagerName = pkg.packageManager.split('@')[0];
@@ -53,12 +58,14 @@ export async function initCorepack({
prettyCommand: `corepack enable ${pkgManagerName}`,
}
);
console.log('[debug] spawn corepack was successful')
return corepackShimDir;
}
return null;
}
export function cleanupCorepack(corepackShimDir: string) {
console.log('[debug] called cleanupCorepack()')
if (process.env.COREPACK_HOME) {
delete process.env.COREPACK_HOME;
}

View File

@@ -790,10 +790,11 @@ export default class DevServer {
const merged: Env = { ...env, ...localEnv };
// Validate that the env var name satisfies what Vercel's platform accepts.
// Validate that the env var name matches what AWS Lambda allows:
// - https://docs.aws.amazon.com/lambda/latest/dg/env_variables.html
let hasInvalidName = false;
for (const key of Object.keys(merged)) {
if (!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(key)) {
if (!/^[a-zA-Z][a-zA-Z0-9_]*$/.test(key)) {
this.output.warn(
`Ignoring ${type
.split('.')
@@ -807,7 +808,7 @@ export default class DevServer {
}
if (hasInvalidName) {
this.output.log(
'The name contains invalid characters. Only letters, digits, and underscores are allowed. Furthermore, the name should not start with a digit'
'Env var names must start with letters, and can only contain alphanumeric characters and underscores'
);
}
@@ -1318,11 +1319,6 @@ export default class DevServer {
}
if (!match && status && phase !== 'miss') {
if (routeResult.userDest) {
// If it's a user defined route then we continue routing
return false;
}
this.output.debug(`Route found with with status code ${status}`);
await this.sendError(req, res, requestId, '', status, headers);
return true;

View File

@@ -3,6 +3,7 @@ node_modules
/*.log
*.lock
package-lock.json
yarn.lock
.now
.vercel

File diff suppressed because it is too large Load Diff

View File

@@ -1,613 +0,0 @@
{
"name": "30-next-image-optimization",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
"next": "latest",
"react": "latest",
"react-dom": "latest"
}
},
"node_modules/@next/env": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.5.tgz",
"integrity": "sha512-agvIhYWp+ilbScg81s/sLueZo8CNEYLjNOqhISxheLmD/AQI4/VxV7bV76i/KzxH4iHy/va0YS9z0AOwGnw4Fg=="
},
"node_modules/@next/swc-darwin-arm64": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.5.tgz",
"integrity": "sha512-FvTdcJdTA7H1FGY8dKPPbf/O0oDC041/znHZwXA7liiGUhgw5hOQ+9z8tWvuz0M5a/SDjY/IRPBAb5FIFogYww==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-darwin-x64": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.5.tgz",
"integrity": "sha512-mTqNIecaojmyia7appVO2QggBe1Z2fdzxgn6jb3x9qlAk8yY2sy4MAcsj71kC9RlenCqDmr9vtC/ESFf110TPA==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-linux-arm64-gnu": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.5.tgz",
"integrity": "sha512-U9e+kNkfvwh/T8yo+xcslvNXgyMzPPX1IbwCwnHHFmX5ckb1Uc3XZSInNjFQEQR5xhJpB5sFdal+IiBIiLYkZA==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-linux-arm64-musl": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.5.tgz",
"integrity": "sha512-h7b58eIoNCSmKVC5fr167U0HWZ/yGLbkKD9wIller0nGdyl5zfTji0SsPKJvrG8jvKPFt2xOkVBmXlFOtuKynw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-linux-x64-gnu": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.5.tgz",
"integrity": "sha512-6U4y21T1J6FfcpM9uqzBJicxycpB5gJKLyQ3g6KOfBzT8H1sMwfHTRrvHKB09GIn1BCRy5YJHrA1G26DzqR46w==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-linux-x64-musl": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.5.tgz",
"integrity": "sha512-OuqWSAQHJQM2EsapPFTSU/FLQ0wKm7UeRNatiR/jLeCe1V02aB9xmzuWYo2Neaxxag4rss3S8fj+lvMLzwDaFA==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-win32-arm64-msvc": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.5.tgz",
"integrity": "sha512-+yLrOZIIZDY4uGn9bLOc0wTgs+M8RuOUFSUK3BhmcLav9e+tcAj0jyBHD4aXv2qWhppUeuYMsyBo1I58/eE6Dg==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.5.tgz",
"integrity": "sha512-SyMxXyJtf9ScMH0Dh87THJMXNFvfkRAk841xyW9SeOX3KxM1buXX3hN7vof4kMGk0Yg996OGsX+7C9ueS8ugsw==",
"cpu": [
"ia32"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-win32-x64-msvc": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.5.tgz",
"integrity": "sha512-n5KVf2Ok0BbLwofAaHiiKf+BQCj1M8WmTujiER4/qzYAVngnsNSjqEWvJ03raeN9eURqxDO+yL5VRoDrR33H9A==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@swc/helpers": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz",
"integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==",
"dependencies": {
"tslib": "^2.4.0"
}
},
"node_modules/busboy": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
"dependencies": {
"streamsearch": "^1.1.0"
},
"engines": {
"node": ">=10.16.0"
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001549",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz",
"integrity": "sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
]
},
"node_modules/client-only": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
},
"node_modules/glob-to-regexp": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="
},
"node_modules/graceful-fs": {
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
},
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"node_modules/loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dependencies": {
"js-tokens": "^3.0.0 || ^4.0.0"
},
"bin": {
"loose-envify": "cli.js"
}
},
"node_modules/nanoid": {
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"bin": {
"nanoid": "bin/nanoid.cjs"
},
"engines": {
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/next": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/next/-/next-13.5.5.tgz",
"integrity": "sha512-LddFJjpfrtrMMw8Q9VLhIURuSidiCNcMQjRqcPtrKd+Fx07MsG7hYndJb/f2d3I+mTbTotsTJfCnn0eZ/YPk8w==",
"dependencies": {
"@next/env": "13.5.5",
"@swc/helpers": "0.5.2",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
"postcss": "8.4.31",
"styled-jsx": "5.1.1",
"watchpack": "2.4.0"
},
"bin": {
"next": "dist/bin/next"
},
"engines": {
"node": ">=16.14.0"
},
"optionalDependencies": {
"@next/swc-darwin-arm64": "13.5.5",
"@next/swc-darwin-x64": "13.5.5",
"@next/swc-linux-arm64-gnu": "13.5.5",
"@next/swc-linux-arm64-musl": "13.5.5",
"@next/swc-linux-x64-gnu": "13.5.5",
"@next/swc-linux-x64-musl": "13.5.5",
"@next/swc-win32-arm64-msvc": "13.5.5",
"@next/swc-win32-ia32-msvc": "13.5.5",
"@next/swc-win32-x64-msvc": "13.5.5"
},
"peerDependencies": {
"@opentelemetry/api": "^1.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.3.0"
},
"peerDependenciesMeta": {
"@opentelemetry/api": {
"optional": true
},
"sass": {
"optional": true
}
}
},
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
"node_modules/postcss": {
"version": "8.4.31",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"dependencies": {
"nanoid": "^3.3.6",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
"engines": {
"node": "^10 || ^12 || >=14"
}
},
"node_modules/react": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
"dependencies": {
"loose-envify": "^1.1.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/react-dom": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
"integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
"dependencies": {
"loose-envify": "^1.1.0",
"scheduler": "^0.23.0"
},
"peerDependencies": {
"react": "^18.2.0"
}
},
"node_modules/scheduler": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
"integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
"dependencies": {
"loose-envify": "^1.1.0"
}
},
"node_modules/source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/streamsearch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/styled-jsx": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
"integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==",
"dependencies": {
"client-only": "0.0.1"
},
"engines": {
"node": ">= 12.0.0"
},
"peerDependencies": {
"react": ">= 16.8.0 || 17.x.x || ^18.0.0-0"
},
"peerDependenciesMeta": {
"@babel/core": {
"optional": true
},
"babel-plugin-macros": {
"optional": true
}
}
},
"node_modules/tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
},
"node_modules/watchpack": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
"integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
"dependencies": {
"glob-to-regexp": "^0.4.1",
"graceful-fs": "^4.1.2"
},
"engines": {
"node": ">=10.13.0"
}
}
},
"dependencies": {
"@next/env": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.5.tgz",
"integrity": "sha512-agvIhYWp+ilbScg81s/sLueZo8CNEYLjNOqhISxheLmD/AQI4/VxV7bV76i/KzxH4iHy/va0YS9z0AOwGnw4Fg=="
},
"@next/swc-darwin-arm64": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.5.tgz",
"integrity": "sha512-FvTdcJdTA7H1FGY8dKPPbf/O0oDC041/znHZwXA7liiGUhgw5hOQ+9z8tWvuz0M5a/SDjY/IRPBAb5FIFogYww==",
"optional": true
},
"@next/swc-darwin-x64": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.5.tgz",
"integrity": "sha512-mTqNIecaojmyia7appVO2QggBe1Z2fdzxgn6jb3x9qlAk8yY2sy4MAcsj71kC9RlenCqDmr9vtC/ESFf110TPA==",
"optional": true
},
"@next/swc-linux-arm64-gnu": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.5.tgz",
"integrity": "sha512-U9e+kNkfvwh/T8yo+xcslvNXgyMzPPX1IbwCwnHHFmX5ckb1Uc3XZSInNjFQEQR5xhJpB5sFdal+IiBIiLYkZA==",
"optional": true
},
"@next/swc-linux-arm64-musl": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.5.tgz",
"integrity": "sha512-h7b58eIoNCSmKVC5fr167U0HWZ/yGLbkKD9wIller0nGdyl5zfTji0SsPKJvrG8jvKPFt2xOkVBmXlFOtuKynw==",
"optional": true
},
"@next/swc-linux-x64-gnu": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.5.tgz",
"integrity": "sha512-6U4y21T1J6FfcpM9uqzBJicxycpB5gJKLyQ3g6KOfBzT8H1sMwfHTRrvHKB09GIn1BCRy5YJHrA1G26DzqR46w==",
"optional": true
},
"@next/swc-linux-x64-musl": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.5.tgz",
"integrity": "sha512-OuqWSAQHJQM2EsapPFTSU/FLQ0wKm7UeRNatiR/jLeCe1V02aB9xmzuWYo2Neaxxag4rss3S8fj+lvMLzwDaFA==",
"optional": true
},
"@next/swc-win32-arm64-msvc": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.5.tgz",
"integrity": "sha512-+yLrOZIIZDY4uGn9bLOc0wTgs+M8RuOUFSUK3BhmcLav9e+tcAj0jyBHD4aXv2qWhppUeuYMsyBo1I58/eE6Dg==",
"optional": true
},
"@next/swc-win32-ia32-msvc": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.5.tgz",
"integrity": "sha512-SyMxXyJtf9ScMH0Dh87THJMXNFvfkRAk841xyW9SeOX3KxM1buXX3hN7vof4kMGk0Yg996OGsX+7C9ueS8ugsw==",
"optional": true
},
"@next/swc-win32-x64-msvc": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.5.tgz",
"integrity": "sha512-n5KVf2Ok0BbLwofAaHiiKf+BQCj1M8WmTujiER4/qzYAVngnsNSjqEWvJ03raeN9eURqxDO+yL5VRoDrR33H9A==",
"optional": true
},
"@swc/helpers": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz",
"integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==",
"requires": {
"tslib": "^2.4.0"
}
},
"busboy": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
"requires": {
"streamsearch": "^1.1.0"
}
},
"caniuse-lite": {
"version": "1.0.30001549",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz",
"integrity": "sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA=="
},
"client-only": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
},
"glob-to-regexp": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="
},
"graceful-fs": {
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
},
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
}
},
"nanoid": {
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA=="
},
"next": {
"version": "13.5.5",
"resolved": "https://registry.npmjs.org/next/-/next-13.5.5.tgz",
"integrity": "sha512-LddFJjpfrtrMMw8Q9VLhIURuSidiCNcMQjRqcPtrKd+Fx07MsG7hYndJb/f2d3I+mTbTotsTJfCnn0eZ/YPk8w==",
"requires": {
"@next/env": "13.5.5",
"@next/swc-darwin-arm64": "13.5.5",
"@next/swc-darwin-x64": "13.5.5",
"@next/swc-linux-arm64-gnu": "13.5.5",
"@next/swc-linux-arm64-musl": "13.5.5",
"@next/swc-linux-x64-gnu": "13.5.5",
"@next/swc-linux-x64-musl": "13.5.5",
"@next/swc-win32-arm64-msvc": "13.5.5",
"@next/swc-win32-ia32-msvc": "13.5.5",
"@next/swc-win32-x64-msvc": "13.5.5",
"@swc/helpers": "0.5.2",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
"postcss": "8.4.31",
"styled-jsx": "5.1.1",
"watchpack": "2.4.0"
}
},
"picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
"postcss": {
"version": "8.4.31",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"requires": {
"nanoid": "^3.3.6",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
}
},
"react": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
"requires": {
"loose-envify": "^1.1.0"
}
},
"react-dom": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
"integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
"requires": {
"loose-envify": "^1.1.0",
"scheduler": "^0.23.0"
}
},
"scheduler": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
"integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
"requires": {
"loose-envify": "^1.1.0"
}
},
"source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
},
"streamsearch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg=="
},
"styled-jsx": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
"integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==",
"requires": {
"client-only": "0.0.1"
}
},
"tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
},
"watchpack": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
"integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
"requires": {
"glob-to-regexp": "^0.4.1",
"graceful-fs": "^4.1.2"
}
}
}
}

View File

@@ -1,11 +1,11 @@
{
"version": 2,
"env": {
"1": "not_allowed"
"1": ""
},
"build": {
"env": {
"_a": "allowed"
"_a": ""
}
}
}

View File

@@ -9,15 +9,5 @@
}
}
],
"rewrites": [
{
"source": "/hello",
"destination": "index.html"
},
{
"source": "/status-rewrite-425",
"destination": "index.html",
"statusCode": 425
}
]
"rewrites": [{ "source": "/hello", "destination": "index.html" }]
}

View File

@@ -45,7 +45,10 @@ test('[vercel dev] validate env var names', async () => {
if (
stderr.includes('Ignoring env var "1" because name is invalid') &&
stderr.includes(
'The name contains invalid characters. Only letters, digits, and underscores are allowed. Furthermore, the name should not start with a digit'
'Ignoring build env var "_a" because name is invalid'
) &&
stderr.includes(
'Env var names must start with letters, and can only contain alphanumeric characters and underscores'
)
) {
resolve();
@@ -75,7 +78,6 @@ test(
'[vercel dev] test rewrites serve correct content',
testFixtureStdio('test-rewrites', async (testPath: any) => {
await testPath(200, '/hello', 'Hello World');
await testPath(425, '/status-rewrite-425', 'Hello World');
})
);

View File

@@ -422,7 +422,6 @@ test('domains inspect', async () => {
}
});
// eslint-disable-next-line jest/no-disabled-tests
test('try to purchase a domain', async () => {
if (process.env.VERCEL_TOKEN || process.env.NOW_TOKEN) {
console.log(
@@ -434,6 +433,14 @@ test('try to purchase a domain', async () => {
const stream = new Readable();
stream._read = () => {};
setTimeout(async () => {
await sleep(ms('1s'));
stream.push('y');
await sleep(ms('1s'));
stream.push('y');
stream.push(null);
}, ms('1s'));
const { stderr, stdout, exitCode } = await execCli(
binaryPath,
['domains', 'buy', `${session}-test.com`],

View File

@@ -1,7 +1,4 @@
{
"compilerOptions": {
"sourceMap": true
},
"extends": "../tsconfig.json",
"include": ["**/*.test.ts"]
}

View File

@@ -1,12 +1,5 @@
# @vercel/client
## 13.0.6
### Patch Changes
- Updated dependencies [[`9e9fac019`](https://github.com/vercel/vercel/commit/9e9fac0191cb1428ac9e5479c3d5c8afd7b7d357)]:
- @vercel/routing-utils@3.1.0
## 13.0.5
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/client",
"version": "13.0.6",
"version": "13.0.5",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"homepage": "https://vercel.com",
@@ -38,7 +38,7 @@
},
"dependencies": {
"@vercel/build-utils": "7.2.2",
"@vercel/routing-utils": "3.1.0",
"@vercel/routing-utils": "3.0.0",
"@zeit/fetch": "5.2.0",
"async-retry": "1.2.3",
"async-sema": "3.0.0",

View File

@@ -1,7 +1,4 @@
{
"compilerOptions": {
"sourceMap": true
},
"extends": "../tsconfig.json",
"include": ["*.test.ts"]
}

View File

@@ -1,8 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"sourceMap": true,
"types": ["node", "jest"]
},
"extends": "../tsconfig.json",
"include": ["*.test.ts"]
}

View File

@@ -28,7 +28,7 @@
"@types/js-yaml": "3.12.1",
"@types/node": "14.18.33",
"@types/node-fetch": "2.5.8",
"@vercel/routing-utils": "3.1.0",
"@vercel/routing-utils": "3.0.0",
"ajv": "6.12.2",
"jest-junit": "16.0.0",
"typescript": "4.9.5"

View File

@@ -1,7 +0,0 @@
{
"compilerOptions": {
"sourceMap": true
},
"extends": "../tsconfig.json",
"include": ["*.test.ts"]
}

View File

@@ -1,12 +1,5 @@
# @vercel/fs-detectors
## 5.1.2
### Patch Changes
- Updated dependencies [[`9e9fac019`](https://github.com/vercel/vercel/commit/9e9fac0191cb1428ac9e5479c3d5c8afd7b7d357)]:
- @vercel/routing-utils@3.1.0
## 5.1.1
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/fs-detectors",
"version": "5.1.2",
"version": "5.1.1",
"description": "Vercel filesystem detectors",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -23,7 +23,7 @@
"dependencies": {
"@vercel/error-utils": "2.0.1",
"@vercel/frameworks": "2.0.2",
"@vercel/routing-utils": "3.1.0",
"@vercel/routing-utils": "3.0.0",
"glob": "8.0.3",
"js-yaml": "4.1.0",
"json5": "2.2.2",

View File

@@ -1,7 +1,4 @@
{
"compilerOptions": {
"sourceMap": true
},
"extends": "../tsconfig.json",
"include": ["*.test.ts"]
}

View File

@@ -1,12 +1,5 @@
# @vercel/gatsby-plugin-vercel-builder
## 2.0.8
### Patch Changes
- Updated dependencies [[`9e9fac019`](https://github.com/vercel/vercel/commit/9e9fac0191cb1428ac9e5479c3d5c8afd7b7d357)]:
- @vercel/routing-utils@3.1.0
## 2.0.7
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/gatsby-plugin-vercel-builder",
"version": "2.0.8",
"version": "2.0.7",
"main": "dist/index.js",
"files": [
"dist",
@@ -19,7 +19,7 @@
"dependencies": {
"@sinclair/typebox": "0.25.24",
"@vercel/build-utils": "7.2.2",
"@vercel/routing-utils": "3.1.0",
"@vercel/routing-utils": "3.0.0",
"esbuild": "0.14.47",
"etag": "1.8.1",
"fs-extra": "11.1.0"

View File

@@ -1,7 +0,0 @@
{
"compilerOptions": {
"sourceMap": true
},
"extends": "../tsconfig.json",
"include": ["*.test.ts"]
}

View File

@@ -1,13 +1,5 @@
# @vercel/next
## 4.0.11
### Patch Changes
- fix `build` in appDir on Windows ([#10708](https://github.com/vercel/vercel/pull/10708))
- Fix RSC prefetch for index route with catch-all ([#10734](https://github.com/vercel/vercel/pull/10734))
## 4.0.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/next",
"version": "4.0.11",
"version": "4.0.10",
"license": "Apache-2.0",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -9,7 +9,6 @@
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail --runInBand --testTimeout=360000",
"test-unit": "pnpm test test/unit/",
"test-next-local": "pnpm test test/integration/*.test.js test/integration/*.test.ts",
"test-next-local-legacy": "pnpm test test/integration/legacy/*.test.js",
"test-next-local:middleware": "pnpm test test/integration/middleware.test.ts",
"test-e2e": "rm -f test/builder-info.json; pnpm test test/fixtures/**/*.test.js",
"type-check": "tsc --noEmit"
@@ -41,7 +40,7 @@
"@types/text-table": "0.2.1",
"@types/webpack-sources": "3.2.0",
"@vercel/build-utils": "7.2.2",
"@vercel/routing-utils": "3.1.0",
"@vercel/routing-utils": "3.0.0",
"async-sema": "3.0.1",
"buffer-crc32": "0.2.13",
"bytes": "3.1.2",

View File

@@ -66,6 +66,7 @@ import {
getFilesMapFromReasons,
getImagesConfig,
getImagesManifest,
getMiddlewareManifest,
getNextConfig,
getPageLambdaGroups,
getPrerenderManifest,
@@ -90,8 +91,8 @@ import {
getOperationType,
isApiPage,
getFunctionsConfigManifest,
normalizeEdgeFunctionPath,
require_,
getServerlessPages,
} from './utils';
export const version = 2;
@@ -2682,3 +2683,59 @@ export const prepareCache: PrepareCache = async ({
debug('Cache file manifest produced');
return cache;
};
async function getServerlessPages(params: {
pagesDir: string;
entryPath: string;
outputDirectory: string;
appPathRoutesManifest?: Record<string, string>;
}) {
const [pages, appPaths, middlewareManifest] = await Promise.all([
glob('**/!(_middleware).js', params.pagesDir),
params.appPathRoutesManifest
? Promise.all([
glob('**/page.js', path.join(params.pagesDir, '../app')),
glob('**/route.js', path.join(params.pagesDir, '../app')),
glob('**/_not-found.js', path.join(params.pagesDir, '../app')),
]).then(items => Object.assign(...items))
: Promise.resolve({}),
getMiddlewareManifest(params.entryPath, params.outputDirectory),
]);
const normalizedAppPaths: typeof appPaths = {};
if (params.appPathRoutesManifest) {
for (const [entry, normalizedEntry] of Object.entries(
params.appPathRoutesManifest
)) {
const normalizedPath = `${path.join(
'.',
normalizedEntry === '/' ? '/index' : normalizedEntry
)}.js`;
const globPath = `${path.join('.', entry)}.js`;
if (appPaths[globPath]) {
normalizedAppPaths[normalizedPath] = appPaths[globPath];
}
}
}
// Edge Functions do not consider as Serverless Functions
for (const edgeFunctionFile of Object.keys(
middlewareManifest?.functions ?? {}
)) {
let edgePath =
middlewareManifest?.functions?.[edgeFunctionFile].name ||
edgeFunctionFile;
edgePath = normalizeEdgeFunctionPath(
edgePath,
params.appPathRoutesManifest || {}
);
edgePath = (edgePath || 'index') + '.js';
delete normalizedAppPaths[edgePath];
delete pages[edgePath];
}
return { pages, appPaths: normalizedAppPaths };
}

View File

@@ -193,14 +193,6 @@ export async function serverBuild({
const rscContentTypeHeader =
routesManifest?.rsc?.contentTypeHeader || RSC_CONTENT_TYPE;
// index.{ext} outputs get mapped to `/` which we don't want to override
// dynamic routes that aren't pregenerated like the prefetch rsc payload
if (appRscPrefetches['index.prefetch.rsc']) {
appRscPrefetches['__index.prefetch.rsc'] =
appRscPrefetches['index.prefetch.rsc'];
delete appRscPrefetches['index.prefetch.rsc'];
}
// ensure all appRscPrefetches have a contentType since this is used by Next.js
// to determine if it's a valid response
for (const value of Object.values(appRscPrefetches)) {
@@ -1626,7 +1618,7 @@ export async function serverBuild({
dest: path.posix.join(
'/',
entryDirectory,
`/__index${RSC_PREFETCH_SUFFIX}`
`/index${RSC_PREFETCH_SUFFIX}`
),
headers: { vary: rscVaryHeader },
continue: true,
@@ -1726,7 +1718,7 @@ export async function serverBuild({
src: path.posix.join(
'/',
entryDirectory,
`/__index${RSC_PREFETCH_SUFFIX}`
`/index${RSC_PREFETCH_SUFFIX}`
),
dest: path.posix.join('/', entryDirectory, '/index.rsc'),
has: [

View File

@@ -3063,60 +3063,3 @@ export async function getVariantsManifest(
return variantsManifest;
}
export async function getServerlessPages(params: {
pagesDir: string;
entryPath: string;
outputDirectory: string;
appPathRoutesManifest?: Record<string, string>;
}) {
const appDir = path.join(params.pagesDir, '../app');
const [pages, appPaths, middlewareManifest] = await Promise.all([
glob('**/!(_middleware).js', params.pagesDir),
params.appPathRoutesManifest
? Promise.all([
glob('**/page.js', appDir),
glob('**/route.js', appDir),
glob('**/_not-found.js', appDir),
]).then(items => Object.assign(...items))
: Promise.resolve({}),
getMiddlewareManifest(params.entryPath, params.outputDirectory),
]);
const normalizedAppPaths: typeof appPaths = {};
if (params.appPathRoutesManifest) {
for (const [entry, normalizedEntry] of Object.entries(
params.appPathRoutesManifest
)) {
const normalizedPath = `${path.join(
'.',
normalizedEntry === '/' ? '/index' : normalizedEntry
)}.js`;
const globPath = `${path.posix.join('.', entry)}.js`;
if (appPaths[globPath]) {
normalizedAppPaths[normalizedPath] = appPaths[globPath];
}
}
}
// Edge Functions do not consider as Serverless Functions
for (const edgeFunctionFile of Object.keys(
middlewareManifest?.functions ?? {}
)) {
let edgePath =
middlewareManifest?.functions?.[edgeFunctionFile].name ||
edgeFunctionFile;
edgePath = normalizeEdgeFunctionPath(
edgePath,
params.appPathRoutesManifest || {}
);
edgePath = (edgePath || 'index') + '.js';
delete normalizedAppPaths[edgePath];
delete pages[edgePath];
}
return { pages, appPaths: normalizedAppPaths };
}

View File

@@ -1,4 +1,7 @@
{
"engines": {
"node": "16.x"
},
"dependencies": {
"next": "canary",
"react": "experimental",

View File

@@ -1,18 +0,0 @@
export default function Page(props) {
return (
<p>catch-all {JSON.stringify(props.params || {})}</p>
)
}
export function generateStaticParams() {
return [
{
slug: ['']
},
{
slug: ['first']
}
]
}
export const revalidate = 0

View File

@@ -1,10 +0,0 @@
export default function Root({ children }) {
return (
<html className="this-is-the-document-html">
<head>
<title>{`hello world`}</title>
</head>
<body className="this-is-the-document-body">{children}</body>
</html>
);
}

View File

@@ -1,12 +0,0 @@
/* eslint-env jest */
const path = require('path');
const { deployAndTest } = require('../../utils');
const ctx = {};
describe(`${__dirname.split(path.sep).pop()}`, () => {
it('should deploy and pass probe checks', async () => {
const info = await deployAndTest(__dirname);
Object.assign(ctx, info);
});
});

View File

@@ -1,8 +0,0 @@
{
"dependencies": {
"next": "canary",
"react": "experimental",
"react-dom": "experimental"
},
"ignoreNextjsUpdates": true
}

View File

@@ -1,67 +0,0 @@
{
"builds": [
{
"src": "package.json",
"use": "@vercel/next"
}
],
"probes": [
{
"path": "/",
"status": 200,
"mustContain": "html"
},
{
"path": "/",
"status": 200,
"mustContain": "catch-all"
},
{
"path": "/",
"status": 200,
"headers": {
"RSC": 1
},
"mustNotContain": "<html",
"mustContain": "catch-all"
},
{
"path": "/first",
"status": 200,
"mustContain": "html"
},
{
"path": "/first",
"status": 200,
"mustContain": "catch-all"
},
{
"path": "/first",
"status": 200,
"headers": {
"RSC": 1
},
"mustNotContain": "<html",
"mustContain": "catch-all"
},
{
"path": "/another",
"status": 200,
"mustContain": "html"
},
{
"path": "/another",
"status": 200,
"mustContain": "catch-all"
},
{
"path": "/another",
"status": 200,
"headers": {
"RSC": 1
},
"mustNotContain": "<html",
"mustContain": "catch-all"
}
]
}

View File

@@ -1,16 +0,0 @@
export default function Page(props) {
return (
<p>catch-all {JSON.stringify(props.params || {})}</p>
)
}
export function generateStaticParams() {
return [
{
slug: ['']
},
{
slug: ['first']
}
]
}

View File

@@ -18,35 +18,6 @@
}
],
"probes": [
{
"path": "/catch-all",
"status": 200,
"mustContain": "html"
},
{
"path": "/catch-all",
"status": 200,
"mustContain": "catch-all"
},
{
"path": "/catch-all",
"status": 200,
"headers": {
"RSC": 1
},
"mustNotContain": "<html",
"mustContain": "catch-all"
},
{
"path": "/catch-all",
"status": 200,
"headers": {
"RSC": 1,
"Next-Router-Prefetch": 1
},
"mustNotContain": "<html",
"mustContain": ":"
},
{
"path": "/dashboard/hello",
"status": 200,
@@ -74,7 +45,7 @@
"Next-Router-Prefetch": "1"
},
"responseHeaders": {
"content-type": "text/x-component"
"content-type":"text/x-component"
},
"mustContain": ":",
"mustNotContain": "<html"
@@ -106,7 +77,7 @@
"RSC": "1"
},
"responseHeaders": {
"content-type": "text/x-component"
"content-type":"text/x-component"
}
},
{
@@ -135,7 +106,7 @@
"status": 200,
"responseHeaders": {
"vary": "RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Url",
"content-type": "text/x-component"
"content-type":"text/x-component"
},
"headers": {
"RSC": "1",

View File

@@ -174,6 +174,21 @@ if (parseInt(process.versions.node.split('.')[0], 10) >= 16) {
expect(buildResult.output['index']).toBeDefined();
// expect(buildResult.output['index/index']).toBeDefined();
});
it('should show error from basePath with legacy monorepo build', async () => {
let error;
try {
await runBuildLambda(path.join(__dirname, 'legacy-monorepo-basepath'));
} catch (err) {
error = err;
}
console.error(error);
expect(error.message).toBe(
'basePath can not be used with `builds` in vercel.json, use Project Settings to configure your monorepo instead'
);
});
}
it('should build using server build', async () => {
@@ -340,6 +355,32 @@ it('should build custom error lambda correctly', async () => {
expect(notFoundRoute).toBeTruthy();
});
it('should build initial beforeFiles rewrites', async () => {
const {
buildResult: { output, routes },
} = await runBuildLambda(
path.join(__dirname, 'initial-before-files-rewrite')
);
expect(output['index']).toBeDefined();
expect(output['another']).toBeDefined();
expect(output['dynamic/[slug]']).toBeDefined();
expect(output['fallback/[slug]']).toBeDefined();
expect(output['api']).toBeDefined();
expect(output['api/another']).toBeDefined();
expect(output['api/blog/[slug]']).toBeDefined();
expect(output['_app']).not.toBeDefined();
expect(output['_error']).not.toBeDefined();
expect(output['_document']).not.toBeDefined();
const rewriteRoute = routes.find(route => {
return route.dest === '/somewhere';
});
expect(rewriteRoute.check).toBe(true);
expect(rewriteRoute.continue).toBeUndefined();
});
it('Should build the standard example', async () => {
const {
buildResult: { output },
@@ -359,6 +400,27 @@ it('Should build the standard example', async () => {
expect(serverlessError).toBeTruthy();
});
it('Should build the 404-getstaticprops example', async () => {
const { buildResult } = await runBuildLambda(
path.join(__dirname, '404-getstaticprops')
);
const { output } = buildResult;
expect(output['404']).toBeDefined();
expect(output['404'].type).toBe('FileFsRef');
expect(output['404'].allowQuery).toBe(undefined);
expect(output['_next/data/testing-build-id/404.json']).toBeDefined();
expect(output['_next/data/testing-build-id/404.json'].type).toBe('FileFsRef');
expect(output['_next/data/testing-build-id/404.json'].allowQuery).toBe(
undefined
);
const filePaths = Object.keys(output);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error-.*\.js$/)
);
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
});
it('Should build the 404-getstaticprops-i18n example', async () => {
const { buildResult } = await runBuildLambda(
path.join(__dirname, '404-getstaticprops-i18n')
@@ -440,6 +502,69 @@ it('Should not deploy preview lambdas for static site', async () => {
expect(output['dynamic'].lambda).toBeDefined();
});
it('Should opt-out of shared lambdas when routes are detected', async () => {
const {
buildResult: { output },
} = await runBuildLambda(
path.join(__dirname, '../fixtures/26-mono-repo-404-lambda')
);
expect(output['packages/webapp/404']).toBeDefined();
expect(output['packages/webapp/index']).toBeDefined();
expect(output['packages/webapp/__NEXT_PAGE_LAMBDA_0']).not.toBeDefined();
const filePaths = Object.keys(output);
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
});
it('Should build the monorepo example', async () => {
const {
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, 'monorepo'));
expect(output['www/index']).not.toBeDefined();
expect(output['www/__NEXT_PAGE_LAMBDA_0']).toBeDefined();
expect(output['www/static/test.txt']).toBeDefined();
expect(output['www/data.txt']).toBeDefined();
const filePaths = Object.keys(output);
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
});
it('Should build the legacy standard example', async () => {
const {
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, 'legacy-standard'));
expect(output.index).toBeDefined();
const filePaths = Object.keys(output);
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
});
it('Should build the legacy custom dependency test', async () => {
const {
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, 'legacy-custom-dependency'));
expect(output.index).toBeDefined();
});
it('Should throw when package.json or next.config.js is not the "src"', async () => {
try {
await runBuildLambda(

View File

@@ -11,6 +11,132 @@ const runBuildLambda = createRunBuildLambda(builder);
jest.setTimeout(360000);
it('Should build the static-files test on legacy', async () => {
const {
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, 'legacy-static-files'));
expect(output['static/test.txt']).toBeDefined();
});
it('Should build the static-files test', async () => {
const {
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, 'static-files'));
expect(output['static/test.txt']).toBeDefined();
});
it('Should build the public-files test', async () => {
const {
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, 'public-files'));
expect(output['robots.txt']).toBeDefined();
expect(output['generated.txt']).toBeDefined();
});
it('Should build the serverless-config example', async () => {
const {
workPath,
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, 'serverless-config'));
expect(output.index).not.toBeDefined();
expect(output.goodbye).not.toBeDefined();
expect(output.__NEXT_PAGE_LAMBDA_0).toBeDefined();
const filePaths = Object.keys(output);
const serverlessError = filePaths.some(filePath => filePath.match(/_error/));
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
expect(serverlessError).toBeTruthy();
const contents = await fs.readdir(workPath);
expect(contents.some(name => name === 'next.config.js')).toBeTruthy();
expect(
contents.some(name =>
name.includes('next.config.__vercel_builder_backup__')
)
).toBeTruthy();
});
it('Should build the serverless-config-monorepo-missing example', async () => {
const {
workPath,
buildResult: { output },
} = await runBuildLambda(
path.join(__dirname, 'serverless-config-monorepo-missing')
);
expect(output['nested/index']).not.toBeDefined();
expect(output['nested/goodbye']).not.toBeDefined();
expect(output['nested/__NEXT_PAGE_LAMBDA_0']).toBeDefined();
const filePaths = Object.keys(output);
const serverlessError = filePaths.some(filePath => filePath.match(/_error/));
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
expect(serverlessError).toBeTruthy();
const contents = await fs.readdir(path.join(workPath, 'nested'));
expect(contents.some(name => name === 'next.config.js')).toBeTruthy();
});
it('Should build the serverless-config-monorepo-present example', async () => {
const {
workPath,
buildResult: { output },
} = await runBuildLambda(
path.join(__dirname, 'serverless-config-monorepo-present')
);
expect(output['nested/index']).not.toBeDefined();
expect(output['nested/goodbye']).not.toBeDefined();
expect(output['nested/__NEXT_PAGE_LAMBDA_0']).toBeDefined();
const filePaths = Object.keys(output);
const serverlessError = filePaths.some(filePath => filePath.match(/_error/));
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
expect(serverlessError).toBeTruthy();
const contents = await fs.readdir(path.join(workPath, 'nested'));
expect(contents.some(name => name === 'next.config.js')).toBeTruthy();
expect(
contents.some(name =>
name.includes('next.config.__vercel_builder_backup__')
)
).toBeTruthy();
});
it('Should build the serverless-config-async example', async () => {
let error = null;
try {
await runBuildLambda(path.join(__dirname, 'serverless-config-async'));
} catch (err) {
error = err;
}
expect(error).toBe(null);
});
it('Should build the serverless-config-promise example', async () => {
let error = null;
@@ -261,6 +387,41 @@ 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 () => {
let logs = '';
const origLog = console.log;
console.log = function (...args) {
logs += args.join(' ');
origLog(...args);
};
try {
await runBuildLambda(
path.join(__dirname, 'test-limit-exceeded-shared-lambdas')
);
} catch (err) {
console.error(err);
}
console.log = origLog;
expect(logs).toContain(
'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'
);
expect(logs).toContain(`Serverless Function's page: api/both.js`);
expect(logs).toMatch(
/Large Dependencies.*?Uncompressed size.*?Compressed size/
);
expect(logs).toMatch(
/node_modules\/chrome-aws-lambda\/bin.*?\d{2}.*?MB.*?\d{2}.*?MB/
);
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 () => {
let logs = '';

View File

@@ -1,302 +0,0 @@
process.env.NEXT_TELEMETRY_DISABLED = '1';
const path = require('path');
const fs = require('fs-extra');
const builder = require('../../../');
const {
createRunBuildLambda,
} = require('../../../../../test/lib/run-build-lambda');
const runBuildLambda = createRunBuildLambda(builder);
jest.setTimeout(360000);
it('Should build the 404-getstaticprops example', async () => {
const { buildResult } = await runBuildLambda(
path.join(__dirname, '..', '404-getstaticprops')
);
const { output } = buildResult;
expect(output['404']).toBeDefined();
expect(output['404'].type).toBe('FileFsRef');
expect(output['404'].allowQuery).toBe(undefined);
expect(output['_next/data/testing-build-id/404.json']).toBeDefined();
expect(output['_next/data/testing-build-id/404.json'].type).toBe('FileFsRef');
expect(output['_next/data/testing-build-id/404.json'].allowQuery).toBe(
undefined
);
const filePaths = Object.keys(output);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error-.*\.js$/)
);
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
});
it('should build initial beforeFiles rewrites', async () => {
const {
buildResult: { output, routes },
} = await runBuildLambda(
path.join(__dirname, '..', 'initial-before-files-rewrite')
);
expect(output['index']).toBeDefined();
expect(output['another']).toBeDefined();
expect(output['dynamic/[slug]']).toBeDefined();
expect(output['fallback/[slug]']).toBeDefined();
expect(output['api']).toBeDefined();
expect(output['api/another']).toBeDefined();
expect(output['api/blog/[slug]']).toBeDefined();
expect(output['_app']).not.toBeDefined();
expect(output['_error']).not.toBeDefined();
expect(output['_document']).not.toBeDefined();
const rewriteRoute = routes.find(route => {
return route.dest === '/somewhere';
});
expect(rewriteRoute.check).toBe(true);
expect(rewriteRoute.continue).toBeUndefined();
});
it('Should build the legacy custom dependency test', async () => {
const {
buildResult: { output },
} = await runBuildLambda(
path.join(__dirname, '..', 'legacy-custom-dependency')
);
expect(output.index).toBeDefined();
});
it('should show error from basePath with legacy monorepo build', async () => {
let error;
try {
await runBuildLambda(
path.join(__dirname, '..', 'legacy-monorepo-basepath')
);
} catch (err) {
error = err;
}
console.error(error);
expect(error.message).toBe(
'basePath can not be used with `builds` in vercel.json, use Project Settings to configure your monorepo instead'
);
});
it('Should build the legacy standard example', async () => {
const {
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, '..', 'legacy-standard'));
expect(output.index).toBeDefined();
const filePaths = Object.keys(output);
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
});
it('Should build the static-files test on legacy', async () => {
const {
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, '..', 'legacy-static-files'));
expect(output['static/test.txt']).toBeDefined();
});
it('Should build the monorepo example', async () => {
const {
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, '..', 'monorepo'));
expect(output['www/index']).not.toBeDefined();
expect(output['www/__NEXT_PAGE_LAMBDA_0']).toBeDefined();
expect(output['www/static/test.txt']).toBeDefined();
expect(output['www/data.txt']).toBeDefined();
const filePaths = Object.keys(output);
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
});
it('Should build the public-files test', async () => {
const {
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, '..', 'public-files'));
expect(output['robots.txt']).toBeDefined();
expect(output['generated.txt']).toBeDefined();
});
it('Should build the serverless-config example', async () => {
const {
workPath,
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, '..', 'serverless-config'));
expect(output.index).not.toBeDefined();
expect(output.goodbye).not.toBeDefined();
expect(output.__NEXT_PAGE_LAMBDA_0).toBeDefined();
const filePaths = Object.keys(output);
const serverlessError = filePaths.some(filePath => filePath.match(/_error/));
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
expect(serverlessError).toBeTruthy();
const contents = await fs.readdir(workPath);
expect(contents.some(name => name === 'next.config.js')).toBeTruthy();
expect(
contents.some(name =>
name.includes('next.config.__vercel_builder_backup__')
)
).toBeTruthy();
});
it('Should build the serverless-config-monorepo-missing example', async () => {
const {
workPath,
buildResult: { output },
} = await runBuildLambda(
path.join(__dirname, '..', 'serverless-config-monorepo-missing')
);
expect(output['nested/index']).not.toBeDefined();
expect(output['nested/goodbye']).not.toBeDefined();
expect(output['nested/__NEXT_PAGE_LAMBDA_0']).toBeDefined();
const filePaths = Object.keys(output);
const serverlessError = filePaths.some(filePath => filePath.match(/_error/));
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
expect(serverlessError).toBeTruthy();
const contents = await fs.readdir(path.join(workPath, 'nested'));
expect(contents.some(name => name === 'next.config.js')).toBeTruthy();
});
it('Should build the serverless-config-monorepo-present example', async () => {
const {
workPath,
buildResult: { output },
} = await runBuildLambda(
path.join(__dirname, '..', 'serverless-config-monorepo-present')
);
expect(output['nested/index']).not.toBeDefined();
expect(output['nested/goodbye']).not.toBeDefined();
expect(output['nested/__NEXT_PAGE_LAMBDA_0']).toBeDefined();
const filePaths = Object.keys(output);
const serverlessError = filePaths.some(filePath => filePath.match(/_error/));
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
expect(serverlessError).toBeTruthy();
const contents = await fs.readdir(path.join(workPath, 'nested'));
expect(contents.some(name => name === 'next.config.js')).toBeTruthy();
expect(
contents.some(name =>
name.includes('next.config.__vercel_builder_backup__')
)
).toBeTruthy();
});
it('Should opt-out of shared lambdas when routes are detected', async () => {
const {
buildResult: { output },
} = await runBuildLambda(
path.join(__dirname, '..', '../fixtures/26-mono-repo-404-lambda')
);
expect(output['packages/webapp/404']).toBeDefined();
expect(output['packages/webapp/index']).toBeDefined();
expect(output['packages/webapp/__NEXT_PAGE_LAMBDA_0']).not.toBeDefined();
const filePaths = Object.keys(output);
const hasUnderScoreAppStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_app\.js$/)
);
const hasUnderScoreErrorStaticFile = filePaths.some(filePath =>
filePath.match(/static.*\/pages\/_error\.js$/)
);
expect(hasUnderScoreAppStaticFile).toBeTruthy();
expect(hasUnderScoreErrorStaticFile).toBeTruthy();
});
it('Should build the serverless-config-async example', async () => {
let error = null;
try {
await runBuildLambda(path.join(__dirname, '..', 'serverless-config-async'));
} catch (err) {
error = err;
}
expect(error).toBe(null);
});
it('Should provide lambda info when limit is hit (shared lambdas)', async () => {
let logs = '';
const origLog = console.log;
console.log = function (...args) {
logs += args.join(' ');
origLog(...args);
};
try {
await runBuildLambda(
path.join(__dirname, '..', 'test-limit-exceeded-shared-lambdas')
);
} catch (err) {
console.error(err);
}
console.log = origLog;
expect(logs).toContain(
'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'
);
expect(logs).toContain(`Serverless Function's page: api/both.js`);
expect(logs).toMatch(
/Large Dependencies.*?Uncompressed size.*?Compressed size/
);
expect(logs).toMatch(
/node_modules\/chrome-aws-lambda\/bin.*?\d{2}.*?MB.*?\d{2}.*?MB/
);
expect(logs).toMatch(/node_modules\/@firebase\/firestore.*?\d{1}.*?MB/);
});
it('Should build the static-files test', async () => {
const {
buildResult: { output },
} = await runBuildLambda(path.join(__dirname, '..', 'static-files'));
expect(output['static/test.txt']).toBeDefined();
});

View File

@@ -1,9 +1,8 @@
{
"compilerOptions": {
"allowJs": true,
"sourceMap": true,
"types": ["jest"]
},
"extends": "../tsconfig.json",
"include": ["**/*.test.ts"]
"include": ["**/*.test.ts"],
"compilerOptions": {
"types": ["jest"],
"allowJs": true
}
}

View File

@@ -1,15 +1,12 @@
import path from 'path';
import os from 'os';
import {
excludeFiles,
validateEntrypoint,
normalizePackageJson,
getImagesConfig,
getNextConfig,
getServerlessPages,
} from '../../src/utils';
import { FileRef } from '@vercel/build-utils';
import { genDir } from '../utils';
describe('getNextConfig', () => {
const workPath = path.join(__dirname, 'fixtures', '00-config');
@@ -383,28 +380,3 @@ describe('normalizePackageJson', () => {
});
});
});
describe('getServerlessPages', () => {
it('should gather all pages correctly', async () => {
const dir = await genDir({
'.next/server/pages/_app.js': 'test',
'.next/server/pages/_error.js': 'test',
'.next/server/app/page.js': 'test',
'.next/server/app/favicon.ico/route.js': 'test',
});
const { pages, appPaths } = await getServerlessPages({
pagesDir: path.resolve(path.join(dir, '.next/server/pages')),
entryPath: os.tmpdir(),
outputDirectory: os.tmpdir(),
appPathRoutesManifest: {
'/_not-found': '/_not-found',
'/favicon.ico/route': '/favicon.ico',
'/page': '/',
},
});
expect(Object.keys(pages)).toEqual(['_app.js', '_error.js']);
expect(Object.keys(appPaths)).toEqual(['favicon.ico.js', 'index.js']);
});
});

View File

@@ -1,8 +1,7 @@
{
"compilerOptions": {
"allowJs": true,
"sourceMap": true
},
"extends": "../tsconfig.json",
"include": ["**/*.test.ts"]
"include": ["**/*.test.ts"],
"compilerOptions": {
"allowJs": true
}
}

View File

@@ -1,11 +1,5 @@
# @vercel/python
## 4.1.0
### Minor Changes
- Add support for pip3.10 and pip3.11 ([#10648](https://github.com/vercel/vercel/pull/10648))
## 4.0.2
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/python",
"version": "4.1.0",
"version": "4.0.2",
"main": "./dist/index.js",
"license": "Apache-2.0",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -22,14 +22,10 @@
},
"devDependencies": {
"@types/execa": "^0.9.0",
"@types/fs-extra": "11.0.2",
"@types/jest": "27.4.1",
"@types/node": "14.18.33",
"@types/which": "3.0.0",
"@vercel/build-utils": "7.2.2",
"execa": "^1.0.0",
"fs-extra": "11.1.1",
"jest-junit": "16.0.0",
"which": "3.0.0"
"jest-junit": "16.0.0"
}
}

View File

@@ -1,5 +1,4 @@
import { NowBuildError } from '@vercel/build-utils';
import which from 'which';
interface PythonVersion {
version: string;
@@ -11,18 +10,6 @@ interface PythonVersion {
// The order must be most recent first
const allOptions: PythonVersion[] = [
{
version: '3.11',
pipPath: 'pip3.11',
pythonPath: 'python3.11',
runtime: 'python3.11',
},
{
version: '3.10',
pipPath: 'pip3.10',
pythonPath: 'python3.10',
runtime: 'python3.10',
},
{
version: '3.9',
pipPath: 'pip3.9',
@@ -47,7 +34,6 @@ function getDevPythonVersion(): PythonVersion {
runtime: 'python3',
};
}
export function getLatestPythonVersion({
isDev,
}: {
@@ -56,16 +42,7 @@ export function getLatestPythonVersion({
if (isDev) {
return getDevPythonVersion();
}
const selection = allOptions.find(isInstalled);
if (!selection) {
throw new NowBuildError({
code: 'PYTHON_NOT_FOUND',
link: 'http://vercel.link/python-version',
message: `Unable to find any supported Python versions.`,
});
}
return selection;
return allOptions[0];
}
export function getSupportedPythonVersion({
@@ -78,13 +55,10 @@ export function getSupportedPythonVersion({
if (isDev) {
return getDevPythonVersion();
}
let selection = getLatestPythonVersion({ isDev: false });
if (typeof pipLockPythonVersion === 'string') {
const found = allOptions.find(
o => o.version === pipLockPythonVersion && isInstalled(o)
);
const found = allOptions.find(o => o.version === pipLockPythonVersion);
if (found) {
selection = found;
} else {
@@ -116,10 +90,3 @@ function isDiscontinued({ discontinueDate }: PythonVersion): boolean {
const today = Date.now();
return discontinueDate !== undefined && discontinueDate.getTime() <= today;
}
function isInstalled({ pipPath, pythonPath }: PythonVersion): boolean {
return (
Boolean(which.sync(pipPath, { nothrow: true })) &&
Boolean(which.sync(pythonPath, { nothrow: true }))
);
}

View File

@@ -1,7 +1,4 @@
{
"compilerOptions": {
"sourceMap": true
},
"extends": "../tsconfig.json",
"include": ["*.test.ts"]
}

View File

@@ -1,17 +1,8 @@
import { getSupportedPythonVersion } from '../src/version';
import fs from 'fs-extra';
import path from 'path';
import { tmpdir } from 'os';
const tmpPythonDir = path.join(
tmpdir(),
`vc-test-python-${Math.floor(Math.random() * 1e6)}`
);
let warningMessages: string[];
const originalConsoleWarn = console.warn;
const realDateNow = Date.now.bind(global.Date);
const origPath = process.env.PATH;
beforeEach(() => {
warningMessages = [];
console.warn = m => {
@@ -22,19 +13,15 @@ beforeEach(() => {
afterEach(() => {
console.warn = originalConsoleWarn;
global.Date.now = realDateNow;
process.env.PATH = origPath;
if (fs.existsSync(tmpPythonDir)) {
fs.removeSync(tmpPythonDir);
}
});
it('should only match supported versions, otherwise throw an error', () => {
makeMockPython('3.9');
const result = getSupportedPythonVersion({ pipLockPythonVersion: '3.9' });
expect(result).toHaveProperty('runtime', 'python3.9');
it('should only match supported versions, otherwise throw an error', async () => {
expect(
getSupportedPythonVersion({ pipLockPythonVersion: '3.9' })
).toHaveProperty('runtime', 'python3.9');
});
it('should ignore minor version in vercel dev', () => {
it('should ignore minor version in vercel dev', async () => {
expect(
getSupportedPythonVersion({ pipLockPythonVersion: '3.9', isDev: true })
).toHaveProperty('runtime', 'python3');
@@ -47,36 +34,24 @@ it('should ignore minor version in vercel dev', () => {
expect(warningMessages).toStrictEqual([]);
});
it('should select latest supported installed version when no Piplock detected', () => {
makeMockPython('3.10');
const result = getSupportedPythonVersion({ pipLockPythonVersion: undefined });
expect(result).toHaveProperty('runtime');
expect(result.runtime).toMatch(/^python3\.\d+$/);
it('should select latest version when no Piplock detected', async () => {
expect(
getSupportedPythonVersion({ pipLockPythonVersion: undefined })
).toHaveProperty('runtime', 'python3.9');
expect(warningMessages).toStrictEqual([]);
});
it('should select latest supported installed version and warn when invalid Piplock detected', () => {
makeMockPython('3.10');
const result = getSupportedPythonVersion({ pipLockPythonVersion: '999' });
expect(result).toHaveProperty('runtime');
expect(result.runtime).toMatch(/^python3\.\d+$/);
it('should select latest version and warn when invalid Piplock detected', async () => {
expect(
getSupportedPythonVersion({ pipLockPythonVersion: '999' })
).toHaveProperty('runtime', 'python3.9');
expect(warningMessages).toStrictEqual([
'Warning: Python version "999" detected in Pipfile.lock is invalid and will be ignored. http://vercel.link/python-version',
]);
});
it('should throw if python not found', () => {
process.env.PATH = '.';
expect(() =>
getSupportedPythonVersion({ pipLockPythonVersion: '3.6' })
).toThrow('Unable to find any supported Python versions.');
expect(warningMessages).toStrictEqual([]);
});
it('should throw for discontinued versions', () => {
it('should throw for discontinued versions', async () => {
global.Date.now = () => new Date('2022-07-31').getTime();
makeMockPython('3.6');
expect(() =>
getSupportedPythonVersion({ pipLockPythonVersion: '3.6' })
).toThrow(
@@ -85,9 +60,8 @@ it('should throw for discontinued versions', () => {
expect(warningMessages).toStrictEqual([]);
});
it('should warn for deprecated versions, soon to be discontinued', () => {
it('should warn for deprecated versions, soon to be discontinued', async () => {
global.Date.now = () => new Date('2021-07-01').getTime();
makeMockPython('3.6');
expect(
getSupportedPythonVersion({ pipLockPythonVersion: '3.6' })
@@ -96,16 +70,3 @@ it('should warn for deprecated versions, soon to be discontinued', () => {
'Error: Python version "3.6" detected in Pipfile.lock has reached End-of-Life. Deployments created on or after 2022-07-18 will fail to build. http://vercel.link/python-version',
]);
});
function makeMockPython(version: string) {
fs.mkdirSync(tmpPythonDir);
for (const name of ['python', 'pip']) {
const bin = path.join(
tmpPythonDir,
`${name}${version}${process.platform === 'win32' ? '.exe' : ''}`
);
fs.writeFileSync(bin, '');
fs.chmodSync(bin, 0o755);
}
process.env.PATH = `${tmpPythonDir}${path.delimiter}${process.env.PATH}`;
}

View File

@@ -1,12 +1,5 @@
# @vercel/redwood
## 2.0.5
### Patch Changes
- Updated dependencies [[`9e9fac019`](https://github.com/vercel/vercel/commit/9e9fac0191cb1428ac9e5479c3d5c8afd7b7d357)]:
- @vercel/routing-utils@3.1.0
## 2.0.4
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/redwood",
"version": "2.0.5",
"version": "2.0.4",
"main": "./dist/index.js",
"license": "Apache-2.0",
"homepage": "https://vercel.com/docs",
@@ -21,7 +21,7 @@
},
"dependencies": {
"@vercel/nft": "0.24.2",
"@vercel/routing-utils": "3.1.0",
"@vercel/routing-utils": "3.0.0",
"semver": "6.3.1"
},
"devDependencies": {

View File

@@ -1,11 +1,5 @@
# @vercel/remix-builder
## 2.0.10
### Patch Changes
- Update `@remix-run/dev` fork to v2.1.0 ([#10732](https://github.com/vercel/vercel/pull/10732))
## 2.0.9
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/remix-builder",
"version": "2.0.10",
"version": "2.0.9",
"license": "Apache-2.0",
"main": "./dist/index.js",
"homepage": "https://vercel.com/docs",
@@ -26,7 +26,7 @@
"ts-morph": "12.0.0"
},
"devDependencies": {
"@remix-run/dev": "npm:@vercel/remix-run-dev@2.1.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",

View File

@@ -1,7 +1,4 @@
{
"compilerOptions": {
"sourceMap": true
},
"extends": "../tsconfig.json",
"include": ["*.test.ts"]
}

View File

@@ -1,11 +1,5 @@
# @vercel/routing-utils
## 3.1.0
### Minor Changes
- Adds support for statusCode property on rewrites ([#10495](https://github.com/vercel/vercel/pull/10495))
## 3.0.0
### Major Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/routing-utils",
"version": "3.1.0",
"version": "3.0.0",
"description": "Vercel routing utilities",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",

View File

@@ -207,13 +207,6 @@ export const rewritesSchema = {
},
has: hasSchema,
missing: hasSchema,
statusCode: {
description:
'An optional integer to override the status code of the response.',
type: 'integer',
minimum: 100,
maximum: 999,
},
},
},
} as const;
@@ -246,8 +239,6 @@ export const redirectsSchema = {
type: 'boolean',
},
statusCode: {
description:
'An optional integer to define the status code of the redirect.',
private: true,
type: 'integer',
minimum: 100,

View File

@@ -109,9 +109,6 @@ export function convertRewrites(
if (r.missing) {
route.missing = r.missing;
}
if (r.statusCode) {
route.status = r.statusCode;
}
return route;
} catch (e) {
throw new Error(`Failed to parse rewrite: ${JSON.stringify(r)}`);

View File

@@ -92,7 +92,6 @@ export interface Rewrite {
destination: string;
has?: HasField;
missing?: HasField;
statusCode?: number;
}
export interface Redirect {

View File

@@ -662,11 +662,6 @@ test('convertRewrites', () => {
source: '/:nextInternalLocale/:path',
destination: '/api/hello',
},
{
source: '/rewrite-with-status',
destination: '/api/hello',
statusCode: 201,
},
],
['nextInternalLocale']
);
@@ -866,12 +861,6 @@ test('convertRewrites', () => {
dest: '/api/hello?nextInternalLocale=$1&path=$2',
src: '^(?:\\/([^\\/]+?))(?:\\/([^\\/]+?))$',
},
{
check: true,
dest: '/api/hello',
src: '^\\/rewrite-with-status$',
status: 201,
},
];
deepEqual(actual, expected);
@@ -901,7 +890,6 @@ test('convertRewrites', () => {
['/hello/world'],
['/array-query-string/10/email'],
['/en/hello'],
['/rewrite-with-status'],
];
const mustNotMatch = [
@@ -929,7 +917,6 @@ test('convertRewrites', () => {
['/hllooo'],
['/array-query-string/10'],
['/en/hello/world', '/en/hello/'],
['/rewrite-with-status-nope'],
];
assertRegexMatches(actual, mustMatch, mustNotMatch);

View File

@@ -1,7 +0,0 @@
{
"compilerOptions": {
"sourceMap": true
},
"extends": "../tsconfig.json",
"include": ["*.spec.ts"]
}

View File

@@ -1,12 +1,5 @@
# @vercel/static-build
## 2.0.9
### Patch Changes
- Updated dependencies []:
- @vercel/gatsby-plugin-vercel-builder@2.0.8
## 2.0.8
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@vercel/static-build",
"version": "2.0.9",
"version": "2.0.8",
"license": "Apache-2.0",
"main": "./dist/index",
"homepage": "https://vercel.com/docs/build-step",
@@ -21,7 +21,7 @@
},
"dependencies": {
"@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
"@vercel/gatsby-plugin-vercel-builder": "2.0.8",
"@vercel/gatsby-plugin-vercel-builder": "2.0.7",
"@vercel/static-config": "3.0.0",
"ts-morph": "12.0.0"
},
@@ -38,8 +38,8 @@
"@vercel/build-utils": "7.2.2",
"@vercel/error-utils": "2.0.1",
"@vercel/frameworks": "2.0.2",
"@vercel/fs-detectors": "5.1.2",
"@vercel/routing-utils": "3.1.0",
"@vercel/fs-detectors": "5.1.1",
"@vercel/routing-utils": "3.0.0",
"execa": "3.2.0",
"fs-extra": "10.0.0",
"get-port": "5.0.0",

View File

@@ -0,0 +1,69 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# dotenv environment variables file
.env
# gatsby files
.cache/
public
# Mac files
.DS_Store
# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity

View File

@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
}

View File

@@ -1,6 +1,6 @@
MIT License
The MIT License (MIT)
Copyright (c) 2018
Copyright (c) 2015 gatsbyjs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,93 @@
<!-- AUTO-GENERATED-CONTENT:START (STARTER) -->
<p align="center">
<a href="https://www.gatsbyjs.org">
<img alt="Gatsby" src="https://www.gatsbyjs.org/monogram.svg" width="60" />
</a>
</p>
<h1 align="center">
Gatsby's default starter
</h1>
Kick off your project with this default boilerplate. This starter ships with the main Gatsby configuration files you might need to get up and running blazing fast with the blazing fast app generator for React.
_Have another more specific idea? You may want to check out our vibrant collection of [official and community-created starters](https://www.gatsbyjs.org/docs/gatsby-starters/)._
## 🚀 Quick start
1. **Create a Gatsby site.**
Use the Gatsby CLI to create a new site, specifying the default starter.
```sh
# create a new Gatsby site using the default starter
gatsby new my-default-starter https://github.com/gatsbyjs/gatsby-starter-default
```
1. **Start developing.**
Navigate into your new sites directory and start it up.
```sh
cd my-default-starter/
gatsby develop
```
1. **Open the source code and start editing!**
Your site is now running at `http://localhost:8000`!
_Note: You'll also see a second link: _`http://localhost:8000/___graphql`_. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.org/tutorial/part-five/#introducing-graphiql)._
Open the `my-default-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time!
## 🧐 What's inside?
A quick look at the top-level files and directories you'll see in a Gatsby project.
.
├── node_modules
├── src
├── .gitignore
├── .prettierrc
├── gatsby-browser.js
├── gatsby-config.js
├── gatsby-node.js
├── gatsby-ssr.js
├── LICENSE
├── package-lock.json
├── package.json
└── README.md
1. **`/node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed.
2. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. `src` is a convention for “source code”.
3. **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for.
4. **`.prettierrc`**: This is a configuration file for [Prettier](https://prettier.io/). Prettier is a tool to help keep the formatting of your code consistent.
5. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.org/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser.
6. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins youd like to include, etc. (Check out the [config docs](https://www.gatsbyjs.org/docs/gatsby-config/) for more detail).
7. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby Node APIs](https://www.gatsbyjs.org/docs/node-apis/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
8. **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://www.gatsbyjs.org/docs/ssr-apis/) (if any). These allow customization of default Gatsby settings affecting server-side rendering.
9. **`LICENSE`**: Gatsby is licensed under the MIT license.
10. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(You wont change this file directly).**
11. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the projects name, author, etc). This manifest is how npm knows which packages to install for your project.
12. **`README.md`**: A text file containing useful reference information about your project.
## 🎓 Learning Gatsby
Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.org/). Here are some places to start:
- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
- **To dive straight into code samples, head [to our documentation](https://www.gatsbyjs.org/docs/).** In particular, check out the _Guides_, _API Reference_, and _Advanced Tutorials_ sections in the sidebar.
<!-- AUTO-GENERATED-CONTENT:END -->

View File

@@ -0,0 +1,7 @@
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/
// You can delete this file if you're not using it

View File

@@ -0,0 +1,34 @@
module.exports = {
siteMetadata: {
title: `Gatsby Default Starter`,
description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`,
author: `@gatsbyjs`,
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `10-gatsby-without-build-script`,
short_name: `starter`,
start_url: `/`,
background_color: `#663399`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
}

View File

@@ -0,0 +1,7 @@
/**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/
// You can delete this file if you're not using it

View File

@@ -0,0 +1,7 @@
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/
// You can delete this file if you're not using it

View File

@@ -0,0 +1,45 @@
{
"name": "10-gatsby-without-build-script",
"private": true,
"description": "A simple starter to get up and developing quickly with Gatsby",
"version": "0.1.0",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"engines": {
"node": "16.x"
},
"dependencies": {
"gatsby": "^2.32.3",
"gatsby-image": "^2.11.0",
"gatsby-plugin-manifest": "^2.12.0",
"gatsby-plugin-offline": "^3.10.0",
"gatsby-plugin-react-helmet": "^3.10.0",
"gatsby-plugin-sharp": "^2.14.1",
"gatsby-source-filesystem": "^2.11.0",
"gatsby-transformer-sharp": "^2.12.0",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-helmet": "^6.1.0"
},
"devDependencies": {
"prettier": "^2.2.1"
},
"keywords": [
"gatsby"
],
"license": "MIT",
"scripts": {
"develop": "gatsby develop",
"format": "prettier --write src/**/*.{js,jsx}",
"start": "npm run develop",
"serve": "gatsby serve",
"test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\""
},
"repository": {
"type": "git",
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
},
"bugs": {
"url": "https://github.com/gatsbyjs/gatsby/issues"
}
}

View File

@@ -0,0 +1,3 @@
{
"probes": [{ "path": "/", "mustContain": "Welcome to your new Gatsby site" }]
}

View File

@@ -0,0 +1,42 @@
import { Link } from "gatsby"
import PropTypes from "prop-types"
import React from "react"
const Header = ({ siteTitle }) => (
<header
style={{
background: `rebeccapurple`,
marginBottom: `1.45rem`,
}}
>
<div
style={{
margin: `0 auto`,
maxWidth: 960,
padding: `1.45rem 1.0875rem`,
}}
>
<h1 style={{ margin: 0 }}>
<Link
to="/"
style={{
color: `white`,
textDecoration: `none`,
}}
>
{siteTitle}
</Link>
</h1>
</div>
</header>
)
Header.propTypes = {
siteTitle: PropTypes.string,
}
Header.defaultProps = {
siteTitle: ``,
}
export default Header

View File

@@ -0,0 +1,32 @@
import React from "react"
import { useStaticQuery, graphql } from "gatsby"
import Img from "gatsby-image"
/*
* This component is built using `gatsby-image` to automatically serve optimized
* images with lazy loading and reduced file sizes. The image is loaded using a
* `useStaticQuery`, which allows us to load the image from directly within this
* component, rather than having to pass the image data down from pages.
*
* For more information, see the docs:
* - `gatsby-image`: https://gatsby.dev/gatsby-image
* - `useStaticQuery`: https://www.gatsbyjs.org/docs/use-static-query/
*/
const Image = () => {
const data = useStaticQuery(graphql`
query {
placeholderImage: file(relativePath: { eq: "gatsby-astronaut.png" }) {
childImageSharp {
fluid(maxWidth: 300) {
...GatsbyImageSharpFluid
}
}
}
}
`)
return <Img fluid={data.placeholderImage.childImageSharp.fluid} />
}
export default Image

View File

@@ -0,0 +1,622 @@
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
menu,
nav,
section,
summary {
display: block;
}
audio,
canvas,
progress,
video {
display: inline-block;
}
audio:not([controls]) {
display: none;
height: 0;
}
progress {
vertical-align: baseline;
}
[hidden],
template {
display: none;
}
a {
background-color: transparent;
-webkit-text-decoration-skip: objects;
}
a:active,
a:hover {
outline-width: 0;
}
abbr[title] {
border-bottom: none;
text-decoration: underline;
text-decoration: underline dotted;
}
b,
strong {
font-weight: inherit;
font-weight: bolder;
}
dfn {
font-style: italic;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
mark {
background-color: #ff0;
color: #000;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
img {
border-style: none;
}
svg:not(:root) {
overflow: hidden;
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
figure {
margin: 1em 40px;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
button,
input,
optgroup,
select,
textarea {
font: inherit;
margin: 0;
}
optgroup {
font-weight: 700;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
[type="reset"],
[type="submit"],
button,
html [type="button"] {
-webkit-appearance: button;
}
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner,
button::-moz-focus-inner {
border-style: none;
padding: 0;
}
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring,
button:-moz-focusring {
outline: 1px dotted ButtonText;
}
fieldset {
border: 1px solid silver;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal;
}
textarea {
overflow: auto;
}
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
padding: 0;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-input-placeholder {
color: inherit;
opacity: 0.54;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
html {
font: 112.5%/1.45em georgia, serif;
box-sizing: border-box;
overflow-y: scroll;
}
* {
box-sizing: inherit;
}
*:before {
box-sizing: inherit;
}
*:after {
box-sizing: inherit;
}
body {
color: hsla(0, 0%, 0%, 0.8);
font-family: georgia, serif;
font-weight: normal;
word-wrap: break-word;
font-kerning: normal;
-moz-font-feature-settings: "kern", "liga", "clig", "calt";
-ms-font-feature-settings: "kern", "liga", "clig", "calt";
-webkit-font-feature-settings: "kern", "liga", "clig", "calt";
font-feature-settings: "kern", "liga", "clig", "calt";
}
img {
max-width: 100%;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
h1 {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
color: inherit;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-weight: bold;
text-rendering: optimizeLegibility;
font-size: 2.25rem;
line-height: 1.1;
}
h2 {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
color: inherit;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-weight: bold;
text-rendering: optimizeLegibility;
font-size: 1.62671rem;
line-height: 1.1;
}
h3 {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
color: inherit;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-weight: bold;
text-rendering: optimizeLegibility;
font-size: 1.38316rem;
line-height: 1.1;
}
h4 {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
color: inherit;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-weight: bold;
text-rendering: optimizeLegibility;
font-size: 1rem;
line-height: 1.1;
}
h5 {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
color: inherit;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-weight: bold;
text-rendering: optimizeLegibility;
font-size: 0.85028rem;
line-height: 1.1;
}
h6 {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
color: inherit;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-weight: bold;
text-rendering: optimizeLegibility;
font-size: 0.78405rem;
line-height: 1.1;
}
hgroup {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
ul {
margin-left: 1.45rem;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
list-style-position: outside;
list-style-image: none;
}
ol {
margin-left: 1.45rem;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
list-style-position: outside;
list-style-image: none;
}
dl {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
dd {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
p {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
figure {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
pre {
margin-left: 0;
margin-right: 0;
margin-top: 0;
margin-bottom: 1.45rem;
font-size: 0.85rem;
line-height: 1.42;
background: hsla(0, 0%, 0%, 0.04);
border-radius: 3px;
overflow: auto;
word-wrap: normal;
padding: 1.45rem;
}
table {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
font-size: 1rem;
line-height: 1.45rem;
border-collapse: collapse;
width: 100%;
}
fieldset {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
blockquote {
margin-left: 1.45rem;
margin-right: 1.45rem;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
form {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
noscript {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
iframe {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
hr {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: calc(1.45rem - 1px);
background: hsla(0, 0%, 0%, 0.2);
border: none;
height: 1px;
}
address {
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}
b {
font-weight: bold;
}
strong {
font-weight: bold;
}
dt {
font-weight: bold;
}
th {
font-weight: bold;
}
li {
margin-bottom: calc(1.45rem / 2);
}
ol li {
padding-left: 0;
}
ul li {
padding-left: 0;
}
li > ol {
margin-left: 1.45rem;
margin-bottom: calc(1.45rem / 2);
margin-top: calc(1.45rem / 2);
}
li > ul {
margin-left: 1.45rem;
margin-bottom: calc(1.45rem / 2);
margin-top: calc(1.45rem / 2);
}
blockquote *:last-child {
margin-bottom: 0;
}
li *:last-child {
margin-bottom: 0;
}
p *:last-child {
margin-bottom: 0;
}
li > p {
margin-bottom: calc(1.45rem / 2);
}
code {
font-size: 0.85rem;
line-height: 1.45rem;
}
kbd {
font-size: 0.85rem;
line-height: 1.45rem;
}
samp {
font-size: 0.85rem;
line-height: 1.45rem;
}
abbr {
border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5);
cursor: help;
}
acronym {
border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5);
cursor: help;
}
abbr[title] {
border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5);
cursor: help;
text-decoration: none;
}
thead {
text-align: left;
}
td,
th {
text-align: left;
border-bottom: 1px solid hsla(0, 0%, 0%, 0.12);
font-feature-settings: "tnum";
-moz-font-feature-settings: "tnum";
-ms-font-feature-settings: "tnum";
-webkit-font-feature-settings: "tnum";
padding-left: 0.96667rem;
padding-right: 0.96667rem;
padding-top: 0.725rem;
padding-bottom: calc(0.725rem - 1px);
}
th:first-child,
td:first-child {
padding-left: 0;
}
th:last-child,
td:last-child {
padding-right: 0;
}
tt,
code {
background-color: hsla(0, 0%, 0%, 0.04);
border-radius: 3px;
font-family: "SFMono-Regular", Consolas, "Roboto Mono", "Droid Sans Mono",
"Liberation Mono", Menlo, Courier, monospace;
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
}
pre code {
background: none;
line-height: 1.42;
}
code:before,
code:after,
tt:before,
tt:after {
letter-spacing: -0.2em;
content: " ";
}
pre code:before,
pre code:after,
pre tt:before,
pre tt:after {
content: "";
}
@media only screen and (max-width: 480px) {
html {
font-size: 100%;
}
}

View File

@@ -0,0 +1,52 @@
/**
* Layout component that queries for data
* with Gatsby's useStaticQuery component
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from "react"
import PropTypes from "prop-types"
import { useStaticQuery, graphql } from "gatsby"
import Header from "./header"
import "./layout.css"
const Layout = ({ children }) => {
const data = useStaticQuery(graphql`
query SiteTitleQuery {
site {
siteMetadata {
title
}
}
}
`)
return (
<>
<Header siteTitle={data.site.siteMetadata.title} />
<div
style={{
margin: `0 auto`,
maxWidth: 960,
padding: `0px 1.0875rem 1.45rem`,
paddingTop: 0,
}}
>
<main>{children}</main>
<footer>
© {new Date().getFullYear()}, Built with
{` `}
<a href="https://www.gatsbyjs.org">Gatsby</a>
</footer>
</div>
</>
)
}
Layout.propTypes = {
children: PropTypes.node.isRequired,
}
export default Layout

View File

@@ -0,0 +1,88 @@
/**
* SEO component that queries for data with
* Gatsby's useStaticQuery React hook
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from "react"
import PropTypes from "prop-types"
import Helmet from "react-helmet"
import { useStaticQuery, graphql } from "gatsby"
function SEO({ description, lang, meta, title }) {
const { site } = useStaticQuery(
graphql`
query {
site {
siteMetadata {
title
description
author
}
}
}
`
)
const metaDescription = description || site.siteMetadata.description
return (
<Helmet
htmlAttributes={{
lang,
}}
title={title}
titleTemplate={`%s | ${site.siteMetadata.title}`}
meta={[
{
name: `description`,
content: metaDescription,
},
{
property: `og:title`,
content: title,
},
{
property: `og:description`,
content: metaDescription,
},
{
property: `og:type`,
content: `website`,
},
{
name: `twitter:card`,
content: `summary`,
},
{
name: `twitter:creator`,
content: site.siteMetadata.author,
},
{
name: `twitter:title`,
content: title,
},
{
name: `twitter:description`,
content: metaDescription,
},
].concat(meta)}
/>
)
}
SEO.defaultProps = {
lang: `en`,
meta: [],
description: ``,
}
SEO.propTypes = {
description: PropTypes.string,
lang: PropTypes.string,
meta: PropTypes.arrayOf(PropTypes.object),
title: PropTypes.string.isRequired,
}
export default SEO

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Some files were not shown because too many files have changed in this diff Show More