UNPKG

trigger.dev

Version:

A Command-Line Interface for Trigger.dev projects

15 lines 570 B
import { CliApiClient } from "../../apiClient.js"; import { login } from "../login.js"; export async function getPatApiClient(options) { const authorization = await login({ embedded: true, defaultApiUrl: options.apiUrl, profile: options.profile, silent: true, }); if (!authorization.ok) { throw new Error(`You must login first. Use the \`login\` CLI command.\n\n${authorization.error}`); } return new CliApiClient(authorization.auth.apiUrl, authorization.auth.accessToken); } //# sourceMappingURL=common.js.map