Skip to content

Commit

Permalink
feat(vercel): add archive option for deploy executor (#292)
Browse files Browse the repository at this point in the history
This option can be passed to the executor options to make the Vercel CLI
archive the build before uploading.

This is required for projects with >15000 files, as the Vercel CLI will
otherwise throw an error:
```
Error: Invalid request: `files` should NOT have more than 15000 items, received 17185.
```

Thanks for creating this and please let me know if you'd like me to add
anything else to the PR 😄
  • Loading branch information
TriPSs authored Jun 24, 2024
2 parents dc49a85 + b2e6388 commit 5513c99
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vercel/src/executors/deploy/deploy.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { vercelToken } from '../../utils/vercel-token'
export interface DeployOptions {
buildTarget?: string
regions?: string
archive?: 'tgz'
}

export async function deployExecutor(
Expand Down Expand Up @@ -51,6 +52,7 @@ export async function deployExecutor(
context.configurationName === 'production' && '--prod',
vercelToken && `--token=${vercelToken}`,
options.regions && `--regions=${options.regions}`,
options.archive && `--archive=${options.archive}`,

USE_VERBOSE_LOGGING && '--debug'
]), {
Expand Down
12 changes: 12 additions & 0 deletions packages/vercel/src/executors/deploy/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@
"regions": {
"type": "string",
"description": "Regions to deploy to"
},
"buildTarget": {
"type": "string",
"description": "Build target to deploy"
},
"archive": {
"type": "string",
"description": "Type of archive to use when uploading the build",
"enum": ["tgz"],
"$default": "atom",
"x-prompt": "Archive type",
"x-display": "radio"
}
}
}

0 comments on commit 5513c99

Please sign in to comment.