Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SLT-157] feat(rest-api): Refactor for RESTful architectural standardization #3126

Merged
merged 15 commits into from
Sep 16, 2024
3 changes: 3 additions & 0 deletions packages/rest-api/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-typescript"]
}
8 changes: 8 additions & 0 deletions packages/rest-api/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
module.exports = {
extends: '../../.eslintrc.js',
overrides: [
{
files: ['jest.config.js'],
rules: {
'prettier/prettier': 'off',
},
},
],
}
10 changes: 10 additions & 0 deletions packages/rest-api/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src'],
transform: {
'^.+\\.(ts|tsx)$': 'babel-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleDirectories: ['node_modules', 'src'],
}
15 changes: 12 additions & 3 deletions packages/rest-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
"scripts": {
"build": "tsc",
"build:go": " ",
"dev": "nodemon --watch src --exec ts-node src/app.ts",
"start": "node dist/app.js",
"lint:fix": "eslint src/**/*.ts --fix",
"lint:check": "eslint . --max-warnings=0",
"ci:lint": "npm run lint:check",
"test": "tsdx test",
"test": "jest",
"test:coverage": "echo 'No tests defined.'",
"postinstall": "npm run build"
},
Expand All @@ -24,15 +25,23 @@
"bignumber": "^1.1.0",
"ethers": "5.7.2",
"express": "^4.18.2",
"lodash": "^4.17.21",
"supertest": "^6.3.3"
"express-validator": "^7.2.0",
"lodash": "^4.17.21"
},
"description": "A node.js project exposing a rest api for synapse sdk quotes",
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@babel/preset-typescript": "^7.24.7",
"@types/jest": "^29.5.13",
"@types/supertest": "^6.0.2",
"concurrently": "^8.2.0",
"jest": "^29.7.0",
"lodash": "^4.17.21",
"nodemon": "^3.0.1",
"supertest": "^6.3.3",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "^4.8.3"
}
}
Loading
Loading