This repository has been archived by the owner on Aug 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move code to monorepo subfolder
- Loading branch information
1 parent
19b2886
commit c479176
Showing
139 changed files
with
322 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,22 @@ | ||
BIN_DIR=node_modules/.bin | ||
clean-deps: | ||
docker compose down | ||
|
||
test: unit integration | ||
|
||
unit: | ||
yarn test:unit | ||
|
||
integration: | ||
yarn test:integration | ||
|
||
test-in-ci: | ||
start-deps: | ||
docker compose up -d | ||
. ./.envrc && \ | ||
LOG_LEVEL=error node_modules/.bin/jest --bail --runInBand --ci --reporters=default --reporters=jest-junit | ||
direnv reload | ||
|
||
reset-deps: clean-deps start-deps | ||
|
||
integration-in-ci: | ||
docker compose up -d | ||
. ./.envrc && \ | ||
sleep 10 && \ | ||
yarn migrate-ts up && \ | ||
LOG_LEVEL=error $(BIN_DIR)/jest --config ./test/jest-integration.config.js --bail --runInBand --ci --reporters=default --reporters=jest-junit | ||
dealer-integration-in-ci: | ||
sleep 10 | ||
yarn dealer migrate-ts up | ||
yarn dealer ci:test:integration | ||
|
||
unit-in-ci: | ||
. ./.envrc && \ | ||
LOG_LEVEL=warn $(BIN_DIR)/jest --config ./test/jest-unit.config.js --ci --bail | ||
dealer-check-code: | ||
yarn dealer tsc-check | ||
yarn dealer eslint-check | ||
yarn dealer build | ||
|
||
check-code: | ||
yarn tsc-check | ||
yarn eslint-check | ||
yarn prettier-check | ||
yarn build | ||
dealer-unit-in-ci: | ||
. ./.envrc && yarn dealer ci:test:unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"name": "dealer", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"repository": "[email protected]:GaloyMoney/dealer.git", | ||
"author": "Sebastien Verreault <[email protected]>", | ||
"license": "MIT", | ||
"scripts": { | ||
"tsc-check": "tsc --noEmit --skipLibCheck", | ||
"eslint-check": "eslint \"src/**/*.ts\"", | ||
"eslint-fix": "eslint \"src/**/*.ts\" --fix", | ||
"build-og": "tsc -p tsconfig-build.json --skipLibCheck", | ||
"build": "tsc -p tsconfig-build.json --skipLibCheck; cp -r ./src/database/sql ./lib/database/ && cp -r ./src/servers/price/proto ./lib/servers/price/", | ||
"test:unit": "jest --config ./test/jest-unit.config.js --bail --verbose $TEST | yarn pino-pretty -c -l", | ||
"test:integration": "jest --config ./test/jest-integration.config.js --bail --verbose $TEST | yarn pino-pretty -c -l", | ||
"ci:test:unit": "LOGLEVEL=warn yarn jest --config ./test/jest-unit.config.js --ci --bail", | ||
"ci:test:integration": "LOGLEVEL=warn yarn jest --config ./test/jest-integration.config.js --ci --bail", | ||
"servers:graphql:pretty": "yarn build && node lib/servers/graphql/WalletGraphqlServer.js | pino-pretty -c -l", | ||
"servers:graphql:elk": "yarn build && node lib/servers/graphql/WalletGraphqlServer.js | pino-elasticsearch", | ||
"servers:exporter:pretty": "yarn build && node lib/servers/exporter/exporter.js | pino-pretty -c -l", | ||
"servers:exporter:elk": "yarn build && node lib/servers/exporter/exporter.js | pino-elasticsearch", | ||
"servers:price:pretty": "yarn build && node lib/servers/price/index.js | pino-pretty -c -l", | ||
"servers:price-client:pretty": "yarn build && node lib/servers/price/sample_client.js | pino-pretty -c -l", | ||
"app:scheduler:pretty": "yarn build && node lib/app/scheduler.js | pino-pretty -c -l", | ||
"app:scheduler:elk": "yarn build && node lib/app/scheduler.js | pino-elasticsearch", | ||
"app:dealer:pretty": "yarn build && node lib/app/dealer.js | pino-pretty -c -l", | ||
"app:dealer:elk": "yarn build && node lib/app/dealer.js | pino-elasticsearch", | ||
"migrate-js": "node-pg-migrate --create-schema true --schema dealer --migration-filename-format utc --migration-file-language js", | ||
"migrate-sql": "node-pg-migrate --create-schema true --schema dealer --migration-filename-format utc --migration-file-language sql", | ||
"migrate-ts": "node-pg-migrate --create-schema true --schema dealer --migration-filename-format utc --migration-file-language ts --tsconfig ./tsconfig.json " | ||
}, | ||
"dependencies": { | ||
"@apollo/client": "^3.3.21", | ||
"@grpc/grpc-js": "^1.5.3", | ||
"@opentelemetry/instrumentation-grpc": "^0.27.0", | ||
"@profusion/apollo-validation-directives": "^2.1.5", | ||
"apollo-server-errors": "^2.5.0", | ||
"apollo-server-express": "^2.25.2", | ||
"black-scholes-model": "^1.0.10", | ||
"ccxt": "^1.61.93", | ||
"csv-parse": "^4.16.0", | ||
"dateformat": "^4.5.1", | ||
"dotenv": "^10.0.0", | ||
"express": "^4.17.1", | ||
"graphql": "^15.5.1", | ||
"graphql-middleware": "^6.1.3", | ||
"graphql-tools": "^8.1.0", | ||
"humps": "^2.0.1", | ||
"js-yaml": "^4.1.0", | ||
"lodash": "^4.17.21", | ||
"node-cron": "^3.0.0", | ||
"node-fetch": "^2.6.1", | ||
"node-pg-migrate": "^6.0.0", | ||
"pg": "^8.7.1", | ||
"pg-promise": "^10.11.0", | ||
"pino": "^7.0.0-rc.1", | ||
"pino-http": "^5.6.0", | ||
"prom-client": "^13.2.0", | ||
"ts-md5": "^1.2.10", | ||
"typescript": "^4.5.5", | ||
"uuid": "^8.3.2" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": ["src/servers/**/*.ts", "src/app/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../tsconfig.base.json", | ||
"compilerOptions": { | ||
"outDir": "lib", | ||
"baseUrl": "./" | ||
}, | ||
"include": ["src/**/*", "migrations/**/*", "test/**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"ignorePatterns": ["/*.js", "dist", "coverage"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "tsconfig.json", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["eslint-plugin-import", "@typescript-eslint", "prettier"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"rules": { | ||
// Customized rules | ||
"@typescript-eslint/no-extra-semi": "off", // Prettier work | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/prefer-for-of": "error", | ||
"@typescript-eslint/unified-signatures": "error", | ||
|
||
"import/no-deprecated": "error", | ||
"import/no-extraneous-dependencies": "error", | ||
"import/no-unassigned-import": "error", | ||
"import/no-unresolved": "off", | ||
"import/order": ["error", { "newlines-between": "always-and-inside-groups" }], | ||
|
||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"semi": false, | ||
"trailingComma": "all", | ||
"printWidth": 90, | ||
"quoteProps": "consistent", | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"bracketSpacing": true, | ||
"arrowParens": "always", | ||
"proseWrap": "preserve", | ||
"endOfLine": "lf" | ||
} | ||
], | ||
|
||
"arrow-body-style": "off", | ||
|
||
"prefer-arrow-callback": "error", | ||
"no-duplicate-imports": "error", | ||
"no-empty-function": "error", | ||
"no-empty": ["error", { "allowEmptyCatch": true }], | ||
"no-new-wrappers": "error", | ||
"no-param-reassign": "error", | ||
"no-return-await": "error", | ||
"no-sequences": "error", | ||
"no-throw-literal": "error", | ||
"no-void": "error", | ||
|
||
// Temporarily disabled recommended rules | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"no-async-promise-executor": "off" | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"paths": ["."] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.