forked from fga-eps-mds/2024-1-GEROcuidado-Front
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
257 changed files
with
36,344 additions
and
11,987 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,3 @@ | ||
#!/bin/bash | ||
|
||
npm run start |
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,6 @@ | ||
#!/bin/bash | ||
|
||
echo ".................................." | ||
|
||
echo "Running unit tests" | ||
npm run 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
node_modules/ | ||
coverage/ | ||
db/ | ||
node_modules | ||
.github | ||
.vscode | ||
sonar-project.properties | ||
parser.py |
This file was deleted.
Oops, something went wrong.
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,13 +1,5 @@ | ||
#POSTGRES | ||
DB_TYPE='postgres' | ||
DB_HOST=gerocuidado-usuario-db | ||
DB_USERNAME=postgres | ||
DB_PASS=postgres | ||
DB_DATABASE=gerocuidado-usuario-db | ||
DB_PORT=5001 | ||
|
||
#JWT TOKEN | ||
JWT_TOKEN_SECRET=f57d8cc37a35a8051aa97b5ec8506a2ac479e81f82aed9de975a0cb90b903044 | ||
JWT_TOKEN_EXPIRES_IN=12h | ||
HASH_SALT=10 | ||
|
||
EXPO_PUBLIC_API_URL=http://192.168.1.10 | ||
EXPO_PUBLIC_API_USUARIO_PORT=3001 | ||
EXPO_PUBLIC_API_FORUM_PORT=3002 | ||
EXPO_PUBLIC_API_SAUDE_PORT=3003 | ||
EXPO_PUBLIC_JWT_TOKEN_SECRET=f57d8cc37a35a8051aa97b5ec8506a2ac479e81f82aed9de975a0cb90b903044 |
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,5 @@ | ||
EXPO_PUBLIC_API_URL=http://18.231.115.8 | ||
EXPO_PUBLIC_API_USUARIO_PORT=80 | ||
EXPO_PUBLIC_API_FORUM_PORT=80 | ||
EXPO_PUBLIC_API_SAUDE_PORT=80 | ||
EXPO_PUBLIC_JWT_TOKEN_SECRET=f57d8cc37a35a8051aa97b5ec8506a2ac479e81f82aed9de975a0cb90b903044 |
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,10 +1,3 @@ | ||
# don't ever lint node_modules | ||
/.expo | ||
assets | ||
node_modules | ||
# don't lint build output (make sure it's set to your correct build folder name) | ||
dist | ||
# don't lint nyc coverage output | ||
coverage | ||
db | ||
e2e | ||
|
||
**/*spec.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 |
---|---|---|
@@ -1,24 +1,28 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
sourceType: 'module', | ||
project: "tsconfig.json", | ||
sourceType: "module", | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
plugins: ["@typescript-eslint/eslint-plugin"], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended", | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
ignorePatterns: [".eslintrc.js"], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
"@typescript-eslint/interface-name-prefix": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"prettier/prettier": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/no-namespace": "off" | ||
}, | ||
}; |
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,26 @@ | ||
<!---Nomear PR--> | ||
<!---Ex: --> | ||
<!--- [#NUMERO_ISSUE] Nome do PR --> | ||
|
||
## Descrição | ||
<!--- insira uma descrição geral do que foi alterado neste PR --> | ||
|
||
## US | ||
<!--- cole a TAG da US --> | ||
<!--- Closes #NUMERO_US --> | ||
|
||
## Issue | ||
<!--- cole a TAG da issue --> | ||
<!--- Closes #NUMERO_ISSUE --> | ||
|
||
## Principais Implementações | ||
<!--- se for de código, descreva altreações relevantes --> | ||
|
||
## Tipos de Mudanças | ||
- [ ] Bug fix (alteração que corrige uma issue e não altera funcionalidades já existentes); | ||
- [ ] Nova feature (alteração que adiciona uma funcionalidade e não altera funcionalidades já existentes); | ||
- [ ] Alteração disruptiva (Breaking change) (Correção ou funcionalidade que causa alteração nas funcionalidades existentes); | ||
- [ ] Documentação | ||
- [ ] Experiência do usuário (UX) | ||
- [ ] Melhoria de desempenho | ||
|
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,33 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
sonarcloud: | ||
name: Test Unit & Sonar Scan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Linter | ||
run: yarn eslint . --format json --output-file reports/eslint-report.json | ||
|
||
- name: Test and coverage | ||
run: TZ=UTC yarn jest --coverage | ||
|
||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
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,46 @@ | ||
name: Export de métricas | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
- develop | ||
types: [closed] | ||
|
||
jobs: | ||
release: | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Criar diretório | ||
run: mkdir analytics-raw-data | ||
|
||
- name: Coletar métricas no SonarCloud | ||
run: python parser.py fga-eps-mds-1_2024-1-gerocuidado-front ${{ github.event.repository.name }} ${{ github.ref_name }} | ||
|
||
- name: Envia métricas para repo de Doc | ||
run: | | ||
git config --global user.email "${{secrets.USER_EMAIL}}" | ||
git config --global user.name "${{secrets.USER_NAME}}" | ||
git clone --single-branch --branch main "https://x-access-token:${{secrets.API_TOKEN_DOC}}@github.com/fga-eps-mds/2024-1-GEROcuidado-Doc" docs | ||
mkdir -p docs/analytics-raw-data | ||
cp -R analytics-raw-data/*.json docs/analytics-raw-data | ||
cd docs/ | ||
git add . | ||
git commit -m "Adicionando métricas do repositório ${{ github.event.repository.name }} ${{ github.ref_name }}" | ||
git push | ||
- name: Envia métricas como assets da release | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: AButler/upload-release-assets@v2.0 | ||
with: | ||
files: 'analytics-raw-data/*' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
release-tag: ${{ github.ref_name }} |
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,31 @@ | ||
name: update | ||
on: pull_request | ||
|
||
jobs: | ||
update: | ||
name: EAS Update | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check for EXPO_TOKEN | ||
run: | | ||
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then | ||
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions" | ||
exit 1 | ||
fi | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.x | ||
cache: npm | ||
- uses: expo/expo-github-action@v7 | ||
with: | ||
expo-version: latest | ||
eas-version: latest | ||
token: ${{ secrets.EXPO_TOKEN }} | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Publish update | ||
run: eas update --auto | ||
|
||
- name: Publish update | ||
run: eas update --branch preview --auto |
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,33 +1,44 @@ | ||
.npmrc | ||
|
||
# compiled output | ||
/dist | ||
/node_modules | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
pnpm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# OS | ||
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# Expo | ||
.expo/ | ||
dist/ | ||
web-build/ | ||
|
||
# Native | ||
*.orig.* | ||
*.jks | ||
*.p8 | ||
*.p12 | ||
*.key | ||
*.mobileprovision | ||
|
||
# Metro | ||
.metro-health-check* | ||
|
||
# debug | ||
npm-debug.* | ||
yarn-debug.* | ||
yarn-error.* | ||
|
||
# macOS | ||
.DS_Store | ||
*.pem | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
|
||
# Tests | ||
/coverage | ||
/.nyc_output | ||
|
||
# IDEs and editors | ||
ios | ||
|
||
android | ||
|
||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# DB | ||
/db | ||
/reports |
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,4 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"singleQuote": false, | ||
"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,20 @@ | ||
FROM node:18.17.0-alpine | ||
|
||
RUN apk update && apk add curl bash make && rm -rf /var/cache/apk/* | ||
|
||
WORKDIR /app | ||
|
||
RUN npm i -g --unsafe-perm --allow-root -g expo-cli@6.3.10 @expo/ngrok@4.1.0 | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm ci --legacy-peer-deps | ||
|
||
COPY . . | ||
|
||
RUN chmod +x /app/.docker/entrypoint.sh | ||
|
||
USER node | ||
|
||
EXPOSE 8081 | ||
ENTRYPOINT ["/app/.docker/entrypoint.sh"] |
Oops, something went wrong.