This is following a similar pattern to Next.js workflows so that the publish step is skipped and reduces the time it takes GH Actions to run since we don't need to build to know that it should be skipped.
This ensures that using `vc deploy --prebuilt` will also upload any files that `.output/**/.nft.json` points to and also handle the Root Directory correctly since `vc build` emits `rootdir/.output`.
- Related to https://github.com/vercel/runtimes/issues/304.
### Related Issues
> Fixes#7086
> Related to #7086
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [x] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
We have identified that the `handler` for Lambdas does not support a dot-preceded path for Ruby, Python, and probably other languages, so we're adjusting the File System API to change `.output` inside the Lambda to something else, which requires version `2` of `functions-manifest.json`.
Furthermore, we're also bumping the `.nft.json` files to version `2`, which allows `output` to be relative to the NFT file itself, so that, inside the Lambda, the behavior mentioned at the top can be applied by the File System API.
As a nice side effect, this will also support nested API Routes, because it'll place all the dependencies next to every API Route, meaning that the launcher will have access to all of them (bundling multiple API Routes or Pages into the same Lambda currently doesn't work for non-Next.js anyways, because of https://github.com/vercel/runtimes/issues/305).
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [x] This PR has a concise title and thorough description useful to a reviewer
- [x] Issue from task tracker has a link to this PR
Previously, CLI Plugins would try to mount the user-provided request handler (e.g. `api/test.rb`) at the same position inside the Lambda at which the launcher was located (e.g. `api/test.rb`), which would cause the launcher to be overwritten.
With this change, all the destination mounting points for NFT input files are becoming relative to the `.output/server/pages/api` directory instead of `.output/server/pages`, so they should no longer overwrite the launcher, and instead be loaded from the launcher, like normal.
This PR might have two problems:
- If imports in Ruby/Python/etc are relative to `cwd` and not the file from which the import is executed (which I doubt), this would fail.
- We might have to replace `api` with the exact sub folder of the API Route within `.output/server/pages/api` if the current change doesn't yet work for nested paths. Although that also means repeating all of the other dependencies (not just the user-provided request handler) in a different location for every single API Route.
The two above will be tested after this PR was merged, as there currently isn't a way to test `vercel-plugin-go`, `vercel-plugin-python`, and `vercel-plugin-ruby` without publishing a canary, because they don't bundle `@vercel/build-utils`, which was the package that was just updated.
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [x] This PR has a concise title and thorough description useful to a reviewer
- [x] Issue from task tracker has a link to this PR
* Use correct Lambda handler for compiled languages
* Use the correct entrypoint
* Fixed the logic
* Perfected it
* Simpler code
* Update packages/build-utils/src/convert-runtime-to-plugin.ts
Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
* Handle edge cases and simplify logic
* Fixed the logic yet again to work perfectly
* Normalize Page path
* Simplified everything
* Fixed the tests
Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
* Corrected CLI Plugin output creation
* Wait for the linking to be done before removing anything
* Make it work
* Renamed variables
* Made everything work
* Removed debugging
* Fixed comment typos
* [cli] Support `next export` in `vercel build`
* Add debug line
* Remove unused import
* Ensure file is copied
* Return in `getNextExportStatus`
* Include dotNextDir
Co-authored-by: Steven <steven@ceriously.com>
### Related Issues
This fixes https://github.com/vercel/runtimes/issues/299.
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [x] This PR has a concise title and thorough description useful to a reviewer
- [x] Issue from task tracker has a link to this PR
* Fixed error with API directory
* Made output work
* Use handler as API Route
* Correctly find the handler
* Fixed a missing instance
* Made handler logic work
* Made it work as expected
* Exclude unnecessary files
* Use a method that always works
* Additional comment
* Made everything work
* Cleaner tests
* Clean up all the useless files
* Fixed missing instance
* Speed up the code
* Removed useless lines
* Update packages/build-utils/src/convert-runtime-to-plugin.ts
Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
* Clarified comment
* Use relative logic again
* Fixed tests
* Deleted useless file
Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
### Related Issues
This applies what was mentioned in https://github.com/vercel/runtimes/issues/288#issuecomment-984101750.
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [x] This PR has a concise title and thorough description useful to a reviewer
- [x] Issue from task tracker has a link to this PR
After https://github.com/vercel/vercel/pull/7088, `dist` now contains `package.json`, which made `tsc` move `index.js` a level deeper, effectively breaking the `main` property of all of the affected CLI Plugins.
This change makes them work again.
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [x] This PR has a concise title and thorough description useful to a reviewer
- [x] Issue from task tracker has a link to this PR
* Avoid unnecessary Gemfile installations
* Do not bundle `.output` or `.vercel` into Lambdas
* Use the same input hash format for all CLI Plugins and `vercel build`
* Fixed unit tests
* Fixed the unit tests again
* Fixed the unit tests
* Fixed all the tests
* Exclude useless files
* Consider `.vercelignore` and `.nowignore`
* Fixed error
* Reverted changes
* Deleted useless file
* Fixed tests
* Share input hash format with `vercel-plugin-node`
* Make output inspectable
* Fixed build error
* Extended comment
* Bump Ruby version
* Update Gemfiles
* Update bundles
* Fixed tests
Co-authored-by: Andy Bitz <artzbitz@gmail.com>
* Stop passing `functions` and `regions` to Runtimes
* Added required types back
* Removed `vercelConfig` from `vercel-plugin-node`
* Fixed unit test
* Fixed test
* [cli] Consider `envPrefix` for the framework
* Fix env
* Remove type
* Resolve .nft.json files correctly
* Fix public and static directory handling
* Do not use .replace
* Consider the output directory
* Added Remix to the list of frameworks
* Replaced Development Command
* Polished config
* Added headers
* Added example
* Fixed logo
* Trigger a Deployment
* Added vercel.json
* Port is automatically parsed through remix.config.js
* Fixed sorting
* Moved it down a bit
* Trigger a Deployment
* Removed useless property
* Reverted readme
* Fully reverted readme
* [plugin-node][node] Fix dependency installation, handler path, and build script
* Use smaller library for testing
* Make test work on windows
* Remove .output before fixture runs and update routes update
* Apply suggestions from code review
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Steven <steven@ceriously.com>
### Related Issues
The Parcel template via the Project Creating Flow returns a build error because the default output directory for the Parcel **Framework Preset** is searching for `public` instead of `dist`. The default behavior of Parcel's CLI I believe is `dist`.
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [ ] The code changed/added as part of this PR has been covered with tests
- [ ] All tests pass locally with `yarn test-unit`
#### Code Review
- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
* [python] Upgrade python 3.9
* Fix python path
* Improve testing
* Add support for version selection via Pipfile
* Parse the "Pipfile.lock" instead
* Fix support for Node.js 12
* Switch from hardlinks to symlinks in vc build
* Remove error handling that fs-extra already takes care of
* Add comment
* Put back symlink error handling
Seems like macOS sometimes exceeds 60 min so this bumps the timeout.
The build can be between 3 minutes and 5 minutes. The tests can be between 45 minutes and 55 minutes.
* Prevent infinite recursion of vercel build and dev
* Improved text
* Improved the text further
* Add tests
* Debug test
* Add debug log
* Debug test
* debug test
* Debug test
* Fix test
* Debug tests
* Debug test
* Remove only from tests
* Add error documentation
* Improved docs
* Fix other test
* Fixed links to error docs
* Remove legacy error page
* Use nicer error links
Co-authored-by: Leo Lamprecht <leo@vercel.com>
* Fix middleware build result. Return middleware next when invalid result.
* Add a unit test that would have failed before previous commit.
* Copy next.js behavior.
* Add a test for invalid responses from middleware.
Co-authored-by: Leo Lamprecht <leo@vercel.com>
### Related Issues
x-ref: https://github.com/vercel/customer-issues/issues/34
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
* Move loadPlugins to a utils file to be shared w/ dev server.
* Update loadCliPlugins to also return startDevServer and runDevMiddleware based plugins.
* Move plugins back to dependencies.
These can't be bundled as it interferes with plugin resolution.
* Hook up middleware plugins to dev server.
* Pass output object to loadCliPlugins instead of a logging function.
* Allow more than one runDevMiddleware defining plugins.
* Bundle esbuild w/ middleware plugin.
* Keep esbuild as an external
* Update middleware's esbuild.
* set old space size
* Revert "set old space size"
This reverts commit b579194a862949a11769e9087f01c31f2e1f3b60.
* Use --max-old-space-size for CLI unit tests
* Increase memory
* Use `run.js` to set the memory
* Make NODE_OPTIONS optional
Co-authored-by: Leo Lamprecht <leo@vercel.com>
Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
Co-authored-by: Andy Bitz <artzbitz@gmail.com>
* [node] Refactor to Vercel CLI Plugin
* Enforce "index" suffix on output Serverless Functions
So that nesting works properly
* Some cleanup
* Add version
* Use `@vercel/static-config`
* .
* Add support for wildcard routes
* Don't compile dotfiles, underscore prefixed files, files within `node_modules`, nor TypeScript definition files
Matches the logic from `maybeGetBuilder()` in `@vercel/build-utils`.
* Bump version
* Introduce testing framework
* Debug
* Add test without any deps
* Longer timeout to install Node.js for vercel/fun
* Install deps
* Add legacy Node.js server interface test
* More tests
* Test "assets" fixture
* Test "helpers" fixture
* fix
* Support AWS native API
* Remove debugging `console.log()` calls
* Use plugin-node for new plugin instead
* Revert "Use plugin-node for new plugin instead"
This reverts commit f317b8c6ecdc67a74d5f2b12a2e7567a27d4b6b8.
* Move to `plugin-node` directory
* Update plugin-node version in package.json
* Checkout node from main
* Add yarn.lock files for tests
* Update node-bridge
Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
Co-authored-by: Andy Bitz <artzbitz@gmail.com>
### Related Issues
> Fixes https://github.com/vercel/runtimes/issues/219
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
* Use ncc to bundle middleware plugin, move dependencies to devDependencies, remove querystring
* Switch from globby (deprecated dependencies) to glob in middleware plugin.
* Bundle the node-plugin and middleware-plugin into cli.
* Add initial `vercel-plugin-middleware`
* Ignore `entries.js` from ESLint
* Add `runDevMiddleware()` stub
* Add test
* Add support for "_middleware.{js,ts}" to `vercel dev` (#6880)
* Add websandbox from next.js codebase.
* Use node-fetch instead of next's polyfilled fetch.
* Handle middleware rewrites.
* Add response, headers, and request to websandbox context.
* Move websandbox dependency to middleware plugin.
* Add integration tests, update websandbox to support ts files and json imports.
* commit yarn.lock changes after rebasing
* Clean up left over console.logs, fix some tsc issues, and rebase issue.
* Fix failing test and eslint.
* Fix middleware test on windows.
* [examples] Update Vercel Next.js example template to 12.0.1 (#6905)
* Mark the Plugins as external to CLI's ncc build
* [cli] Improve tracing in vc build (#6898)
* [cli] Fix tracing for `vc build`
* Ignore object when there are no changes
* Make Next < 12 work with FS API w/ nft
* Update packages/cli/src/commands/build.ts
Co-authored-by: Nathan Rajlich <n@n8.io>
* Document how Next.js processing works in build
* [cli] Fix static assets (#6906)
* Make sure output path is .next
* Fix up require-server-files for processing
* Fix typo
* Move static
* Update static rename
Co-authored-by: Andy Bitz <artzbitz@gmail.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
* Publish Canary
- vercel@23.1.3-canary.17
- @vercel/client@10.2.3-canary.15
- @vercel/static-config@0.0.1-canary.0
* [cli] Ignore `.env` and `.gitignore` in "vc build" (#6910)
* Publish Canary
- vercel@23.1.3-canary.18
* Pass workPath to plugins.
The new plugin architecture doesn't pass a full BuildOptions object, previous
to this commit it wasn't passing any options at all. I've added workingPath to
support running dev/build from directories other than the project root.
* Remove error state when package.json exists, but no build script
This allows vercel build to continue working for projects that are not using
frameworks, but use package.json to manage dependencies.
* Fix types, pull in middleware header fix from next.js
Next js PR w/ the header fix:
https://github.com/vercel/next.js/pull/30560
* Fix missing entries file for vc build.
* Update call signature of middleware when using vc build.
Co-authored-by: Drew Bredvick <dbredvick@gmail.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Jared Palmer <jared@jaredpalmer.com>
Co-authored-by: Andy Bitz <artzbitz@gmail.com>
Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
Co-authored-by: Gary Borton <gdborton@gmail.com>
Co-authored-by: Drew Bredvick <dbredvick@gmail.com>
Co-authored-by: Jared Palmer <jared@jaredpalmer.com>
Co-authored-by: Andy Bitz <artzbitz@gmail.com>
Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
* [cli] Fix tracing for `vc build`
* Ignore object when there are no changes
* Make Next < 12 work with FS API w/ nft
* Update packages/cli/src/commands/build.ts
Co-authored-by: Nathan Rajlich <n@n8.io>
* Document how Next.js processing works in build
* [cli] Fix static assets (#6906)
* Make sure output path is .next
* Fix up require-server-files for processing
* Fix typo
* Move static
* Update static rename
Co-authored-by: Andy Bitz <artzbitz@gmail.com>
Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Andy <AndyBitz@users.noreply.github.com>
* Add PoC pull command
* Improve pull's linking logic
* Remove `__VERCEL_SKIP_PULL_CMD` env var and unneeded type narrowing
* Improve pull's link logic
* Fix team mock
* Add smoke test for vc pull
* Add setupFixture helper
* Remove debug duplicate
* Use a fixture in pull test
* Put back debug
* Fix unit test
* Fix test on windows
* Remove mock-stdin
* Pass cwd to link and pull
* Add help command for `vc pull`
* Organize imports
* Update packages/cli/src/commands/deploy/args.ts
Co-authored-by: Steven <steven@ceriously.com>
* Use tmp-promise instead of tmp
* Update packages/cli/src/commands/pull.ts
Co-authored-by: Steven <steven@ceriously.com>
* Update packages/cli/src/commands/pull.ts
Co-authored-by: Steven <steven@ceriously.com>
* Clean up pull comments and variable declarations
* Remove graceful tmp directory cleanup
* Put back graceful cleanup
* Print output for debugging
* Moar debug
* Set 10s timeout for `vc pull` test
* Change fixture to now-pull-next
* Fix pull test name
* Switch project mock to use encrypted env
* Add --env flag
* Update fixtures
* Remove now- from everywhere
* Remove instrumentation
* Rename setupFixture to setup-fixture
* Add deprecation warning to `vc env pull`
* Update packages/cli/src/commands/deploy/args.ts
Co-authored-by: Nathan Rajlich <nathan@tootallnate.net>
* Update packages/cli/src/commands/env/pull.ts
Co-authored-by: Nathan Rajlich <nathan@tootallnate.net>
* Fix pull and update imports
* Revamped build command
* printConfig -> renderConfig
* Remove frameworks
* Add build state unit test for gatsby
* Update packages/cli/src/commands/pull.ts
Co-authored-by: Steven <steven@ceriously.com>
* Update packages/cli/src/commands/env/index.ts
Co-authored-by: Steven <steven@ceriously.com>
* Update packages/cli/src/util/projects/write-project-settings.ts
Co-authored-by: Nathan Rajlich <nathan@tootallnate.net>
* Update packages/cli/src/commands/pull.ts
Co-authored-by: Nathan Rajlich <nathan@tootallnate.net>
* Don't writeProjectSettings in env pull
* Cleanup fixtures once afterAll
* Add help text for --env and -y
* Add output for pull
* Write project settings output after env output
* Pushing for Nate
* Add todo about handling Other's build output directory
* Add support for plugins
* Improve prompt logic loop
* Pluralize plugin output
* Better plugin failure handling
* Refactor away from BuildState class
* Remove unused file
* Correct framework detection logic, smart copy w/hardlinks
* Generate build manifest
* Generate routes-manifest.json
* Remove ambiguity when calling vc build
* Make sure manifests have all keys
* Ensure that .output is added to .gitignore in vc link
* Remove directoryListing from project settings
* Add support for default cli plugins
* Remove directory listing
* Install vercel-plugin-node
* Patch console.log and console.error for plugins
* Improve build output
* Remove unused unit tests
* Allow build without token
* Add vercel plugin middleware
* Bump vercel-plugin-middleware
* Bump middleware plugin
* Tweak require.resolve
* Tweak require.resolve to __dirname
* Update `vercel-plugin-node`
* Fix prefixed logs when using formatters i.e. `%j`
* Pretty print the manifest files
* Get unique CLI deps
For the case where the local project has one of the CLI default plugins
specified.
* Update packages/cli/package.json
Co-authored-by: Nathan Rajlich <nathan@tootallnate.net>
* Add help output
* Remove p-limit properly
* Confirm before pull in build
* Bump `vercel-plugin-node`
* [cli] Make Next.js move files into .output (#6885)
* Use OUTPUT_DIR
* Return properly if no package.json exists and no build command
* Invert logic for runPackageJsonScript
* Bump `vercel-plugin-middleware`
* Fix defaultHeaders in frameworks
* Fix build when nft files is object
* Update `yarn.lock`
* 2nd attempt at --prebuilt (#6888)
Co-authored-by: Andy Bitz <artzbitz@gmail.com>
* Add beta and feedback to vc build
Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Nathan Rajlich <nathan@tootallnate.net>
Co-authored-by: Andy Bitz <artzbitz@gmail.com>
Add `vercel pull` command. Closes https://github.com/vercel/runtimes/issues/142.

It does the following:
- Pull the `.env` file (it calls `pull` internally)
- Adds the following to `.vercel/project.json` (which will then be used by `vercel build`):
```tsx
interface ProjectLink {
projectId: string
orgId: string
settings: {
buildCommand: string | null,
devCommand: string | null,
directoryListing: string | null,
outputDirectory: string | null,
rootDirectory: string | null,
framework: string | null,
}
}
```
This PR also deprecates `vc env pull` with a warning:

### 📋 Checklist
- [x] Help output
- [x] Flags (need to combine flags from `env pull`)
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [x] This PR has a concise title and thorough description useful to a reviewer
- [x] Issue from task tracker has a link to this PR
Adds an additional property for the `routes` schema.
### Related Issues
N/A
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
This will prevent any issues where the `Now` instance is out-of-sync with the `Client` instance, for example, during a re-auth where a new auth token is issued. Also reduces a bit of code which is nice.
Fixes an issue where the token would not be properly upgraded while
a Team scope was currently active, causing a new auth token to be issued
and lose the previous access scope(s).
These changes originally from #6652, but pulled out to be merged
separately.
`outputBuffer` is a simpler way of asserting tests against the CLI
output instead of working directly withe Jest mock function.
`output.isTTY` is also now mutable, so that we can write tests for both
cases when the output is different based on TTY-ness (for example,
see the updated `vc whoami` tests in this PR).
This adds an argument to allow passing internal param names that should be ignored when considering whether params should be auto-added to a rewrite's destination query. After adding this we should be able to resolve https://github.com/vercel/next.js/issues/27563 in the runtime where `convertRewrites` is called.
This matches Next.js' handling for internal params which can be seen [here](e90825ad88/packages/next/shared/lib/router/utils/prepare-destination.ts (L203))
### Related Issues
x-ref: https://github.com/vercel/next.js/issues/27563
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
This ensures we replace header values correctly when no named segments are used and only has items are used.
### Related Issues
Fixes: https://vercel.slack.com/archives/CHTTGQYQ4/p1631023974185700
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
* Rewrites the CLI unit tests to be TypeScript and use Jest (consistent with the unit tests in the other packages in this repo).
* The file structure of the new test files mirrors that of the `src` directory, so that it's easy to find the relevant tests.
* Code coverage is also properly set up through Jest - you can already see a big increase in coverage from this PR.
* Adds a mock API server framework, with the intention of making it possible to write granular tests of the CLI commands. Using mocks also has the benefit of not requiring `VERCEL_TOKEN` env var to be set, so 3rd party PRs will be able to have their tests run. Ultimately this will also help with test coverage, since we will be writing unit tests that test the commands' code directly.
* Converts `Output` into a proper class (which is subclassed for the mocks).
To make setting up local dev README instructions easier for new users being introduced to a Vercel project, support flags to make the `vc link` command be non-interactive, in the case where the project name does not match the name of the directory where the code is located:
```
$ vc link --scope acme --project docs
```
Related to https://github.com/vercel/front/pull/10732.
Before:
```
Error! Unexpected error. Please try again later. ()
```
After:
```
Error! An unexpected error happened when running this build. We have been notified of the problem. If you have any questions, please contact support@vercel.com.
```
### Related Issues
Check the project's nodeVersion setting for when we release Node 16 and later
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [ ] The code changed/added as part of this PR has been covered with tests
- [ ] All tests pass locally with `yarn test-unit`
#### Code Review
- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
Currently, when `scanParentDirs()` finds the closest `package.json` file, it stops iteration regardless of whether or not a lockfile was found. For npm Workspaces, this is problematic because if you are deploying a subdirectory of a monorepo, then there will be no lockfile in the subdirectory (the `package-lock.json` file is at the root of the project). So instead of stopping once the `package.json` file is found, instead stop when the first lockfile is found.
And remove `jest`/`ts-jest` from the individual packages. It is important to have a consistent version of `jest` being used throughout the monorepo, otherwise bizarre errors surface that cause jest to crash, such as [here](https://github.com/vercel/vercel/runs/3255999061?check_suite_focus=true):
```
TypeError: this._environment.runScript is not a function
at Runtime._execModule (../../node_modules/jest-runner/node_modules/jest-runtime/build/index.js:856:41)
```
As the title suggests, this PR makes it such that npm 7 will be invoked when there is a `package-lock.json` file with `lockfileVersion` 2 or greater, by prepending the the `$PATH` a directory within the build container where npm 7 is located.
The test fixture `20-npm-7` is also enabled for E2E testing, to ensure that the proper npm version is enabled in the production build.
Makes the `test/unit.test.ts` file be TypeScript, and import from the source TypeScript code. This way, we don't need to run `yarn build` to test local changes when testing.
Also, VS Code was complaining about the types for jest `describe()`/`it()` not being installed, even though they are. After some digging, I found that TypeScript has a peculiar behavior with types in monorepo setups. [This solution](https://github.com/microsoft/TypeScript-Node-Starter/issues/196#issuecomment-771988960) describing adding a `tsconfig.json` inside of the `tests` dir seems to do the trick.
Like this, we can avoid that the dashboard will ask people to pass `--port` when running SvelteKit's Development Command.
Only `vercel dev` will make use of it.
This ensures we validate segments being used from `has` in the `destination` correctly
### Related Issues
x-ref: https://vercel.slack.com/archives/CLDDX2Y0G/p1627285500281300
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
Follow up to #6508. Adds a request "counter" that increments for every API request, matching how `front` does it.
Also tweaks the `output.time()` output a bit by rendering the timestamp in gray, and with `[]` brackets. If the time diff is < 1000ms then the full milliseconds will be printed intstead of the seconds.
<img width="710" alt="Screen Shot 2021-07-22 at 2 45 39 PM" src="https://user-images.githubusercontent.com/71256/126713843-db70ed9c-4752-4ca9-8f54-313c4cb44914.png">
Updates the `output.time()` function to accept a function as the "label" parameter. When a function is passed, it will be invoked twice, once at the beginning of the promise being executed, and a second time after the promise has resolved. The second time, the return value of the promise is passed to the label function, so that the resolved value may be used to create the label.
Drops usage of Node's `console.time()` and `console.timeEnd()` since we were using it in a hacky and unnecessary way.
Adds an "out-of-band" login mode to the `vc login` command, for use in headless environments like inside a Docker container or an SSH session. In these situations, spawning a localhost HTTP server won't work, because the HTTP server will not be accessible to the web browser that is doing the authentication.
In "out-of-band" mode, the login URL is simply presented to the user, and they must visit the login URL in their web browser and complete the authentication. The callback URL is a page on front that shows the verification token to the user and instructs them to copy + paste the token back into the CLI, at which point the login can complete.
Docker/SSH sessions are attempted to be automatically detected, and "out-of-band" mode is enabled implicitly. But there is also an `--oob` flag in case that detection logic were to fail (or if you'd like to run OOB mode locally).
This PR also adds shortcut flags for the Git provider login mechanisms, i.e. `vc login --github`.
https://user-images.githubusercontent.com/71256/125129304-1f5f3380-e0b4-11eb-8139-d1109811bd86.mov
This is a continuation of https://github.com/vercel/vercel/pull/6382 (thank you @markozxuu!) with merge conflicts addressed and pushed to a local branch, so that CI tests run.
Currently the `06-rails` test is failing at build time with:
```
16:27:09.550 'Your bundle is locked to mimemagic (0.3.3) from rubygems repository\n' +
16:27:09.550 'https://rubygems.org/ or installed locally, but that version can no longer be\n' +
16:27:09.550 'found in that source. That means the author of mimemagic (0.3.3) has removed it.\n' +
16:27:09.550 "You'll need to update your bundle to a version other than mimemagic (0.3.3) that\n" +
16:27:09.550 "hasn't been removed in order to install.",
```
So I ran `bundler update` in the "06-rails" Ruby test fixture to update the deps in the Gemfile.lock file.
Fixes an edge case bug when the user has a current scope that is
different than the owner of the project that is being deployed.
When this was the case, the API call to get the certs for a domain at
the end of the `vc deploy` command was using the incorrect `teamId`,
potentially causing a 403 error (when the current auth token does not
have access to the selected scope).
`vc deploy` doesn't care about the current "scope" that the CLI has selected, since it uses the `.vercel` directory to determine the ownerId and projectId.
Therefore, it should not be fetching the team details of the selected scope during `vc deploy`, since it's possible that the token might not have access to the current scope and returns a 403, even though that API call is unnecessary for the `vc deploy` command to complete.
Closing keep-alive HTTP connections was causing the `server.close()` call
to take a few seconds before completing, so set the `Connection: close`
response header in order to make the connections close immediately,
so that `server.close()` is fast.
Considering that it's a development environment, it's not important to wait for ongoing HTTP request connections to complete. Sometimes it takes a long time for all the shutdown operations to complete, which makes the command feel sluggish. So let's just `process.exit()` and exit quickly.
This Runtime is very old, outdated, unmaintained, and has never been documented.
Additionally, it no longer compiles with the latest version of Go. So
rather than fixing it, let's just remove it since we don't want to
invest any more time into it.
In some cases (i.e. when SSH'd to a remote machine) the `open` command will not work reliably. So we need to print the URL to the user as a fallback for those cases when the web browser is not automatically opened.
This also moves where `tokenName` is specified to be in the "verify" endpoint, so that it does not need to be part of the URL that gets printed to the user.
<img width="738" alt="Screen Shot 2021-06-07 at 2 12 47 PM" src="https://user-images.githubusercontent.com/71256/121089239-b5452d00-c79b-11eb-85b2-0e45b817dff0.png">
* refactor: Remove unncessary file
* feat(cli/alias): Migration to TS
* refactor(cli/alias): Add a line break
* refactor(cli/alias): Remove unnecesary code
* feat(cli): Add `Paginationoptions` type to `pagination`
* feat(cli/commands): Rewrite th `alias ls` command to TS
* refactor: Remove unncessary code
* feat: Create helper function for `getSafeAlias`
* refactor: Remove unnecessary code
* feat: Remove parameter generic, "null" for the fetch
* feat(cli/alias): Rewritten in full TS
* feat: Add Partial to opts
* refactor: Remove comment @ts-ignore
* feat: Add Partial to opts
* feat: Only should be return `alias.uid`
* refactor: Remove `Alias` type from of the parameter `id`
* refactor: Remove destructuring from alias object
* refactor: Remove unnecessary code
* feat: Rename `created` property to `createdAt` of number type
* refactor: Move getSafeAlias function in the same file
* refactor: Simplifying code
* refactor: Intentation did not affect diff on git
* Add null back to type
Co-authored-by: Steven <steven@ceriously.com>
The call to `GET /projects/info` is used to check existence but it can cause a race condition if the project was removed before the `DELETE /v2/projects` is called.
Instead, we rely on the response from `DELETE /v2/projects` to determine if the project exists or not.
This will also allow us to remove a legacy API endpoint in the future (see related API PR)
This ensures we normalize header `key` values in `has` items to be lower-case as the proxy currently only matches against the lower-case variant. Updated superstatic tests to ensure the header key is normalized correctly.
### Related Issues
[related thread](https://vercel.slack.com/archives/C01N3RWTE5V/p1621937306006400)
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [x] The code changed/added as part of this PR has been covered with tests
- [x] All tests pass locally with `yarn test-unit`
#### Code Review
- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
In the `vc switch` command, if your current access token results in
"limited" Team information being returned, then show a lock emoji
next to the team/user name in the select input.
When a locked scope is selected, then pre-emptively prompt the
user to re-authenticate using a valid login method in relation to
the desired scope.
https://user-images.githubusercontent.com/71256/119441172-87abae80-bcda-11eb-801a-cb6837bae353.mov
[ch21964]
@@ -6,7 +6,7 @@ This directory is a brief example of a [Name](site-link) site that can be deploy
Deploy your own [Name] project with Vercel.
Deploy your own [Name] project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/example-directory)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/example-directory)
@@ -332,7 +332,7 @@ This is an abstract enumeration type that is implemented by one of the following
-`nodejs10.x`
-`nodejs10.x`
-`go1.x`
-`go1.x`
-`java11`
-`java11`
-`python3.8`
-`python3.9`
-`python3.6`
-`python3.6`
-`dotnetcore2.1`
-`dotnetcore2.1`
-`ruby2.5`
-`ruby2.5`
@@ -398,12 +398,12 @@ This utility allows you to _scan_ the filesystem and return a [`Files`](#files)
The following trivial example downloads everything to the filesystem, only to return it back (therefore just re-creating the passed-in [`Files`](#files)):
The following trivial example downloads everything to the filesystem, only to return it back (therefore just re-creating the passed-in [`Files`](#files)):
Vercel is the optimal workflow for frontend teams. All-in-one: Static and Jamstack deployment, Serverless Functions, and Global CDN.
Vercel is a platform for **static sites and frontend frameworks**, built to integrate with your headless content, commerce, or database.
Get started by [Importing a Git Project](https://vercel.com/import) and use `git push` to deploy. Alternatively, you can [install Vercel CLI](https://vercel.com/download).
We provide a **frictionless developer experience** to take care of the hard things: deploy instantly, scale automatically, and serve personalized content around the globe.
We make it easy for frontend teams to **develop, preview, and ship** delightful user experiences, where performance is the default.
Get started by [Importing a Git Project](https://vercel.com/new) and use `git push` to deploy. Alternatively, you can [install Vercel CLI](https://vercel.com/cli).
You attempted to create a Vercel deployment where the input is a file, rather than a directory. Previously this was allowed, however this behavior has been removed as of Vercel CLI v24.0.0 because it exposed a potential security risk if the user accidentally created a deployment from a sensitive file.
#### Possible Ways to Fix It
- Run the `vercel deploy` command against a directory, instead of a file.
@@ -14,9 +14,9 @@ Vercel is a cloud platform for static frontends and serverless functions. It ena
This repository consists of multiple examples, created for use with the [Vercel](https://vercel.com) platform. In addition to this, it also contains:
This repository consists of multiple examples, created for use with the [Vercel](https://vercel.com) platform. In addition to this, it also contains:
- [Code of Conduct](https://github.com/vercel/vercel/blob/master/.github/CODE_OF_CONDUCT.md) - our Code of Conduct, adapted from the [Contributor Covenant](http://contributor-covenant.org)
- [Code of Conduct](https://github.com/vercel/vercel/blob/main/.github/CODE_OF_CONDUCT.md) - our Code of Conduct, adapted from the [Contributor Covenant](http://contributor-covenant.org)
- [Contributing Guidelines](https://github.com/vercel/vercel/blob/master/.github/CONTRIBUTING.md) - a guide on how to contribute to the examples repository
- [Contributing Guidelines](https://github.com/vercel/vercel/blob/main/.github/CONTRIBUTING.md) - a guide on how to contribute to the examples repository
- [License](https://github.com/vercel/vercel/blob/master/LICENSE) - the standard MIT license under which these examples are published
- [License](https://github.com/vercel/vercel/blob/main/LICENSE) - the standard MIT license under which these examples are published
We recommend familiarizing yourself with the above sections, particularly if you are looking to make a contribution.
We recommend familiarizing yourself with the above sections, particularly if you are looking to make a contribution.
@@ -60,7 +60,7 @@ If you would like to upgrade a project to take advantage of zero configuration,
## How to Contribute
## How to Contribute
Contributing examples should be an enjoyable experience, as such we have created a set of [contributing guidelines](https://github.com/vercel/vercel/blob/master/.github/CONTRIBUTING.md) to help you do so.
Contributing examples should be an enjoyable experience, as such we have created a set of [contributing guidelines](https://github.com/vercel/vercel/blob/main/.github/CONTRIBUTING.md) to help you do so.
The guidelines cover important information such as the requirements for new examples and where to get help if you have any questions.
The guidelines cover important information such as the requirements for new examples and where to get help if you have any questions.
@@ -76,7 +76,7 @@ When submitting an issue, please thoroughly and concisely describe the problem y
## License
## License
This repository is an open source project. See the [License](https://github.com/vercel/vercel/blob/master/LICENSE).
This repository is an open source project. See the [License](https://github.com/vercel/vercel/blob/main/LICENSE).
@@ -6,7 +6,7 @@ This directory is a brief example of an [AMP](https://amp.dev/) site that can be
Deploy your own AMP project with Vercel.
Deploy your own AMP project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/amp)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/amp)
@@ -8,7 +8,7 @@ This directory is a brief example of an [Angular](https://angular.io/) app that
Deploy your own Angular project with Vercel.
Deploy your own Angular project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/angular)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/angular&template=angular)
@@ -8,7 +8,7 @@ This directory is a brief example of a [Blitz.js](https://blitzjs.com/) project
Deploy your own Blitz.js project with Vercel by viewing the [documentation on deploying to Vercel](https://blitzjs.com/docs/deploy-vercel)
Deploy your own Blitz.js project with Vercel by viewing the [documentation on deploying to Vercel](https://blitzjs.com/docs/deploy-vercel)
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/blitzjs)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/blitzjs&template=blitzjs)
@@ -6,7 +6,7 @@ This directory is a brief example of a [Brunch](https://brunch.io/) site that ca
Deploy your own Brunch project with Vercel.
Deploy your own Brunch project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/brunch)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/brunch&template=brunch)
@@ -8,7 +8,7 @@ This directory is a brief example of a [React](https://reactjs.org/) app with [S
Deploy your own React project, along with Serverless Functions, with Vercel.
Deploy your own React project, along with Serverless Functions, with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/create-react-app-functions)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/create-react-app-functions&template=create-react-app)
@@ -6,7 +6,7 @@ This directory is a brief example of using a Custom Build script that can be dep
Deploy your own Custom Built project with Vercel.
Deploy your own Custom Built project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/custom-build)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/custom-build)
@@ -6,7 +6,7 @@ This directory is a brief example of a [Docusaurus](https://v2.docusaurus.io) si
Deploy your own Docusaurus project with Vercel.
Deploy your own Docusaurus project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/docusaurus-2)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/docusaurus-2&template=docusaurus-2)
@@ -8,7 +8,7 @@ This directory is a brief example of a [Docusaurus](https://docusaurus.io/) site
Deploy your own Docusaurus project with Vercel.
Deploy your own Docusaurus project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/docusaurus)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/docusaurus&template=docusaurus)
@@ -6,7 +6,7 @@ This directory is a brief example of a [Dojo](https://dojo.io) site that can be
Deploy your own Dojo project with Vercel.
Deploy your own Dojo project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/dojo)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/dojo&template=dojo)
@@ -8,7 +8,7 @@ This directory is a brief example of a [Eleventy](https://www.11ty.io/) site tha
Deploy your own Eleventy project with Vercel.
Deploy your own Eleventy project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/eleventy)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/eleventy&template=eleventy)
@@ -8,7 +8,7 @@ This directory is a brief example of an [Ember](https://emberjs.com/) app that c
Deploy your own Ember project with Vercel.
Deploy your own Ember project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/ember)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/ember&template=ember)
@@ -8,7 +8,7 @@ This directory is a brief example of a [Gatsby](https://www.gatsbyjs.org/) app w
Deploy your own Gatsby project, along with Serverless Functions, with Vercel.
Deploy your own Gatsby project, along with Serverless Functions, with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/gatsby)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/gatsby&template=gatsby)
@@ -8,7 +8,7 @@ This directory is a brief example of a [Gridsome](https://gridsome.org/) app tha
Deploy your own Gridsome project with Vercel.
Deploy your own Gridsome project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/gridsome)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/gridsome&template=gridsome)
@@ -8,7 +8,7 @@ This directory is a brief example of a [Hexo](https://hexo.io/) site that can be
Deploy your own Hexo project with Vercel.
Deploy your own Hexo project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/hexo)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/hexo&template=hexo)
@@ -6,7 +6,7 @@ This directory is a brief example of a [Hugo](https://gohugo.io/) app that can b
Deploy your own Hugo project with Vercel.
Deploy your own Hugo project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/hugo)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/hugo&template=hugo)
@@ -6,7 +6,7 @@ This directory is a brief example of an [Ionic Angular](https://ionicframework.c
Deploy your own Ionic Angular project with Vercel.
Deploy your own Ionic Angular project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/ionic-angular)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/ionic-angular&template=ionic-angular)
@@ -6,7 +6,7 @@ This directory is a brief example of an [Ionic React](https://ionicframework.com
Deploy your own Ionic React project with Vercel.
Deploy your own Ionic React project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/ionic-react)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/ionic-react&template=ionic-react)
@@ -6,7 +6,7 @@ This directory is a brief example of a [Jekyll](https://jekyllrb.com/) site that
Deploy your own Jekyll project with Vercel.
Deploy your own Jekyll project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/jekyll)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/jekyll&template=jekyll)
@@ -6,7 +6,7 @@ This directory is a brief example of a [Middleman](https://middlemanapp.com/) si
Deploy your own Middleman project with Vercel.
Deploy your own Middleman project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/middleman)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/middleman&template=middleman)
@@ -29,6 +29,6 @@ You can check out [the Next.js GitHub repository](https://github.com/vercel/next
## Deploy on Vercel
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/import?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
@@ -6,9 +6,9 @@ This directory is a brief example of a [Nuxt.js](https://nuxtjs.org) app that ca
Deploy your own Nuxt.js project with Vercel.
Deploy your own Nuxt.js project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/nuxtjs)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/nuxtjs&template=nuxtjs)
This is a vanilla web app built with [Parcel](https://parceljs.org).
## Getting Started
Run the dev server:
```bash
yarn start
# or
npm start
```
And open [localhost:1234](http://localhost:1234) in your browser!
As you make changes, you should see your app automatically update in the browser without even refreshing the page!
## Learn More
- [Getting started guide](https://parceljs.org/getting-started/webapp/)
- [Documentation](https://parceljs.org/docs/)
## Deploy Your Own
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/parcel&template=parcel)
<p>This is a vanilla web app built with Parcel 2!<br>Check out the <ahref="https://parceljs.org/getting-started/webapp/"target="_blank">getting started guide</a> and the <ahref="https://parceljs.org/docs/"target="_blank">documentation</a> to learn more!</p>
@@ -8,7 +8,7 @@ This directory is a brief example of a [Polymer](https://www.polymer-project.org
Deploy your own Polymer project with Vercel.
Deploy your own Polymer project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/polymer)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/polymer&template=polymer)
@@ -8,7 +8,7 @@ This directory is a brief example of a [Preact](https://preactjs.com/) app that
Deploy your own Preact project with Vercel.
Deploy your own Preact project with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/preact)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/preact&template=preact)
@@ -8,7 +8,7 @@ This directory is a brief example of a [RedwoodJS](https://redwoodjs.com) app wi
Deploy your own RedwoodJS project, along with Serverless Functions, with Vercel.
Deploy your own RedwoodJS project, along with Serverless Functions, with Vercel.
[](https://vercel.com/import/project?template=https://github.com/vercel/vercel/tree/main/examples/redwoodjs)
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/redwoodjs&template=redwoodjs)
After having run the `create-remix` command and selected "Vercel" as a deployment target, you only need to [import your Git repository](https://vercel.com/new) into Vercel, and it will be deployed.
If you'd like to avoid using a Git repository, you can also deploy the directory by running [Vercel CLI](https://vercel.com/cli):
```sh
npm i -g vercel
vercel
```
It is generally recommended to use a Git repository, because future commits will then automatically be deployed by Vercel, through its [Git Integration](https://vercel.com/docs/concepts/git).
## Development
To run your Remix app locally, make sure your project's local dependencies are installed:
```sh
npm install
```
Afterwards, start the Remix development server like so:
```sh
npm run dev
```
Open up [http://localhost:3000](http://localhost:3000) and you should be ready to go!
If you're used to using the `vercel dev` command provided by [Vercel CLI](https://vercel.com/cli) instead, you can also use that, but it's not needed.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.