mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-11 21:07:47 +00:00
Compare commits
33 Commits
@vercel-in
...
create-inp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d1afb8f63 | ||
|
|
4e8da2c60c | ||
|
|
8706d857a9 | ||
|
|
8b903da18c | ||
|
|
7c693edef5 | ||
|
|
fa467e3613 | ||
|
|
75d85e0f4a | ||
|
|
909d36fef3 | ||
|
|
fa425339d0 | ||
|
|
d2396b0cf9 | ||
|
|
7a8101e3bd | ||
|
|
7023ea0d64 | ||
|
|
b7cb5c6ae3 | ||
|
|
c87bd35e69 | ||
|
|
f8a3b43bed | ||
|
|
bdf338b790 | ||
|
|
6487d091df | ||
|
|
705453202e | ||
|
|
988f7b75a2 | ||
|
|
9481572c6d | ||
|
|
7a28972897 | ||
|
|
3a05469454 | ||
|
|
f1c67d05e3 | ||
|
|
6f46b1fc70 | ||
|
|
34e961e1c6 | ||
|
|
75346d45cc | ||
|
|
f9b4fae51b | ||
|
|
8619992def | ||
|
|
a67ad4b5a1 | ||
|
|
11218a1798 | ||
|
|
64b97bf4b5 | ||
|
|
5c3d2e7411 | ||
|
|
4bca0c6d0b |
2
.changeset/curly-eyes-travel.md
Normal file
2
.changeset/curly-eyes-travel.md
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
---
|
||||
2
.changeset/eleven-pants-attack.md
Normal file
2
.changeset/eleven-pants-attack.md
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
---
|
||||
2
.changeset/neat-tigers-pay.md
Normal file
2
.changeset/neat-tigers-pay.md
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
---
|
||||
3
.changeset/next-14-1-4.md
Normal file
3
.changeset/next-14-1-4.md
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
---
|
||||
|
||||
5
.changeset/silent-books-decide.md
Normal file
5
.changeset/silent-books-decide.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'vercel': patch
|
||||
---
|
||||
|
||||
Replace `inquirer` with `@inquirer/prompts`
|
||||
5
.changeset/slimy-nails-rescue.md
Normal file
5
.changeset/slimy-nails-rescue.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@vercel/remix-builder": patch
|
||||
---
|
||||
|
||||
Add `mjs` and `mts` extensions to vite detection
|
||||
2
.changeset/sour-experts-dress.md
Normal file
2
.changeset/sour-experts-dress.md
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
---
|
||||
4
.changeset/spicy-icons-serve.md
Normal file
4
.changeset/spicy-icons-serve.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
---
|
||||
|
||||
Update CODEOWNERS
|
||||
2
.changeset/tasty-bikes-push.md
Normal file
2
.changeset/tasty-bikes-push.md
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
---
|
||||
22
.github/CODEOWNERS
vendored
22
.github/CODEOWNERS
vendored
@@ -2,17 +2,17 @@
|
||||
# https://help.github.com/en/articles/about-code-owners
|
||||
|
||||
# Restricted Paths
|
||||
* @TooTallNate @EndangeredMassa @trek @onsclom
|
||||
/.github/workflows @TooTallNate @EndangeredMassa @trek @onsclom @ijjk
|
||||
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @onsclom @agadzik @chloetedder
|
||||
/packages/next @TooTallNate @EndangeredMassa @trek @onsclom @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
|
||||
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @onsclom @ijjk
|
||||
/packages/static-build @TooTallNate @EndangeredMassa @trek @onsclom
|
||||
/packages/edge @TooTallNate @EndangeredMassa @trek @onsclom @vercel/compute
|
||||
/examples @TooTallNate @EndangeredMassa @trek @onsclom @leerob
|
||||
/examples/create-react-app @TooTallNate @EndangeredMassa @trek @onsclom @Timer
|
||||
/examples/nextjs @TooTallNate @EndangeredMassa @trek @onsclom @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
|
||||
/packages/node @TooTallNate @EndangeredMassa @trek @onsclom @Kikobeats
|
||||
* @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55
|
||||
/.github/workflows @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @ijjk
|
||||
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @agadzik @chloetedder
|
||||
/packages/next @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
|
||||
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @ijjk
|
||||
/packages/static-build @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55
|
||||
/packages/edge @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @vercel/compute
|
||||
/examples @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @leerob
|
||||
/examples/create-react-app @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @Timer
|
||||
/examples/nextjs @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
|
||||
/packages/node @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @Kikobeats
|
||||
|
||||
# Unrestricted Paths
|
||||
.changeset/
|
||||
|
||||
99
.github/dependabot.yml
vendored
99
.github/dependabot.yml
vendored
@@ -1,7 +1,8 @@
|
||||
version: 2
|
||||
|
||||
updates:
|
||||
- schedule:
|
||||
- directory: /packages/static-build/test/fixtures/angular-v17
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
@@ -11,7 +12,6 @@ updates:
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
directory: /packages/static-build/test/fixtures/angular-v17
|
||||
allow:
|
||||
- dependency-name: '@angular*'
|
||||
ignore:
|
||||
@@ -25,8 +25,9 @@ updates:
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- schedule:
|
||||
interval: 'daily'
|
||||
- directory: /packages/static-build/test/fixtures/astro-v4
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
- 'trek'
|
||||
@@ -35,7 +36,6 @@ updates:
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
directory: /packages/static-build/test/fixtures/astro-v4
|
||||
allow:
|
||||
- dependency-name: 'astro*'
|
||||
ignore:
|
||||
@@ -49,7 +49,8 @@ updates:
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- schedule:
|
||||
- directory: /packages/static-build/test/fixtures/hydrogen-v2023
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
@@ -59,7 +60,6 @@ updates:
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
directory: /packages/static-build/test/fixtures/hydrogen-v2023
|
||||
allow:
|
||||
- dependency-name: '@remix-run*'
|
||||
- dependency-name: '@shopify*'
|
||||
@@ -77,3 +77,88 @@ updates:
|
||||
- '@shopify*'
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- directory: /packages/static-build/test/fixtures/ionic-angular-v7
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
- 'trek'
|
||||
- 'TooTallNate'
|
||||
- 'EndangeredMassa'
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
allow:
|
||||
- dependency-name: '@angular*'
|
||||
- dependency-name: '@ionic*'
|
||||
groups:
|
||||
core:
|
||||
patterns:
|
||||
- '@angular*'
|
||||
- '@ionic*'
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- directory: /packages/static-build/test/fixtures/nuxt-v3
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
- 'trek'
|
||||
- 'TooTallNate'
|
||||
- 'EndangeredMassa'
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
allow:
|
||||
- dependency-name: 'nuxt'
|
||||
- dependency-name: 'vue'
|
||||
- dependency-name: 'vue-router'
|
||||
- dependency-name: '@nuxt-devtools'
|
||||
ignore:
|
||||
- dependency-name: 'nuxt'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
- dependency-name: 'vue'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
- dependency-name: 'vue-router'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
- dependency-name: '@nuxt-devtools'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
groups:
|
||||
core:
|
||||
patterns:
|
||||
- 'nuxt'
|
||||
- 'vue'
|
||||
- 'vue-router'
|
||||
- '@nuxt-devtools'
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- directory: /packages/static-build/test/fixtures/stencil-v4
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
- 'trek'
|
||||
- 'TooTallNate'
|
||||
- 'EndangeredMassa'
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
allow:
|
||||
- dependency-name: '@stencil/core'
|
||||
ignore:
|
||||
- dependency-name: '@stencil/core'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
groups:
|
||||
core:
|
||||
patterns:
|
||||
- '@stencil/core'
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
5
examples/hugo/package.json
Normal file
5
examples/hugo/package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"engines": {
|
||||
"node": "18.x"
|
||||
}
|
||||
}
|
||||
5
examples/jekyll/package.json
Normal file
5
examples/jekyll/package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"engines": {
|
||||
"node": "18.x"
|
||||
}
|
||||
}
|
||||
5
examples/middleman/package.json
Normal file
5
examples/middleman/package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"engines": {
|
||||
"node": "18.x"
|
||||
}
|
||||
}
|
||||
557
examples/nextjs/package-lock.json
generated
557
examples/nextjs/package-lock.json
generated
@@ -8,7 +8,7 @@
|
||||
"name": "nextjs",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"next": "14.1.3",
|
||||
"next": "14.1.4",
|
||||
"react": "^18",
|
||||
"react-dom": "^18"
|
||||
},
|
||||
@@ -18,7 +18,7 @@
|
||||
"@types/react-dom": "^18",
|
||||
"autoprefixer": "^10.0.1",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.1.3",
|
||||
"eslint-config-next": "14.1.4",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"typescript": "^5"
|
||||
@@ -46,9 +46,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz",
|
||||
"integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==",
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz",
|
||||
"integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
@@ -239,23 +239,23 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/env": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.3.tgz",
|
||||
"integrity": "sha512-VhgXTvrgeBRxNPjyfBsDIMvgsKDxjlpw4IAUsHCX8Gjl1vtHUYRT3+xfQ/wwvLPDd/6kqfLqk9Pt4+7gysuCKQ=="
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.4.tgz",
|
||||
"integrity": "sha512-e7X7bbn3Z6DWnDi75UWn+REgAbLEqxI8Tq2pkFOFAMpWAWApz/YCUhtWMWn410h8Q2fYiYL7Yg5OlxMOCfFjJQ=="
|
||||
},
|
||||
"node_modules/@next/eslint-plugin-next": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.1.3.tgz",
|
||||
"integrity": "sha512-VCnZI2cy77Yaj3L7Uhs3+44ikMM1VD/fBMwvTBb3hIaTIuqa+DmG4dhUDq+MASu3yx97KhgsVJbsas0XuiKyww==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.1.4.tgz",
|
||||
"integrity": "sha512-n4zYNLSyCo0Ln5b7qxqQeQ34OZKXwgbdcx6kmkQbywr+0k6M3Vinft0T72R6CDAcDrne2IAgSud4uWCzFgc5HA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"glob": "10.3.10"
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-arm64": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.3.tgz",
|
||||
"integrity": "sha512-LALu0yIBPRiG9ANrD5ncB3pjpO0Gli9ZLhxdOu6ZUNf3x1r3ea1rd9Q+4xxUkGrUXLqKVK9/lDkpYIJaCJ6AHQ==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.4.tgz",
|
||||
"integrity": "sha512-ubmUkbmW65nIAOmoxT1IROZdmmJMmdYvXIe8211send9ZYJu+SqxSnJM4TrPj9wmL6g9Atvj0S/2cFmMSS99jg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -268,9 +268,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-x64": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.3.tgz",
|
||||
"integrity": "sha512-E/9WQeXxkqw2dfcn5UcjApFgUq73jqNKaE5bysDm58hEUdUGedVrnRhblhJM7HbCZNhtVl0j+6TXsK0PuzXTCg==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.4.tgz",
|
||||
"integrity": "sha512-b0Xo1ELj3u7IkZWAKcJPJEhBop117U78l70nfoQGo4xUSvv0PJSTaV4U9xQBLvZlnjsYkc8RwQN1HoH/oQmLlQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -283,9 +283,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-gnu": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.3.tgz",
|
||||
"integrity": "sha512-USArX9B+3rZSXYLFvgy0NVWQgqh6LHWDmMt38O4lmiJNQcwazeI6xRvSsliDLKt+78KChVacNiwvOMbl6g6BBw==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.4.tgz",
|
||||
"integrity": "sha512-457G0hcLrdYA/u1O2XkRMsDKId5VKe3uKPvrKVOyuARa6nXrdhJOOYU9hkKKyQTMru1B8qEP78IAhf/1XnVqKA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -298,9 +298,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-musl": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.3.tgz",
|
||||
"integrity": "sha512-esk1RkRBLSIEp1qaQXv1+s6ZdYzuVCnDAZySpa62iFTMGTisCyNQmqyCTL9P+cLJ4N9FKCI3ojtSfsyPHJDQNw==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.4.tgz",
|
||||
"integrity": "sha512-l/kMG+z6MB+fKA9KdtyprkTQ1ihlJcBh66cf0HvqGP+rXBbOXX0dpJatjZbHeunvEHoBBS69GYQG5ry78JMy3g==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -313,9 +313,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-gnu": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.3.tgz",
|
||||
"integrity": "sha512-8uOgRlYEYiKo0L8YGeS+3TudHVDWDjPVDUcST+z+dUzgBbTEwSSIaSgF/vkcC1T/iwl4QX9iuUyUdQEl0Kxalg==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.4.tgz",
|
||||
"integrity": "sha512-BapIFZ3ZRnvQ1uWbmqEGJuPT9cgLwvKtxhK/L2t4QYO7l+/DxXuIGjvp1x8rvfa/x1FFSsipERZK70pewbtJtw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -328,9 +328,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-musl": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.3.tgz",
|
||||
"integrity": "sha512-DX2zqz05ziElLoxskgHasaJBREC5Y9TJcbR2LYqu4r7naff25B4iXkfXWfcp69uD75/0URmmoSgT8JclJtrBoQ==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.4.tgz",
|
||||
"integrity": "sha512-mqVxTwk4XuBl49qn2A5UmzFImoL1iLm0KQQwtdRJRKl21ylQwwGCxJtIYo2rbfkZHoSKlh/YgztY0qH3wG1xIg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -343,9 +343,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-arm64-msvc": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.3.tgz",
|
||||
"integrity": "sha512-HjssFsCdsD4GHstXSQxsi2l70F/5FsRTRQp8xNgmQs15SxUfUJRvSI9qKny/jLkY3gLgiCR3+6A7wzzK0DBlfA==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.4.tgz",
|
||||
"integrity": "sha512-xzxF4ErcumXjO2Pvg/wVGrtr9QQJLk3IyQX1ddAC/fi6/5jZCZ9xpuL9Tzc4KPWMFq8GGWFVDMshZOdHGdkvag==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -358,9 +358,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-ia32-msvc": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.3.tgz",
|
||||
"integrity": "sha512-DRuxD5axfDM1/Ue4VahwSxl1O5rn61hX8/sF0HY8y0iCbpqdxw3rB3QasdHn/LJ6Wb2y5DoWzXcz3L1Cr+Thrw==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.4.tgz",
|
||||
"integrity": "sha512-WZiz8OdbkpRw6/IU/lredZWKKZopUMhcI2F+XiMAcPja0uZYdMTZQRoQ0WZcvinn9xZAidimE7tN9W5v9Yyfyw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -373,9 +373,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-x64-msvc": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.3.tgz",
|
||||
"integrity": "sha512-uC2DaDoWH7h1P/aJ4Fok3Xiw6P0Lo4ez7NbowW2VGNXw/Xv6tOuLUcxhBYZxsSUJtpeknCi8/fvnSpyCFp4Rcg==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.4.tgz",
|
||||
"integrity": "sha512-4Rto21sPfw555sZ/XNLqfxDUNeLhNYGO2dlPqsnuCg8N8a2a9u1ltqBOPQ4vj1Gf7eJC0W2hHG2eYUHuiXgY2w==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -433,9 +433,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rushstack/eslint-patch": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.7.2.tgz",
|
||||
"integrity": "sha512-RbhOOTCNoCrbfkRyoXODZp75MlpiHMgbE5MEBZAnnnLyQNgrigEj4p0lzsMDyc1zVsJDLrivB58tgg3emX0eEA==",
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.8.0.tgz",
|
||||
"integrity": "sha512-0HejFckBN2W+ucM6cUOlwsByTKt9/+0tWhqUffNIcHqCXkthY/mZ7AuYPK/2IIaGWhdl0h+tICDO0ssLMd6XMQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@swc/helpers": {
|
||||
@@ -453,9 +453,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.11.25",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz",
|
||||
"integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==",
|
||||
"version": "20.11.30",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz",
|
||||
"integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
@@ -468,9 +468,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "18.2.64",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.64.tgz",
|
||||
"integrity": "sha512-MlmPvHgjj2p3vZaxbQgFUQFvD8QiZwACfGqEdDSWou5yISWxDQ4/74nCAwsUiX7UFLKZz3BbVSPj+YxeoGGCfg==",
|
||||
"version": "18.2.67",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.67.tgz",
|
||||
"integrity": "sha512-vkIE2vTIMHQ/xL0rgmuoECBCkZFZeHr49HeWSc24AptMbNRo7pwSBvj73rlJJs9fGKj0koS+V7kQB1jHS0uCgw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
@@ -479,9 +479,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react-dom": {
|
||||
"version": "18.2.21",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.21.tgz",
|
||||
"integrity": "sha512-gnvBA/21SA4xxqNXEwNiVcP0xSGHh/gi1VhWv9Bl46a0ItbTT5nFY+G9VSQpaG/8N/qdJpJ+vftQ4zflTtnjLw==",
|
||||
"version": "18.2.22",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.22.tgz",
|
||||
"integrity": "sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/react": "*"
|
||||
@@ -771,35 +771,17 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/array.prototype.filter": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz",
|
||||
"integrity": "sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1",
|
||||
"es-array-method-boxes-properly": "^1.0.0",
|
||||
"is-string": "^1.0.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/array.prototype.findlast": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.4.tgz",
|
||||
"integrity": "sha512-BMtLxpV+8BD+6ZPFIWmnUBpQoy+A+ujcg4rhp2iwCRJYA7PEh2MS4NL3lz8EiDlLrJPp2hg9qWihr5pd//jcGw==",
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz",
|
||||
"integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.5",
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.22.3",
|
||||
"es-abstract": "^1.23.2",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.0.0",
|
||||
"es-shim-unscopables": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
@@ -810,15 +792,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/array.prototype.findlastindex": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz",
|
||||
"integrity": "sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==",
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz",
|
||||
"integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.5",
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.22.3",
|
||||
"es-abstract": "^1.23.2",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.0.0",
|
||||
"es-shim-unscopables": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
@@ -917,15 +900,6 @@
|
||||
"integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/asynciterator.prototype": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz",
|
||||
"integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"has-symbols": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/autoprefixer": {
|
||||
"version": "10.4.18",
|
||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.18.tgz",
|
||||
@@ -1003,12 +977,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
|
||||
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
@@ -1114,9 +1091,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001594",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001594.tgz",
|
||||
"integrity": "sha512-VblSX6nYqyJVs8DKFMldE2IVCJjZ225LW00ydtUWwh5hk9IfkTOffO6r8gJNsH0qqqeAF8KrbMYA2VEwTlGW5g==",
|
||||
"version": "1.0.30001599",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001599.tgz",
|
||||
"integrity": "sha512-LRAQHZ4yT1+f9LemSMeqdMpMxZcc4RMWdj4tiFe3G8tNkWK+E58g+/tzotb5cU6TbcVJLr4fySiAW7XmxQvZQA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@@ -1260,6 +1237,57 @@
|
||||
"integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/data-view-buffer": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz",
|
||||
"integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.6",
|
||||
"es-errors": "^1.3.0",
|
||||
"is-data-view": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/data-view-byte-length": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz",
|
||||
"integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"es-errors": "^1.3.0",
|
||||
"is-data-view": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/data-view-byte-offset": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz",
|
||||
"integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.6",
|
||||
"es-errors": "^1.3.0",
|
||||
"is-data-view": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
@@ -1369,9 +1397,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.694",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.694.tgz",
|
||||
"integrity": "sha512-kM3SwvGTYpBFJSc8jm4IYVMIOzDmAGd/Ry96O9elRiM6iEwHKNKhtXyFGzpfMMIGZD84W4/hyaULlMmNVvLQlQ==",
|
||||
"version": "1.4.711",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.711.tgz",
|
||||
"integrity": "sha512-hRg81qzvUEibX2lDxnFlVCHACa+LtrCPIsWAxo161LDYIB3jauf57RGsMZV9mvGwE98yGH06icj3zBEoOkxd/w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
@@ -1381,9 +1409,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/enhanced-resolve": {
|
||||
"version": "5.15.1",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.1.tgz",
|
||||
"integrity": "sha512-3d3JRbwsCLJsYgvb6NuWEG44jjPSOMuS73L/6+7BZuoKm3W+qXnSoIYVHi8dG7Qcg4inAY4jbzkZ7MnskePeDg==",
|
||||
"version": "5.16.0",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz",
|
||||
"integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.4",
|
||||
@@ -1394,17 +1422,21 @@
|
||||
}
|
||||
},
|
||||
"node_modules/es-abstract": {
|
||||
"version": "1.22.5",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.5.tgz",
|
||||
"integrity": "sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w==",
|
||||
"version": "1.23.2",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.2.tgz",
|
||||
"integrity": "sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"array-buffer-byte-length": "^1.0.1",
|
||||
"arraybuffer.prototype.slice": "^1.0.3",
|
||||
"available-typed-arrays": "^1.0.7",
|
||||
"call-bind": "^1.0.7",
|
||||
"data-view-buffer": "^1.0.1",
|
||||
"data-view-byte-length": "^1.0.1",
|
||||
"data-view-byte-offset": "^1.0.0",
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.0.0",
|
||||
"es-set-tostringtag": "^2.0.3",
|
||||
"es-to-primitive": "^1.2.1",
|
||||
"function.prototype.name": "^1.1.6",
|
||||
@@ -1415,10 +1447,11 @@
|
||||
"has-property-descriptors": "^1.0.2",
|
||||
"has-proto": "^1.0.3",
|
||||
"has-symbols": "^1.0.3",
|
||||
"hasown": "^2.0.1",
|
||||
"hasown": "^2.0.2",
|
||||
"internal-slot": "^1.0.7",
|
||||
"is-array-buffer": "^3.0.4",
|
||||
"is-callable": "^1.2.7",
|
||||
"is-data-view": "^1.0.1",
|
||||
"is-negative-zero": "^2.0.3",
|
||||
"is-regex": "^1.1.4",
|
||||
"is-shared-array-buffer": "^1.0.3",
|
||||
@@ -1429,17 +1462,17 @@
|
||||
"object-keys": "^1.1.1",
|
||||
"object.assign": "^4.1.5",
|
||||
"regexp.prototype.flags": "^1.5.2",
|
||||
"safe-array-concat": "^1.1.0",
|
||||
"safe-array-concat": "^1.1.2",
|
||||
"safe-regex-test": "^1.0.3",
|
||||
"string.prototype.trim": "^1.2.8",
|
||||
"string.prototype.trimend": "^1.0.7",
|
||||
"string.prototype.trim": "^1.2.9",
|
||||
"string.prototype.trimend": "^1.0.8",
|
||||
"string.prototype.trimstart": "^1.0.7",
|
||||
"typed-array-buffer": "^1.0.2",
|
||||
"typed-array-byte-length": "^1.0.1",
|
||||
"typed-array-byte-offset": "^1.0.2",
|
||||
"typed-array-length": "^1.0.5",
|
||||
"unbox-primitive": "^1.0.2",
|
||||
"which-typed-array": "^1.1.14"
|
||||
"which-typed-array": "^1.1.15"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -1448,12 +1481,6 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/es-array-method-boxes-properly": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz",
|
||||
"integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/es-define-property": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
|
||||
@@ -1476,26 +1503,37 @@
|
||||
}
|
||||
},
|
||||
"node_modules/es-iterator-helpers": {
|
||||
"version": "1.0.17",
|
||||
"resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.17.tgz",
|
||||
"integrity": "sha512-lh7BsUqelv4KUbR5a/ZTaGGIMLCjPGPqJ6q+Oq24YP0RdyptX1uzm4vvaqzk7Zx3bpl/76YLTTDj9L7uYQ92oQ==",
|
||||
"version": "1.0.18",
|
||||
"resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz",
|
||||
"integrity": "sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"asynciterator.prototype": "^1.0.0",
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.22.4",
|
||||
"es-abstract": "^1.23.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-set-tostringtag": "^2.0.2",
|
||||
"es-set-tostringtag": "^2.0.3",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"globalthis": "^1.0.3",
|
||||
"has-property-descriptors": "^1.0.2",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-proto": "^1.0.3",
|
||||
"has-symbols": "^1.0.3",
|
||||
"internal-slot": "^1.0.7",
|
||||
"iterator.prototype": "^1.1.2",
|
||||
"safe-array-concat": "^1.1.0"
|
||||
"safe-array-concat": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-object-atoms": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz",
|
||||
"integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -1618,12 +1656,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-config-next": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.1.3.tgz",
|
||||
"integrity": "sha512-sUCpWlGuHpEhI0pIT0UtdSLJk5Z8E2DYinPTwsBiWaSYQomchdl0i60pjynY48+oXvtyWMQ7oE+G3m49yrfacg==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.1.4.tgz",
|
||||
"integrity": "sha512-cihIahbhYAWwXJwZkAaRPpUi5t9aOi/HdfWXOjZeUOqNWXHD8X22kd1KG58Dc3MVaRx3HoR/oMGk2ltcrqDn8g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@next/eslint-plugin-next": "14.1.3",
|
||||
"@next/eslint-plugin-next": "14.1.4",
|
||||
"@rushstack/eslint-patch": "^1.3.3",
|
||||
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
|
||||
"eslint-import-resolver-node": "^0.3.6",
|
||||
@@ -1806,9 +1844,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-react": {
|
||||
"version": "7.34.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.0.tgz",
|
||||
"integrity": "sha512-MeVXdReleBTdkz/bvcQMSnCXGi+c9kvy51IpinjnJgutl3YTHWsDdke7Z1ufZpGfDG8xduBDKyjtB9JH1eBKIQ==",
|
||||
"version": "7.34.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.1.tgz",
|
||||
"integrity": "sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"array-includes": "^3.1.7",
|
||||
@@ -2220,9 +2258,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/get-tsconfig": {
|
||||
"version": "4.7.2",
|
||||
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz",
|
||||
"integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==",
|
||||
"version": "4.7.3",
|
||||
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz",
|
||||
"integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"resolve-pkg-maps": "^1.0.0"
|
||||
@@ -2432,9 +2470,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz",
|
||||
"integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
@@ -2602,6 +2640,21 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-data-view": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz",
|
||||
"integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"is-typed-array": "^1.1.13"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-date-object": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
|
||||
@@ -2675,10 +2728,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/is-map": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz",
|
||||
"integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",
|
||||
"integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
@@ -2745,10 +2801,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/is-set": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
|
||||
"integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz",
|
||||
"integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
@@ -2814,10 +2873,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/is-weakmap": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz",
|
||||
"integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",
|
||||
"integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
@@ -2835,13 +2897,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/is-weakset": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz",
|
||||
"integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz",
|
||||
"integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"get-intrinsic": "^1.1.1"
|
||||
"call-bind": "^1.0.7",
|
||||
"get-intrinsic": "^1.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@@ -3150,11 +3215,11 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/next": {
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-14.1.3.tgz",
|
||||
"integrity": "sha512-oexgMV2MapI0UIWiXKkixF8J8ORxpy64OuJ/J9oVUmIthXOUCcuVEZX+dtpgq7wIfIqtBwQsKEDXejcjTsan9g==",
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-14.1.4.tgz",
|
||||
"integrity": "sha512-1WTaXeSrUwlz/XcnhGTY7+8eiaFvdet5z9u3V2jb+Ek1vFo0VhHKSAIJvDWfQpttWjnyw14kBeq28TPq7bTeEQ==",
|
||||
"dependencies": {
|
||||
"@next/env": "14.1.3",
|
||||
"@next/env": "14.1.4",
|
||||
"@swc/helpers": "0.5.2",
|
||||
"busboy": "1.6.0",
|
||||
"caniuse-lite": "^1.0.30001579",
|
||||
@@ -3169,15 +3234,15 @@
|
||||
"node": ">=18.17.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@next/swc-darwin-arm64": "14.1.3",
|
||||
"@next/swc-darwin-x64": "14.1.3",
|
||||
"@next/swc-linux-arm64-gnu": "14.1.3",
|
||||
"@next/swc-linux-arm64-musl": "14.1.3",
|
||||
"@next/swc-linux-x64-gnu": "14.1.3",
|
||||
"@next/swc-linux-x64-musl": "14.1.3",
|
||||
"@next/swc-win32-arm64-msvc": "14.1.3",
|
||||
"@next/swc-win32-ia32-msvc": "14.1.3",
|
||||
"@next/swc-win32-x64-msvc": "14.1.3"
|
||||
"@next/swc-darwin-arm64": "14.1.4",
|
||||
"@next/swc-darwin-x64": "14.1.4",
|
||||
"@next/swc-linux-arm64-gnu": "14.1.4",
|
||||
"@next/swc-linux-arm64-musl": "14.1.4",
|
||||
"@next/swc-linux-x64-gnu": "14.1.4",
|
||||
"@next/swc-linux-x64-musl": "14.1.4",
|
||||
"@next/swc-win32-arm64-msvc": "14.1.4",
|
||||
"@next/swc-win32-ia32-msvc": "14.1.4",
|
||||
"@next/swc-win32-x64-msvc": "14.1.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@opentelemetry/api": "^1.1.0",
|
||||
@@ -3300,28 +3365,29 @@
|
||||
}
|
||||
},
|
||||
"node_modules/object.entries": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz",
|
||||
"integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==",
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz",
|
||||
"integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/object.fromentries": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz",
|
||||
"integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==",
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
|
||||
"integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.2",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -3331,16 +3397,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/object.groupby": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.2.tgz",
|
||||
"integrity": "sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz",
|
||||
"integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"array.prototype.filter": "^1.0.3",
|
||||
"call-bind": "^1.0.5",
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.22.3",
|
||||
"es-errors": "^1.0.0"
|
||||
"es-abstract": "^1.23.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/object.hasown": {
|
||||
@@ -3357,14 +3424,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/object.values": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz",
|
||||
"integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz",
|
||||
"integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -3544,9 +3611,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.35",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz",
|
||||
"integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==",
|
||||
"version": "8.4.37",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.37.tgz",
|
||||
"integrity": "sha512-7iB/v/r7Woof0glKLH8b1SPHrsX7uhdO+Geb41QpF/+mWZHU3uxxSlN+UXGVit1PawOYDToO+AbZzhBzWRDwbQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -3565,7 +3632,7 @@
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.7",
|
||||
"picocolors": "^1.0.0",
|
||||
"source-map-js": "^1.0.2"
|
||||
"source-map-js": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
@@ -3674,9 +3741,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-selector-parser": {
|
||||
"version": "6.0.15",
|
||||
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz",
|
||||
"integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==",
|
||||
"version": "6.0.16",
|
||||
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.16.tgz",
|
||||
"integrity": "sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cssesc": "^3.0.0",
|
||||
@@ -3792,16 +3859,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/reflect.getprototypeof": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz",
|
||||
"integrity": "sha512-62wgfC8dJWrmxv44CA36pLDnP6KKl3Vhxb7PL+8+qrrFMMoJij4vgiMP8zV4O8+CBMXY1mHxI5fITGHXFHVmQQ==",
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz",
|
||||
"integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.5",
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.22.3",
|
||||
"es-errors": "^1.0.0",
|
||||
"get-intrinsic": "^1.2.3",
|
||||
"es-abstract": "^1.23.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"globalthis": "^1.0.3",
|
||||
"which-builtin-type": "^1.1.3"
|
||||
},
|
||||
@@ -3940,13 +4007,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/safe-array-concat": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz",
|
||||
"integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==",
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
|
||||
"integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.5",
|
||||
"get-intrinsic": "^1.2.2",
|
||||
"call-bind": "^1.0.7",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"has-symbols": "^1.0.3",
|
||||
"isarray": "^2.0.5"
|
||||
},
|
||||
@@ -4010,17 +4077,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz",
|
||||
"integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==",
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.2",
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.3",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"gopd": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.1"
|
||||
"has-property-descriptors": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -4102,9 +4169,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
||||
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@@ -4203,14 +4270,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/string.prototype.trim": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz",
|
||||
"integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==",
|
||||
"version": "1.2.9",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz",
|
||||
"integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.0",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -4220,14 +4288,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/string.prototype.trimend": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz",
|
||||
"integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==",
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz",
|
||||
"integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@@ -4447,9 +4515,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ts-api-utils": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz",
|
||||
"integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==",
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz",
|
||||
"integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
@@ -4715,31 +4783,34 @@
|
||||
}
|
||||
},
|
||||
"node_modules/which-collection": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz",
|
||||
"integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz",
|
||||
"integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"is-map": "^2.0.1",
|
||||
"is-set": "^2.0.1",
|
||||
"is-weakmap": "^2.0.1",
|
||||
"is-weakset": "^2.0.1"
|
||||
"is-map": "^2.0.3",
|
||||
"is-set": "^2.0.3",
|
||||
"is-weakmap": "^2.0.2",
|
||||
"is-weakset": "^2.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/which-typed-array": {
|
||||
"version": "1.1.14",
|
||||
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz",
|
||||
"integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==",
|
||||
"version": "1.1.15",
|
||||
"resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz",
|
||||
"integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"available-typed-arrays": "^1.0.6",
|
||||
"call-bind": "^1.0.5",
|
||||
"available-typed-arrays": "^1.0.7",
|
||||
"call-bind": "^1.0.7",
|
||||
"for-each": "^0.3.3",
|
||||
"gopd": "^1.0.1",
|
||||
"has-tostringtag": "^1.0.1"
|
||||
"has-tostringtag": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"dependencies": {
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
"next": "14.1.3"
|
||||
"next": "14.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5",
|
||||
@@ -22,6 +22,6 @@
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.1.3"
|
||||
"eslint-config-next": "14.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,4 +35,4 @@ Afterwards, start the Remix development server like so:
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Open up [http://localhost:3000](http://localhost:3000) and you should be ready to go!
|
||||
Open up [http://localhost:5173](http://localhost:5173) and you should be ready to go!
|
||||
|
||||
5
examples/zola/package.json
Normal file
5
examples/zola/package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"engines": {
|
||||
"node": "18.x"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel-internals/types
|
||||
|
||||
## 1.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`11218a179`](https://github.com/vercel/vercel/commit/11218a179870a5420c5a6ff720cd4aec4f7e1c5e)]:
|
||||
- @vercel/build-utils@7.9.1
|
||||
|
||||
## 1.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@vercel-internals/types",
|
||||
"version": "1.0.26",
|
||||
"version": "1.0.27",
|
||||
"types": "index.d.ts",
|
||||
"main": "index.d.ts",
|
||||
"files": [
|
||||
@@ -10,7 +10,7 @@
|
||||
"dependencies": {
|
||||
"@types/node": "14.14.31",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"@vercel/routing-utils": "3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vercel/build-utils
|
||||
|
||||
## 7.9.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Export `getSupportedNodeVersion` ([#11277](https://github.com/vercel/vercel/pull/11277))
|
||||
|
||||
## 7.9.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/build-utils",
|
||||
"version": "7.9.0",
|
||||
"version": "7.9.1",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.js",
|
||||
|
||||
@@ -38,6 +38,7 @@ import {
|
||||
import {
|
||||
getLatestNodeVersion,
|
||||
getDiscontinuedNodeVersions,
|
||||
getSupportedNodeVersion,
|
||||
} from './fs/node-version';
|
||||
import streamToBuffer from './fs/stream-to-buffer';
|
||||
import debug from './debug';
|
||||
@@ -72,6 +73,7 @@ export {
|
||||
walkParentDirs,
|
||||
getNodeBinPath,
|
||||
getNodeBinPaths,
|
||||
getSupportedNodeVersion,
|
||||
runNpmInstall,
|
||||
runBundleInstall,
|
||||
runPipInstall,
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# vercel
|
||||
|
||||
## 33.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Don't send `projectSettings.nodeVersion` for unsupported versions ([#11277](https://github.com/vercel/vercel/pull/11277))
|
||||
|
||||
- Updated dependencies [[`4bca0c6d0`](https://github.com/vercel/vercel/commit/4bca0c6d0bc25052b95bd02b12a0b891c86c4b49), [`a67ad4b5a`](https://github.com/vercel/vercel/commit/a67ad4b5a130bf0e56e18111b3f9ddad69cec0e1), [`11218a179`](https://github.com/vercel/vercel/commit/11218a179870a5420c5a6ff720cd4aec4f7e1c5e), [`64b97bf4b`](https://github.com/vercel/vercel/commit/64b97bf4b5203ecf9a95f63ce26a5c3360208966)]:
|
||||
- @vercel/next@4.1.6
|
||||
- @vercel/remix-builder@2.1.4
|
||||
- @vercel/build-utils@7.9.1
|
||||
- @vercel/static-build@2.4.4
|
||||
- @vercel/node@3.0.24
|
||||
|
||||
## 33.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vercel",
|
||||
"version": "33.6.0",
|
||||
"version": "33.6.1",
|
||||
"preferGlobal": true,
|
||||
"license": "Apache-2.0",
|
||||
"description": "The command-line interface for Vercel",
|
||||
@@ -31,22 +31,25 @@
|
||||
"node": ">= 16"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"@vercel/fun": "1.1.0",
|
||||
"@vercel/go": "3.0.5",
|
||||
"@vercel/hydrogen": "1.0.2",
|
||||
"@vercel/next": "4.1.5",
|
||||
"@vercel/node": "3.0.23",
|
||||
"@vercel/next": "4.1.6",
|
||||
"@vercel/node": "3.0.24",
|
||||
"@vercel/python": "4.1.1",
|
||||
"@vercel/redwood": "2.0.8",
|
||||
"@vercel/remix-builder": "2.1.3",
|
||||
"@vercel/remix-builder": "2.1.4",
|
||||
"@vercel/ruby": "2.0.5",
|
||||
"@vercel/static-build": "2.4.3",
|
||||
"@vercel/static-build": "2.4.4",
|
||||
"chokidar": "3.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alex_neo/jest-expect-message": "1.0.5",
|
||||
"@edge-runtime/node-utils": "2.3.0",
|
||||
"@inquirer/core": "7.1.0",
|
||||
"@inquirer/prompts": "4.3.0",
|
||||
"@inquirer/type": "1.2.1",
|
||||
"@next/env": "11.1.2",
|
||||
"@sentry/node": "5.5.0",
|
||||
"@sindresorhus/slugify": "0.11.0",
|
||||
@@ -88,8 +91,8 @@
|
||||
"@types/yauzl-promise": "2.1.0",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel-internals/get-package-json": "1.0.0",
|
||||
"@vercel-internals/types": "1.0.26",
|
||||
"@vercel/client": "13.1.6",
|
||||
"@vercel-internals/types": "1.0.27",
|
||||
"@vercel/client": "13.1.7",
|
||||
"@vercel/error-utils": "2.0.2",
|
||||
"@vercel/frameworks": "3.0.0",
|
||||
"@vercel/fs-detectors": "5.2.1",
|
||||
@@ -126,7 +129,6 @@
|
||||
"glob": "7.1.2",
|
||||
"http-proxy": "1.18.1",
|
||||
"ini": "3.0.0",
|
||||
"inquirer": "7.0.4",
|
||||
"is-docker": "2.2.1",
|
||||
"is-port-reachable": "3.1.0",
|
||||
"is-url": "1.2.2",
|
||||
|
||||
@@ -278,9 +278,7 @@ export default async function bisect(client: Client): Promise<number> {
|
||||
if (openEnabled) {
|
||||
await open(testUrl);
|
||||
}
|
||||
const answer = await client.prompt({
|
||||
type: 'expand',
|
||||
name: 'action',
|
||||
action = await client.input.expand({
|
||||
message: 'Select an action:',
|
||||
choices: [
|
||||
{ key: 'g', name: 'Good', value: 'good' },
|
||||
@@ -288,7 +286,6 @@ export default async function bisect(client: Client): Promise<number> {
|
||||
{ key: 's', name: 'Skip', value: 'skip' },
|
||||
],
|
||||
});
|
||||
action = answer.action;
|
||||
}
|
||||
|
||||
if (action === 'good') {
|
||||
@@ -342,11 +339,7 @@ function getCommit(deployment: Deployment) {
|
||||
async function prompt(client: Client, message: string): Promise<string> {
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
const { val } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'val',
|
||||
message,
|
||||
});
|
||||
const val = await client.input.text({ message });
|
||||
if (val) {
|
||||
return val;
|
||||
} else {
|
||||
|
||||
@@ -102,7 +102,7 @@ function readConfirmation(output: Output, msg: string, certs: Cert[]) {
|
||||
}).replace(/^(.*)/gm, ' $1')}\n`
|
||||
);
|
||||
output.print(
|
||||
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('[y/N] ')}`
|
||||
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('(y/N) ')}`
|
||||
);
|
||||
process.stdin
|
||||
.on('data', d => {
|
||||
|
||||
@@ -1,74 +1,77 @@
|
||||
import ms from 'ms';
|
||||
import fs from 'fs-extra';
|
||||
import bytes from 'bytes';
|
||||
import chalk from 'chalk';
|
||||
import semver from 'semver';
|
||||
import { join, resolve } from 'path';
|
||||
import {
|
||||
getPrettyError,
|
||||
getSupportedNodeVersion,
|
||||
scanParentDirs,
|
||||
} from '@vercel/build-utils';
|
||||
import {
|
||||
fileNameSymbol,
|
||||
VALID_ARCHIVE_FORMATS,
|
||||
VercelConfig,
|
||||
} from '@vercel/client';
|
||||
import code from '../../util/output/code';
|
||||
import highlight from '../../util/output/highlight';
|
||||
import { readLocalConfig } from '../../util/config/files';
|
||||
import getArgs from '../../util/get-args';
|
||||
import { handleError } from '../../util/error';
|
||||
import Client from '../../util/client';
|
||||
import { getPrettyError, scanParentDirs } from '@vercel/build-utils';
|
||||
import toHumanPath from '../../util/humanize-path';
|
||||
import { errorToString, isErrnoException, isError } from '@vercel/error-utils';
|
||||
import bytes from 'bytes';
|
||||
import chalk from 'chalk';
|
||||
import fs from 'fs-extra';
|
||||
import ms from 'ms';
|
||||
import { join, resolve } from 'path';
|
||||
import Now, { CreateOptions } from '../../util';
|
||||
import stamp from '../../util/output/stamp';
|
||||
import Client from '../../util/client';
|
||||
import { readLocalConfig } from '../../util/config/files';
|
||||
import { createGitMeta } from '../../util/create-git-meta';
|
||||
import createDeploy from '../../util/deploy/create-deploy';
|
||||
import getDeployment from '../../util/get-deployment';
|
||||
import parseMeta from '../../util/parse-meta';
|
||||
import param from '../../util/output/param';
|
||||
import { getDeploymentChecks } from '../../util/deploy/get-deployment-checks';
|
||||
import getPrebuiltJson from '../../util/deploy/get-prebuilt-json';
|
||||
import parseTarget from '../../util/deploy/parse-target';
|
||||
import { printDeploymentStatus } from '../../util/deploy/print-deployment-status';
|
||||
import { isValidArchive } from '../../util/deploy/validate-archive-format';
|
||||
import purchaseDomainIfAvailable from '../../util/domains/purchase-domain-if-available';
|
||||
import { emoji, prependEmoji } from '../../util/emoji';
|
||||
import { handleError } from '../../util/error';
|
||||
import { SchemaValidationFailed } from '../../util/errors';
|
||||
import {
|
||||
AliasDomainConfigured,
|
||||
BuildError,
|
||||
BuildsRateLimited,
|
||||
ConflictingFilePath,
|
||||
ConflictingPathSegment,
|
||||
DeploymentNotFound,
|
||||
DeploymentsRateLimited,
|
||||
DomainNotFound,
|
||||
DomainNotVerified,
|
||||
DomainPermissionDenied,
|
||||
DomainVerificationFailed,
|
||||
InvalidDomain,
|
||||
isAPIError,
|
||||
MissingBuildScript,
|
||||
NotDomainOwner,
|
||||
TooManyRequests,
|
||||
UserAborted,
|
||||
DeploymentsRateLimited,
|
||||
AliasDomainConfigured,
|
||||
MissingBuildScript,
|
||||
ConflictingFilePath,
|
||||
ConflictingPathSegment,
|
||||
BuildError,
|
||||
NotDomainOwner,
|
||||
isAPIError,
|
||||
} from '../../util/errors-ts';
|
||||
import { SchemaValidationFailed } from '../../util/errors';
|
||||
import purchaseDomainIfAvailable from '../../util/domains/purchase-domain-if-available';
|
||||
import getArgs from '../../util/get-args';
|
||||
import getDeployment from '../../util/get-deployment';
|
||||
import getProjectName from '../../util/get-project-name';
|
||||
import toHumanPath from '../../util/humanize-path';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import editProjectSettings from '../../util/input/edit-project-settings';
|
||||
import inputProject from '../../util/input/input-project';
|
||||
import { inputRootDirectory } from '../../util/input/input-root-directory';
|
||||
import selectOrg from '../../util/input/select-org';
|
||||
import { Output } from '../../util/output';
|
||||
import code from '../../util/output/code';
|
||||
import highlight from '../../util/output/highlight';
|
||||
import param from '../../util/output/param';
|
||||
import stamp from '../../util/output/stamp';
|
||||
import { parseEnv } from '../../util/parse-env';
|
||||
import parseMeta from '../../util/parse-meta';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
import {
|
||||
getLinkedProject,
|
||||
linkFolderToProject,
|
||||
} from '../../util/projects/link';
|
||||
import getProjectName from '../../util/get-project-name';
|
||||
import selectOrg from '../../util/input/select-org';
|
||||
import inputProject from '../../util/input/input-project';
|
||||
import { prependEmoji, emoji } from '../../util/emoji';
|
||||
import { inputRootDirectory } from '../../util/input/input-root-directory';
|
||||
import { pickOverrides } from '../../util/projects/project-settings';
|
||||
import validatePaths, {
|
||||
validateRootDirectory,
|
||||
} from '../../util/validate-paths';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
import { Output } from '../../util/output';
|
||||
import { getDeploymentChecks } from '../../util/deploy/get-deployment-checks';
|
||||
import parseTarget from '../../util/deploy/parse-target';
|
||||
import getPrebuiltJson from '../../util/deploy/get-prebuilt-json';
|
||||
import { createGitMeta } from '../../util/create-git-meta';
|
||||
import { isValidArchive } from '../../util/deploy/validate-archive-format';
|
||||
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';
|
||||
|
||||
@@ -521,9 +524,13 @@ export default async (client: Client): Promise<number> => {
|
||||
);
|
||||
let nodeVersion: string | undefined;
|
||||
if (packageJson?.engines?.node) {
|
||||
const parsedNodeVersion = semver.coerce(packageJson.engines.node);
|
||||
if (parsedNodeVersion) {
|
||||
nodeVersion = `${parsedNodeVersion.major}.x`;
|
||||
try {
|
||||
const { range } = await getSupportedNodeVersion(packageJson.engines.node);
|
||||
nodeVersion = range;
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
output.warn(error.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ function readConfirmation(
|
||||
}).replace(/^(.*)/gm, ' $1')}\n`
|
||||
);
|
||||
output.print(
|
||||
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('[y/N] ')}`
|
||||
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('(y/N) ')}`
|
||||
);
|
||||
process.stdin
|
||||
.on('data', d => {
|
||||
|
||||
27
packages/cli/src/commands/env/add.ts
vendored
27
packages/cli/src/commands/env/add.ts
vendored
@@ -29,9 +29,6 @@ export default async function add(
|
||||
args: string[],
|
||||
output: Output
|
||||
) {
|
||||
// improve the way we show inquirer prompts
|
||||
require('../../util/input/patch-inquirer');
|
||||
|
||||
const stdInput = await readStandardInput(client.stdin);
|
||||
let [envName, envTargetArg, envGitBranch] = args;
|
||||
|
||||
@@ -67,15 +64,11 @@ export default async function add(
|
||||
}
|
||||
|
||||
while (!envName) {
|
||||
const { inputName } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputName',
|
||||
envName = await client.input({
|
||||
message: `What’s the name of the variable?`,
|
||||
});
|
||||
|
||||
envName = inputName;
|
||||
|
||||
if (!inputName) {
|
||||
if (!envName) {
|
||||
output.error('Name cannot be empty');
|
||||
}
|
||||
}
|
||||
@@ -107,9 +100,7 @@ export default async function add(
|
||||
if (stdInput) {
|
||||
envValue = stdInput;
|
||||
} else {
|
||||
const { inputValue } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputValue',
|
||||
const inputValue = await client.input.text({
|
||||
message: `What’s the value of ${envName}?`,
|
||||
});
|
||||
|
||||
@@ -117,16 +108,12 @@ export default async function add(
|
||||
}
|
||||
|
||||
while (envTargets.length === 0) {
|
||||
const { inputTargets } = await client.prompt({
|
||||
name: 'inputTargets',
|
||||
type: 'checkbox',
|
||||
envTargets = await client.input.checkbox({
|
||||
message: `Add ${envName} to which Environments (select multiple)?`,
|
||||
choices,
|
||||
});
|
||||
|
||||
envTargets = inputTargets;
|
||||
|
||||
if (inputTargets.length === 0) {
|
||||
if (envTargets.length === 0) {
|
||||
output.error('Please select at least one Environment');
|
||||
}
|
||||
}
|
||||
@@ -137,9 +124,7 @@ export default async function add(
|
||||
envTargets.length === 1 &&
|
||||
envTargets[0] === 'preview'
|
||||
) {
|
||||
const { inputValue } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputValue',
|
||||
const inputValue = await client.input.text({
|
||||
message: `Add ${envName} to which Git branch? (leave empty for all Preview branches)?`,
|
||||
});
|
||||
envGitBranch = inputValue || '';
|
||||
|
||||
11
packages/cli/src/commands/env/rm.ts
vendored
11
packages/cli/src/commands/env/rm.ts
vendored
@@ -29,9 +29,6 @@ export default async function rm(
|
||||
args: string[],
|
||||
output: Output
|
||||
) {
|
||||
// improve the way we show inquirer prompts
|
||||
require('../../util/input/patch-inquirer');
|
||||
|
||||
if (args.length > 3) {
|
||||
output.error(
|
||||
`Invalid number of arguments. Usage: ${getCommandName(
|
||||
@@ -44,9 +41,7 @@ export default async function rm(
|
||||
let [envName, envTarget, envGitBranch] = args;
|
||||
|
||||
while (!envName) {
|
||||
const { inputName } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputName',
|
||||
const inputName = await client.input({
|
||||
message: `What’s the name of the variable?`,
|
||||
});
|
||||
|
||||
@@ -86,9 +81,7 @@ export default async function rm(
|
||||
}
|
||||
|
||||
while (envs.length > 1) {
|
||||
const { id } = await client.prompt({
|
||||
name: 'id',
|
||||
type: 'list',
|
||||
const id = await client.select({
|
||||
message: `Remove ${envName} from which Environments?`,
|
||||
choices: envs.map(env => ({ value: env.id, name: formatEnvTarget(env) })),
|
||||
});
|
||||
|
||||
@@ -277,7 +277,7 @@ function readConfirmation(
|
||||
}
|
||||
|
||||
output.print(
|
||||
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('[y/N] ')}`
|
||||
`${chalk.bold.red('> Are you sure?')} ${chalk.gray('(y/N) ')}`
|
||||
);
|
||||
|
||||
process.stdin
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { bold } from 'chalk';
|
||||
import inquirer from 'inquirer';
|
||||
import input from './custom-input/input';
|
||||
import select from './custom-input/select';
|
||||
import checkbox from './custom-input/checkbox';
|
||||
import expand from './custom-input/expand';
|
||||
import confirm from './custom-input/confirm';
|
||||
import { EventEmitter } from 'events';
|
||||
import { URL } from 'url';
|
||||
import { VercelConfig } from '@vercel/client';
|
||||
@@ -66,8 +70,8 @@ export default class Client extends EventEmitter implements Stdio {
|
||||
agent?: Agent;
|
||||
localConfig?: VercelConfig;
|
||||
localConfigPath?: string;
|
||||
prompt!: inquirer.PromptModule;
|
||||
requestIdCounter: number;
|
||||
input;
|
||||
|
||||
constructor(opts: ClientOptions) {
|
||||
super();
|
||||
@@ -83,7 +87,18 @@ export default class Client extends EventEmitter implements Stdio {
|
||||
this.localConfig = opts.localConfig;
|
||||
this.localConfigPath = opts.localConfigPath;
|
||||
this.requestIdCounter = 1;
|
||||
this._createPromptModule();
|
||||
this.input = {
|
||||
text: (opts: Parameters<typeof input>[0]) =>
|
||||
input(opts, { input: this.stdin, output: this.stderr }),
|
||||
checkbox: <T>(opts: Parameters<typeof checkbox<T>>[0]) =>
|
||||
checkbox<T>(opts, { input: this.stdin, output: this.stderr }),
|
||||
expand: (opts: Parameters<typeof expand>[0]) =>
|
||||
expand(opts, { input: this.stdin, output: this.stderr }),
|
||||
confirm: (opts: Parameters<typeof confirm>[0]) =>
|
||||
confirm(opts, { input: this.stdin, output: this.stderr }),
|
||||
select: <T>(opts: Parameters<typeof select<T>>[0]) =>
|
||||
select<T>(opts, { input: this.stdin, output: this.stderr }),
|
||||
};
|
||||
}
|
||||
|
||||
retry<T>(fn: RetryFunction<T>, { retries = 3, maxTimeout = Infinity } = {}) {
|
||||
@@ -229,13 +244,6 @@ export default class Client extends EventEmitter implements Stdio {
|
||||
this.output.debug(`Retrying: ${error}\n${error.stack}`);
|
||||
};
|
||||
|
||||
_createPromptModule() {
|
||||
this.prompt = inquirer.createPromptModule({
|
||||
input: this.stdin as NodeJS.ReadStream,
|
||||
output: this.stderr as NodeJS.WriteStream,
|
||||
});
|
||||
}
|
||||
|
||||
get cwd(): string {
|
||||
return process.cwd();
|
||||
}
|
||||
|
||||
272
packages/cli/src/util/custom-input/checkbox.ts
Normal file
272
packages/cli/src/util/custom-input/checkbox.ts
Normal file
@@ -0,0 +1,272 @@
|
||||
import {
|
||||
createPrompt,
|
||||
useState,
|
||||
useKeypress,
|
||||
usePrefix,
|
||||
usePagination,
|
||||
useMemo,
|
||||
makeTheme,
|
||||
isUpKey,
|
||||
isDownKey,
|
||||
isSpaceKey,
|
||||
isNumberKey,
|
||||
isEnterKey,
|
||||
ValidationError,
|
||||
Separator,
|
||||
type Theme,
|
||||
} from '@inquirer/core';
|
||||
import type { PartialDeep } from '@inquirer/type';
|
||||
import chalk from 'chalk';
|
||||
import figures from './util/figures';
|
||||
import ansiEscapes from 'ansi-escapes';
|
||||
|
||||
import isUnicodeSupported from './util/is-unicode-supported';
|
||||
|
||||
const unicode = isUnicodeSupported();
|
||||
const s = (c: string, fallback: string) => (unicode ? c : fallback);
|
||||
const S_STEP_ACTIVE = s('◆', '*');
|
||||
const S_STEP_SUBMIT = s('◇', 'o');
|
||||
|
||||
const S_BAR = s('│', '|');
|
||||
|
||||
const S_CHECKBOX_SELECTED = s('◼', '[+]');
|
||||
const S_CHECKBOX_INACTIVE = s('◻', '[ ]');
|
||||
|
||||
type Status = 'pending' | 'done';
|
||||
|
||||
const symbol = (state: Status) => {
|
||||
switch (state) {
|
||||
case 'pending':
|
||||
return chalk.cyan(S_STEP_ACTIVE);
|
||||
case 'done':
|
||||
return chalk.green(S_STEP_SUBMIT);
|
||||
}
|
||||
};
|
||||
|
||||
type CheckboxTheme = {
|
||||
icon: {
|
||||
checked: string;
|
||||
unchecked: string;
|
||||
cursor: string;
|
||||
};
|
||||
style: {
|
||||
disabledChoice: (text: string) => string;
|
||||
renderSelectedChoices: <T>(
|
||||
selectedChoices: ReadonlyArray<Choice<T>>,
|
||||
allChoices: ReadonlyArray<Choice<T> | Separator>
|
||||
) => string;
|
||||
};
|
||||
};
|
||||
|
||||
const checkboxTheme: CheckboxTheme = {
|
||||
icon: {
|
||||
checked: chalk.green(figures.circleFilled),
|
||||
unchecked: figures.circle,
|
||||
cursor: figures.pointer,
|
||||
},
|
||||
style: {
|
||||
disabledChoice: (text: string) => chalk.dim(`- ${text}`),
|
||||
renderSelectedChoices: selectedChoices =>
|
||||
selectedChoices.map(choice => choice.name || choice.value).join(', '),
|
||||
},
|
||||
};
|
||||
|
||||
type Choice<Value> = {
|
||||
name?: string;
|
||||
value: Value;
|
||||
disabled?: boolean | string;
|
||||
checked?: boolean;
|
||||
type?: never;
|
||||
};
|
||||
|
||||
type Config<Value> = {
|
||||
message: string;
|
||||
prefix?: string;
|
||||
pageSize?: number;
|
||||
instructions?: string | boolean;
|
||||
choices: ReadonlyArray<Choice<Value> | Separator>;
|
||||
loop?: boolean;
|
||||
required?: boolean;
|
||||
validate?: (
|
||||
items: ReadonlyArray<Item<Value>>
|
||||
) => boolean | string | Promise<string | boolean>;
|
||||
theme?: PartialDeep<Theme<CheckboxTheme>>;
|
||||
};
|
||||
|
||||
type Item<Value> = Separator | Choice<Value>;
|
||||
|
||||
function isSelectable<Value>(item: Item<Value>): item is Choice<Value> {
|
||||
return !Separator.isSeparator(item) && !item.disabled;
|
||||
}
|
||||
|
||||
function isChecked<Value>(item: Item<Value>): item is Choice<Value> {
|
||||
return isSelectable(item) && Boolean(item.checked);
|
||||
}
|
||||
|
||||
function toggle<Value>(item: Item<Value>): Item<Value> {
|
||||
return isSelectable(item) ? { ...item, checked: !item.checked } : item;
|
||||
}
|
||||
|
||||
function check(checked: boolean) {
|
||||
return function <Value>(item: Item<Value>): Item<Value> {
|
||||
return isSelectable(item) ? { ...item, checked } : item;
|
||||
};
|
||||
}
|
||||
|
||||
export default createPrompt(
|
||||
<Value>(config: Config<Value>, done: (value: Array<Value>) => void) => {
|
||||
const {
|
||||
instructions,
|
||||
pageSize = 7,
|
||||
loop = true,
|
||||
choices,
|
||||
required,
|
||||
validate = () => true,
|
||||
} = config;
|
||||
const theme = makeTheme<CheckboxTheme>(checkboxTheme, config.theme);
|
||||
const prefix = usePrefix({ theme });
|
||||
const [status, setStatus] = useState<Status>('pending');
|
||||
const [items, setItems] = useState<ReadonlyArray<Item<Value>>>(
|
||||
choices.map(choice => ({ ...choice }))
|
||||
);
|
||||
|
||||
const bounds = useMemo(() => {
|
||||
const first = items.findIndex(isSelectable);
|
||||
// TODO: Replace with `findLastIndex` when it's available.
|
||||
const last =
|
||||
items.length - 1 - [...items].reverse().findIndex(isSelectable);
|
||||
|
||||
if (first < 0) {
|
||||
throw new ValidationError(
|
||||
'[checkbox prompt] No selectable choices. All choices are disabled.'
|
||||
);
|
||||
}
|
||||
|
||||
return { first, last };
|
||||
}, [items]);
|
||||
|
||||
const [active, setActive] = useState(bounds.first);
|
||||
const [showHelpTip, setShowHelpTip] = useState(true);
|
||||
const [errorMsg, setError] = useState<string | undefined>(undefined);
|
||||
|
||||
useKeypress(async key => {
|
||||
if (isEnterKey(key)) {
|
||||
const selection = items.filter(isChecked);
|
||||
const isValid = await validate([...selection]);
|
||||
if (required && !items.some(isChecked)) {
|
||||
setError('At least one choice must be selected');
|
||||
} else if (isValid === true) {
|
||||
setStatus('done');
|
||||
done(selection.map(choice => choice.value));
|
||||
} else {
|
||||
setError(isValid || 'You must select a valid value');
|
||||
}
|
||||
} else if (isUpKey(key) || isDownKey(key)) {
|
||||
if (
|
||||
loop ||
|
||||
(isUpKey(key) && active !== bounds.first) ||
|
||||
(isDownKey(key) && active !== bounds.last)
|
||||
) {
|
||||
const offset = isUpKey(key) ? -1 : 1;
|
||||
let next = active;
|
||||
do {
|
||||
next = (next + offset + items.length) % items.length;
|
||||
} while (!isSelectable(items[next]!));
|
||||
setActive(next);
|
||||
}
|
||||
} else if (isSpaceKey(key)) {
|
||||
setError(undefined);
|
||||
setShowHelpTip(false);
|
||||
setItems(
|
||||
items.map((choice, i) => (i === active ? toggle(choice) : choice))
|
||||
);
|
||||
} else if (key.name === 'a') {
|
||||
const selectAll = Boolean(
|
||||
items.find(choice => isSelectable(choice) && !choice.checked)
|
||||
);
|
||||
setItems(items.map(check(selectAll)));
|
||||
} else if (key.name === 'i') {
|
||||
setItems(items.map(toggle));
|
||||
} else if (isNumberKey(key)) {
|
||||
// Adjust index to start at 1
|
||||
const position = Number(key.name) - 1;
|
||||
const item = items[position];
|
||||
if (item != null && isSelectable(item)) {
|
||||
setActive(position);
|
||||
setItems(
|
||||
items.map((choice, i) => (i === position ? toggle(choice) : choice))
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const message = theme.style.message(config.message);
|
||||
|
||||
const page = usePagination<Item<Value>>({
|
||||
items,
|
||||
active,
|
||||
renderItem({ item, isActive }: { item: Item<Value>; isActive: boolean }) {
|
||||
if (Separator.isSeparator(item)) {
|
||||
return `${chalk.cyan(S_BAR)} ${item.separator}`;
|
||||
}
|
||||
|
||||
const line = item.name || item.value;
|
||||
if (item.disabled) {
|
||||
const disabledLabel =
|
||||
typeof item.disabled === 'string' ? item.disabled : '(disabled)';
|
||||
return `${chalk.cyan(S_BAR)} ${theme.style.disabledChoice(
|
||||
`${line} ${disabledLabel}`
|
||||
)}`;
|
||||
}
|
||||
|
||||
const checkbox = item.checked
|
||||
? S_CHECKBOX_SELECTED
|
||||
: S_CHECKBOX_INACTIVE;
|
||||
const color = isActive ? theme.style.highlight : (x: string) => x;
|
||||
// const cursor = isActive ? " " : " ";
|
||||
return `${chalk.cyan(S_BAR)} ${color(`${checkbox} ${line}`)}`;
|
||||
},
|
||||
pageSize,
|
||||
loop,
|
||||
theme,
|
||||
});
|
||||
|
||||
let helpTip = '';
|
||||
if (showHelpTip && (instructions === undefined || instructions)) {
|
||||
if (typeof instructions === 'string') {
|
||||
helpTip = instructions;
|
||||
} else {
|
||||
const keys = [
|
||||
`${theme.style.key('space')} to select`,
|
||||
`${theme.style.key('a')} to toggle all`,
|
||||
`${theme.style.key('i')} to invert selection`,
|
||||
`and ${theme.style.key('enter')} to proceed`,
|
||||
];
|
||||
helpTip = ` (Press ${keys.join(', ')})`;
|
||||
}
|
||||
}
|
||||
const title_basic = `${chalk.gray(S_BAR)}\n${symbol(
|
||||
status
|
||||
)} ${prefix} ${message}`;
|
||||
const title_with_help = `${title_basic}${helpTip}\n`;
|
||||
const title_without_help = `${title_basic}\n`;
|
||||
|
||||
if (status === 'done') {
|
||||
const selection = items.filter(isChecked);
|
||||
const answer = theme.style.answer(
|
||||
theme.style.renderSelectedChoices(selection, items)
|
||||
);
|
||||
|
||||
return `${title_without_help}${chalk.gray(S_BAR)} ${answer}`;
|
||||
}
|
||||
|
||||
let error = '';
|
||||
if (errorMsg) {
|
||||
error = theme.style.error(errorMsg);
|
||||
}
|
||||
|
||||
return `${title_with_help}${page}\n${error}${ansiEscapes.cursorHide}`;
|
||||
}
|
||||
);
|
||||
|
||||
export { Separator };
|
||||
128
packages/cli/src/util/custom-input/confirm.ts
Normal file
128
packages/cli/src/util/custom-input/confirm.ts
Normal file
@@ -0,0 +1,128 @@
|
||||
import {
|
||||
createPrompt,
|
||||
useState,
|
||||
useKeypress,
|
||||
isEnterKey,
|
||||
makeTheme,
|
||||
isUpKey,
|
||||
isDownKey,
|
||||
type Theme,
|
||||
type KeypressEvent,
|
||||
} from '@inquirer/core';
|
||||
import type { PartialDeep } from '@inquirer/type';
|
||||
|
||||
import isUnicodeSupported from './util/is-unicode-supported';
|
||||
import chalk from 'chalk';
|
||||
import ansiEscapes from 'ansi-escapes';
|
||||
|
||||
const unicode = isUnicodeSupported();
|
||||
const s = (c: string, fallback: string) => (unicode ? c : fallback);
|
||||
const S_STEP_ACTIVE = s('◆', '*');
|
||||
const S_STEP_SUBMIT = s('◇', 'o');
|
||||
|
||||
const S_BAR = s('│', '|');
|
||||
const S_BAR_END = s('└', '—');
|
||||
|
||||
const S_RADIO_ACTIVE = s('●', '>');
|
||||
const S_RADIO_INACTIVE = s('○', ' ');
|
||||
|
||||
type Status = 'pending' | 'done';
|
||||
|
||||
const symbol = (state: Status) => {
|
||||
switch (state) {
|
||||
case 'pending':
|
||||
return chalk.cyan(S_STEP_ACTIVE);
|
||||
case 'done':
|
||||
return chalk.green(S_STEP_SUBMIT);
|
||||
}
|
||||
};
|
||||
|
||||
type ConfirmConfig = {
|
||||
message: string;
|
||||
default?: CursorState;
|
||||
active?: string;
|
||||
inactive?: string;
|
||||
transformer?: (value: boolean) => string;
|
||||
theme?: PartialDeep<Theme>;
|
||||
};
|
||||
|
||||
const isLeftKey = (key: KeypressEvent): boolean =>
|
||||
// The left key
|
||||
key.name === 'left' ||
|
||||
// Vim keybinding
|
||||
key.name === 'h' ||
|
||||
// Emacs keybinding
|
||||
(key.ctrl && key.name === 'b');
|
||||
|
||||
const isRightKey = (key: KeypressEvent): boolean =>
|
||||
// The right key
|
||||
key.name === 'right' ||
|
||||
// Vim keybinding
|
||||
key.name === 'l' ||
|
||||
// Emacs keybinding
|
||||
(key.ctrl && key.name === 'f');
|
||||
|
||||
export type CursorState = 'yes' | 'no';
|
||||
|
||||
export default createPrompt<boolean, ConfirmConfig>((config, done) => {
|
||||
const { transformer = answer => (answer ? 'yes' : 'no') } = config;
|
||||
const [status, setStatus] = useState<Status>('pending');
|
||||
const [value, setValue] = useState('');
|
||||
const [cursorStatus, setCursorStatus] = useState<CursorState>(
|
||||
(config.default ? 'yes' : 'no') ?? 'yes'
|
||||
);
|
||||
const theme = makeTheme(config.theme);
|
||||
|
||||
const active = config.active ?? 'Yes';
|
||||
const inactive = config.active ?? 'No';
|
||||
|
||||
const toggle = (cursor_state: CursorState): CursorState => {
|
||||
if (cursor_state === 'yes') {
|
||||
return 'no';
|
||||
} else {
|
||||
return 'yes';
|
||||
}
|
||||
};
|
||||
|
||||
useKeypress(key => {
|
||||
if (isEnterKey(key)) {
|
||||
let answer = cursorStatus === 'yes';
|
||||
|
||||
setValue(transformer(answer));
|
||||
setStatus('done');
|
||||
done(answer);
|
||||
} else if (
|
||||
isUpKey(key) ||
|
||||
isDownKey(key) ||
|
||||
isLeftKey(key) ||
|
||||
isRightKey(key)
|
||||
) {
|
||||
setCursorStatus(toggle(cursorStatus));
|
||||
// setValue(rl.line);
|
||||
}
|
||||
});
|
||||
|
||||
const message = theme.style.message(config.message);
|
||||
const title = `${chalk.gray(S_BAR)}\n${symbol(status)} ${message}\n`;
|
||||
|
||||
const output = (status: Status) => {
|
||||
switch (status) {
|
||||
case 'done':
|
||||
return `${title}${chalk.gray(S_BAR)} ${chalk.dim(
|
||||
value === 'yes' ? active : inactive
|
||||
)}`;
|
||||
default:
|
||||
return `${title}${chalk.cyan(S_BAR)} ${
|
||||
cursorStatus === 'yes'
|
||||
? `${chalk.green(S_RADIO_ACTIVE)} ${active}`
|
||||
: `${chalk.dim(S_RADIO_INACTIVE)} ${chalk.dim(active)}`
|
||||
} ${chalk.dim('/')} ${
|
||||
cursorStatus === 'no'
|
||||
? `${chalk.green(S_RADIO_ACTIVE)} ${inactive}`
|
||||
: `${chalk.dim(S_RADIO_INACTIVE)} ${chalk.dim(inactive)}`
|
||||
} \n${chalk.cyan(S_BAR_END)} \n${ansiEscapes.cursorHide} `;
|
||||
}
|
||||
};
|
||||
|
||||
return output(status);
|
||||
});
|
||||
161
packages/cli/src/util/custom-input/expand.ts
Normal file
161
packages/cli/src/util/custom-input/expand.ts
Normal file
@@ -0,0 +1,161 @@
|
||||
import {
|
||||
createPrompt,
|
||||
useState,
|
||||
useKeypress,
|
||||
usePrefix,
|
||||
isEnterKey,
|
||||
makeTheme,
|
||||
type Theme,
|
||||
} from '@inquirer/core';
|
||||
import type { PartialDeep } from '@inquirer/type';
|
||||
import chalk from 'chalk';
|
||||
|
||||
import isUnicodeSupported from './util/is-unicode-supported';
|
||||
|
||||
const unicode = isUnicodeSupported();
|
||||
const s = (c: string, fallback: string) => (unicode ? c : fallback);
|
||||
const S_STEP_ACTIVE = s('◆', '*');
|
||||
const S_STEP_SUBMIT = s('◇', 'o');
|
||||
|
||||
const S_BAR = s('│', '|');
|
||||
const S_BAR_END = s('└', '—');
|
||||
|
||||
type Status = 'pending' | 'done';
|
||||
|
||||
const symbol = (state: Status) => {
|
||||
switch (state) {
|
||||
case 'pending':
|
||||
return chalk.cyan(S_STEP_ACTIVE);
|
||||
case 'done':
|
||||
return chalk.green(S_STEP_SUBMIT);
|
||||
}
|
||||
};
|
||||
|
||||
type ExpandChoice =
|
||||
| { key: string; name: string }
|
||||
| { key: string; value: string }
|
||||
| { key: string; name: string; value: string };
|
||||
|
||||
type ExpandConfig = {
|
||||
message: string;
|
||||
choices: ReadonlyArray<ExpandChoice>;
|
||||
default?: string;
|
||||
expanded?: boolean;
|
||||
theme?: PartialDeep<Theme>;
|
||||
};
|
||||
|
||||
const helpChoice = {
|
||||
key: 'h',
|
||||
name: 'Help, list all options',
|
||||
value: undefined,
|
||||
};
|
||||
|
||||
function getChoiceKey(choice: ExpandChoice, key: 'name' | 'value'): string {
|
||||
if (key === 'name') {
|
||||
if ('name' in choice) return choice.name;
|
||||
return choice.value;
|
||||
}
|
||||
|
||||
if ('value' in choice) return choice.value;
|
||||
return choice.name;
|
||||
}
|
||||
|
||||
export default createPrompt<string, ExpandConfig>((config, done) => {
|
||||
const {
|
||||
choices,
|
||||
default: defaultKey = 'h',
|
||||
expanded: defaultExpandState = false,
|
||||
} = config;
|
||||
const [status, setStatus] = useState<string>('pending');
|
||||
const [value, setValue] = useState<string>('');
|
||||
const [expanded, setExpanded] = useState<boolean>(defaultExpandState);
|
||||
const [errorMsg, setError] = useState<string | undefined>(undefined);
|
||||
const theme = makeTheme(config.theme);
|
||||
const prefix = usePrefix({ theme });
|
||||
|
||||
useKeypress((event, rl) => {
|
||||
if (isEnterKey(event)) {
|
||||
const answer = (value || defaultKey).toLowerCase();
|
||||
if (answer === 'h' && !expanded) {
|
||||
setExpanded(true);
|
||||
} else {
|
||||
const selectedChoice = choices.find(({ key }) => key === answer);
|
||||
if (selectedChoice) {
|
||||
const finalValue = getChoiceKey(selectedChoice, 'value');
|
||||
setValue(finalValue);
|
||||
setStatus('done');
|
||||
done(finalValue);
|
||||
} else if (value === '') {
|
||||
setError('Please input a value');
|
||||
} else {
|
||||
setError(`"${chalk.red(value)}" isn't an available option`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
setValue(rl.line);
|
||||
setError(undefined);
|
||||
}
|
||||
});
|
||||
|
||||
const message = theme.style.message(config.message);
|
||||
|
||||
const title = `${chalk.gray(S_BAR)}\n${symbol(status)} ${prefix} ${message}`;
|
||||
|
||||
if (status === 'done') {
|
||||
// TODO: `value` should be the display name instead of the raw value.
|
||||
return `${title}\n${chalk.gray(S_BAR)} ${theme.style.answer(value)}`;
|
||||
}
|
||||
|
||||
const allChoices = expanded ? choices : [...choices, helpChoice];
|
||||
|
||||
// Collapsed display style
|
||||
let longChoices = '';
|
||||
let shortChoices = allChoices
|
||||
.map(choice => {
|
||||
if (choice.key === defaultKey) {
|
||||
return choice.key.toUpperCase();
|
||||
}
|
||||
|
||||
return choice.key;
|
||||
})
|
||||
.join('');
|
||||
shortChoices = ` ${theme.style.defaultAnswer(shortChoices)}`;
|
||||
|
||||
// Expanded display style
|
||||
if (expanded) {
|
||||
shortChoices = '';
|
||||
longChoices = allChoices
|
||||
.map(choice => {
|
||||
const line = ` ${choice.key}) ${getChoiceKey(choice, 'name')}`;
|
||||
if (choice.key === value.toLowerCase()) {
|
||||
return `${chalk.cyan(S_BAR)} ${theme.style.highlight(line)}`;
|
||||
}
|
||||
|
||||
return `${chalk.cyan(S_BAR)} ${line}`;
|
||||
})
|
||||
.join('\n');
|
||||
}
|
||||
|
||||
let helpTip = '';
|
||||
const currentOption = allChoices.find(
|
||||
({ key }) => key === value.toLowerCase()
|
||||
);
|
||||
if (currentOption) {
|
||||
helpTip = `${chalk.cyan(S_BAR)} ${chalk.cyan('>>')} ${getChoiceKey(
|
||||
currentOption,
|
||||
'name'
|
||||
)} `;
|
||||
}
|
||||
|
||||
let error = '';
|
||||
if (errorMsg) {
|
||||
error = theme.style.error(errorMsg);
|
||||
}
|
||||
|
||||
return [
|
||||
`${title}${shortChoices} \n${chalk.cyan(S_BAR)} ${value}`,
|
||||
`${[longChoices, helpTip, error, chalk.cyan(S_BAR_END)]
|
||||
.filter(Boolean)
|
||||
.join('\n')}`,
|
||||
];
|
||||
});
|
||||
129
packages/cli/src/util/custom-input/input.ts
Normal file
129
packages/cli/src/util/custom-input/input.ts
Normal file
@@ -0,0 +1,129 @@
|
||||
import {
|
||||
createPrompt,
|
||||
useState,
|
||||
useKeypress,
|
||||
isEnterKey,
|
||||
isBackspaceKey,
|
||||
makeTheme,
|
||||
type Theme,
|
||||
} from '@inquirer/core';
|
||||
|
||||
import type { PartialDeep } from '@inquirer/type';
|
||||
import chalk from 'chalk';
|
||||
import ansiEscapes from 'ansi-escapes';
|
||||
import isUnicodeSupported from './util/is-unicode-supported';
|
||||
|
||||
const unicode = isUnicodeSupported();
|
||||
const s = (c: string, fallback: string) => (unicode ? c : fallback);
|
||||
const S_STEP_ACTIVE = s('◆', '*');
|
||||
const S_STEP_CANCEL = s('■', 'x');
|
||||
const S_STEP_SUBMIT = s('◇', 'o');
|
||||
|
||||
const S_BAR = s('│', '|');
|
||||
const S_BAR_END = s('└', '—');
|
||||
|
||||
type InputConfig = {
|
||||
message: string;
|
||||
default?: string;
|
||||
transformer?: (value: string, { isFinal }: { isFinal: boolean }) => string;
|
||||
validate?: (value: string) => boolean | string | Promise<string | boolean>;
|
||||
theme?: PartialDeep<Theme>;
|
||||
};
|
||||
|
||||
type Status = 'pending' | 'loading' | 'done';
|
||||
|
||||
const symbol = (state: Status) => {
|
||||
switch (state) {
|
||||
case 'pending':
|
||||
return chalk.cyan(S_STEP_ACTIVE);
|
||||
case 'loading':
|
||||
return chalk.red(S_STEP_CANCEL);
|
||||
case 'done':
|
||||
return chalk.green(S_STEP_SUBMIT);
|
||||
}
|
||||
};
|
||||
|
||||
export default createPrompt<string, InputConfig>((config, done) => {
|
||||
const { validate = () => true } = config;
|
||||
const theme = makeTheme(config.theme);
|
||||
const [status, setStatus] = useState<Status>('pending');
|
||||
const [cursorIndex, setCursorIndex] = useState<number>(0);
|
||||
const [defaultValue = '', setDefaultValue] = useState<string>(
|
||||
config.default || ''
|
||||
);
|
||||
const [errorMsg, setError] = useState<string | undefined>(undefined);
|
||||
const [value, setValue] = useState<string>('');
|
||||
|
||||
useKeypress(async (key, rl) => {
|
||||
// Ignore keypress while our prompt is doing other processing.
|
||||
if (status !== 'pending') {
|
||||
return;
|
||||
}
|
||||
setCursorIndex(rl.cursor);
|
||||
if (isEnterKey(key)) {
|
||||
const answer = value || defaultValue;
|
||||
setStatus('loading');
|
||||
const isValid = await validate(answer);
|
||||
if (isValid === true) {
|
||||
setValue(answer);
|
||||
setStatus('done');
|
||||
done(answer);
|
||||
} else {
|
||||
// Reset the readline line value to the previous value. On line event, the value
|
||||
// get cleared, forcing the user to re-enter the value instead of fixing it.
|
||||
rl.write(value);
|
||||
setError(isValid || 'You must provide a valid value');
|
||||
setStatus('pending');
|
||||
}
|
||||
} else if (isBackspaceKey(key) && !value) {
|
||||
setDefaultValue('');
|
||||
} else if (key.name === 'tab' && !value) {
|
||||
setDefaultValue('');
|
||||
rl.clearLine(0); // Remove the tab character.
|
||||
rl.write(defaultValue);
|
||||
setValue(defaultValue);
|
||||
} else {
|
||||
setValue(rl.line);
|
||||
setError(undefined);
|
||||
}
|
||||
});
|
||||
|
||||
const message = theme.style.message(config.message);
|
||||
let formattedValue = value;
|
||||
if (typeof config.transformer === 'function') {
|
||||
formattedValue = config.transformer(value, { isFinal: status === 'done' });
|
||||
} else if (status === 'done') {
|
||||
formattedValue = theme.style.answer(value);
|
||||
}
|
||||
|
||||
let error = '';
|
||||
if (errorMsg) {
|
||||
error = theme.style.error(errorMsg);
|
||||
}
|
||||
|
||||
let valueWithCursor: any;
|
||||
if (cursorIndex && cursorIndex >= value.length) {
|
||||
valueWithCursor = `${value}${chalk.inverse(chalk.hidden(' '))}`;
|
||||
} else {
|
||||
const s1 = value.slice(0, cursorIndex);
|
||||
const s2 = value.slice(cursorIndex);
|
||||
if (s2.length !== 0)
|
||||
valueWithCursor = `${s1}${chalk.inverse(s2[0])}${s2.slice(1)}`;
|
||||
else valueWithCursor = `${s1}${chalk.inverse(' ')}`;
|
||||
}
|
||||
|
||||
const title = `${chalk.gray(S_BAR)}\n${symbol(status)} ${message}\n`;
|
||||
|
||||
const output = (status: any) => {
|
||||
switch (status) {
|
||||
case 'done':
|
||||
return `${title}${chalk.gray(S_BAR)} ${formattedValue}`;
|
||||
default:
|
||||
return `${title}${chalk.cyan(S_BAR)} ${valueWithCursor}\n${chalk.cyan(
|
||||
S_BAR_END
|
||||
)}\n${ansiEscapes.cursorHide}`;
|
||||
}
|
||||
};
|
||||
|
||||
return [output(status), error];
|
||||
});
|
||||
229
packages/cli/src/util/custom-input/select.ts
Normal file
229
packages/cli/src/util/custom-input/select.ts
Normal file
@@ -0,0 +1,229 @@
|
||||
import {
|
||||
createPrompt,
|
||||
useState,
|
||||
useKeypress,
|
||||
usePrefix,
|
||||
usePagination,
|
||||
useRef,
|
||||
useMemo,
|
||||
isBackspaceKey,
|
||||
isEnterKey,
|
||||
isUpKey,
|
||||
isDownKey,
|
||||
isNumberKey,
|
||||
Separator,
|
||||
ValidationError,
|
||||
makeTheme,
|
||||
type Theme,
|
||||
} from '@inquirer/core';
|
||||
import type { PartialDeep } from '@inquirer/type';
|
||||
import chalk from 'chalk';
|
||||
import figures from './util/figures';
|
||||
import ansiEscapes from 'ansi-escapes';
|
||||
|
||||
import isUnicodeSupported from './util/is-unicode-supported';
|
||||
|
||||
const unicode = isUnicodeSupported();
|
||||
const s = (c: string, fallback: string) => (unicode ? c : fallback);
|
||||
const S_STEP_ACTIVE = s('◆', '*');
|
||||
const S_STEP_SUBMIT = s('◇', 'o');
|
||||
|
||||
const S_BAR = s('│', '|');
|
||||
const S_BAR_END = s('└', '—');
|
||||
|
||||
const S_RADIO_ACTIVE = s('●', '>');
|
||||
const S_RADIO_INACTIVE = s('○', ' ');
|
||||
|
||||
type SelectTheme = {
|
||||
icon: { cursor: string };
|
||||
style: { disabled: (text: string) => string };
|
||||
};
|
||||
|
||||
const selectTheme: SelectTheme = {
|
||||
icon: { cursor: figures.pointer },
|
||||
style: { disabled: (text: string) => chalk.dim(`- ${text}`) },
|
||||
};
|
||||
|
||||
type Choice<Value> = {
|
||||
value: Value;
|
||||
name?: string;
|
||||
description?: string;
|
||||
disabled?: boolean | string;
|
||||
type?: never;
|
||||
};
|
||||
|
||||
type SelectConfig<Value> = {
|
||||
message: string;
|
||||
choices: ReadonlyArray<Choice<Value> | Separator>;
|
||||
pageSize?: number;
|
||||
loop?: boolean;
|
||||
default?: unknown;
|
||||
theme?: PartialDeep<Theme<SelectTheme>>;
|
||||
};
|
||||
|
||||
type Item<Value> = Separator | Choice<Value>;
|
||||
|
||||
function isSelectable<Value>(item: Item<Value>): item is Choice<Value> {
|
||||
return !Separator.isSeparator(item) && !item.disabled;
|
||||
}
|
||||
|
||||
type Status = 'pending' | 'done';
|
||||
|
||||
const symbol = (state: Status) => {
|
||||
switch (state) {
|
||||
case 'pending':
|
||||
return chalk.cyan(S_STEP_ACTIVE);
|
||||
case 'done':
|
||||
return chalk.green(S_STEP_SUBMIT);
|
||||
}
|
||||
};
|
||||
|
||||
export default createPrompt(
|
||||
<Value>(
|
||||
config: SelectConfig<Value>,
|
||||
done: (value: Value) => void
|
||||
): string => {
|
||||
const { choices: items, loop = true, pageSize = 7 } = config;
|
||||
const firstRender = useRef(true);
|
||||
const theme = makeTheme<SelectTheme>(selectTheme, config.theme);
|
||||
const prefix = usePrefix({ theme });
|
||||
const [status, setStatus] = useState<Status>('pending');
|
||||
const searchTimeoutRef = useRef<ReturnType<typeof setTimeout> | undefined>(
|
||||
undefined
|
||||
);
|
||||
|
||||
const bounds = useMemo(() => {
|
||||
const first = items.findIndex(isSelectable);
|
||||
// TODO: Replace with `findLastIndex` when it's available.
|
||||
const last =
|
||||
items.length - 1 - [...items].reverse().findIndex(isSelectable);
|
||||
if (first < 0)
|
||||
throw new ValidationError(
|
||||
'[select prompt] No selectable choices. All choices are disabled.'
|
||||
);
|
||||
return { first, last };
|
||||
}, [items]);
|
||||
|
||||
const defaultItemIndex = useMemo(() => {
|
||||
if (!('default' in config)) return -1;
|
||||
return items.findIndex(
|
||||
item => isSelectable(item) && item.value === config.default
|
||||
);
|
||||
}, [config.default, items]);
|
||||
|
||||
const [active, setActive] = useState(
|
||||
defaultItemIndex === -1 ? bounds.first : defaultItemIndex
|
||||
);
|
||||
|
||||
// Safe to assume the cursor position always point to a Choice.
|
||||
const selectedChoice = items[active] as Choice<Value>;
|
||||
|
||||
useKeypress((key, rl) => {
|
||||
clearTimeout(searchTimeoutRef.current);
|
||||
|
||||
if (isEnterKey(key)) {
|
||||
setStatus('done');
|
||||
done(selectedChoice.value);
|
||||
} else if (isUpKey(key) || isDownKey(key)) {
|
||||
rl.clearLine(0);
|
||||
if (
|
||||
loop ||
|
||||
(isUpKey(key) && active !== bounds.first) ||
|
||||
(isDownKey(key) && active !== bounds.last)
|
||||
) {
|
||||
const offset = isUpKey(key) ? -1 : 1;
|
||||
let next = active;
|
||||
do {
|
||||
next = (next + offset + items.length) % items.length;
|
||||
} while (!isSelectable(items[next]!));
|
||||
setActive(next);
|
||||
}
|
||||
} else if (isNumberKey(key)) {
|
||||
rl.clearLine(0);
|
||||
const position = Number(key.name) - 1;
|
||||
const item = items[position];
|
||||
if (item != null && isSelectable(item)) {
|
||||
setActive(position);
|
||||
}
|
||||
} else if (isBackspaceKey(key)) {
|
||||
rl.clearLine(0);
|
||||
} else {
|
||||
// Default to search
|
||||
const searchTerm = rl.line.toLowerCase();
|
||||
const matchIndex = items.findIndex(item => {
|
||||
if (Separator.isSeparator(item) || !isSelectable(item)) return false;
|
||||
|
||||
return String(item.name || item.value)
|
||||
.toLowerCase()
|
||||
.startsWith(searchTerm);
|
||||
});
|
||||
|
||||
if (matchIndex >= 0) {
|
||||
setActive(matchIndex);
|
||||
}
|
||||
|
||||
searchTimeoutRef.current = setTimeout(() => {
|
||||
rl.clearLine(0);
|
||||
}, 700);
|
||||
}
|
||||
});
|
||||
|
||||
const message = theme.style.message(config.message);
|
||||
|
||||
let helpTip;
|
||||
if (firstRender.current && items.length <= pageSize) {
|
||||
firstRender.current = false;
|
||||
helpTip = theme.style.help('(Use arrow keys)');
|
||||
}
|
||||
|
||||
const page = usePagination<Item<Value>>({
|
||||
items,
|
||||
active,
|
||||
renderItem({ item, isActive }: { item: Item<Value>; isActive: boolean }) {
|
||||
if (Separator.isSeparator(item)) {
|
||||
return `${chalk.cyan(S_BAR)} ${item.separator}`;
|
||||
}
|
||||
|
||||
const line = item.name || item.value;
|
||||
if (item.disabled) {
|
||||
const disabledLabel =
|
||||
typeof item.disabled === 'string' ? item.disabled : '(disabled)';
|
||||
return theme.style.disabled(`${line} ${disabledLabel}`);
|
||||
}
|
||||
|
||||
const color = isActive ? theme.style.highlight : (x: string) => x;
|
||||
const cursor = isActive ? S_RADIO_ACTIVE : S_RADIO_INACTIVE;
|
||||
return `${chalk.cyan(S_BAR)} ${color(`${cursor} ${line}`)}`;
|
||||
},
|
||||
pageSize,
|
||||
loop,
|
||||
theme,
|
||||
});
|
||||
|
||||
const title = `${chalk.gray(S_BAR)}\n${symbol(status)} ${[
|
||||
prefix,
|
||||
message,
|
||||
helpTip,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}\n`;
|
||||
|
||||
if (status === 'done') {
|
||||
const answer =
|
||||
selectedChoice.name ||
|
||||
// TODO: Could we enforce that at the type level? Name should be defined for non-string values.
|
||||
String(selectedChoice.value);
|
||||
return `${title}${chalk.gray(S_BAR)} ${theme.style.answer(answer)}`;
|
||||
}
|
||||
|
||||
const choiceDescription = selectedChoice.description
|
||||
? `\n${selectedChoice.description}`
|
||||
: ``;
|
||||
|
||||
return `${title}${page}${choiceDescription}\n${chalk.cyan(S_BAR_END)}${
|
||||
ansiEscapes.cursorHide
|
||||
} `;
|
||||
}
|
||||
);
|
||||
|
||||
export { Separator };
|
||||
307
packages/cli/src/util/custom-input/util/figures.ts
Normal file
307
packages/cli/src/util/custom-input/util/figures.ts
Normal file
@@ -0,0 +1,307 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import isUnicodeSupported from './is-unicode-supported';
|
||||
|
||||
const common = {
|
||||
circleQuestionMark: '(?)',
|
||||
questionMarkPrefix: '(?)',
|
||||
square: '█',
|
||||
squareDarkShade: '▓',
|
||||
squareMediumShade: '▒',
|
||||
squareLightShade: '░',
|
||||
squareTop: '▀',
|
||||
squareBottom: '▄',
|
||||
squareLeft: '▌',
|
||||
squareRight: '▐',
|
||||
squareCenter: '■',
|
||||
bullet: '●',
|
||||
dot: '․',
|
||||
ellipsis: '…',
|
||||
pointerSmall: '›',
|
||||
triangleUp: '▲',
|
||||
triangleUpSmall: '▴',
|
||||
triangleDown: '▼',
|
||||
triangleDownSmall: '▾',
|
||||
triangleLeftSmall: '◂',
|
||||
triangleRightSmall: '▸',
|
||||
home: '⌂',
|
||||
heart: '♥',
|
||||
musicNote: '♪',
|
||||
musicNoteBeamed: '♫',
|
||||
arrowUp: '↑',
|
||||
arrowDown: '↓',
|
||||
arrowLeft: '←',
|
||||
arrowRight: '→',
|
||||
arrowLeftRight: '↔',
|
||||
arrowUpDown: '↕',
|
||||
almostEqual: '≈',
|
||||
notEqual: '≠',
|
||||
lessOrEqual: '≤',
|
||||
greaterOrEqual: '≥',
|
||||
identical: '≡',
|
||||
infinity: '∞',
|
||||
subscriptZero: '₀',
|
||||
subscriptOne: '₁',
|
||||
subscriptTwo: '₂',
|
||||
subscriptThree: '₃',
|
||||
subscriptFour: '₄',
|
||||
subscriptFive: '₅',
|
||||
subscriptSix: '₆',
|
||||
subscriptSeven: '₇',
|
||||
subscriptEight: '₈',
|
||||
subscriptNine: '₉',
|
||||
oneHalf: '½',
|
||||
oneThird: '⅓',
|
||||
oneQuarter: '¼',
|
||||
oneFifth: '⅕',
|
||||
oneSixth: '⅙',
|
||||
oneEighth: '⅛',
|
||||
twoThirds: '⅔',
|
||||
twoFifths: '⅖',
|
||||
threeQuarters: '¾',
|
||||
threeFifths: '⅗',
|
||||
threeEighths: '⅜',
|
||||
fourFifths: '⅘',
|
||||
fiveSixths: '⅚',
|
||||
fiveEighths: '⅝',
|
||||
sevenEighths: '⅞',
|
||||
line: '─',
|
||||
lineBold: '━',
|
||||
lineDouble: '═',
|
||||
lineDashed0: '┄',
|
||||
lineDashed1: '┅',
|
||||
lineDashed2: '┈',
|
||||
lineDashed3: '┉',
|
||||
lineDashed4: '╌',
|
||||
lineDashed5: '╍',
|
||||
lineDashed6: '╴',
|
||||
lineDashed7: '╶',
|
||||
lineDashed8: '╸',
|
||||
lineDashed9: '╺',
|
||||
lineDashed10: '╼',
|
||||
lineDashed11: '╾',
|
||||
lineDashed12: '−',
|
||||
lineDashed13: '–',
|
||||
lineDashed14: '‐',
|
||||
lineDashed15: '⁃',
|
||||
lineVertical: '│',
|
||||
lineVerticalBold: '┃',
|
||||
lineVerticalDouble: '║',
|
||||
lineVerticalDashed0: '┆',
|
||||
lineVerticalDashed1: '┇',
|
||||
lineVerticalDashed2: '┊',
|
||||
lineVerticalDashed3: '┋',
|
||||
lineVerticalDashed4: '╎',
|
||||
lineVerticalDashed5: '╏',
|
||||
lineVerticalDashed6: '╵',
|
||||
lineVerticalDashed7: '╷',
|
||||
lineVerticalDashed8: '╹',
|
||||
lineVerticalDashed9: '╻',
|
||||
lineVerticalDashed10: '╽',
|
||||
lineVerticalDashed11: '╿',
|
||||
lineDownLeft: '┐',
|
||||
lineDownLeftArc: '╮',
|
||||
lineDownBoldLeftBold: '┓',
|
||||
lineDownBoldLeft: '┒',
|
||||
lineDownLeftBold: '┑',
|
||||
lineDownDoubleLeftDouble: '╗',
|
||||
lineDownDoubleLeft: '╖',
|
||||
lineDownLeftDouble: '╕',
|
||||
lineDownRight: '┌',
|
||||
lineDownRightArc: '╭',
|
||||
lineDownBoldRightBold: '┏',
|
||||
lineDownBoldRight: '┎',
|
||||
lineDownRightBold: '┍',
|
||||
lineDownDoubleRightDouble: '╔',
|
||||
lineDownDoubleRight: '╓',
|
||||
lineDownRightDouble: '╒',
|
||||
lineUpLeft: '┘',
|
||||
lineUpLeftArc: '╯',
|
||||
lineUpBoldLeftBold: '┛',
|
||||
lineUpBoldLeft: '┚',
|
||||
lineUpLeftBold: '┙',
|
||||
lineUpDoubleLeftDouble: '╝',
|
||||
lineUpDoubleLeft: '╜',
|
||||
lineUpLeftDouble: '╛',
|
||||
lineUpRight: '└',
|
||||
lineUpRightArc: '╰',
|
||||
lineUpBoldRightBold: '┗',
|
||||
lineUpBoldRight: '┖',
|
||||
lineUpRightBold: '┕',
|
||||
lineUpDoubleRightDouble: '╚',
|
||||
lineUpDoubleRight: '╙',
|
||||
lineUpRightDouble: '╘',
|
||||
lineUpDownLeft: '┤',
|
||||
lineUpBoldDownBoldLeftBold: '┫',
|
||||
lineUpBoldDownBoldLeft: '┨',
|
||||
lineUpDownLeftBold: '┥',
|
||||
lineUpBoldDownLeftBold: '┩',
|
||||
lineUpDownBoldLeftBold: '┪',
|
||||
lineUpDownBoldLeft: '┧',
|
||||
lineUpBoldDownLeft: '┦',
|
||||
lineUpDoubleDownDoubleLeftDouble: '╣',
|
||||
lineUpDoubleDownDoubleLeft: '╢',
|
||||
lineUpDownLeftDouble: '╡',
|
||||
lineUpDownRight: '├',
|
||||
lineUpBoldDownBoldRightBold: '┣',
|
||||
lineUpBoldDownBoldRight: '┠',
|
||||
lineUpDownRightBold: '┝',
|
||||
lineUpBoldDownRightBold: '┡',
|
||||
lineUpDownBoldRightBold: '┢',
|
||||
lineUpDownBoldRight: '┟',
|
||||
lineUpBoldDownRight: '┞',
|
||||
lineUpDoubleDownDoubleRightDouble: '╠',
|
||||
lineUpDoubleDownDoubleRight: '╟',
|
||||
lineUpDownRightDouble: '╞',
|
||||
lineDownLeftRight: '┬',
|
||||
lineDownBoldLeftBoldRightBold: '┳',
|
||||
lineDownLeftBoldRightBold: '┯',
|
||||
lineDownBoldLeftRight: '┰',
|
||||
lineDownBoldLeftBoldRight: '┱',
|
||||
lineDownBoldLeftRightBold: '┲',
|
||||
lineDownLeftRightBold: '┮',
|
||||
lineDownLeftBoldRight: '┭',
|
||||
lineDownDoubleLeftDoubleRightDouble: '╦',
|
||||
lineDownDoubleLeftRight: '╥',
|
||||
lineDownLeftDoubleRightDouble: '╤',
|
||||
lineUpLeftRight: '┴',
|
||||
lineUpBoldLeftBoldRightBold: '┻',
|
||||
lineUpLeftBoldRightBold: '┷',
|
||||
lineUpBoldLeftRight: '┸',
|
||||
lineUpBoldLeftBoldRight: '┹',
|
||||
lineUpBoldLeftRightBold: '┺',
|
||||
lineUpLeftRightBold: '┶',
|
||||
lineUpLeftBoldRight: '┵',
|
||||
lineUpDoubleLeftDoubleRightDouble: '╩',
|
||||
lineUpDoubleLeftRight: '╨',
|
||||
lineUpLeftDoubleRightDouble: '╧',
|
||||
lineUpDownLeftRight: '┼',
|
||||
lineUpBoldDownBoldLeftBoldRightBold: '╋',
|
||||
lineUpDownBoldLeftBoldRightBold: '╈',
|
||||
lineUpBoldDownLeftBoldRightBold: '╇',
|
||||
lineUpBoldDownBoldLeftRightBold: '╊',
|
||||
lineUpBoldDownBoldLeftBoldRight: '╉',
|
||||
lineUpBoldDownLeftRight: '╀',
|
||||
lineUpDownBoldLeftRight: '╁',
|
||||
lineUpDownLeftBoldRight: '┽',
|
||||
lineUpDownLeftRightBold: '┾',
|
||||
lineUpBoldDownBoldLeftRight: '╂',
|
||||
lineUpDownLeftBoldRightBold: '┿',
|
||||
lineUpBoldDownLeftBoldRight: '╃',
|
||||
lineUpBoldDownLeftRightBold: '╄',
|
||||
lineUpDownBoldLeftBoldRight: '╅',
|
||||
lineUpDownBoldLeftRightBold: '╆',
|
||||
lineUpDoubleDownDoubleLeftDoubleRightDouble: '╬',
|
||||
lineUpDoubleDownDoubleLeftRight: '╫',
|
||||
lineUpDownLeftDoubleRightDouble: '╪',
|
||||
lineCross: '╳',
|
||||
lineBackslash: '╲',
|
||||
lineSlash: '╱',
|
||||
};
|
||||
|
||||
const specialMainSymbols = {
|
||||
tick: '✔',
|
||||
info: 'ℹ',
|
||||
warning: '⚠',
|
||||
cross: '✘',
|
||||
squareSmall: '◻',
|
||||
squareSmallFilled: '◼',
|
||||
circle: '◯',
|
||||
circleFilled: '◉',
|
||||
circleDotted: '◌',
|
||||
circleDouble: '◎',
|
||||
circleCircle: 'ⓞ',
|
||||
circleCross: 'ⓧ',
|
||||
circlePipe: 'Ⓘ',
|
||||
radioOn: '◉',
|
||||
radioOff: '◯',
|
||||
checkboxOn: '☒',
|
||||
checkboxOff: '☐',
|
||||
checkboxCircleOn: 'ⓧ',
|
||||
checkboxCircleOff: 'Ⓘ',
|
||||
pointer: '❯',
|
||||
triangleUpOutline: '△',
|
||||
triangleLeft: '◀',
|
||||
triangleRight: '▶',
|
||||
lozenge: '◆',
|
||||
lozengeOutline: '◇',
|
||||
hamburger: '☰',
|
||||
smiley: '㋡',
|
||||
mustache: '෴',
|
||||
star: '★',
|
||||
play: '▶',
|
||||
nodejs: '⬢',
|
||||
oneSeventh: '⅐',
|
||||
oneNinth: '⅑',
|
||||
oneTenth: '⅒',
|
||||
};
|
||||
|
||||
const specialFallbackSymbols = {
|
||||
tick: '√',
|
||||
info: 'i',
|
||||
warning: '‼',
|
||||
cross: '×',
|
||||
squareSmall: '□',
|
||||
squareSmallFilled: '■',
|
||||
circle: '( )',
|
||||
circleFilled: '(*)',
|
||||
circleDotted: '( )',
|
||||
circleDouble: '( )',
|
||||
circleCircle: '(○)',
|
||||
circleCross: '(×)',
|
||||
circlePipe: '(│)',
|
||||
radioOn: '(*)',
|
||||
radioOff: '( )',
|
||||
checkboxOn: '[×]',
|
||||
checkboxOff: '[ ]',
|
||||
checkboxCircleOn: '(×)',
|
||||
checkboxCircleOff: '( )',
|
||||
pointer: '>',
|
||||
triangleUpOutline: '∆',
|
||||
triangleLeft: '◄',
|
||||
triangleRight: '►',
|
||||
lozenge: '♦',
|
||||
lozengeOutline: '◊',
|
||||
hamburger: '≡',
|
||||
smiley: '☺',
|
||||
mustache: '┌─┐',
|
||||
star: '✶',
|
||||
play: '►',
|
||||
nodejs: '♦',
|
||||
oneSeventh: '1/7',
|
||||
oneNinth: '1/9',
|
||||
oneTenth: '1/10',
|
||||
};
|
||||
|
||||
export const mainSymbols = { ...common, ...specialMainSymbols };
|
||||
export const fallbackSymbols = { ...common, ...specialFallbackSymbols };
|
||||
|
||||
const shouldUseMain = isUnicodeSupported();
|
||||
const figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
||||
export default figures;
|
||||
|
||||
const replacements = Object.entries(specialMainSymbols);
|
||||
|
||||
// On terminals which do not support Unicode symbols, substitute them to other symbols
|
||||
export const replaceSymbols = (
|
||||
string,
|
||||
{ useFallback = !shouldUseMain } = {}
|
||||
) => {
|
||||
if (useFallback) {
|
||||
for (const [key, mainSymbol] of replacements) {
|
||||
string = string.replaceAll(mainSymbol, fallbackSymbols[key]);
|
||||
}
|
||||
}
|
||||
|
||||
return string;
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
export default function isUnicodeSupported() {
|
||||
if (process.platform !== 'win32') {
|
||||
return process.env.TERM !== 'linux'; // Linux console (kernel)
|
||||
}
|
||||
|
||||
return (
|
||||
Boolean(process.env.WT_SESSION) || // Windows Terminal
|
||||
Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
|
||||
process.env.ConEmuTask === '{cmd::Cmder}' || // ConEmu and cmder
|
||||
process.env.TERM_PROGRAM === 'Terminus-Sublime' ||
|
||||
process.env.TERM_PROGRAM === 'vscode' ||
|
||||
process.env.TERM === 'xterm-256color' ||
|
||||
process.env.TERM === 'alacritty' ||
|
||||
process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm'
|
||||
);
|
||||
}
|
||||
@@ -35,7 +35,7 @@ async function getConfigPrefix() {
|
||||
return null;
|
||||
}
|
||||
|
||||
async function isGlobal() {
|
||||
export async function isGlobal() {
|
||||
try {
|
||||
// This is true for e.g. nvm, node path will be equal to now path
|
||||
if (dirname(process.argv[0]) === dirname(process.argv[1])) {
|
||||
|
||||
@@ -5,14 +5,8 @@ export default async function confirm(
|
||||
message: string,
|
||||
preferred: boolean
|
||||
): Promise<boolean> {
|
||||
require('./patch-inquirer');
|
||||
|
||||
const answers = await client.prompt({
|
||||
type: 'confirm',
|
||||
name: 'value',
|
||||
return client.input.confirm({
|
||||
message,
|
||||
default: preferred,
|
||||
});
|
||||
|
||||
return answers.value;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import inquirer from 'inquirer';
|
||||
import confirm from './confirm';
|
||||
import chalk from 'chalk';
|
||||
import frameworkList, { Framework } from '@vercel/frameworks';
|
||||
@@ -140,33 +139,16 @@ export default async function editProjectSettings(
|
||||
[]
|
||||
);
|
||||
|
||||
const { settingFields } = await inquirer.prompt<{
|
||||
settingFields: Array<
|
||||
Exclude<
|
||||
ConfigKeys,
|
||||
'framework' | 'commandForIgnoringBuildStep' | 'installCommand'
|
||||
>
|
||||
>;
|
||||
}>({
|
||||
name: 'settingFields',
|
||||
type: 'checkbox',
|
||||
const settingFields = (await client.input.checkbox({
|
||||
message: 'Which settings would you like to overwrite (select multiple)?',
|
||||
choices,
|
||||
});
|
||||
})) as ConfigKeys[];
|
||||
|
||||
for (let setting of settingFields) {
|
||||
const field = settingMap[setting];
|
||||
const answers = await inquirer.prompt<{
|
||||
[k in Exclude<
|
||||
ConfigKeys,
|
||||
'framework' | 'commandForIgnoringBuildStep' | 'installCommand'
|
||||
>]: string;
|
||||
}>({
|
||||
type: 'input',
|
||||
name: setting,
|
||||
settings[setting] = await client.input({
|
||||
message: `What's your ${chalk.bold(field)}?`,
|
||||
});
|
||||
settings[setting] = answers[setting];
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
|
||||
@@ -78,12 +78,9 @@ export default async function inputProject(
|
||||
let project: Project | ProjectNotFound | null = null;
|
||||
|
||||
while (!project || project instanceof ProjectNotFound) {
|
||||
const answers = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'existingProjectName',
|
||||
message: `What’s the name of your existing project?`,
|
||||
const projectName = await client.input({
|
||||
message: 'What’s the name of your existing project?',
|
||||
});
|
||||
const projectName = answers.existingProjectName as string;
|
||||
|
||||
if (!projectName) {
|
||||
output.error(`Project name cannot be empty`);
|
||||
@@ -109,13 +106,10 @@ export default async function inputProject(
|
||||
let newProjectName: string | null = null;
|
||||
|
||||
while (!newProjectName) {
|
||||
const answers = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'newProjectName',
|
||||
newProjectName = await client.input({
|
||||
message: `What’s your project’s name?`,
|
||||
default: !detectedProject ? slugifiedName : undefined,
|
||||
});
|
||||
newProjectName = answers.newProjectName as string;
|
||||
|
||||
if (!newProjectName) {
|
||||
output.error(`Project name cannot be empty`);
|
||||
|
||||
@@ -14,9 +14,7 @@ export async function inputRootDirectory(
|
||||
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
const { rootDirectory } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'rootDirectory',
|
||||
const rootDirectory = await client.input({
|
||||
message: `In which directory is your code located?`,
|
||||
transformer: (input: string) => {
|
||||
return `${chalk.dim(`./`)}${input}`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import inquirer from 'inquirer';
|
||||
import { Separator } from '@inquirer/prompts';
|
||||
import stripAnsi from 'strip-ansi';
|
||||
import Client from '../client';
|
||||
import eraseLines from '../output/erase-lines';
|
||||
@@ -14,7 +14,7 @@ interface ListSeparator {
|
||||
separator: string;
|
||||
}
|
||||
|
||||
export type ListChoice = ListEntry | ListSeparator | typeof inquirer.Separator;
|
||||
export type ListChoice = ListEntry | ListSeparator | typeof Separator;
|
||||
|
||||
interface ListOptions {
|
||||
message: string;
|
||||
@@ -54,8 +54,6 @@ export default async function list(
|
||||
eraseFinalAnswer = false, // If true, the line with the final answer that inquirer prints will be erased before returning
|
||||
}: ListOptions
|
||||
): Promise<string> {
|
||||
require('./patch-inquirer');
|
||||
|
||||
let biggestLength = 0;
|
||||
let selected: string | undefined;
|
||||
|
||||
@@ -70,14 +68,14 @@ export default async function list(
|
||||
}
|
||||
|
||||
const choices = _choices.map(choice => {
|
||||
if (choice instanceof inquirer.Separator) {
|
||||
if (choice instanceof Separator) {
|
||||
return choice;
|
||||
}
|
||||
|
||||
if ('separator' in choice) {
|
||||
const prefix = `── ${choice.separator} `;
|
||||
const suffix = '─'.repeat(biggestLength - getLength(prefix));
|
||||
return new inquirer.Separator(`${prefix}${suffix}`);
|
||||
return new Separator(`${prefix}${suffix}`);
|
||||
}
|
||||
|
||||
if ('short' in choice) {
|
||||
@@ -93,11 +91,11 @@ export default async function list(
|
||||
|
||||
if (separator) {
|
||||
for (let i = 0; i < choices.length; i += 2) {
|
||||
choices.splice(i, 0, new inquirer.Separator(' '));
|
||||
choices.splice(i, 0, new Separator(' '));
|
||||
}
|
||||
}
|
||||
|
||||
const cancelSeparator = new inquirer.Separator('─'.repeat(biggestLength));
|
||||
const cancelSeparator = new Separator('─'.repeat(biggestLength));
|
||||
const _cancel = {
|
||||
name: 'Cancel',
|
||||
value: '',
|
||||
@@ -110,18 +108,16 @@ export default async function list(
|
||||
choices.push(cancelSeparator, _cancel);
|
||||
}
|
||||
|
||||
const answer = await client.prompt({
|
||||
name: 'value',
|
||||
type: 'list',
|
||||
default: selected,
|
||||
const answer = await client.select({
|
||||
message,
|
||||
choices,
|
||||
pageSize,
|
||||
default: selected,
|
||||
});
|
||||
|
||||
if (eraseFinalAnswer === true) {
|
||||
process.stdout.write(eraseLines(2));
|
||||
}
|
||||
|
||||
return answer.value;
|
||||
return answer;
|
||||
}
|
||||
|
||||
@@ -1,210 +0,0 @@
|
||||
import chalk from 'chalk';
|
||||
import inquirer from 'inquirer';
|
||||
import Prompt from 'inquirer/lib/prompts/base';
|
||||
import Choice from 'inquirer/lib/objects/choice';
|
||||
import Separator from 'inquirer/lib/objects/separator';
|
||||
|
||||
/**
|
||||
* Here we patch inquirer with some tweaks:
|
||||
* - update "list" to use ● and ○ and hide tips
|
||||
* - update "checkbox" to use ◻︎ and ◼︎ and hide tips
|
||||
* - use '?' before questions
|
||||
* - do not apply color to question's answer
|
||||
*/
|
||||
|
||||
// adjusted from https://github.com/SBoudrias/Inquirer.js/blob/942908f17319343d1acc7b876f990797c5695918/packages/inquirer/lib/prompts/base.js#L126
|
||||
const getQuestion = function (this: Prompt) {
|
||||
let message = `${chalk.gray('?')} ${this.opt.message} `;
|
||||
|
||||
if (this.opt.type === 'confirm') {
|
||||
if (this.opt.default === 'y/N') {
|
||||
message += `[y/${chalk.bold('N')}] `;
|
||||
} else {
|
||||
message += `[${chalk.bold('Y')}/n] `;
|
||||
}
|
||||
}
|
||||
|
||||
// Append the default if available, and if question isn't answered
|
||||
else if (this.opt.default != null && this.status !== 'answered') {
|
||||
message += chalk.dim(`(${this.opt.default}) `);
|
||||
}
|
||||
|
||||
return message;
|
||||
};
|
||||
|
||||
inquirer.prompt.prompts.list.prototype.getQuestion = getQuestion;
|
||||
inquirer.prompt.prompts.checkbox.prototype.getQuestion = getQuestion;
|
||||
inquirer.prompt.prompts.input.prototype.getQuestion = getQuestion;
|
||||
inquirer.prompt.prompts.confirm.prototype.getQuestion = getQuestion;
|
||||
|
||||
// adjusted from https://github.com/SBoudrias/Inquirer.js/blob/942908f17319343d1acc7b876f990797c5695918/packages/inquirer/lib/prompts/list.js#L80
|
||||
inquirer.prompt.prompts.list.prototype.render = function () {
|
||||
// Render question
|
||||
let message = this.getQuestion();
|
||||
|
||||
// Render choices or answer depending on the state
|
||||
if (this.status === 'answered') {
|
||||
message += this.opt.choices.getChoice(this.selected).short;
|
||||
} else {
|
||||
let choicesStr = listRender(this.opt.choices, this.selected);
|
||||
let indexPosition = this.opt.choices.indexOf(
|
||||
this.opt.choices.getChoice(this.selected)
|
||||
);
|
||||
message +=
|
||||
'\n' +
|
||||
this.paginator.paginate(choicesStr, indexPosition, this.opt.pageSize);
|
||||
}
|
||||
|
||||
this.firstRender = false;
|
||||
|
||||
this.screen.render(message);
|
||||
};
|
||||
|
||||
function listRender(choices: (Choice | Separator)[], pointer: number) {
|
||||
let output = '';
|
||||
let separatorOffset = 0;
|
||||
|
||||
choices.forEach((choice, i) => {
|
||||
if (choice.type === 'separator') {
|
||||
separatorOffset++;
|
||||
output += ' ' + choice + '\n';
|
||||
return;
|
||||
}
|
||||
|
||||
if (choice.disabled) {
|
||||
separatorOffset++;
|
||||
output += ' - ' + choice.name;
|
||||
output +=
|
||||
' (' +
|
||||
(typeof choice.disabled === 'string' ? choice.disabled : 'Disabled') +
|
||||
')';
|
||||
output += '\n';
|
||||
return;
|
||||
}
|
||||
|
||||
let isSelected = i - separatorOffset === pointer;
|
||||
let line = (isSelected ? '● ' : '○ ') + choice.name;
|
||||
|
||||
if (isSelected) {
|
||||
line = chalk.cyan(line);
|
||||
}
|
||||
output += line + ' \n';
|
||||
});
|
||||
|
||||
return output.replace(/\n$/, '');
|
||||
}
|
||||
|
||||
// adjusted from https://github.com/SBoudrias/Inquirer.js/blob/942908f17319343d1acc7b876f990797c5695918/packages/inquirer/lib/prompts/checkbox.js#L84
|
||||
inquirer.prompt.prompts.checkbox.prototype.render = function (error?: string) {
|
||||
// Render question
|
||||
let message = this.getQuestion();
|
||||
let bottomContent = '';
|
||||
|
||||
if (!this.spaceKeyPressed) {
|
||||
message +=
|
||||
'(Press ' +
|
||||
chalk.cyan.bold('<space>') +
|
||||
' to select, ' +
|
||||
chalk.cyan.bold('<a>') +
|
||||
' to toggle all, ' +
|
||||
chalk.cyan.bold('<i>') +
|
||||
' to invert selection)';
|
||||
}
|
||||
|
||||
// Render choices or answer depending on the state
|
||||
if (this.status === 'answered') {
|
||||
message += this.selection.length > 0 ? this.selection.join(', ') : 'None';
|
||||
} else {
|
||||
let choicesStr = renderChoices(this.opt.choices, this.pointer);
|
||||
let indexPosition = this.opt.choices.indexOf(
|
||||
this.opt.choices.getChoice(this.pointer)
|
||||
);
|
||||
message +=
|
||||
'\n' +
|
||||
this.paginator.paginate(choicesStr, indexPosition, this.opt.pageSize);
|
||||
}
|
||||
|
||||
if (error) {
|
||||
bottomContent = chalk.red('>> ') + error;
|
||||
}
|
||||
|
||||
this.screen.render(message, bottomContent);
|
||||
};
|
||||
|
||||
function renderChoices(choices: (Choice | Separator)[], pointer: number) {
|
||||
let output = '';
|
||||
let separatorOffset = 0;
|
||||
|
||||
choices.forEach(function (choice, i) {
|
||||
if (choice.type === 'separator') {
|
||||
separatorOffset++;
|
||||
output += '' + choice + '\n';
|
||||
return;
|
||||
}
|
||||
|
||||
if (choice.disabled) {
|
||||
separatorOffset++;
|
||||
output += '- ' + choice.name;
|
||||
output +=
|
||||
' (' +
|
||||
(typeof choice.disabled === 'string' ? choice.disabled : 'Disabled') +
|
||||
')';
|
||||
} else {
|
||||
if (i - separatorOffset === pointer) {
|
||||
output += chalk.cyan(
|
||||
(choice.checked ? '› ▪︎' : '› ▫︎') + ' ' + choice.name
|
||||
);
|
||||
} else {
|
||||
output += chalk.cyan(
|
||||
(choice.checked ? ' ▪︎' : ' ▫︎') + ' ' + choice.name
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
output += '\n';
|
||||
});
|
||||
|
||||
return output.replace(/\n$/, '');
|
||||
}
|
||||
|
||||
// adjusted from https://github.com/SBoudrias/Inquirer.js/blob/942908f17319343d1acc7b876f990797c5695918/packages/inquirer/lib/prompts/input.js#L44
|
||||
inquirer.prompt.prompts.input.prototype.render = function (error?: string) {
|
||||
let bottomContent = '';
|
||||
let appendContent = '';
|
||||
let message = this.getQuestion();
|
||||
let transformer = this.opt.transformer;
|
||||
let isFinal = this.status === 'answered';
|
||||
|
||||
if (isFinal) {
|
||||
appendContent = this.answer;
|
||||
} else {
|
||||
appendContent = this.rl.line;
|
||||
}
|
||||
|
||||
if (transformer) {
|
||||
message += transformer(appendContent, this.answers, { isFinal });
|
||||
} else {
|
||||
message += appendContent;
|
||||
}
|
||||
|
||||
if (error) {
|
||||
bottomContent = chalk.red('>> ') + error;
|
||||
}
|
||||
|
||||
this.screen.render(message, bottomContent);
|
||||
};
|
||||
|
||||
// adjusted from https://github.com/SBoudrias/Inquirer.js/blob/942908f17319343d1acc7b876f990797c5695918/packages/inquirer/lib/prompts/confirm.js#L64
|
||||
inquirer.prompt.prompts.confirm.prototype.render = function (answer?: boolean) {
|
||||
let message = this.getQuestion();
|
||||
|
||||
if (this.status === 'answered') {
|
||||
message += answer ? 'y' : 'n';
|
||||
} else {
|
||||
message += this.rl.line;
|
||||
}
|
||||
|
||||
this.screen.render(message);
|
||||
|
||||
return this;
|
||||
};
|
||||
@@ -10,7 +10,6 @@ export default async function selectOrg(
|
||||
question: string,
|
||||
autoConfirm?: boolean
|
||||
): Promise<Org> {
|
||||
require('./patch-inquirer');
|
||||
const {
|
||||
output,
|
||||
config: { currentTeam },
|
||||
@@ -52,14 +51,9 @@ export default async function selectOrg(
|
||||
return choices[defaultChoiceIndex].value;
|
||||
}
|
||||
|
||||
const answers = await client.prompt({
|
||||
type: 'list',
|
||||
name: 'org',
|
||||
return await client.select({
|
||||
message: question,
|
||||
choices,
|
||||
default: defaultChoiceIndex,
|
||||
default: choices[defaultChoiceIndex].value,
|
||||
});
|
||||
|
||||
const org = answers.org;
|
||||
return org;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import chalk from 'chalk';
|
||||
import inquirer from 'inquirer';
|
||||
import { Separator } from '@inquirer/prompts';
|
||||
import pluralize from 'pluralize';
|
||||
import { homedir } from 'os';
|
||||
import slugify from '@sindresorhus/slugify';
|
||||
@@ -144,16 +144,13 @@ export async function ensureRepoLink(
|
||||
if (yes) {
|
||||
remoteName = defaultRemote;
|
||||
} else {
|
||||
const answer = await client.prompt({
|
||||
type: 'list',
|
||||
name: 'value',
|
||||
remoteName = await client.select({
|
||||
message: 'Which Git remote should be used?',
|
||||
choices: remoteNames.map(name => {
|
||||
return { name: name, value: name };
|
||||
}),
|
||||
default: defaultRemote,
|
||||
});
|
||||
remoteName = answer.value;
|
||||
}
|
||||
}
|
||||
const repoUrl = remoteUrls[remoteName];
|
||||
@@ -222,15 +219,13 @@ export async function ensureRepoLink(
|
||||
selected = projects;
|
||||
} else {
|
||||
const addSeparators = projects.length > 0 && detectedProjectsCount > 0;
|
||||
const answer = await client.prompt({
|
||||
type: 'checkbox',
|
||||
name: 'selected',
|
||||
selected = await client.input.checkbox({
|
||||
message: `Which Projects should be ${
|
||||
projects.length ? 'linked to' : 'created'
|
||||
}?`,
|
||||
choices: [
|
||||
...(addSeparators
|
||||
? [new inquirer.Separator('----- Existing Projects -----')]
|
||||
? [new Separator('----- Existing Projects -----')]
|
||||
: []),
|
||||
...projects.map(project => {
|
||||
return {
|
||||
@@ -240,7 +235,7 @@ export async function ensureRepoLink(
|
||||
};
|
||||
}),
|
||||
...(addSeparators
|
||||
? [new inquirer.Separator('----- New Projects to be created -----')]
|
||||
? [new Separator('----- New Projects to be created -----')]
|
||||
: []),
|
||||
...Array.from(detectedProjects.entries()).flatMap(
|
||||
([rootDirectory, frameworks]) =>
|
||||
@@ -267,9 +262,16 @@ export async function ensureRepoLink(
|
||||
};
|
||||
})
|
||||
),
|
||||
],
|
||||
] as (
|
||||
| Separator
|
||||
| {
|
||||
newProject?: boolean;
|
||||
name: string;
|
||||
value: Project | NewProject;
|
||||
checked: boolean;
|
||||
}
|
||||
)[],
|
||||
});
|
||||
selected = answer.selected;
|
||||
}
|
||||
|
||||
if (selected.length === 0) {
|
||||
|
||||
@@ -62,12 +62,7 @@ export async function readInput(
|
||||
|
||||
while (!input) {
|
||||
try {
|
||||
const { val } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'val',
|
||||
message,
|
||||
});
|
||||
input = val;
|
||||
input = await client.input({ message });
|
||||
} catch (err: any) {
|
||||
console.log(); // \n
|
||||
|
||||
|
||||
@@ -97,16 +97,13 @@ async function getProjectLinkFromRepoLink(
|
||||
} else {
|
||||
const selectableProjects =
|
||||
projects.length > 0 ? projects : repoLink.repoConfig.projects;
|
||||
const { p } = await client.prompt({
|
||||
name: 'p',
|
||||
type: 'list',
|
||||
project = await client.select({
|
||||
message: `Please select a Project:`,
|
||||
choices: selectableProjects.map(p => ({
|
||||
value: p,
|
||||
name: p.name,
|
||||
})),
|
||||
});
|
||||
project = p;
|
||||
}
|
||||
if (project) {
|
||||
return {
|
||||
|
||||
1
packages/cli/test/fixtures/unit/.gitignore
vendored
Normal file
1
packages/cli/test/fixtures/unit/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!.vercel
|
||||
4
packages/cli/test/fixtures/unit/commands/deploy/node-low-starting-range/.vercel/project.json
vendored
Normal file
4
packages/cli/test/fixtures/unit/commands/deploy/node-low-starting-range/.vercel/project.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"orgId": "team_dummy",
|
||||
"projectId": "node-low-starting-range"
|
||||
}
|
||||
1
packages/cli/test/fixtures/unit/commands/deploy/node-low-starting-range/api/index.js
vendored
Normal file
1
packages/cli/test/fixtures/unit/commands/deploy/node-low-starting-range/api/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = (req, res) => res.end('Vercel');
|
||||
8
packages/cli/test/fixtures/unit/commands/deploy/node-low-starting-range/package.json
vendored
Normal file
8
packages/cli/test/fixtures/unit/commands/deploy/node-low-starting-range/package.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "node-low-starting-range",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"engines": {
|
||||
"node": ">10"
|
||||
}
|
||||
}
|
||||
4
packages/cli/test/fixtures/unit/commands/deploy/node-low-version/.vercel/project.json
vendored
Normal file
4
packages/cli/test/fixtures/unit/commands/deploy/node-low-version/.vercel/project.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"orgId": "team_dummy",
|
||||
"projectId": "node-low-version"
|
||||
}
|
||||
1
packages/cli/test/fixtures/unit/commands/deploy/node-low-version/api/index.js
vendored
Normal file
1
packages/cli/test/fixtures/unit/commands/deploy/node-low-version/api/index.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = (req, res) => res.end('Vercel');
|
||||
8
packages/cli/test/fixtures/unit/commands/deploy/node-low-version/package.json
vendored
Normal file
8
packages/cli/test/fixtures/unit/commands/deploy/node-low-version/package.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "node-low-version",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"engines": {
|
||||
"node": "10"
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import stripAnsi from 'strip-ansi';
|
||||
import type { CLIProcess } from './types';
|
||||
|
||||
function getPromptErrorDetails(
|
||||
@@ -54,7 +55,7 @@ export default async function waitForPrompt(
|
||||
};
|
||||
|
||||
const onData = (rawChunk: Buffer) => {
|
||||
const chunk = rawChunk.toString();
|
||||
const chunk = stripAnsi(rawChunk.toString());
|
||||
|
||||
mostRecentChunk = chunk;
|
||||
console.log('> ' + chunk);
|
||||
|
||||
4
packages/cli/test/integration-3.test.ts
vendored
4
packages/cli/test/integration-3.test.ts
vendored
@@ -617,7 +617,7 @@ test('ensure we render a prompt when deploying home directory', async () => {
|
||||
binaryPath,
|
||||
[directory, '--public', '--name', session, '--force'],
|
||||
{
|
||||
input: 'N',
|
||||
input: 'N\n',
|
||||
}
|
||||
);
|
||||
|
||||
@@ -625,7 +625,7 @@ test('ensure we render a prompt when deploying home directory', async () => {
|
||||
expect(exitCode, formatOutput({ stdout, stderr })).toBe(0);
|
||||
|
||||
expect(stderr).toContain(
|
||||
'You are deploying your home directory. Do you want to continue? [y/N]'
|
||||
'You are deploying your home directory. Do you want to continue? (y/N)'
|
||||
);
|
||||
expect(stderr).toContain('Canceled');
|
||||
});
|
||||
|
||||
@@ -93,8 +93,6 @@ export class MockClient extends Client {
|
||||
this.stderr.pause();
|
||||
this.stderr.isTTY = true;
|
||||
|
||||
this._createPromptModule();
|
||||
|
||||
this.output = new Output(this.stderr);
|
||||
|
||||
this.argv = [];
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
import type { Readable } from 'stream';
|
||||
import type { MatcherState } from 'expect';
|
||||
import type { MatcherHintOptions } from 'jest-matcher-utils';
|
||||
import stripAnsi from 'strip-ansi';
|
||||
|
||||
export async function toOutput(
|
||||
this: MatcherState,
|
||||
@@ -27,7 +28,7 @@ export async function toOutput(
|
||||
matcherHint(matcherName, 'stream', 'test', matcherHintOptions) + '\n\n';
|
||||
|
||||
function onData(data: string) {
|
||||
output += data;
|
||||
output += stripAnsi(data);
|
||||
if (output.includes(test)) {
|
||||
cleanup();
|
||||
resolve({
|
||||
|
||||
@@ -464,4 +464,104 @@ describe('deploy', () => {
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should send latest supported node version when given a >low-node-version based on `engines.node` package.json field', async () => {
|
||||
const user = useUser();
|
||||
useTeams('team_dummy');
|
||||
useProject({
|
||||
...defaultProject,
|
||||
name: 'node-low-starting-range',
|
||||
id: 'QmbKpqpiUqbcke',
|
||||
});
|
||||
|
||||
let body: any;
|
||||
client.scenario.post(`/v13/deployments`, (req, res) => {
|
||||
body = req.body;
|
||||
res.json({
|
||||
creator: {
|
||||
uid: user.id,
|
||||
username: user.username,
|
||||
},
|
||||
id: 'dpl_',
|
||||
});
|
||||
});
|
||||
client.scenario.get(`/v13/deployments/dpl_`, (req, res) => {
|
||||
res.json({
|
||||
creator: {
|
||||
uid: user.id,
|
||||
username: user.username,
|
||||
},
|
||||
id: 'dpl_',
|
||||
readyState: 'READY',
|
||||
aliasAssigned: true,
|
||||
alias: [],
|
||||
});
|
||||
});
|
||||
|
||||
const repoRoot = setupUnitFixture(
|
||||
'commands/deploy/node-low-starting-range'
|
||||
);
|
||||
client.cwd = repoRoot;
|
||||
client.setArgv('deploy');
|
||||
const exitCode = await deploy(client);
|
||||
expect(exitCode).toEqual(0);
|
||||
expect(body).toMatchObject({
|
||||
source: 'cli',
|
||||
version: 2,
|
||||
projectSettings: {
|
||||
nodeVersion: '20.x',
|
||||
sourceFilesOutsideRootDirectory: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should send no version when `engines.node` package.json field is fixed to an outdated version', async () => {
|
||||
const user = useUser();
|
||||
useTeams('team_dummy');
|
||||
useProject({
|
||||
...defaultProject,
|
||||
name: 'node-low-version',
|
||||
id: 'QmbKpqpiUqbcke',
|
||||
});
|
||||
|
||||
let body: any;
|
||||
client.scenario.post(`/v13/deployments`, (req, res) => {
|
||||
body = req.body;
|
||||
res.json({
|
||||
creator: {
|
||||
uid: user.id,
|
||||
username: user.username,
|
||||
},
|
||||
id: 'dpl_',
|
||||
});
|
||||
});
|
||||
client.scenario.get(`/v13/deployments/dpl_`, (req, res) => {
|
||||
res.json({
|
||||
creator: {
|
||||
uid: user.id,
|
||||
username: user.username,
|
||||
},
|
||||
id: 'dpl_',
|
||||
readyState: 'READY',
|
||||
aliasAssigned: true,
|
||||
alias: [],
|
||||
});
|
||||
});
|
||||
|
||||
const repoRoot = setupUnitFixture('commands/deploy/node-low-version');
|
||||
client.cwd = repoRoot;
|
||||
client.setArgv('deploy');
|
||||
const exitCodePromise = deploy(client);
|
||||
await expect(client.stderr).toOutput(
|
||||
'WARN! Node.js Version "10.x" is discontinued and must be upgraded. Please set "engines": { "node": "20.x" } in your `package.json` file to use Node.js 20.'
|
||||
);
|
||||
await expect(exitCodePromise).resolves.toEqual(0);
|
||||
expect(body).toMatchObject({
|
||||
source: 'cli',
|
||||
version: 2,
|
||||
projectSettings: {
|
||||
sourceFilesOutsideRootDirectory: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -79,7 +79,7 @@ describe('git', () => {
|
||||
const gitPromise = git(client);
|
||||
|
||||
await expect(client.stderr).toOutput('Set up');
|
||||
client.stdin.write('y\n');
|
||||
client.stdin.write('\n');
|
||||
|
||||
await expect(client.stderr).toOutput(
|
||||
'Which scope should contain your project?'
|
||||
@@ -87,12 +87,12 @@ describe('git', () => {
|
||||
client.stdin.write('\r');
|
||||
|
||||
await expect(client.stderr).toOutput('Found project');
|
||||
client.stdin.write('y\n');
|
||||
client.stdin.write('\n');
|
||||
|
||||
await expect(client.stderr).toOutput(
|
||||
`Do you still want to connect https://github.com/user2/repo2?`
|
||||
);
|
||||
client.stdin.write('y\n');
|
||||
client.stdin.write('h\n'); // vim left to switch from default no
|
||||
|
||||
await expect(client.stderr).toOutput(
|
||||
`Connecting Git remote: https://github.com/user2/repo2`
|
||||
@@ -425,7 +425,7 @@ describe('git', () => {
|
||||
await expect(client.stderr).toOutput(
|
||||
`Are you sure you want to disconnect user/repo from your project?`
|
||||
);
|
||||
client.stdin.write('y\n');
|
||||
client.stdin.write('h\n'); // vim left to switch from default no
|
||||
await expect(client.stderr).toOutput('Disconnected user/repo.');
|
||||
|
||||
const newProjectData: Project = await client.fetch(
|
||||
@@ -526,9 +526,9 @@ describe('git', () => {
|
||||
`Found a repository in your local Git Config: https://github.com/user/repo`
|
||||
);
|
||||
await expect(client.stderr).toOutput(
|
||||
`Do you still want to connect https://github.com/user2/repo2? [y/N]`
|
||||
`Do you still want to connect https://github.com/user2/repo2?`
|
||||
);
|
||||
client.stdin.write('y\n');
|
||||
client.stdin.write('h\n'); // vim left to switch from default no
|
||||
await expect(client.stderr).toOutput(
|
||||
`Connecting Git remote: https://github.com/user2/repo2`
|
||||
);
|
||||
@@ -574,9 +574,9 @@ describe('git', () => {
|
||||
`Found multiple Git repositories in your local Git config:\n • origin: https://github.com/user/repo.git\n • secondary: https://github.com/user/repo2.git`
|
||||
);
|
||||
await expect(client.stderr).toOutput(
|
||||
`Do you still want to connect https://github.com/user3/repo3? [y/N]`
|
||||
`Do you still want to connect https://github.com/user3/repo3?`
|
||||
);
|
||||
client.stdin.write('y\n');
|
||||
client.stdin.write('h\n'); // vim left to switch away from default no
|
||||
|
||||
await expect(client.stderr).toOutput(
|
||||
`Connecting Git remote: https://github.com/user3/repo3`
|
||||
|
||||
@@ -26,16 +26,17 @@ describe('link', () => {
|
||||
client.cwd = cwd;
|
||||
const exitCodePromise = link(client);
|
||||
|
||||
client.stderr.pipe(process.stderr);
|
||||
await expect(client.stderr).toOutput('Set up');
|
||||
client.stdin.write('y\n');
|
||||
client.stdin.write('\n');
|
||||
|
||||
await expect(client.stderr).toOutput(
|
||||
'Which scope should contain your project?'
|
||||
);
|
||||
client.stdin.write('y\n');
|
||||
client.stdin.write('\n');
|
||||
|
||||
await expect(client.stderr).toOutput('Link to it?');
|
||||
client.stdin.write('y\n');
|
||||
client.stdin.write('\n');
|
||||
|
||||
await expect(client.stderr).toOutput(
|
||||
`Linked to ${user.username}/${project.name} (created .vercel and added it to .gitignore)`
|
||||
|
||||
@@ -54,7 +54,7 @@ describe('login', () => {
|
||||
client.stdin.write('\x1B[B'); // Down arrow
|
||||
client.stdin.write('\r'); // Return key
|
||||
|
||||
await expect(client.stderr).toOutput('? Enter your email address:');
|
||||
await expect(client.stderr).toOutput('Enter your email address:');
|
||||
|
||||
client.stdin.write(`${user.email}\n`);
|
||||
|
||||
@@ -77,7 +77,7 @@ describe('login', () => {
|
||||
client.stdin.write('\x1B[B'); // Down arrow
|
||||
client.stdin.write('\r'); // Return key
|
||||
|
||||
await expect(client.stderr).toOutput('? Enter your email address:');
|
||||
await expect(client.stderr).toOutput('Enter your email address:');
|
||||
|
||||
client.stdin.write(`${user.email}\n`);
|
||||
|
||||
@@ -119,7 +119,7 @@ describe('login', () => {
|
||||
client.stdin.write('\x1B[B'); // Down arrow
|
||||
client.stdin.write('\r'); // Return key
|
||||
|
||||
await expect(client.stderr).toOutput('? Enter your email address:');
|
||||
await expect(client.stderr).toOutput('Enter your email address:');
|
||||
|
||||
client.stdin.write(`${user.email}\n`);
|
||||
|
||||
@@ -162,7 +162,7 @@ describe('login', () => {
|
||||
client.stdin.write('\x1B[B'); // Down arrow
|
||||
client.stdin.write('\r'); // Return key
|
||||
|
||||
await expect(client.stderr).toOutput('? Enter your email address:');
|
||||
await expect(client.stderr).toOutput('Enter your email address:');
|
||||
|
||||
client.stdin.write(`${user.email}\n`);
|
||||
|
||||
|
||||
@@ -45,55 +45,6 @@ describe('project', () => {
|
||||
expect(data).toEqual([project.project.name, 'https://foobar.com']);
|
||||
});
|
||||
|
||||
it('should list projects running on an soon-to-be-deprecated Node.js version', async () => {
|
||||
jest.useFakeTimers().setSystemTime(new Date('2023-12-08'));
|
||||
|
||||
const user = useUser();
|
||||
useTeams('team_dummy');
|
||||
const project = useProject({
|
||||
...defaultProject,
|
||||
nodeVersion: '16.x',
|
||||
});
|
||||
|
||||
client.setArgv('project', 'ls', '--update-required');
|
||||
await projects(client);
|
||||
|
||||
const lines = createLineIterator(client.stderr);
|
||||
|
||||
let line = await lines.next();
|
||||
expect(line.value).toEqual(`Fetching projects in ${user.username}`);
|
||||
|
||||
line = await lines.next();
|
||||
expect(line.value).toEqual(
|
||||
'WARN! The following Node.js versions will be deprecated soon: 16.x. Please upgrade your projects immediately.'
|
||||
);
|
||||
line = await lines.next();
|
||||
expect(line.value).toEqual(
|
||||
'> For more information visit: https://vercel.com/docs/functions/serverless-functions/runtimes/node-js#node.js-version'
|
||||
);
|
||||
line = await lines.next();
|
||||
expect(line.value).toContain(user.username);
|
||||
|
||||
// empty line
|
||||
line = await lines.next();
|
||||
expect(line.value).toEqual('');
|
||||
|
||||
line = await lines.next();
|
||||
const header = parseSpacedTableRow(line.value!);
|
||||
expect(header).toEqual([
|
||||
'Project Name',
|
||||
'Latest Production URL',
|
||||
'Updated',
|
||||
]);
|
||||
|
||||
line = await lines.next();
|
||||
const data = parseSpacedTableRow(line.value!);
|
||||
data.pop();
|
||||
expect(data).toEqual([project.project.name, 'https://foobar.com']);
|
||||
|
||||
jest.clearAllTimers();
|
||||
});
|
||||
|
||||
it('should list projects when there is no production deployment', async () => {
|
||||
const user = useUser();
|
||||
useTeams('team_dummy');
|
||||
|
||||
@@ -113,7 +113,7 @@ describe('promote', () => {
|
||||
`Fetching deployment "${previousDeployment.url}" in ${previousDeployment.creator?.username}`
|
||||
);
|
||||
await expect(client.stderr).toOutput(
|
||||
'? This deployment does not target production, therefore promotion will not apply\n production environment variables. Are you sure you want to continue?'
|
||||
'This deployment does not target production, therefore promotion will not \napply production environment variables. Are you sure you want to continue?'
|
||||
);
|
||||
|
||||
// say "no" to the prompt
|
||||
@@ -136,7 +136,7 @@ describe('promote', () => {
|
||||
`Fetching deployment "${previousDeployment.url}" in ${previousDeployment.creator?.username}`
|
||||
);
|
||||
await expect(client.stderr).toOutput(
|
||||
'? This deployment does not target production, therefore promotion will not apply\n production environment variables. Are you sure you want to continue?'
|
||||
'This deployment does not target production, therefore promotion will not \napply production environment variables. Are you sure you want to continue?'
|
||||
);
|
||||
|
||||
// say "yes" to the prompt
|
||||
|
||||
@@ -4,29 +4,29 @@ import { client } from '../../mocks/client';
|
||||
describe('confirm()', () => {
|
||||
it('should work with multiple prompts', async () => {
|
||||
// true (explicit)
|
||||
let confirmedPromise = confirm(client, 'Explictly true?', false);
|
||||
await expect(client.stderr).toOutput('Explictly true? [y/N]');
|
||||
client.stdin.write('yes\n');
|
||||
let confirmedPromise = confirm(client, 'Explicitly true?', false);
|
||||
await expect(client.stderr).toOutput('Explicitly true?');
|
||||
client.stdin.write('h\n'); // vim left
|
||||
let confirmed = await confirmedPromise;
|
||||
expect(confirmed).toEqual(true);
|
||||
|
||||
// false (explicit)
|
||||
confirmedPromise = confirm(client, 'Explcitly false?', true);
|
||||
await expect(client.stderr).toOutput('Explcitly false? [Y/n]');
|
||||
client.stdin.write('no\n');
|
||||
confirmedPromise = confirm(client, 'Explicitly false?', true);
|
||||
await expect(client.stderr).toOutput('Explicitly false?');
|
||||
client.stdin.write('l\n'); // vim right
|
||||
confirmed = await confirmedPromise;
|
||||
expect(confirmed).toEqual(false);
|
||||
|
||||
// true (default)
|
||||
confirmedPromise = confirm(client, 'Default true?', true);
|
||||
await expect(client.stderr).toOutput('Default true? [Y/n]');
|
||||
await expect(client.stderr).toOutput('Default true?');
|
||||
client.stdin.write('\n');
|
||||
confirmed = await confirmedPromise;
|
||||
expect(confirmed).toEqual(true);
|
||||
|
||||
// false (default)
|
||||
confirmedPromise = confirm(client, 'Default false?', false);
|
||||
await expect(client.stderr).toOutput('Default false? [y/N]');
|
||||
await expect(client.stderr).toOutput('Default false?');
|
||||
client.stdin.write('\n');
|
||||
confirmed = await confirmedPromise;
|
||||
expect(confirmed).toEqual(false);
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import getUpdateCommand from '../../../src/util/get-update-command';
|
||||
import getUpdateCommand, {
|
||||
isGlobal,
|
||||
} from '../../../src/util/get-update-command';
|
||||
|
||||
describe('getUpdateCommand', () => {
|
||||
it('should detect update command', async () => {
|
||||
const updateCommand = await getUpdateCommand();
|
||||
expect(updateCommand).toEqual(`pnpm i vercel@latest`);
|
||||
if (await isGlobal()) {
|
||||
expect(updateCommand).toEqual(`pnpm i -g vercel@latest`);
|
||||
} else {
|
||||
expect(updateCommand).toEqual(`pnpm i vercel@latest`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/client
|
||||
|
||||
## 13.1.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`11218a179`](https://github.com/vercel/vercel/commit/11218a179870a5420c5a6ff720cd4aec4f7e1c5e)]:
|
||||
- @vercel/build-utils@7.9.1
|
||||
|
||||
## 13.1.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/client",
|
||||
"version": "13.1.6",
|
||||
"version": "13.1.7",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"homepage": "https://vercel.com",
|
||||
@@ -37,7 +37,7 @@
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"@vercel/error-utils": "2.0.2",
|
||||
"@vercel/routing-utils": "3.1.0",
|
||||
"@zeit/fetch": "5.2.0",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"@types/minimatch": "3.0.5",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "7.3.10",
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"jest-junit": "16.0.0",
|
||||
"typescript": "4.9.5"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/gatsby-plugin-vercel-builder
|
||||
|
||||
## 2.0.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`11218a179`](https://github.com/vercel/vercel/commit/11218a179870a5420c5a6ff720cd4aec4f7e1c5e)]:
|
||||
- @vercel/build-utils@7.9.1
|
||||
|
||||
## 2.0.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/gatsby-plugin-vercel-builder",
|
||||
"version": "2.0.21",
|
||||
"version": "2.0.22",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
"dist",
|
||||
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sinclair/typebox": "0.25.24",
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"@vercel/routing-utils": "3.1.0",
|
||||
"esbuild": "0.14.47",
|
||||
"etag": "1.8.1",
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"@types/node-fetch": "^2.3.0",
|
||||
"@types/tar": "6.1.5",
|
||||
"@types/yauzl-promise": "2.1.0",
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"async-retry": "1.3.3",
|
||||
"execa": "^1.0.0",
|
||||
"fs-extra": "^7.0.0",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"devDependencies": {
|
||||
"@types/jest": "27.5.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"execa": "3.2.0",
|
||||
"fs-extra": "11.1.0",
|
||||
"jest-junit": "16.0.0"
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vercel/next
|
||||
|
||||
## 4.1.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Ensure that static PPR pages have static streaming lambda paths. ([#11259](https://github.com/vercel/vercel/pull/11259))
|
||||
|
||||
## 4.1.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/next",
|
||||
"version": "4.1.5",
|
||||
"version": "4.1.6",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
||||
@@ -40,7 +40,7 @@
|
||||
"@types/semver": "6.0.0",
|
||||
"@types/text-table": "0.2.1",
|
||||
"@types/webpack-sources": "3.2.0",
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"@vercel/routing-utils": "3.1.0",
|
||||
"async-sema": "3.0.1",
|
||||
"buffer-crc32": "0.2.13",
|
||||
|
||||
@@ -2142,7 +2142,6 @@ export const build: BuildV2 = async ({
|
||||
appPathRoutesManifest,
|
||||
isSharedLambdas,
|
||||
canUsePreviewMode,
|
||||
omittedPrerenderRoutes,
|
||||
});
|
||||
|
||||
await Promise.all(
|
||||
|
||||
@@ -1229,34 +1229,31 @@ export async function serverBuild({
|
||||
// We want to add the `experimentalStreamingLambdaPath` to this
|
||||
// output.
|
||||
experimentalStreamingLambdaPaths.set(outputName, key);
|
||||
} else {
|
||||
// As this is an omitted page, we should generate the experimental
|
||||
// partial prerendering resume route for each of these routes that
|
||||
// support partial prerendering. This is because the routes that
|
||||
// haven't been omitted will have rewrite rules in place to rewrite
|
||||
// the original request `/blog/my-slug` to the dynamic path
|
||||
// `/blog/[slug]?nxtPslug=my-slug`.
|
||||
for (const [
|
||||
routePathname,
|
||||
{ srcRoute, experimentalPPR },
|
||||
] of Object.entries(prerenderManifest.staticRoutes)) {
|
||||
// If the srcRoute doesn't match or this doesn't support
|
||||
// experimental partial prerendering, then we can skip this route.
|
||||
if (srcRoute !== pagePathname || !experimentalPPR) continue;
|
||||
}
|
||||
|
||||
// If this route is the same as the page route, then we can skip
|
||||
// it, because we've already added the lambda to the output.
|
||||
if (routePathname === pagePathname) continue;
|
||||
// For each static route that was generated, we should generate a
|
||||
// specific partial prerendering resume route. This is because any
|
||||
// static route that is matched will not hit the rewrite rules.
|
||||
for (const [
|
||||
routePathname,
|
||||
{ srcRoute, experimentalPPR },
|
||||
] of Object.entries(prerenderManifest.staticRoutes)) {
|
||||
// If the srcRoute doesn't match or this doesn't support
|
||||
// experimental partial prerendering, then we can skip this route.
|
||||
if (srcRoute !== pagePathname || !experimentalPPR) continue;
|
||||
|
||||
const key = getPostponeResumePathname(
|
||||
entryDirectory,
|
||||
routePathname
|
||||
);
|
||||
lambdas[key] = lambda;
|
||||
// If this route is the same as the page route, then we can skip
|
||||
// it, because we've already added the lambda to the output.
|
||||
if (routePathname === pagePathname) continue;
|
||||
|
||||
outputName = path.posix.join(entryDirectory, routePathname);
|
||||
experimentalStreamingLambdaPaths.set(outputName, key);
|
||||
}
|
||||
const key = getPostponeResumePathname(
|
||||
entryDirectory,
|
||||
routePathname
|
||||
);
|
||||
lambdas[key] = lambda;
|
||||
|
||||
outputName = path.posix.join(entryDirectory, routePathname);
|
||||
experimentalStreamingLambdaPaths.set(outputName, key);
|
||||
}
|
||||
|
||||
continue;
|
||||
@@ -1314,7 +1311,6 @@ export async function serverBuild({
|
||||
hasPages404: routesManifest.pages404,
|
||||
isCorrectNotFoundRoutes,
|
||||
isEmptyAllowQueryForPrendered,
|
||||
omittedPrerenderRoutes,
|
||||
});
|
||||
|
||||
await Promise.all(
|
||||
|
||||
@@ -1938,7 +1938,6 @@ type OnPrerenderRouteArgs = {
|
||||
routesManifest?: RoutesManifest;
|
||||
isCorrectNotFoundRoutes?: boolean;
|
||||
isEmptyAllowQueryForPrendered?: boolean;
|
||||
omittedPrerenderRoutes: ReadonlySet<string>;
|
||||
};
|
||||
let prerenderGroup = 1;
|
||||
|
||||
@@ -1975,7 +1974,6 @@ export const onPrerenderRoute =
|
||||
routesManifest,
|
||||
isCorrectNotFoundRoutes,
|
||||
isEmptyAllowQueryForPrendered,
|
||||
omittedPrerenderRoutes,
|
||||
} = prerenderRouteArgs;
|
||||
|
||||
if (isBlocking && isFallback) {
|
||||
@@ -2211,12 +2209,19 @@ export const onPrerenderRoute =
|
||||
initialStatus = 404;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the route key had an `/index` suffix added, we need to note it so we
|
||||
* can remove it from the output path later accurately.
|
||||
*/
|
||||
let addedIndexSuffix = false;
|
||||
|
||||
if (isAppPathRoute) {
|
||||
// for literal index routes we need to append an additional /index
|
||||
// due to the proxy's normalizing for /index routes
|
||||
if (routeKey !== '/index' && routeKey.endsWith('/index')) {
|
||||
routeKey = `${routeKey}/index`;
|
||||
routeFileNoExt = routeKey;
|
||||
addedIndexSuffix = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2225,6 +2230,7 @@ export const onPrerenderRoute =
|
||||
if (!isAppPathRoute) {
|
||||
outputPathPage = normalizeIndexOutput(outputPathPage, isServerMode);
|
||||
}
|
||||
|
||||
const outputPathPageOrig = path.posix.join(
|
||||
entryDirectory,
|
||||
origRouteFileNoExt
|
||||
@@ -2408,20 +2414,25 @@ export const onPrerenderRoute =
|
||||
);
|
||||
}
|
||||
|
||||
// If a source route exists, and it's not listed as an omitted route,
|
||||
// then use the src route as the basis for the experimental streaming
|
||||
// lambda path. If the route doesn't have a source route or it's not
|
||||
// omitted, then use the more specific `routeKey` as the basis.
|
||||
if (srcRoute && !omittedPrerenderRoutes.has(srcRoute)) {
|
||||
// Try to get the experimental streaming lambda path for the specific
|
||||
// static route first, then try the srcRoute if it doesn't exist. If we
|
||||
// can't find it at all, this constitutes an error.
|
||||
experimentalStreamingLambdaPath = experimentalStreamingLambdaPaths.get(
|
||||
pathnameToOutputName(entryDirectory, routeKey, addedIndexSuffix)
|
||||
);
|
||||
if (!experimentalStreamingLambdaPath && srcRoute) {
|
||||
experimentalStreamingLambdaPath =
|
||||
experimentalStreamingLambdaPaths.get(
|
||||
pathnameToOutputName(entryDirectory, srcRoute)
|
||||
);
|
||||
} else {
|
||||
experimentalStreamingLambdaPath =
|
||||
experimentalStreamingLambdaPaths.get(
|
||||
pathnameToOutputName(entryDirectory, routeKey)
|
||||
);
|
||||
}
|
||||
|
||||
if (!experimentalStreamingLambdaPath) {
|
||||
throw new Error(
|
||||
`Invariant: experimentalStreamingLambdaPath is undefined for routeKey=${routeKey} and srcRoute=${
|
||||
srcRoute ?? 'null'
|
||||
}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2651,8 +2662,20 @@ export function getNextServerPath(nextVersion: string) {
|
||||
: 'next/dist/next-server/server';
|
||||
}
|
||||
|
||||
export function pathnameToOutputName(entryDirectory: string, pathname: string) {
|
||||
if (pathname === '/') pathname = '/index';
|
||||
function pathnameToOutputName(
|
||||
entryDirectory: string,
|
||||
pathname: string,
|
||||
addedIndexSuffix = false
|
||||
) {
|
||||
if (pathname === '/') {
|
||||
pathname = '/index';
|
||||
}
|
||||
// If the `/index` was added for a route that ended in `/index` we need to
|
||||
// strip the second one off before joining it with the entryDirectory.
|
||||
else if (addedIndexSuffix) {
|
||||
pathname = pathname.replace(/\/index$/, '');
|
||||
}
|
||||
|
||||
return path.posix.join(entryDirectory, pathname);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,11 @@ export const Dynamic = ({ pathname, fallback }) => {
|
||||
{pathname && (
|
||||
<>
|
||||
<dt>Pathname</dt>
|
||||
<dd>{pathname}</dd>
|
||||
{/* We're encoding this using the following format so that even if
|
||||
the HTML is sent as flight data, it will still retain the same
|
||||
content, and can be inspected without having to run the
|
||||
javascript. */}
|
||||
<dd data-pathname={`data-pathname=${pathname}`}>{pathname}</dd>
|
||||
</>
|
||||
)}
|
||||
{messages.map(({ name, value }) => (
|
||||
|
||||
@@ -59,6 +59,9 @@ describe(`${__dirname.split(path.sep).pop()}`, () => {
|
||||
const html = await res.text();
|
||||
expect(html).toContain(expected);
|
||||
expect(html).toContain('</html>');
|
||||
|
||||
// Validate that the loaded URL is correct.
|
||||
expect(html).toContain(`data-pathname=${pathname}`);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @vercel/node
|
||||
|
||||
## 3.0.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`11218a179`](https://github.com/vercel/vercel/commit/11218a179870a5420c5a6ff720cd4aec4f7e1c5e)]:
|
||||
- @vercel/build-utils@7.9.1
|
||||
|
||||
## 3.0.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/node",
|
||||
"version": "3.0.23",
|
||||
"version": "3.0.24",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index",
|
||||
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
|
||||
@@ -24,7 +24,7 @@
|
||||
"@edge-runtime/primitives": "4.1.0",
|
||||
"@edge-runtime/vm": "3.2.0",
|
||||
"@types/node": "14.18.33",
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"@vercel/error-utils": "2.0.2",
|
||||
"@vercel/nft": "0.26.4",
|
||||
"@vercel/static-config": "3.0.0",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/which": "3.0.0",
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"execa": "^1.0.0",
|
||||
"fs-extra": "11.1.1",
|
||||
"jest-junit": "16.0.0",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"@types/aws-lambda": "8.10.19",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "6.0.0",
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"execa": "3.2.0",
|
||||
"fs-extra": "11.1.0",
|
||||
"jest-junit": "16.0.0"
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @vercel/remix-builder
|
||||
|
||||
## 2.1.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Disable `prepareCache()` npm install for Remix + Vite ([#11281](https://github.com/vercel/vercel/pull/11281))
|
||||
|
||||
## 2.1.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/remix-builder",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"homepage": "https://vercel.com/docs",
|
||||
@@ -32,7 +32,7 @@
|
||||
"@types/jest": "27.5.1",
|
||||
"@types/node": "14.18.33",
|
||||
"@types/semver": "7.3.13",
|
||||
"@vercel/build-utils": "7.9.0",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"jest-junit": "16.0.0",
|
||||
"path-to-regexp": "6.2.1",
|
||||
"semver": "7.5.2"
|
||||
|
||||
@@ -5,8 +5,8 @@ import {
|
||||
runNpmInstall,
|
||||
} from '@vercel/build-utils';
|
||||
import { dirname, join, relative } from 'path';
|
||||
import { require_, chdirAndReadConfig } from './utils';
|
||||
import type { PrepareCache } from '@vercel/build-utils';
|
||||
import { require_, chdirAndReadConfig, isVite } from './utils';
|
||||
import type { Files, PrepareCache } from '@vercel/build-utils';
|
||||
|
||||
export const prepareCache: PrepareCache = async ({
|
||||
entrypoint,
|
||||
@@ -17,45 +17,49 @@ export const prepareCache: PrepareCache = async ({
|
||||
const root = repoRootPath || workPath;
|
||||
const mountpoint = dirname(entrypoint);
|
||||
const entrypointFsDirname = join(workPath, mountpoint);
|
||||
let cacheDirFiles: Files | undefined;
|
||||
|
||||
// Because the `node_modules` directory was modified to install
|
||||
// the forked Remix compiler, re-install to the "fresh" dependencies
|
||||
// state before the cache gets created.
|
||||
const nodeVersion = await getNodeVersion(
|
||||
entrypointFsDirname,
|
||||
undefined,
|
||||
config
|
||||
);
|
||||
const spawnOpts = getSpawnOptions({}, nodeVersion);
|
||||
await runNpmInstall(
|
||||
entrypointFsDirname,
|
||||
[],
|
||||
{
|
||||
...spawnOpts,
|
||||
stdio: 'ignore',
|
||||
},
|
||||
undefined,
|
||||
nodeVersion
|
||||
);
|
||||
|
||||
const packageJsonPath = join(entrypointFsDirname, 'package.json');
|
||||
const remixRunDevPath = dirname(
|
||||
require_.resolve('@remix-run/dev/package.json', {
|
||||
paths: [entrypointFsDirname],
|
||||
})
|
||||
);
|
||||
const remixConfig = await chdirAndReadConfig(
|
||||
remixRunDevPath,
|
||||
entrypointFsDirname,
|
||||
packageJsonPath
|
||||
);
|
||||
const [nodeModulesFiles, cacheDirFiles] = await Promise.all([
|
||||
// Cache `node_modules`
|
||||
glob('**/node_modules/**', root),
|
||||
if (!isVite(workPath)) {
|
||||
// Because the `node_modules` directory was modified to install
|
||||
// the forked Remix compiler, re-install to the "fresh" dependencies
|
||||
// state before the cache gets created.
|
||||
const nodeVersion = await getNodeVersion(
|
||||
entrypointFsDirname,
|
||||
undefined,
|
||||
config
|
||||
);
|
||||
const spawnOpts = getSpawnOptions({}, nodeVersion);
|
||||
await runNpmInstall(
|
||||
entrypointFsDirname,
|
||||
[],
|
||||
{
|
||||
...spawnOpts,
|
||||
stdio: 'ignore',
|
||||
},
|
||||
undefined,
|
||||
nodeVersion
|
||||
);
|
||||
|
||||
const packageJsonPath = join(entrypointFsDirname, 'package.json');
|
||||
const remixRunDevPath = dirname(
|
||||
require_.resolve('@remix-run/dev/package.json', {
|
||||
paths: [entrypointFsDirname],
|
||||
})
|
||||
);
|
||||
const remixConfig = await chdirAndReadConfig(
|
||||
remixRunDevPath,
|
||||
entrypointFsDirname,
|
||||
packageJsonPath
|
||||
);
|
||||
// Cache the Remix "cacheDirectory" (typically `.cache`)
|
||||
glob(relative(root, join(remixConfig.cacheDirectory, '**')), root),
|
||||
]);
|
||||
cacheDirFiles = await glob(
|
||||
relative(root, join(remixConfig.cacheDirectory, '**')),
|
||||
root
|
||||
);
|
||||
}
|
||||
|
||||
// Cache `node_modules`
|
||||
const nodeModulesFiles = await glob('**/node_modules/**', root);
|
||||
|
||||
return { ...nodeModulesFiles, ...cacheDirFiles };
|
||||
};
|
||||
|
||||
@@ -422,7 +422,12 @@ export function logNftWarnings(warnings: Set<Error>, required?: string) {
|
||||
}
|
||||
|
||||
export function isVite(dir: string): boolean {
|
||||
const viteConfig = findConfig(dir, 'vite.config', ['.js', '.ts']);
|
||||
const viteConfig = findConfig(dir, 'vite.config', [
|
||||
'.js',
|
||||
'.ts',
|
||||
'.mjs',
|
||||
'.mts',
|
||||
]);
|
||||
if (!viteConfig) return false;
|
||||
|
||||
const remixConfig = findConfig(dir, 'remix.config');
|
||||
|
||||
7
packages/remix/test/fixtures-vite/03-spa-no-preset/.gitignore
vendored
Normal file
7
packages/remix/test/fixtures-vite/03-spa-no-preset/.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
|
||||
/.cache
|
||||
/build
|
||||
/public/build
|
||||
.env
|
||||
.vercel
|
||||
@@ -0,0 +1,12 @@
|
||||
import { RemixBrowser } from "@remix-run/react";
|
||||
import { startTransition, StrictMode } from "react";
|
||||
import { hydrateRoot } from "react-dom/client";
|
||||
|
||||
startTransition(() => {
|
||||
hydrateRoot(
|
||||
document,
|
||||
<StrictMode>
|
||||
<RemixBrowser />
|
||||
</StrictMode>
|
||||
);
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import type { EntryContext } from "@remix-run/node";
|
||||
import { RemixServer } from "@remix-run/react";
|
||||
import { renderToString } from "react-dom/server";
|
||||
|
||||
export default function handleRequest(
|
||||
request: Request,
|
||||
responseStatusCode: number,
|
||||
responseHeaders: Headers,
|
||||
remixContext: EntryContext
|
||||
) {
|
||||
let html = renderToString(
|
||||
<RemixServer context={remixContext} url={request.url} />
|
||||
);
|
||||
html = "<!DOCTYPE html>\n" + html;
|
||||
return new Response(html, {
|
||||
headers: { "Content-Type": "text/html" },
|
||||
status: responseStatusCode,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import {
|
||||
Links,
|
||||
Meta,
|
||||
Outlet,
|
||||
Scripts,
|
||||
ScrollRestoration,
|
||||
} from "@remix-run/react";
|
||||
|
||||
export function Layout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charSet="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<Meta />
|
||||
<Links />
|
||||
</head>
|
||||
<body>
|
||||
{children}
|
||||
<ScrollRestoration />
|
||||
<Scripts />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
return <Outlet />;
|
||||
}
|
||||
|
||||
export function HydrateFallback() {
|
||||
return <p>Loading...</p>;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import type { MetaFunction } from "@remix-run/node";
|
||||
|
||||
export const meta: MetaFunction = () => {
|
||||
return [
|
||||
{ title: "New Remix SPA" },
|
||||
{ name: "description", content: "Welcome to Remix (SPA Mode)!" },
|
||||
];
|
||||
};
|
||||
|
||||
export default function Index() {
|
||||
return (
|
||||
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.8" }}>
|
||||
<h1>Welcome to Remix (SPA Mode)</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://remix.run/future/spa-mode"
|
||||
rel="noreferrer"
|
||||
>
|
||||
SPA Mode Guide
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" href="https://remix.run/docs" rel="noreferrer">
|
||||
Remix Docs
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
2
packages/remix/test/fixtures-vite/03-spa-no-preset/env.d.ts
vendored
Normal file
2
packages/remix/test/fixtures-vite/03-spa-no-preset/env.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/// <reference types="@remix-run/node" />
|
||||
/// <reference types="vite/client" />
|
||||
8063
packages/remix/test/fixtures-vite/03-spa-no-preset/package-lock.json
generated
Normal file
8063
packages/remix/test/fixtures-vite/03-spa-no-preset/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "my-remix-spa",
|
||||
"private": true,
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "remix vite:build",
|
||||
"dev": "remix vite:dev",
|
||||
"preview": "vite preview",
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@remix-run/node": "^2.8.1",
|
||||
"@remix-run/react": "^2.8.1",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@remix-run/dev": "^2.8.1",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"typescript": "^5.1.6",
|
||||
"vite": "^5.1.0",
|
||||
"vite-tsconfig-paths": "^4.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user