@emulators/vercel 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# @emulators/vercel
|
|
2
|
+
|
|
3
|
+
Fully stateful Vercel API emulation with Vercel-style JSON responses and cursor-based pagination.
|
|
4
|
+
|
|
5
|
+
Part of [emulate](https://github.com/vercel-labs/emulate) — local drop-in replacement services for CI and no-network sandboxes.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @emulators/vercel
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Endpoints
|
|
14
|
+
|
|
15
|
+
### User & Teams
|
|
16
|
+
- `GET /v2/user` — authenticated user
|
|
17
|
+
- `PATCH /v2/user` — update user
|
|
18
|
+
- `GET /v2/teams` — list teams (cursor paginated)
|
|
19
|
+
- `GET /v2/teams/:teamId` — get team (by ID or slug)
|
|
20
|
+
- `POST /v2/teams` — create team
|
|
21
|
+
- `PATCH /v2/teams/:teamId` — update team
|
|
22
|
+
- `GET /v2/teams/:teamId/members` — list members
|
|
23
|
+
- `POST /v2/teams/:teamId/members` — add member
|
|
24
|
+
|
|
25
|
+
### Projects
|
|
26
|
+
- `POST /v11/projects` — create project (with optional env vars and git integration)
|
|
27
|
+
- `GET /v10/projects` — list projects (search, cursor pagination)
|
|
28
|
+
- `GET /v9/projects/:idOrName` — get project (includes env vars)
|
|
29
|
+
- `PATCH /v9/projects/:idOrName` — update project
|
|
30
|
+
- `DELETE /v9/projects/:idOrName` — delete project (cascades)
|
|
31
|
+
- `GET /v1/projects/:projectId/promote/aliases` — promote aliases status
|
|
32
|
+
- `PATCH /v1/projects/:idOrName/protection-bypass` — manage bypass secrets
|
|
33
|
+
|
|
34
|
+
### Deployments
|
|
35
|
+
- `POST /v13/deployments` — create deployment (auto-transitions to READY)
|
|
36
|
+
- `GET /v13/deployments/:idOrUrl` — get deployment (by ID or URL)
|
|
37
|
+
- `GET /v6/deployments` — list deployments (filter by project, target, state)
|
|
38
|
+
- `DELETE /v13/deployments/:id` — delete deployment (cascades)
|
|
39
|
+
- `PATCH /v12/deployments/:id/cancel` — cancel building deployment
|
|
40
|
+
- `GET /v2/deployments/:id/aliases` — list deployment aliases
|
|
41
|
+
- `GET /v3/deployments/:idOrUrl/events` — get build events/logs
|
|
42
|
+
- `GET /v6/deployments/:id/files` — list deployment files
|
|
43
|
+
- `POST /v2/files` — upload file (by SHA digest)
|
|
44
|
+
|
|
45
|
+
### Domains
|
|
46
|
+
- `POST /v10/projects/:idOrName/domains` — add domain (with verification challenge)
|
|
47
|
+
- `GET /v9/projects/:idOrName/domains` — list domains
|
|
48
|
+
- `GET /v9/projects/:idOrName/domains/:domain` — get domain
|
|
49
|
+
- `PATCH /v9/projects/:idOrName/domains/:domain` — update domain
|
|
50
|
+
- `DELETE /v9/projects/:idOrName/domains/:domain` — remove domain
|
|
51
|
+
- `POST /v9/projects/:idOrName/domains/:domain/verify` — verify domain
|
|
52
|
+
|
|
53
|
+
### Environment Variables
|
|
54
|
+
- `GET /v10/projects/:idOrName/env` — list env vars (with decrypt option)
|
|
55
|
+
- `POST /v10/projects/:idOrName/env` — create env vars (single, batch, upsert)
|
|
56
|
+
- `GET /v10/projects/:idOrName/env/:id` — get env var
|
|
57
|
+
- `PATCH /v9/projects/:idOrName/env/:id` — update env var
|
|
58
|
+
- `DELETE /v9/projects/:idOrName/env/:id` — delete env var
|
|
59
|
+
|
|
60
|
+
## Auth
|
|
61
|
+
|
|
62
|
+
All endpoints accept `teamId` or `slug` query params for team scoping. Pagination uses cursor-based `limit`/`since`/`until` with `pagination` response objects.
|
|
63
|
+
|
|
64
|
+
## Seed Configuration
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
vercel:
|
|
68
|
+
users:
|
|
69
|
+
- username: developer
|
|
70
|
+
name: Developer
|
|
71
|
+
email: dev@example.com
|
|
72
|
+
teams:
|
|
73
|
+
- slug: my-team
|
|
74
|
+
name: My Team
|
|
75
|
+
projects:
|
|
76
|
+
- name: my-app
|
|
77
|
+
team: my-team
|
|
78
|
+
framework: nextjs
|
|
79
|
+
integrations:
|
|
80
|
+
- client_id: "oac_abc123"
|
|
81
|
+
client_secret: "secret_abc123"
|
|
82
|
+
name: "My Vercel App"
|
|
83
|
+
redirect_uris:
|
|
84
|
+
- "http://localhost:3000/api/auth/callback/vercel"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Links
|
|
88
|
+
|
|
89
|
+
- [Full documentation](https://emulate.dev/vercel)
|
|
90
|
+
- [GitHub](https://github.com/vercel-labs/emulate)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emulators/vercel",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"hono": "^4",
|
|
31
|
-
"@emulators/core": "0.4.
|
|
31
|
+
"@emulators/core": "0.4.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"tsup": "^8",
|