trigger.dev
Version:
A Command-Line Interface for Trigger.dev (v3) projects
69 lines (68 loc) • 2.1 kB
TypeScript
import { ResolvedConfig } from "@trigger.dev/core/v3/build";
import { BuildManifest, BuildTarget } from "@trigger.dev/core/v3/schemas";
import { BundleResult } from "./bundle.js";
export type BuildWorkerEventListener = {
onBundleStart?: () => void;
onBundleComplete?: (result: BundleResult) => void;
};
export type BuildWorkerOptions = {
destination: string;
target: BuildTarget;
environment: string;
resolvedConfig: ResolvedConfig;
listener?: BuildWorkerEventListener;
envVars?: Record<string, string>;
rewritePaths?: boolean;
forcedExternals?: string[];
};
export declare function buildWorker(options: BuildWorkerOptions): Promise<{
environment: string;
contentHash: string;
packageVersion: string;
cliPackageVersion: string;
deploy: {
env?: Record<string, string> | undefined;
sync?: {
env?: Record<string, string> | undefined;
} | undefined;
};
target: "dev" | "deploy";
runtime: "node" | "bun";
config: {
project: string;
dirs: string[];
};
files: {
out: string;
entry: string;
}[];
sources: Record<string, {
contentHash: string;
contents: string;
}>;
outputPath: string;
runWorkerEntryPoint: string;
indexWorkerEntryPoint: string;
configPath: string;
build: {
env?: Record<string, string> | undefined;
commands?: string[] | undefined;
};
runControllerEntryPoint?: string | undefined;
indexControllerEntryPoint?: string | undefined;
loaderEntryPoint?: string | undefined;
externals?: {
name: string;
version: string;
}[] | undefined;
customConditions?: string[] | undefined;
image?: {
pkgs?: string[] | undefined;
instructions?: string[] | undefined;
} | undefined;
otelImportHook?: {
include?: string[] | undefined;
exclude?: string[] | undefined;
} | undefined;
}>;
export declare function rewriteBuildManifestPaths(buildManifest: BuildManifest, destinationDir: string): BuildManifest;