UNPKG

trigger.dev

Version:

A Command-Line Interface for Trigger.dev projects

40 lines (39 loc) • 1.8 kB
import { PromoteTrustedDeploymentRequest } from "@trigger.dev/core/v3"; import { z } from "zod"; import { CliApiClient } from "../apiClient.js"; import type { DeployCommandOptions } from "../commands/deploy.js"; import { loadConfig } from "../config.js"; type GithubActionsEnvironment = { GITHUB_ACTIONS?: string; ACTIONS_ID_TOKEN_REQUEST_URL?: string; ACTIONS_ID_TOKEN_REQUEST_TOKEN?: string; }; export type NativeBuildClient = Pick<CliApiClient, "createArtifact" | "initializeDeployment">; export declare function shouldUseGithubOidc(authMethod: "auto" | "oidc", accessToken: string | undefined, environment?: GithubActionsEnvironment): boolean; export declare function validateTrustedDeployOptions(options: Pick<DeployCommandOptions, "localBuild" | "forceLocalBuild" | "depotBuild" | "localBundle" | "fromBundle" | "dryRun">): void; export declare function runTrustedDeploy(projectPath: string, options: DeployCommandOptions, deploy: (args: { apiClient: NativeBuildClient; config: Awaited<ReturnType<typeof loadConfig>>; dashboardUrl: string; options: DeployCommandOptions; branch?: string; }) => Promise<void>): Promise<void>; export declare function trustedDeployApiUrl(options: { apiUrl?: string; profile: string; }): string; export type PreviewArchiveAuth = { type: "oidc"; apiUrl: string; } | { type: "token"; apiUrl: string; accessToken: string; }; export declare function archivePreviewBranch(auth: PreviewArchiveAuth, branch: string, projectRef: string): Promise<void>; export declare function promoteTrustedDeployment(apiUrl: string, target: z.input<typeof PromoteTrustedDeploymentRequest>): Promise<import("@trigger.dev/core/v3/zodfetch").ApiResult<{ id: string; version: string; shortCode: string; }>>; export {};