Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/vercel

src/smoke-test.js

16 lines · 689 B · JavaScript
import { smokeTest } from './vercel.js'

/**
 * Verify Vercel credentials by reading a trimmed `/v2/user` profile.
 * Without credentials, returns setup URLs instead of throwing.
 * @param {Object} [input]
 * @param {boolean} [input.dryRun] Skip the live `/v2/user` call.
 * @returns {Promise<{ ok: true, live: boolean, user?: Record<string, unknown>, setup: object }>}
 * @example
 * import smokeTest from 'kody:@kody/vercel/smoke-test'
 * const result = await smokeTest({ dryRun: true })
 * // => { ok: true, live: false, dryRun: true, method: 'GET', path: '/v2/user', setup: { … } }
 */
export default async function smokeTestEntrypoint(input = {}) {
	return await smokeTest(input)
}