mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-11 12:57:46 +00:00
Compare commits
18 Commits
@vercel/no
...
@vercel-in
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
493a31091d | ||
|
|
8d7206f5b6 | ||
|
|
4bf2ca55ff | ||
|
|
5e5332fbc9 | ||
|
|
281ec776a5 | ||
|
|
ee8f9292b4 | ||
|
|
027bce00b3 | ||
|
|
ca1f41200a | ||
|
|
834b3e652b | ||
|
|
5c6941d18c | ||
|
|
761ede2482 | ||
|
|
1d01703dc3 | ||
|
|
7021279b28 | ||
|
|
28acf50bdf | ||
|
|
718bbd365a | ||
|
|
7e791ee080 | ||
|
|
13769106cb | ||
|
|
aa734efc6c |
274
examples/nextjs/package-lock.json
generated
274
examples/nextjs/package-lock.json
generated
@@ -8,13 +8,21 @@
|
||||
"name": "nextjs",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"eslint": "8.43.0",
|
||||
"eslint-config-next": "13.4.7",
|
||||
"next": "13.4.7",
|
||||
"eslint": "8.44.0",
|
||||
"eslint-config-next": "13.4.8",
|
||||
"next": "13.4.8",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@aashutoshrathi/word-wrap": {
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
|
||||
"integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.22.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.5.tgz",
|
||||
@@ -49,13 +57,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz",
|
||||
"integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz",
|
||||
"integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==",
|
||||
"dependencies": {
|
||||
"ajv": "^6.12.4",
|
||||
"debug": "^4.3.2",
|
||||
"espree": "^9.5.2",
|
||||
"espree": "^9.6.0",
|
||||
"globals": "^13.19.0",
|
||||
"ignore": "^5.2.0",
|
||||
"import-fresh": "^3.2.1",
|
||||
@@ -71,9 +79,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "8.43.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz",
|
||||
"integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==",
|
||||
"version": "8.44.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz",
|
||||
"integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==",
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
}
|
||||
@@ -109,22 +117,22 @@
|
||||
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA=="
|
||||
},
|
||||
"node_modules/@next/env": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.4.7.tgz",
|
||||
"integrity": "sha512-ZlbiFulnwiFsW9UV1ku1OvX/oyIPLtMk9p/nnvDSwI0s7vSoZdRtxXNsaO+ZXrLv/pMbXVGq4lL8TbY9iuGmVw=="
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.4.8.tgz",
|
||||
"integrity": "sha512-twuSf1klb3k9wXI7IZhbZGtFCWvGD4wXTY2rmvzIgVhXhs7ISThrbNyutBx3jWIL8Y/Hk9+woytFz5QsgtcRKQ=="
|
||||
},
|
||||
"node_modules/@next/eslint-plugin-next": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.4.7.tgz",
|
||||
"integrity": "sha512-ANEPltxzXbyyG7CvqxdY4PmeM5+RyWdAJGufTHnU+LA/i3J6IDV2r8Z4onKwskwKEhwqzz5lMaSYGGXLyHX+mg==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.4.8.tgz",
|
||||
"integrity": "sha512-cmfVHpxWjjcETFt2WHnoFU6EmY69QcPJRlRNAooQlNe53Ke90vg1Ci/dkPffryJZaxxiRziP9bQrV8lDVCn3Fw==",
|
||||
"dependencies": {
|
||||
"glob": "7.1.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-arm64": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.7.tgz",
|
||||
"integrity": "sha512-VZTxPv1b59KGiv/pZHTO5Gbsdeoxcj2rU2cqJu03btMhHpn3vwzEK0gUSVC/XW96aeGO67X+cMahhwHzef24/w==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.8.tgz",
|
||||
"integrity": "sha512-MSFplVM4dTWOuKAUv0XR9gY7AWtMSBu9os9f+kp+s5rWhM1I2CdR3obFttd6366nS/W/VZxbPM5oEIdlIa46zA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -137,9 +145,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-x64": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.7.tgz",
|
||||
"integrity": "sha512-gO2bw+2Ymmga+QYujjvDz9955xvYGrWofmxTq7m70b9pDPvl7aDFABJOZ2a8SRCuSNB5mXU8eTOmVVwyp/nAew==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.8.tgz",
|
||||
"integrity": "sha512-Reox+UXgonon9P0WNDE6w85DGtyBqGitl/ryznOvn6TvfxEaZIpTgeu3ZrJLU9dHSMhiK7YAM793mE/Zii2/Qw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -152,9 +160,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-gnu": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.7.tgz",
|
||||
"integrity": "sha512-6cqp3vf1eHxjIDhEOc7Mh/s8z1cwc/l5B6ZNkOofmZVyu1zsbEM5Hmx64s12Rd9AYgGoiCz4OJ4M/oRnkE16/Q==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.8.tgz",
|
||||
"integrity": "sha512-kdyzYvAYtqQVgzIKNN7e1rLU8aZv86FDSRqPlOkKZlvqudvTO0iohuTPmnEEDlECeBM6qRPShNffotDcU/R2KA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -167,9 +175,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-musl": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.7.tgz",
|
||||
"integrity": "sha512-T1kD2FWOEy5WPidOn1si0rYmWORNch4a/NR52Ghyp4q7KyxOCuiOfZzyhVC5tsLIBDH3+cNdB5DkD9afpNDaOw==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.8.tgz",
|
||||
"integrity": "sha512-oWxx4yRkUGcR81XwbI+T0zhZ3bDF6V1aVLpG+C7hSG50ULpV8gC39UxVO22/bv93ZlcfMY4zl8xkz9Klct6dpQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -182,9 +190,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-gnu": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.7.tgz",
|
||||
"integrity": "sha512-zaEC+iEiAHNdhl6fuwl0H0shnTzQoAoJiDYBUze8QTntE/GNPfTYpYboxF5LRYIjBwETUatvE0T64W6SKDipvg==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.8.tgz",
|
||||
"integrity": "sha512-anhtvuO6eE9YRhYnaEGTfbpH3L5gT/9qPFcNoi6xS432r/4DAtpJY8kNktqkTVevVIC/pVumqO8tV59PR3zbNg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -197,9 +205,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-musl": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.7.tgz",
|
||||
"integrity": "sha512-X6r12F8d8SKAtYJqLZBBMIwEqcTRvUdVm+xIq+l6pJqlgT2tNsLLf2i5Cl88xSsIytBICGsCNNHd+siD2fbWBA==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.8.tgz",
|
||||
"integrity": "sha512-aR+J4wWfNgH1DwCCBNjan7Iumx0lLtn+2/rEYuhIrYLY4vnxqSVGz9u3fXcgUwo6Q9LT8NFkaqK1vPprdq+BXg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -212,9 +220,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-arm64-msvc": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.7.tgz",
|
||||
"integrity": "sha512-NPnmnV+vEIxnu6SUvjnuaWRglZzw4ox5n/MQTxeUhb5iwVWFedolPFebMNwgrWu4AELwvTdGtWjqof53AiWHcw==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.8.tgz",
|
||||
"integrity": "sha512-OWBKIrJwQBTqrat0xhxEB/jcsjJR3+diD9nc/Y8F1mRdQzsn4bPsomgJyuqPVZs6Lz3K18qdIkvywmfSq75SsQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -227,9 +235,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-ia32-msvc": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.7.tgz",
|
||||
"integrity": "sha512-6Hxijm6/a8XqLQpOOf/XuwWRhcuc/g4rBB2oxjgCMuV9Xlr2bLs5+lXyh8w9YbAUMYR3iC9mgOlXbHa79elmXw==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.8.tgz",
|
||||
"integrity": "sha512-agiPWGjUndXGTOn4ChbKipQXRA6/UPkywAWIkx7BhgGv48TiJfHTK6MGfBoL9tS6B4mtW39++uy0wFPnfD0JWg==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -242,9 +250,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-x64-msvc": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.7.tgz",
|
||||
"integrity": "sha512-sW9Yt36Db1nXJL+mTr2Wo0y+VkPWeYhygvcHj1FF0srVtV+VoDjxleKtny21QHaG05zdeZnw2fCtf2+dEqgwqA==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.8.tgz",
|
||||
"integrity": "sha512-UIRKoByVKbuR6SnFG4JM8EMFlJrfEGuUQ1ihxzEleWcNwRMMiVaCj1KyqfTOW8VTQhJ0u8P1Ngg6q1RwnIBTtw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -326,13 +334,13 @@
|
||||
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "5.60.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.0.tgz",
|
||||
"integrity": "sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==",
|
||||
"version": "5.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.61.0.tgz",
|
||||
"integrity": "sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg==",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "5.60.0",
|
||||
"@typescript-eslint/types": "5.60.0",
|
||||
"@typescript-eslint/typescript-estree": "5.60.0",
|
||||
"@typescript-eslint/scope-manager": "5.61.0",
|
||||
"@typescript-eslint/types": "5.61.0",
|
||||
"@typescript-eslint/typescript-estree": "5.61.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -352,12 +360,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "5.60.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.0.tgz",
|
||||
"integrity": "sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==",
|
||||
"version": "5.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.61.0.tgz",
|
||||
"integrity": "sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw==",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.60.0",
|
||||
"@typescript-eslint/visitor-keys": "5.60.0"
|
||||
"@typescript-eslint/types": "5.61.0",
|
||||
"@typescript-eslint/visitor-keys": "5.61.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -368,9 +376,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "5.60.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.0.tgz",
|
||||
"integrity": "sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==",
|
||||
"version": "5.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.61.0.tgz",
|
||||
"integrity": "sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ==",
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
@@ -380,12 +388,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "5.60.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.0.tgz",
|
||||
"integrity": "sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==",
|
||||
"version": "5.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.61.0.tgz",
|
||||
"integrity": "sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw==",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.60.0",
|
||||
"@typescript-eslint/visitor-keys": "5.60.0",
|
||||
"@typescript-eslint/types": "5.61.0",
|
||||
"@typescript-eslint/visitor-keys": "5.61.0",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -406,11 +414,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "5.60.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.0.tgz",
|
||||
"integrity": "sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==",
|
||||
"version": "5.61.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.61.0.tgz",
|
||||
"integrity": "sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg==",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.60.0",
|
||||
"@typescript-eslint/types": "5.61.0",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -483,9 +491,9 @@
|
||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||
},
|
||||
"node_modules/aria-query": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.2.1.tgz",
|
||||
"integrity": "sha512-7uFg4b+lETFgdaJyETnILsXgnnzVnkHcgRbwbPwevm5x/LmUlt3MjczMRe1zg824iBgXZNRPTBftNYyRSKLp2g==",
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
|
||||
"integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
|
||||
"dependencies": {
|
||||
"dequal": "^2.0.3"
|
||||
}
|
||||
@@ -696,9 +704,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001506",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001506.tgz",
|
||||
"integrity": "sha512-6XNEcpygZMCKaufIcgpQNZNf00GEqc7VQON+9Rd0K1bMYo8xhMZRAo5zpbnbMNizi4YNgIDAFrdykWsvY3H4Hw==",
|
||||
"version": "1.0.30001511",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001511.tgz",
|
||||
"integrity": "sha512-NaWPJawcoedlghN4P7bDNeADD7K+rZaY6V8ZcME7PkEZo/nfOg+lnrUgRWiKbNxcQ4/toFKSxnS4WdbyPZnKkw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@@ -995,14 +1003,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "8.43.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz",
|
||||
"integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==",
|
||||
"version": "8.44.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz",
|
||||
"integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.4.0",
|
||||
"@eslint/eslintrc": "^2.0.3",
|
||||
"@eslint/js": "8.43.0",
|
||||
"@eslint/eslintrc": "^2.1.0",
|
||||
"@eslint/js": "8.44.0",
|
||||
"@humanwhocodes/config-array": "^0.11.10",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@nodelib/fs.walk": "^1.2.8",
|
||||
@@ -1014,7 +1022,7 @@
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"eslint-scope": "^7.2.0",
|
||||
"eslint-visitor-keys": "^3.4.1",
|
||||
"espree": "^9.5.2",
|
||||
"espree": "^9.6.0",
|
||||
"esquery": "^1.4.2",
|
||||
"esutils": "^2.0.2",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
@@ -1034,7 +1042,7 @@
|
||||
"lodash.merge": "^4.6.2",
|
||||
"minimatch": "^3.1.2",
|
||||
"natural-compare": "^1.4.0",
|
||||
"optionator": "^0.9.1",
|
||||
"optionator": "^0.9.3",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"strip-json-comments": "^3.1.0",
|
||||
"text-table": "^0.2.0"
|
||||
@@ -1050,11 +1058,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-config-next": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.4.7.tgz",
|
||||
"integrity": "sha512-+IRAyD0+J1MZaTi9RQMPUfr6Q+GCZ1wOkK6XM52Vokh7VI4R6YFGOFzdkEFHl4ZyIX4FKa5vcwUP2WscSFNjNQ==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.4.8.tgz",
|
||||
"integrity": "sha512-2hE0b6lHuhtHBX8VgEXi8v4G8PVrPUBMOSLCTq8qtcQ2qQOX7+uBOLK2kU4FD2qDZzyXNlhmuH+WLT5ptY4XLA==",
|
||||
"dependencies": {
|
||||
"@next/eslint-plugin-next": "13.4.7",
|
||||
"@next/eslint-plugin-next": "13.4.8",
|
||||
"@rushstack/eslint-patch": "^1.1.3",
|
||||
"@typescript-eslint/parser": "^5.42.0",
|
||||
"eslint-import-resolver-node": "^0.3.6",
|
||||
@@ -1118,9 +1126,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-import-resolver-typescript/node_modules/globby": {
|
||||
"version": "13.2.0",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-13.2.0.tgz",
|
||||
"integrity": "sha512-jWsQfayf13NvqKUIL3Ta+CIqMnvlaIDFveWE/dpOZ9+3AMEJozsxDvKA02zync9UuvOM8rOXzsD5GqKP4OnWPQ==",
|
||||
"version": "13.2.1",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-13.2.1.tgz",
|
||||
"integrity": "sha512-DPCBxctI7dN4EeIqjW2KGqgdcUMbrhJ9AzON+PlxCtvppWhubTLD4+a0GFxiym14ZvacUydTPjLPc2DlKz7EIg==",
|
||||
"dependencies": {
|
||||
"dir-glob": "^3.0.1",
|
||||
"fast-glob": "^3.2.11",
|
||||
@@ -1363,11 +1371,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/espree": {
|
||||
"version": "9.5.2",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz",
|
||||
"integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==",
|
||||
"version": "9.6.0",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.6.0.tgz",
|
||||
"integrity": "sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==",
|
||||
"dependencies": {
|
||||
"acorn": "^8.8.0",
|
||||
"acorn": "^8.9.0",
|
||||
"acorn-jsx": "^5.3.2",
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
},
|
||||
@@ -1444,9 +1452,9 @@
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||
},
|
||||
"node_modules/fast-glob": {
|
||||
"version": "3.2.12",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
|
||||
"integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz",
|
||||
"integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==",
|
||||
"dependencies": {
|
||||
"@nodelib/fs.stat": "^2.0.2",
|
||||
"@nodelib/fs.walk": "^1.2.3",
|
||||
@@ -1625,9 +1633,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/get-tsconfig": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.6.0.tgz",
|
||||
"integrity": "sha512-lgbo68hHTQnFddybKbbs/RDRJnJT5YyGy2kQzVwbq+g67X73i+5MVTval34QxGkOe9X5Ujf1UYpCaphLyltjEg==",
|
||||
"version": "4.6.2",
|
||||
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.6.2.tgz",
|
||||
"integrity": "sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==",
|
||||
"dependencies": {
|
||||
"resolve-pkg-maps": "^1.0.0"
|
||||
},
|
||||
@@ -2206,12 +2214,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/jsx-ast-utils": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz",
|
||||
"integrity": "sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==",
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.4.tgz",
|
||||
"integrity": "sha512-fX2TVdCViod6HwKEtSWGHs57oFhVfCMwieb9PuRDgjDPh5XeqJiHFFFJCHxU5cnTc3Bu/GRL+kPiFmw8XWOfKw==",
|
||||
"dependencies": {
|
||||
"array-includes": "^3.1.5",
|
||||
"object.assign": "^4.1.3"
|
||||
"array-includes": "^3.1.6",
|
||||
"array.prototype.flat": "^1.3.1",
|
||||
"object.assign": "^4.1.4",
|
||||
"object.values": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
@@ -2366,11 +2376,11 @@
|
||||
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="
|
||||
},
|
||||
"node_modules/next": {
|
||||
"version": "13.4.7",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-13.4.7.tgz",
|
||||
"integrity": "sha512-M8z3k9VmG51SRT6v5uDKdJXcAqLzP3C+vaKfLIAM0Mhx1um1G7MDnO63+m52qPdZfrTFzMZNzfsgvm3ghuVHIQ==",
|
||||
"version": "13.4.8",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-13.4.8.tgz",
|
||||
"integrity": "sha512-lxUjndYKjZHGK3CWeN2RI+/6ni6EUvjiqGWXAYPxUfGIdFGQ5XoisrqAJ/dF74aP27buAfs8MKIbIMMdxjqSBg==",
|
||||
"dependencies": {
|
||||
"@next/env": "13.4.7",
|
||||
"@next/env": "13.4.8",
|
||||
"@swc/helpers": "0.5.1",
|
||||
"busboy": "1.6.0",
|
||||
"caniuse-lite": "^1.0.30001406",
|
||||
@@ -2386,15 +2396,15 @@
|
||||
"node": ">=16.8.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@next/swc-darwin-arm64": "13.4.7",
|
||||
"@next/swc-darwin-x64": "13.4.7",
|
||||
"@next/swc-linux-arm64-gnu": "13.4.7",
|
||||
"@next/swc-linux-arm64-musl": "13.4.7",
|
||||
"@next/swc-linux-x64-gnu": "13.4.7",
|
||||
"@next/swc-linux-x64-musl": "13.4.7",
|
||||
"@next/swc-win32-arm64-msvc": "13.4.7",
|
||||
"@next/swc-win32-ia32-msvc": "13.4.7",
|
||||
"@next/swc-win32-x64-msvc": "13.4.7"
|
||||
"@next/swc-darwin-arm64": "13.4.8",
|
||||
"@next/swc-darwin-x64": "13.4.8",
|
||||
"@next/swc-linux-arm64-gnu": "13.4.8",
|
||||
"@next/swc-linux-arm64-musl": "13.4.8",
|
||||
"@next/swc-linux-x64-gnu": "13.4.8",
|
||||
"@next/swc-linux-x64-musl": "13.4.8",
|
||||
"@next/swc-win32-arm64-msvc": "13.4.8",
|
||||
"@next/swc-win32-ia32-msvc": "13.4.8",
|
||||
"@next/swc-win32-x64-msvc": "13.4.8"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@opentelemetry/api": "^1.1.0",
|
||||
@@ -2578,16 +2588,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/optionator": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
|
||||
"integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
|
||||
"version": "0.9.3",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
|
||||
"integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==",
|
||||
"dependencies": {
|
||||
"@aashutoshrathi/word-wrap": "^1.2.3",
|
||||
"deep-is": "^0.1.3",
|
||||
"fast-levenshtein": "^2.0.6",
|
||||
"levn": "^0.4.1",
|
||||
"prelude-ls": "^1.2.1",
|
||||
"type-check": "^0.4.0",
|
||||
"word-wrap": "^1.2.3"
|
||||
"type-check": "^0.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
@@ -2997,9 +3007,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.5.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz",
|
||||
"integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==",
|
||||
"version": "7.5.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz",
|
||||
"integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==",
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
@@ -3278,9 +3288,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.5.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz",
|
||||
"integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w=="
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",
|
||||
"integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA=="
|
||||
},
|
||||
"node_modules/tsutils": {
|
||||
"version": "3.21.0",
|
||||
@@ -3337,9 +3347,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz",
|
||||
"integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==",
|
||||
"version": "5.1.6",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
|
||||
"integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
@@ -3439,14 +3449,6 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/word-wrap": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
|
||||
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint": "8.43.0",
|
||||
"eslint-config-next": "13.4.7",
|
||||
"next": "13.4.7",
|
||||
"eslint": "8.44.0",
|
||||
"eslint-config-next": "13.4.8",
|
||||
"next": "13.4.8",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vercel-internals/constants
|
||||
|
||||
## 1.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Create new help output and arg parsing for deploy command ([#10090](https://github.com/vercel/vercel/pull/10090))
|
||||
|
||||
## 1.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@vercel-internals/constants",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/routing-utils": "2.2.1"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@vercel-internals/tsconfig": "1.0.0",
|
||||
"@vercel/style-guide": "4.0.2",
|
||||
|
||||
@@ -3,3 +3,7 @@ export const PROJECT_ENV_TARGET = [
|
||||
'preview',
|
||||
'development',
|
||||
] as const;
|
||||
|
||||
export const LOGO = '▲' as const;
|
||||
export const NAME = 'vercel' as const;
|
||||
export const TITLE = 'Vercel' as const;
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @vercel-internals/types
|
||||
|
||||
## 1.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`7021279b2`](https://github.com/vercel/vercel/commit/7021279b284f314a4d1bdbb4306b4c22291efa08), [`718bbd365`](https://github.com/vercel/vercel/commit/718bbd365a50271a980bdca231ca801a0eead32b)]:
|
||||
- @vercel/build-utils@6.8.1
|
||||
- @vercel-internals/constants@1.0.4
|
||||
|
||||
## 1.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
5
internals/types/index.d.ts
vendored
5
internals/types/index.d.ts
vendored
@@ -1,5 +1,6 @@
|
||||
import type { BuilderFunctions } from '@vercel/build-utils';
|
||||
import type { Readable, Writable } from 'stream';
|
||||
import type * as tty from 'tty';
|
||||
import type { Route } from '@vercel/routing-utils';
|
||||
import { PROJECT_ENV_TARGET } from '@vercel-internals/constants';
|
||||
|
||||
@@ -631,6 +632,6 @@ export interface WritableTTY extends Writable {
|
||||
|
||||
export interface Stdio {
|
||||
stdin: ReadableTTY;
|
||||
stdout: WritableTTY;
|
||||
stderr: WritableTTY;
|
||||
stdout: tty.WriteStream;
|
||||
stderr: tty.WriteStream;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@vercel-internals/types",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"types": "index.d.ts",
|
||||
"main": "index.d.ts",
|
||||
"dependencies": {
|
||||
"@types/node": "14.14.31",
|
||||
"@vercel-internals/constants": "1.0.3",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/routing-utils": "2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"source-map-support": "0.5.12",
|
||||
"ts-eager": "2.0.2",
|
||||
"ts-jest": "29.1.0",
|
||||
"turbo": "1.10.6",
|
||||
"turbo": "1.10.7",
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vercel/build-utils
|
||||
|
||||
## 6.8.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Revert "[build-utils] Allow file-ref sema to be controlled through env flag" ([#10167](https://github.com/vercel/vercel/pull/10167))
|
||||
|
||||
## 6.8.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/build-utils",
|
||||
"version": "6.8.0",
|
||||
"version": "6.8.1",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.js",
|
||||
|
||||
@@ -5,13 +5,7 @@ import path from 'path';
|
||||
import Sema from 'async-sema';
|
||||
import { FileBase } from './types';
|
||||
|
||||
const DEFAULT_SEMA = 20;
|
||||
const semaToPreventEMFILE = new Sema(
|
||||
parseInt(
|
||||
process.env.VERCEL_INTERNAL_FILE_FS_REF_SEMA || String(DEFAULT_SEMA),
|
||||
10
|
||||
) || DEFAULT_SEMA
|
||||
);
|
||||
const semaToPreventEMFILE = new Sema(20);
|
||||
|
||||
interface FileFsRefOptions {
|
||||
mode?: number;
|
||||
|
||||
@@ -12,13 +12,7 @@ interface FileRefOptions {
|
||||
mutable?: boolean;
|
||||
}
|
||||
|
||||
const DEFAULT_SEMA = 5;
|
||||
const semaToDownloadFromS3 = new Sema(
|
||||
parseInt(
|
||||
process.env.VERCEL_INTERNAL_FILE_REF_SEMA || String(DEFAULT_SEMA),
|
||||
10
|
||||
) || DEFAULT_SEMA
|
||||
);
|
||||
const semaToDownloadFromS3 = new Sema(5);
|
||||
|
||||
class BailableError extends Error {
|
||||
public bail: boolean;
|
||||
|
||||
@@ -1,5 +1,35 @@
|
||||
# vercel
|
||||
|
||||
## 31.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Allow additional project settings in `createProject()` ([#10172](https://github.com/vercel/vercel/pull/10172))
|
||||
|
||||
- Run local Project detection during `vc link --repo`. ([#10094](https://github.com/vercel/vercel/pull/10094))
|
||||
This allows for creation of new Projects that do not yet exist under the selected scope.
|
||||
|
||||
- Redeploy command no longer redeploys preview deployments to production ([#10186](https://github.com/vercel/vercel/pull/10186))
|
||||
|
||||
- Added trailing new line at end of help output ([#10170](https://github.com/vercel/vercel/pull/10170))
|
||||
|
||||
- Create new help output and arg parsing for deploy command ([#10090](https://github.com/vercel/vercel/pull/10090))
|
||||
|
||||
- [cli] Remove `preinstall` script ([#10157](https://github.com/vercel/vercel/pull/10157))
|
||||
|
||||
- Updated dependencies [[`7021279b2`](https://github.com/vercel/vercel/commit/7021279b284f314a4d1bdbb4306b4c22291efa08), [`5e5332fbc`](https://github.com/vercel/vercel/commit/5e5332fbc9317a8f3cc4ed0b72ec1a2c76020891), [`027bce00b`](https://github.com/vercel/vercel/commit/027bce00b3821d9b4a8f7ec320cd1c43ab9f4215)]:
|
||||
- @vercel/build-utils@6.8.1
|
||||
- @vercel/node@2.15.4
|
||||
- @vercel/remix-builder@1.8.16
|
||||
- @vercel/static-build@1.3.39
|
||||
|
||||
## 31.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`aa734efc6`](https://github.com/vercel/vercel/commit/aa734efc6c42badd4aa9bf64487904aa64e9bd49)]:
|
||||
- @vercel/next@3.8.8
|
||||
|
||||
## 31.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vercel",
|
||||
"version": "31.0.0",
|
||||
"version": "31.0.2",
|
||||
"preferGlobal": true,
|
||||
"license": "Apache-2.0",
|
||||
"description": "The command-line interface for Vercel",
|
||||
@@ -11,7 +11,6 @@
|
||||
"directory": "packages/cli"
|
||||
},
|
||||
"scripts": {
|
||||
"preinstall": "node ./scripts/preinstall.js",
|
||||
"test": "jest --env node --verbose --bail",
|
||||
"test-unit": "pnpm test test/unit/",
|
||||
"test-e2e": "rimraf test/fixtures/integration && pnpm test test/integration-1.test.ts test/integration-2.test.ts test/integration-3.test.ts",
|
||||
@@ -32,16 +31,16 @@
|
||||
"node": ">= 14"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/go": "2.5.1",
|
||||
"@vercel/hydrogen": "0.0.64",
|
||||
"@vercel/next": "3.8.7",
|
||||
"@vercel/node": "2.15.3",
|
||||
"@vercel/next": "3.8.8",
|
||||
"@vercel/node": "2.15.4",
|
||||
"@vercel/python": "3.1.60",
|
||||
"@vercel/redwood": "1.1.15",
|
||||
"@vercel/remix-builder": "1.8.15",
|
||||
"@vercel/remix-builder": "1.8.16",
|
||||
"@vercel/ruby": "1.3.76",
|
||||
"@vercel/static-build": "1.3.38"
|
||||
"@vercel/static-build": "1.3.39"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alex_neo/jest-expect-message": "1.0.5",
|
||||
@@ -85,10 +84,10 @@
|
||||
"@types/which": "3.0.0",
|
||||
"@types/write-json-file": "2.2.1",
|
||||
"@types/yauzl-promise": "2.1.0",
|
||||
"@vercel-internals/constants": "1.0.3",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel-internals/get-package-json": "1.0.0",
|
||||
"@vercel-internals/types": "1.0.3",
|
||||
"@vercel/client": "12.6.3",
|
||||
"@vercel-internals/types": "1.0.4",
|
||||
"@vercel/client": "12.6.4",
|
||||
"@vercel/error-utils": "1.0.10",
|
||||
"@vercel/frameworks": "1.4.3",
|
||||
"@vercel/fs-detectors": "4.0.1",
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
const { join } = require('path');
|
||||
const { statSync } = require('fs');
|
||||
const pkg = require('../package');
|
||||
|
||||
function error(command) {
|
||||
console.error('> Error:', command);
|
||||
}
|
||||
|
||||
function debug(str) {
|
||||
if (
|
||||
process.argv.find(str => str === '--debug') ||
|
||||
process.env.PREINSTALL_DEBUG
|
||||
) {
|
||||
console.log(`[debug] [${new Date().toISOString()}]`, str);
|
||||
}
|
||||
}
|
||||
|
||||
function isYarn() {
|
||||
return process.env.npm_config_heading !== 'npm';
|
||||
}
|
||||
|
||||
function isGlobal() {
|
||||
const cmd = JSON.parse(process.env.npm_config_argv || '{ "original": [] }');
|
||||
|
||||
return isYarn()
|
||||
? cmd.original.includes('global')
|
||||
: Boolean(process.env.npm_config_global);
|
||||
}
|
||||
|
||||
function isVercel() {
|
||||
return pkg.name === 'vercel';
|
||||
}
|
||||
|
||||
function validateNodeVersion() {
|
||||
let semver = '>= 0';
|
||||
let major = '1';
|
||||
|
||||
try {
|
||||
major = process.versions.node.split('.')[0];
|
||||
const pkg = require('../package.json');
|
||||
semver = pkg.engines.node;
|
||||
} catch (e) {
|
||||
debug('Failed to read package.json engines');
|
||||
}
|
||||
|
||||
const isValid = eval(`${major} ${semver}`);
|
||||
return { isValid, expected: semver, actual: process.versions.node };
|
||||
}
|
||||
|
||||
function isInNodeModules(name) {
|
||||
try {
|
||||
const nodeModules = join(__dirname, '..', '..');
|
||||
const stat = statSync(join(nodeModules, name));
|
||||
return stat.isDirectory();
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
if (!isGlobal()) {
|
||||
debug('Skipping preinstall since Vercel CLI is being installed locally');
|
||||
return;
|
||||
}
|
||||
|
||||
const ver = validateNodeVersion();
|
||||
|
||||
if (!ver.isValid) {
|
||||
error(
|
||||
`Detected unsupported Node.js version.\n` +
|
||||
`Expected "${ver.expected}" but found "${ver.actual}".\n` +
|
||||
`Please update to the latest Node.js LTS version to install Vercel CLI.`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (isVercel() && isInNodeModules('now')) {
|
||||
const uninstall = isYarn()
|
||||
? 'yarn global remove now'
|
||||
: 'npm uninstall -g now';
|
||||
console.error(`NOTE: Run \`${uninstall}\` to uninstall \`now\`\n`);
|
||||
}
|
||||
}
|
||||
|
||||
process.on('unhandledRejection', err => {
|
||||
console.error('Unhandled Rejection:');
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
process.on('uncaughtException', err => {
|
||||
console.error('Uncaught Exception:');
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
main().catch(err => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -1,50 +0,0 @@
|
||||
import chalk from 'chalk';
|
||||
import logo from '../../util/output/logo';
|
||||
import { getPkgName } from '../../util/pkg-name';
|
||||
|
||||
export const help = () => {
|
||||
return `
|
||||
${chalk.bold(`${logo} ${getPkgName()} [deploy]`)} [path-to-project] [options]
|
||||
|
||||
--prod Create a production deployment
|
||||
-p, --public Deployment is public (${chalk.dim(
|
||||
'`/_src`'
|
||||
)} is exposed)
|
||||
-e, --env Include an env var during run time (e.g.: ${chalk.dim(
|
||||
'`-e KEY=value`'
|
||||
)}). Can appear many times.
|
||||
-b, --build-env Similar to ${chalk.dim(
|
||||
'`--env`'
|
||||
)} but for build time only.
|
||||
-m, --meta Add metadata for the deployment (e.g.: ${chalk.dim(
|
||||
'`-m KEY=value`'
|
||||
)}). Can appear many times.
|
||||
--no-wait Don't wait for the deployment to finish
|
||||
-f, --force Force a new deployment even if nothing has changed
|
||||
--with-cache Retain build cache when using "--force"
|
||||
--regions Set default regions to enable the deployment on
|
||||
|
||||
${chalk.dim('Examples:')}
|
||||
|
||||
${chalk.gray('–')} Deploy the current directory
|
||||
|
||||
${chalk.cyan(`$ ${getPkgName()}`)}
|
||||
|
||||
${chalk.gray('–')} Deploy a custom path
|
||||
|
||||
${chalk.cyan(`$ ${getPkgName()} /usr/src/project`)}
|
||||
|
||||
${chalk.gray('–')} Deploy with Environment Variables
|
||||
|
||||
${chalk.cyan(`$ ${getPkgName()} -e NODE_ENV=production`)}
|
||||
|
||||
${chalk.gray('–')} Deploy with prebuilt outputs
|
||||
|
||||
${chalk.cyan(`$ ${getPkgName()} build`)}
|
||||
${chalk.cyan(`$ ${getPkgName()} deploy --prebuilt`)}
|
||||
|
||||
${chalk.gray('–')} Write Deployment URL to a file
|
||||
|
||||
${chalk.cyan(`$ ${getPkgName()} > deployment-url.txt`)}
|
||||
`;
|
||||
};
|
||||
181
packages/cli/src/commands/deploy/command.ts
Normal file
181
packages/cli/src/commands/deploy/command.ts
Normal file
@@ -0,0 +1,181 @@
|
||||
import { Command } from '../help';
|
||||
|
||||
export const deployCommand: Command = {
|
||||
name: 'deploy',
|
||||
description:
|
||||
'Deploy your project to Vercel. The `deploy` command is the default command for the Vercel CLI, and can be omitted (`vc deploy my-app` equals `vc my-app`).',
|
||||
arguments: [
|
||||
{
|
||||
name: 'project-path',
|
||||
required: false,
|
||||
},
|
||||
],
|
||||
options: [
|
||||
{
|
||||
name: 'force',
|
||||
shorthand: 'f',
|
||||
type: 'boolean',
|
||||
deprecated: false,
|
||||
description: 'Force a new deployment even if nothing has changed',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'with-cache',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
deprecated: false,
|
||||
description: 'Retain build cache when using "--force"',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'public',
|
||||
shorthand: 'p',
|
||||
type: 'boolean',
|
||||
deprecated: false,
|
||||
description: 'Deployment is public (`/_src`) is exposed)',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'env',
|
||||
shorthand: 'e',
|
||||
type: 'string',
|
||||
argument: 'key=value',
|
||||
deprecated: false,
|
||||
multi: true,
|
||||
description:
|
||||
'Specify environment variables during run-time (e.g. `-e KEY1=value1 -e KEY2=value2`)',
|
||||
},
|
||||
{
|
||||
name: 'build-env',
|
||||
shorthand: 'b',
|
||||
type: 'string',
|
||||
argument: 'key=value',
|
||||
deprecated: false,
|
||||
multi: true,
|
||||
description:
|
||||
'Specify environment variables during build-time (e.g. `-b KEY1=value1 -b KEY2=value2`)',
|
||||
},
|
||||
{
|
||||
name: 'meta',
|
||||
shorthand: 'm',
|
||||
type: 'string',
|
||||
argument: 'key=value',
|
||||
deprecated: false,
|
||||
multi: true,
|
||||
description:
|
||||
'Specify metadata for the deployment (e.g. `-m KEY1=value1 -m KEY2=value2`)',
|
||||
},
|
||||
{
|
||||
name: 'regions',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
deprecated: false,
|
||||
description: 'Set default regions to enable the deployment on',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'prebuilt',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
deprecated: false,
|
||||
description:
|
||||
'Use in combination with `vc build`. Deploy an existing build',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'prod',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
deprecated: false,
|
||||
description: 'Create a production deployment',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'archive',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
deprecated: false,
|
||||
description:
|
||||
'Compress the deployment code into a file before uploading it',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'no-wait',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
deprecated: false,
|
||||
description: "Don't wait for the deployment to finish",
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'skip-domain',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
deprecated: false,
|
||||
description: undefined,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'yes',
|
||||
shorthand: 'y',
|
||||
type: 'boolean',
|
||||
deprecated: false,
|
||||
description: 'Use default options to skip all prompts',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
shorthand: 'n',
|
||||
type: 'string',
|
||||
deprecated: true,
|
||||
description: 'Provide a Vercel Project name',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'no-clipboard',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
deprecated: true,
|
||||
description: 'Do not copy deployment URL to clipboard',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'target',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
deprecated: true,
|
||||
description: 'Specify the target deployment environment',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'confirm',
|
||||
shorthand: 'c',
|
||||
type: 'boolean',
|
||||
deprecated: true,
|
||||
description: 'Use default options to skip all prompts',
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
{
|
||||
name: 'Deploy the current directory',
|
||||
value: 'vercel',
|
||||
},
|
||||
{
|
||||
name: 'Deploy a custom path',
|
||||
value: 'vercel /usr/src/project',
|
||||
},
|
||||
{
|
||||
name: 'Deploy with run-time Environment Variables',
|
||||
value: 'vercel -e NODE_ENV=production',
|
||||
},
|
||||
{
|
||||
name: 'Deploy with prebuilt outputs',
|
||||
value: ['vercel build', 'vercel deploy --prebuilt'],
|
||||
},
|
||||
{
|
||||
name: 'Write Deployment URL to a file',
|
||||
value: 'vercel > deployment-url.txt',
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -59,7 +59,6 @@ import validatePaths, {
|
||||
} from '../../util/validate-paths';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
import { Output } from '../../util/output';
|
||||
import { help } from './args';
|
||||
import { getDeploymentChecks } from '../../util/deploy/get-deployment-checks';
|
||||
import parseTarget from '../../util/deploy/parse-target';
|
||||
import getPrebuiltJson from '../../util/deploy/get-prebuilt-json';
|
||||
@@ -69,44 +68,38 @@ import { parseEnv } from '../../util/parse-env';
|
||||
import { errorToString, isErrnoException, isError } from '@vercel/error-utils';
|
||||
import { pickOverrides } from '../../util/projects/project-settings';
|
||||
import { printDeploymentStatus } from '../../util/deploy/print-deployment-status';
|
||||
import { help } from '../help';
|
||||
import { deployCommand } from './command';
|
||||
|
||||
export default async (client: Client): Promise<number> => {
|
||||
const { output } = client;
|
||||
|
||||
let argv = null;
|
||||
|
||||
try {
|
||||
argv = getArgs(client.argv.slice(2), {
|
||||
'--force': Boolean,
|
||||
'--with-cache': Boolean,
|
||||
'--public': Boolean,
|
||||
'--env': [String],
|
||||
'--build-env': [String],
|
||||
'--meta': [String],
|
||||
// This is not an array in favor of matching
|
||||
// the config property name.
|
||||
'--regions': String,
|
||||
'--prebuilt': Boolean,
|
||||
'--prod': Boolean,
|
||||
'--archive': String,
|
||||
'--no-wait': Boolean,
|
||||
'--skip-domain': Boolean,
|
||||
'--yes': Boolean,
|
||||
'-f': '--force',
|
||||
'-p': '--public',
|
||||
'-e': '--env',
|
||||
'-b': '--build-env',
|
||||
'-m': '--meta',
|
||||
'-y': '--yes',
|
||||
const argOptions: {
|
||||
[k: string]:
|
||||
| BooleanConstructor
|
||||
| StringConstructor
|
||||
| string
|
||||
| [StringConstructor];
|
||||
} = {};
|
||||
for (const option of deployCommand.options) {
|
||||
argOptions[`--${option.name}`] =
|
||||
option.type === 'boolean' ? Boolean : String;
|
||||
if (option.shorthand) {
|
||||
argOptions[`-${option.shorthand}`] = `--${option.name}`;
|
||||
}
|
||||
if (
|
||||
option.name === 'env' ||
|
||||
option.name === 'build-env' ||
|
||||
option.name === 'meta'
|
||||
) {
|
||||
argOptions[`--${option.name}`] = [String];
|
||||
}
|
||||
}
|
||||
|
||||
// deprecated
|
||||
'--name': String,
|
||||
'-n': '--name',
|
||||
'--no-clipboard': Boolean,
|
||||
'--target': String,
|
||||
'--confirm': Boolean,
|
||||
'-c': '--confirm',
|
||||
});
|
||||
try {
|
||||
argv = getArgs(client.argv.slice(2), argOptions);
|
||||
|
||||
if ('--confirm' in argv) {
|
||||
output.warn('`--confirm` is deprecated, please use `--yes` instead');
|
||||
@@ -118,7 +111,7 @@ export default async (client: Client): Promise<number> => {
|
||||
}
|
||||
|
||||
if (argv['--help']) {
|
||||
output.print(help());
|
||||
output.print(help(deployCommand, { columns: client.stderr.columns }));
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
229
packages/cli/src/commands/help.ts
Normal file
229
packages/cli/src/commands/help.ts
Normal file
@@ -0,0 +1,229 @@
|
||||
import chalk from 'chalk';
|
||||
import stripAnsi from 'strip-ansi';
|
||||
import { LOGO, NAME } from '@vercel-internals/constants';
|
||||
|
||||
const INDENT = ' '.repeat(2);
|
||||
const NEWLINE = '\n';
|
||||
|
||||
export interface CommandOption {
|
||||
name: string;
|
||||
shorthand: string | null;
|
||||
type: 'boolean' | 'string';
|
||||
argument?: string;
|
||||
deprecated: boolean;
|
||||
description?: string;
|
||||
multi: boolean;
|
||||
}
|
||||
export interface CommandArgument {
|
||||
name: string;
|
||||
required: boolean;
|
||||
}
|
||||
export interface CommandExample {
|
||||
name: string;
|
||||
value: string | string[];
|
||||
}
|
||||
export interface Command {
|
||||
name: string;
|
||||
description: string;
|
||||
arguments: CommandArgument[];
|
||||
options: CommandOption[];
|
||||
examples: CommandExample[];
|
||||
}
|
||||
|
||||
export function calcLineLength(line: string[]) {
|
||||
return stripAnsi(lineToString(line)).length;
|
||||
}
|
||||
|
||||
// Insert spaces in between non-whitespace items only
|
||||
export function lineToString(line: string[]) {
|
||||
let string = '';
|
||||
for (let i = 0; i < line.length; i++) {
|
||||
if (i === line.length - 1) {
|
||||
string += line[i];
|
||||
} else {
|
||||
const curr = line[i];
|
||||
const next = line[i + 1];
|
||||
string += curr;
|
||||
if (curr.trim() !== '' && next.trim() !== '') {
|
||||
string += ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
||||
export function outputArrayToString(outputArray: string[]) {
|
||||
return outputArray.join(NEWLINE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Example: `▲ vercel deploy [path] [options]`
|
||||
* @param command
|
||||
* @returns
|
||||
*/
|
||||
export function buildCommandSynopsisLine(command: Command) {
|
||||
const line: string[] = [LOGO, chalk.bold(NAME), chalk.bold(command.name)];
|
||||
if (command.arguments.length > 0) {
|
||||
for (const argument of command.arguments) {
|
||||
line.push(argument.required ? argument.name : `[${argument.name}]`);
|
||||
}
|
||||
}
|
||||
if (command.options.length > 0) {
|
||||
line.push('[options]');
|
||||
}
|
||||
return lineToString(line);
|
||||
}
|
||||
|
||||
export function buildCommandOptionLines(
|
||||
command: Command,
|
||||
options: BuildHelpOutputOptions
|
||||
) {
|
||||
// Filter out deprecated and intentionally undocumented options
|
||||
command.options = command.options.filter(
|
||||
option => !option.deprecated && option.description !== undefined
|
||||
);
|
||||
|
||||
// Initialize output array with header and empty line
|
||||
const outputArray: string[] = [chalk.dim(`Options:`), ''];
|
||||
|
||||
// Start building option lines
|
||||
const optionLines: string[][] = [];
|
||||
// Sort command options alphabetically
|
||||
command.options.sort((a, b) =>
|
||||
a.name < b.name ? -1 : a.name > b.name ? 1 : 0
|
||||
);
|
||||
// Keep track of longest "start" of an option line to determine description spacing
|
||||
let maxLineStartLength = 0;
|
||||
// Iterate over options and create the "start" of each option (e.g. ` -b, --build-env <key=value>`)
|
||||
for (const option of command.options) {
|
||||
const startLine: string[] = [INDENT];
|
||||
if (option.shorthand) {
|
||||
startLine.push(`-${option.shorthand},`);
|
||||
}
|
||||
startLine.push(`--${option.name}`);
|
||||
if (option.argument) {
|
||||
startLine.push(`<${option.argument}>`);
|
||||
}
|
||||
// the length includes the INDENT
|
||||
const lineLength = calcLineLength(startLine);
|
||||
maxLineStartLength = Math.max(lineLength, maxLineStartLength);
|
||||
optionLines.push(startLine);
|
||||
}
|
||||
/*
|
||||
* Iterate over in-progress option lines to add space-filler and description
|
||||
* For Example:
|
||||
* | --archive My description starts here.
|
||||
* |
|
||||
* | -b, --build-env <key=value> Start of description here then
|
||||
* | it wraps here.
|
||||
* |
|
||||
* | -e, --env <key=value> My description is short.
|
||||
*
|
||||
* Breaking down option lines:
|
||||
* | -b, --build-env <key=value> Start of description here then
|
||||
* |[][ ][][ ]
|
||||
* |↑ ↑ ↑ ↑
|
||||
* |1 2 3 4
|
||||
* | it wraps here.
|
||||
* |[][ ][ ]
|
||||
* |↑ ↑ ↑
|
||||
* |5 6 7
|
||||
* | 1, 5 = indent
|
||||
* | 2 = start
|
||||
* | 3, 6 = space-filler
|
||||
* | 4, 7 = description
|
||||
*/
|
||||
for (let i = 0; i < optionLines.length; i++) {
|
||||
const optionLine = optionLines[i];
|
||||
const option = command.options[i];
|
||||
// Add only 2 spaces to the longest line, and then make all shorter lines the same length.
|
||||
optionLine.push(
|
||||
' '.repeat(2 + (maxLineStartLength - calcLineLength(optionLine)))
|
||||
);
|
||||
|
||||
// Descriptions may be longer than max line length. Wrap them to the same column as the first description line
|
||||
const lines: string[][] = [optionLine];
|
||||
if (option.description) {
|
||||
for (const descriptionWord of option.description.split(' ')) {
|
||||
// insert a new line when the next word would match or exceed the maximum line length
|
||||
if (
|
||||
calcLineLength(lines[lines.length - 1]) +
|
||||
stripAnsi(descriptionWord).length >=
|
||||
options.columns
|
||||
) {
|
||||
// initialize the new line with the necessary whitespace. The INDENT is apart of `maxLineStartLength`
|
||||
lines.push([' '.repeat(maxLineStartLength + 2)]);
|
||||
}
|
||||
// insert the word to the current last line
|
||||
lines[lines.length - 1].push(descriptionWord);
|
||||
}
|
||||
}
|
||||
// for every line, transform into a string and push it to the output
|
||||
for (const line of lines) {
|
||||
outputArray.push(lineToString(line));
|
||||
}
|
||||
// add an empty line in between in each option block for readability (skip the last block)
|
||||
if (i !== optionLines.length - 1) outputArray.push('');
|
||||
}
|
||||
|
||||
// return the entire list of options as a single string after delete the last '\n' added to the option list
|
||||
return outputArrayToString(outputArray);
|
||||
}
|
||||
|
||||
export function buildCommandExampleLines(command: Command) {
|
||||
const outputArray: string[] = [chalk.dim(`Examples:`), ''];
|
||||
for (const example of command.examples) {
|
||||
const nameLine: string[] = [INDENT];
|
||||
nameLine.push(chalk.gray('-'));
|
||||
nameLine.push(example.name);
|
||||
outputArray.push(lineToString(nameLine));
|
||||
outputArray.push('');
|
||||
const buildValueLine = (value: string) => {
|
||||
return lineToString([INDENT, INDENT, chalk.cyan(`$ ${value}`)]);
|
||||
};
|
||||
if (Array.isArray(example.value)) {
|
||||
for (const line of example.value) {
|
||||
outputArray.push(buildValueLine(line));
|
||||
}
|
||||
} else {
|
||||
outputArray.push(buildValueLine(example.value));
|
||||
}
|
||||
outputArray.push('');
|
||||
}
|
||||
// delete the last newline added after examples iteration
|
||||
outputArray.splice(-1);
|
||||
|
||||
return outputArrayToString(outputArray);
|
||||
}
|
||||
|
||||
interface BuildHelpOutputOptions {
|
||||
columns: number;
|
||||
}
|
||||
|
||||
export function buildHelpOutput(
|
||||
command: Command,
|
||||
options: BuildHelpOutputOptions
|
||||
) {
|
||||
const outputArray: string[] = [
|
||||
buildCommandSynopsisLine(command),
|
||||
'',
|
||||
command.description,
|
||||
'',
|
||||
buildCommandOptionLines(command, options),
|
||||
'',
|
||||
buildCommandExampleLines(command),
|
||||
'',
|
||||
];
|
||||
|
||||
return outputArrayToString(outputArray);
|
||||
}
|
||||
|
||||
export interface HelpOptions {
|
||||
columns?: number;
|
||||
}
|
||||
|
||||
export function help(command: Command, options: HelpOptions) {
|
||||
return buildHelpOutput(command, {
|
||||
columns: options.columns ?? 80,
|
||||
});
|
||||
}
|
||||
@@ -97,7 +97,7 @@ export default async function main(client: Client) {
|
||||
client.output.warn(
|
||||
`The ${cmd('--repo')} flag is in alpha, please report issues`
|
||||
);
|
||||
await ensureRepoLink(client, cwd, yes);
|
||||
await ensureRepoLink(client, cwd, { yes, overwrite: true });
|
||||
} else {
|
||||
const link = await ensureLink('link', client, cwd, {
|
||||
autoConfirm: yes,
|
||||
|
||||
@@ -108,7 +108,7 @@ export default async (client: Client): Promise<number> => {
|
||||
action: 'redeploy',
|
||||
},
|
||||
name: fromDeployment.name,
|
||||
target: fromDeployment.target || 'production',
|
||||
target: fromDeployment.target,
|
||||
},
|
||||
method: 'POST',
|
||||
});
|
||||
|
||||
@@ -18,7 +18,6 @@ import type {
|
||||
JSONObject,
|
||||
Stdio,
|
||||
ReadableTTY,
|
||||
WritableTTY,
|
||||
PaginationOptions,
|
||||
} from '@vercel-internals/types';
|
||||
import { sharedPromise } from './promise';
|
||||
@@ -26,6 +25,7 @@ import { APIError } from './errors-ts';
|
||||
import { normalizeError } from '@vercel/error-utils';
|
||||
import type { Agent } from 'http';
|
||||
import sleep from './sleep';
|
||||
import type * as tty from 'tty';
|
||||
|
||||
const isSAMLError = (v: any): v is SAMLError => {
|
||||
return v && v.saml;
|
||||
@@ -59,8 +59,8 @@ export default class Client extends EventEmitter implements Stdio {
|
||||
apiUrl: string;
|
||||
authConfig: AuthConfig;
|
||||
stdin: ReadableTTY;
|
||||
stdout: WritableTTY;
|
||||
stderr: WritableTTY;
|
||||
stdout: tty.WriteStream;
|
||||
stderr: tty.WriteStream;
|
||||
output: Output;
|
||||
config: GlobalConfig;
|
||||
agent?: Agent;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { basename } from 'path';
|
||||
import { VercelConfig } from '@vercel/client';
|
||||
|
||||
export interface GetProjectNameOptions {
|
||||
argv: { '--name'?: string };
|
||||
argv: { [k: string]: string | undefined };
|
||||
nowConfig?: VercelConfig;
|
||||
paths?: string[];
|
||||
}
|
||||
|
||||
5
packages/cli/src/util/git/repo-info-to-url.ts
Normal file
5
packages/cli/src/util/git/repo-info-to-url.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { RepoInfo } from './connect-git-provider';
|
||||
|
||||
export function repoInfoToUrl(info: RepoInfo): string {
|
||||
return `https://${info.provider}.com/${info.org}/${info.repo}`;
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
import chalk from 'chalk';
|
||||
import inquirer from 'inquirer';
|
||||
import pluralize from 'pluralize';
|
||||
import { homedir } from 'os';
|
||||
import { join, normalize } from 'path';
|
||||
import slugify from '@sindresorhus/slugify';
|
||||
import { basename, join, normalize } from 'path';
|
||||
import { normalizePath, traverseUpDirectories } from '@vercel/build-utils';
|
||||
import { lstat, readJSON, outputJSON } from 'fs-extra';
|
||||
import confirm from '../input/confirm';
|
||||
@@ -14,6 +16,10 @@ import selectOrg from '../input/select-org';
|
||||
import { addToGitIgnore } from './add-to-gitignore';
|
||||
import type Client from '../client';
|
||||
import type { Project } from '@vercel-internals/types';
|
||||
import createProject from '../projects/create-project';
|
||||
import { detectProjects } from '../projects/detect-projects';
|
||||
import { repoInfoToUrl } from '../git/repo-info-to-url';
|
||||
import { connectGitProvider, parseRepoUrl } from '../git/connect-git-provider';
|
||||
|
||||
const home = homedir();
|
||||
|
||||
@@ -35,6 +41,11 @@ export interface RepoLink {
|
||||
repoConfig?: RepoProjectsConfig;
|
||||
}
|
||||
|
||||
export interface EnsureRepoLinkOptions {
|
||||
yes: boolean;
|
||||
overwrite: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a directory path `cwd`, finds the root of the Git repository
|
||||
* and returns the parsed `.vercel/repo.json` file if the repository
|
||||
@@ -62,7 +73,7 @@ export async function getRepoLink(
|
||||
export async function ensureRepoLink(
|
||||
client: Client,
|
||||
cwd: string,
|
||||
yes = false
|
||||
{ yes, overwrite }: EnsureRepoLinkOptions
|
||||
): Promise<RepoLink | undefined> {
|
||||
const { output } = client;
|
||||
|
||||
@@ -74,7 +85,14 @@ export async function ensureRepoLink(
|
||||
}
|
||||
let { rootPath, repoConfig, repoConfigPath } = repoLink;
|
||||
|
||||
if (!repoConfig) {
|
||||
if (overwrite || !repoConfig) {
|
||||
// Detect the projects on the filesystem out of band, so that
|
||||
// they will be ready by the time the projects are listed
|
||||
const detectedProjectsPromise = detectProjects(rootPath).catch(err => {
|
||||
output.debug(`Failed to detect local projects: ${err}`);
|
||||
return new Map<string, string>();
|
||||
});
|
||||
|
||||
// Not yet linked, so prompt user to begin linking
|
||||
let shouldLink =
|
||||
yes ||
|
||||
@@ -111,41 +129,36 @@ export async function ensureRepoLink(
|
||||
remoteName = remoteNames[0];
|
||||
} else {
|
||||
// Prompt user to select which remote to use
|
||||
const originIndex = remoteNames.indexOf('origin');
|
||||
const answer = await client.prompt({
|
||||
type: 'list',
|
||||
name: 'value',
|
||||
message: 'Which Git remote should be used?',
|
||||
choices: remoteNames.map(name => {
|
||||
choices: remoteNames.sort().map(name => {
|
||||
return { name: name, value: name };
|
||||
}),
|
||||
default: originIndex === -1 ? 0 : originIndex,
|
||||
default: remoteNames.includes('origin') ? 'origin' : undefined,
|
||||
});
|
||||
remoteName = answer.value;
|
||||
}
|
||||
const repoUrl = remoteUrls[remoteName];
|
||||
const parsedRepoUrl = parseRepoUrl(repoUrl);
|
||||
if (!parsedRepoUrl) {
|
||||
throw new Error(`Failed to parse Git URL: ${repoUrl}`);
|
||||
}
|
||||
const repoUrlLink = output.link(repoUrl, repoInfoToUrl(parsedRepoUrl), {
|
||||
fallback: () => link(repoUrl),
|
||||
});
|
||||
output.spinner(
|
||||
`Fetching Projects for ${link(repoUrl)} under ${chalk.bold(org.slug)}…`
|
||||
`Fetching Projects for ${repoUrlLink} under ${chalk.bold(org.slug)}…`
|
||||
);
|
||||
let projects: Project[] = [];
|
||||
const query = new URLSearchParams({ repoUrl });
|
||||
const projectsIterator = client.fetchPaginated<{
|
||||
projects: Project[];
|
||||
}>(`/v9/projects?${query}`);
|
||||
let printedFound = false;
|
||||
const detectedProjects = await detectedProjectsPromise;
|
||||
for await (const chunk of projectsIterator) {
|
||||
projects = projects.concat(chunk.projects);
|
||||
if (!printedFound && projects.length > 0) {
|
||||
output.log(
|
||||
`${pluralize('Project', chunk.projects.length)} linked to ${link(
|
||||
repoUrl
|
||||
)} under ${chalk.bold(org.slug)}:`
|
||||
);
|
||||
printedFound = true;
|
||||
}
|
||||
for (const project of chunk.projects) {
|
||||
output.print(` * ${chalk.cyan(`${org.slug}/${project.name}\n`)}`);
|
||||
}
|
||||
if (chunk.pagination.next) {
|
||||
output.spinner(`Found ${chalk.bold(projects.length)} Projects…`, 0);
|
||||
}
|
||||
@@ -153,36 +166,111 @@ export async function ensureRepoLink(
|
||||
|
||||
if (projects.length === 0) {
|
||||
output.log(
|
||||
`No Projects are linked to ${link(repoUrl)} under ${chalk.bold(
|
||||
`No Projects are linked to ${repoUrlLink} under ${chalk.bold(
|
||||
org.slug
|
||||
)}.`
|
||||
);
|
||||
// TODO: run detection logic to find potential projects.
|
||||
// then prompt user to select valid projects.
|
||||
// then create new Projects
|
||||
} else {
|
||||
output.log(
|
||||
`Found ${pluralize(
|
||||
'Project',
|
||||
projects.length,
|
||||
true
|
||||
)} linked to ${repoUrlLink} under ${chalk.bold(org.slug)}`
|
||||
);
|
||||
}
|
||||
|
||||
shouldLink =
|
||||
yes ||
|
||||
(await confirm(
|
||||
client,
|
||||
`Link to ${
|
||||
projects.length === 1
|
||||
? 'this Project'
|
||||
: `these ${chalk.bold(projects.length)} Projects`
|
||||
}?`,
|
||||
true
|
||||
));
|
||||
// For any projects that already exists on Vercel, remove them from the
|
||||
// locally detected directories. Any remaining ones will be prompted to
|
||||
// create new Projects for.
|
||||
for (const project of projects) {
|
||||
detectedProjects.delete(project.rootDirectory ?? '');
|
||||
}
|
||||
|
||||
if (!shouldLink) {
|
||||
output.print(`Canceled. Repository not linked.\n`);
|
||||
if (detectedProjects.size > 0) {
|
||||
output.log(
|
||||
`Detected ${pluralize(
|
||||
'new Project',
|
||||
detectedProjects.size,
|
||||
true
|
||||
)} that may be created.`
|
||||
);
|
||||
}
|
||||
|
||||
const addSeparators = projects.length > 0 && detectedProjects.size > 0;
|
||||
const { selected } = await client.prompt({
|
||||
type: 'checkbox',
|
||||
name: 'selected',
|
||||
message: `Which Projects should be ${
|
||||
projects.length ? 'linked to' : 'created'
|
||||
}?`,
|
||||
choices: [
|
||||
...(addSeparators
|
||||
? [new inquirer.Separator('----- Existing Projects -----')]
|
||||
: []),
|
||||
...projects.map(project => {
|
||||
return {
|
||||
name: `${org.slug}/${project.name}`,
|
||||
value: project,
|
||||
checked: true,
|
||||
};
|
||||
}),
|
||||
...(addSeparators
|
||||
? [new inquirer.Separator('----- New Projects to be created -----')]
|
||||
: []),
|
||||
...Array.from(detectedProjects.entries()).map(
|
||||
([rootDirectory, framework]) => {
|
||||
const name = slugify(
|
||||
[basename(rootPath), basename(rootDirectory)]
|
||||
.filter(Boolean)
|
||||
.join('-')
|
||||
);
|
||||
return {
|
||||
name: `${org.slug}/${name} (${framework})`,
|
||||
value: {
|
||||
newProject: true,
|
||||
rootDirectory,
|
||||
name,
|
||||
framework,
|
||||
},
|
||||
};
|
||||
}
|
||||
),
|
||||
],
|
||||
});
|
||||
|
||||
if (selected.length === 0) {
|
||||
output.print(`No Projects were selected. Repository not linked.\n`);
|
||||
return;
|
||||
}
|
||||
|
||||
for (let i = 0; i < selected.length; i++) {
|
||||
const selection = selected[i];
|
||||
if (!selection.newProject) continue;
|
||||
const orgAndName = `${org.slug}/${selection.name}`;
|
||||
output.spinner(`Creating new Project: ${orgAndName}`);
|
||||
delete selection.newProject;
|
||||
if (!selection.rootDirectory) delete selection.rootDirectory;
|
||||
selected[i] = await createProject(client, selection);
|
||||
await connectGitProvider(
|
||||
client,
|
||||
org,
|
||||
selected[i].id,
|
||||
parsedRepoUrl.provider,
|
||||
`${parsedRepoUrl.org}/${parsedRepoUrl.repo}`
|
||||
);
|
||||
output.log(
|
||||
`Created new Project: ${output.link(
|
||||
orgAndName,
|
||||
`https://vercel.com/${orgAndName}`
|
||||
)}`
|
||||
);
|
||||
}
|
||||
|
||||
repoConfig = {
|
||||
orgId: org.id,
|
||||
remoteName,
|
||||
projects: projects.map(project => {
|
||||
projects: selected.map((project: Project) => {
|
||||
return {
|
||||
id: project.id,
|
||||
name: project.name,
|
||||
@@ -199,7 +287,7 @@ export async function ensureRepoLink(
|
||||
|
||||
output.print(
|
||||
prependEmoji(
|
||||
`Linked to ${link(repoUrl)} under ${chalk.bold(
|
||||
`Linked to ${repoUrlLink} under ${chalk.bold(
|
||||
org.slug
|
||||
)} (created ${VERCEL_DIR}${
|
||||
isGitIgnoreUpdated ? ' and added it to .gitignore' : ''
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
VERCEL_DIR_PROJECT,
|
||||
} from '../projects/link';
|
||||
import createProject from '../projects/create-project';
|
||||
import updateProject from '../projects/update-project';
|
||||
import Client from '../client';
|
||||
import handleError from '../handle-error';
|
||||
import confirm from '../input/confirm';
|
||||
@@ -245,10 +244,10 @@ export default async function setupAndLink(
|
||||
settings.rootDirectory = rootDirectory;
|
||||
}
|
||||
|
||||
const project = await createProject(client, newProjectName);
|
||||
|
||||
await updateProject(client, project.id, settings);
|
||||
Object.assign(project, settings);
|
||||
const project = await createProject(client, {
|
||||
...settings,
|
||||
name: newProjectName,
|
||||
});
|
||||
|
||||
await linkFolderToProject(
|
||||
client,
|
||||
|
||||
@@ -3,9 +3,9 @@ import * as ansiEscapes from 'ansi-escapes';
|
||||
import { supportsHyperlink as detectSupportsHyperlink } from 'supports-hyperlinks';
|
||||
import renderLink from './link';
|
||||
import wait, { StopSpinner } from './wait';
|
||||
import type { WritableTTY } from '@vercel-internals/types';
|
||||
import { errorToString } from '@vercel/error-utils';
|
||||
import { removeEmoji } from '../emoji';
|
||||
import type * as tty from 'tty';
|
||||
|
||||
const IS_TEST = process.env.NODE_ENV === 'test';
|
||||
|
||||
@@ -24,7 +24,7 @@ interface LinkOptions {
|
||||
}
|
||||
|
||||
export class Output {
|
||||
stream: WritableTTY;
|
||||
stream: tty.WriteStream;
|
||||
debugEnabled: boolean;
|
||||
supportsHyperlink: boolean;
|
||||
colorDisabled: boolean;
|
||||
@@ -32,7 +32,7 @@ export class Output {
|
||||
private _spinner: StopSpinner | null;
|
||||
|
||||
constructor(
|
||||
stream: WritableTTY,
|
||||
stream: tty.WriteStream,
|
||||
{
|
||||
debug: debugEnabled = false,
|
||||
supportsHyperlink = detectSupportsHyperlink(stream),
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import Client from '../client';
|
||||
import type { Project } from '@vercel-internals/types';
|
||||
import type { Project, ProjectSettings } from '@vercel-internals/types';
|
||||
|
||||
export default async function createProject(
|
||||
client: Client,
|
||||
projectName: string
|
||||
settings: ProjectSettings & { name: string }
|
||||
) {
|
||||
const project = await client.fetch<Project>('/v1/projects', {
|
||||
method: 'POST',
|
||||
body: { name: projectName },
|
||||
body: { ...settings },
|
||||
});
|
||||
return project;
|
||||
}
|
||||
|
||||
38
packages/cli/src/util/projects/detect-projects.ts
Normal file
38
packages/cli/src/util/projects/detect-projects.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { join } from 'path';
|
||||
import frameworks from '@vercel/frameworks';
|
||||
import {
|
||||
detectFramework,
|
||||
getWorkspacePackagePaths,
|
||||
getWorkspaces,
|
||||
LocalFileSystemDetector,
|
||||
} from '@vercel/fs-detectors';
|
||||
|
||||
export async function detectProjects(cwd: string) {
|
||||
const fs = new LocalFileSystemDetector(cwd);
|
||||
const workspaces = await getWorkspaces({ fs });
|
||||
const detectedProjects = new Map<string, string>();
|
||||
const packagePaths = (
|
||||
await Promise.all(
|
||||
workspaces.map(workspace =>
|
||||
getWorkspacePackagePaths({
|
||||
fs,
|
||||
workspace,
|
||||
})
|
||||
)
|
||||
)
|
||||
).flat();
|
||||
if (packagePaths.length === 0) {
|
||||
packagePaths.push('/');
|
||||
}
|
||||
await Promise.all(
|
||||
packagePaths.map(async p => {
|
||||
const framework = await detectFramework({
|
||||
fs: fs.chdir(join('.', p)),
|
||||
frameworkList: frameworks,
|
||||
});
|
||||
if (!framework) return;
|
||||
detectedProjects.set(p.slice(1), framework);
|
||||
})
|
||||
);
|
||||
return detectedProjects;
|
||||
}
|
||||
@@ -1,26 +1,16 @@
|
||||
import Client from '../client';
|
||||
import type { JSONObject, ProjectSettings } from '@vercel-internals/types';
|
||||
|
||||
interface ProjectSettingsResponse extends ProjectSettings {
|
||||
id: string;
|
||||
name: string;
|
||||
updatedAt: number;
|
||||
createdAt: number;
|
||||
}
|
||||
import type { Project, ProjectSettings } from '@vercel-internals/types';
|
||||
|
||||
export default async function updateProject(
|
||||
client: Client,
|
||||
prjNameOrId: string,
|
||||
settings: ProjectSettings
|
||||
) {
|
||||
// `ProjectSettings` is technically compatible with JSONObject
|
||||
const body = settings as JSONObject;
|
||||
|
||||
const res = await client.fetch<ProjectSettingsResponse>(
|
||||
const res = await client.fetch<Project>(
|
||||
`/v2/projects/${encodeURIComponent(prjNameOrId)}`,
|
||||
{
|
||||
method: 'PATCH',
|
||||
body,
|
||||
body: { ...settings },
|
||||
}
|
||||
);
|
||||
return res;
|
||||
|
||||
244
packages/cli/test/unit/commands/__snapshots__/help.test.ts.snap
Normal file
244
packages/cli/test/unit/commands/__snapshots__/help.test.ts.snap
Normal file
@@ -0,0 +1,244 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`help command help output snapshots column width 40 1`] = `
|
||||
"▲ [1mvercel[22m [1mdeploy[22m [project-path] [options]
|
||||
|
||||
Deploy your project to Vercel. The \`deploy\` command is the default command for the Vercel CLI, and can be omitted (\`vc deploy my-app\` equals \`vc my-app\`).
|
||||
|
||||
[2mOptions:[22m
|
||||
|
||||
--archive Compress
|
||||
the
|
||||
deployment
|
||||
code into
|
||||
a file
|
||||
before
|
||||
uploading
|
||||
it
|
||||
|
||||
-b, --build-env <key=value> Specify
|
||||
environment
|
||||
variables
|
||||
during
|
||||
build-time
|
||||
(e.g. \`-b
|
||||
KEY1=value1
|
||||
-b
|
||||
KEY2=value2\`)
|
||||
|
||||
-e, --env <key=value> Specify
|
||||
environment
|
||||
variables
|
||||
during
|
||||
run-time
|
||||
(e.g. \`-e
|
||||
KEY1=value1
|
||||
-e
|
||||
KEY2=value2\`)
|
||||
|
||||
-f, --force Force a
|
||||
new
|
||||
deployment
|
||||
even if
|
||||
nothing
|
||||
has
|
||||
changed
|
||||
|
||||
-m, --meta <key=value> Specify
|
||||
metadata
|
||||
for the
|
||||
deployment
|
||||
(e.g. \`-m
|
||||
KEY1=value1
|
||||
-m
|
||||
KEY2=value2\`)
|
||||
|
||||
--no-wait Don't
|
||||
wait for
|
||||
the
|
||||
deployment
|
||||
to finish
|
||||
|
||||
--prebuilt Use in
|
||||
combination
|
||||
with \`vc
|
||||
build\`.
|
||||
Deploy an
|
||||
existing
|
||||
build
|
||||
|
||||
--prod Create a
|
||||
production
|
||||
deployment
|
||||
|
||||
-p, --public
|
||||
Deployment
|
||||
is public
|
||||
(\`/_src\`)
|
||||
is
|
||||
exposed)
|
||||
|
||||
--regions Set
|
||||
default
|
||||
regions
|
||||
to enable
|
||||
the
|
||||
deployment
|
||||
on
|
||||
|
||||
--with-cache Retain
|
||||
build
|
||||
cache
|
||||
when
|
||||
using
|
||||
"--force"
|
||||
|
||||
-y, --yes Use
|
||||
default
|
||||
options
|
||||
to skip
|
||||
all
|
||||
prompts
|
||||
|
||||
[2mExamples:[22m
|
||||
|
||||
[90m-[39m Deploy the current directory
|
||||
|
||||
[36m$ vercel[39m
|
||||
|
||||
[90m-[39m Deploy a custom path
|
||||
|
||||
[36m$ vercel /usr/src/project[39m
|
||||
|
||||
[90m-[39m Deploy with run-time Environment Variables
|
||||
|
||||
[36m$ vercel -e NODE_ENV=production[39m
|
||||
|
||||
[90m-[39m Deploy with prebuilt outputs
|
||||
|
||||
[36m$ vercel build[39m
|
||||
[36m$ vercel deploy --prebuilt[39m
|
||||
|
||||
[90m-[39m Write Deployment URL to a file
|
||||
|
||||
[36m$ vercel > deployment-url.txt[39m
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`help command help output snapshots column width 80 1`] = `
|
||||
"▲ [1mvercel[22m [1mdeploy[22m [project-path] [options]
|
||||
|
||||
Deploy your project to Vercel. The \`deploy\` command is the default command for the Vercel CLI, and can be omitted (\`vc deploy my-app\` equals \`vc my-app\`).
|
||||
|
||||
[2mOptions:[22m
|
||||
|
||||
--archive Compress the deployment code into a file before
|
||||
uploading it
|
||||
|
||||
-b, --build-env <key=value> Specify environment variables during build-time
|
||||
(e.g. \`-b KEY1=value1 -b KEY2=value2\`)
|
||||
|
||||
-e, --env <key=value> Specify environment variables during run-time
|
||||
(e.g. \`-e KEY1=value1 -e KEY2=value2\`)
|
||||
|
||||
-f, --force Force a new deployment even if nothing has
|
||||
changed
|
||||
|
||||
-m, --meta <key=value> Specify metadata for the deployment (e.g. \`-m
|
||||
KEY1=value1 -m KEY2=value2\`)
|
||||
|
||||
--no-wait Don't wait for the deployment to finish
|
||||
|
||||
--prebuilt Use in combination with \`vc build\`. Deploy an
|
||||
existing build
|
||||
|
||||
--prod Create a production deployment
|
||||
|
||||
-p, --public Deployment is public (\`/_src\`) is exposed)
|
||||
|
||||
--regions Set default regions to enable the deployment on
|
||||
|
||||
--with-cache Retain build cache when using "--force"
|
||||
|
||||
-y, --yes Use default options to skip all prompts
|
||||
|
||||
[2mExamples:[22m
|
||||
|
||||
[90m-[39m Deploy the current directory
|
||||
|
||||
[36m$ vercel[39m
|
||||
|
||||
[90m-[39m Deploy a custom path
|
||||
|
||||
[36m$ vercel /usr/src/project[39m
|
||||
|
||||
[90m-[39m Deploy with run-time Environment Variables
|
||||
|
||||
[36m$ vercel -e NODE_ENV=production[39m
|
||||
|
||||
[90m-[39m Deploy with prebuilt outputs
|
||||
|
||||
[36m$ vercel build[39m
|
||||
[36m$ vercel deploy --prebuilt[39m
|
||||
|
||||
[90m-[39m Write Deployment URL to a file
|
||||
|
||||
[36m$ vercel > deployment-url.txt[39m
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`help command help output snapshots column width 120 1`] = `
|
||||
"▲ [1mvercel[22m [1mdeploy[22m [project-path] [options]
|
||||
|
||||
Deploy your project to Vercel. The \`deploy\` command is the default command for the Vercel CLI, and can be omitted (\`vc deploy my-app\` equals \`vc my-app\`).
|
||||
|
||||
[2mOptions:[22m
|
||||
|
||||
--archive Compress the deployment code into a file before uploading it
|
||||
|
||||
-b, --build-env <key=value> Specify environment variables during build-time (e.g. \`-b KEY1=value1 -b KEY2=value2\`)
|
||||
|
||||
-e, --env <key=value> Specify environment variables during run-time (e.g. \`-e KEY1=value1 -e KEY2=value2\`)
|
||||
|
||||
-f, --force Force a new deployment even if nothing has changed
|
||||
|
||||
-m, --meta <key=value> Specify metadata for the deployment (e.g. \`-m KEY1=value1 -m KEY2=value2\`)
|
||||
|
||||
--no-wait Don't wait for the deployment to finish
|
||||
|
||||
--prebuilt Use in combination with \`vc build\`. Deploy an existing build
|
||||
|
||||
--prod Create a production deployment
|
||||
|
||||
-p, --public Deployment is public (\`/_src\`) is exposed)
|
||||
|
||||
--regions Set default regions to enable the deployment on
|
||||
|
||||
--with-cache Retain build cache when using "--force"
|
||||
|
||||
-y, --yes Use default options to skip all prompts
|
||||
|
||||
[2mExamples:[22m
|
||||
|
||||
[90m-[39m Deploy the current directory
|
||||
|
||||
[36m$ vercel[39m
|
||||
|
||||
[90m-[39m Deploy a custom path
|
||||
|
||||
[36m$ vercel /usr/src/project[39m
|
||||
|
||||
[90m-[39m Deploy with run-time Environment Variables
|
||||
|
||||
[36m$ vercel -e NODE_ENV=production[39m
|
||||
|
||||
[90m-[39m Deploy with prebuilt outputs
|
||||
|
||||
[36m$ vercel build[39m
|
||||
[36m$ vercel deploy --prebuilt[39m
|
||||
|
||||
[90m-[39m Write Deployment URL to a file
|
||||
|
||||
[36m$ vercel > deployment-url.txt[39m
|
||||
"
|
||||
`;
|
||||
71
packages/cli/test/unit/commands/help.test.ts
Normal file
71
packages/cli/test/unit/commands/help.test.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
import {
|
||||
calcLineLength,
|
||||
help,
|
||||
lineToString,
|
||||
outputArrayToString,
|
||||
} from '../../../src/commands/help';
|
||||
import { deployCommand } from '../../../src/commands/deploy/command';
|
||||
|
||||
import chalk from 'chalk';
|
||||
|
||||
describe('help command', () => {
|
||||
describe('calcLineLength', () => {
|
||||
test.each([
|
||||
{
|
||||
name: 'without ansi',
|
||||
line: ['a line without ansi'],
|
||||
expectedLength: 19,
|
||||
},
|
||||
{
|
||||
name: 'with ansi',
|
||||
line: [`a line with ${chalk.red('ansi')}`],
|
||||
expectedLength: 16,
|
||||
},
|
||||
])(
|
||||
'should calculate the correct line length $name',
|
||||
({ line, expectedLength }) => {
|
||||
expect(calcLineLength(line)).toBe(expectedLength);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
describe('lineToString', () => {
|
||||
test.each([
|
||||
{
|
||||
line: ['a', 'b', 'c'],
|
||||
expected: 'a b c',
|
||||
},
|
||||
{
|
||||
line: [' ', 'a', ' ', 'b', ' ', 'c', ' '],
|
||||
expected: ' a b c ',
|
||||
},
|
||||
{
|
||||
line: [' ', ' ', ' '],
|
||||
expected: ' ',
|
||||
},
|
||||
{
|
||||
line: ['a', ' ', ' ', 'b', 'c'],
|
||||
expected: 'a b c',
|
||||
},
|
||||
])(
|
||||
'should insert spaces between non-whitespace items only; $line',
|
||||
({ line, expected }) => {
|
||||
expect(lineToString(line)).toBe(expected);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
describe('outputArrayToString', () => {
|
||||
test('should join a list of strings using newlines', () => {
|
||||
expect(outputArrayToString(['line 1', 'line 2', 'line 3'])).toBe(
|
||||
'line 1\nline 2\nline 3'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('help output snapshots', () => {
|
||||
test.each([40, 80, 120])('column width %i', width => {
|
||||
expect(help(deployCommand, { columns: width })).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -5,6 +5,7 @@ import { setupUnitFixture } from '../../helpers/setup-unit-fixture';
|
||||
import { useDeployment } from '../../mocks/deployment';
|
||||
import { useTeams } from '../../mocks/team';
|
||||
import { useUser } from '../../mocks/user';
|
||||
import { Deployment } from '@vercel-internals/types';
|
||||
|
||||
describe('redeploy', () => {
|
||||
it('should error if missing deployment url', async () => {
|
||||
@@ -77,9 +78,20 @@ describe('redeploy', () => {
|
||||
|
||||
await expect(exitCodePromise).resolves.toEqual(0);
|
||||
});
|
||||
|
||||
it('should redeploy to preview', async () => {
|
||||
const { fromDeployment } = initRedeployTest({ target: null });
|
||||
client.setArgv('rollback', fromDeployment.id);
|
||||
const exitCodePromise = redeploy(client);
|
||||
await expect(client.stderr).toOutput(
|
||||
`Fetching deployment "${fromDeployment.id}" in ${fromDeployment.creator?.username}`
|
||||
);
|
||||
await expect(client.stderr).toOutput('Preview');
|
||||
await expect(exitCodePromise).resolves.toEqual(0);
|
||||
});
|
||||
});
|
||||
|
||||
function initRedeployTest() {
|
||||
function initRedeployTest({ target }: { target?: Deployment['target'] } = {}) {
|
||||
setupUnitFixture('commands/redeploy/simple-static');
|
||||
const user = useUser();
|
||||
useTeams('team_dummy');
|
||||
@@ -88,8 +100,8 @@ function initRedeployTest() {
|
||||
id: 'vercel-redeploy',
|
||||
name: 'vercel-redeploy',
|
||||
});
|
||||
const fromDeployment = useDeployment({ creator: user });
|
||||
const toDeployment = useDeployment({ creator: user });
|
||||
const fromDeployment = useDeployment({ creator: user, target });
|
||||
const toDeployment = useDeployment({ creator: user, target });
|
||||
|
||||
client.scenario.post(`/v13/deployments`, (req, res) => {
|
||||
res.json(toDeployment);
|
||||
|
||||
34
packages/cli/test/unit/util/git/repo-info-to-url.test.ts
Normal file
34
packages/cli/test/unit/util/git/repo-info-to-url.test.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { repoInfoToUrl } from '../../../../src/util/git/repo-info-to-url';
|
||||
import type { RepoInfo } from '../../../../src/util/git/connect-git-provider';
|
||||
|
||||
describe('repoInfoToUrl()', () => {
|
||||
it('should support "github" URL', () => {
|
||||
const info: RepoInfo = {
|
||||
provider: 'github',
|
||||
org: 'vercel',
|
||||
repo: 'foo',
|
||||
url: 'git@github.com:vercel/foo.git',
|
||||
};
|
||||
expect(repoInfoToUrl(info)).toEqual('https://github.com/vercel/foo');
|
||||
});
|
||||
|
||||
it('should support "gitlab" URL', () => {
|
||||
const info: RepoInfo = {
|
||||
provider: 'gitlab',
|
||||
org: 'vercel',
|
||||
repo: 'foo',
|
||||
url: 'git@gitlab.com:vercel/foo.git',
|
||||
};
|
||||
expect(repoInfoToUrl(info)).toEqual('https://gitlab.com/vercel/foo');
|
||||
});
|
||||
|
||||
it('should support "bitbucket" URL', () => {
|
||||
const info: RepoInfo = {
|
||||
provider: 'bitbucket',
|
||||
org: 'vercel',
|
||||
repo: 'foo',
|
||||
url: 'git@bitbucket.com:vercel/foo.git',
|
||||
};
|
||||
expect(repoInfoToUrl(info)).toEqual('https://bitbucket.com/vercel/foo');
|
||||
});
|
||||
});
|
||||
30
packages/cli/test/unit/util/projects/detect-projects.test.ts
Normal file
30
packages/cli/test/unit/util/projects/detect-projects.test.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { join } from 'path';
|
||||
import { detectProjects } from '../../../../src/util/projects/detect-projects';
|
||||
|
||||
const REPO_ROOT = join(__dirname, '../../../../../..');
|
||||
const EXAMPLES_DIR = join(REPO_ROOT, 'examples');
|
||||
const FS_DETECTORS_FIXTURES = join(
|
||||
REPO_ROOT,
|
||||
'packages/fs-detectors/test/fixtures'
|
||||
);
|
||||
|
||||
describe('detectProjects()', () => {
|
||||
it('should match "nextjs" example', async () => {
|
||||
const dir = join(EXAMPLES_DIR, 'nextjs');
|
||||
const detected = await detectProjects(dir);
|
||||
expect([...detected.entries()]).toEqual([['', 'nextjs']]);
|
||||
});
|
||||
|
||||
it('should match "30-double-nested-workspaces"', async () => {
|
||||
const dir = join(FS_DETECTORS_FIXTURES, '30-double-nested-workspaces');
|
||||
const detected = await detectProjects(dir);
|
||||
expect(
|
||||
[...detected.entries()].sort((a, b) => a[0].localeCompare(b[0]))
|
||||
).toEqual([
|
||||
['packages/backend/c', 'remix'],
|
||||
['packages/backend/d', 'nextjs'],
|
||||
['packages/frontend/a', 'hexo'],
|
||||
['packages/frontend/b', 'ember'],
|
||||
]);
|
||||
});
|
||||
});
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/client
|
||||
|
||||
## 12.6.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`7021279b2`](https://github.com/vercel/vercel/commit/7021279b284f314a4d1bdbb4306b4c22291efa08)]:
|
||||
- @vercel/build-utils@6.8.1
|
||||
|
||||
## 12.6.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/client",
|
||||
"version": "12.6.3",
|
||||
"version": "12.6.4",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"homepage": "https://vercel.com",
|
||||
@@ -35,7 +35,7 @@
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/routing-utils": "2.2.1",
|
||||
"@zeit/fetch": "5.2.0",
|
||||
"async-retry": "1.2.3",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"@types/minimatch": "3.0.5",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "7.3.10",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"typescript": "4.9.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "backend-c30",
|
||||
"license": "MIT",
|
||||
"version": "0.1.0"
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "backend-d30",
|
||||
"license": "MIT",
|
||||
"version": "0.1.0",
|
||||
"devDependencies": {
|
||||
"next": "*",
|
||||
"once": "1.4.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "frontend-a30",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
@@ -10,6 +11,7 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.2"
|
||||
"debug": "^4.3.2",
|
||||
"hexo": "*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "frontend-b30",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
@@ -10,6 +11,7 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"cowsay": "^1.5.0"
|
||||
"cowsay": "^1.5.0",
|
||||
"ember-cli": "*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @vercel/gatsby-plugin-vercel-builder
|
||||
|
||||
## 1.3.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`7021279b2`](https://github.com/vercel/vercel/commit/7021279b284f314a4d1bdbb4306b4c22291efa08), [`5e5332fbc`](https://github.com/vercel/vercel/commit/5e5332fbc9317a8f3cc4ed0b72ec1a2c76020891)]:
|
||||
- @vercel/build-utils@6.8.1
|
||||
- @vercel/node@2.15.4
|
||||
|
||||
## 1.3.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/gatsby-plugin-vercel-builder",
|
||||
"version": "1.3.11",
|
||||
"version": "1.3.12",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
"dist",
|
||||
@@ -20,8 +20,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sinclair/typebox": "0.25.24",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/node": "2.15.3",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/node": "2.15.4",
|
||||
"@vercel/routing-utils": "2.2.1",
|
||||
"esbuild": "0.14.47",
|
||||
"etag": "1.8.1",
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"@types/node-fetch": "^2.3.0",
|
||||
"@types/tar": "^4.0.0",
|
||||
"@types/yauzl-promise": "2.1.0",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/ncc": "0.24.0",
|
||||
"async-retry": "1.3.1",
|
||||
"execa": "^1.0.0",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"devDependencies": {
|
||||
"@types/jest": "27.5.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/static-config": "2.0.17",
|
||||
"execa": "3.2.0",
|
||||
"fs-extra": "11.1.0",
|
||||
|
||||
3
packages/next/.gitignore
vendored
3
packages/next/.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
/dist
|
||||
test/builder-info.json
|
||||
test/builder-info.json
|
||||
test/fixtures/**/tmp-contents
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vercel/next
|
||||
|
||||
## 3.8.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [next] Ensure RSC paths handle basePath ([#10155](https://github.com/vercel/vercel/pull/10155))
|
||||
|
||||
## 3.8.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/next",
|
||||
"version": "3.8.7",
|
||||
"version": "3.8.8",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
||||
@@ -35,7 +35,7 @@
|
||||
"@types/semver": "6.0.0",
|
||||
"@types/text-table": "0.2.1",
|
||||
"@types/webpack-sources": "3.2.0",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/nft": "0.22.5",
|
||||
"@vercel/routing-utils": "2.2.1",
|
||||
"async-sema": "3.0.1",
|
||||
|
||||
@@ -1198,7 +1198,11 @@ export async function serverBuild({
|
||||
if (ogRoute.endsWith('/route')) {
|
||||
continue;
|
||||
}
|
||||
route = path.posix.join('./', route === '/' ? '/index' : route);
|
||||
route = path.posix.join(
|
||||
'./',
|
||||
entryDirectory,
|
||||
route === '/' ? '/index' : route
|
||||
);
|
||||
|
||||
if (lambdas[route]) {
|
||||
lambdas[`${route}.rsc`] = lambdas[route];
|
||||
|
||||
32
packages/next/test/fixtures/00-app-dir-base-path/index.test.js
vendored
Normal file
32
packages/next/test/fixtures/00-app-dir-base-path/index.test.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/* eslint-env jest */
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const { deployAndTest } = require('../../utils');
|
||||
|
||||
const ctx = {};
|
||||
|
||||
describe(`${__dirname.split(path.sep).pop()}`, () => {
|
||||
const fixtureDir = path.join(__dirname, 'tmp-contents');
|
||||
|
||||
afterAll(() => fs.remove(fixtureDir));
|
||||
|
||||
it('should deploy and pass probe checks', async () => {
|
||||
await fs.copy(path.join(__dirname, '../00-app-dir'), fixtureDir);
|
||||
const nextConfigPath = path.join(fixtureDir, 'next.config.js');
|
||||
|
||||
await fs.writeFile(
|
||||
nextConfigPath,
|
||||
(
|
||||
await fs.readFile(nextConfigPath, 'utf8')
|
||||
).replace('experimental:', 'basePath: "/hello/world",experimental:')
|
||||
);
|
||||
|
||||
await fs.copy(
|
||||
path.join(__dirname, 'vercel.json'),
|
||||
path.join(fixtureDir, 'vercel.json')
|
||||
);
|
||||
|
||||
const info = await deployAndTest(fixtureDir);
|
||||
Object.assign(ctx, info);
|
||||
});
|
||||
});
|
||||
198
packages/next/test/fixtures/00-app-dir-base-path/vercel.json
vendored
Normal file
198
packages/next/test/fixtures/00-app-dir-base-path/vercel.json
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
{
|
||||
"builds": [
|
||||
{
|
||||
"src": "package.json",
|
||||
"use": "@vercel/next",
|
||||
"config": {
|
||||
"functions": {
|
||||
"app/**/*": {
|
||||
"maxDuration": 5,
|
||||
"memory": 512
|
||||
},
|
||||
"pages/api/**/*": {
|
||||
"maxDuration": 5,
|
||||
"memory": 512
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"probes": [
|
||||
{
|
||||
"path": "/hello/world/dashboard/hello",
|
||||
"status": 200,
|
||||
"mustContain": "hello from app/dashboard/rootonly/hello"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dashboard/another-edge",
|
||||
"status": 200,
|
||||
"mustContain": "hello from newroot/dashboard/another"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dynamic/category-1/id-1",
|
||||
"status": 200,
|
||||
"headers": {
|
||||
"RSC": "1"
|
||||
},
|
||||
"mustContain": ":{",
|
||||
"mustNotContain": "<html"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/ssg",
|
||||
"status": 200,
|
||||
"mustContain": "hello from /ssg",
|
||||
"responseHeaders": {
|
||||
"vary": "RSC, Next-Router-State-Tree, Next-Router-Prefetch"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/ssg",
|
||||
"status": 200,
|
||||
"responseHeaders": {
|
||||
"vary": "RSC, Next-Router-State-Tree, Next-Router-Prefetch"
|
||||
},
|
||||
"headers": {
|
||||
"RSC": "1"
|
||||
},
|
||||
"mustContain": ":{",
|
||||
"mustNotContain": "<html"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/ssg?override=1",
|
||||
"status": 307,
|
||||
"responseHeaders": {
|
||||
"location": "/overridden/"
|
||||
},
|
||||
"fetchOptions": {
|
||||
"redirect": "manual"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/ssg?override=1",
|
||||
"status": 307,
|
||||
"responseHeaders": {
|
||||
"location": "/overridden/"
|
||||
},
|
||||
"fetchOptions": {
|
||||
"redirect": "manual"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dashboard/deployments/123/settings",
|
||||
"status": 200,
|
||||
"mustContain": "hello from app/dashboard/deployments/[id]/settings",
|
||||
"responseHeaders": {
|
||||
"vary": "RSC, Next-Router-State-Tree, Next-Router-Prefetch"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dashboard/deployments/123/settings",
|
||||
"status": 200,
|
||||
"responseHeaders": {
|
||||
"vary": "RSC, Next-Router-State-Tree, Next-Router-Prefetch"
|
||||
},
|
||||
"headers": {
|
||||
"RSC": "1"
|
||||
},
|
||||
"mustContain": ":{",
|
||||
"mustNotContain": "<html"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dashboard/deployments/catchall/something",
|
||||
"status": 200,
|
||||
"mustContain": "catchall",
|
||||
"responseHeaders": {
|
||||
"vary": "RSC, Next-Router-State-Tree, Next-Router-Prefetch"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dashboard/deployments/catchall/something",
|
||||
"status": 200,
|
||||
"responseHeaders": {
|
||||
"vary": "RSC, Next-Router-State-Tree, Next-Router-Prefetch"
|
||||
},
|
||||
"headers": {
|
||||
"RSC": "1"
|
||||
},
|
||||
"mustContain": ":{",
|
||||
"mustNotContain": "<html"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dashboard",
|
||||
"status": 200,
|
||||
"mustContain": "hello from app/dashboard",
|
||||
"responseHeaders": {
|
||||
"vary": "RSC, Next-Router-State-Tree, Next-Router-Prefetch"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dashboard",
|
||||
"status": 200,
|
||||
"headers": {
|
||||
"RSC": "1"
|
||||
},
|
||||
"mustContain": ":{",
|
||||
"mustNotContain": "<html"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dashboard",
|
||||
"status": 200,
|
||||
"headers": {
|
||||
"RSC": "1"
|
||||
},
|
||||
"responseHeaders": {
|
||||
"content-type": "text/x-component",
|
||||
"vary": "RSC, Next-Router-State-Tree, Next-Router-Prefetch"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dashboard/another",
|
||||
"status": 200,
|
||||
"mustContain": "hello from newroot/dashboard/another"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dashboard/deployments/123",
|
||||
"status": 200,
|
||||
"mustContain": "hello from app/dashboard/deployments/[id]. ID is: <!-- -->123"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/",
|
||||
"status": 200,
|
||||
"mustContain": "index app page"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/blog/123",
|
||||
"status": 200,
|
||||
"mustContain": "hello from pages/blog/[slug]"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/blog-ssr/123",
|
||||
"status": 200,
|
||||
"mustContain": "hello from pages/blog-ssr/[slug]"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/blog-ssr/321",
|
||||
"status": 200,
|
||||
"mustContain": "hello context"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dynamic/category-1/id-1",
|
||||
"status": 200,
|
||||
"mustContain": "{"category":"category-1","id":"id-1"}"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/dashboard/changelog",
|
||||
"status": 200,
|
||||
"mustContain": "hello from app/dashboard/changelog"
|
||||
},
|
||||
{
|
||||
"path": "/hello/world/",
|
||||
"status": 200,
|
||||
"headers": {
|
||||
"RSC": "1"
|
||||
},
|
||||
"mustContain": ":{",
|
||||
"mustNotContain": "<html"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
# @vercel/node
|
||||
|
||||
## 2.15.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [node] fix decompress mismatching ([#10184](https://github.com/vercel/vercel/pull/10184))
|
||||
|
||||
- Updated dependencies [[`7021279b2`](https://github.com/vercel/vercel/commit/7021279b284f314a4d1bdbb4306b4c22291efa08)]:
|
||||
- @vercel/build-utils@6.8.1
|
||||
|
||||
## 2.15.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/node",
|
||||
"version": "2.15.3",
|
||||
"version": "2.15.4",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
|
||||
@@ -24,7 +24,7 @@
|
||||
"@edge-runtime/vm": "3.0.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/node-fetch": "2.6.3",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/error-utils": "1.0.10",
|
||||
"@vercel/static-config": "2.0.17",
|
||||
"async-listen": "3.0.0",
|
||||
|
||||
@@ -7,6 +7,7 @@ import fetch from 'node-fetch';
|
||||
import { listen } from 'async-listen';
|
||||
import { isAbsolute } from 'path';
|
||||
import { pathToFileURL } from 'url';
|
||||
import zlib from 'zlib';
|
||||
import type { ServerResponse, IncomingMessage } from 'http';
|
||||
import type { VercelProxyResponse } from '../types.js';
|
||||
import type { VercelRequest, VercelResponse } from './helpers.js';
|
||||
@@ -34,6 +35,27 @@ const HTTP_METHODS = [
|
||||
'PATCH',
|
||||
];
|
||||
|
||||
function compress(body: Buffer, encoding: string): Buffer {
|
||||
switch (encoding) {
|
||||
case 'br':
|
||||
return zlib.brotliCompressSync(body, {
|
||||
params: {
|
||||
[zlib.constants.BROTLI_PARAM_QUALITY]: 0,
|
||||
},
|
||||
});
|
||||
case 'gzip':
|
||||
return zlib.gzipSync(body, {
|
||||
level: zlib.constants.Z_BEST_SPEED,
|
||||
});
|
||||
case 'deflate':
|
||||
return zlib.deflateSync(body, {
|
||||
level: zlib.constants.Z_BEST_SPEED,
|
||||
});
|
||||
default:
|
||||
throw new Error(`encoding '${encoding}' not supported`);
|
||||
}
|
||||
}
|
||||
|
||||
async function createServerlessServer(userCode: ServerlessFunctionSignature) {
|
||||
const server = createServer(userCode);
|
||||
exitHook(() => server.close());
|
||||
@@ -78,12 +100,14 @@ export async function createServerlessEventHandler(
|
||||
): Promise<(request: IncomingMessage) => Promise<VercelProxyResponse>> {
|
||||
const userCode = await compileUserCode(entrypointPath, options);
|
||||
const server = await createServerlessServer(userCode);
|
||||
const isStreaming = options.mode === 'streaming';
|
||||
|
||||
return async function (request: IncomingMessage) {
|
||||
const url = new URL(request.url ?? '/', server.url);
|
||||
// @ts-expect-error
|
||||
const response = await fetch(url, {
|
||||
body: await serializeBody(request),
|
||||
compress: isStreaming,
|
||||
headers: {
|
||||
...request.headers,
|
||||
host: request.headers['x-forwarded-host'],
|
||||
@@ -93,12 +117,22 @@ export async function createServerlessEventHandler(
|
||||
});
|
||||
|
||||
let body;
|
||||
if (options.mode === 'streaming') {
|
||||
if (isStreaming) {
|
||||
body = response.body;
|
||||
} else {
|
||||
body = await streamToBuffer(response.body);
|
||||
|
||||
const contentEncoding = response.headers.get('content-encoding');
|
||||
if (contentEncoding) {
|
||||
body = compress(body, contentEncoding);
|
||||
response.headers.set('content-length', Buffer.byteLength(body));
|
||||
}
|
||||
|
||||
/**
|
||||
* `transfer-encoding` is related to streaming chunks.
|
||||
* Since we are buffering the response.body, it should be stripped.
|
||||
*/
|
||||
response.headers.delete('transfer-encoding');
|
||||
response.headers.set('content-length', body.length);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
10
packages/node/test/dev-fixtures/serverless-fetch.js
Normal file
10
packages/node/test/dev-fixtures/serverless-fetch.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const baseUrl = ({ headers }) =>
|
||||
`${headers.get('x-forwarded-proto')}://${headers.get('x-forwarded-host')}`;
|
||||
|
||||
export function GET(request) {
|
||||
const { searchParams } = new URL(request.url, baseUrl(request));
|
||||
const url = searchParams.get('url');
|
||||
const encoding = searchParams.get('encoding');
|
||||
const serverUrl = `${url}?encoding=${encoding}`;
|
||||
return fetch(serverUrl);
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
import { forkDevServer, readMessage } from '../../src/fork-dev-server';
|
||||
import { resolve, extname } from 'path';
|
||||
import fetch from 'node-fetch';
|
||||
import { createServer } from 'http';
|
||||
import { listen } from 'async-listen';
|
||||
import zlib from 'zlib';
|
||||
|
||||
jest.setTimeout(20 * 1000);
|
||||
|
||||
@@ -29,7 +32,7 @@ function testForkDevServer(entrypoint: string) {
|
||||
(NODE_MAJOR < 18 ? test.skip : test)(
|
||||
'runs an serverless function that exports GET',
|
||||
async () => {
|
||||
const child = testForkDevServer('./serverless-web.js');
|
||||
const child = testForkDevServer('./serverless-response.js');
|
||||
try {
|
||||
const result = await readMessage(child);
|
||||
if (result.state !== 'message') {
|
||||
@@ -40,7 +43,7 @@ function testForkDevServer(entrypoint: string) {
|
||||
|
||||
{
|
||||
const response = await fetch(
|
||||
`http://${address}:${port}/api/serverless-web?name=Vercel`
|
||||
`http://${address}:${port}/api/serverless-response?name=Vercel`
|
||||
);
|
||||
expect({
|
||||
status: response.status,
|
||||
@@ -50,7 +53,7 @@ function testForkDevServer(entrypoint: string) {
|
||||
|
||||
{
|
||||
const response = await fetch(
|
||||
`http://${address}:${port}/api/serverless-web?name=Vercel`,
|
||||
`http://${address}:${port}/api/serverless-response?name=Vercel`,
|
||||
{ method: 'HEAD' }
|
||||
);
|
||||
expect({ status: response.status }).toEqual({ status: 405 });
|
||||
@@ -61,6 +64,90 @@ function testForkDevServer(entrypoint: string) {
|
||||
}
|
||||
);
|
||||
|
||||
(NODE_MAJOR < 18 ? test.skip : test)(
|
||||
'buffer fetch response correctly',
|
||||
async () => {
|
||||
const child = testForkDevServer('./serverless-fetch.js');
|
||||
|
||||
const server = createServer((req, res) => {
|
||||
res.setHeader('Content-Encoding', 'br');
|
||||
const searchParams = new URLSearchParams(req.url!.substring(1));
|
||||
const encoding = searchParams.get('encoding') ?? 'identity';
|
||||
res.writeHead(200, {
|
||||
'content-type': 'text/plain',
|
||||
'content-encoding': encoding,
|
||||
});
|
||||
let payload = Buffer.from('Greetings, Vercel');
|
||||
|
||||
if (encoding === 'br') {
|
||||
payload = zlib.brotliCompressSync(payload, {
|
||||
params: {
|
||||
[zlib.constants.BROTLI_PARAM_QUALITY]: 0,
|
||||
},
|
||||
});
|
||||
} else if (encoding === 'gzip') {
|
||||
payload = zlib.gzipSync(payload, {
|
||||
level: zlib.constants.Z_BEST_SPEED,
|
||||
});
|
||||
} else if (encoding === 'deflate') {
|
||||
payload = zlib.deflateSync(payload, {
|
||||
level: zlib.constants.Z_BEST_SPEED,
|
||||
});
|
||||
}
|
||||
|
||||
res.end(payload);
|
||||
});
|
||||
|
||||
const serverUrl = (await listen(server)).toString();
|
||||
|
||||
try {
|
||||
const result = await readMessage(child);
|
||||
if (result.state !== 'message') {
|
||||
throw new Error('Exited. error: ' + JSON.stringify(result.value));
|
||||
}
|
||||
|
||||
const { address, port } = result.value;
|
||||
|
||||
{
|
||||
const response = await fetch(
|
||||
`http://${address}:${port}/api/serverless-fetch?url=${serverUrl}&encoding=br`
|
||||
);
|
||||
expect(response.headers.get('content-encoding')).toBe('br');
|
||||
expect(response.headers.get('content-length')).toBe('21');
|
||||
expect({
|
||||
status: response.status,
|
||||
body: await response.text(),
|
||||
}).toEqual({ status: 200, body: 'Greetings, Vercel' });
|
||||
}
|
||||
{
|
||||
const response = await fetch(
|
||||
`http://${address}:${port}/api/serverless-fetch?url=${serverUrl}&encoding=gzip`
|
||||
);
|
||||
expect(response.headers.get('content-encoding')).toBe('gzip');
|
||||
expect(response.headers.get('content-length')).toBe('37');
|
||||
expect({
|
||||
status: response.status,
|
||||
body: await response.text(),
|
||||
}).toEqual({ status: 200, body: 'Greetings, Vercel' });
|
||||
}
|
||||
{
|
||||
const response = await fetch(
|
||||
`http://${address}:${port}/api/serverless-fetch?url=${serverUrl}&encoding=deflate`
|
||||
);
|
||||
expect(response.headers.get('content-encoding')).toBe('deflate');
|
||||
expect(response.headers.get('content-length')).toBe('25');
|
||||
expect({
|
||||
status: response.status,
|
||||
body: await response.text(),
|
||||
}).toEqual({ status: 200, body: 'Greetings, Vercel' });
|
||||
}
|
||||
} finally {
|
||||
server.close();
|
||||
child.kill(9);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
test('runs an edge function that uses `WebSocket`', async () => {
|
||||
const child = testForkDevServer('./edge-websocket.js');
|
||||
try {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"@types/execa": "^0.9.0",
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/ncc": "0.24.0",
|
||||
"execa": "^1.0.0"
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"@types/aws-lambda": "8.10.19",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "6.0.0",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"execa": "3.2.0",
|
||||
"fs-extra": "11.1.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @vercel/remix-builder
|
||||
|
||||
## 1.8.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update `@remix-run/dev` fork to v1.18.1 ([#10180](https://github.com/vercel/vercel/pull/10180))
|
||||
|
||||
- Updated dependencies [[`7021279b2`](https://github.com/vercel/vercel/commit/7021279b284f314a4d1bdbb4306b4c22291efa08)]:
|
||||
- @vercel/build-utils@6.8.1
|
||||
|
||||
## 1.8.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/remix-builder",
|
||||
"version": "1.8.15",
|
||||
"version": "1.8.16",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"homepage": "https://vercel.com/docs",
|
||||
@@ -20,8 +20,8 @@
|
||||
"defaults"
|
||||
],
|
||||
"dependencies": {
|
||||
"@remix-run/dev": "npm:@vercel/remix-run-dev@1.18.0",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@remix-run/dev": "npm:@vercel/remix-run-dev@1.18.1",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/nft": "0.22.5",
|
||||
"@vercel/static-config": "2.0.17",
|
||||
"path-to-regexp": "6.2.1",
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "8.0.0",
|
||||
"@types/semver": "6.0.0",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/ncc": "0.24.0",
|
||||
"execa": "2.0.4",
|
||||
"fs-extra": "^7.0.1",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/static-build
|
||||
|
||||
## 1.3.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @vercel/gatsby-plugin-vercel-builder@1.3.12
|
||||
|
||||
## 1.3.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/static-build",
|
||||
"version": "1.3.38",
|
||||
"version": "1.3.39",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/build-step",
|
||||
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/gatsby-plugin-vercel-analytics": "1.0.10",
|
||||
"@vercel/gatsby-plugin-vercel-builder": "1.3.11"
|
||||
"@vercel/gatsby-plugin-vercel-builder": "1.3.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/aws-lambda": "8.10.64",
|
||||
@@ -32,7 +32,7 @@
|
||||
"@types/node-fetch": "2.5.4",
|
||||
"@types/promise-timeout": "1.3.0",
|
||||
"@types/semver": "7.3.13",
|
||||
"@vercel/build-utils": "6.8.0",
|
||||
"@vercel/build-utils": "6.8.1",
|
||||
"@vercel/error-utils": "1.0.10",
|
||||
"@vercel/frameworks": "1.4.3",
|
||||
"@vercel/fs-detectors": "4.0.1",
|
||||
|
||||
121
pnpm-lock.yaml
generated
121
pnpm-lock.yaml
generated
@@ -86,8 +86,8 @@ importers:
|
||||
specifier: 29.1.0
|
||||
version: 29.1.0(@babel/core@7.5.0)(jest@29.5.0)(typescript@4.9.5)
|
||||
turbo:
|
||||
specifier: 1.10.6
|
||||
version: 1.10.6
|
||||
specifier: 1.10.7
|
||||
version: 1.10.7
|
||||
typescript:
|
||||
specifier: 4.9.5
|
||||
version: 4.9.5
|
||||
@@ -133,13 +133,6 @@ importers:
|
||||
version: link:../packages/frameworks
|
||||
|
||||
internals/constants:
|
||||
dependencies:
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
version: link:../../packages/build-utils
|
||||
'@vercel/routing-utils':
|
||||
specifier: 2.2.1
|
||||
version: link:../../packages/routing-utils
|
||||
devDependencies:
|
||||
'@vercel-internals/tsconfig':
|
||||
specifier: 1.0.0
|
||||
@@ -187,10 +180,10 @@ importers:
|
||||
specifier: 14.14.31
|
||||
version: 14.14.31
|
||||
'@vercel-internals/constants':
|
||||
specifier: 1.0.3
|
||||
specifier: 1.0.4
|
||||
version: link:../constants
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../../packages/build-utils
|
||||
'@vercel/routing-utils':
|
||||
specifier: 2.2.1
|
||||
@@ -314,7 +307,7 @@ importers:
|
||||
packages/cli:
|
||||
dependencies:
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
'@vercel/go':
|
||||
specifier: 2.5.1
|
||||
@@ -323,10 +316,10 @@ importers:
|
||||
specifier: 0.0.64
|
||||
version: link:../hydrogen
|
||||
'@vercel/next':
|
||||
specifier: 3.8.7
|
||||
specifier: 3.8.8
|
||||
version: link:../next
|
||||
'@vercel/node':
|
||||
specifier: 2.15.3
|
||||
specifier: 2.15.4
|
||||
version: link:../node
|
||||
'@vercel/python':
|
||||
specifier: 3.1.60
|
||||
@@ -335,13 +328,13 @@ importers:
|
||||
specifier: 1.1.15
|
||||
version: link:../redwood
|
||||
'@vercel/remix-builder':
|
||||
specifier: 1.8.15
|
||||
specifier: 1.8.16
|
||||
version: link:../remix
|
||||
'@vercel/ruby':
|
||||
specifier: 1.3.76
|
||||
version: link:../ruby
|
||||
'@vercel/static-build':
|
||||
specifier: 1.3.38
|
||||
specifier: 1.3.39
|
||||
version: link:../static-build
|
||||
devDependencies:
|
||||
'@alex_neo/jest-expect-message':
|
||||
@@ -468,16 +461,16 @@ importers:
|
||||
specifier: 2.1.0
|
||||
version: 2.1.0
|
||||
'@vercel-internals/constants':
|
||||
specifier: 1.0.3
|
||||
specifier: 1.0.4
|
||||
version: link:../../internals/constants
|
||||
'@vercel-internals/get-package-json':
|
||||
specifier: 1.0.0
|
||||
version: link:../../internals/get-package-json
|
||||
'@vercel-internals/types':
|
||||
specifier: 1.0.3
|
||||
specifier: 1.0.4
|
||||
version: link:../../internals/types
|
||||
'@vercel/client':
|
||||
specifier: 12.6.3
|
||||
specifier: 12.6.4
|
||||
version: link:../client
|
||||
'@vercel/error-utils':
|
||||
specifier: 1.0.10
|
||||
@@ -735,7 +728,7 @@ importers:
|
||||
packages/client:
|
||||
dependencies:
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
'@vercel/routing-utils':
|
||||
specifier: 2.2.1
|
||||
@@ -924,7 +917,7 @@ importers:
|
||||
specifier: 7.3.10
|
||||
version: 7.3.10
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
typescript:
|
||||
specifier: 4.9.5
|
||||
@@ -952,10 +945,10 @@ importers:
|
||||
specifier: 0.25.24
|
||||
version: 0.25.24
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
'@vercel/node':
|
||||
specifier: 2.15.3
|
||||
specifier: 2.15.4
|
||||
version: link:../node
|
||||
'@vercel/routing-utils':
|
||||
specifier: 2.2.1
|
||||
@@ -1016,7 +1009,7 @@ importers:
|
||||
specifier: 2.1.0
|
||||
version: 2.1.0
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
'@vercel/ncc':
|
||||
specifier: 0.24.0
|
||||
@@ -1058,7 +1051,7 @@ importers:
|
||||
specifier: 14.18.33
|
||||
version: 14.18.33
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
'@vercel/static-config':
|
||||
specifier: 2.0.17
|
||||
@@ -1115,7 +1108,7 @@ importers:
|
||||
specifier: 3.2.0
|
||||
version: 3.2.0
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
'@vercel/nft':
|
||||
specifier: 0.22.5
|
||||
@@ -1205,7 +1198,7 @@ importers:
|
||||
specifier: 2.6.3
|
||||
version: 2.6.3
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
'@vercel/error-utils':
|
||||
specifier: 1.0.10
|
||||
@@ -1311,7 +1304,7 @@ importers:
|
||||
specifier: 14.18.33
|
||||
version: 14.18.33
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
'@vercel/ncc':
|
||||
specifier: 0.24.0
|
||||
@@ -1342,7 +1335,7 @@ importers:
|
||||
specifier: 6.0.0
|
||||
version: 6.0.0
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
execa:
|
||||
specifier: 3.2.0
|
||||
@@ -1354,10 +1347,10 @@ importers:
|
||||
packages/remix:
|
||||
dependencies:
|
||||
'@remix-run/dev':
|
||||
specifier: npm:@vercel/remix-run-dev@1.18.0
|
||||
version: /@vercel/remix-run-dev@1.18.0(@types/node@14.18.33)
|
||||
specifier: npm:@vercel/remix-run-dev@1.18.1
|
||||
version: /@vercel/remix-run-dev@1.18.1(@types/node@14.18.33)
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
'@vercel/nft':
|
||||
specifier: 0.22.5
|
||||
@@ -1414,7 +1407,7 @@ importers:
|
||||
specifier: 6.0.0
|
||||
version: 6.0.0
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
'@vercel/ncc':
|
||||
specifier: 0.24.0
|
||||
@@ -1435,7 +1428,7 @@ importers:
|
||||
specifier: 1.0.10
|
||||
version: link:../gatsby-plugin-vercel-analytics
|
||||
'@vercel/gatsby-plugin-vercel-builder':
|
||||
specifier: 1.3.11
|
||||
specifier: 1.3.12
|
||||
version: link:../gatsby-plugin-vercel-builder
|
||||
devDependencies:
|
||||
'@types/aws-lambda':
|
||||
@@ -1466,7 +1459,7 @@ importers:
|
||||
specifier: 7.3.13
|
||||
version: 7.3.13
|
||||
'@vercel/build-utils':
|
||||
specifier: 6.8.0
|
||||
specifier: 6.8.1
|
||||
version: link:../build-utils
|
||||
'@vercel/error-utils':
|
||||
specifier: 1.0.10
|
||||
@@ -4128,16 +4121,16 @@ packages:
|
||||
tslib: 2.5.0
|
||||
dev: true
|
||||
|
||||
/@remix-run/router@1.7.0:
|
||||
resolution: {integrity: sha512-Eu1V3kz3mV0wUpVTiFHuaT8UD1gj/0VnoFHQYX35xlslQUpe8CuYoKFn9d4WZFHm3yDywz6ALZuGdnUPKrNeAw==}
|
||||
/@remix-run/router@1.7.1:
|
||||
resolution: {integrity: sha512-bgVQM4ZJ2u2CM8k1ey70o1ePFXsEzYVZoWghh6WjM8p59jQ7HxzbHW4SbnWFG7V9ig9chLawQxDTZ3xzOF8MkQ==}
|
||||
engines: {node: '>=14'}
|
||||
dev: false
|
||||
|
||||
/@remix-run/server-runtime@1.18.0:
|
||||
resolution: {integrity: sha512-iiSKgGIWMkvf4ftnjGBmIJpgqxRwv8XQilAINapaYsx1zEM6egZGYE6WvaxLuRQSceZZNgLAYzL48TmK+DAU5g==}
|
||||
/@remix-run/server-runtime@1.18.1:
|
||||
resolution: {integrity: sha512-E0sQlgUQG2ytFmUH7zRH7n2MufnP6WWWq1KpRoiuwJZxfTFIzaiCCIiNqbP/uXGWDGcwEevpawNUzzszL1tT0w==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
dependencies:
|
||||
'@remix-run/router': 1.7.0
|
||||
'@remix-run/router': 1.7.1
|
||||
'@types/cookie': 0.4.1
|
||||
'@web3-storage/multipart-parser': 1.0.0
|
||||
cookie: 0.4.2
|
||||
@@ -5930,12 +5923,12 @@ packages:
|
||||
- encoding
|
||||
- supports-color
|
||||
|
||||
/@vercel/remix-run-dev@1.18.0(@types/node@14.18.33):
|
||||
resolution: {integrity: sha512-5vGcc3OTBLZImKY0BMXDXDqdh0mjh4ZqptI9eRwXZ9O5AfGp4Ce7Q8tNldazBVOJMM4fGgLeXRIOTfuRDe5tDA==}
|
||||
/@vercel/remix-run-dev@1.18.1(@types/node@14.18.33):
|
||||
resolution: {integrity: sha512-V9RCT+3VDB0wLbwq8Dp0XO6Cc1LxY4tCyxJ5loyX0L8sPBCgQ3/vMre3VKr8jLhjnfUGSrbXADxFM8/bq4ZeDQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@remix-run/serve': ^1.18.0
|
||||
'@remix-run/serve': ^1.18.1
|
||||
peerDependenciesMeta:
|
||||
'@remix-run/serve':
|
||||
optional: true
|
||||
@@ -5950,7 +5943,7 @@ packages:
|
||||
'@babel/traverse': 7.21.5
|
||||
'@babel/types': 7.21.5
|
||||
'@npmcli/package-json': 2.0.0
|
||||
'@remix-run/server-runtime': 1.18.0
|
||||
'@remix-run/server-runtime': 1.18.1
|
||||
'@vanilla-extract/integration': 6.2.1(@types/node@14.18.33)
|
||||
arg: 5.0.2
|
||||
cacache: 15.3.0
|
||||
@@ -16190,65 +16183,65 @@ packages:
|
||||
safe-buffer: 5.2.1
|
||||
dev: true
|
||||
|
||||
/turbo-darwin-64@1.10.6:
|
||||
resolution: {integrity: sha512-s2Gc7i9Ud+H9GDcrGJjPIyscJfzDGQ6il4Sl2snfvwngJs4/TaqKuBoX3HNt/7F4NiFRs7ZhlLV1/Yu9zGBRhw==}
|
||||
/turbo-darwin-64@1.10.7:
|
||||
resolution: {integrity: sha512-N2MNuhwrl6g7vGuz4y3fFG2aR1oCs0UZ5HKl8KSTn/VC2y2YIuLGedQ3OVbo0TfEvygAlF3QGAAKKtOCmGPNKA==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/turbo-darwin-arm64@1.10.6:
|
||||
resolution: {integrity: sha512-tgl70t5PBLyRcNTdP9N6NjvdvQ5LUk8Z60JGUhBhnc+oCOdA4pltrDJNPyel3tQAXXt1dDpl8pp9vUrbwoVyGg==}
|
||||
/turbo-darwin-arm64@1.10.7:
|
||||
resolution: {integrity: sha512-WbJkvjU+6qkngp7K4EsswOriO3xrNQag7YEGRtfLoDdMTk4O4QTeU6sfg2dKfDsBpTidTvEDwgIYJhYVGzrz9Q==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/turbo-linux-64@1.10.6:
|
||||
resolution: {integrity: sha512-h7eyAA3xtAVpamcYJYUwe0xm0LWdbv7/I7QiM09AZ67TTNpyUgqW8giFN3h793BHEQ2Rcnk9FNkpIbjWBbyamg==}
|
||||
/turbo-linux-64@1.10.7:
|
||||
resolution: {integrity: sha512-x1CF2CDP1pDz/J8/B2T0hnmmOQI2+y11JGIzNP0KtwxDM7rmeg3DDTtDM/9PwGqfPotN9iVGgMiMvBuMFbsLhg==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/turbo-linux-arm64@1.10.6:
|
||||
resolution: {integrity: sha512-8cZhOeLqu3QZ27yLd6bw4FNaB8y5pLdWeRLJeiWHkIb/cptKnRKJFP+keBJzJi8ovaMqdBpabrxiBRN2lhau5Q==}
|
||||
/turbo-linux-arm64@1.10.7:
|
||||
resolution: {integrity: sha512-JtnBmaBSYbs7peJPkXzXxsRGSGBmBEIb6/kC8RRmyvPAMyqF8wIex0pttsI+9plghREiGPtRWv/lfQEPRlXnNQ==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/turbo-windows-64@1.10.6:
|
||||
resolution: {integrity: sha512-qx5jcfCJodN1Mh0KtSVQau7pK8CxDvtif7+joPHI2HbQPAADgdUl0LHfA5tFHh6aWgfvhxbvIXqJd6v7Mqkj9g==}
|
||||
/turbo-windows-64@1.10.7:
|
||||
resolution: {integrity: sha512-7A/4CByoHdolWS8dg3DPm99owfu1aY/W0V0+KxFd0o2JQMTQtoBgIMSvZesXaWM57z3OLsietFivDLQPuzE75w==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/turbo-windows-arm64@1.10.6:
|
||||
resolution: {integrity: sha512-vTQaRG3/s2XTreOBr6J9HKFtjzusvwGQg0GtuW2+9Z7fizdzP8MuhaDbN6FhKHcWC81PQPD61TBIKTVTsYOEZg==}
|
||||
/turbo-windows-arm64@1.10.7:
|
||||
resolution: {integrity: sha512-D36K/3b6+hqm9IBAymnuVgyePktwQ+F0lSXr2B9JfAdFPBktSqGmp50JNC7pahxhnuCLj0Vdpe9RqfnJw5zATA==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/turbo@1.10.6:
|
||||
resolution: {integrity: sha512-0/wbjw4HvmPP1abVWHTdeFRfCA9cn5oxCPP5bDixagLzvDgGWE3xfdlsyGmq779Ekr9vjtDPgC2Y4JlXEhyryw==}
|
||||
/turbo@1.10.7:
|
||||
resolution: {integrity: sha512-xm0MPM28TWx1e6TNC3wokfE5eaDqlfi0G24kmeHupDUZt5Wd0OzHFENEHMPqEaNKJ0I+AMObL6nbSZonZBV2HA==}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
optionalDependencies:
|
||||
turbo-darwin-64: 1.10.6
|
||||
turbo-darwin-arm64: 1.10.6
|
||||
turbo-linux-64: 1.10.6
|
||||
turbo-linux-arm64: 1.10.6
|
||||
turbo-windows-64: 1.10.6
|
||||
turbo-windows-arm64: 1.10.6
|
||||
turbo-darwin-64: 1.10.7
|
||||
turbo-darwin-arm64: 1.10.7
|
||||
turbo-linux-64: 1.10.7
|
||||
turbo-linux-arm64: 1.10.7
|
||||
turbo-windows-64: 1.10.7
|
||||
turbo-windows-arm64: 1.10.7
|
||||
dev: true
|
||||
|
||||
/tweetnacl@0.14.5:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://turborepo.org/schema.json",
|
||||
"globalDependencies": ["turbo-cache-key.json", "test/lib/**"],
|
||||
"globalDependencies": ["turbo-cache-key.json", "package.json", "test/lib/**"],
|
||||
"pipeline": {
|
||||
"build": {
|
||||
"dependsOn": ["^build"],
|
||||
|
||||
1
utils/chunk-tests.js
vendored
1
utils/chunk-tests.js
vendored
@@ -48,6 +48,7 @@ async function getChunkedTests() {
|
||||
...scripts,
|
||||
`--cache-dir=.turbo`,
|
||||
'--output-logs=full',
|
||||
'--log-order=stream',
|
||||
'--',
|
||||
'--', // need two of these due to pnpm arg parsing
|
||||
'--listTests',
|
||||
|
||||
5
utils/update-next.js
vendored
5
utils/update-next.js
vendored
@@ -19,6 +19,7 @@ function exec(cmd, args, opts) {
|
||||
}
|
||||
|
||||
module.exports = async ({ github, context } = {}) => {
|
||||
process.env.COREPACK_ENABLE_STRICT = '0';
|
||||
const newVersion = exec('npm', ['view', 'next', 'dist-tags.latest']);
|
||||
const branch = `next-${newVersion.replaceAll('.', '-')}`;
|
||||
|
||||
@@ -95,7 +96,11 @@ module.exports = async ({ github, context } = {}) => {
|
||||
} to Next.js version ${newVersion}`
|
||||
);
|
||||
|
||||
const changeset = join(__dirname, '..', '.changeset', `${branch}.md`);
|
||||
writeFileSync(changeset, `---\n---\n\n`, 'utf-8');
|
||||
|
||||
if (!github || !context) {
|
||||
console.error('Error: missing github or context');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user