File tree Expand file tree Collapse file tree 3 files changed +45
-1
lines changed
Expand file tree Collapse file tree 3 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 3030 "./extensions/audioWaveform" : " ./src/extensions/audioWaveform.ts" ,
3131 "./extensions/typescript" : " ./src/extensions/typescript.ts" ,
3232 "./extensions/puppeteer" : " ./src/extensions/puppeteer.ts" ,
33- "./extensions/playwright" : " ./src/extensions/playwright.ts"
33+ "./extensions/playwright" : " ./src/extensions/playwright.ts" ,
34+ "./extensions/lightpanda" : " ./src/extensions/lightpanda.ts"
3435 },
3536 "sourceDialects" : [
3637 " @triggerdotdev/source"
6162 ],
6263 "extensions/playwright" : [
6364 " dist/commonjs/extensions/playwright.d.ts"
65+ ],
66+ "extensions/lightpanda" : [
67+ " dist/commonjs/extensions/lightpanda.d.ts"
6468 ]
6569 }
6670 },
188192 "types" : " ./dist/commonjs/extensions/playwright.d.ts" ,
189193 "default" : " ./dist/commonjs/extensions/playwright.js"
190194 }
195+ },
196+ "./extensions/lightpanda" : {
197+ "import" : {
198+ "@triggerdotdev/source" : " ./src/extensions/lightpanda.ts" ,
199+ "types" : " ./dist/esm/extensions/lightpanda.d.ts" ,
200+ "default" : " ./dist/esm/extensions/lightpanda.js"
201+ },
202+ "require" : {
203+ "types" : " ./dist/commonjs/extensions/lightpanda.d.ts" ,
204+ "default" : " ./dist/commonjs/extensions/lightpanda.js"
205+ }
191206 }
192207 },
193208 "main" : " ./dist/commonjs/index.js" ,
Original file line number Diff line number Diff line change 1+ import type { BuildExtension } from "@trigger.dev/core/v3/build" ;
2+
3+ type LightpandaOpts = {
4+ arch ?: 'aarch64' | 'x86_64'
5+ version ?: 'nightly'
6+ }
7+
8+ export const lightpanda = ( { arch = 'x86_64' , version = 'nightly' } : LightpandaOpts = { } ) : BuildExtension => ( {
9+ name : "LightpandaExtension" ,
10+ onBuildComplete : async ( context ) => {
11+ if ( context . target === "dev" ) {
12+ return
13+ }
14+
15+ context . logger . debug ( lightpanda . name ) ;
16+ context . addLayer ( {
17+ id : "lightpanda" ,
18+ image : {
19+ instructions : [
20+ `RUN apt-get update && apt-get install curl -y \ &&
21+ curl -L -o lightpanda https://github.com/lightpanda-io/browser/releases/download/${ version } /lightpanda-${ arch } -linux \ &&
22+ chmod a+x ./lightpanda` ,
23+ ] ,
24+ } ,
25+ } )
26+ } ,
27+ } )
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { audioWaveform } from "@trigger.dev/build/extensions/audioWaveform";
66import { additionalFiles , ffmpeg , syncEnvVars } from "@trigger.dev/build/extensions/core" ;
77import { puppeteer } from "@trigger.dev/build/extensions/puppeteer" ;
88import { playwright } from "@trigger.dev/build/extensions/playwright" ;
9+ import { lightpanda } from "@trigger.dev/build/extensions/lightpanda" ;
910import { prismaExtension } from "@trigger.dev/build/extensions/prisma" ;
1011import { emitDecoratorMetadata } from "@trigger.dev/build/extensions/typescript" ;
1112import { defineConfig } from "@trigger.dev/sdk/v3" ;
@@ -83,6 +84,7 @@ export default defineConfig({
8384 } ) ,
8485 puppeteer ( ) ,
8586 playwright ( ) ,
87+ lightpanda ( ) ,
8688 ] ,
8789 external : [ "re2" ] ,
8890 } ,
You can’t perform that action at this time.
0 commit comments