Vercel

@crvouga/mockingbird-service-vercel

Stateful Vercel public vendor API emulator with native namespaces, checkpoints and test controls.

Parity: Vendor API workflows compared with the pinned Emulate package oracleInfrastructure52 of 52 operationsIn-process fetchNode servermockingbird-vercel
$
npm install -D @crvouga/mockingbird-service-vercel

Playground

Requests go to the real emulator running in this tab. State persists across requests, and the journal shows what it received. A green dot marks operations whose sample succeeds as-is; others need ids from earlier responses.

Loads the real @crvouga/mockingbird-service-vercel into this tab on first send
https://api.vercel.com

Send a request to see the emulator's response.

Operations

52 of 52 operations in the vendored contract are emulated.

MethodPathOperationStatus
DELETE/v1/api-keys/{keyId}DELETE /v1/api-keys/:keyIdDELETE /v1/api-keys/:keyId
DELETE/v13/deployments/{id}DELETE /v13/deployments/:idDELETE /v13/deployments/:id
GET/v9/projects/{idOrName}GET /v9/projects/:idOrNameGET /v9/projects/:idOrName
PATCH/v9/projects/{idOrName}PATCH /v9/projects/:idOrNamePATCH /v9/projects/:idOrName
DELETE/v9/projects/{idOrName}DELETE /v9/projects/:idOrNameDELETE /v9/projects/:idOrName
GET/v9/projects/{idOrName}/domains/{domain}GET /v9/projects/:idOrName/domains/:domainGET /v9/projects/:idOrName/domains/:domain
PATCH/v9/projects/{idOrName}/domains/{domain}PATCH /v9/projects/:idOrName/domains/:domainPATCH /v9/projects/:idOrName/domains/:domain
DELETE/v9/projects/{idOrName}/domains/{domain}DELETE /v9/projects/:idOrName/domains/:domainDELETE /v9/projects/:idOrName/domains/:domain
PATCH/v9/projects/{idOrName}/env/{id}PATCH /v9/projects/:idOrName/env/:idPATCH /v9/projects/:idOrName/env/:id
DELETE/v9/projects/{idOrName}/env/{id}DELETE /v9/projects/:idOrName/env/:idDELETE /v9/projects/:idOrName/env/:id
GET/api/blobGET /api/blobGET /api/blob
PUT/api/blobPUT /api/blobPUT /api/blob
GET/api/blob/GET /api/blob/GET /api/blob/
PUT/api/blob/PUT /api/blob/PUT /api/blob/
GET/blob/{storeId}/{pathname}GET /blob/:storeId/:pathname{.+}GET /blob/:storeId/:pathname{.+}
GET/login/oauth/userinfoGET /login/oauth/userinfoGET /login/oauth/userinfo
GET/oauth/authorizeGET /oauth/authorizeGET /oauth/authorize
GET/registrationGET /registrationGET /registration
GET/v1/api-keysGET /v1/api-keysGET /v1/api-keys
POST/v1/api-keysPOST /v1/api-keysPOST /v1/api-keys
GET/v1/projects/{projectId}/promote/aliasesGET /v1/projects/:projectId/promote/aliasesGET /v1/projects/:projectId/promote/aliases
GET/v10/projectsGET /v10/projectsGET /v10/projects
GET/v10/projects/{idOrName}/envGET /v10/projects/:idOrName/envGET /v10/projects/:idOrName/env
POST/v10/projects/{idOrName}/envPOST /v10/projects/:idOrName/envPOST /v10/projects/:idOrName/env
GET/v10/projects/{idOrName}/env/{id}GET /v10/projects/:idOrName/env/:idGET /v10/projects/:idOrName/env/:id
GET/v13/deployments/{idOrUrl}GET /v13/deployments/:idOrUrlGET /v13/deployments/:idOrUrl
GET/v2/deployments/{id}/aliasesGET /v2/deployments/:id/aliasesGET /v2/deployments/:id/aliases
GET/v2/teamsGET /v2/teamsGET /v2/teams
POST/v2/teamsPOST /v2/teamsPOST /v2/teams
GET/v2/teams/{teamId}GET /v2/teams/:teamIdGET /v2/teams/:teamId
PATCH/v2/teams/{teamId}PATCH /v2/teams/:teamIdPATCH /v2/teams/:teamId
GET/v2/teams/{teamId}/membersGET /v2/teams/:teamId/membersGET /v2/teams/:teamId/members
POST/v2/teams/{teamId}/membersPOST /v2/teams/:teamId/membersPOST /v2/teams/:teamId/members
GET/v2/userGET /v2/userGET /v2/user
PATCH/v2/userPATCH /v2/userPATCH /v2/user
GET/v3/deployments/{idOrUrl}/eventsGET /v3/deployments/:idOrUrl/eventsGET /v3/deployments/:idOrUrl/events
GET/v6/deploymentsGET /v6/deploymentsGET /v6/deployments
GET/v6/deployments/{id}/filesGET /v6/deployments/:id/filesGET /v6/deployments/:id/files
GET/v7/deploymentsGET /v7/deploymentsGET /v7/deployments
GET/v9/projects/{idOrName}/domainsGET /v9/projects/:idOrName/domainsGET /v9/projects/:idOrName/domains
PATCH/v1/projects/{idOrName}/protection-bypassPATCH /v1/projects/:idOrName/protection-bypassPATCH /v1/projects/:idOrName/protection-bypass
PATCH/v12/deployments/{id}/cancelPATCH /v12/deployments/:id/cancelPATCH /v12/deployments/:id/cancel
POST/api/blob/deletePOST /api/blob/deletePOST /api/blob/delete
POST/api/blob/mpuPOST /api/blob/mpuPOST /api/blob/mpu
PUT/api/blob/mpuPUT /api/blob/mpuPUT /api/blob/mpu
POST/login/oauth/tokenPOST /login/oauth/tokenPOST /login/oauth/token
POST/oauth/authorize/callbackPOST /oauth/authorize/callbackPOST /oauth/authorize/callback
POST/v10/projects/{idOrName}/domainsPOST /v10/projects/:idOrName/domainsPOST /v10/projects/:idOrName/domains
POST/v11/projectsPOST /v11/projectsPOST /v11/projects
POST/v13/deploymentsPOST /v13/deploymentsPOST /v13/deployments
POST/v2/filesPOST /v2/filesPOST /v2/files
POST/v9/projects/{idOrName}/domains/{domain}/verifyPOST /v9/projects/:idOrName/domains/:domain/verifyPOST /v9/projects/:idOrName/domains/:domain/verify

Documentation

The package README, the same file that ships in the npm tarball.Edit on GitHub

Local emulators. Real API contracts. Part of Mockingbird.

projects, deployments, domains, env vars, users, teams, file uploads, protection bypass, blob storage. Runs through Mockingbird's portable Fetch runtime with SQLite persistence, namespaces, checkpoints, faults and admin controls.

Install

Shell
npm install @crvouga/mockingbird-service-vercel

Usage

TypeScript
import { Vercel } from "@vercel/sdk"
import { HTTPClient } from "@vercel/sdk/lib/http.js"
import { createRuntime } from "@crvouga/mockingbird-service-vercel"

// Test setup: the emulator, seeded with one synthetic project.
const emulator = createRuntime({ fixtures: { projects: [{ name: "fixture-app", framework: "nextjs" }] } })

// The app's own Vercel client. Only its HTTP client changes: requests reach the
// emulator in this process instead of api.vercel.com.
const vercel = new Vercel({
  bearerToken: "fixture-token",
  httpClient: new HTTPClient({
    fetcher: (input: RequestInfo | URL, init?: RequestInit) => emulator.fetch(new Request(input, init)),
  }),
})
const domain = await vercel.projects.addProjectDomain({
  idOrName: "fixture-app",
  requestBody: { name: "fixture.example.com" },
})
console.log(domain.verified) // false
const { domains } = await vercel.projects.getProjectDomains({ idOrName: "fixture-app" })
console.log(domains.map((each) => each.name)) // ["fixture.example.com"]

@vercel/sdk validates every response against Vercel's full schema. With 1.28 the domain, user, team and deployment-list calls pass; createProject, getProjects, filterProjectEnvs, createProjectEnv and createDeployment reach the emulator but fail the SDK's response validation.

API

  • VercelAPI: portable provider instance; accepts SQLite, namespace, clock, fixtures and baseUrl.
  • createRuntime: shared runtime, including native namespace and checkpoint controls.
  • VERCEL_NAMESPACE: default storage namespace.
  • document, operationIds, supportedOperationIds: registered provider route inventory.
  • createServer, DEFAULT_PORT, serveTarget from /server: loopback listener and CLI configuration.

fixtures accepts synthetic provider seed records. reset() restores defaults. Emulate 0.12.1 is a test oracle only, never a runtime dependency. Vendor handlers ported under Apache-2.0 retain their license and attribution; see LICENSE_EMULATE and THIRD_PARTY_NOTICES.md.

See SUPPORT.md for coverage and limits and API_EVIDENCE.md for validation status.

↑↓ to navigate↵ to open