File tree Expand file tree Collapse file tree 3 files changed +9
-15
lines changed
Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export const ABTests: ABTest[] = [
2929 status : 'ON' ,
3030 expirationDate : '2050-12-30' ,
3131 type : 'client' ,
32- audienceSize : 5 / 100 ,
32+ audienceSize : 0 / 100 ,
3333 groups : [ 'control' , 'variant' ] ,
3434 shouldForceMetricsCollection : true ,
3535 } ,
@@ -41,7 +41,7 @@ export const ABTests: ABTest[] = [
4141 status : 'ON' ,
4242 expirationDate : '2050-12-30' ,
4343 type : 'server' ,
44- audienceSize : 5 / 100 ,
44+ audienceSize : 0 / 100 ,
4545 groups : [ 'control' , 'variant' ] ,
4646 shouldForceMetricsCollection : true ,
4747 } ,
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=dist scripts/build/index.ts --mvts=mvts.json --ab-tests=ab-tests.json"
5+ "build" : " deno run --allow-write=dist --allow- env=FASTLY_AB_TESTING_CONFIG,FASTLY_API_TOKEN --allow-net=api.fastly.com:443 scripts/build/index.ts --mvts=dist/ mvts.json --ab-tests=dist/ 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,22 +38,16 @@ const mvtDictArray = Array.from(
3838
3939console . log ( `Writing ${ mvtDictArray . length } MVT groups to ${ flags [ 'mvts' ] } ` ) ;
4040
41- const distDirName = 'dist' ;
42-
43- // Ensure the dist folder exists
44- await Deno . mkdir ( distDirName , { recursive : true } ) ;
45-
46- // Build absolute output path inside dist/
47- const abTestsPath = `${ distDirName } /${ flags [ 'ab-tests' ] } ` ;
41+ // Ensure the build's destination folder path exists
42+ for ( const path of [ flags [ 'mvts' ] , flags [ 'ab-tests' ] ] ) {
43+ await Deno . mkdir ( dirname ( path ) , { recursive : true } ) ;
44+ }
4845
4946// write the abTestDictArray to a file
5047await Deno . writeTextFile (
51- abTestsPath ,
48+ flags [ 'ab-tests' ] ,
5249 JSON . stringify ( abTestGroupKeyValues , null , 2 ) ,
5350) ;
5451
55- // Build absolute output pats inside dist/
56- const mvtsPath = `${ distDirName } /${ flags [ 'mvts' ] } ` ;
57-
5852// write the mvtKVsArray to a file
59- await Deno . writeTextFile ( mvtsPath , JSON . stringify ( mvtDictArray , null , 2 ) ) ;
53+ await Deno . writeTextFile ( flags [ 'mvts' ] , JSON . stringify ( mvtDictArray , null , 2 ) ) ;
You can’t perform that action at this time.
0 commit comments