File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 22 "tasks" : {
33 "validate" : " deno run scripts/validation/index.ts" ,
44 "deploy" : " deno run --allow-read=dist --allow-env=FASTLY_AB_TESTING_CONFIG --allow-net=api.fastly.com:443 scripts/deploy/index.ts --mvts=dist/mvts.json --ab-tests=dist/ab-tests.json" ,
5- "build" : " deno run --allow-env=FASTLY_AB_TESTING_CONFIG,FASTLY_API_TOKEN --allow-net=api.fastly.com:443 --allow-write scripts/build/index.ts --mvts=dist/ mvts.json --ab-tests=dist/ ab-tests.json"
5+ "build" : " deno run --allow-env=FASTLY_AB_TESTING_CONFIG,FASTLY_API_TOKEN --allow-net=api.fastly.com:443 --allow-write=dist scripts/build/index.ts --mvts=mvts.json --ab-tests=ab-tests.json"
66 },
77 "imports" : {
88 "@std/assert" : " jsr:@std/assert@^1.0.13" ,
Original file line number Diff line number Diff line change @@ -38,14 +38,22 @@ const mvtDictArray = Array.from(
3838
3939console . log ( `Writing ${ mvtDictArray . length } MVT groups to ${ flags [ 'mvts' ] } ` ) ;
4040
41+ const distDirName = 'dist' ;
42+
4143// Ensure the dist folder exists
42- await Deno . mkdir ( 'dist' , { recursive : true } ) ;
44+ await Deno . mkdir ( distDirName , { recursive : true } ) ;
45+
46+ // Build absolute output path inside dist/
47+ const abTestsPath = `${ distDirName } /${ flags [ 'ab-tests' ] } ` ;
4348
4449// write the abTestDictArray to a file
4550await Deno . writeTextFile (
46- flags [ 'ab-tests' ] ,
51+ abTestsPath ,
4752 JSON . stringify ( abTestGroupKeyValues , null , 2 ) ,
4853) ;
4954
55+ // Build absolute output pats inside dist/
56+ const mvtsPath = `${ distDirName } /${ flags [ 'mvts' ] } ` ;
57+
5058// write the mvtKVsArray to a file
51- await Deno . writeTextFile ( flags [ 'mvts' ] , JSON . stringify ( mvtDictArray , null , 2 ) ) ;
59+ await Deno . writeTextFile ( mvtsPath , JSON . stringify ( mvtDictArray , null , 2 ) ) ;
You can’t perform that action at this time.
0 commit comments