mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-27 03:39:11 +00:00
Compare commits
1 Commits
@vercel/cl
...
Jeff
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b69dda862 |
@@ -10,7 +10,6 @@ packages/*/test/fixtures
|
||||
packages/cli/@types
|
||||
packages/cli/download
|
||||
packages/cli/dist
|
||||
packages/cli/test/fixtures
|
||||
packages/cli/test/dev/fixtures
|
||||
packages/cli/bin
|
||||
packages/cli/link
|
||||
|
||||
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 @jeffsee55 @erikareads
|
||||
/.github/workflows @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @ijjk
|
||||
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @agadzik @chloetedder
|
||||
/packages/next @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
|
||||
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @ijjk
|
||||
/packages/static-build @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads
|
||||
/packages/edge @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @vercel/compute
|
||||
/examples @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @leerob
|
||||
/examples/create-react-app @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @Timer
|
||||
/examples/nextjs @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
|
||||
/packages/node @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @erikareads @Kikobeats
|
||||
* @TooTallNate @EndangeredMassa @trek
|
||||
/.github/workflows @TooTallNate @EndangeredMassa @trek @ijjk
|
||||
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @agadzik @chloetedder
|
||||
/packages/next @TooTallNate @EndangeredMassa @Ethan-Arrowood @trek @ijjk @ztanner
|
||||
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @ijjk
|
||||
/packages/static-build @TooTallNate @EndangeredMassa @trek
|
||||
/packages/edge @vercel/compute @TooTallNate @EndangeredMassa @trek
|
||||
/examples @leerob
|
||||
/examples/create-react-app @Timer
|
||||
/examples/nextjs @timneutkens @ijjk @ztanner @huozhi
|
||||
/packages/node @TooTallNate @EndangeredMassa @trek @Kikobeats
|
||||
|
||||
# Unrestricted Paths
|
||||
.changeset/
|
||||
|
||||
109
.github/CONTRIBUTING.md
vendored
109
.github/CONTRIBUTING.md
vendored
@@ -1,3 +1,108 @@
|
||||
## Contributing
|
||||
# Contributing
|
||||
|
||||
See the [Contributing Guidelines](../README.md#contributing) for more details.
|
||||
When contributing to this repository, please first discuss the change you wish to make via [GitHub Discussions](https://github.com/vercel/vercel/discussions/new) with the owners of this repository before submitting a Pull Request.
|
||||
|
||||
Please read our [Code of Conduct](CODE_OF_CONDUCT.md) and follow it in all your interactions with the project.
|
||||
|
||||
## Local development
|
||||
|
||||
This project is configured in a monorepo, where one repository contains multiple npm packages. Dependencies are installed and managed with `pnpm`, not `npm` CLI.
|
||||
|
||||
To get started, execute the following:
|
||||
|
||||
```
|
||||
git clone https://github.com/vercel/vercel
|
||||
cd vercel
|
||||
corepack enable
|
||||
pnpm install
|
||||
pnpm build
|
||||
pnpm lint
|
||||
pnpm test-unit
|
||||
```
|
||||
|
||||
Make sure all the tests pass before making changes.
|
||||
|
||||
### Running Vercel CLI Changes
|
||||
|
||||
You can use `pnpm dev` from the `cli` package to invoke Vercel CLI with local changes:
|
||||
|
||||
```
|
||||
cd ./packages/cli
|
||||
pnpm dev <cli-commands...>
|
||||
```
|
||||
|
||||
See [CLI Local Development](../packages/cli#local-development) for more details.
|
||||
|
||||
## Verifying your change
|
||||
|
||||
Once you are done with your changes (we even suggest doing it along the way), make sure all the tests still pass by running:
|
||||
|
||||
```
|
||||
pnpm test-unit
|
||||
```
|
||||
|
||||
from the root of the project.
|
||||
|
||||
If any test fails, make sure to fix it along with your changes. See [Interpreting test errors](#Interpreting-test-errors) for more information about how the tests are executed, especially the integration tests.
|
||||
|
||||
## Pull Request Process
|
||||
|
||||
Once you are confident that your changes work properly, open a pull request on the main repository.
|
||||
|
||||
The pull request will be reviewed by the maintainers and the tests will be checked by our continuous integration platform.
|
||||
|
||||
## Interpreting test errors
|
||||
|
||||
There are 2 kinds of tests in this repository – Unit tests and Integration tests.
|
||||
|
||||
Unit tests are run locally with `jest` and execute quickly because they are testing the smallest units of code.
|
||||
|
||||
### Integration tests
|
||||
|
||||
Integration tests create deployments to your Vercel account using the `test` project name. After each test is deployed, the `probes` key is used to check if the response is the expected value. If the value doesn't match, you'll see a message explaining the difference. If the deployment failed to build, you'll see a more generic message like the following:
|
||||
|
||||
```
|
||||
[Error: Fetched page https://test-8ashcdlew.vercel.app/root.js does not contain hello Root!. Instead it contains An error occurred with this application.
|
||||
|
||||
NO_STATUS_CODE_FRO Response headers:
|
||||
cache-control=s-maxage=0
|
||||
connection=close
|
||||
content-type=text/plain; charset=utf-8
|
||||
date=Wed, 19 Jun 2019 18:01:37 GMT
|
||||
server=now
|
||||
strict-transport-security=max-age=63072000
|
||||
transfer-encoding=chunked
|
||||
x-now-id=iad1:hgtzj-1560967297876-44ae12559f95
|
||||
x-now-trace=iad1]
|
||||
```
|
||||
|
||||
In such cases, you can visit the URL of the failed deployment and append `/_logs` to see the build error. In the case above, that would be https://test-8ashcdlew.vercel.app/_logs
|
||||
|
||||
The logs of this deployment will contain the actual error which may help you to understand what went wrong.
|
||||
|
||||
### @vercel/nft
|
||||
|
||||
Some of the Builders use `@vercel/nft` to tree-shake files before deployment. If you suspect an error with this tree-shaking mechanism, you can create the following script in your project:
|
||||
|
||||
```js
|
||||
const { nodeFileTrace } = require('@vercel/nft');
|
||||
nodeFileTrace(['path/to/entrypoint.js'], {
|
||||
ts: true,
|
||||
mixedModules: true,
|
||||
})
|
||||
.then(o => console.log(o.fileList))
|
||||
.then(e => console.error(e));
|
||||
```
|
||||
|
||||
When you run this script, you'll see all the imported files. If anything file is missing, the bug is in [@vercel/nft](https://github.com/vercel/nft) and not the Builder.
|
||||
|
||||
## Deploy a Builder with existing project
|
||||
|
||||
Sometimes you want to test changes to a Builder against an existing project, maybe with `vercel dev` or actual deployment. You can avoid publishing every Builder change to npm by uploading the Builder as a tarball.
|
||||
|
||||
1. Change directory to the desired Builder `cd ./packages/node`
|
||||
2. Run `pnpm build` to compile typescript and other build steps
|
||||
3. Run `npm pack` to create a tarball file
|
||||
4. Run `vercel *.tgz` to upload the tarball file and get a URL
|
||||
5. Edit any existing `vercel.json` project and replace `use` with the URL
|
||||
6. Run `vercel` or `vercel dev` to deploy with the experimental Builder
|
||||
|
||||
159
.github/dependabot.yml
vendored
159
.github/dependabot.yml
vendored
@@ -1,8 +1,7 @@
|
||||
version: 2
|
||||
|
||||
updates:
|
||||
- directory: /packages/static-build/test/fixtures/angular-v17
|
||||
schedule:
|
||||
- schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
@@ -12,6 +11,7 @@ updates:
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
directory: /packages/static-build/test/fixtures/angular-v17
|
||||
allow:
|
||||
- dependency-name: '@angular*'
|
||||
ignore:
|
||||
@@ -25,9 +25,8 @@ updates:
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- directory: /packages/static-build/test/fixtures/astro-v4
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
- schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
- 'trek'
|
||||
@@ -36,6 +35,7 @@ updates:
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
directory: /packages/static-build/test/fixtures/astro-v4
|
||||
allow:
|
||||
- dependency-name: 'astro*'
|
||||
ignore:
|
||||
@@ -49,8 +49,7 @@ updates:
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- directory: /packages/static-build/test/fixtures/hydrogen-v2023
|
||||
schedule:
|
||||
- schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
@@ -60,6 +59,7 @@ 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,148 +77,3 @@ 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: '@ionic*'
|
||||
- dependency-name: '@angular*'
|
||||
ignore:
|
||||
- dependency-name: '@ionic*'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
- dependency-name: '@angular*'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
groups:
|
||||
core:
|
||||
patterns:
|
||||
- '@angular*'
|
||||
- '@ionic*'
|
||||
update-types:
|
||||
- 'minor'
|
||||
|
||||
- directory: /packages/static-build/test/fixtures/ionic-react-v7
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
- 'trek'
|
||||
- 'TooTallNate'
|
||||
- 'EndangeredMassa'
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
allow:
|
||||
- dependency-name: '@ionic*'
|
||||
- dependency-name: 'react*'
|
||||
ignore:
|
||||
- dependency-name: '@ionic*'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
- dependency-name: 'react*'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
groups:
|
||||
core:
|
||||
patterns:
|
||||
- '@ionic*'
|
||||
- 'react*'
|
||||
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/preact-v10
|
||||
schedule:
|
||||
interval: 'daily'
|
||||
open-pull-requests-limit: 1
|
||||
reviewers:
|
||||
- 'trek'
|
||||
- 'TooTallNate'
|
||||
- 'EndangeredMassa'
|
||||
commit-message:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
allow:
|
||||
- dependency-name: 'preact*'
|
||||
ignore:
|
||||
- dependency-name: 'preact*'
|
||||
update-types:
|
||||
['version-update:semver-major', 'version-update:semver-patch']
|
||||
groups:
|
||||
core:
|
||||
patterns:
|
||||
- 'preact*'
|
||||
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'
|
||||
|
||||
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@@ -79,13 +79,16 @@ jobs:
|
||||
run: npm i -g pnpm@8.3.1
|
||||
|
||||
- run: pnpm install
|
||||
- name: fetch ssl certificate before build (linux, os x)
|
||||
if: matrix.runner != 'windows-latest'
|
||||
run: echo | openssl s_client -showcerts -servername 'api.vercel.com' -connect 76.76.21.21:443
|
||||
|
||||
- name: Build ${{matrix.packageName}} and all its dependencies
|
||||
run: node utils/gen.js && node_modules/.bin/turbo run build --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --include-dependencies --no-deps
|
||||
env:
|
||||
FORCE_COLOR: '1'
|
||||
- name: Test ${{matrix.packageName}}
|
||||
run: node utils/gen.js && node_modules/.bin/turbo run ${{matrix.testScript}} --summarize --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --no-deps -- ${{ join(matrix.testPaths, ' ') }}
|
||||
run: node utils/gen.js && node_modules/.bin/turbo run test --summarize --cache-dir=".turbo" --log-order=stream --scope=${{matrix.packageName}} --no-deps -- ${{ join(matrix.testPaths, ' ') }}
|
||||
shell: bash
|
||||
env:
|
||||
JEST_JUNIT_OUTPUT_FILE: ${{github.workspace}}/.junit-reports/${{matrix.scriptName}}-${{matrix.packageName}}-${{matrix.chunkNumber}}-${{ matrix.runner }}.xml
|
||||
@@ -101,6 +104,9 @@ jobs:
|
||||
TURBO_MISS_COUNT=`node utils/determine-turbo-hit-or-miss.js`
|
||||
echo "MISS COUNT: $TURBO_MISS_COUNT"
|
||||
echo "misses=$TURBO_MISS_COUNT" >> $GITHUB_OUTPUT
|
||||
- name: fetch ssl certificate after tests (linux, os x)
|
||||
if: matrix.runner != 'windows-latest'
|
||||
run: echo | openssl s_client -showcerts -servername 'api.vercel.com' -connect 76.76.21.21:443
|
||||
- name: 'Upload Test Report to Datadog'
|
||||
if: ${{ steps['turbo-summary'].outputs.misses != '0' && !cancelled() }}
|
||||
run: 'npx @datadog/datadog-ci@2.18.1 junit upload --service vercel-cli .junit-reports'
|
||||
|
||||
133
README.md
133
README.md
@@ -13,7 +13,7 @@
|
||||
<a href="https://vercel.com/docs"><strong>Documentation</strong></a> ·
|
||||
<a href="https://vercel.com/changelog"><strong>Changelog</strong></a> ·
|
||||
<a href="https://vercel.com/templates"><strong>Templates</strong></a> ·
|
||||
<a href="https://vercel.com/docs/cli"><strong>CLI</strong></a>
|
||||
<a href="https://vercel.com/cli"><strong>CLI</strong></a>
|
||||
</p>
|
||||
<br/>
|
||||
|
||||
@@ -23,7 +23,7 @@ Vercel’s Frontend Cloud provides the developer experience and infrastructure t
|
||||
|
||||
## Deploy
|
||||
|
||||
Get started by [importing a project](https://vercel.com/new) or using the [Vercel CLI](https://vercel.com/docs/cli). Then, `git push` to deploy.
|
||||
Get started by [importing a project](https://vercel.com/new) or using the [Vercel CLI](https://vercel.com/cli). Then, `git push` to deploy.
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -35,134 +35,7 @@ This project uses [pnpm](https://pnpm.io/) to install dependencies and run scrip
|
||||
|
||||
You can use the `dev` script to run local changes as if you were invoking Vercel CLI. For example, `vercel deploy --cwd=/path/to/project` could be run with local changes with `pnpm dev deploy --cwd=/path/to/project`.
|
||||
|
||||
When contributing to this repository, please first discuss the change you wish to make via [GitHub Discussions](https://github.com/vercel/vercel/discussions/new) with the owners of this repository before submitting a Pull Request.
|
||||
|
||||
Please read our [Code of Conduct](CODE_OF_CONDUCT.md) and follow it in all your interactions with the project.
|
||||
|
||||
### Local development
|
||||
|
||||
This project is configured in a monorepo, where one repository contains multiple npm packages. Dependencies are installed and managed with `pnpm`, not `npm` CLI.
|
||||
|
||||
To get started, execute the following:
|
||||
|
||||
```
|
||||
git clone https://github.com/vercel/vercel
|
||||
cd vercel
|
||||
corepack enable
|
||||
pnpm install
|
||||
pnpm build
|
||||
pnpm lint
|
||||
pnpm test-unit
|
||||
```
|
||||
|
||||
Make sure all the tests pass before making changes.
|
||||
|
||||
#### Running Vercel CLI Changes
|
||||
|
||||
You can use `pnpm dev` from the `cli` package to invoke Vercel CLI with local changes:
|
||||
|
||||
```
|
||||
cd ./packages/cli
|
||||
pnpm dev <cli-commands...>
|
||||
```
|
||||
|
||||
See [CLI Local Development](../packages/cli#local-development) for more details.
|
||||
|
||||
### Verifying your change
|
||||
|
||||
Once you are done with your changes (we even suggest doing it along the way), make sure all the tests still pass by running:
|
||||
|
||||
```
|
||||
pnpm test-unit
|
||||
```
|
||||
|
||||
from the root of the project.
|
||||
|
||||
If any test fails, make sure to fix it along with your changes. See [Interpreting test errors](#Interpreting-test-errors) for more information about how the tests are executed, especially the integration tests.
|
||||
|
||||
### Pull Request Process
|
||||
|
||||
Once you are confident that your changes work properly, open a pull request on the main repository.
|
||||
|
||||
The pull request will be reviewed by the maintainers and the tests will be checked by our continuous integration platform.
|
||||
|
||||
### Interpreting test errors
|
||||
|
||||
There are 2 kinds of tests in this repository – Unit tests and Integration tests.
|
||||
|
||||
Unit tests are run locally with `jest` and execute quickly because they are testing the smallest units of code.
|
||||
|
||||
#### Integration tests
|
||||
|
||||
Integration tests create deployments to your Vercel account using the `test` project name. After each test is deployed, the `probes` key is used to check if the response is the expected value. If the value doesn't match, you'll see a message explaining the difference. If the deployment failed to build, you'll see a more generic message like the following:
|
||||
|
||||
```
|
||||
[Error: Fetched page https://test-8ashcdlew.vercel.app/root.js does not contain hello Root!. Instead it contains An error occurred with this application.
|
||||
|
||||
NO_STATUS_CODE_FRO Response headers:
|
||||
cache-control=s-maxage=0
|
||||
connection=close
|
||||
content-type=text/plain; charset=utf-8
|
||||
date=Wed, 19 Jun 2019 18:01:37 GMT
|
||||
server=now
|
||||
strict-transport-security=max-age=63072000
|
||||
transfer-encoding=chunked
|
||||
x-now-id=iad1:hgtzj-1560967297876-44ae12559f95
|
||||
x-now-trace=iad1]
|
||||
```
|
||||
|
||||
In such cases, you can visit the URL of the failed deployment and append `/_logs` to see the build error. In the case above, that would be https://test-8ashcdlew.vercel.app/_logs
|
||||
|
||||
The logs of this deployment will contain the actual error which may help you to understand what went wrong.
|
||||
|
||||
##### Running integration tests locally
|
||||
|
||||
While running the full integration suite locally is not recommended, it's sometimes useful to isolate a failing test by running it on your machine. To do so, you'll need to ensure you have the appropriate credentials sourced in your shell:
|
||||
|
||||
1. Create an access token. Follow the insructions here https://vercel.com/docs/rest-api#creating-an-access-token. Ensure the token scope is for your personal
|
||||
account.
|
||||
2. Grab the team ID from the Vercel dashboard at `https://vercel.com/<MY-TEAM>/~/settings`.
|
||||
3. Source these into your shell rc file: `echo 'export VERCEL_TOKEN=<MY-TOKEN> VERCEL_TEAM_ID=<MY-TEAM-ID>' >> ~/.zshrc`
|
||||
|
||||
From there, you should be able to trigger an integration test. Choose one
|
||||
that's already isolated to check that things work:
|
||||
|
||||
```
|
||||
cd packages/next
|
||||
```
|
||||
|
||||
Run the test:
|
||||
|
||||
```
|
||||
pnpm test test/fixtures/00-server-build/index.test.js
|
||||
```
|
||||
|
||||
#### @vercel/nft
|
||||
|
||||
Some of the Builders use `@vercel/nft` to tree-shake files before deployment. If you suspect an error with this tree-shaking mechanism, you can create the following script in your project:
|
||||
|
||||
```js
|
||||
const { nodeFileTrace } = require('@vercel/nft');
|
||||
nodeFileTrace(['path/to/entrypoint.js'], {
|
||||
ts: true,
|
||||
mixedModules: true,
|
||||
})
|
||||
.then(o => console.log(o.fileList))
|
||||
.then(e => console.error(e));
|
||||
```
|
||||
|
||||
When you run this script, you'll see all the imported files. If anything file is missing, the bug is in [@vercel/nft](https://github.com/vercel/nft) and not the Builder.
|
||||
|
||||
### Deploy a Builder with existing project
|
||||
|
||||
Sometimes you want to test changes to a Builder against an existing project, maybe with `vercel dev` or actual deployment. You can avoid publishing every Builder change to npm by uploading the Builder as a tarball.
|
||||
|
||||
1. Change directory to the desired Builder `cd ./packages/node`
|
||||
2. Run `pnpm build` to compile typescript and other build steps
|
||||
3. Run `npm pack` to create a tarball file
|
||||
4. Run `vercel *.tgz` to upload the tarball file and get a URL
|
||||
5. Edit any existing `vercel.json` project and replace `use` with the URL
|
||||
6. Run `vercel` or `vercel dev` to deploy with the experimental Builder
|
||||
See the [Contributing Guidelines](./.github/CONTRIBUTING.md) for more details.
|
||||
|
||||
## Reference
|
||||
|
||||
|
||||
@@ -50,4 +50,4 @@ Ensure any segments used in the `destination` property are also used in the `sou
|
||||
|
||||
- [path-to-regexp](https://github.com/pillarjs/path-to-regexp/tree/v6.1.0)
|
||||
- [named parameters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#named-parameters)
|
||||
- [un-named parameters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#unnamed-parameters)
|
||||
- [un-named paramters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#unnamed-parameters)
|
||||
|
||||
2
examples/README.md
vendored
2
examples/README.md
vendored
@@ -1,6 +1,6 @@
|
||||
# Vercel Examples
|
||||
|
||||
To get started using any of these examples as your own project, [install Vercel](https://vercel.com/docs/cli) and use either of the following commands in your terminal:
|
||||
To get started using any of these examples as your own project, [install Vercel](https://vercel.com/cli) and use either of the following commands in your terminal:
|
||||
|
||||
```sh
|
||||
vercel init # Pick an example in the CLI
|
||||
|
||||
@@ -4,7 +4,7 @@ import { lstatSync, readdirSync } from 'fs';
|
||||
export async function deployExample(filename: string) {
|
||||
const { testDeployment } = require('../../test/lib/deployment/test-deployment.js');
|
||||
const example = basename(filename).replace(/\.test\.ts$/, '');
|
||||
await testDeployment(join(process.cwd(), example));
|
||||
await testDeployment(join(filename, '..', '..', '..', example));
|
||||
}
|
||||
|
||||
export function getExamples() {
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"engines": {
|
||||
"node": "18.x"
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,6 @@ menu:
|
||||
main: {}
|
||||
---
|
||||
|
||||
This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
|
||||
This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
|
||||
|
||||
{{< form-contact action="https://example.com" >}}
|
||||
|
||||
@@ -8,7 +8,7 @@ This directory is a brief example of a [Hydrogen v2](https://shopify.dev/custom-
|
||||
|
||||
_Live Example: https://hydrogen-v2-template.vercel.app_
|
||||
|
||||
You can also deploy using the [Vercel CLI](https://vercel.com/docs/cli):
|
||||
You can also deploy using the [Vercel CLI](https://vercel.com/cli):
|
||||
|
||||
```sh
|
||||
npm i -g vercel
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"engines": {
|
||||
"node": "18.x"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"engines": {
|
||||
"node": "18.x"
|
||||
}
|
||||
}
|
||||
559
examples/nextjs/package-lock.json
generated
559
examples/nextjs/package-lock.json
generated
@@ -8,7 +8,7 @@
|
||||
"name": "nextjs",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"next": "14.1.4",
|
||||
"next": "14.1.3",
|
||||
"react": "^18",
|
||||
"react-dom": "^18"
|
||||
},
|
||||
@@ -18,7 +18,7 @@
|
||||
"@types/react-dom": "^18",
|
||||
"autoprefixer": "^10.0.1",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.1.4",
|
||||
"eslint-config-next": "14.1.3",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"typescript": "^5"
|
||||
@@ -46,9 +46,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.24.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz",
|
||||
"integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==",
|
||||
"version": "7.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz",
|
||||
"integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
@@ -239,23 +239,23 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/env": {
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.4.tgz",
|
||||
"integrity": "sha512-e7X7bbn3Z6DWnDi75UWn+REgAbLEqxI8Tq2pkFOFAMpWAWApz/YCUhtWMWn410h8Q2fYiYL7Yg5OlxMOCfFjJQ=="
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.3.tgz",
|
||||
"integrity": "sha512-VhgXTvrgeBRxNPjyfBsDIMvgsKDxjlpw4IAUsHCX8Gjl1vtHUYRT3+xfQ/wwvLPDd/6kqfLqk9Pt4+7gysuCKQ=="
|
||||
},
|
||||
"node_modules/@next/eslint-plugin-next": {
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.1.4.tgz",
|
||||
"integrity": "sha512-n4zYNLSyCo0Ln5b7qxqQeQ34OZKXwgbdcx6kmkQbywr+0k6M3Vinft0T72R6CDAcDrne2IAgSud4uWCzFgc5HA==",
|
||||
"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==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"glob": "10.3.10"
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-arm64": {
|
||||
"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==",
|
||||
"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==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -268,9 +268,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-x64": {
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.4.tgz",
|
||||
"integrity": "sha512-b0Xo1ELj3u7IkZWAKcJPJEhBop117U78l70nfoQGo4xUSvv0PJSTaV4U9xQBLvZlnjsYkc8RwQN1HoH/oQmLlQ==",
|
||||
"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==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -283,9 +283,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-gnu": {
|
||||
"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==",
|
||||
"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==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -298,9 +298,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-musl": {
|
||||
"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==",
|
||||
"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==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -313,9 +313,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-gnu": {
|
||||
"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==",
|
||||
"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==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -328,9 +328,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-musl": {
|
||||
"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==",
|
||||
"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==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -343,9 +343,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-arm64-msvc": {
|
||||
"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==",
|
||||
"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==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -358,9 +358,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-ia32-msvc": {
|
||||
"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==",
|
||||
"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==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -373,9 +373,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-x64-msvc": {
|
||||
"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==",
|
||||
"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==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -433,9 +433,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rushstack/eslint-patch": {
|
||||
"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==",
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.7.2.tgz",
|
||||
"integrity": "sha512-RbhOOTCNoCrbfkRyoXODZp75MlpiHMgbE5MEBZAnnnLyQNgrigEj4p0lzsMDyc1zVsJDLrivB58tgg3emX0eEA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@swc/helpers": {
|
||||
@@ -453,9 +453,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.11.30",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz",
|
||||
"integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==",
|
||||
"version": "20.11.25",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz",
|
||||
"integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
@@ -468,9 +468,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "18.2.67",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.67.tgz",
|
||||
"integrity": "sha512-vkIE2vTIMHQ/xL0rgmuoECBCkZFZeHr49HeWSc24AptMbNRo7pwSBvj73rlJJs9fGKj0koS+V7kQB1jHS0uCgw==",
|
||||
"version": "18.2.64",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.64.tgz",
|
||||
"integrity": "sha512-MlmPvHgjj2p3vZaxbQgFUQFvD8QiZwACfGqEdDSWou5yISWxDQ4/74nCAwsUiX7UFLKZz3BbVSPj+YxeoGGCfg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
@@ -479,9 +479,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react-dom": {
|
||||
"version": "18.2.22",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.22.tgz",
|
||||
"integrity": "sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==",
|
||||
"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==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/react": "*"
|
||||
@@ -771,17 +771,35 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/array.prototype.findlast": {
|
||||
"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==",
|
||||
"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.7",
|
||||
"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==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.5",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.2",
|
||||
"es-abstract": "^1.22.3",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.0.0",
|
||||
"es-shim-unscopables": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
@@ -792,16 +810,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/array.prototype.findlastindex": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz",
|
||||
"integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==",
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz",
|
||||
"integrity": "sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"call-bind": "^1.0.5",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.2",
|
||||
"es-abstract": "^1.22.3",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.0.0",
|
||||
"es-shim-unscopables": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
@@ -900,6 +917,15 @@
|
||||
"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",
|
||||
@@ -977,15 +1003,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/binary-extensions": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
|
||||
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
@@ -1091,9 +1114,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001599",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001599.tgz",
|
||||
"integrity": "sha512-LRAQHZ4yT1+f9LemSMeqdMpMxZcc4RMWdj4tiFe3G8tNkWK+E58g+/tzotb5cU6TbcVJLr4fySiAW7XmxQvZQA==",
|
||||
"version": "1.0.30001594",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001594.tgz",
|
||||
"integrity": "sha512-VblSX6nYqyJVs8DKFMldE2IVCJjZ225LW00ydtUWwh5hk9IfkTOffO6r8gJNsH0qqqeAF8KrbMYA2VEwTlGW5g==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@@ -1237,57 +1260,6 @@
|
||||
"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",
|
||||
@@ -1397,9 +1369,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.711",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.711.tgz",
|
||||
"integrity": "sha512-hRg81qzvUEibX2lDxnFlVCHACa+LtrCPIsWAxo161LDYIB3jauf57RGsMZV9mvGwE98yGH06icj3zBEoOkxd/w==",
|
||||
"version": "1.4.694",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.694.tgz",
|
||||
"integrity": "sha512-kM3SwvGTYpBFJSc8jm4IYVMIOzDmAGd/Ry96O9elRiM6iEwHKNKhtXyFGzpfMMIGZD84W4/hyaULlMmNVvLQlQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
@@ -1409,9 +1381,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/enhanced-resolve": {
|
||||
"version": "5.16.0",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz",
|
||||
"integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==",
|
||||
"version": "5.15.1",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.1.tgz",
|
||||
"integrity": "sha512-3d3JRbwsCLJsYgvb6NuWEG44jjPSOMuS73L/6+7BZuoKm3W+qXnSoIYVHi8dG7Qcg4inAY4jbzkZ7MnskePeDg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.4",
|
||||
@@ -1422,21 +1394,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/es-abstract": {
|
||||
"version": "1.23.2",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.2.tgz",
|
||||
"integrity": "sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w==",
|
||||
"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==",
|
||||
"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",
|
||||
@@ -1447,11 +1415,10 @@
|
||||
"has-property-descriptors": "^1.0.2",
|
||||
"has-proto": "^1.0.3",
|
||||
"has-symbols": "^1.0.3",
|
||||
"hasown": "^2.0.2",
|
||||
"hasown": "^2.0.1",
|
||||
"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",
|
||||
@@ -1462,17 +1429,17 @@
|
||||
"object-keys": "^1.1.1",
|
||||
"object.assign": "^4.1.5",
|
||||
"regexp.prototype.flags": "^1.5.2",
|
||||
"safe-array-concat": "^1.1.2",
|
||||
"safe-array-concat": "^1.1.0",
|
||||
"safe-regex-test": "^1.0.3",
|
||||
"string.prototype.trim": "^1.2.9",
|
||||
"string.prototype.trimend": "^1.0.8",
|
||||
"string.prototype.trim": "^1.2.8",
|
||||
"string.prototype.trimend": "^1.0.7",
|
||||
"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.15"
|
||||
"which-typed-array": "^1.1.14"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -1481,6 +1448,12 @@
|
||||
"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",
|
||||
@@ -1503,37 +1476,26 @@
|
||||
}
|
||||
},
|
||||
"node_modules/es-iterator-helpers": {
|
||||
"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==",
|
||||
"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==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"asynciterator.prototype": "^1.0.0",
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.0",
|
||||
"es-abstract": "^1.22.4",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-set-tostringtag": "^2.0.3",
|
||||
"es-set-tostringtag": "^2.0.2",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"globalthis": "^1.0.3",
|
||||
"has-property-descriptors": "^1.0.2",
|
||||
"has-proto": "^1.0.3",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-symbols": "^1.0.3",
|
||||
"internal-slot": "^1.0.7",
|
||||
"iterator.prototype": "^1.1.2",
|
||||
"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"
|
||||
"safe-array-concat": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -1656,12 +1618,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-config-next": {
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.1.4.tgz",
|
||||
"integrity": "sha512-cihIahbhYAWwXJwZkAaRPpUi5t9aOi/HdfWXOjZeUOqNWXHD8X22kd1KG58Dc3MVaRx3HoR/oMGk2ltcrqDn8g==",
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.1.3.tgz",
|
||||
"integrity": "sha512-sUCpWlGuHpEhI0pIT0UtdSLJk5Z8E2DYinPTwsBiWaSYQomchdl0i60pjynY48+oXvtyWMQ7oE+G3m49yrfacg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@next/eslint-plugin-next": "14.1.4",
|
||||
"@next/eslint-plugin-next": "14.1.3",
|
||||
"@rushstack/eslint-patch": "^1.3.3",
|
||||
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
|
||||
"eslint-import-resolver-node": "^0.3.6",
|
||||
@@ -1844,9 +1806,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-react": {
|
||||
"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==",
|
||||
"version": "7.34.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.0.tgz",
|
||||
"integrity": "sha512-MeVXdReleBTdkz/bvcQMSnCXGi+c9kvy51IpinjnJgutl3YTHWsDdke7Z1ufZpGfDG8xduBDKyjtB9JH1eBKIQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"array-includes": "^3.1.7",
|
||||
@@ -2258,9 +2220,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/get-tsconfig": {
|
||||
"version": "4.7.3",
|
||||
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz",
|
||||
"integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==",
|
||||
"version": "4.7.2",
|
||||
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz",
|
||||
"integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"resolve-pkg-maps": "^1.0.0"
|
||||
@@ -2470,9 +2432,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz",
|
||||
"integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
@@ -2640,21 +2602,6 @@
|
||||
"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",
|
||||
@@ -2728,13 +2675,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/is-map": {
|
||||
"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==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz",
|
||||
"integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
@@ -2801,13 +2745,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/is-set": {
|
||||
"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==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
|
||||
"integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
@@ -2873,13 +2814,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/is-weakmap": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",
|
||||
"integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz",
|
||||
"integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
@@ -2897,16 +2835,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/is-weakset": {
|
||||
"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==",
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz",
|
||||
"integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"get-intrinsic": "^1.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
"call-bind": "^1.0.2",
|
||||
"get-intrinsic": "^1.1.1"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@@ -3215,11 +3150,11 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/next": {
|
||||
"version": "14.1.4",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-14.1.4.tgz",
|
||||
"integrity": "sha512-1WTaXeSrUwlz/XcnhGTY7+8eiaFvdet5z9u3V2jb+Ek1vFo0VhHKSAIJvDWfQpttWjnyw14kBeq28TPq7bTeEQ==",
|
||||
"version": "14.1.3",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-14.1.3.tgz",
|
||||
"integrity": "sha512-oexgMV2MapI0UIWiXKkixF8J8ORxpy64OuJ/J9oVUmIthXOUCcuVEZX+dtpgq7wIfIqtBwQsKEDXejcjTsan9g==",
|
||||
"dependencies": {
|
||||
"@next/env": "14.1.4",
|
||||
"@next/env": "14.1.3",
|
||||
"@swc/helpers": "0.5.2",
|
||||
"busboy": "1.6.0",
|
||||
"caniuse-lite": "^1.0.30001579",
|
||||
@@ -3234,15 +3169,15 @@
|
||||
"node": ">=18.17.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@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"
|
||||
"@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"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@opentelemetry/api": "^1.1.0",
|
||||
@@ -3365,29 +3300,28 @@
|
||||
}
|
||||
},
|
||||
"node_modules/object.entries": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz",
|
||||
"integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==",
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz",
|
||||
"integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/object.fromentries": {
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
|
||||
"integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz",
|
||||
"integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.2",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -3397,17 +3331,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/object.groupby": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz",
|
||||
"integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",
|
||||
"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==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"array.prototype.filter": "^1.0.3",
|
||||
"call-bind": "^1.0.5",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
"es-abstract": "^1.22.3",
|
||||
"es-errors": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/object.hasown": {
|
||||
@@ -3424,14 +3357,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/object.values": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz",
|
||||
"integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==",
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz",
|
||||
"integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -3611,9 +3544,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.37",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.37.tgz",
|
||||
"integrity": "sha512-7iB/v/r7Woof0glKLH8b1SPHrsX7uhdO+Geb41QpF/+mWZHU3uxxSlN+UXGVit1PawOYDToO+AbZzhBzWRDwbQ==",
|
||||
"version": "8.4.35",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz",
|
||||
"integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -3632,7 +3565,7 @@
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.7",
|
||||
"picocolors": "^1.0.0",
|
||||
"source-map-js": "^1.2.0"
|
||||
"source-map-js": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
@@ -3741,9 +3674,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-selector-parser": {
|
||||
"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==",
|
||||
"version": "6.0.15",
|
||||
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz",
|
||||
"integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cssesc": "^3.0.0",
|
||||
@@ -3859,16 +3792,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/reflect.getprototypeof": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz",
|
||||
"integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==",
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz",
|
||||
"integrity": "sha512-62wgfC8dJWrmxv44CA36pLDnP6KKl3Vhxb7PL+8+qrrFMMoJij4vgiMP8zV4O8+CBMXY1mHxI5fITGHXFHVmQQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"call-bind": "^1.0.5",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"es-abstract": "^1.22.3",
|
||||
"es-errors": "^1.0.0",
|
||||
"get-intrinsic": "^1.2.3",
|
||||
"globalthis": "^1.0.3",
|
||||
"which-builtin-type": "^1.1.3"
|
||||
},
|
||||
@@ -4007,13 +3940,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/safe-array-concat": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
|
||||
"integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==",
|
||||
"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==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"call-bind": "^1.0.5",
|
||||
"get-intrinsic": "^1.2.2",
|
||||
"has-symbols": "^1.0.3",
|
||||
"isarray": "^2.0.5"
|
||||
},
|
||||
@@ -4077,17 +4010,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"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==",
|
||||
"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==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"define-data-property": "^1.1.2",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"get-intrinsic": "^1.2.3",
|
||||
"gopd": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.2"
|
||||
"has-property-descriptors": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -4169,9 +4102,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
||||
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@@ -4270,15 +4203,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/string.prototype.trim": {
|
||||
"version": "1.2.9",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz",
|
||||
"integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==",
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz",
|
||||
"integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.0",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -4288,14 +4220,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/string.prototype.trimend": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz",
|
||||
"integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==",
|
||||
"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==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@@ -4515,9 +4447,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ts-api-utils": {
|
||||
"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==",
|
||||
"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==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
@@ -4783,34 +4715,31 @@
|
||||
}
|
||||
},
|
||||
"node_modules/which-collection": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz",
|
||||
"integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==",
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz",
|
||||
"integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"is-map": "^2.0.3",
|
||||
"is-set": "^2.0.3",
|
||||
"is-weakmap": "^2.0.2",
|
||||
"is-weakset": "^2.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
"is-map": "^2.0.1",
|
||||
"is-set": "^2.0.1",
|
||||
"is-weakmap": "^2.0.1",
|
||||
"is-weakset": "^2.0.1"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/which-typed-array": {
|
||||
"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==",
|
||||
"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==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"available-typed-arrays": "^1.0.7",
|
||||
"call-bind": "^1.0.7",
|
||||
"available-typed-arrays": "^1.0.6",
|
||||
"call-bind": "^1.0.5",
|
||||
"for-each": "^0.3.3",
|
||||
"gopd": "^1.0.1",
|
||||
"has-tostringtag": "^1.0.2"
|
||||
"has-tostringtag": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"dependencies": {
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
"next": "14.1.4"
|
||||
"next": "14.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5",
|
||||
@@ -22,6 +22,6 @@
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.1.4"
|
||||
"eslint-config-next": "14.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
3
examples/package.json
vendored
3
examples/package.json
vendored
@@ -9,8 +9,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "27.4.1",
|
||||
"@vercel/build-utils": "7.11.0",
|
||||
"@vercel/frameworks": "3.0.1"
|
||||
"@vercel/frameworks": "3.0.0"
|
||||
},
|
||||
"version": null
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ npx create-remix@latest --template vercel/vercel/examples/remix
|
||||
|
||||
_Live Example: https://remix-run-template.vercel.app_
|
||||
|
||||
You can also deploy using the [Vercel CLI](https://vercel.com/docs/cli):
|
||||
You can also deploy using the [Vercel CLI](https://vercel.com/cli):
|
||||
|
||||
```sh
|
||||
npm i -g vercel
|
||||
@@ -35,4 +35,4 @@ Afterwards, start the Remix development server like so:
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Open up [http://localhost:5173](http://localhost:5173) and you should be ready to go!
|
||||
Open up [http://localhost:3000](http://localhost:3000) and you should be ready to go!
|
||||
|
||||
@@ -18,7 +18,7 @@ Install dependencies:
|
||||
npx @sanity/cli install
|
||||
```
|
||||
|
||||
Pull down environment variables from your Vercel project (requires the [Vercel CLI](https://vercel.com/docs/cli)):
|
||||
Pull down environment variables from your Vercel project (requires the [Vercel CLI](https://vercel.com/cli)):
|
||||
|
||||
```sh
|
||||
vercel env pull
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"engines": {
|
||||
"node": "18.x"
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,5 @@
|
||||
# @vercel-internals/types
|
||||
|
||||
## 1.0.29
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`73b112b1f`](https://github.com/vercel/vercel/commit/73b112b1f74480e1bb941e1b754105fc7dace401)]:
|
||||
- @vercel/build-utils@7.11.0
|
||||
|
||||
## 1.0.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`1825b58df`](https://github.com/vercel/vercel/commit/1825b58df8d783e79f0addf262618f422246f4b3)]:
|
||||
- @vercel/build-utils@7.10.0
|
||||
|
||||
## 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
|
||||
|
||||
- Updated dependencies [[`8ea93839c`](https://github.com/vercel/vercel/commit/8ea93839ccc70816f3ece9d7cfdb857aa7a4b015)]:
|
||||
- @vercel/build-utils@7.9.0
|
||||
|
||||
## 1.0.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@vercel-internals/types",
|
||||
"version": "1.0.29",
|
||||
"version": "1.0.25",
|
||||
"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.11.0",
|
||||
"@vercel/build-utils": "7.8.0",
|
||||
"@vercel/routing-utils": "3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"source-map-support": "0.5.12",
|
||||
"ts-eager": "2.0.2",
|
||||
"ts-jest": "29.1.0",
|
||||
"turbo": "1.13.2",
|
||||
"turbo": "1.12.4",
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,29 +1,5 @@
|
||||
# @vercel/build-utils
|
||||
|
||||
## 7.11.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add `getOsRelease()` and `getProvidedRuntime()` functions ([#11370](https://github.com/vercel/vercel/pull/11370))
|
||||
|
||||
## 7.10.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Allow environment variables to be specified for `EdgeFunction` ([#11029](https://github.com/vercel/vercel/pull/11029))
|
||||
|
||||
## 7.9.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Export `getSupportedNodeVersion` ([#11277](https://github.com/vercel/vercel/pull/11277))
|
||||
|
||||
## 7.9.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Add `base` parameter to `scanParentDirs()` ([#11261](https://github.com/vercel/vercel/pull/11261))
|
||||
|
||||
## 7.8.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/build-utils",
|
||||
"version": "7.11.0",
|
||||
"version": "7.8.0",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.js",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Env, Files, FunctionFramework } from './types';
|
||||
import type { Files, FunctionFramework } from './types';
|
||||
|
||||
/**
|
||||
* An Edge Functions output
|
||||
@@ -23,11 +23,6 @@ export class EdgeFunction {
|
||||
*/
|
||||
entrypoint: string;
|
||||
|
||||
/**
|
||||
* Environment variables for the edge function to use at runtime.
|
||||
*/
|
||||
environment?: Env;
|
||||
|
||||
/**
|
||||
* The list of files to be included in the edge function bundle.
|
||||
*/
|
||||
@@ -53,6 +48,5 @@ export class EdgeFunction {
|
||||
this.assets = params.assets;
|
||||
this.regions = params.regions;
|
||||
this.framework = params.framework;
|
||||
this.environment = params.environment;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,13 +276,12 @@ export async function getNodeVersion(
|
||||
|
||||
export async function scanParentDirs(
|
||||
destPath: string,
|
||||
readPackageJson = false,
|
||||
base = '/'
|
||||
readPackageJson = false
|
||||
): Promise<ScanParentDirsResult> {
|
||||
assert(path.isAbsolute(destPath));
|
||||
|
||||
const pkgJsonPath = await walkParentDirs({
|
||||
base,
|
||||
base: '/',
|
||||
start: destPath,
|
||||
filename: 'package.json',
|
||||
});
|
||||
@@ -292,7 +291,7 @@ export async function scanParentDirs(
|
||||
: undefined;
|
||||
const [yarnLockPath, npmLockPath, pnpmLockPath, bunLockPath] =
|
||||
await walkParentDirsMulti({
|
||||
base,
|
||||
base: '/',
|
||||
start: destPath,
|
||||
filenames: [
|
||||
'yarn.lock',
|
||||
|
||||
@@ -38,7 +38,6 @@ import {
|
||||
import {
|
||||
getLatestNodeVersion,
|
||||
getDiscontinuedNodeVersions,
|
||||
getSupportedNodeVersion,
|
||||
} from './fs/node-version';
|
||||
import streamToBuffer from './fs/stream-to-buffer';
|
||||
import debug from './debug';
|
||||
@@ -73,7 +72,6 @@ export {
|
||||
walkParentDirs,
|
||||
getNodeBinPath,
|
||||
getNodeBinPaths,
|
||||
getSupportedNodeVersion,
|
||||
runNpmInstall,
|
||||
runBundleInstall,
|
||||
runPipInstall,
|
||||
@@ -103,7 +101,6 @@ export {
|
||||
export { EdgeFunction } from './edge-function';
|
||||
export { readConfigFile } from './fs/read-config-file';
|
||||
export { normalizePath } from './fs/normalize-path';
|
||||
export { getOsRelease, getProvidedRuntime } from './os';
|
||||
|
||||
export * from './should-serve';
|
||||
export * from './schemas';
|
||||
|
||||
@@ -5,7 +5,11 @@ import minimatch from 'minimatch';
|
||||
import { readlink } from 'fs-extra';
|
||||
import { isSymbolicLink, isDirectory } from './fs/download';
|
||||
import streamToBuffer from './fs/stream-to-buffer';
|
||||
import type { Config, Env, Files, FunctionFramework } from './types';
|
||||
import type { Files, Config, FunctionFramework } from './types';
|
||||
|
||||
interface Environment {
|
||||
[key: string]: string;
|
||||
}
|
||||
|
||||
export type LambdaOptions = LambdaOptionsWithFiles | LambdaOptionsWithZipBuffer;
|
||||
|
||||
@@ -17,7 +21,7 @@ export interface LambdaOptionsBase {
|
||||
architecture?: LambdaArchitecture;
|
||||
memory?: number;
|
||||
maxDuration?: number;
|
||||
environment?: Env;
|
||||
environment?: Environment;
|
||||
allowQuery?: string[];
|
||||
regions?: string[];
|
||||
supportsMultiPayloads?: boolean;
|
||||
@@ -65,7 +69,7 @@ export class Lambda {
|
||||
architecture?: LambdaArchitecture;
|
||||
memory?: number;
|
||||
maxDuration?: number;
|
||||
environment: Env;
|
||||
environment: Environment;
|
||||
allowQuery?: string[];
|
||||
regions?: string[];
|
||||
/**
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
import { readFile } from 'fs-extra';
|
||||
import { isErrnoException } from '@vercel/error-utils';
|
||||
|
||||
export async function getOsRelease() {
|
||||
try {
|
||||
const data = await readFile('/etc/os-release', 'utf8');
|
||||
return await parseOsRelease(data);
|
||||
} catch (err) {
|
||||
if (isErrnoException(err) && err.code === 'ENOENT') {
|
||||
return null;
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
export async function parseOsRelease(data: string) {
|
||||
const obj: Record<string, string> = {};
|
||||
// Example file contents:
|
||||
// NAME="Amazon Linux"
|
||||
// VERSION="2023"
|
||||
// ID="amzn"
|
||||
// ID_LIKE="fedora"
|
||||
for (const line of data.trim().split('\n')) {
|
||||
const m = /(?<key>.*)="(?<value>.*)"/.exec(line);
|
||||
if (!m?.groups) {
|
||||
continue;
|
||||
}
|
||||
obj[m.groups.key] = m.groups.value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
export async function getProvidedRuntime() {
|
||||
const os = await getOsRelease();
|
||||
if (!os) {
|
||||
return 'provided.al2023';
|
||||
}
|
||||
|
||||
return os.PRETTY_NAME === 'Amazon Linux 2'
|
||||
? 'provided.al2'
|
||||
: 'provided.al2023';
|
||||
}
|
||||
@@ -3,8 +3,5 @@
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"build": "mkdir -p public && (printf \"npm version: \" && npm -v) > public/index.txt"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,5 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"once": "^1.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,5 @@
|
||||
"dependencies": {
|
||||
"exeggcute": "^1.0.0",
|
||||
"once": "^1.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,5 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"sharp": "0.33.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
import { parseOsRelease } from '../src/os';
|
||||
|
||||
describe('getOsRelease()', () => {
|
||||
it('should parse `amazonlinux:2`', async () => {
|
||||
const data = `NAME="Amazon Linux"
|
||||
VERSION="2"
|
||||
ID="amzn"
|
||||
ID_LIKE="centos rhel fedora"
|
||||
VERSION_ID="2"
|
||||
PRETTY_NAME="Amazon Linux 2"
|
||||
ANSI_COLOR="0;33"
|
||||
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
|
||||
HOME_URL="https://amazonlinux.com/"
|
||||
SUPPORT_END="2025-06-30"
|
||||
`;
|
||||
const parsed = await parseOsRelease(data);
|
||||
expect(parsed).toMatchObject({
|
||||
ANSI_COLOR: '0;33',
|
||||
CPE_NAME: 'cpe:2.3:o:amazon:amazon_linux:2',
|
||||
HOME_URL: 'https://amazonlinux.com/',
|
||||
ID: 'amzn',
|
||||
ID_LIKE: 'centos rhel fedora',
|
||||
NAME: 'Amazon Linux',
|
||||
PRETTY_NAME: 'Amazon Linux 2',
|
||||
SUPPORT_END: '2025-06-30',
|
||||
VERSION: '2',
|
||||
VERSION_ID: '2',
|
||||
});
|
||||
});
|
||||
|
||||
it('should parse `amazonlinux:2023`', async () => {
|
||||
const data = `NAME="Amazon Linux"
|
||||
VERSION="2023"
|
||||
ID="amzn"
|
||||
ID_LIKE="fedora"
|
||||
VERSION_ID="2023"
|
||||
PLATFORM_ID="platform:al2023"
|
||||
PRETTY_NAME="Amazon Linux 2023"
|
||||
ANSI_COLOR="0;33"
|
||||
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
|
||||
HOME_URL="https://aws.amazon.com/linux/"
|
||||
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
|
||||
SUPPORT_END="2028-03-01"
|
||||
`;
|
||||
const parsed = await parseOsRelease(data);
|
||||
expect(parsed).toMatchObject({
|
||||
NAME: 'Amazon Linux',
|
||||
VERSION: '2023',
|
||||
ID: 'amzn',
|
||||
ID_LIKE: 'fedora',
|
||||
VERSION_ID: '2023',
|
||||
PLATFORM_ID: 'platform:al2023',
|
||||
PRETTY_NAME: 'Amazon Linux 2023',
|
||||
ANSI_COLOR: '0;33',
|
||||
CPE_NAME: 'cpe:2.3:o:amazon:amazon_linux:2023',
|
||||
HOME_URL: 'https://aws.amazon.com/linux/',
|
||||
BUG_REPORT_URL: 'https://github.com/amazonlinux/amazon-linux-2023',
|
||||
SUPPORT_END: '2028-03-01',
|
||||
});
|
||||
});
|
||||
|
||||
it('should parse `ubuntu:jammy`', async () => {
|
||||
const data = `PRETTY_NAME="Ubuntu 22.04.3 LTS"
|
||||
NAME="Ubuntu"
|
||||
VERSION_ID="22.04"
|
||||
VERSION="22.04.3 LTS (Jammy Jellyfish)"
|
||||
VERSION_CODENAME=jammy
|
||||
ID=ubuntu
|
||||
ID_LIKE=debian
|
||||
HOME_URL="https://www.ubuntu.com/"
|
||||
SUPPORT_URL="https://help.ubuntu.com/"
|
||||
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
|
||||
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
|
||||
UBUNTU_CODENAME=jammy
|
||||
`;
|
||||
const parsed = await parseOsRelease(data);
|
||||
expect(parsed).toMatchObject({
|
||||
PRETTY_NAME: 'Ubuntu 22.04.3 LTS',
|
||||
NAME: 'Ubuntu',
|
||||
VERSION_ID: '22.04',
|
||||
VERSION: '22.04.3 LTS (Jammy Jellyfish)',
|
||||
HOME_URL: 'https://www.ubuntu.com/',
|
||||
SUPPORT_URL: 'https://help.ubuntu.com/',
|
||||
BUG_REPORT_URL: 'https://bugs.launchpad.net/ubuntu/',
|
||||
PRIVACY_POLICY_URL:
|
||||
'https://www.ubuntu.com/legal/terms-and-policies/privacy-policy',
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,108 +1,5 @@
|
||||
# vercel
|
||||
|
||||
## 34.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- Disables promotion of preview deployments ([#11411](https://github.com/vercel/vercel/pull/11411))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Always set `projectSettings.nodeVersion` in `vc deploy` ([#11351](https://github.com/vercel/vercel/pull/11351))
|
||||
|
||||
- [cli] optional override of existing environment variables with --force ([#11348](https://github.com/vercel/vercel/pull/11348))
|
||||
|
||||
## 33.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix flickering during interactive UI rerendering ([#11392](https://github.com/vercel/vercel/pull/11392))
|
||||
|
||||
- fix `vc ls` message to be `vc projects ls` ([#11400](https://github.com/vercel/vercel/pull/11400))
|
||||
|
||||
- Updated dependencies [[`2461b571a`](https://github.com/vercel/vercel/commit/2461b571af037fbfdf92299a272010a5a8f4898b)]:
|
||||
- @vercel/next@4.2.0
|
||||
|
||||
## 33.7.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- improve UX for text input validation ([#11388](https://github.com/vercel/vercel/pull/11388))
|
||||
|
||||
- Replace the implementation of the yes/no prompt in several areas to be consistent with the rest of the CLI. ([#11279](https://github.com/vercel/vercel/pull/11279))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [cli] Fix how we determine the GIT_CONFIG_PATH to support git worktrees and git submodules ([#11283](https://github.com/vercel/vercel/pull/11283))
|
||||
|
||||
- avoid printing errors when user does ctrl+c ([#11377](https://github.com/vercel/vercel/pull/11377))
|
||||
|
||||
- Warn that promoting preview deploys is deprecated ([#11376](https://github.com/vercel/vercel/pull/11376))
|
||||
|
||||
- Updated dependencies [[`a3fb7e6ab`](https://github.com/vercel/vercel/commit/a3fb7e6abe9bb619a653850decd739728b1af225)]:
|
||||
- @vercel/go@3.1.1
|
||||
|
||||
## 33.6.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Handle `--repo` linked in `vc deploy --prebuilt` ([#11309](https://github.com/vercel/vercel/pull/11309))
|
||||
|
||||
- Revert "[cli] extract `isZeroConfigBuild` into utility function (#11316)" ([#11350](https://github.com/vercel/vercel/pull/11350))
|
||||
|
||||
- Replace `inquirer` with `@inquirer/prompts` ([#11321](https://github.com/vercel/vercel/pull/11321))
|
||||
|
||||
- Updated dependencies [[`73b112b1f`](https://github.com/vercel/vercel/commit/73b112b1f74480e1bb941e1b754105fc7dace401), [`346e665bb`](https://github.com/vercel/vercel/commit/346e665bb021e6034bc70c82ef336485622595fe), [`73b112b1f`](https://github.com/vercel/vercel/commit/73b112b1f74480e1bb941e1b754105fc7dace401), [`548afd371`](https://github.com/vercel/vercel/commit/548afd371aa7a9dd3a7f4c60f7f94a7084d8023e)]:
|
||||
- @vercel/go@3.1.0
|
||||
- @vercel/node@3.0.26
|
||||
- @vercel/build-utils@7.11.0
|
||||
- @vercel/static-build@2.4.6
|
||||
|
||||
## 33.6.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Added sunset warning to secrets command. ([#11333](https://github.com/vercel/vercel/pull/11333))
|
||||
|
||||
- Swap jest for vitest in CLI unit tests ([#11302](https://github.com/vercel/vercel/pull/11302))
|
||||
|
||||
- Updated dependencies [[`988f7b75a`](https://github.com/vercel/vercel/commit/988f7b75a27387e84fce541b844f984d2c151980), [`1825b58df`](https://github.com/vercel/vercel/commit/1825b58df8d783e79f0addf262618f422246f4b3)]:
|
||||
- @vercel/remix-builder@2.1.5
|
||||
- @vercel/build-utils@7.10.0
|
||||
- @vercel/node@3.0.25
|
||||
- @vercel/static-build@2.4.5
|
||||
|
||||
## 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
|
||||
|
||||
- Set `projectSettings.nodeVersion` in `vc deploy` based on "engines.node" field ([#11261](https://github.com/vercel/vercel/pull/11261))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Stops warning about legacy Speed Insights for Next.js apps ([#11268](https://github.com/vercel/vercel/pull/11268))
|
||||
|
||||
- Fix framework version detection in monorepos ([#11212](https://github.com/vercel/vercel/pull/11212))
|
||||
|
||||
- Updated dependencies [[`8ea93839c`](https://github.com/vercel/vercel/commit/8ea93839ccc70816f3ece9d7cfdb857aa7a4b015), [`58ef91bfe`](https://github.com/vercel/vercel/commit/58ef91bfe8c2e7176e8783cc4eb91ee8580c70dc)]:
|
||||
- @vercel/build-utils@7.9.0
|
||||
- @vercel/remix-builder@2.1.3
|
||||
- @vercel/node@3.0.23
|
||||
- @vercel/static-build@2.4.3
|
||||
|
||||
## 33.5.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -7,7 +7,6 @@ module.exports = {
|
||||
{
|
||||
diagnostics: true,
|
||||
isolatedModules: true,
|
||||
tsconfig: 'test/tsconfig.json',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vercel",
|
||||
"version": "34.0.0",
|
||||
"version": "33.5.5",
|
||||
"preferGlobal": true,
|
||||
"license": "Apache-2.0",
|
||||
"description": "The command-line interface for Vercel",
|
||||
@@ -12,8 +12,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",
|
||||
"vitest-unit-run": "pnpm vitest",
|
||||
"vitest-unit": "pnpm jest test/unit/ --listTests",
|
||||
"test-unit": "pnpm test test/unit/",
|
||||
"test-e2e": "rimraf test/fixtures/integration && pnpm test test/integration-1.test.ts test/integration-2.test.ts test/integration-3.test.ts",
|
||||
"test-dev": "pnpm test test/dev/",
|
||||
"coverage": "codecov",
|
||||
@@ -32,27 +31,22 @@
|
||||
"node": ">= 16"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "7.11.0",
|
||||
"@vercel/build-utils": "7.8.0",
|
||||
"@vercel/fun": "1.1.0",
|
||||
"@vercel/go": "3.1.1",
|
||||
"@vercel/go": "3.0.5",
|
||||
"@vercel/hydrogen": "1.0.2",
|
||||
"@vercel/next": "4.2.0",
|
||||
"@vercel/node": "3.0.26",
|
||||
"@vercel/next": "4.1.5",
|
||||
"@vercel/node": "3.0.22",
|
||||
"@vercel/python": "4.1.1",
|
||||
"@vercel/redwood": "2.0.8",
|
||||
"@vercel/remix-builder": "2.1.5",
|
||||
"@vercel/remix-builder": "2.1.2",
|
||||
"@vercel/ruby": "2.0.5",
|
||||
"@vercel/static-build": "2.4.6",
|
||||
"@vercel/static-build": "2.4.2",
|
||||
"chokidar": "3.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alex_neo/jest-expect-message": "1.0.5",
|
||||
"@edge-runtime/node-utils": "2.3.0",
|
||||
"@inquirer/checkbox": "2.2.2",
|
||||
"@inquirer/confirm": "3.1.2",
|
||||
"@inquirer/expand": "2.1.2",
|
||||
"@inquirer/input": "2.1.2",
|
||||
"@inquirer/select": "2.2.2",
|
||||
"@next/env": "11.1.2",
|
||||
"@sentry/node": "5.5.0",
|
||||
"@sindresorhus/slugify": "0.11.0",
|
||||
@@ -69,6 +63,7 @@
|
||||
"@types/glob": "7.1.1",
|
||||
"@types/http-proxy": "1.16.2",
|
||||
"@types/ini": "1.3.31",
|
||||
"@types/inquirer": "7.3.1",
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/jest-expect-message": "1.0.3",
|
||||
"@types/json-parse-better-errors": "1.0.0",
|
||||
@@ -84,6 +79,7 @@
|
||||
"@types/qs": "6.9.7",
|
||||
"@types/semver": "6.0.1",
|
||||
"@types/tar-fs": "1.16.1",
|
||||
"@types/text-table": "0.2.0",
|
||||
"@types/title": "3.4.1",
|
||||
"@types/universal-analytics": "0.4.2",
|
||||
"@types/update-notifier": "5.1.0",
|
||||
@@ -92,13 +88,12 @@
|
||||
"@types/yauzl-promise": "2.1.0",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel-internals/get-package-json": "1.0.0",
|
||||
"@vercel-internals/types": "1.0.29",
|
||||
"@vercel/client": "13.2.0",
|
||||
"@vercel-internals/types": "1.0.25",
|
||||
"@vercel/client": "13.1.5",
|
||||
"@vercel/error-utils": "2.0.2",
|
||||
"@vercel/frameworks": "3.0.1",
|
||||
"@vercel/fs-detectors": "5.2.2",
|
||||
"@vercel/frameworks": "3.0.0",
|
||||
"@vercel/fs-detectors": "5.2.1",
|
||||
"@vercel/routing-utils": "3.1.0",
|
||||
"@vitest/expect": "1.4.0",
|
||||
"ajv": "6.12.2",
|
||||
"alpha-sort": "2.0.1",
|
||||
"ansi-escapes": "4.3.2",
|
||||
@@ -131,6 +126,7 @@
|
||||
"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",
|
||||
@@ -162,6 +158,7 @@
|
||||
"strip-ansi": "6.0.1",
|
||||
"supports-hyperlinks": "3.0.0",
|
||||
"tar-fs": "1.16.3",
|
||||
"text-table": "0.2.0",
|
||||
"title": "3.4.1",
|
||||
"tmp-promise": "1.0.3",
|
||||
"tree-kill": "1.2.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import table from '../../util/output/table';
|
||||
import table from 'text-table';
|
||||
import Client from '../../util/client';
|
||||
import getAliases from '../../util/alias/get-aliases';
|
||||
import getScope from '../../util/get-scope';
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
getPaginationOpts,
|
||||
} from '../../util/get-pagination-opts';
|
||||
import stamp from '../../util/output/stamp';
|
||||
import strlen from '../../util/strlen';
|
||||
import getCommandFlags from '../../util/get-command-flags';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
import type { Alias } from '@vercel-internals/types';
|
||||
@@ -77,6 +78,10 @@ function printAliasTable(aliases: Alias[]) {
|
||||
ms(Date.now() - a.createdAt),
|
||||
]),
|
||||
],
|
||||
{ align: ['l', 'l', 'r'], hsep: 4 }
|
||||
{
|
||||
align: ['l', 'l', 'r'],
|
||||
hsep: ' '.repeat(4),
|
||||
stringLength: strlen,
|
||||
}
|
||||
).replace(/^/gm, ' ')}\n\n`;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import table from '../../util/output/table';
|
||||
import table from 'text-table';
|
||||
import Client from '../../util/client';
|
||||
import getScope from '../../util/get-scope';
|
||||
import removeAliasById from '../../util/alias/remove-alias-by-id';
|
||||
import stamp from '../../util/output/stamp';
|
||||
import strlen from '../../util/strlen';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import findAliasByAliasOrId from '../../util/alias/find-alias-by-alias-or-id';
|
||||
|
||||
@@ -83,7 +84,11 @@ async function confirmAliasRemove(client: Client, alias: Alias) {
|
||||
chalk.gray(`${ms(Date.now() - alias.createdAt)} ago`),
|
||||
],
|
||||
],
|
||||
{ hsep: 4 }
|
||||
{
|
||||
align: ['l', 'l', 'r'],
|
||||
hsep: ' '.repeat(4),
|
||||
stringLength: strlen,
|
||||
}
|
||||
);
|
||||
|
||||
client.output.log(`The following alias will be removed permanently`);
|
||||
|
||||
@@ -45,16 +45,10 @@ export default async function bisect(client: Client): Promise<number> {
|
||||
|
||||
let bad =
|
||||
argv['--bad'] ||
|
||||
(await client.input.text({
|
||||
message: `Specify a URL where the bug occurs:`,
|
||||
validate: val => (val ? true : 'A URL must be provided'),
|
||||
}));
|
||||
(await prompt(client, `Specify a URL where the bug occurs:`));
|
||||
let good =
|
||||
argv['--good'] ||
|
||||
(await client.input.text({
|
||||
message: `Specify a URL where the bug does not occur:`,
|
||||
validate: val => (val ? true : 'A URL must be provided'),
|
||||
}));
|
||||
(await prompt(client, `Specify a URL where the bug does not occur:`));
|
||||
let subpath = argv['--path'] || '';
|
||||
let run = argv['--run'] || '';
|
||||
const openEnabled = argv['--open'] || false;
|
||||
@@ -103,10 +97,10 @@ export default async function bisect(client: Client): Promise<number> {
|
||||
}
|
||||
|
||||
if (!subpath) {
|
||||
subpath = await client.input.text({
|
||||
message: `Specify the URL subpath where the bug occurs:`,
|
||||
validate: val => (val ? true : 'A subpath must be provided'),
|
||||
});
|
||||
subpath = await prompt(
|
||||
client,
|
||||
`Specify the URL subpath where the bug occurs:`
|
||||
);
|
||||
}
|
||||
|
||||
output.spinner('Retrieving deployments…');
|
||||
@@ -284,7 +278,9 @@ export default async function bisect(client: Client): Promise<number> {
|
||||
if (openEnabled) {
|
||||
await open(testUrl);
|
||||
}
|
||||
action = await client.input.expand({
|
||||
const answer = await client.prompt({
|
||||
type: 'expand',
|
||||
name: 'action',
|
||||
message: 'Select an action:',
|
||||
choices: [
|
||||
{ key: 'g', name: 'Good', value: 'good' },
|
||||
@@ -292,6 +288,7 @@ export default async function bisect(client: Client): Promise<number> {
|
||||
{ key: 's', name: 'Skip', value: 'skip' },
|
||||
],
|
||||
});
|
||||
action = answer.action;
|
||||
}
|
||||
|
||||
if (action === 'good') {
|
||||
@@ -341,3 +338,19 @@ function getCommit(deployment: Deployment) {
|
||||
deployment.meta?.bitbucketCommitMessage;
|
||||
return { sha, message };
|
||||
}
|
||||
|
||||
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,
|
||||
});
|
||||
if (val) {
|
||||
return val;
|
||||
} else {
|
||||
client.output.error('A value must be specified');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import dotenv from 'dotenv';
|
||||
import semver from 'semver';
|
||||
import minimatch from 'minimatch';
|
||||
import { join, normalize, relative, resolve, sep } from 'path';
|
||||
import { frameworkList } from '@vercel/frameworks';
|
||||
import frameworks from '@vercel/frameworks';
|
||||
import {
|
||||
getDiscontinuedNodeVersions,
|
||||
normalizePath,
|
||||
@@ -257,6 +257,9 @@ export default async function main(client: Client): Promise<number> {
|
||||
if (project.settings.analyticsId) {
|
||||
envToUnset.add('VERCEL_ANALYTICS_ID');
|
||||
process.env.VERCEL_ANALYTICS_ID = project.settings.analyticsId;
|
||||
output.warn(
|
||||
'Vercel Speed Insights auto-injection is deprecated in favor of @vercel/speed-insights package. Learn more: https://vercel.link/upgrate-to-speed-insights-package'
|
||||
);
|
||||
}
|
||||
|
||||
// Some build processes use these env vars to platform detect Vercel
|
||||
@@ -661,7 +664,7 @@ async function doBuild(
|
||||
const mergedOverrides: Record<string, PathOverride> =
|
||||
overrides.length > 0 ? Object.assign({}, ...overrides) : undefined;
|
||||
|
||||
const framework = await getFramework(workPath, buildResults);
|
||||
const framework = await getFramework(cwd, buildResults);
|
||||
|
||||
// Write out the final `config.json` file based on the
|
||||
// user configuration and Builder build results
|
||||
@@ -695,7 +698,7 @@ async function getFramework(
|
||||
): Promise<{ version: string } | undefined> {
|
||||
const detectedFramework = await detectFrameworkRecord({
|
||||
fs: new LocalFileSystemDetector(cwd),
|
||||
frameworkList,
|
||||
frameworkList: frameworks,
|
||||
});
|
||||
|
||||
if (!detectedFramework) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import table from '../../util/output/table';
|
||||
import table from 'text-table';
|
||||
import Client from '../../util/client';
|
||||
import getScope from '../../util/get-scope';
|
||||
import {
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
} from '../../util/get-pagination-opts';
|
||||
import stamp from '../../util/output/stamp';
|
||||
import getCerts from '../../util/certs/get-certs';
|
||||
import strlen from '../../util/strlen';
|
||||
import type { Cert } from '@vercel-internals/types';
|
||||
import getCommandFlags from '../../util/get-command-flags';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
@@ -69,7 +70,11 @@ async function ls(
|
||||
function formatCertsTable(certsList: Cert[]) {
|
||||
return `${table(
|
||||
[formatCertsTableHead(), ...formatCertsTableBody(certsList)],
|
||||
{ align: ['l', 'l', 'r', 'c', 'r'], hsep: 2 }
|
||||
{
|
||||
align: ['l', 'l', 'r', 'c', 'r'],
|
||||
hsep: ' '.repeat(2),
|
||||
stringLength: strlen,
|
||||
}
|
||||
).replace(/^(.*)/gm, ' $1')}\n`;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import plural from 'pluralize';
|
||||
import table from '../../util/output/table';
|
||||
import table from 'text-table';
|
||||
import type { Cert } from '@vercel-internals/types';
|
||||
import * as ERRORS from '../../util/errors-ts';
|
||||
import { Output } from '../../util/output';
|
||||
@@ -98,11 +98,11 @@ function readConfirmation(output: Output, msg: string, certs: Cert[]) {
|
||||
output.print(
|
||||
`${table(certs.map(formatCertRow), {
|
||||
align: ['l', 'r', 'l'],
|
||||
hsep: 6,
|
||||
hsep: ' '.repeat(6),
|
||||
}).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,77 +1,73 @@
|
||||
import {
|
||||
getPrettyError,
|
||||
getSupportedNodeVersion,
|
||||
scanParentDirs,
|
||||
} from '@vercel/build-utils';
|
||||
import ms from 'ms';
|
||||
import fs from 'fs-extra';
|
||||
import bytes from 'bytes';
|
||||
import chalk from 'chalk';
|
||||
import { join, resolve } from 'path';
|
||||
import {
|
||||
fileNameSymbol,
|
||||
VALID_ARCHIVE_FORMATS,
|
||||
VercelConfig,
|
||||
} from '@vercel/client';
|
||||
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 Client from '../../util/client';
|
||||
import code from '../../util/output/code';
|
||||
import highlight from '../../util/output/highlight';
|
||||
import { readLocalConfig } from '../../util/config/files';
|
||||
import { createGitMeta } from '../../util/create-git-meta';
|
||||
import createDeploy from '../../util/deploy/create-deploy';
|
||||
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 getArgs from '../../util/get-args';
|
||||
import { handleError } from '../../util/error';
|
||||
import { SchemaValidationFailed } from '../../util/errors';
|
||||
import Client from '../../util/client';
|
||||
import { getPrettyError } from '@vercel/build-utils';
|
||||
import toHumanPath from '../../util/humanize-path';
|
||||
import Now, { CreateOptions } from '../../util';
|
||||
import stamp from '../../util/output/stamp';
|
||||
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 {
|
||||
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 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 { SchemaValidationFailed } from '../../util/errors';
|
||||
import purchaseDomainIfAvailable from '../../util/domains/purchase-domain-if-available';
|
||||
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 { pickOverrides } from '../../util/projects/project-settings';
|
||||
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 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';
|
||||
|
||||
@@ -303,10 +299,7 @@ export default async (client: Client): Promise<number> => {
|
||||
}
|
||||
|
||||
// build `--prebuilt`
|
||||
let vercelOutputDir: string | undefined;
|
||||
if (argv['--prebuilt']) {
|
||||
vercelOutputDir = join(cwd, '.vercel/output');
|
||||
|
||||
// For repo-style linking, update `cwd` to be the Project
|
||||
// subdirectory when `rootDirectory` setting is defined
|
||||
if (
|
||||
@@ -314,10 +307,10 @@ export default async (client: Client): Promise<number> => {
|
||||
link.repoRoot &&
|
||||
link.project.rootDirectory
|
||||
) {
|
||||
vercelOutputDir = join(cwd, link.project.rootDirectory, '.vercel/output');
|
||||
cwd = join(cwd, link.project.rootDirectory);
|
||||
}
|
||||
|
||||
const prebuiltExists = await fs.pathExists(vercelOutputDir);
|
||||
const prebuiltExists = await fs.pathExists(join(cwd, '.vercel/output'));
|
||||
if (!prebuiltExists) {
|
||||
error(
|
||||
`The ${param(
|
||||
@@ -329,7 +322,7 @@ export default async (client: Client): Promise<number> => {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const prebuiltBuild = await getPrebuiltJson(vercelOutputDir);
|
||||
const prebuiltBuild = await getPrebuiltJson(cwd);
|
||||
|
||||
// Ensure that there was not a build error
|
||||
const prebuiltError =
|
||||
@@ -531,7 +524,6 @@ export default async (client: Client): Promise<number> => {
|
||||
forceNew: argv['--force'],
|
||||
withCache: argv['--with-cache'],
|
||||
prebuilt: argv['--prebuilt'],
|
||||
vercelOutputDir,
|
||||
rootDirectory,
|
||||
quiet,
|
||||
wantsPublic: Boolean(argv['--public'] || localConfig.public),
|
||||
@@ -558,7 +550,7 @@ export default async (client: Client): Promise<number> => {
|
||||
rootDirectory,
|
||||
};
|
||||
|
||||
if (status === 'linked') {
|
||||
if (status !== 'not_linked') {
|
||||
createArgs.projectSettings = {
|
||||
...createArgs.projectSettings,
|
||||
...localConfigurationOverrides,
|
||||
@@ -566,30 +558,6 @@ export default async (client: Client): Promise<number> => {
|
||||
}
|
||||
}
|
||||
|
||||
// Read the `engines.node` field from `package.json` and send as a
|
||||
// `projectSettings` property as an optimization (so that the API
|
||||
// does not need to retrieve the file to do this check).
|
||||
const { packageJson } = await scanParentDirs(
|
||||
join(cwd, project?.rootDirectory ?? ''),
|
||||
true,
|
||||
cwd
|
||||
);
|
||||
let nodeVersion: string | undefined;
|
||||
if (packageJson?.engines?.node) {
|
||||
try {
|
||||
const { range } = await getSupportedNodeVersion(
|
||||
packageJson.engines.node
|
||||
);
|
||||
nodeVersion = range;
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
output.warn(error.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!createArgs.projectSettings) createArgs.projectSettings = {};
|
||||
createArgs.projectSettings.nodeVersion = nodeVersion;
|
||||
|
||||
deployment = await createDeploy(
|
||||
client,
|
||||
now,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import table from '../../util/output/table';
|
||||
import table from 'text-table';
|
||||
import type { DNSRecord } from '@vercel-internals/types';
|
||||
import { Output } from '../../util/output';
|
||||
import Client from '../../util/client';
|
||||
@@ -71,11 +71,11 @@ function readConfirmation(
|
||||
output.print(
|
||||
`${table([getDeleteTableRow(domainName, record)], {
|
||||
align: ['l', 'r', 'l'],
|
||||
hsep: 6,
|
||||
hsep: ' '.repeat(6),
|
||||
}).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 => {
|
||||
|
||||
@@ -7,7 +7,7 @@ import getDomainPrice from '../../util/domains/get-domain-price';
|
||||
import getDomainStatus from '../../util/domains/get-domain-status';
|
||||
import getScope from '../../util/get-scope';
|
||||
import param from '../../util/output/param';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import promptBool from '../../util/input/prompt-bool';
|
||||
import purchaseDomain from '../../util/domains/purchase-domain';
|
||||
import stamp from '../../util/output/stamp';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
@@ -86,25 +86,23 @@ export default async function buy(
|
||||
autoRenew = true;
|
||||
} else {
|
||||
if (
|
||||
!(await confirm(
|
||||
client,
|
||||
!(await promptBool(
|
||||
`Buy now for ${chalk.bold(`$${price}`)} (${`${period}yr${
|
||||
period > 1 ? 's' : ''
|
||||
}`})?`,
|
||||
false
|
||||
client
|
||||
))
|
||||
) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
autoRenew = await confirm(
|
||||
client,
|
||||
autoRenew = await promptBool(
|
||||
renewalPrice.period === 1
|
||||
? `Auto renew yearly for ${chalk.bold(`$${price}`)}?`
|
||||
: `Auto renew every ${renewalPrice.period} years for ${chalk.bold(
|
||||
`$${price}`
|
||||
)}?`,
|
||||
true
|
||||
{ ...client, defaultValue: true }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import textInput from '../../util/input/text';
|
||||
import param from '../../util/output/param';
|
||||
import getDomainAliases from '../../util/alias/get-domain-aliases';
|
||||
import getDomainByName from '../../util/domains/get-domain-by-name';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import promptBool from '../../util/input/prompt-bool';
|
||||
import getTeams from '../../util/teams/get-teams';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
|
||||
@@ -67,12 +67,11 @@ export default async function move(
|
||||
)} will have 24 hours to accept your move request before it expires.`
|
||||
);
|
||||
if (
|
||||
!(await confirm(
|
||||
client,
|
||||
!(await promptBool(
|
||||
`Are you sure you want to move ${param(domainName)} to ${param(
|
||||
destination
|
||||
)}?`,
|
||||
false
|
||||
client
|
||||
))
|
||||
) {
|
||||
output.log('Canceled');
|
||||
@@ -89,10 +88,9 @@ export default async function move(
|
||||
)} will be removed. Run ${getCommandName(`alias ls`)} to list them.`
|
||||
);
|
||||
if (
|
||||
!(await confirm(
|
||||
client,
|
||||
!(await promptBool(
|
||||
`Are you sure you want to move ${param(domainName)}?`,
|
||||
false
|
||||
client
|
||||
))
|
||||
) {
|
||||
output.log('Canceled');
|
||||
|
||||
@@ -13,7 +13,7 @@ import removeDomainByName from '../../util/domains/remove-domain-by-name';
|
||||
import stamp from '../../util/output/stamp';
|
||||
import * as ERRORS from '../../util/errors-ts';
|
||||
import param from '../../util/output/param';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import promptBool from '../../util/input/prompt-bool';
|
||||
import setCustomSuffix from '../../util/domains/set-custom-suffix';
|
||||
import { findProjectsForDomain } from '../../util/projects/find-projects-for-domain';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
@@ -81,10 +81,9 @@ export default async function rm(
|
||||
const skipConfirmation = opts['--yes'] || false;
|
||||
if (
|
||||
!skipConfirmation &&
|
||||
!(await confirm(
|
||||
client,
|
||||
!(await promptBool(
|
||||
`Are you sure you want to remove ${param(domainName)}?`,
|
||||
false
|
||||
client
|
||||
))
|
||||
) {
|
||||
output.log('Canceled');
|
||||
@@ -223,11 +222,7 @@ async function removeDomain(
|
||||
|
||||
if (
|
||||
!skipConfirmation &&
|
||||
!(await confirm(
|
||||
client,
|
||||
`Remove conflicts associated with domain?`,
|
||||
false
|
||||
))
|
||||
!(await promptBool(`Remove conflicts associated with domain?`, client))
|
||||
) {
|
||||
output.log('Canceled');
|
||||
return 0;
|
||||
|
||||
@@ -9,7 +9,7 @@ import stamp from '../../util/output/stamp';
|
||||
import getAuthCode from '../../util/domains/get-auth-code';
|
||||
import getDomainPrice from '../../util/domains/get-domain-price';
|
||||
import checkTransfer from '../../util/domains/check-transfer';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import promptBool from '../../util/input/prompt-bool';
|
||||
import isRootDomain from '../../util/is-root-domain';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
|
||||
@@ -67,12 +67,11 @@ export default async function transferIn(
|
||||
|
||||
const authCode = await getAuthCode(opts['--code']);
|
||||
|
||||
const shouldTransfer = await confirm(
|
||||
client,
|
||||
const shouldTransfer = await promptBool(
|
||||
transferPolicy === 'no-change'
|
||||
? `Transfer now for ${chalk.bold(`$${price}`)}?`
|
||||
: `Transfer now with 1yr renewal for ${chalk.bold(`$${price}`)}?`,
|
||||
false
|
||||
client
|
||||
);
|
||||
if (!shouldTransfer) {
|
||||
return 0;
|
||||
|
||||
48
packages/cli/src/commands/env/add.ts
vendored
48
packages/cli/src/commands/env/add.ts
vendored
@@ -20,7 +20,6 @@ import { isAPIError } from '../../util/errors-ts';
|
||||
type Options = {
|
||||
'--debug': boolean;
|
||||
'--sensitive': boolean;
|
||||
'--force': boolean;
|
||||
};
|
||||
|
||||
export default async function add(
|
||||
@@ -30,6 +29,9 @@ export default async function add(
|
||||
args: string[],
|
||||
output: Output
|
||||
) {
|
||||
// improve the way we show inquirer prompts
|
||||
await import('../../util/input/patch-inquirer');
|
||||
|
||||
const stdInput = await readStandardInput(client.stdin);
|
||||
let [envName, envTargetArg, envGitBranch] = args;
|
||||
|
||||
@@ -64,11 +66,18 @@ export default async function add(
|
||||
envTargets.push(envTargetArg);
|
||||
}
|
||||
|
||||
if (!envName) {
|
||||
envName = await client.input.text({
|
||||
while (!envName) {
|
||||
const { inputName } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputName',
|
||||
message: `What’s the name of the variable?`,
|
||||
validate: val => (val ? true : 'Name cannot be empty'),
|
||||
});
|
||||
|
||||
envName = inputName;
|
||||
|
||||
if (!inputName) {
|
||||
output.error('Name cannot be empty');
|
||||
}
|
||||
}
|
||||
|
||||
const { envs } = await getEnvRecords(
|
||||
@@ -82,7 +91,7 @@ export default async function add(
|
||||
);
|
||||
const choices = envTargetChoices.filter(c => !existing.has(c.value));
|
||||
|
||||
if (choices.length === 0 && !opts['--force']) {
|
||||
if (choices.length === 0) {
|
||||
output.error(
|
||||
`The variable ${param(
|
||||
envName
|
||||
@@ -98,18 +107,26 @@ export default async function add(
|
||||
if (stdInput) {
|
||||
envValue = stdInput;
|
||||
} else {
|
||||
envValue = await client.input.text({
|
||||
const { inputValue } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputValue',
|
||||
message: `What’s the value of ${envName}?`,
|
||||
});
|
||||
|
||||
envValue = inputValue || '';
|
||||
}
|
||||
|
||||
while (envTargets.length === 0) {
|
||||
envTargets = await client.input.checkbox({
|
||||
const { inputTargets } = await client.prompt({
|
||||
name: 'inputTargets',
|
||||
type: 'checkbox',
|
||||
message: `Add ${envName} to which Environments (select multiple)?`,
|
||||
choices,
|
||||
});
|
||||
|
||||
if (envTargets.length === 0) {
|
||||
envTargets = inputTargets;
|
||||
|
||||
if (inputTargets.length === 0) {
|
||||
output.error('Please select at least one Environment');
|
||||
}
|
||||
}
|
||||
@@ -120,13 +137,15 @@ export default async function add(
|
||||
envTargets.length === 1 &&
|
||||
envTargets[0] === 'preview'
|
||||
) {
|
||||
envGitBranch = await client.input.text({
|
||||
const { inputValue } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputValue',
|
||||
message: `Add ${envName} to which Git branch? (leave empty for all Preview branches)?`,
|
||||
});
|
||||
envGitBranch = inputValue || '';
|
||||
}
|
||||
|
||||
const type = opts['--sensitive'] ? 'sensitive' : 'encrypted';
|
||||
const upsert = opts['--force'] ? 'true' : '';
|
||||
|
||||
const addStamp = stamp();
|
||||
try {
|
||||
@@ -135,7 +154,6 @@ export default async function add(
|
||||
output,
|
||||
client,
|
||||
project.id,
|
||||
upsert,
|
||||
type,
|
||||
envName,
|
||||
envValue,
|
||||
@@ -152,11 +170,9 @@ export default async function add(
|
||||
|
||||
output.print(
|
||||
`${prependEmoji(
|
||||
`${
|
||||
opts['--force'] ? 'Overrode' : 'Added'
|
||||
} Environment Variable ${chalk.bold(envName)} to Project ${chalk.bold(
|
||||
project.name
|
||||
)} ${chalk.gray(addStamp())}`,
|
||||
`Added Environment Variable ${chalk.bold(
|
||||
envName
|
||||
)} to Project ${chalk.bold(project.name)} ${chalk.gray(addStamp())}`,
|
||||
emoji('success')
|
||||
)}\n`
|
||||
);
|
||||
|
||||
12
packages/cli/src/commands/env/command.ts
vendored
12
packages/cli/src/commands/env/command.ts
vendored
@@ -43,14 +43,6 @@ export const envCommand: Command = {
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'force',
|
||||
description: 'Force overwrites when a command would normally fail',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [],
|
||||
},
|
||||
@@ -134,10 +126,6 @@ export const envCommand: Command = {
|
||||
`${packageName} env add DB_PASS production`,
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Override an existing Environment Variable of same target (production, preview, deployment)',
|
||||
value: `${packageName} env add API_TOKEN --force`,
|
||||
},
|
||||
{
|
||||
name: 'Add a sensitive Environment Variable',
|
||||
value: `${packageName} env add API_TOKEN --sensitive`,
|
||||
|
||||
1
packages/cli/src/commands/env/index.ts
vendored
1
packages/cli/src/commands/env/index.ts
vendored
@@ -35,7 +35,6 @@ export default async function main(client: Client) {
|
||||
'--environment': String,
|
||||
'--git-branch': String,
|
||||
'--sensitive': Boolean,
|
||||
'--force': Boolean,
|
||||
});
|
||||
} catch (error) {
|
||||
handleError(error);
|
||||
|
||||
21
packages/cli/src/commands/env/rm.ts
vendored
21
packages/cli/src/commands/env/rm.ts
vendored
@@ -29,6 +29,9 @@ export default async function rm(
|
||||
args: string[],
|
||||
output: Output
|
||||
) {
|
||||
// improve the way we show inquirer prompts
|
||||
await import('../../util/input/patch-inquirer');
|
||||
|
||||
if (args.length > 3) {
|
||||
output.error(
|
||||
`Invalid number of arguments. Usage: ${getCommandName(
|
||||
@@ -40,11 +43,19 @@ export default async function rm(
|
||||
|
||||
let [envName, envTarget, envGitBranch] = args;
|
||||
|
||||
if (!envName) {
|
||||
envName = await client.input.text({
|
||||
while (!envName) {
|
||||
const { inputName } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputName',
|
||||
message: `What’s the name of the variable?`,
|
||||
validate: val => (val ? true : 'Name cannot be empty'),
|
||||
});
|
||||
|
||||
if (!inputName) {
|
||||
output.error(`Name cannot be empty`);
|
||||
continue;
|
||||
}
|
||||
|
||||
envName = inputName;
|
||||
}
|
||||
|
||||
if (!isValidEnvTarget(envTarget)) {
|
||||
@@ -75,7 +86,9 @@ export default async function rm(
|
||||
}
|
||||
|
||||
while (envs.length > 1) {
|
||||
const id = await client.input.select({
|
||||
const { id } = await client.prompt({
|
||||
name: 'id',
|
||||
type: 'list',
|
||||
message: `Remove ${envName} from which Environments?`,
|
||||
choices: envs.map(env => ({ value: env.id, name: formatEnvTarget(env) })),
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import chalk from 'chalk';
|
||||
import { LOGO, NAME } from '@vercel-internals/constants';
|
||||
import Table, { CellOptions } from 'cli-table3';
|
||||
import { noBorderChars } from '../util/output/table';
|
||||
|
||||
const INDENT = ' '.repeat(2);
|
||||
const NEWLINE = '\n';
|
||||
@@ -40,7 +39,23 @@ type _CellOptions = CellOptions & {
|
||||
};
|
||||
|
||||
const tableOptions = {
|
||||
chars: noBorderChars,
|
||||
chars: {
|
||||
top: '',
|
||||
'top-mid': '',
|
||||
'top-left': '',
|
||||
'top-right': '',
|
||||
bottom: '',
|
||||
'bottom-mid': '',
|
||||
'bottom-left': '',
|
||||
'bottom-right': '',
|
||||
left: '',
|
||||
'left-mid': '',
|
||||
mid: '',
|
||||
'mid-mid': '',
|
||||
right: '',
|
||||
'right-mid': '',
|
||||
middle: '',
|
||||
},
|
||||
style: {
|
||||
'padding-left': 0,
|
||||
'padding-right': 0,
|
||||
|
||||
@@ -6,7 +6,7 @@ import chalk from 'chalk';
|
||||
// @ts-ignore
|
||||
import listInput from '../../util/input/list';
|
||||
import listItem from '../../util/output/list-item';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import promptBool from '../../util/input/prompt-bool';
|
||||
import toHumanPath from '../../util/humanize-path';
|
||||
import Client from '../../util/client';
|
||||
import info from '../../util/output/info';
|
||||
@@ -46,10 +46,6 @@ export default async function init(
|
||||
const exampleList = examples.filter(x => x.visible).map(x => x.name);
|
||||
|
||||
if (!name) {
|
||||
if (client.stdin.isTTY !== true) {
|
||||
client.output.print(`No framework provided`);
|
||||
return 0;
|
||||
}
|
||||
const chosen = await chooseFromDropdown(
|
||||
client,
|
||||
'Select example:',
|
||||
@@ -126,7 +122,7 @@ async function extractExample(
|
||||
ver: string = 'v2'
|
||||
) {
|
||||
const { output } = client;
|
||||
const folder = prepareFolder(client.cwd, dir || name, force);
|
||||
const folder = prepareFolder(process.cwd(), dir || name, force);
|
||||
output.spinner(`Fetching ${name}`);
|
||||
|
||||
const url = `${EXAMPLE_API}/${ver}/download/${name}.tar.gz`;
|
||||
@@ -151,7 +147,7 @@ async function extractExample(
|
||||
const successLog = `Initialized "${chalk.bold(
|
||||
name
|
||||
)}" example in ${chalk.bold(toHumanPath(folder))}.`;
|
||||
const folderRel = path.relative(client.cwd, folder);
|
||||
const folderRel = path.relative(process.cwd(), folder);
|
||||
const deployHint =
|
||||
folderRel === ''
|
||||
? listItem(`To deploy, run ${getCommandName()}.`)
|
||||
@@ -213,14 +209,14 @@ async function guess(client: Client, exampleList: string[], name: string) {
|
||||
)} to see the list of available examples.`
|
||||
);
|
||||
|
||||
if (client.stdin.isTTY !== true) {
|
||||
if (process.stdout.isTTY !== true) {
|
||||
throw GuessError;
|
||||
}
|
||||
|
||||
const found = didYouMean(name, exampleList, 0.7);
|
||||
|
||||
if (typeof found === 'string') {
|
||||
if (await confirm(client, `Did you mean ${chalk.bold(found)}?`, false)) {
|
||||
if (await promptBool(`Did you mean ${chalk.bold(found)}?`, client)) {
|
||||
return found;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import table from '../../util/output/table';
|
||||
import table from 'text-table';
|
||||
import title from 'title';
|
||||
import Now from '../../util';
|
||||
import getArgs from '../../util/get-args';
|
||||
import { handleError } from '../../util/error';
|
||||
import elapsed from '../../util/output/elapsed';
|
||||
import strlen from '../../util/strlen';
|
||||
import toHost from '../../util/to-host';
|
||||
import parseMeta from '../../util/parse-meta';
|
||||
import { isValidName } from '../../util/is-valid-name';
|
||||
@@ -274,7 +275,11 @@ export default async function list(client: Client) {
|
||||
app === null ? filterUniqueApps() : () => true
|
||||
),
|
||||
],
|
||||
{ hsep: 5 }
|
||||
{
|
||||
align: ['l', 'l', 'l', 'l', 'l'],
|
||||
hsep: ' '.repeat(5),
|
||||
stringLength: strlen,
|
||||
}
|
||||
).replace(/^/gm, ' ')}\n\n`
|
||||
);
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import table from '../../util/output/table';
|
||||
import table from 'text-table';
|
||||
import type { Project } from '@vercel-internals/types';
|
||||
import Client from '../../util/client';
|
||||
import getCommandFlags from '../../util/get-command-flags';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
import strlen from '../../util/strlen';
|
||||
import { NODE_VERSIONS } from '@vercel/build-utils';
|
||||
|
||||
export default async function list(
|
||||
@@ -99,7 +100,11 @@ export default async function list(
|
||||
])
|
||||
.flat(),
|
||||
],
|
||||
{ hsep: 3 }
|
||||
{
|
||||
align: ['l', 'l', 'l'],
|
||||
hsep: ' '.repeat(3),
|
||||
stringLength: strlen,
|
||||
}
|
||||
).replace(/^/gm, ' ');
|
||||
output.print(`\n${tablePrint}\n\n`);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ export default async function requestPromote({
|
||||
|
||||
if (deployment.target !== 'production' && !yes) {
|
||||
const question =
|
||||
'This deployment is not a production deployment and cannot be directly promoted. A new deployment will be built using your production environment. Are you sure you want to continue?';
|
||||
'This deployment does not target production, therefore promotion will not apply production environment variables. Are you sure you want to continue?';
|
||||
const answer = await confirm(client, question, false);
|
||||
if (!answer) {
|
||||
output.error('Canceled');
|
||||
@@ -43,7 +43,7 @@ export default async function requestPromote({
|
||||
}
|
||||
|
||||
// request the promotion
|
||||
await client.fetch(`/v10/projects/${project.id}/promote/${deployment.id}`, {
|
||||
await client.fetch(`/v9/projects/${project.id}/promote/${deployment.id}`, {
|
||||
body: {}, // required
|
||||
json: false,
|
||||
method: 'POST',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import plural from 'pluralize';
|
||||
import table from '../../util/output/table';
|
||||
import table from 'text-table';
|
||||
import Now from '../../util';
|
||||
import getAliases from '../../util/alias/get-aliases';
|
||||
import elapsed from '../../util/output/elapsed';
|
||||
@@ -169,7 +169,7 @@ export default async function remove(client: Client) {
|
||||
`or projects matching ` +
|
||||
`${ids
|
||||
.map(id => chalk.bold(`"${id}"`))
|
||||
.join(', ')}. Run ${getCommandName('projects ls')} to list.`
|
||||
.join(', ')}. Run ${getCommandName('ls')} to list.`
|
||||
);
|
||||
return 1;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ function readConfirmation(
|
||||
const url = depl.url ? chalk.underline(`https://${depl.url}`) : '';
|
||||
return [` ${depl.id}`, url, time];
|
||||
}),
|
||||
{ align: ['l', 'r', 'l'], hsep: 6 }
|
||||
{ align: ['l', 'r', 'l'], hsep: ' '.repeat(6) }
|
||||
);
|
||||
output.print(`${deploymentTable}\n`);
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -2,14 +2,9 @@ import { packageName, getCommandName } from '../../util/pkg-name';
|
||||
|
||||
export const secretsCommand = {
|
||||
name: 'secrets',
|
||||
description:
|
||||
'WARNING: On May 1st, 2024 secrets will be automatically converted to sensitive Environment Variables for Preview and Production environments. Secrets attached to Development environments will not be migrated.\n' +
|
||||
`The ${getCommandName(
|
||||
'secrets'
|
||||
)} command will be deprecated at this time, please use the ${getCommandName(
|
||||
'env'
|
||||
)} command instead.\n` +
|
||||
'See https://vercel.com/changelog/legacy-environment-variable-secrets-are-being-sunset for more information.',
|
||||
description: `NOTE: The ${getCommandName(
|
||||
'env'
|
||||
)} command is recommended instead of ${getCommandName('secrets')}`,
|
||||
arguments: [
|
||||
{
|
||||
name: 'command',
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import isErrnoException from '@vercel/error-utils';
|
||||
import chalk from 'chalk';
|
||||
import table from '../../util/output/table';
|
||||
import table from 'text-table';
|
||||
import ms from 'ms';
|
||||
import strlen from '../../util/strlen';
|
||||
import { handleError, error } from '../../util/error';
|
||||
import NowSecrets from '../../util/secrets';
|
||||
import getScope from '../../util/get-scope';
|
||||
@@ -77,12 +78,6 @@ async function run({ output, contextName, currentTeam, client }) {
|
||||
|
||||
const commandName = getCommandName('secret ' + subcommand);
|
||||
|
||||
output.warn(
|
||||
'On May 1st, 2024 secrets will be automatically converted to sensitive Environment Variables for Preview and Production environments.\n' +
|
||||
'Secrets attached to Development environments will not be migrated.' +
|
||||
'See https://vercel.com/changelog/legacy-environment-variable-secrets-are-being-sunset for more information.'
|
||||
);
|
||||
|
||||
if (subcommand === 'ls' || subcommand === 'list') {
|
||||
output.note(
|
||||
`The ${getCommandName(
|
||||
@@ -123,7 +118,11 @@ async function run({ output, contextName, currentTeam, client }) {
|
||||
chalk.gray(`${ms(cur - new Date(secret.created))} ago`),
|
||||
])
|
||||
),
|
||||
{ hsep: 2 }
|
||||
{
|
||||
align: ['l', 'l', 'l'],
|
||||
hsep: ' '.repeat(2),
|
||||
stringLength: strlen,
|
||||
}
|
||||
);
|
||||
|
||||
if (out) {
|
||||
@@ -280,7 +279,7 @@ async function readConfirmation(client, output, secret, contextName) {
|
||||
const time = chalk.gray(`${ms(new Date() - new Date(secret.created))} ago`);
|
||||
const tbl = table([[chalk.bold(secret.name), time]], {
|
||||
align: ['r', 'l'],
|
||||
hsep: 6,
|
||||
hsep: ' '.repeat(6),
|
||||
});
|
||||
|
||||
output.print(
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import chars from '../../util/output/chars';
|
||||
import table from '../../util/output/table';
|
||||
import { gray } from 'chalk';
|
||||
import getUser from '../../util/get-user';
|
||||
import getTeams from '../../util/teams/get-teams';
|
||||
import { packageName } from '../../util/pkg-name';
|
||||
@@ -54,7 +53,7 @@ export default async function list(client: Client): Promise<number> {
|
||||
id,
|
||||
name,
|
||||
value: slug,
|
||||
prefix: id === currentTeam ? chars.tick : ' ',
|
||||
current: id === currentTeam ? chars.tick : '',
|
||||
}));
|
||||
|
||||
if (user.version !== 'northstar') {
|
||||
@@ -62,7 +61,7 @@ export default async function list(client: Client): Promise<number> {
|
||||
id: user.id,
|
||||
name: user.email,
|
||||
value: user.username || user.email,
|
||||
prefix: accountIsCurrent ? chars.tick : ' ',
|
||||
current: accountIsCurrent ? chars.tick : '',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -77,22 +76,14 @@ export default async function list(client: Client): Promise<number> {
|
||||
output.stopSpinner();
|
||||
client.stdout.write('\n'); // empty line
|
||||
|
||||
const teamTable = table(
|
||||
[
|
||||
['id', 'email / name'].map(str => gray(str)),
|
||||
...teamList.map(team => [team.value, team.name]),
|
||||
],
|
||||
{ hsep: 5 }
|
||||
table(
|
||||
['', 'id', 'email / name'],
|
||||
teamList.map(team => [team.current, team.value, team.name]),
|
||||
[1, 5],
|
||||
(str: string) => {
|
||||
client.stdout.write(str);
|
||||
}
|
||||
);
|
||||
client.stderr.write(
|
||||
currentTeam
|
||||
? teamTable
|
||||
.split('\n')
|
||||
.map((line, i) => `${i > 0 ? teamList[i - 1].prefix : ' '} ${line}`)
|
||||
.join('\n')
|
||||
: teamTable
|
||||
);
|
||||
client.stderr.write('\n');
|
||||
|
||||
if (pagination?.count === 20) {
|
||||
const flags = getCommandFlags(argv, ['_', '--next', '-N', '-d']);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { frameworkList } from '@vercel/frameworks';
|
||||
import { frameworks as frameworkList } from '@vercel/frameworks';
|
||||
|
||||
export function sortBuilders<B extends { use: string }>(builds: B[]): B[] {
|
||||
const frontendRuntimeSet = new Set(
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
import { bold, gray } from 'chalk';
|
||||
import checkbox from '@inquirer/checkbox';
|
||||
import confirm from '@inquirer/confirm';
|
||||
import expand from '@inquirer/expand';
|
||||
import input from '@inquirer/input';
|
||||
import select from '@inquirer/select';
|
||||
import { bold } from 'chalk';
|
||||
import inquirer from 'inquirer';
|
||||
import { EventEmitter } from 'events';
|
||||
import { URL } from 'url';
|
||||
import { VercelConfig } from '@vercel/client';
|
||||
@@ -70,8 +66,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();
|
||||
@@ -87,29 +83,7 @@ export default class Client extends EventEmitter implements Stdio {
|
||||
this.localConfig = opts.localConfig;
|
||||
this.localConfigPath = opts.localConfigPath;
|
||||
this.requestIdCounter = 1;
|
||||
|
||||
const theme = {
|
||||
prefix: gray('?'),
|
||||
style: { answer: gray },
|
||||
};
|
||||
this.input = {
|
||||
text: (opts: Parameters<typeof input>[0]) =>
|
||||
input({ theme, ...opts }, { input: this.stdin, output: this.stderr }),
|
||||
checkbox: <T>(opts: Parameters<typeof checkbox<T>>[0]) =>
|
||||
checkbox<T>(
|
||||
{ theme, ...opts },
|
||||
{ input: this.stdin, output: this.stderr }
|
||||
),
|
||||
expand: (opts: Parameters<typeof expand>[0]) =>
|
||||
expand({ theme, ...opts }, { input: this.stdin, output: this.stderr }),
|
||||
confirm: (opts: Parameters<typeof confirm>[0]) =>
|
||||
confirm({ theme, ...opts }, { input: this.stdin, output: this.stderr }),
|
||||
select: <T>(opts: Parameters<typeof select<T>>[0]) =>
|
||||
select<T>(
|
||||
{ theme, ...opts },
|
||||
{ input: this.stdin, output: this.stderr }
|
||||
),
|
||||
};
|
||||
this._createPromptModule();
|
||||
}
|
||||
|
||||
retry<T>(fn: RetryFunction<T>, { retries = 3, maxTimeout = Infinity } = {}) {
|
||||
@@ -255,6 +229,13 @@ 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();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ const getGlobalPathConfig = (): string => {
|
||||
];
|
||||
|
||||
// The customPath flag is the preferred location,
|
||||
// followed by the vercel directory,
|
||||
// followed by the the vercel directory,
|
||||
// followed by the now directory.
|
||||
// If none of those exist, use the vercel directory.
|
||||
return (
|
||||
|
||||
@@ -6,7 +6,7 @@ export default async function getPrebuiltJson(
|
||||
directory: string
|
||||
): Promise<BuildsManifest | null> {
|
||||
try {
|
||||
return await fs.readJSON(join(directory, 'builds.json'));
|
||||
return await fs.readJSON(join(directory, '.vercel/output/builds.json'));
|
||||
} catch (error) {
|
||||
// ignoring error
|
||||
}
|
||||
|
||||
@@ -53,7 +53,6 @@ export default async function processDeployment({
|
||||
withCache?: boolean;
|
||||
org: Org;
|
||||
prebuilt: boolean;
|
||||
vercelOutputDir?: string;
|
||||
projectName: string;
|
||||
isSettingUpProject: boolean;
|
||||
archive?: ArchiveFormat;
|
||||
@@ -72,7 +71,6 @@ export default async function processDeployment({
|
||||
withCache,
|
||||
quiet,
|
||||
prebuilt,
|
||||
vercelOutputDir,
|
||||
rootDirectory,
|
||||
} = args;
|
||||
|
||||
@@ -94,7 +92,6 @@ export default async function processDeployment({
|
||||
force,
|
||||
withCache,
|
||||
prebuilt,
|
||||
vercelOutputDir,
|
||||
rootDirectory,
|
||||
skipAutoDetectionConfirmation,
|
||||
archive,
|
||||
|
||||
@@ -45,7 +45,7 @@ import {
|
||||
detectApiExtensions,
|
||||
isOfficialRuntime,
|
||||
} from '@vercel/fs-detectors';
|
||||
import { frameworkList } from '@vercel/frameworks';
|
||||
import { frameworks as frameworkList } from '@vercel/frameworks';
|
||||
|
||||
import cmd from '../output/cmd';
|
||||
import link from '../output/link';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import chalk from 'chalk';
|
||||
import type { DNSRecordData } from '@vercel-internals/types';
|
||||
import textInput from '../input/text';
|
||||
import confirm from '../input/confirm';
|
||||
import promptBool from '../input/prompt-bool';
|
||||
import Client from '../client';
|
||||
|
||||
const RECORD_TYPES = ['A', 'AAAA', 'ALIAS', 'CAA', 'CNAME', 'MX', 'SRV', 'TXT'];
|
||||
@@ -89,7 +89,7 @@ export default async function getDNSData(
|
||||
}
|
||||
|
||||
async function verifyData(client: Client) {
|
||||
return confirm(client, 'Is this correct?', false);
|
||||
return promptBool('Is this correct?', client);
|
||||
}
|
||||
|
||||
async function getRecordName(type: string) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import Client from '../client';
|
||||
import eraseLines from '../output/erase-lines';
|
||||
import getDomainPrice from './get-domain-price';
|
||||
import getDomainStatus from './get-domain-status';
|
||||
import confirm from '../input/confirm';
|
||||
import promptBool from '../input/prompt-bool';
|
||||
import purchaseDomain from './purchase-domain';
|
||||
import stamp from '../output/stamp';
|
||||
import * as ERRORS from '../errors-ts';
|
||||
@@ -51,12 +51,11 @@ export default async function purchaseDomainIfAvailable(
|
||||
);
|
||||
|
||||
if (
|
||||
!(await confirm(
|
||||
client,
|
||||
!(await promptBool(
|
||||
`Buy ${chalk.underline(domain)} for ${chalk.bold(
|
||||
`$${price}`
|
||||
)} (${plural('yr', period, true)})?`,
|
||||
false
|
||||
client
|
||||
))
|
||||
) {
|
||||
output.print(eraseLines(1));
|
||||
|
||||
7
packages/cli/src/util/env/add-env-record.ts
vendored
7
packages/cli/src/util/env/add-env-record.ts
vendored
@@ -10,16 +10,14 @@ export default async function addEnvRecord(
|
||||
output: Output,
|
||||
client: Client,
|
||||
projectId: string,
|
||||
upsert: string,
|
||||
type: ProjectEnvType,
|
||||
key: string,
|
||||
value: string,
|
||||
targets: ProjectEnvTarget[],
|
||||
gitBranch: string
|
||||
): Promise<void> {
|
||||
const actionWord = upsert ? 'Overriding' : 'Adding';
|
||||
output.debug(
|
||||
`${actionWord} ${type} Environment Variable ${key} to ${targets.length} targets`
|
||||
`Adding ${type} Environment Variable ${key} to ${targets.length} targets`
|
||||
);
|
||||
const body: Omit<ProjectEnvVariable, 'id'> = {
|
||||
type,
|
||||
@@ -28,8 +26,7 @@ export default async function addEnvRecord(
|
||||
target: targets,
|
||||
gitBranch: gitBranch || undefined,
|
||||
};
|
||||
const args = upsert ? `?upsert=${upsert}` : '';
|
||||
const url = `/v10/projects/${projectId}/env${args}`;
|
||||
const url = `/v8/projects/${projectId}/env`;
|
||||
await client.fetch(url, {
|
||||
method: 'POST',
|
||||
body,
|
||||
|
||||
2
packages/cli/src/util/env/get-env-records.ts
vendored
2
packages/cli/src/util/env/get-env-records.ts
vendored
@@ -48,7 +48,7 @@ export default async function getEnvRecords(
|
||||
query.set('source', source);
|
||||
}
|
||||
|
||||
const url = `/v10/projects/${projectId}/env?${query}`;
|
||||
const url = `/v8/projects/${projectId}/env?${query}`;
|
||||
|
||||
return client.fetch<{ envs: ProjectEnvVariable[] }>(url);
|
||||
}
|
||||
|
||||
30
packages/cli/src/util/env/known-error.ts
vendored
30
packages/cli/src/util/env/known-error.ts
vendored
@@ -1,34 +1,12 @@
|
||||
import { isErrnoException } from '@vercel/error-utils';
|
||||
|
||||
const knownErrorsCodes = new Set([
|
||||
'PAYMENT_REQUIRED',
|
||||
'BAD_REQUEST',
|
||||
'ENV_ALREADY_EXISTS',
|
||||
'ENV_CONFLICT',
|
||||
'ENV_SHOULD_BE_A_SECRET',
|
||||
'EXISTING_KEY_AND_TARGET',
|
||||
'FORBIDDEN',
|
||||
'ID_NOT_FOUND',
|
||||
'INVALID_KEY',
|
||||
'INVALID_VALUE',
|
||||
'KEY_INVALID_CHARACTERS',
|
||||
'KEY_INVALID_LENGTH',
|
||||
'KEY_RESERVED',
|
||||
'RESERVED_ENV_VARIABLE',
|
||||
'MAX_ENVS_EXCEEDED',
|
||||
'MISSING_ID',
|
||||
'MISSING_KEY',
|
||||
'MISSING_TARGET',
|
||||
'MISSING_VALUE',
|
||||
'NOT_AUTHORIZED',
|
||||
'NOT_DECRYPTABLE',
|
||||
'SECRET_MISSING',
|
||||
'SYSTEM_ENV_WITH_VALUE',
|
||||
'TEAM_NOT_FOUND',
|
||||
'TOO_MANY_IDS',
|
||||
'TOO_MANY_KEYS',
|
||||
'UNKNOWN_ERROR',
|
||||
'VALUE_INVALID_LENGTH',
|
||||
'VALUE_INVALID_TYPE',
|
||||
'RESERVED_ENV_VARIABLE',
|
||||
'ENV_ALREADY_EXISTS',
|
||||
'ENV_SHOULD_BE_A_SECRET',
|
||||
]);
|
||||
|
||||
export function isKnownError(error: unknown) {
|
||||
|
||||
@@ -10,9 +10,9 @@ export default async function removeEnvRecord(
|
||||
): Promise<void> {
|
||||
output.debug(`Removing Environment Variable ${env.key}`);
|
||||
|
||||
const url = `/v10/projects/${projectId}/env/${env.id}`;
|
||||
const urlProject = `/v8/projects/${projectId}/env/${env.id}`;
|
||||
|
||||
await client.fetch<ProjectEnvVariable>(url, {
|
||||
await client.fetch<ProjectEnvVariable>(urlProject, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
import table from './output/table';
|
||||
import { gray } from 'chalk';
|
||||
import chalk from 'chalk';
|
||||
import table from 'text-table';
|
||||
import strlen from './strlen';
|
||||
|
||||
const HEADER = ['name', 'type', 'value'].map(v => gray(v));
|
||||
const HEADER = ['name', 'type', 'value'].map(v => chalk.gray(v));
|
||||
|
||||
export default function formatDNSTable(rows: string[][]) {
|
||||
return table([HEADER, ...rows], { hsep: 8 });
|
||||
export default function formatDNSTable(
|
||||
rows: string[][],
|
||||
{ extraSpace = '' } = {}
|
||||
) {
|
||||
return table([HEADER, ...rows], {
|
||||
align: ['l', 'l', 'l'],
|
||||
hsep: ' '.repeat(8),
|
||||
stringLength: strlen,
|
||||
}).replace(/^(.*)/gm, `${extraSpace}$1`);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import chalk from 'chalk';
|
||||
import table from './output/table';
|
||||
import table from 'text-table';
|
||||
import strlen from './strlen';
|
||||
import chars from './output/chars';
|
||||
|
||||
export default function formatNSTable(
|
||||
@@ -34,6 +35,10 @@ export default function formatNSTable(
|
||||
],
|
||||
...rows,
|
||||
],
|
||||
{ hsep: 4 }
|
||||
{
|
||||
align: ['l', 'l', 'l', 'l'],
|
||||
hsep: ' '.repeat(4),
|
||||
stringLength: strlen,
|
||||
}
|
||||
).replace(/^(.*)/gm, `${extraSpace}$1`);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import chalk from 'chalk';
|
||||
import table from './output/table';
|
||||
import table from 'text-table';
|
||||
import strlen from './strlen';
|
||||
|
||||
// header:
|
||||
@@ -19,8 +19,9 @@ import strlen from './strlen';
|
||||
// ]
|
||||
export default function formatTable(
|
||||
header: string[],
|
||||
align: Array<'l' | 'r' | 'c'>,
|
||||
blocks: { name?: string; rows: string[][] }[]
|
||||
align: Array<'l' | 'r' | 'c' | '.'>,
|
||||
blocks: { name?: string; rows: string[][] }[],
|
||||
hsep = ' '
|
||||
) {
|
||||
const nrCols = header.length;
|
||||
const padding = [];
|
||||
@@ -56,7 +57,7 @@ export default function formatTable(
|
||||
rows[i][j] = al === 'l' ? col + pad : pad + col;
|
||||
}
|
||||
}
|
||||
out += table(rows, { align, hsep: 4 });
|
||||
out += table(rows, { align, hsep, stringLength: strlen });
|
||||
}
|
||||
out += '\n\n';
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ async function getConfigPrefix() {
|
||||
return null;
|
||||
}
|
||||
|
||||
export async function isGlobal() {
|
||||
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])) {
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
import { execSync } from 'node:child_process';
|
||||
|
||||
/** Defines the options for executing Git commands */
|
||||
export type GitExecOptions = Readonly<{
|
||||
/** If set to true, the function will throw
|
||||
* an error if any occurs during the execution of the Git command. By default,
|
||||
* it is set to false, meaning errors are caught and handled gracefully.*/
|
||||
unsafe?: boolean;
|
||||
/** Specifies the current working directory
|
||||
* from which the Git command should be executed.
|
||||
*/
|
||||
cwd: string;
|
||||
}>;
|
||||
|
||||
const DEFAULT_GIT_EXEC_OPTS = {
|
||||
unsafe: false,
|
||||
};
|
||||
|
||||
/**
|
||||
* Attempts to retrieve the Git directory for the specified working directory.
|
||||
*
|
||||
* This function runs the Git command to find the `.git` directory associated
|
||||
* with the current or specified working directory. This is useful for
|
||||
* determining if the current working environment is within a Git repository.
|
||||
*
|
||||
* @param {GitExecOptions} opts - The options for executing the Git command.
|
||||
* @returns {string | null} The path to the Git directory if found; otherwise, null.
|
||||
* If `opts.unsafe` is set to true and an error occurs, the function will throw
|
||||
* an error instead of returning null.
|
||||
*
|
||||
* @throws {Error} Can throw an error if `opts.unsafe` is set to `true`
|
||||
*/
|
||||
export function getGitDirectory(opts: GitExecOptions): string | null {
|
||||
const { cwd, unsafe } = { ...DEFAULT_GIT_EXEC_OPTS, ...opts };
|
||||
|
||||
try {
|
||||
const gitConfigPath = execSync('git rev-parse --git-dir', {
|
||||
cwd,
|
||||
encoding: 'utf8',
|
||||
});
|
||||
|
||||
return gitConfigPath;
|
||||
} catch (error) {
|
||||
if (unsafe) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a given directory is a Git worktree or Git submodule.
|
||||
*
|
||||
* A Git worktree is a linked working tree, which allows you to have multiple
|
||||
* working trees attached to the same repository. This function checks if the
|
||||
* specified directory (or the current working directory if none is specified)
|
||||
* is a Git worktree by looking for the '.git/worktrees/' path in the Git
|
||||
* configuration.
|
||||
*
|
||||
* A Git submodule is a repository embedded inside another repository. This
|
||||
* function checks if the current working directory or the specified directory
|
||||
* is part of a Git submodule by looking for the '.git/modules/' path in the
|
||||
* Git configuration.
|
||||
*
|
||||
* @param {GitExecOptions} [opts={}] The options to use. Options include:
|
||||
* - `cwd`: The directory to check. Defaults to `process.cwd()`.
|
||||
* - `unsafe`: If true, throws if an error occurs during execution.
|
||||
* Defaults to `false`.
|
||||
* @returns {boolean} Returns `true` if the directory is a Git worktree or Git
|
||||
* Submodule, otherwise `false`.
|
||||
*
|
||||
* @throws {Error} Can throw an error if `opts.unsafe` is set to `true`
|
||||
*/
|
||||
export function isGitWorktreeOrSubmodule(opts: GitExecOptions): boolean {
|
||||
const gitDir = getGitDirectory(opts);
|
||||
|
||||
if (gitDir === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const isGitWorktree = gitDir.includes('.git/worktrees/');
|
||||
const isGitSubmodule = gitDir.includes('.git/modules/');
|
||||
|
||||
return isGitWorktree || isGitSubmodule;
|
||||
}
|
||||
@@ -17,10 +17,6 @@ export default function handleError(error: unknown, { debug = false } = {}) {
|
||||
console.log(`> [debug] handling error: ${stack}`);
|
||||
}
|
||||
|
||||
if (message === 'User force closed the prompt with 0 null') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (status === 403) {
|
||||
console.error(
|
||||
errorOutput(
|
||||
|
||||
@@ -36,7 +36,6 @@ export interface CreateOptions {
|
||||
project?: string;
|
||||
wantsPublic: boolean;
|
||||
prebuilt?: boolean;
|
||||
vercelOutputDir?: string;
|
||||
rootDirectory?: string | null;
|
||||
meta: Dictionary<string>;
|
||||
gitMetadata?: GitMetadata;
|
||||
@@ -118,7 +117,6 @@ export default class Now extends EventEmitter {
|
||||
name,
|
||||
project,
|
||||
prebuilt = false,
|
||||
vercelOutputDir,
|
||||
rootDirectory,
|
||||
wantsPublic,
|
||||
meta,
|
||||
@@ -181,7 +179,6 @@ export default class Now extends EventEmitter {
|
||||
skipAutoDetectionConfirmation,
|
||||
cwd,
|
||||
prebuilt,
|
||||
vercelOutputDir,
|
||||
rootDirectory,
|
||||
noWait,
|
||||
});
|
||||
|
||||
@@ -5,8 +5,14 @@ export default async function confirm(
|
||||
message: string,
|
||||
preferred: boolean
|
||||
): Promise<boolean> {
|
||||
return client.input.confirm({
|
||||
await import('./patch-inquirer');
|
||||
|
||||
const answers = await client.prompt({
|
||||
type: 'confirm',
|
||||
name: 'value',
|
||||
message,
|
||||
default: preferred,
|
||||
});
|
||||
|
||||
return answers.value;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import inquirer from 'inquirer';
|
||||
import confirm from './confirm';
|
||||
import chalk from 'chalk';
|
||||
import { frameworkList, Framework } from '@vercel/frameworks';
|
||||
import { Framework, frameworks as frameworkList } from '@vercel/frameworks';
|
||||
import Client from '../client';
|
||||
import { isSettingValue } from '../is-setting-value';
|
||||
import type { ProjectSettings } from '@vercel-internals/types';
|
||||
@@ -124,26 +125,48 @@ export default async function editProjectSettings(
|
||||
return settings;
|
||||
}
|
||||
|
||||
const choices = settingKeys.reduce((acc, setting) => {
|
||||
const skip =
|
||||
setting === 'framework' ||
|
||||
setting === 'commandForIgnoringBuildStep' ||
|
||||
setting === 'installCommand' ||
|
||||
localConfigurationOverrides?.[setting];
|
||||
if (skip) return acc;
|
||||
return [...acc, { name: settingMap[setting], value: setting }];
|
||||
}, [] as { name: string; value: ConfigKeys }[]);
|
||||
const choices = settingKeys.reduce<Array<{ name: string; value: string }>>(
|
||||
(acc, setting) => {
|
||||
const skip =
|
||||
setting === 'framework' ||
|
||||
setting === 'commandForIgnoringBuildStep' ||
|
||||
setting === 'installCommand' ||
|
||||
localConfigurationOverrides?.[setting];
|
||||
if (!skip) {
|
||||
acc.push({ name: settingMap[setting], value: setting });
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
const settingFields = await client.input.checkbox({
|
||||
const { settingFields } = await inquirer.prompt<{
|
||||
settingFields: Array<
|
||||
Exclude<
|
||||
ConfigKeys,
|
||||
'framework' | 'commandForIgnoringBuildStep' | 'installCommand'
|
||||
>
|
||||
>;
|
||||
}>({
|
||||
name: 'settingFields',
|
||||
type: 'checkbox',
|
||||
message: 'Which settings would you like to overwrite (select multiple)?',
|
||||
choices,
|
||||
});
|
||||
|
||||
for (let setting of settingFields) {
|
||||
const field = settingMap[setting];
|
||||
settings[setting] = await client.input.text({
|
||||
const answers = await inquirer.prompt<{
|
||||
[k in Exclude<
|
||||
ConfigKeys,
|
||||
'framework' | 'commandForIgnoringBuildStep' | 'installCommand'
|
||||
>]: string;
|
||||
}>({
|
||||
type: 'input',
|
||||
name: setting,
|
||||
message: `What's your ${chalk.bold(field)}?`,
|
||||
});
|
||||
settings[setting] = answers[setting];
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
|
||||
@@ -75,37 +75,70 @@ export default async function inputProject(
|
||||
|
||||
if (shouldLinkProject) {
|
||||
// user wants to link a project
|
||||
let toLink: Project;
|
||||
await client.input.text({
|
||||
message: 'What’s the name of your existing project?',
|
||||
validate: async val => {
|
||||
if (!val) {
|
||||
return 'Project name cannot be empty';
|
||||
}
|
||||
const project = await getProjectByIdOrName(client, val, org.id);
|
||||
if (project instanceof ProjectNotFound) {
|
||||
return 'Project not found';
|
||||
}
|
||||
toLink = project;
|
||||
return true;
|
||||
},
|
||||
});
|
||||
return toLink!;
|
||||
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 = answers.existingProjectName as string;
|
||||
|
||||
if (!projectName) {
|
||||
output.error(`Project name cannot be empty`);
|
||||
continue;
|
||||
}
|
||||
|
||||
output.spinner('Verifying project name…', 1000);
|
||||
try {
|
||||
project = await getProjectByIdOrName(client, projectName, org.id);
|
||||
} finally {
|
||||
output.stopSpinner();
|
||||
}
|
||||
|
||||
if (project instanceof ProjectNotFound) {
|
||||
output.error(`Project not found`);
|
||||
}
|
||||
}
|
||||
|
||||
return project;
|
||||
}
|
||||
|
||||
// user wants to create a new project
|
||||
return await client.input.text({
|
||||
message: `What’s your project’s name?`,
|
||||
default: !detectedProject ? slugifiedName : undefined,
|
||||
validate: async val => {
|
||||
if (!val) {
|
||||
return 'Project name cannot be empty';
|
||||
}
|
||||
const project = await getProjectByIdOrName(client, val, org.id);
|
||||
if (!(project instanceof ProjectNotFound)) {
|
||||
return 'Project already exists';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
});
|
||||
let newProjectName: string | null = null;
|
||||
|
||||
while (!newProjectName) {
|
||||
const answers = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'newProjectName',
|
||||
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`);
|
||||
continue;
|
||||
}
|
||||
|
||||
output.spinner('Verifying project name…', 1000);
|
||||
let existingProject: Project | ProjectNotFound;
|
||||
try {
|
||||
existingProject = await getProjectByIdOrName(
|
||||
client,
|
||||
newProjectName,
|
||||
org.id
|
||||
);
|
||||
} finally {
|
||||
output.stopSpinner();
|
||||
}
|
||||
|
||||
if (existingProject && !(existingProject instanceof ProjectNotFound)) {
|
||||
output.print(`Project already exists`);
|
||||
newProjectName = null;
|
||||
}
|
||||
}
|
||||
|
||||
return newProjectName;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ export async function inputRootDirectory(
|
||||
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
const rootDirectory = await client.input.text({
|
||||
const { rootDirectory } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'rootDirectory',
|
||||
message: `In which directory is your code located?`,
|
||||
transformer: (input: string) => {
|
||||
return `${chalk.dim(`./`)}${input}`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Separator } from '@inquirer/select';
|
||||
import inquirer from 'inquirer';
|
||||
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 Separator;
|
||||
export type ListChoice = ListEntry | ListSeparator | typeof inquirer.Separator;
|
||||
|
||||
interface ListOptions {
|
||||
message: string;
|
||||
@@ -54,6 +54,8 @@ 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> {
|
||||
await import('./patch-inquirer');
|
||||
|
||||
let biggestLength = 0;
|
||||
let selected: string | undefined;
|
||||
|
||||
@@ -68,14 +70,14 @@ export default async function list(
|
||||
}
|
||||
|
||||
const choices = _choices.map(choice => {
|
||||
if (choice instanceof Separator) {
|
||||
if (choice instanceof inquirer.Separator) {
|
||||
return choice;
|
||||
}
|
||||
|
||||
if ('separator' in choice) {
|
||||
const prefix = `── ${choice.separator} `;
|
||||
const suffix = '─'.repeat(biggestLength - getLength(prefix));
|
||||
return new Separator(`${prefix}${suffix}`);
|
||||
return new inquirer.Separator(`${prefix}${suffix}`);
|
||||
}
|
||||
|
||||
if ('short' in choice) {
|
||||
@@ -91,11 +93,11 @@ export default async function list(
|
||||
|
||||
if (separator) {
|
||||
for (let i = 0; i < choices.length; i += 2) {
|
||||
choices.splice(i, 0, new Separator(' '));
|
||||
choices.splice(i, 0, new inquirer.Separator(' '));
|
||||
}
|
||||
}
|
||||
|
||||
const cancelSeparator = new Separator('─'.repeat(biggestLength));
|
||||
const cancelSeparator = new inquirer.Separator('─'.repeat(biggestLength));
|
||||
const _cancel = {
|
||||
name: 'Cancel',
|
||||
value: '',
|
||||
@@ -108,16 +110,18 @@ export default async function list(
|
||||
choices.push(cancelSeparator, _cancel);
|
||||
}
|
||||
|
||||
const answer = await client.input.select({
|
||||
const answer = await client.prompt({
|
||||
name: 'value',
|
||||
type: 'list',
|
||||
default: selected,
|
||||
message,
|
||||
choices,
|
||||
pageSize,
|
||||
default: selected,
|
||||
});
|
||||
|
||||
if (eraseFinalAnswer === true) {
|
||||
process.stdout.write(eraseLines(2));
|
||||
}
|
||||
|
||||
return answer;
|
||||
return answer.value;
|
||||
}
|
||||
|
||||
210
packages/cli/src/util/input/patch-inquirer.ts
Normal file
210
packages/cli/src/util/input/patch-inquirer.ts
Normal file
@@ -0,0 +1,210 @@
|
||||
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;
|
||||
};
|
||||
86
packages/cli/src/util/input/prompt-bool.ts
Normal file
86
packages/cli/src/util/input/prompt-bool.ts
Normal file
@@ -0,0 +1,86 @@
|
||||
import chalk from 'chalk';
|
||||
import type { ReadableTTY, WritableTTY } from '@vercel-internals/types';
|
||||
|
||||
type Options = {
|
||||
abortSequences?: Set<string>;
|
||||
defaultValue?: boolean;
|
||||
noChar?: string;
|
||||
resolveChars?: Set<string>;
|
||||
stdin: ReadableTTY;
|
||||
stdout: WritableTTY;
|
||||
trailing?: string;
|
||||
yesChar?: string;
|
||||
};
|
||||
|
||||
export default async function promptBool(label: string, options: Options) {
|
||||
const {
|
||||
stdin,
|
||||
stdout,
|
||||
defaultValue = false,
|
||||
abortSequences = new Set(['\u0003']),
|
||||
resolveChars = new Set(['\r']),
|
||||
yesChar = 'y',
|
||||
noChar = 'n',
|
||||
trailing = '',
|
||||
} = options;
|
||||
|
||||
return new Promise<boolean>(resolve => {
|
||||
const isRaw = Boolean(stdin && stdin.isRaw);
|
||||
|
||||
if (stdin) {
|
||||
if (stdin.setRawMode) {
|
||||
stdin.setRawMode(true);
|
||||
}
|
||||
|
||||
stdin.resume();
|
||||
}
|
||||
|
||||
function restore() {
|
||||
stdout.write(trailing);
|
||||
|
||||
if (stdin) {
|
||||
if (stdin.setRawMode) {
|
||||
stdin.setRawMode(isRaw);
|
||||
}
|
||||
|
||||
stdin.pause();
|
||||
stdin.removeListener('data', onData);
|
||||
}
|
||||
}
|
||||
|
||||
function onData(buffer: Buffer) {
|
||||
const data = buffer.toString();
|
||||
if (data[0].toLowerCase() === yesChar) {
|
||||
restore();
|
||||
stdout.write(`\n`);
|
||||
resolve(true);
|
||||
} else if (data[0].toLowerCase() === noChar) {
|
||||
stdout.write(`\n`);
|
||||
restore();
|
||||
resolve(false);
|
||||
} else if (abortSequences.has(data)) {
|
||||
stdout.write(`\n`);
|
||||
restore();
|
||||
resolve(false);
|
||||
} else if (resolveChars.has(data[0])) {
|
||||
stdout.write(`\n`);
|
||||
restore();
|
||||
resolve(defaultValue);
|
||||
} else {
|
||||
// ignore extraneous input
|
||||
}
|
||||
}
|
||||
|
||||
const defaultText =
|
||||
defaultValue === null
|
||||
? `[${yesChar}|${noChar}]`
|
||||
: defaultValue
|
||||
? `[${chalk.bold(yesChar.toUpperCase())}|${noChar}]`
|
||||
: `[${yesChar}|${chalk.bold(noChar.toUpperCase())}]`;
|
||||
stdout.write(`${chalk.gray('>')} ${label} ${chalk.gray(defaultText)} `);
|
||||
|
||||
if (stdin) {
|
||||
stdin.on('data', onData);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -10,6 +10,7 @@ export default async function selectOrg(
|
||||
question: string,
|
||||
autoConfirm?: boolean
|
||||
): Promise<Org> {
|
||||
await import('./patch-inquirer');
|
||||
const {
|
||||
output,
|
||||
config: { currentTeam },
|
||||
@@ -51,9 +52,14 @@ export default async function selectOrg(
|
||||
return choices[defaultChoiceIndex].value;
|
||||
}
|
||||
|
||||
return await client.input.select({
|
||||
const answers = await client.prompt({
|
||||
type: 'list',
|
||||
name: 'org',
|
||||
message: question,
|
||||
choices,
|
||||
default: choices[defaultChoiceIndex].value,
|
||||
default: defaultChoiceIndex,
|
||||
});
|
||||
|
||||
const org = answers.org;
|
||||
return org;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export default function text({
|
||||
// Tab
|
||||
// Right arrow
|
||||
autoCompleteChars = new Set(['\t', '\x1b[C']),
|
||||
// If true, converts everything the user types to lowercase
|
||||
// If true, converts everything the user types to to lowercase
|
||||
forceLowerCase = false,
|
||||
}: TextParams = {}): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import chalk from 'chalk';
|
||||
import { Separator } from '@inquirer/checkbox';
|
||||
import inquirer from 'inquirer';
|
||||
import pluralize from 'pluralize';
|
||||
import { homedir } from 'os';
|
||||
import slugify from '@sindresorhus/slugify';
|
||||
@@ -22,7 +22,6 @@ import { detectProjects } from '../projects/detect-projects';
|
||||
import { repoInfoToUrl } from '../git/repo-info-to-url';
|
||||
import { connectGitProvider, parseRepoUrl } from '../git/connect-git-provider';
|
||||
import { isAPIError } from '../errors-ts';
|
||||
import { isGitWorktreeOrSubmodule } from '../git-helpers';
|
||||
|
||||
const home = homedir();
|
||||
|
||||
@@ -145,13 +144,16 @@ export async function ensureRepoLink(
|
||||
if (yes) {
|
||||
remoteName = defaultRemote;
|
||||
} else {
|
||||
remoteName = await client.input.select({
|
||||
const answer = await client.prompt({
|
||||
type: 'list',
|
||||
name: 'value',
|
||||
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];
|
||||
@@ -220,13 +222,15 @@ export async function ensureRepoLink(
|
||||
selected = projects;
|
||||
} else {
|
||||
const addSeparators = projects.length > 0 && detectedProjectsCount > 0;
|
||||
selected = await client.input.checkbox<Project | NewProject>({
|
||||
const answer = await client.prompt({
|
||||
type: 'checkbox',
|
||||
name: 'selected',
|
||||
message: `Which Projects should be ${
|
||||
projects.length ? 'linked to' : 'created'
|
||||
}?`,
|
||||
choices: [
|
||||
...(addSeparators
|
||||
? [new Separator('----- Existing Projects -----')]
|
||||
? [new inquirer.Separator('----- Existing Projects -----')]
|
||||
: []),
|
||||
...projects.map(project => {
|
||||
return {
|
||||
@@ -236,7 +240,7 @@ export async function ensureRepoLink(
|
||||
};
|
||||
}),
|
||||
...(addSeparators
|
||||
? [new Separator('----- New Projects to be created -----')]
|
||||
? [new inquirer.Separator('----- New Projects to be created -----')]
|
||||
: []),
|
||||
...Array.from(detectedProjects.entries()).flatMap(
|
||||
([rootDirectory, frameworks]) =>
|
||||
@@ -260,11 +264,12 @@ export async function ensureRepoLink(
|
||||
},
|
||||
// Checked by default when there are no other existing Projects
|
||||
checked: projects.length === 0,
|
||||
} as const;
|
||||
};
|
||||
})
|
||||
),
|
||||
],
|
||||
});
|
||||
selected = answer.selected;
|
||||
}
|
||||
|
||||
if (selected.length === 0) {
|
||||
@@ -360,13 +365,7 @@ export async function findRepoRoot(
|
||||
): Promise<string | undefined> {
|
||||
const { debug } = client.output;
|
||||
const REPO_JSON_PATH = join(VERCEL_DIR, VERCEL_DIR_REPO);
|
||||
/**
|
||||
* If the current repo is a git submodule or git worktree '.git' is a file
|
||||
* with a pointer to the "parent" git repository instead of a directory.
|
||||
*/
|
||||
const GIT_PATH = isGitWorktreeOrSubmodule({ cwd: client.cwd })
|
||||
? normalize('.git')
|
||||
: normalize('.git/config');
|
||||
const GIT_CONFIG_PATH = normalize('.git/config');
|
||||
|
||||
for (const current of traverseUpDirectories({ start })) {
|
||||
if (current === home) {
|
||||
@@ -390,12 +389,12 @@ export async function findRepoRoot(
|
||||
|
||||
// if `.git/config` exists (unlinked),
|
||||
// then consider this the repo root
|
||||
const gitConfigPath = join(current, GIT_PATH);
|
||||
const gitConfigPath = join(current, GIT_CONFIG_PATH);
|
||||
stat = await lstat(gitConfigPath).catch(err => {
|
||||
if (err.code !== 'ENOENT') throw err;
|
||||
});
|
||||
if (stat) {
|
||||
debug(`Found "${GIT_PATH}" - detected "${current}" as repo root`);
|
||||
debug(`Found "${GIT_CONFIG_PATH}" - detected "${current}" as repo root`);
|
||||
return current;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,12 @@ export async function readInput(
|
||||
|
||||
while (!input) {
|
||||
try {
|
||||
input = await client.input.text({ message });
|
||||
const { val } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'val',
|
||||
message,
|
||||
});
|
||||
input = val;
|
||||
} catch (err: any) {
|
||||
console.log(); // \n
|
||||
|
||||
|
||||
@@ -1,52 +1,38 @@
|
||||
import Table from 'cli-table3';
|
||||
import chalk from 'chalk';
|
||||
|
||||
const defaultStyle = {
|
||||
'padding-left': 0,
|
||||
'padding-right': 2,
|
||||
};
|
||||
|
||||
export const noBorderChars = {
|
||||
top: '',
|
||||
'top-mid': '',
|
||||
'top-left': '',
|
||||
'top-right': '',
|
||||
bottom: '',
|
||||
'bottom-mid': '',
|
||||
'bottom-left': '',
|
||||
'bottom-right': '',
|
||||
left: '',
|
||||
'left-mid': '',
|
||||
mid: '',
|
||||
'mid-mid': '',
|
||||
right: '',
|
||||
'right-mid': '',
|
||||
middle: '',
|
||||
};
|
||||
|
||||
const alignMap = {
|
||||
l: 'left',
|
||||
c: 'center',
|
||||
r: 'right',
|
||||
} as const;
|
||||
const printLine = (data: string[], sizes: number[]) =>
|
||||
data.reduce((line, col, i) => line + col.padEnd(sizes[i]), '');
|
||||
|
||||
/**
|
||||
* Print a table.
|
||||
*/
|
||||
export default function table(
|
||||
rows: string[][],
|
||||
opts?: { hsep?: number; align?: ('l' | 'c' | 'r')[] }
|
||||
fieldNames: string[] = [],
|
||||
data: string[][] = [],
|
||||
margins: number[] = [],
|
||||
print: (str: string) => void
|
||||
) {
|
||||
const table = new Table({
|
||||
style: {
|
||||
...defaultStyle,
|
||||
'padding-right': opts?.hsep ?? defaultStyle['padding-right'],
|
||||
},
|
||||
chars: noBorderChars,
|
||||
});
|
||||
table.push(
|
||||
...rows.map(row =>
|
||||
row.map((cell, i) => ({
|
||||
content: cell,
|
||||
hAlign: alignMap[opts?.align?.[i] ?? 'l'],
|
||||
}))
|
||||
// Compute size of each column
|
||||
const sizes = data
|
||||
.reduce(
|
||||
(acc, row) =>
|
||||
row.map((col, i) => {
|
||||
const currentMaxColSize = acc[i] || 0;
|
||||
const colSize = (col && col.length) || 0;
|
||||
return Math.max(currentMaxColSize, colSize);
|
||||
}),
|
||||
fieldNames.map(col => col.length)
|
||||
)
|
||||
);
|
||||
return table.toString();
|
||||
// Add margin to all columns except the last
|
||||
.map((size, i) => (i < margins.length && size + margins[i]) || size);
|
||||
|
||||
// Print header
|
||||
print(chalk.grey(printLine(fieldNames, sizes)));
|
||||
print('\n');
|
||||
|
||||
// Print content
|
||||
for (const row of data) {
|
||||
print(printLine(row, sizes));
|
||||
print('\n');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { join } from 'path';
|
||||
import { frameworkList, Framework } from '@vercel/frameworks';
|
||||
import { Framework, frameworks as frameworkList } from '@vercel/frameworks';
|
||||
import {
|
||||
detectFrameworks,
|
||||
getWorkspacePackagePaths,
|
||||
|
||||
@@ -97,13 +97,16 @@ async function getProjectLinkFromRepoLink(
|
||||
} else {
|
||||
const selectableProjects =
|
||||
projects.length > 0 ? projects : repoLink.repoConfig.projects;
|
||||
project = await client.input.select({
|
||||
const { p } = await client.prompt({
|
||||
name: 'p',
|
||||
type: 'list',
|
||||
message: `Please select a Project:`,
|
||||
choices: selectableProjects.map(p => ({
|
||||
value: p,
|
||||
name: p.name,
|
||||
})),
|
||||
});
|
||||
project = p;
|
||||
}
|
||||
if (project) {
|
||||
return {
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,6 @@ menu:
|
||||
---
|
||||
|
||||
|
||||
This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
|
||||
This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
|
||||
|
||||
{{< form-contact action="https://example.com" >}}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
handler() {
|
||||
echo "Hello, from Bash!"
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export default (req: Request) => {
|
||||
return new Response('Hello, from Deno!');
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user