File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import path from "node:path" ;
22import fs from "node:fs" ;
3- import { globSync } from "glob" ;
43
54const LETTER_STATUSES = [
65 "ACCEPTED" ,
@@ -22,15 +21,15 @@ export function getExampleEvent(status: LetterStatus): unknown {
2221 const examplePath = path . join (
2322 __dirname ,
2423 "../../../../../internal/events/schemas/examples" ,
25- `letter.${ status } .json`
24+ `letter.${ status } .json` ,
2625 ) ;
2726
28- const content = fs . readFileSync ( examplePath , "utf-8 " ) ;
27+ const content = fs . readFileSync ( examplePath , "utf8 " ) ;
2928 return JSON . parse ( content ) ;
3029}
3130
3231export function getMessageProviderForStatus (
33- status : LetterStatus
32+ status : LetterStatus ,
3433) : Record < string , ( ) => Promise < unknown > > {
3534 return {
3635 [ `letter-${ status . toLowerCase ( ) } ` ] : async ( ) => getExampleEvent ( status ) ,
@@ -39,13 +38,13 @@ export function getMessageProviderForStatus(
3938
4039export function getPactUrlForStatus (
4140 consumerPackage : string ,
42- status : LetterStatus
41+ status : LetterStatus ,
4342) : string {
4443 const contractsDir = path . join (
4544 __dirname ,
4645 "../../.contracts" ,
4746 consumerPackage ,
48- "pacts/supplier-api"
47+ "pacts/supplier-api" ,
4948 ) ;
5049
5150 return path . join ( contractsDir , `core-letter-${ status . toLowerCase ( ) } .json` ) ;
Original file line number Diff line number Diff line change 33 "version" : " 1.0.0" ,
44 "private" : true ,
55 "scripts" : {
6- "test:contracts" : " ./scripts/test.sh"
6+ "test:contracts" : " ./scripts/test.sh" ,
7+ "typecheck" : " tsc --noEmit"
78 },
89 "dependencies" : {
910 "@nhsdigital/nhs-notify-event-schemas-supplier-api" : " *" ,
You can’t perform that action at this time.
0 commit comments