mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-11 12:57:46 +00:00
Compare commits
87 Commits
create-inp
...
@vercel/st
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02454d4c02 | ||
|
|
2826563ffa | ||
|
|
f4c181a2c2 | ||
|
|
fc7a8bc8ae | ||
|
|
5bb96ea072 | ||
|
|
596b68ce56 | ||
|
|
a891f0e1ef | ||
|
|
993a60ef71 | ||
|
|
55190873a1 | ||
|
|
1e6323e2b1 | ||
|
|
0b05981673 | ||
|
|
8fd2c0671e | ||
|
|
1447bc011c | ||
|
|
027150134f | ||
|
|
949d84ad1c | ||
|
|
fd80318743 | ||
|
|
10883f2c22 | ||
|
|
af515c9dfc | ||
|
|
a1dfd90eec | ||
|
|
838f4f4894 | ||
|
|
7922a79300 | ||
|
|
d5f0777c9c | ||
|
|
0dfb60df83 | ||
|
|
04b3f22d91 | ||
|
|
e2370a3d5f | ||
|
|
21bbbb648d | ||
|
|
5f72dc4360 | ||
|
|
da0ddb83b0 | ||
|
|
009f402467 | ||
|
|
a6f1c561a2 | ||
|
|
d3e83ad8b8 | ||
|
|
f39513118a | ||
|
|
fd188a396b | ||
|
|
cdfc879f69 | ||
|
|
b58dcc5733 | ||
|
|
cddf3fa00c | ||
|
|
627b79fb14 | ||
|
|
7259a324c2 | ||
|
|
1aab599652 | ||
|
|
2461b571af | ||
|
|
1088bf2dea | ||
|
|
c5bd242a79 | ||
|
|
764ba97967 | ||
|
|
4e416d7d7b | ||
|
|
8775ff3fcf | ||
|
|
bd100baa16 | ||
|
|
2e6aab01cb | ||
|
|
3e57c4a2de | ||
|
|
0c3d136414 | ||
|
|
238d6db17a | ||
|
|
bb7bfd027f | ||
|
|
a56ab4ded9 | ||
|
|
5660dab2ae | ||
|
|
1202cf8792 | ||
|
|
80b8c3d022 | ||
|
|
68e5edb9a2 | ||
|
|
1545e31a31 | ||
|
|
76ea6ea2a7 | ||
|
|
5b8b87739e | ||
|
|
6ff7b34a44 | ||
|
|
97d9e83232 | ||
|
|
a3fb7e6abe | ||
|
|
b9f6d765c0 | ||
|
|
c24d85f574 | ||
|
|
3c42649916 | ||
|
|
c1891f64f4 | ||
|
|
2fc46c0d47 | ||
|
|
73b112b1f7 | ||
|
|
548afd371a | ||
|
|
d0877c1023 | ||
|
|
326fe0f0e6 | ||
|
|
346e665bb0 | ||
|
|
9a27ccbe6d | ||
|
|
3b6d96891b | ||
|
|
07d8d11989 | ||
|
|
8a16e8eb65 | ||
|
|
63e9de8932 | ||
|
|
c6d588201b | ||
|
|
0b1ff4bf62 | ||
|
|
14102ddf56 | ||
|
|
49f88975b9 | ||
|
|
13f3db06a8 | ||
|
|
78e2c012f9 | ||
|
|
f707f13821 | ||
|
|
9ed967034d | ||
|
|
1825b58df8 | ||
|
|
c82a55c460 |
@@ -1,2 +0,0 @@
|
||||
---
|
||||
---
|
||||
@@ -1,2 +0,0 @@
|
||||
---
|
||||
---
|
||||
@@ -1,2 +0,0 @@
|
||||
---
|
||||
---
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
---
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@vercel/remix-builder": patch
|
||||
---
|
||||
|
||||
Add `mjs` and `mts` extensions to vite detection
|
||||
@@ -1,2 +0,0 @@
|
||||
---
|
||||
---
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
---
|
||||
|
||||
Update CODEOWNERS
|
||||
@@ -1,2 +0,0 @@
|
||||
---
|
||||
---
|
||||
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
|
||||
/.github/workflows @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @ijjk
|
||||
/packages/fs-detectors @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @agadzik @chloetedder
|
||||
/packages/next @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
|
||||
/packages/routing-utils @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @ijjk
|
||||
/packages/static-build @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55
|
||||
/packages/edge @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @vercel/compute
|
||||
/examples @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @leerob
|
||||
/examples/create-react-app @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @Timer
|
||||
/examples/nextjs @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @timneutkens @ijjk @ztanner @huozhi @Ethan-Arrowood @styfle
|
||||
/packages/node @TooTallNate @EndangeredMassa @trek @onsclom @jeffsee55 @Kikobeats
|
||||
* @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
|
||||
|
||||
# Unrestricted Paths
|
||||
.changeset/
|
||||
|
||||
109
.github/CONTRIBUTING.md
vendored
109
.github/CONTRIBUTING.md
vendored
@@ -1,108 +1,3 @@
|
||||
# Contributing
|
||||
## Contributing
|
||||
|
||||
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
|
||||
See the [Contributing Guidelines](../README.md#contributing) for more details.
|
||||
|
||||
62
.github/dependabot.yml
vendored
62
.github/dependabot.yml
vendored
@@ -90,8 +90,15 @@ updates:
|
||||
prefix: '[framework-fixtures]'
|
||||
package-ecosystem: 'npm'
|
||||
allow:
|
||||
- dependency-name: '@angular*'
|
||||
- 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:
|
||||
@@ -100,6 +107,35 @@ updates:
|
||||
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'
|
||||
@@ -139,6 +175,30 @@ updates:
|
||||
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'
|
||||
|
||||
@@ -12,17 +12,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
# 0 means fetch all commits so we can commit and push in the script below
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Enable corepack
|
||||
run: corepack enable pnpm
|
||||
- name: Update Gatsby Fixtures
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
|
||||
|
||||
4
.github/workflows/cron-update-next.yml
vendored
4
.github/workflows/cron-update-next.yml
vendored
@@ -12,14 +12,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
# 0 means fetch all commits so we can commit and push in the script below
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Enable corepack
|
||||
run: corepack enable pnpm
|
||||
- name: Create Pull Request
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
|
||||
|
||||
4
.github/workflows/cron-update-turbo.yml
vendored
4
.github/workflows/cron-update-turbo.yml
vendored
@@ -12,14 +12,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
# 0 means fetch all commits so we can commit and push in the script below
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Enable corepack
|
||||
run: corepack enable pnpm
|
||||
- name: Create Pull Request
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
|
||||
|
||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -21,13 +21,13 @@ jobs:
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Fetch git tags
|
||||
run: git fetch origin 'refs/tags/*:refs/tags/*'
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
|
||||
- name: Trigger Update (if a Publish Happened)
|
||||
if: steps.changesets.outputs.published == 'true'
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
|
||||
script: |
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
|
||||
- name: Set latest Release to `vercel` (if a Publish Happened)
|
||||
if: steps.changesets.outputs.published == 'true'
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
|
||||
script: |
|
||||
|
||||
6
.github/workflows/test-lint.yml
vendored
6
.github/workflows/test-lint.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.title != 'Version Packages'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: main
|
||||
@@ -41,8 +41,8 @@ jobs:
|
||||
timeout-minutes: 10
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: install pnpm@8.3.1
|
||||
|
||||
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
@@ -26,10 +26,10 @@ jobs:
|
||||
tests: ${{ steps['set-tests'].outputs['tests'] }}
|
||||
dplUrl: ${{ steps.waitForTarball.outputs.url }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: install pnpm@8.3.1
|
||||
@@ -59,17 +59,13 @@ jobs:
|
||||
matrix:
|
||||
include: ${{ fromJson(needs.setup.outputs['tests']) }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.nodeVersion || env.NODE_VERSION }}
|
||||
|
||||
- name: Install Hugo
|
||||
if: matrix.runner == 'macos-latest'
|
||||
run: curl -L -O https://github.com/gohugoio/hugo/releases/download/v0.56.0/hugo_0.56.0_macOS-64bit.tar.gz && tar -xzf hugo_0.56.0_macOS-64bit.tar.gz && mv ./hugo packages/cli/test/dev/fixtures/08-hugo/
|
||||
|
||||
# yarn 1.22.21 introduced a Corepack bug when running tests.
|
||||
# this can be removed once https://github.com/yarnpkg/yarn/issues/9015 is resolved
|
||||
- name: install yarn@1.22.19
|
||||
@@ -79,16 +75,13 @@ 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 test --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 ${{matrix.testScript}} --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
|
||||
@@ -104,9 +97,6 @@ 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'
|
||||
|
||||
6
.github/workflows/update-remix-run-dev.yml
vendored
6
.github/workflows/update-remix-run-dev.yml
vendored
@@ -12,17 +12,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Enable corepack
|
||||
run: corepack enable pnpm
|
||||
- name: Update @remix-run/dev
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
|
||||
script: |
|
||||
|
||||
129
README.md
129
README.md
@@ -35,7 +35,134 @@ 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`.
|
||||
|
||||
See the [Contributing Guidelines](./.github/CONTRIBUTING.md) 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.
|
||||
|
||||
##### 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
|
||||
|
||||
## Reference
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ function initSentry() {
|
||||
sentryInitDone = true;
|
||||
|
||||
init({
|
||||
// Cannot figure out whats going wrong here. VSCode resolves this fine. But when we build it blows up.
|
||||
// Cannot figure out what's going wrong here. VSCode resolves this fine. But when we build it blows up.
|
||||
// @ts-ignore
|
||||
dsn: assertEnv('SENTRY_DSN'),
|
||||
environment: process.env.NODE_ENV || 'production',
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@sentry/node": "5.11.1",
|
||||
"got": "10.2.1",
|
||||
"got": "11.8.5",
|
||||
"node-fetch": "2.6.7",
|
||||
"parse-github-url": "1.0.2",
|
||||
"tar-fs": "2.0.0",
|
||||
|
||||
@@ -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 paramters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#unnamed-parameters)
|
||||
- [un-named parameters](https://github.com/pillarjs/path-to-regexp/blob/v6.1.0/Readme.md#unnamed-parameters)
|
||||
|
||||
4
examples/__tests__/integration/solidstart-1.test.ts
Normal file
4
examples/__tests__/integration/solidstart-1.test.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { deployExample } from '../test-utils';
|
||||
it('[examples] should deploy solidstart-1', async () => {
|
||||
await deployExample('solidstart-1');
|
||||
});
|
||||
@@ -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(filename, '..', '..', '..', example));
|
||||
await testDeployment(join(process.cwd(), example));
|
||||
}
|
||||
|
||||
export function getExamples() {
|
||||
|
||||
47
examples/ember/.github/workflows/ci.yml
vendored
47
examples/ember/.github/workflows/ci.yml
vendored
@@ -1,47 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request: {}
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.head_ref || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: "Lint"
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: npm
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
test:
|
||||
name: "Test"
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: npm
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
- name: Run Tests
|
||||
run: npm test
|
||||
@@ -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 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 shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
|
||||
|
||||
{{< form-contact action="https://example.com" >}}
|
||||
|
||||
@@ -3,12 +3,12 @@ import Image from "next/image";
|
||||
export default function Home() {
|
||||
return (
|
||||
<main className="flex min-h-screen flex-col items-center justify-between p-24">
|
||||
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
|
||||
<div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
|
||||
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
|
||||
Get started by editing
|
||||
<code className="font-mono font-bold">app/page.tsx</code>
|
||||
</p>
|
||||
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
|
||||
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:size-auto lg:bg-none">
|
||||
<a
|
||||
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
|
||||
href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
|
||||
@@ -28,7 +28,7 @@ export default function Home() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-full sm:before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full sm:after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
|
||||
<div className="relative z-[-1] flex place-items-center before:absolute before:h-[300px] before:w-full before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 sm:before:w-[480px] sm:after:w-[240px] before:lg:h-[360px]">
|
||||
<Image
|
||||
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
|
||||
src="/next.svg"
|
||||
@@ -39,20 +39,20 @@ export default function Home() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left">
|
||||
<div className="mb-32 grid text-center lg:mb-0 lg:w-full lg:max-w-5xl lg:grid-cols-4 lg:text-left">
|
||||
<a
|
||||
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
|
||||
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<h2 className={`mb-3 text-2xl font-semibold`}>
|
||||
<h2 className="mb-3 text-2xl font-semibold">
|
||||
Docs{" "}
|
||||
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
||||
->
|
||||
</span>
|
||||
</h2>
|
||||
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
||||
<p className="m-0 max-w-[30ch] text-sm opacity-50">
|
||||
Find in-depth information about Next.js features and API.
|
||||
</p>
|
||||
</a>
|
||||
@@ -63,13 +63,13 @@ export default function Home() {
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<h2 className={`mb-3 text-2xl font-semibold`}>
|
||||
<h2 className="mb-3 text-2xl font-semibold">
|
||||
Learn{" "}
|
||||
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
||||
->
|
||||
</span>
|
||||
</h2>
|
||||
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
||||
<p className="m-0 max-w-[30ch] text-sm opacity-50">
|
||||
Learn about Next.js in an interactive course with quizzes!
|
||||
</p>
|
||||
</a>
|
||||
@@ -80,13 +80,13 @@ export default function Home() {
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<h2 className={`mb-3 text-2xl font-semibold`}>
|
||||
<h2 className="mb-3 text-2xl font-semibold">
|
||||
Templates{" "}
|
||||
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
||||
->
|
||||
</span>
|
||||
</h2>
|
||||
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
||||
<p className="m-0 max-w-[30ch] text-sm opacity-50">
|
||||
Explore starter templates for Next.js.
|
||||
</p>
|
||||
</a>
|
||||
@@ -97,13 +97,13 @@ export default function Home() {
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<h2 className={`mb-3 text-2xl font-semibold`}>
|
||||
<h2 className="mb-3 text-2xl font-semibold">
|
||||
Deploy{" "}
|
||||
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
||||
->
|
||||
</span>
|
||||
</h2>
|
||||
<p className={`m-0 max-w-[30ch] text-sm opacity-50 text-balance`}>
|
||||
<p className="m-0 max-w-[30ch] text-balance text-sm opacity-50">
|
||||
Instantly deploy your Next.js site to a shareable URL with Vercel.
|
||||
</p>
|
||||
</a>
|
||||
|
||||
496
examples/nextjs/package-lock.json
generated
496
examples/nextjs/package-lock.json
generated
@@ -8,7 +8,7 @@
|
||||
"name": "nextjs",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"next": "14.1.4",
|
||||
"next": "14.2.2",
|
||||
"react": "^18",
|
||||
"react-dom": "^18"
|
||||
},
|
||||
@@ -16,11 +16,10 @@
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"autoprefixer": "^10.0.1",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.1.4",
|
||||
"eslint-config-next": "14.2.2",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5"
|
||||
}
|
||||
},
|
||||
@@ -46,9 +45,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.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz",
|
||||
"integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
@@ -141,9 +140,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@humanwhocodes/object-schema": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
|
||||
"integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
|
||||
"integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@isaacs/cliui": {
|
||||
@@ -239,23 +238,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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.2.tgz",
|
||||
"integrity": "sha512-sk72qRfM1Q90XZWYRoJKu/UWlTgihrASiYw/scb15u+tyzcze3bOuJ/UV6TBOQEeUaxOkRqGeuGUdiiuxc5oqw=="
|
||||
},
|
||||
"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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.2.tgz",
|
||||
"integrity": "sha512-q+Ec2648JtBpKiu/FSJm8HAsFXlNvioHeBCbTP12T1SGcHYwhqHULSfQgFkPgHDu3kzNp2Kem4J54bK4rPQ5SQ==",
|
||||
"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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.2.tgz",
|
||||
"integrity": "sha512-3iPgMhzbalizGwHNFUcGnDhFPSgVBHQ8aqSTAMxB5BvJG0oYrDf1WOJZlbXBgunOEj/8KMVbejEur/FpvFsgFQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -268,9 +267,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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.2.tgz",
|
||||
"integrity": "sha512-x7Afi/jt0ZBRUZHTi49yyej4o8znfIMHO4RvThuoc0P+uli8Jd99y5GKjxoYunPKsXL09xBXEM1+OQy2xEL0Ag==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -283,9 +282,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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.2.tgz",
|
||||
"integrity": "sha512-zbfPtkk7L41ODMJwSp5VbmPozPmMMQrzAc0HAUomVeVIIwlDGs/UCqLJvLNDt4jpWgc21SjjyIn762lNGrMaUA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -298,9 +297,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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.2.tgz",
|
||||
"integrity": "sha512-wPbS3pI/JU16rm3XdLvvTmlsmm1nd+sBa2ohXgBZcShX4TgOjD4R+RqHKlI1cjo/jDZKXt6OxmcU0Iys0OC/yg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -313,9 +312,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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.2.tgz",
|
||||
"integrity": "sha512-NqWOHqqq8iC9tuHvZxjQ2tX+jWy2X9y8NX2mcB4sj2bIccuCxbIZrU/ThFPZZPauygajZuVQ6zediejQHwZHwQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -328,9 +327,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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.2.tgz",
|
||||
"integrity": "sha512-lGepHhwb9sGhCcU7999+iK1ZZT+6rrIoVg40MP7DZski9GIZP80wORSbt5kJzh9v2x2ev2lxC6VgwMQT0PcgTA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -343,9 +342,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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.2.tgz",
|
||||
"integrity": "sha512-TZSh/48SfcLEQ4rD25VVn2kdIgUWmMflRX3OiyPwGNXn3NiyPqhqei/BaqCYXViIQ+6QsG9R0C8LftMqy8JPMA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -358,9 +357,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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.2.tgz",
|
||||
"integrity": "sha512-M0tBVNMEBJN2ZNQWlcekMn6pvLria7Sa2Fai5znm7CCJz4pP3lrvlSxhKdkCerk0D9E0bqx5yAo3o2Q7RrD4gA==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -373,9 +372,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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.2.tgz",
|
||||
"integrity": "sha512-a/20E/wtTJZ3Ykv3f/8F0l7TtgQa2LWHU2oNB9bsu0VjqGuGGHmm/q6waoUNQYTVPYrrlxxaHjJcDV6aiSTt/w==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -433,16 +432,22 @@
|
||||
}
|
||||
},
|
||||
"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.10.2",
|
||||
"resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.2.tgz",
|
||||
"integrity": "sha512-hw437iINopmQuxWPSUEvqE56NCPsiU8N4AYtfHmJFckclktzK9YQJieD3XkDCDH4OjL+C7zgPUh73R/nrcHrqw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@swc/counter": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
|
||||
"integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ=="
|
||||
},
|
||||
"node_modules/@swc/helpers": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz",
|
||||
"integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==",
|
||||
"version": "0.5.5",
|
||||
"resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.5.tgz",
|
||||
"integrity": "sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==",
|
||||
"dependencies": {
|
||||
"@swc/counter": "^0.1.3",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
@@ -453,56 +458,49 @@
|
||||
"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.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz",
|
||||
"integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/prop-types": {
|
||||
"version": "15.7.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz",
|
||||
"integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==",
|
||||
"version": "15.7.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz",
|
||||
"integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==",
|
||||
"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.79",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.79.tgz",
|
||||
"integrity": "sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
"@types/scheduler": "*",
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"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.25",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.25.tgz",
|
||||
"integrity": "sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/scheduler": {
|
||||
"version": "0.16.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz",
|
||||
"integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz",
|
||||
"integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz",
|
||||
"integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "6.21.0",
|
||||
"@typescript-eslint/types": "6.21.0",
|
||||
"@typescript-eslint/typescript-estree": "6.21.0",
|
||||
"@typescript-eslint/visitor-keys": "6.21.0",
|
||||
"@typescript-eslint/scope-manager": "7.2.0",
|
||||
"@typescript-eslint/types": "7.2.0",
|
||||
"@typescript-eslint/typescript-estree": "7.2.0",
|
||||
"@typescript-eslint/visitor-keys": "7.2.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -513,7 +511,7 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.0.0 || ^8.0.0"
|
||||
"eslint": "^8.56.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
@@ -522,13 +520,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz",
|
||||
"integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==",
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz",
|
||||
"integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.21.0",
|
||||
"@typescript-eslint/visitor-keys": "6.21.0"
|
||||
"@typescript-eslint/types": "7.2.0",
|
||||
"@typescript-eslint/visitor-keys": "7.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
@@ -539,9 +537,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz",
|
||||
"integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==",
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz",
|
||||
"integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
@@ -552,13 +550,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz",
|
||||
"integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==",
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz",
|
||||
"integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.21.0",
|
||||
"@typescript-eslint/visitor-keys": "6.21.0",
|
||||
"@typescript-eslint/types": "7.2.0",
|
||||
"@typescript-eslint/visitor-keys": "7.2.0",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -604,12 +602,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz",
|
||||
"integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==",
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz",
|
||||
"integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.21.0",
|
||||
"@typescript-eslint/types": "7.2.0",
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -744,15 +742,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/array-includes": {
|
||||
"version": "3.1.7",
|
||||
"resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz",
|
||||
"integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==",
|
||||
"version": "3.1.8",
|
||||
"resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz",
|
||||
"integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1",
|
||||
"get-intrinsic": "^1.2.1",
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.2",
|
||||
"es-object-atoms": "^1.0.0",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"is-string": "^1.0.7"
|
||||
},
|
||||
"engines": {
|
||||
@@ -900,43 +899,6 @@
|
||||
"integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/autoprefixer": {
|
||||
"version": "10.4.18",
|
||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.18.tgz",
|
||||
"integrity": "sha512-1DKbDfsr6KUElM6wg+0zRNkB/Q7WcKYAaK+pzXn+Xqmszm/5Xa9coeNdtP88Vi+dPzZnMjhge8GIV49ZQkDa+g==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/autoprefixer"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"browserslist": "^4.23.0",
|
||||
"caniuse-lite": "^1.0.30001591",
|
||||
"fraction.js": "^4.3.7",
|
||||
"normalize-range": "^0.1.2",
|
||||
"picocolors": "^1.0.0",
|
||||
"postcss-value-parser": "^4.2.0"
|
||||
},
|
||||
"bin": {
|
||||
"autoprefixer": "bin/autoprefixer"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/available-typed-arrays": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
|
||||
@@ -1010,38 +972,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.23.0",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz",
|
||||
"integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001587",
|
||||
"electron-to-chromium": "^1.4.668",
|
||||
"node-releases": "^2.0.14",
|
||||
"update-browserslist-db": "^1.0.13"
|
||||
},
|
||||
"bin": {
|
||||
"browserslist": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
||||
}
|
||||
},
|
||||
"node_modules/busboy": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
|
||||
@@ -1091,9 +1021,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.30001610",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001610.tgz",
|
||||
"integrity": "sha512-QFutAY4NgaelojVMjY63o6XlZyORPaLfyMnsl3HgnWdJUcX6K0oaJymHjH8PT5Gk7sTm8rvC/c5COUQKXqmOMA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@@ -1396,12 +1326,6 @@
|
||||
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
|
||||
"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==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "9.2.2",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
||||
@@ -1422,9 +1346,9 @@
|
||||
}
|
||||
},
|
||||
"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.23.3",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz",
|
||||
"integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"array-buffer-byte-length": "^1.0.1",
|
||||
@@ -1466,11 +1390,11 @@
|
||||
"safe-regex-test": "^1.0.3",
|
||||
"string.prototype.trim": "^1.2.9",
|
||||
"string.prototype.trimend": "^1.0.8",
|
||||
"string.prototype.trimstart": "^1.0.7",
|
||||
"string.prototype.trimstart": "^1.0.8",
|
||||
"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",
|
||||
"typed-array-length": "^1.0.6",
|
||||
"unbox-primitive": "^1.0.2",
|
||||
"which-typed-array": "^1.1.15"
|
||||
},
|
||||
@@ -1579,15 +1503,6 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
|
||||
"integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/escape-string-regexp": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
@@ -1656,14 +1571,14 @@
|
||||
}
|
||||
},
|
||||
"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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.2.2.tgz",
|
||||
"integrity": "sha512-12/uFc0KX+wUs7EDpOUGKMXBXZJiBVGdK5/m/QgXOCg2mQ0bQWoKSWNrCeOg7Vum6Kw1d1TW453W6xh+GbHquw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@next/eslint-plugin-next": "14.1.4",
|
||||
"@next/eslint-plugin-next": "14.2.2",
|
||||
"@rushstack/eslint-patch": "^1.3.3",
|
||||
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
|
||||
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0",
|
||||
"eslint-import-resolver-node": "^0.3.6",
|
||||
"eslint-import-resolver-typescript": "^3.5.2",
|
||||
"eslint-plugin-import": "^2.28.1",
|
||||
@@ -2152,19 +2067,6 @@
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/fraction.js": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
|
||||
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"type": "patreon",
|
||||
"url": "https://github.com/sponsors/rawify"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
@@ -2313,9 +2215,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/glob/node_modules/minimatch": {
|
||||
"version": "9.0.3",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
|
||||
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
|
||||
"version": "9.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
||||
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
@@ -3215,12 +3117,12 @@
|
||||
"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.2.2",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-14.2.2.tgz",
|
||||
"integrity": "sha512-oGwUaa2bCs47FbuxWMpOoXtBMPYpvTPgdZr3UAo+pu7Ns00z9otmYpoeV1HEiYL06AlRQQIA/ypK526KjJfaxg==",
|
||||
"dependencies": {
|
||||
"@next/env": "14.1.4",
|
||||
"@swc/helpers": "0.5.2",
|
||||
"@next/env": "14.2.2",
|
||||
"@swc/helpers": "0.5.5",
|
||||
"busboy": "1.6.0",
|
||||
"caniuse-lite": "^1.0.30001579",
|
||||
"graceful-fs": "^4.2.11",
|
||||
@@ -3234,18 +3136,19 @@
|
||||
"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.2.2",
|
||||
"@next/swc-darwin-x64": "14.2.2",
|
||||
"@next/swc-linux-arm64-gnu": "14.2.2",
|
||||
"@next/swc-linux-arm64-musl": "14.2.2",
|
||||
"@next/swc-linux-x64-gnu": "14.2.2",
|
||||
"@next/swc-linux-x64-musl": "14.2.2",
|
||||
"@next/swc-win32-arm64-msvc": "14.2.2",
|
||||
"@next/swc-win32-ia32-msvc": "14.2.2",
|
||||
"@next/swc-win32-x64-msvc": "14.2.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@opentelemetry/api": "^1.1.0",
|
||||
"@playwright/test": "^1.41.2",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"sass": "^1.3.0"
|
||||
@@ -3254,6 +3157,9 @@
|
||||
"@opentelemetry/api": {
|
||||
"optional": true
|
||||
},
|
||||
"@playwright/test": {
|
||||
"optional": true
|
||||
},
|
||||
"sass": {
|
||||
"optional": true
|
||||
}
|
||||
@@ -3286,12 +3192,6 @@
|
||||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/node-releases": {
|
||||
"version": "2.0.14",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
|
||||
"integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
@@ -3301,15 +3201,6 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-range": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
|
||||
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
@@ -3411,13 +3302,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/object.hasown": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.3.tgz",
|
||||
"integrity": "sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==",
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz",
|
||||
"integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.2",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@@ -3542,12 +3437,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/path-scurry": {
|
||||
"version": "1.10.1",
|
||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",
|
||||
"integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz",
|
||||
"integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^9.1.1 || ^10.0.0",
|
||||
"lru-cache": "^10.2.0",
|
||||
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -3611,9 +3506,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.38",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz",
|
||||
"integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -4250,20 +4145,26 @@
|
||||
}
|
||||
},
|
||||
"node_modules/string.prototype.matchall": {
|
||||
"version": "4.0.10",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz",
|
||||
"integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==",
|
||||
"version": "4.0.11",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz",
|
||||
"integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1",
|
||||
"get-intrinsic": "^1.2.1",
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-abstract": "^1.23.2",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.0.0",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"gopd": "^1.0.1",
|
||||
"has-symbols": "^1.0.3",
|
||||
"internal-slot": "^1.0.5",
|
||||
"regexp.prototype.flags": "^1.5.0",
|
||||
"set-function-name": "^2.0.0",
|
||||
"side-channel": "^1.0.4"
|
||||
"internal-slot": "^1.0.7",
|
||||
"regexp.prototype.flags": "^1.5.2",
|
||||
"set-function-name": "^2.0.2",
|
||||
"side-channel": "^1.0.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@@ -4302,14 +4203,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/string.prototype.trimstart": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz",
|
||||
"integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==",
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz",
|
||||
"integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.2.0",
|
||||
"es-abstract": "^1.22.1"
|
||||
"call-bind": "^1.0.7",
|
||||
"define-properties": "^1.2.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@@ -4430,9 +4334,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tailwindcss": {
|
||||
"version": "3.4.1",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz",
|
||||
"integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==",
|
||||
"version": "3.4.3",
|
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz",
|
||||
"integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@alloc/quick-lru": "^5.2.0",
|
||||
@@ -4443,7 +4347,7 @@
|
||||
"fast-glob": "^3.3.0",
|
||||
"glob-parent": "^6.0.2",
|
||||
"is-glob": "^4.0.3",
|
||||
"jiti": "^1.19.1",
|
||||
"jiti": "^1.21.0",
|
||||
"lilconfig": "^2.1.0",
|
||||
"micromatch": "^4.0.5",
|
||||
"normalize-path": "^3.0.0",
|
||||
@@ -4627,9 +4531,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typed-array-length": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.5.tgz",
|
||||
"integrity": "sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==",
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz",
|
||||
"integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
@@ -4647,9 +4551,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.4.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
|
||||
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
|
||||
"version": "5.4.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
|
||||
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
@@ -4680,36 +4584,6 @@
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.0.13",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
|
||||
"integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"escalade": "^3.1.1",
|
||||
"picocolors": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"update-browserslist-db": "cli.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"browserslist": ">= 4.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/uri-js": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
|
||||
|
||||
@@ -11,17 +11,16 @@
|
||||
"dependencies": {
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
"next": "14.1.4"
|
||||
"next": "14.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"autoprefixer": "^10.0.1",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.1.4"
|
||||
"eslint-config-next": "14.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
8
examples/nextjs/postcss.config.mjs
Normal file
8
examples/nextjs/postcss.config.mjs
Normal file
@@ -0,0 +1,8 @@
|
||||
/** @type {import('postcss-load-config').Config} */
|
||||
const config = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
3
examples/package.json
vendored
3
examples/package.json
vendored
@@ -9,7 +9,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "27.4.1",
|
||||
"@vercel/frameworks": "3.0.0"
|
||||
"@vercel/build-utils": "7.12.0",
|
||||
"@vercel/frameworks": "3.0.2"
|
||||
},
|
||||
"version": null
|
||||
}
|
||||
|
||||
23
examples/solidstart-1/.gitignore
vendored
Normal file
23
examples/solidstart-1/.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
dist
|
||||
worker
|
||||
.solid
|
||||
.vercel
|
||||
.vinxi
|
||||
.output
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
*.launch
|
||||
.settings/
|
||||
|
||||
# Temp
|
||||
gitignore
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
27
examples/solidstart-1/README.md
Normal file
27
examples/solidstart-1/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# SolidStart
|
||||
|
||||
This directory is a brief example of a [SolidStart](https://github.com/ryansolid/solid-start) site that can be deployed to Vercel with zero configuration.
|
||||
|
||||
## Deploy Your Own
|
||||
|
||||
Deploy your own SolidStart project with Vercel.
|
||||
|
||||
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/solidstart&template=solidstart)
|
||||
|
||||
_Live Example: https://solid-start-template.vercel.app_
|
||||
|
||||
## Developing
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
This uses the [Vercel Adapter](https://github.com/solidjs/solid-start/tree/main/packages/start-vercel) for SolidStart.
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
7
examples/solidstart-1/app.config.ts
Normal file
7
examples/solidstart-1/app.config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineConfig } from "@solidjs/start/config";
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
preset: "vercel"
|
||||
}
|
||||
});
|
||||
20
examples/solidstart-1/package.json
Normal file
20
examples/solidstart-1/package.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"scripts": {
|
||||
"dev": "vinxi dev",
|
||||
"build": "vinxi build",
|
||||
"start": "vinxi start",
|
||||
"version": "vinxi version"
|
||||
},
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@solidjs/meta": "^0.29.2",
|
||||
"@solidjs/router": "^0.13.1",
|
||||
"@solidjs/start": "^1.0.0-rc.0",
|
||||
"solid-js": "^1.8.16",
|
||||
"vinxi": "^0.3.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
}
|
||||
4413
examples/solidstart-1/pnpm-lock.yaml
generated
Normal file
4413
examples/solidstart-1/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
BIN
examples/solidstart-1/public/favicon.ico
Normal file
BIN
examples/solidstart-1/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 664 B |
39
examples/solidstart-1/src/app.css
Normal file
39
examples/solidstart-1/src/app.css
Normal file
@@ -0,0 +1,39 @@
|
||||
body {
|
||||
font-family: Gordita, Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
main {
|
||||
text-align: center;
|
||||
padding: 1em;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #335d92;
|
||||
text-transform: uppercase;
|
||||
font-size: 4rem;
|
||||
font-weight: 100;
|
||||
line-height: 1.1;
|
||||
margin: 4rem auto;
|
||||
max-width: 14rem;
|
||||
}
|
||||
|
||||
p {
|
||||
max-width: 14rem;
|
||||
margin: 2rem auto;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
@media (min-width: 480px) {
|
||||
h1 {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
p {
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
22
examples/solidstart-1/src/app.tsx
Normal file
22
examples/solidstart-1/src/app.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { MetaProvider, Title } from "@solidjs/meta";
|
||||
import { Router } from "@solidjs/router";
|
||||
import { FileRoutes } from "@solidjs/start/router";
|
||||
import { Suspense } from "solid-js";
|
||||
import "./app.css";
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<Router
|
||||
root={props => (
|
||||
<MetaProvider>
|
||||
<Title>SolidStart - Basic</Title>
|
||||
<a href="/">Index</a>
|
||||
<a href="/about">About</a>
|
||||
<Suspense>{props.children}</Suspense>
|
||||
</MetaProvider>
|
||||
)}
|
||||
>
|
||||
<FileRoutes />
|
||||
</Router>
|
||||
);
|
||||
}
|
||||
20
examples/solidstart-1/src/components/Counter.css
Normal file
20
examples/solidstart-1/src/components/Counter.css
Normal file
@@ -0,0 +1,20 @@
|
||||
.increment {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
padding: 1em 2em;
|
||||
color: #335d92;
|
||||
background-color: rgba(68, 107, 158, 0.1);
|
||||
border-radius: 2em;
|
||||
border: 2px solid rgba(68, 107, 158, 0);
|
||||
outline: none;
|
||||
width: 200px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.increment:focus {
|
||||
border: 2px solid #335d92;
|
||||
}
|
||||
|
||||
.increment:active {
|
||||
background-color: rgba(68, 107, 158, 0.2);
|
||||
}
|
||||
12
examples/solidstart-1/src/components/Counter.tsx
Normal file
12
examples/solidstart-1/src/components/Counter.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
"use client";
|
||||
import { createSignal } from "solid-js";
|
||||
import "./Counter.css";
|
||||
|
||||
export default function Counter() {
|
||||
const [count, setCount] = createSignal(0);
|
||||
return (
|
||||
<button class="increment" onClick={() => setCount(count() + 1)}>
|
||||
Clicks: {count()}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
4
examples/solidstart-1/src/entry-client.tsx
Normal file
4
examples/solidstart-1/src/entry-client.tsx
Normal file
@@ -0,0 +1,4 @@
|
||||
// @refresh reload
|
||||
import { mount, StartClient } from "@solidjs/start/client";
|
||||
|
||||
mount(() => <StartClient />, document.getElementById("app")!);
|
||||
21
examples/solidstart-1/src/entry-server.tsx
Normal file
21
examples/solidstart-1/src/entry-server.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
// @refresh reload
|
||||
import { createHandler, StartServer } from "@solidjs/start/server";
|
||||
|
||||
export default createHandler(() => (
|
||||
<StartServer
|
||||
document={({ assets, children, scripts }) => (
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
{assets}
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">{children}</div>
|
||||
{scripts}
|
||||
</body>
|
||||
</html>
|
||||
)}
|
||||
/>
|
||||
));
|
||||
1
examples/solidstart-1/src/global.d.ts
vendored
Normal file
1
examples/solidstart-1/src/global.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/// <reference types="@solidjs/start/env" />
|
||||
19
examples/solidstart-1/src/routes/[...404].tsx
Normal file
19
examples/solidstart-1/src/routes/[...404].tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Title } from "@solidjs/meta";
|
||||
import { HttpStatusCode } from "@solidjs/start";
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<main>
|
||||
<Title>Not Found</Title>
|
||||
<HttpStatusCode code={404} />
|
||||
<h1>Page Not Found</h1>
|
||||
<p>
|
||||
Visit{" "}
|
||||
<a href="https://start.solidjs.com" target="_blank">
|
||||
start.solidjs.com
|
||||
</a>{" "}
|
||||
to learn how to build SolidStart apps.
|
||||
</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
19
examples/solidstart-1/src/routes/index.tsx
Normal file
19
examples/solidstart-1/src/routes/index.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Title } from "@solidjs/meta";
|
||||
import Counter from "~/components/Counter";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<main>
|
||||
<Title>Hello World</Title>
|
||||
<h1>Hello world!</h1>
|
||||
<Counter />
|
||||
<p>
|
||||
Visit{" "}
|
||||
<a href="https://start.solidjs.com" target="_blank">
|
||||
start.solidjs.com
|
||||
</a>{" "}
|
||||
to learn how to build SolidStart apps.
|
||||
</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
19
examples/solidstart-1/tsconfig.json
Normal file
19
examples/solidstart-1/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"jsx": "preserve",
|
||||
"jsxImportSource": "solid-js",
|
||||
"allowJs": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"types": ["vinxi/client"],
|
||||
"isolatedModules": true,
|
||||
"paths": {
|
||||
"~/*": ["./src/*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,26 @@
|
||||
# @vercel-internals/types
|
||||
|
||||
## 1.0.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`2826563ff`](https://github.com/vercel/vercel/commit/2826563ffab7ab01d3c85def2cad8c4041cd88b1)]:
|
||||
- @vercel/build-utils@7.12.0
|
||||
|
||||
## 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@vercel-internals/types",
|
||||
"version": "1.0.27",
|
||||
"version": "1.0.30",
|
||||
"types": "index.d.ts",
|
||||
"main": "index.d.ts",
|
||||
"files": [
|
||||
@@ -10,7 +10,7 @@
|
||||
"dependencies": {
|
||||
"@types/node": "14.14.31",
|
||||
"@vercel-internals/constants": "1.0.4",
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"@vercel/build-utils": "7.12.0",
|
||||
"@vercel/routing-utils": "3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"glob": "10.2.3",
|
||||
"husky": "7.0.4",
|
||||
"jest": "29.5.0",
|
||||
"json5": "2.1.1",
|
||||
"json5": "2.2.3",
|
||||
"lint-staged": "9.2.5",
|
||||
"node-fetch": "2.6.7",
|
||||
"npm-package-arg": "6.1.0",
|
||||
@@ -33,7 +33,7 @@
|
||||
"source-map-support": "0.5.12",
|
||||
"ts-eager": "2.0.2",
|
||||
"ts-jest": "29.1.0",
|
||||
"turbo": "1.12.5",
|
||||
"turbo": "1.13.2",
|
||||
"typescript": "4.9.5"
|
||||
},
|
||||
"scripts": {
|
||||
@@ -131,7 +131,8 @@
|
||||
"@typescript-eslint/member-delimiter-style": 0,
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
"@typescript-eslint/no-inferrable-types": 0
|
||||
"@typescript-eslint/no-inferrable-types": 0,
|
||||
"no-console": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
# @vercel/build-utils
|
||||
|
||||
## 7.12.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Trigger release ([#11465](https://github.com/vercel/vercel/pull/11465))
|
||||
|
||||
## 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vercel/build-utils",
|
||||
"version": "7.9.1",
|
||||
"version": "7.12.0",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.js",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Files, FunctionFramework } from './types';
|
||||
import type { Env, Files, FunctionFramework } from './types';
|
||||
|
||||
/**
|
||||
* An Edge Functions output
|
||||
@@ -23,6 +23,11 @@ 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.
|
||||
*/
|
||||
@@ -48,5 +53,6 @@ export class EdgeFunction {
|
||||
this.assets = params.assets;
|
||||
this.regions = params.regions;
|
||||
this.framework = params.framework;
|
||||
this.environment = params.environment;
|
||||
}
|
||||
}
|
||||
|
||||
22
packages/build-utils/src/get-installed-package-version.ts
Normal file
22
packages/build-utils/src/get-installed-package-version.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import debug from './debug';
|
||||
|
||||
export async function getInstalledPackageVersion(
|
||||
packageName: string,
|
||||
path?: string | string[]
|
||||
): Promise<string | undefined> {
|
||||
try {
|
||||
const resolved = require.resolve(`${packageName}/package.json`, {
|
||||
paths: path ? (Array.isArray(path) ? path : [path]) : [process.cwd()],
|
||||
});
|
||||
|
||||
const version: string = require(resolved).version;
|
||||
|
||||
return version;
|
||||
} catch (err) {
|
||||
debug(
|
||||
`Could not resolve package "${packageName}". Package is not installed.`,
|
||||
err
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
@@ -103,6 +103,7 @@ 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';
|
||||
@@ -110,3 +111,5 @@ export * from './types';
|
||||
export * from './errors';
|
||||
|
||||
export { NODE_VERSIONS } from './fs/node-version';
|
||||
|
||||
export { getInstalledPackageVersion } from './get-installed-package-version';
|
||||
|
||||
@@ -5,11 +5,7 @@ import minimatch from 'minimatch';
|
||||
import { readlink } from 'fs-extra';
|
||||
import { isSymbolicLink, isDirectory } from './fs/download';
|
||||
import streamToBuffer from './fs/stream-to-buffer';
|
||||
import type { Files, Config, FunctionFramework } from './types';
|
||||
|
||||
interface Environment {
|
||||
[key: string]: string;
|
||||
}
|
||||
import type { Config, Env, Files, FunctionFramework } from './types';
|
||||
|
||||
export type LambdaOptions = LambdaOptionsWithFiles | LambdaOptionsWithZipBuffer;
|
||||
|
||||
@@ -21,7 +17,7 @@ export interface LambdaOptionsBase {
|
||||
architecture?: LambdaArchitecture;
|
||||
memory?: number;
|
||||
maxDuration?: number;
|
||||
environment?: Environment;
|
||||
environment?: Env;
|
||||
allowQuery?: string[];
|
||||
regions?: string[];
|
||||
supportsMultiPayloads?: boolean;
|
||||
@@ -69,7 +65,7 @@ export class Lambda {
|
||||
architecture?: LambdaArchitecture;
|
||||
memory?: number;
|
||||
maxDuration?: number;
|
||||
environment: Environment;
|
||||
environment: Env;
|
||||
allowQuery?: string[];
|
||||
regions?: string[];
|
||||
/**
|
||||
|
||||
42
packages/build-utils/src/os.ts
Normal file
42
packages/build-utils/src/os.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
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,5 +3,8 @@
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"build": "mkdir -p public && (printf \"npm version: \" && npm -v) > public/index.txt"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,5 +5,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"once": "^1.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,5 +6,8 @@
|
||||
"dependencies": {
|
||||
"exeggcute": "^1.0.0",
|
||||
"once": "^1.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,5 +5,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"sharp": "0.33.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.x"
|
||||
}
|
||||
}
|
||||
|
||||
89
packages/build-utils/test/unit.get-os-release.test.ts
vendored
Normal file
89
packages/build-utils/test/unit.get-os-release.test.ts
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
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,5 +1,103 @@
|
||||
# vercel
|
||||
|
||||
## 34.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`f4c181a2c`](https://github.com/vercel/vercel/commit/f4c181a2c26b11afadf78e68baf1246a27240755), [`2826563ff`](https://github.com/vercel/vercel/commit/2826563ffab7ab01d3c85def2cad8c4041cd88b1)]:
|
||||
- @vercel/static-build@2.5.0
|
||||
- @vercel/build-utils@7.12.0
|
||||
- @vercel/node@3.0.27
|
||||
|
||||
## 34.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Don't propagate legacy env VERCEL_ANALYTICS_ID if @vercel/speed-insights package is detected ([#11305](https://github.com/vercel/vercel/pull/11305))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Replace console.log that communicates to user with client.output methods ([#11353](https://github.com/vercel/vercel/pull/11353))
|
||||
|
||||
- [cli] Do not pipe git stderr to user during successful `vc dev` run ([#11450](https://github.com/vercel/vercel/pull/11450))
|
||||
|
||||
- fix: Sort default team to the top of the selection list ([#11451](https://github.com/vercel/vercel/pull/11451))
|
||||
|
||||
- Updated dependencies [[`993a60ef7`](https://github.com/vercel/vercel/commit/993a60ef71d137955052255066bfc096e53630a1), [`949d84ad1`](https://github.com/vercel/vercel/commit/949d84ad1cdcd4f9ea44f8a165a193a488cb1a31), [`5bb96ea07`](https://github.com/vercel/vercel/commit/5bb96ea07289e7db66d28d08b372cf949f3d7e88), [`fd8031874`](https://github.com/vercel/vercel/commit/fd8031874300552b877329ec3f0798ec6706b630)]:
|
||||
- @vercel/next@4.2.1
|
||||
|
||||
## 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vercel",
|
||||
"version": "33.6.1",
|
||||
"version": "34.1.1",
|
||||
"preferGlobal": true,
|
||||
"license": "Apache-2.0",
|
||||
"description": "The command-line interface for Vercel",
|
||||
@@ -12,7 +12,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",
|
||||
"test-unit": "pnpm test test/unit/",
|
||||
"vitest-unit-run": "pnpm vitest",
|
||||
"vitest-unit": "pnpm jest test/unit/ --listTests",
|
||||
"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",
|
||||
@@ -31,22 +32,27 @@
|
||||
"node": ">= 16"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vercel/build-utils": "7.9.1",
|
||||
"@vercel/build-utils": "7.12.0",
|
||||
"@vercel/fun": "1.1.0",
|
||||
"@vercel/go": "3.0.5",
|
||||
"@vercel/go": "3.1.1",
|
||||
"@vercel/hydrogen": "1.0.2",
|
||||
"@vercel/next": "4.1.6",
|
||||
"@vercel/node": "3.0.24",
|
||||
"@vercel/next": "4.2.1",
|
||||
"@vercel/node": "3.0.27",
|
||||
"@vercel/python": "4.1.1",
|
||||
"@vercel/redwood": "2.0.8",
|
||||
"@vercel/remix-builder": "2.1.4",
|
||||
"@vercel/remix-builder": "2.1.5",
|
||||
"@vercel/ruby": "2.0.5",
|
||||
"@vercel/static-build": "2.4.4",
|
||||
"@vercel/static-build": "2.5.0",
|
||||
"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",
|
||||
@@ -63,7 +69,6 @@
|
||||
"@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",
|
||||
@@ -79,7 +84,6 @@
|
||||
"@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",
|
||||
@@ -88,12 +92,13 @@
|
||||
"@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.27",
|
||||
"@vercel/client": "13.1.7",
|
||||
"@vercel-internals/types": "1.0.30",
|
||||
"@vercel/client": "13.2.1",
|
||||
"@vercel/error-utils": "2.0.2",
|
||||
"@vercel/frameworks": "3.0.0",
|
||||
"@vercel/fs-detectors": "5.2.1",
|
||||
"@vercel/frameworks": "3.0.2",
|
||||
"@vercel/fs-detectors": "5.2.3",
|
||||
"@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",
|
||||
@@ -126,7 +131,6 @@
|
||||
"glob": "7.1.2",
|
||||
"http-proxy": "1.18.1",
|
||||
"ini": "3.0.0",
|
||||
"inquirer": "7.0.4",
|
||||
"is-docker": "2.2.1",
|
||||
"is-port-reachable": "3.1.0",
|
||||
"is-url": "1.2.2",
|
||||
@@ -158,13 +162,14 @@
|
||||
"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",
|
||||
"ts-node": "10.9.1",
|
||||
"universal-analytics": "0.4.20",
|
||||
"utility-types": "2.1.0",
|
||||
"vite": "5.1.6",
|
||||
"vitest": "1.3.1",
|
||||
"which": "3.0.0",
|
||||
"write-json-file": "2.2.0",
|
||||
"xdg-app-paths": "5.1.0",
|
||||
|
||||
@@ -53,17 +53,15 @@ export const aliasCommand: Command = {
|
||||
description: 'Show next page of results',
|
||||
argument: 'MS',
|
||||
shorthand: 'n',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'yes',
|
||||
description: 'Skip the confirmation prompt when removing an alias',
|
||||
shorthand: 'y',
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'limit',
|
||||
@@ -71,9 +69,8 @@ export const aliasCommand: Command = {
|
||||
description:
|
||||
'Number of results to return per page (default: 20, max: 100)',
|
||||
argument: 'NUMBER',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import table from 'text-table';
|
||||
import table from '../../util/output/table';
|
||||
import Client from '../../util/client';
|
||||
import getAliases from '../../util/alias/get-aliases';
|
||||
import getScope from '../../util/get-scope';
|
||||
@@ -9,7 +9,6 @@ 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';
|
||||
@@ -78,10 +77,6 @@ function printAliasTable(aliases: Alias[]) {
|
||||
ms(Date.now() - a.createdAt),
|
||||
]),
|
||||
],
|
||||
{
|
||||
align: ['l', 'l', 'r'],
|
||||
hsep: ' '.repeat(4),
|
||||
stringLength: strlen,
|
||||
}
|
||||
{ align: ['l', 'l', 'r'], hsep: 4 }
|
||||
).replace(/^/gm, ' ')}\n\n`;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import table from 'text-table';
|
||||
import table from '../../util/output/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';
|
||||
|
||||
@@ -64,11 +63,7 @@ export default async function rm(
|
||||
}
|
||||
|
||||
await removeAliasById(client, alias.uid);
|
||||
console.log(
|
||||
`${chalk.cyan('> Success!')} Alias ${chalk.bold(
|
||||
alias.alias
|
||||
)} removed ${removeStamp()}`
|
||||
);
|
||||
output.success(`Alias ${chalk.bold(alias.alias)} removed ${removeStamp()}`);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -84,11 +79,7 @@ async function confirmAliasRemove(client: Client, alias: Alias) {
|
||||
chalk.gray(`${ms(Date.now() - alias.createdAt)} ago`),
|
||||
],
|
||||
],
|
||||
{
|
||||
align: ['l', 'l', 'r'],
|
||||
hsep: ' '.repeat(4),
|
||||
stringLength: strlen,
|
||||
}
|
||||
{ hsep: 4 }
|
||||
);
|
||||
|
||||
client.output.log(`The following alias will be removed permanently`);
|
||||
|
||||
@@ -123,8 +123,8 @@ export default async function set(
|
||||
return 1;
|
||||
}
|
||||
|
||||
console.log(
|
||||
`${chalk.cyan('> Success!')} ${chalk.bold(
|
||||
output.success(
|
||||
`${chalk.bold(
|
||||
`${isWildcardAlias(target) ? '' : 'https://'}${handleResult.alias}`
|
||||
)} now points to https://${deployment.url} ${setStamp()}`
|
||||
);
|
||||
@@ -170,10 +170,10 @@ export default async function set(
|
||||
|
||||
const prefix = isWildcard ? '' : 'https://';
|
||||
|
||||
console.log(
|
||||
`${chalk.cyan('> Success!')} ${chalk.bold(
|
||||
`${prefix}${handleResult.alias}`
|
||||
)} now points to https://${deployment.url} ${setStamp()}`
|
||||
output.success(
|
||||
`${chalk.bold(`${prefix}${handleResult.alias}`)} now points to https://${
|
||||
deployment.url
|
||||
} ${setStamp()}`
|
||||
);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -11,45 +11,40 @@ export const bisectCommand: Command = {
|
||||
description: 'Known bad URL',
|
||||
argument: 'URL',
|
||||
shorthand: 'b',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'good',
|
||||
description: 'Known good URL',
|
||||
argument: 'URL',
|
||||
shorthand: 'g',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'open',
|
||||
description: 'Automatically open each URL in the browser',
|
||||
argument: 'URL',
|
||||
shorthand: 'o',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'path',
|
||||
description: 'Subpath of the deployment URL to test',
|
||||
argument: 'URL',
|
||||
shorthand: 'p',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'run',
|
||||
description: 'Test script to run for each deployment',
|
||||
argument: 'URL',
|
||||
shorthand: 'r',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
@@ -45,10 +45,16 @@ export default async function bisect(client: Client): Promise<number> {
|
||||
|
||||
let bad =
|
||||
argv['--bad'] ||
|
||||
(await prompt(client, `Specify a URL where the bug occurs:`));
|
||||
(await client.input.text({
|
||||
message: `Specify a URL where the bug occurs:`,
|
||||
validate: val => (val ? true : 'A URL must be provided'),
|
||||
}));
|
||||
let good =
|
||||
argv['--good'] ||
|
||||
(await prompt(client, `Specify a URL where the bug does not occur:`));
|
||||
(await client.input.text({
|
||||
message: `Specify a URL where the bug does not occur:`,
|
||||
validate: val => (val ? true : 'A URL must be provided'),
|
||||
}));
|
||||
let subpath = argv['--path'] || '';
|
||||
let run = argv['--run'] || '';
|
||||
const openEnabled = argv['--open'] || false;
|
||||
@@ -97,10 +103,10 @@ export default async function bisect(client: Client): Promise<number> {
|
||||
}
|
||||
|
||||
if (!subpath) {
|
||||
subpath = await prompt(
|
||||
client,
|
||||
`Specify the URL subpath where the bug occurs:`
|
||||
);
|
||||
subpath = await client.input.text({
|
||||
message: `Specify the URL subpath where the bug occurs:`,
|
||||
validate: val => (val ? true : 'A subpath must be provided'),
|
||||
});
|
||||
}
|
||||
|
||||
output.spinner('Retrieving deployments…');
|
||||
@@ -278,9 +284,7 @@ export default async function bisect(client: Client): Promise<number> {
|
||||
if (openEnabled) {
|
||||
await open(testUrl);
|
||||
}
|
||||
const answer = await client.prompt({
|
||||
type: 'expand',
|
||||
name: 'action',
|
||||
action = await client.input.expand({
|
||||
message: 'Select an action:',
|
||||
choices: [
|
||||
{ key: 'g', name: 'Good', value: 'good' },
|
||||
@@ -288,7 +292,6 @@ export default async function bisect(client: Client): Promise<number> {
|
||||
{ key: 's', name: 'Skip', value: 'skip' },
|
||||
],
|
||||
});
|
||||
action = answer.action;
|
||||
}
|
||||
|
||||
if (action === 'good') {
|
||||
@@ -338,19 +341,3 @@ 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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,27 +10,24 @@ export const buildCommand: Command = {
|
||||
name: 'prod',
|
||||
description: 'Build a production deployment',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'output',
|
||||
description: 'Directory where built assets should be written to',
|
||||
shorthand: null,
|
||||
argument: 'PATH',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'yes',
|
||||
description:
|
||||
'Skip the confirmation prompt about pulling environment variables and project settings when not found locally',
|
||||
shorthand: 'y',
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import fs, { readJSON } from 'fs-extra';
|
||||
import fs from 'fs-extra';
|
||||
import chalk from 'chalk';
|
||||
import dotenv from 'dotenv';
|
||||
import semver from 'semver';
|
||||
import minimatch from 'minimatch';
|
||||
import { join, normalize, relative, resolve, sep } from 'path';
|
||||
import frameworks from '@vercel/frameworks';
|
||||
import { frameworkList } from '@vercel/frameworks';
|
||||
import {
|
||||
getDiscontinuedNodeVersions,
|
||||
normalizePath,
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
Cron,
|
||||
validateNpmrc,
|
||||
type FlagDefinitions,
|
||||
getInstalledPackageVersion,
|
||||
} from '@vercel/build-utils';
|
||||
import {
|
||||
detectBuilders,
|
||||
@@ -71,7 +72,6 @@ import { setMonorepoDefaultSettings } from '../../util/build/monorepo';
|
||||
import { help } from '../help';
|
||||
import { buildCommand } from './command';
|
||||
import { scrubArgv } from '../../util/build/scrub-argv';
|
||||
import { cwd } from 'process';
|
||||
|
||||
type BuildResult = BuildResultV2 | BuildResultV3;
|
||||
|
||||
@@ -253,8 +253,11 @@ export default async function main(client: Client): Promise<number> {
|
||||
output.debug(`Loaded environment variables from "${envPath}"`);
|
||||
}
|
||||
|
||||
// For Vercel Legacy speed Insights support
|
||||
// For legacy Speed Insights
|
||||
if (project.settings.analyticsId) {
|
||||
// we pass the env down to the builder
|
||||
// inside the builder we decide if we want to keep it or not
|
||||
|
||||
envToUnset.add('VERCEL_ANALYTICS_ID');
|
||||
process.env.VERCEL_ANALYTICS_ID = project.settings.analyticsId;
|
||||
}
|
||||
@@ -386,9 +389,7 @@ async function doBuild(
|
||||
}
|
||||
|
||||
for (const w of detectedBuilders.warnings) {
|
||||
console.log(
|
||||
`Warning: ${w.message} ${w.action || 'Learn More'}: ${w.link}`
|
||||
);
|
||||
output.warn(w.message, null, w.link, w.action || 'Learn More');
|
||||
}
|
||||
|
||||
if (detectedBuilders.builders) {
|
||||
@@ -469,7 +470,7 @@ async function doBuild(
|
||||
const buildResults: Map<Builder, BuildResult | BuildOutputConfig> = new Map();
|
||||
const overrides: PathOverride[] = [];
|
||||
const repoRootPath = cwd;
|
||||
const corepackShimDir = await initCorepack({ repoRootPath });
|
||||
const corepackShimDir = await initCorepack({ repoRootPath }, output);
|
||||
|
||||
for (const build of sortedBuilders) {
|
||||
if (typeof build.src !== 'string') continue;
|
||||
@@ -586,8 +587,7 @@ async function doBuild(
|
||||
}
|
||||
|
||||
let needBuildsJsonOverride = false;
|
||||
const speedInsightsVersion = await readInstalledVersion(
|
||||
client,
|
||||
const speedInsightsVersion = await getInstalledPackageVersion(
|
||||
'@vercel/speed-insights'
|
||||
);
|
||||
if (speedInsightsVersion) {
|
||||
@@ -597,8 +597,7 @@ async function doBuild(
|
||||
};
|
||||
needBuildsJsonOverride = true;
|
||||
}
|
||||
const webAnalyticsVersion = await readInstalledVersion(
|
||||
client,
|
||||
const webAnalyticsVersion = await getInstalledPackageVersion(
|
||||
'@vercel/analytics'
|
||||
);
|
||||
if (webAnalyticsVersion) {
|
||||
@@ -695,7 +694,7 @@ async function getFramework(
|
||||
): Promise<{ version: string } | undefined> {
|
||||
const detectedFramework = await detectFrameworkRecord({
|
||||
fs: new LocalFileSystemDetector(cwd),
|
||||
frameworkList: frameworks,
|
||||
frameworkList,
|
||||
});
|
||||
|
||||
if (!detectedFramework) {
|
||||
@@ -861,21 +860,3 @@ async function writeFlagsJSON(
|
||||
async function writeBuildJson(buildsJson: BuildsManifest, outputDir: string) {
|
||||
await fs.writeJSON(join(outputDir, 'builds.json'), buildsJson, { spaces: 2 });
|
||||
}
|
||||
|
||||
export async function readInstalledVersion(
|
||||
{ output }: Client,
|
||||
pkgName: string
|
||||
): Promise<string | undefined> {
|
||||
try {
|
||||
const descriptorPath = require.resolve(`${pkgName}/package.json`, {
|
||||
paths: [cwd()],
|
||||
});
|
||||
const descriptor = await readJSON(descriptorPath);
|
||||
return descriptor?.version;
|
||||
} catch (err) {
|
||||
output.debug(
|
||||
`Package ${pkgName} is not installed (failed to read its package.json: ${err})`
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -49,36 +49,32 @@ export const certsCommand: Command = {
|
||||
name: 'challenge-only',
|
||||
description: 'Only show challenges needed to issue a cert',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'crt',
|
||||
description: 'Certificate file',
|
||||
argument: 'FILE',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'key',
|
||||
description: 'Certificate key file',
|
||||
argument: 'FILE',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'ca',
|
||||
description: 'CA certificate chain file',
|
||||
argument: 'FILE',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'limit',
|
||||
@@ -86,17 +82,15 @@ export const certsCommand: Command = {
|
||||
'Number of results to return per page (default: 20, max: 100)',
|
||||
argument: 'VALUE',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'next',
|
||||
description: 'Show next page of results',
|
||||
shorthand: 'n',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import table from 'text-table';
|
||||
import table from '../../util/output/table';
|
||||
import Client from '../../util/client';
|
||||
import getScope from '../../util/get-scope';
|
||||
import {
|
||||
@@ -9,7 +9,6 @@ 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';
|
||||
@@ -70,11 +69,7 @@ async function ls(
|
||||
function formatCertsTable(certsList: Cert[]) {
|
||||
return `${table(
|
||||
[formatCertsTableHead(), ...formatCertsTableBody(certsList)],
|
||||
{
|
||||
align: ['l', 'l', 'r', 'c', 'r'],
|
||||
hsep: ' '.repeat(2),
|
||||
stringLength: strlen,
|
||||
}
|
||||
{ align: ['l', 'l', 'r', 'c', 'r'], hsep: 2 }
|
||||
).replace(/^(.*)/gm, ' $1')}\n`;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import plural from 'pluralize';
|
||||
import table from 'text-table';
|
||||
import table from '../../util/output/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: ' '.repeat(6),
|
||||
hsep: 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 => {
|
||||
|
||||
@@ -14,147 +14,130 @@ export const deployCommand: Command = {
|
||||
{
|
||||
name: 'force',
|
||||
shorthand: 'f',
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
description: 'Force a new deployment even if nothing has changed',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'with-cache',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
description: 'Retain build cache when using "--force"',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'public',
|
||||
shorthand: 'p',
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
description: 'Deployment is public (`/_src`) is exposed)',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'env',
|
||||
shorthand: 'e',
|
||||
type: 'string',
|
||||
type: [String],
|
||||
argument: 'key=value',
|
||||
deprecated: false,
|
||||
multi: true,
|
||||
description:
|
||||
'Specify environment variables during run-time (e.g. `-e KEY1=value1 -e KEY2=value2`)',
|
||||
},
|
||||
{
|
||||
name: 'build-env',
|
||||
shorthand: 'b',
|
||||
type: 'string',
|
||||
type: [String],
|
||||
argument: 'key=value',
|
||||
deprecated: false,
|
||||
multi: true,
|
||||
description:
|
||||
'Specify environment variables during build-time (e.g. `-b KEY1=value1 -b KEY2=value2`)',
|
||||
},
|
||||
{
|
||||
name: 'meta',
|
||||
shorthand: 'm',
|
||||
type: 'string',
|
||||
type: [String],
|
||||
argument: 'key=value',
|
||||
deprecated: false,
|
||||
multi: true,
|
||||
description:
|
||||
'Specify metadata for the deployment (e.g. `-m KEY1=value1 -m KEY2=value2`)',
|
||||
},
|
||||
{
|
||||
name: 'regions',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
description: 'Set default regions to enable the deployment on',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'prebuilt',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
description:
|
||||
'Use in combination with `vc build`. Deploy an existing build',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'prod',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
description: 'Create a production deployment',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'archive',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
description:
|
||||
'Compress the deployment code into a file before uploading it',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'no-wait',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
description: "Don't wait for the deployment to finish",
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'skip-domain',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
description:
|
||||
'Disable the automatic promotion (aliasing) of the relevant domains to a new production deployment. You can use `vc promote` to complete the domain-assignment process later',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'yes',
|
||||
shorthand: 'y',
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
description: 'Use default options to skip all prompts',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
shorthand: 'n',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: true,
|
||||
description: 'Provide a Vercel Project name',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'no-clipboard',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: true,
|
||||
description: 'Do not copy deployment URL to clipboard',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'target',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: true,
|
||||
description: 'Specify the target deployment environment',
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'confirm',
|
||||
shorthand: 'c',
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: true,
|
||||
description: 'Use default options to skip all prompts',
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
@@ -47,8 +47,9 @@ import {
|
||||
TooManyRequests,
|
||||
UserAborted,
|
||||
} from '../../util/errors-ts';
|
||||
import getArgs from '../../util/get-args';
|
||||
import { parseArguments } from '../../util/get-args';
|
||||
import getDeployment from '../../util/get-deployment';
|
||||
import { getFlagsSpecification } from '../../util/get-flags-specification';
|
||||
import getProjectName from '../../util/get-project-name';
|
||||
import toHumanPath from '../../util/humanize-path';
|
||||
import confirm from '../../util/input/confirm';
|
||||
@@ -78,56 +79,36 @@ import { deployCommand } from './command';
|
||||
export default async (client: Client): Promise<number> => {
|
||||
const { output } = client;
|
||||
|
||||
let argv = null;
|
||||
let parsedArguments = null;
|
||||
|
||||
const argOptions: {
|
||||
[k: string]:
|
||||
| BooleanConstructor
|
||||
| StringConstructor
|
||||
| string
|
||||
| [StringConstructor];
|
||||
} = {};
|
||||
for (const option of deployCommand.options) {
|
||||
argOptions[`--${option.name}`] =
|
||||
option.type === 'boolean' ? Boolean : String;
|
||||
if (option.shorthand) {
|
||||
argOptions[`-${option.shorthand}`] = `--${option.name}`;
|
||||
}
|
||||
if (
|
||||
option.name === 'env' ||
|
||||
option.name === 'build-env' ||
|
||||
option.name === 'meta'
|
||||
) {
|
||||
argOptions[`--${option.name}`] = [String];
|
||||
}
|
||||
}
|
||||
const flagsSpecification = getFlagsSpecification(deployCommand.options);
|
||||
|
||||
try {
|
||||
argv = getArgs(client.argv.slice(2), argOptions);
|
||||
parsedArguments = parseArguments(client.argv.slice(2), flagsSpecification);
|
||||
|
||||
if ('--confirm' in argv) {
|
||||
if ('--confirm' in parsedArguments.flags) {
|
||||
output.warn('`--confirm` is deprecated, please use `--yes` instead');
|
||||
argv['--yes'] = argv['--confirm'];
|
||||
parsedArguments.flags['--yes'] = parsedArguments.flags['--confirm'];
|
||||
}
|
||||
} catch (error) {
|
||||
handleError(error);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (argv['--help']) {
|
||||
if (parsedArguments.flags['--help']) {
|
||||
output.print(help(deployCommand, { columns: client.stderr.columns }));
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (argv._[0] === 'deploy') {
|
||||
argv._.shift();
|
||||
if (parsedArguments.args[0] === 'deploy') {
|
||||
parsedArguments.args.shift();
|
||||
}
|
||||
|
||||
let paths;
|
||||
if (argv._.length > 0) {
|
||||
if (parsedArguments.args.length > 0) {
|
||||
// If path is relative: resolve
|
||||
// if path is absolute: clear up strange `/` etc
|
||||
paths = argv._.map(item => resolve(client.cwd, item));
|
||||
paths = parsedArguments.args.map(item => resolve(client.cwd, item));
|
||||
} else {
|
||||
paths = [client.cwd];
|
||||
}
|
||||
@@ -169,10 +150,10 @@ export default async (client: Client): Promise<number> => {
|
||||
const quiet = !client.stdout.isTTY;
|
||||
|
||||
let { path: cwd } = pathValidation;
|
||||
const autoConfirm = argv['--yes'];
|
||||
const autoConfirm = parsedArguments.flags['--yes'];
|
||||
|
||||
// deprecate --name
|
||||
if (argv['--name']) {
|
||||
if (parsedArguments.flags['--name']) {
|
||||
output.print(
|
||||
`${prependEmoji(
|
||||
`The ${param(
|
||||
@@ -183,7 +164,7 @@ export default async (client: Client): Promise<number> => {
|
||||
);
|
||||
}
|
||||
|
||||
if (argv['--no-clipboard']) {
|
||||
if (parsedArguments.flags['--no-clipboard']) {
|
||||
output.print(
|
||||
`${prependEmoji(
|
||||
`The ${param(
|
||||
@@ -195,12 +176,16 @@ export default async (client: Client): Promise<number> => {
|
||||
}
|
||||
|
||||
// build `target`
|
||||
const target = parseTarget(output, argv['--target'], argv['--prod']);
|
||||
const target = parseTarget(
|
||||
output,
|
||||
parsedArguments.flags['--target'],
|
||||
parsedArguments.flags['--prod']
|
||||
);
|
||||
if (typeof target === 'number') {
|
||||
return target;
|
||||
}
|
||||
|
||||
const archive = argv['--archive'];
|
||||
const archive = parsedArguments.flags['--archive'];
|
||||
if (typeof archive === 'string' && !isValidArchive(archive)) {
|
||||
output.error(`Format must be one of: ${VALID_ARCHIVE_FORMATS.join(', ')}`);
|
||||
return 1;
|
||||
@@ -257,7 +242,7 @@ export default async (client: Client): Promise<number> => {
|
||||
// will be deprecated and can be replaced with
|
||||
// user input.
|
||||
const detectedProjectName = getProjectName({
|
||||
argv,
|
||||
argv: parsedArguments.flags,
|
||||
nowConfig: localConfig,
|
||||
paths,
|
||||
});
|
||||
@@ -303,7 +288,10 @@ export default async (client: Client): Promise<number> => {
|
||||
}
|
||||
|
||||
// build `--prebuilt`
|
||||
if (argv['--prebuilt']) {
|
||||
let vercelOutputDir: string | undefined;
|
||||
if (parsedArguments.flags['--prebuilt']) {
|
||||
vercelOutputDir = join(cwd, '.vercel/output');
|
||||
|
||||
// For repo-style linking, update `cwd` to be the Project
|
||||
// subdirectory when `rootDirectory` setting is defined
|
||||
if (
|
||||
@@ -311,10 +299,10 @@ export default async (client: Client): Promise<number> => {
|
||||
link.repoRoot &&
|
||||
link.project.rootDirectory
|
||||
) {
|
||||
cwd = join(cwd, link.project.rootDirectory);
|
||||
vercelOutputDir = join(cwd, link.project.rootDirectory, '.vercel/output');
|
||||
}
|
||||
|
||||
const prebuiltExists = await fs.pathExists(join(cwd, '.vercel/output'));
|
||||
const prebuiltExists = await fs.pathExists(vercelOutputDir);
|
||||
if (!prebuiltExists) {
|
||||
error(
|
||||
`The ${param(
|
||||
@@ -326,7 +314,7 @@ export default async (client: Client): Promise<number> => {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const prebuiltBuild = await getPrebuiltJson(cwd);
|
||||
const prebuiltBuild = await getPrebuiltJson(vercelOutputDir);
|
||||
|
||||
// Ensure that there was not a build error
|
||||
const prebuiltError =
|
||||
@@ -464,7 +452,7 @@ export default async (client: Client): Promise<number> => {
|
||||
const meta = Object.assign(
|
||||
{},
|
||||
parseMeta(localConfig.meta),
|
||||
parseMeta(argv['--meta'])
|
||||
parseMeta(parsedArguments.flags['--meta'])
|
||||
);
|
||||
|
||||
const gitMetadata = await createGitMeta(cwd, output, project);
|
||||
@@ -473,14 +461,14 @@ export default async (client: Client): Promise<number> => {
|
||||
const deploymentEnv = Object.assign(
|
||||
{},
|
||||
parseEnv(localConfig.env),
|
||||
parseEnv(argv['--env'])
|
||||
parseEnv(parsedArguments.flags['--env'])
|
||||
);
|
||||
|
||||
// Merge build env out of `build.env` from vercel.json, and `--build-env` args
|
||||
const deploymentBuildEnv = Object.assign(
|
||||
{},
|
||||
parseEnv(localConfig.build && localConfig.build.env),
|
||||
parseEnv(argv['--build-env'])
|
||||
parseEnv(parsedArguments.flags['--build-env'])
|
||||
);
|
||||
|
||||
// If there's any undefined values, then inherit them from this process
|
||||
@@ -493,7 +481,7 @@ export default async (client: Client): Promise<number> => {
|
||||
}
|
||||
|
||||
// build `regions`
|
||||
const regionFlag = (argv['--regions'] || '')
|
||||
const regionFlag = (parsedArguments.flags['--regions'] || '')
|
||||
.split(',')
|
||||
.map((s: string) => s.trim())
|
||||
.filter(Boolean);
|
||||
@@ -506,7 +494,7 @@ export default async (client: Client): Promise<number> => {
|
||||
});
|
||||
let deployStamp = stamp();
|
||||
let deployment = null;
|
||||
const noWait = !!argv['--no-wait'];
|
||||
const noWait = !!parsedArguments.flags['--no-wait'];
|
||||
|
||||
const localConfigurationOverrides = pickOverrides(localConfig);
|
||||
|
||||
@@ -517,37 +505,25 @@ export default async (client: Client): Promise<number> => {
|
||||
);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// if this flag is not set, use `undefined` to allow the project setting to be used
|
||||
const autoAssignCustomDomains = argv['--skip-domain'] ? false : undefined;
|
||||
const autoAssignCustomDomains = parsedArguments.flags['--skip-domain']
|
||||
? false
|
||||
: undefined;
|
||||
|
||||
const createArgs: CreateOptions = {
|
||||
name,
|
||||
env: deploymentEnv,
|
||||
build: { env: deploymentBuildEnv },
|
||||
forceNew: argv['--force'],
|
||||
withCache: argv['--with-cache'],
|
||||
prebuilt: argv['--prebuilt'],
|
||||
forceNew: parsedArguments.flags['--force'],
|
||||
withCache: parsedArguments.flags['--with-cache'],
|
||||
prebuilt: parsedArguments.flags['--prebuilt'],
|
||||
vercelOutputDir,
|
||||
rootDirectory,
|
||||
quiet,
|
||||
wantsPublic: Boolean(argv['--public'] || localConfig.public),
|
||||
wantsPublic: Boolean(
|
||||
parsedArguments.flags['--public'] || localConfig.public
|
||||
),
|
||||
nowConfig: {
|
||||
...localConfig,
|
||||
// `images` is allowed in "vercel.json" and processed
|
||||
@@ -569,10 +545,9 @@ export default async (client: Client): Promise<number> => {
|
||||
createArgs.projectSettings = {
|
||||
sourceFilesOutsideRootDirectory,
|
||||
rootDirectory,
|
||||
nodeVersion,
|
||||
};
|
||||
|
||||
if (status !== 'not_linked') {
|
||||
if (status === 'linked') {
|
||||
createArgs.projectSettings = {
|
||||
...createArgs.projectSettings,
|
||||
...localConfigurationOverrides,
|
||||
@@ -580,6 +555,30 @@ 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,
|
||||
|
||||
@@ -16,9 +16,8 @@ export const devCommand: Command = {
|
||||
description: 'Specify a URI endpoint on which to listen [0.0.0.0:3000]',
|
||||
argument: 'uri',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
@@ -85,12 +85,10 @@ export default async function add(
|
||||
return 1;
|
||||
}
|
||||
|
||||
console.log(
|
||||
`${chalk.cyan('> Success!')} DNS record for domain ${chalk.bold(
|
||||
domain
|
||||
)} ${chalk.gray(`(${record.uid})`)} created under ${chalk.bold(
|
||||
contextName
|
||||
)} ${chalk.gray(addStamp())}`
|
||||
output.success(
|
||||
`DNS record for domain ${chalk.bold(domain)} ${chalk.gray(
|
||||
`(${record.uid})`
|
||||
)} created under ${chalk.bold(contextName)} ${chalk.gray(addStamp())}`
|
||||
);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -74,9 +74,8 @@ export const dnsCommand: Command = {
|
||||
description: 'Show next page of results',
|
||||
argument: 'MS',
|
||||
shorthand: 'n',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'limit',
|
||||
@@ -84,9 +83,8 @@ export const dnsCommand: Command = {
|
||||
description:
|
||||
'Number of results to return per page (default: 20, max: 100)',
|
||||
argument: 'NUMBER',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
@@ -52,12 +52,10 @@ export default async function add(
|
||||
return 1;
|
||||
}
|
||||
|
||||
console.log(
|
||||
`${chalk.cyan('> Success!')} ${
|
||||
recordIds.length
|
||||
} DNS records for domain ${chalk.bold(domain)} created under ${chalk.bold(
|
||||
contextName
|
||||
)} ${chalk.gray(addStamp())}`
|
||||
output.success(
|
||||
`${recordIds.length} DNS records for domain ${chalk.bold(
|
||||
domain
|
||||
)} created under ${chalk.bold(contextName)} ${chalk.gray(addStamp())}`
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import chalk from 'chalk';
|
||||
import ms from 'ms';
|
||||
import table from 'text-table';
|
||||
import table from '../../util/output/table';
|
||||
import type { DNSRecord } from '@vercel-internals/types';
|
||||
import { Output } from '../../util/output';
|
||||
import Client from '../../util/client';
|
||||
@@ -52,10 +52,8 @@ export default async function rm(
|
||||
|
||||
const rmStamp = stamp();
|
||||
await deleteDNSRecordById(client, domainName, record.id);
|
||||
console.log(
|
||||
`${chalk.cyan('> Success!')} Record ${chalk.gray(
|
||||
`${record.id}`
|
||||
)} removed ${chalk.gray(rmStamp())}`
|
||||
output.success(
|
||||
`Record ${chalk.gray(`${record.id}`)} removed ${chalk.gray(rmStamp())}`
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
@@ -71,11 +69,11 @@ function readConfirmation(
|
||||
output.print(
|
||||
`${table([getDeleteTableRow(domainName, record)], {
|
||||
align: ['l', 'r', 'l'],
|
||||
hsep: ' '.repeat(6),
|
||||
hsep: 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 => {
|
||||
|
||||
@@ -87,10 +87,10 @@ export default async function add(
|
||||
}
|
||||
|
||||
// We can cast the information because we've just added the domain and it should be there
|
||||
console.log(
|
||||
`${chalk.cyan('> Success!')} Domain ${chalk.bold(
|
||||
domainName
|
||||
)} added to project ${chalk.bold(projectName)}. ${addStamp()}`
|
||||
output.success(
|
||||
`Domain ${chalk.bold(domainName)} added to project ${chalk.bold(
|
||||
projectName
|
||||
)}. ${addStamp()}`
|
||||
);
|
||||
|
||||
if (isPublicSuffix(domainName)) {
|
||||
|
||||
@@ -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 promptBool from '../../util/input/prompt-bool';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import purchaseDomain from '../../util/domains/purchase-domain';
|
||||
import stamp from '../../util/output/stamp';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
@@ -86,23 +86,25 @@ export default async function buy(
|
||||
autoRenew = true;
|
||||
} else {
|
||||
if (
|
||||
!(await promptBool(
|
||||
!(await confirm(
|
||||
client,
|
||||
`Buy now for ${chalk.bold(`$${price}`)} (${`${period}yr${
|
||||
period > 1 ? 's' : ''
|
||||
}`})?`,
|
||||
client
|
||||
false
|
||||
))
|
||||
) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
autoRenew = await promptBool(
|
||||
autoRenew = await confirm(
|
||||
client,
|
||||
renewalPrice.period === 1
|
||||
? `Auto renew yearly for ${chalk.bold(`$${price}`)}?`
|
||||
: `Auto renew every ${renewalPrice.period} years for ${chalk.bold(
|
||||
`$${price}`
|
||||
)}?`,
|
||||
{ ...client, defaultValue: true }
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
@@ -164,10 +166,8 @@ export default async function buy(
|
||||
}
|
||||
|
||||
if (buyResult.pending) {
|
||||
console.log(
|
||||
`${chalk.cyan('> Success!')} Domain ${param(
|
||||
domainName
|
||||
)} order was submitted ${purchaseStamp()}`
|
||||
output.success(
|
||||
`Domain ${param(domainName)} order was submitted ${purchaseStamp()}`
|
||||
);
|
||||
output.note(
|
||||
`Your domain is processing and will be available once the order is completed.`
|
||||
@@ -176,11 +176,7 @@ export default async function buy(
|
||||
` An email will be sent upon completion for you to start using your new domain.\n`
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
`${chalk.cyan('> Success!')} Domain ${param(
|
||||
domainName
|
||||
)} purchased ${purchaseStamp()}`
|
||||
);
|
||||
output.success(`Domain ${param(domainName)} purchased ${purchaseStamp()}`);
|
||||
if (!buyResult.verified) {
|
||||
output.note(
|
||||
`Your domain is not fully configured yet so it may appear as not verified.`
|
||||
|
||||
@@ -104,17 +104,15 @@ export const domainsCommand: Command = {
|
||||
name: 'next',
|
||||
description: 'Show next page of results',
|
||||
shorthand: 'N',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'yes',
|
||||
description: 'Skip the confirmation prompt when removing a domain',
|
||||
shorthand: 'y',
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'limit',
|
||||
@@ -122,18 +120,16 @@ export const domainsCommand: Command = {
|
||||
description:
|
||||
'Number of results to return per page (default: 20, max: 100)',
|
||||
argument: 'NUMBER',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'force',
|
||||
shorthand: 'f',
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
description:
|
||||
'Force a domain on a project and remove it from an existing one',
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
@@ -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 promptBool from '../../util/input/prompt-bool';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import getTeams from '../../util/teams/get-teams';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
|
||||
@@ -67,11 +67,12 @@ export default async function move(
|
||||
)} will have 24 hours to accept your move request before it expires.`
|
||||
);
|
||||
if (
|
||||
!(await promptBool(
|
||||
!(await confirm(
|
||||
client,
|
||||
`Are you sure you want to move ${param(domainName)} to ${param(
|
||||
destination
|
||||
)}?`,
|
||||
client
|
||||
false
|
||||
))
|
||||
) {
|
||||
output.log('Canceled');
|
||||
@@ -88,9 +89,10 @@ export default async function move(
|
||||
)} will be removed. Run ${getCommandName(`alias ls`)} to list them.`
|
||||
);
|
||||
if (
|
||||
!(await promptBool(
|
||||
!(await confirm(
|
||||
client,
|
||||
`Are you sure you want to move ${param(domainName)}?`,
|
||||
client
|
||||
false
|
||||
))
|
||||
) {
|
||||
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 promptBool from '../../util/input/prompt-bool';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import setCustomSuffix from '../../util/domains/set-custom-suffix';
|
||||
import { findProjectsForDomain } from '../../util/projects/find-projects-for-domain';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
@@ -81,9 +81,10 @@ export default async function rm(
|
||||
const skipConfirmation = opts['--yes'] || false;
|
||||
if (
|
||||
!skipConfirmation &&
|
||||
!(await promptBool(
|
||||
!(await confirm(
|
||||
client,
|
||||
`Are you sure you want to remove ${param(domainName)}?`,
|
||||
client
|
||||
false
|
||||
))
|
||||
) {
|
||||
output.log('Canceled');
|
||||
@@ -222,7 +223,11 @@ async function removeDomain(
|
||||
|
||||
if (
|
||||
!skipConfirmation &&
|
||||
!(await promptBool(`Remove conflicts associated with domain?`, client))
|
||||
!(await confirm(
|
||||
client,
|
||||
`Remove conflicts associated with domain?`,
|
||||
false
|
||||
))
|
||||
) {
|
||||
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 promptBool from '../../util/input/prompt-bool';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import isRootDomain from '../../util/is-root-domain';
|
||||
import { getCommandName } from '../../util/pkg-name';
|
||||
|
||||
@@ -67,11 +67,12 @@ export default async function transferIn(
|
||||
|
||||
const authCode = await getAuthCode(opts['--code']);
|
||||
|
||||
const shouldTransfer = await promptBool(
|
||||
const shouldTransfer = await confirm(
|
||||
client,
|
||||
transferPolicy === 'no-change'
|
||||
? `Transfer now for ${chalk.bold(`$${price}`)}?`
|
||||
: `Transfer now with 1yr renewal for ${chalk.bold(`$${price}`)}?`,
|
||||
client
|
||||
false
|
||||
);
|
||||
if (!shouldTransfer) {
|
||||
return 0;
|
||||
@@ -121,10 +122,8 @@ export default async function transferIn(
|
||||
return 1;
|
||||
}
|
||||
|
||||
console.log(
|
||||
`${chalk.cyan('> Success!')} Domain ${param(
|
||||
domainName
|
||||
)} transfer started ${transferStamp()}`
|
||||
output.success(
|
||||
`Domain ${param(domainName)} transfer started ${transferStamp()}`
|
||||
);
|
||||
output.print(
|
||||
` To finalize the transfer, we are waiting for approval from your current registrar.\n`
|
||||
|
||||
48
packages/cli/src/commands/env/add.ts
vendored
48
packages/cli/src/commands/env/add.ts
vendored
@@ -20,6 +20,7 @@ import { isAPIError } from '../../util/errors-ts';
|
||||
type Options = {
|
||||
'--debug': boolean;
|
||||
'--sensitive': boolean;
|
||||
'--force': boolean;
|
||||
};
|
||||
|
||||
export default async function add(
|
||||
@@ -29,9 +30,6 @@ export default async function add(
|
||||
args: string[],
|
||||
output: Output
|
||||
) {
|
||||
// improve the way we show inquirer prompts
|
||||
require('../../util/input/patch-inquirer');
|
||||
|
||||
const stdInput = await readStandardInput(client.stdin);
|
||||
let [envName, envTargetArg, envGitBranch] = args;
|
||||
|
||||
@@ -66,18 +64,11 @@ export default async function add(
|
||||
envTargets.push(envTargetArg);
|
||||
}
|
||||
|
||||
while (!envName) {
|
||||
const { inputName } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputName',
|
||||
if (!envName) {
|
||||
envName = await client.input.text({
|
||||
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(
|
||||
@@ -91,7 +82,7 @@ export default async function add(
|
||||
);
|
||||
const choices = envTargetChoices.filter(c => !existing.has(c.value));
|
||||
|
||||
if (choices.length === 0) {
|
||||
if (choices.length === 0 && !opts['--force']) {
|
||||
output.error(
|
||||
`The variable ${param(
|
||||
envName
|
||||
@@ -107,26 +98,18 @@ export default async function add(
|
||||
if (stdInput) {
|
||||
envValue = stdInput;
|
||||
} else {
|
||||
const { inputValue } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputValue',
|
||||
envValue = await client.input.text({
|
||||
message: `What’s the value of ${envName}?`,
|
||||
});
|
||||
|
||||
envValue = inputValue || '';
|
||||
}
|
||||
|
||||
while (envTargets.length === 0) {
|
||||
const { inputTargets } = await client.prompt({
|
||||
name: 'inputTargets',
|
||||
type: 'checkbox',
|
||||
envTargets = await client.input.checkbox({
|
||||
message: `Add ${envName} to which Environments (select multiple)?`,
|
||||
choices,
|
||||
});
|
||||
|
||||
envTargets = inputTargets;
|
||||
|
||||
if (inputTargets.length === 0) {
|
||||
if (envTargets.length === 0) {
|
||||
output.error('Please select at least one Environment');
|
||||
}
|
||||
}
|
||||
@@ -137,15 +120,13 @@ export default async function add(
|
||||
envTargets.length === 1 &&
|
||||
envTargets[0] === 'preview'
|
||||
) {
|
||||
const { inputValue } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputValue',
|
||||
envGitBranch = await client.input.text({
|
||||
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 {
|
||||
@@ -154,6 +135,7 @@ export default async function add(
|
||||
output,
|
||||
client,
|
||||
project.id,
|
||||
upsert,
|
||||
type,
|
||||
envName,
|
||||
envValue,
|
||||
@@ -170,9 +152,11 @@ export default async function add(
|
||||
|
||||
output.print(
|
||||
`${prependEmoji(
|
||||
`Added Environment Variable ${chalk.bold(
|
||||
envName
|
||||
)} to Project ${chalk.bold(project.name)} ${chalk.gray(addStamp())}`,
|
||||
`${
|
||||
opts['--force'] ? 'Overrode' : 'Added'
|
||||
} Environment Variable ${chalk.bold(envName)} to Project ${chalk.bold(
|
||||
project.name
|
||||
)} ${chalk.gray(addStamp())}`,
|
||||
emoji('success')
|
||||
)}\n`
|
||||
);
|
||||
|
||||
23
packages/cli/src/commands/env/command.ts
vendored
23
packages/cli/src/commands/env/command.ts
vendored
@@ -39,9 +39,15 @@ export const envCommand: Command = {
|
||||
name: 'sensitive',
|
||||
description: 'Add a sensitive Environment Variable',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
},
|
||||
{
|
||||
name: 'force',
|
||||
description: 'Force overwrites when a command would normally fail',
|
||||
shorthand: null,
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [],
|
||||
@@ -82,26 +88,23 @@ export const envCommand: Command = {
|
||||
description:
|
||||
'Set the Environment (development, preview, production) when pulling Environment Variables',
|
||||
shorthand: null,
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'git-branch',
|
||||
description:
|
||||
'Specify the Git branch to pull specific Environment Variables for',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'yes',
|
||||
description: 'Skip the confirmation prompt when removing an alias',
|
||||
shorthand: 'y',
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
@@ -126,6 +129,10 @@ 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,6 +35,7 @@ export default async function main(client: Client) {
|
||||
'--environment': String,
|
||||
'--git-branch': String,
|
||||
'--sensitive': Boolean,
|
||||
'--force': Boolean,
|
||||
});
|
||||
} catch (error) {
|
||||
handleError(error);
|
||||
|
||||
1
packages/cli/src/commands/env/ls.ts
vendored
1
packages/cli/src/commands/env/ls.ts
vendored
@@ -71,6 +71,7 @@ export default async function ls(
|
||||
project.name
|
||||
)} ${chalk.gray(lsStamp())}`
|
||||
);
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(getTable(envs));
|
||||
}
|
||||
|
||||
|
||||
21
packages/cli/src/commands/env/rm.ts
vendored
21
packages/cli/src/commands/env/rm.ts
vendored
@@ -29,9 +29,6 @@ export default async function rm(
|
||||
args: string[],
|
||||
output: Output
|
||||
) {
|
||||
// improve the way we show inquirer prompts
|
||||
require('../../util/input/patch-inquirer');
|
||||
|
||||
if (args.length > 3) {
|
||||
output.error(
|
||||
`Invalid number of arguments. Usage: ${getCommandName(
|
||||
@@ -43,19 +40,11 @@ export default async function rm(
|
||||
|
||||
let [envName, envTarget, envGitBranch] = args;
|
||||
|
||||
while (!envName) {
|
||||
const { inputName } = await client.prompt({
|
||||
type: 'input',
|
||||
name: 'inputName',
|
||||
if (!envName) {
|
||||
envName = await client.input.text({
|
||||
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)) {
|
||||
@@ -86,9 +75,7 @@ export default async function rm(
|
||||
}
|
||||
|
||||
while (envs.length > 1) {
|
||||
const { id } = await client.prompt({
|
||||
name: 'id',
|
||||
type: 'list',
|
||||
const id = await client.input.select({
|
||||
message: `Remove ${envName} from which Environments?`,
|
||||
choices: envs.map(env => ({ value: env.id, name: formatEnvTarget(env) })),
|
||||
});
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
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';
|
||||
|
||||
export type PrimitiveConstructor =
|
||||
| typeof String
|
||||
| typeof Boolean
|
||||
| typeof Number;
|
||||
|
||||
export interface CommandOption {
|
||||
name: string;
|
||||
shorthand: string | null;
|
||||
type: 'boolean' | 'string';
|
||||
type: PrimitiveConstructor | [PrimitiveConstructor];
|
||||
argument?: string;
|
||||
deprecated: boolean;
|
||||
description?: string;
|
||||
/** supports multiple entries */
|
||||
multi: boolean;
|
||||
}
|
||||
export interface CommandArgument {
|
||||
name: string;
|
||||
@@ -39,23 +43,7 @@ type _CellOptions = CellOptions & {
|
||||
};
|
||||
|
||||
const tableOptions = {
|
||||
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: '',
|
||||
},
|
||||
chars: noBorderChars,
|
||||
style: {
|
||||
'padding-left': 0,
|
||||
'padding-right': 0,
|
||||
@@ -66,79 +54,70 @@ const globalCommandOptions: CommandOption[] = [
|
||||
{
|
||||
name: 'help',
|
||||
shorthand: 'h',
|
||||
type: 'string',
|
||||
type: String,
|
||||
description: 'Output usage information',
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'version',
|
||||
shorthand: 'v',
|
||||
type: 'string',
|
||||
type: String,
|
||||
description: 'Output the version number',
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'cwd',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
argument: 'DIR',
|
||||
description:
|
||||
'Sets the current working directory for a single run of a command',
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'local-config',
|
||||
shorthand: 'A',
|
||||
type: 'string',
|
||||
type: String,
|
||||
argument: 'FILE',
|
||||
description: 'Path to the local `vercel.json` file',
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'global-config',
|
||||
shorthand: 'Q',
|
||||
type: 'string',
|
||||
type: String,
|
||||
argument: 'DIR',
|
||||
description: 'Path to the global `.vercel` directory',
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'debug',
|
||||
shorthand: 'd',
|
||||
type: 'string',
|
||||
type: String,
|
||||
description: 'Debug mode (default off)',
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'no-color',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
description: 'No color mode (default off)',
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'scope',
|
||||
shorthand: 'S',
|
||||
type: 'string',
|
||||
type: String,
|
||||
description: 'Set a custom scope',
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'token',
|
||||
shorthand: 't',
|
||||
type: 'string',
|
||||
type: String,
|
||||
argument: 'TOKEN',
|
||||
description: 'Login token',
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -21,9 +21,8 @@ export const initCommand: Command = {
|
||||
description: 'Overwrite destination directory if exists [off]',
|
||||
argument: undefined,
|
||||
shorthand: 'f',
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
@@ -6,7 +6,7 @@ import chalk from 'chalk';
|
||||
// @ts-ignore
|
||||
import listInput from '../../util/input/list';
|
||||
import listItem from '../../util/output/list-item';
|
||||
import promptBool from '../../util/input/prompt-bool';
|
||||
import confirm from '../../util/input/confirm';
|
||||
import toHumanPath from '../../util/humanize-path';
|
||||
import Client from '../../util/client';
|
||||
import info from '../../util/output/info';
|
||||
@@ -46,6 +46,10 @@ 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:',
|
||||
@@ -122,7 +126,7 @@ async function extractExample(
|
||||
ver: string = 'v2'
|
||||
) {
|
||||
const { output } = client;
|
||||
const folder = prepareFolder(process.cwd(), dir || name, force);
|
||||
const folder = prepareFolder(client.cwd, dir || name, force);
|
||||
output.spinner(`Fetching ${name}`);
|
||||
|
||||
const url = `${EXAMPLE_API}/${ver}/download/${name}.tar.gz`;
|
||||
@@ -147,7 +151,7 @@ async function extractExample(
|
||||
const successLog = `Initialized "${chalk.bold(
|
||||
name
|
||||
)}" example in ${chalk.bold(toHumanPath(folder))}.`;
|
||||
const folderRel = path.relative(process.cwd(), folder);
|
||||
const folderRel = path.relative(client.cwd, folder);
|
||||
const deployHint =
|
||||
folderRel === ''
|
||||
? listItem(`To deploy, run ${getCommandName()}.`)
|
||||
@@ -209,14 +213,14 @@ async function guess(client: Client, exampleList: string[], name: string) {
|
||||
)} to see the list of available examples.`
|
||||
);
|
||||
|
||||
if (process.stdout.isTTY !== true) {
|
||||
if (client.stdin.isTTY !== true) {
|
||||
throw GuessError;
|
||||
}
|
||||
|
||||
const found = didYouMean(name, exampleList, 0.7);
|
||||
|
||||
if (typeof found === 'string') {
|
||||
if (await promptBool(`Did you mean ${chalk.bold(found)}?`, client)) {
|
||||
if (await confirm(client, `Did you mean ${chalk.bold(found)}?`, false)) {
|
||||
return found;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -16,17 +16,15 @@ export const inspectCommand: Command = {
|
||||
description: 'Time to wait for deployment completion [3m]',
|
||||
argument: 'TIME',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'wait',
|
||||
description: 'Blocks until deployment completes',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
@@ -10,27 +10,24 @@ export const linkCommand: Command = {
|
||||
name: 'repo',
|
||||
description: 'Link multiple projects based on Git repository (alpha)',
|
||||
shorthand: 'r',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'project',
|
||||
description: 'Specify a project name',
|
||||
shorthand: 'p',
|
||||
argument: 'NAME',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'yes',
|
||||
description:
|
||||
'Skip questions when setting up new project using default scope and settings',
|
||||
shorthand: 'y',
|
||||
type: 'boolean',
|
||||
type: Boolean,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
@@ -17,27 +17,24 @@ export const listCommand: Command = {
|
||||
'Filter deployments by metadata (e.g.: `-m KEY=value`). Can appear many times.',
|
||||
argument: 'KEY=value',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: [String],
|
||||
deprecated: false,
|
||||
multi: true,
|
||||
},
|
||||
{
|
||||
name: 'environment',
|
||||
description: '',
|
||||
argument: 'production|preview',
|
||||
shorthand: null,
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
{
|
||||
name: 'next',
|
||||
description: 'Show next page of results',
|
||||
argument: 'MS',
|
||||
shorthand: 'n',
|
||||
type: 'string',
|
||||
type: String,
|
||||
deprecated: false,
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
examples: [
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user