Skip to content

Commit

Permalink
chore: testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ijemmao committed Sep 27, 2024
1 parent 884bf42 commit 0a2a1e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "server.js",
"scripts": {
"build": "rm -rf dist/ && rm -rf build/ && npm run build:site && npm run build:src",
"build:src": "tsc && cross-env NODE_ENV=build npm run build:dictionaries && npm run build:functions",
"build:src": "cross-env NODE_ENV=build npm run build:dictionaries && npm run build:functions",
"build:functions": "rm -rf functions/src && shx cp -r ./build ./functions && shx cp -r ./dist ./functions && shx cp -r ./build/src/dictionaries/ig-en ./functions/dictionaries",
"build:dictionaries:ig:en": "[ ! -d \"./build/src/dictionaries\" ] && shx mkdir ./build/src/dictionaries || echo '' && [ ! -d \"./build/src/dictionaries/ig-en\" ] && shx mkdir ./build/src/dictionaries/ig-en || echo 'Igbo to English dictionaries dir already exists'",
"build:dictionaries:en:ig": "[ ! -d \"./build/src/dictionaries\" ] && shx mkdir ./build/src/dictionaries || echo '' && [ ! -d \"./build/src/dictionaries/en-ig\" ] && shx mkdir ./build/src/dictionaries/en-ig || echo 'English to Igbo dictionaries dir already exists'",
Expand Down Expand Up @@ -72,6 +72,9 @@
"*.{js,ts}": [
"./node_modules/.bin/prettier --write",
"./node_modules/.bin/eslint"
],
"src*.{ts,tsx}": [
"echo \"run it back\"; exit 1"
]
},
"license": "ISC",
Expand Down Expand Up @@ -139,7 +142,7 @@
"string-similarity": "^4.0.2",
"stripe": "^15.1.0",
"tailwindcss": "3",
"typescript": "^4.0.3",
"typescript": "^5.6.2",
"unicharadata": "^9.0.0-alpha.6",
"uuid": "^8.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/utils/buildDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const cleanExamples = ({ examples, version }: { examples: IncomingExample[], ver
['source', 'translations']
);
if (version === Version.VERSION_1) {
cleanedExample.pronunciation = example.source.pronunciations?.[0]?.audio || '';
cleanedExample.pronunciationss = example.source.pronunciations?.[0]?.audio || '';
} else {
cleanedExample.pronunciations = example.source.pronunciations.map(({ audio }) => audio);
}
Expand Down
4 changes: 3 additions & 1 deletion src/types/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export interface IgboAPIRequest extends ExpressRequest {
headers: ExpressRequest['headers'];
user?: DecodedIdToken;
developer?: Developer;
baseUrl: string;
method: string;
params: { [key: string]: string };
body: ExpressRequest['body'] & StripeBody;
}
Expand All @@ -44,4 +46,4 @@ export interface MiddleWare {

export interface ErrorMiddleWare {
(error: Error, req: IgboAPIRequest, res: Response, next: NextFunction): void;
}
}

0 comments on commit 0a2a1e7

Please sign in to comment.