generated from multiversx/mx-template-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f73b53e
Showing
112 changed files
with
26,549 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NETWORK=devnet | ||
API_URL=https://devnet-api.multiversx.com |
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,2 @@ | ||
NETWORK=mainnet | ||
API_URL=https://api.multiversx.com |
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,2 @@ | ||
NETWORK=testnet | ||
API_URL=https://testnet-api.multiversx.com |
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,149 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
// 'plugin:prettier/recommended', | ||
'plugin:boundaries/strict', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
typescript: { | ||
alwaysTryTypes: true, | ||
project: 'tsconfig.json' | ||
}, | ||
}, | ||
'boundaries/elements': [ | ||
{ | ||
type: 'apps/api', | ||
pattern: 'apps/api', | ||
}, | ||
{ | ||
type: 'apps/cache-warmer', | ||
pattern: 'apps/cache-warmer', | ||
}, | ||
{ | ||
type: 'apps/queue-worker', | ||
pattern: 'apps/queue-worker', | ||
}, | ||
{ | ||
type: 'apps/transactions-processor', | ||
pattern: 'apps/transactions-processor', | ||
}, | ||
{ | ||
type: 'libs/common', | ||
pattern: 'libs/common' | ||
}, | ||
{ | ||
type: 'libs/database', | ||
pattern: 'libs/database' | ||
}, | ||
{ | ||
type: 'libs/entities', | ||
pattern: 'libs/entities' | ||
}, | ||
{ | ||
type: 'libs/services', | ||
pattern: 'libs/services' | ||
}, | ||
] | ||
}, | ||
rules: { | ||
"@typescript-eslint/no-explicit-any": ["off"], | ||
"@typescript-eslint/no-unused-vars": ["off"], | ||
"@typescript-eslint/ban-ts-comment": ["off"], | ||
"@typescript-eslint/no-empty-function": ["off"], | ||
"@typescript-eslint/ban-types": ["off"], | ||
"@typescript-eslint/no-var-requires": ["off"], | ||
"@typescript-eslint/no-inferrable-types": ["off"], | ||
"require-await": ["error"], | ||
"@typescript-eslint/no-floating-promises": ["error"], | ||
"max-len": ["off"], | ||
"semi": ["error"], | ||
"comma-dangle": ["error", "always-multiline"], | ||
"eol-last": ["error"], | ||
'no-restricted-imports': ['error', { | ||
patterns: ['libs/*', 'apps/*', '**/apps', '**/libs'], | ||
}], | ||
"boundaries/element-types": ["error", { | ||
default: 'disallow', | ||
rules: [ | ||
{ | ||
from: 'apps/api', | ||
allow: ['libs/common', 'libs/entities', 'libs/services'] | ||
}, | ||
{ | ||
from: 'apps/cache-warmer', | ||
allow: ['libs/common', 'libs/entities', 'libs/services'] | ||
}, | ||
{ | ||
from: 'apps/queue-worker', | ||
allow: ['libs/common', 'libs/entities', 'libs/services'] | ||
}, | ||
{ | ||
from: 'apps/transactions-processor', | ||
allow: ['libs/common', 'libs/entities', 'libs/services'] | ||
}, | ||
{ | ||
from: 'libs/database', | ||
allow: ['libs/common', 'libs/entities'] | ||
}, | ||
{ | ||
from: 'libs/services', | ||
allow: ['libs/common', 'libs/entities', 'libs/database'] | ||
}, | ||
{ | ||
from: 'libs/common', | ||
allow: ['libs/entities'] | ||
} | ||
] | ||
}], | ||
'boundaries/no-unknown': [2], | ||
'boundaries/no-unknown-files': [2], | ||
'boundaries/no-private': [0] | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
"overrides": [ | ||
{ | ||
"files": ["libs/common/**/*.ts"], | ||
"rules": { | ||
"no-restricted-imports": ["error", { | ||
"patterns": ["@libs/common*"] | ||
}] | ||
} | ||
}, | ||
{ | ||
"files": ["libs/database/**/*.ts"], | ||
"rules": { | ||
"no-restricted-imports": ["error", { | ||
"patterns": ["@libs/database*"] | ||
}] | ||
} | ||
}, | ||
{ | ||
"files": ["libs/entities/**/*.ts"], | ||
"rules": { | ||
"no-restricted-imports": ["error", { | ||
"patterns": ["@libs/entities*"] | ||
}] | ||
} | ||
}, | ||
{ | ||
"files": ["libs/services/**/*.ts"], | ||
"rules": { | ||
"no-restricted-imports": ["error", { | ||
"patterns": ["@libs/services*"] | ||
}] | ||
} | ||
} | ||
] | ||
}; |
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,24 @@ | ||
## Type | ||
|
||
- [ ] Bug | ||
- [ ] Feature | ||
- [ ] Refactoring | ||
- [ ] Performance improvement | ||
|
||
## Problem setting | ||
|
||
- | ||
- | ||
- | ||
|
||
## Proposed Changes | ||
|
||
- | ||
- | ||
- | ||
|
||
## How to 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,29 @@ | ||
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: ESLint | ||
|
||
on: | ||
push: | ||
branches: [main, development] | ||
pull_request: | ||
branches: [main, development] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run lint |
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,49 @@ | ||
# compiled output | ||
/dist | ||
/node_modules | ||
build.yaml | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# OS | ||
.DS_Store | ||
|
||
# Tests | ||
/coverage | ||
/.nyc_output | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# Configs | ||
**/*/config/config.yaml | ||
**/*/config/config.custom.yaml | ||
|
||
**/*/config/schema.json | ||
**/*/config/config.yaml | ||
**/*/config/schema.yaml | ||
|
||
!.multiversx/config/config.yaml | ||
|
||
# Environment | ||
.env | ||
.env.custom |
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,3 @@ | ||
NODE_ENV=infra | ||
NETWORK= | ||
API_URL= |
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,34 @@ | ||
apps: | ||
api: | ||
port: 3000 | ||
privatePort: 4000 | ||
useCachingInterceptor: true | ||
cacheWarmer: | ||
port: 4001 | ||
queueWorker: | ||
port: 4002 | ||
transactionsProcessor: | ||
port: 4003 | ||
maxLookBehind: 100 | ||
libs: | ||
common: | ||
network: ${NETWORK} | ||
urls: | ||
api: ${API_URL} | ||
database: | ||
host: 'localhost' | ||
port: 27017 | ||
# username: 'root' | ||
# password: 'root' | ||
name: 'example' | ||
tlsAllowInvalidCertificates: true | ||
redis: | ||
host: '127.0.0.1' | ||
port: 6379 | ||
nativeAuth: | ||
# maxExpirySeconds: | ||
acceptedOrigins: | ||
- utils.multiversx.com | ||
security: | ||
admins: [] | ||
# rateLimiterSecret: |
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 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
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,14 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "attach", | ||
"name": "Attach NestJS WS", | ||
"port": 9229, | ||
"restart": true, | ||
"stopOnEntry": false, | ||
"protocol": "inspector" | ||
} | ||
] | ||
} |
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,7 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"eslint.validate": ["javascript"], | ||
"editor.formatOnSave": true | ||
} |
Oops, something went wrong.