Skip to content

Commit

Permalink
feat: utilisation API Alternance pour la fiabilisation (#3888)
Browse files Browse the repository at this point in the history
  • Loading branch information
moroine authored Nov 19, 2024
1 parent 47f829b commit 02f2535
Show file tree
Hide file tree
Showing 305 changed files with 4,914 additions and 15,855 deletions.
2 changes: 1 addition & 1 deletion .bin/scripts/seed-apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ ansible-vault view --vault-password-file="$ROOT_DIR/.bin/scripts/get-vault-passw

rm -f "$SEED_GZ"
gpg -d --batch --passphrase-file "$PASSPHRASE" -o "$SEED_GZ" "$SEED_GPG"
cat "$SEED_GZ" | docker compose -f "$ROOT_DIR/docker-compose.yml" exec -iT mongodb mongorestore --archive --nsInclude="flux-retour-cfas.*" --uri="${TARGET_DB}" --drop --gzip
cat "$SEED_GZ" | docker compose -f "$ROOT_DIR/docker-compose.yml" exec -iT mongodb mongorestore --bypassDocumentValidation --archive --nsInclude="flux-retour-cfas.*" --uri="${TARGET_DB}" --drop --gzip
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ module.exports = {
"**/test.{js,jsx,ts,tsx}",
"**/test-*.{js,jsx,ts,tsx}",
"**/*{.,_}{test,spec,bench,fixture}.{js,jsx,ts,tsx}",
"**/jest.config.js",
"**/dev.ts",
"**/tsup.config.ts",
"**/vitest.workspace.ts",
"**/next.config.js",
],
optionalDependencies: false,
},
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/deploy_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ jobs:
# - name: Create vault pwd file
# run: echo ${{ secrets.VAULT_PWD }} > .infra/.vault_pwd.txt

# - name: Install jmespath
# run: |
# sudo pipx inject ansible-core jmespath
# - name: Encrypt logs
# run: .bin/mna-tdb deploy:log:encrypt
# if: always()
# env:
# ANSIBLE_VAULT_PASSWORD_FILE: .infra/.vault_pwd.txt

# - name: Run playbook
# run: .bin/mna-tdb deploy preview "${{ github.event.issue.number }}"
Expand All @@ -97,11 +99,9 @@ jobs:
# ANSIBLE_REMOTE_USER: deploy
# ANSIBLE_BECOME_PASS: ${{ secrets.DEPLOY_PASS }}

# - name: Encrypt logs
# run: .bin/mna-tdb deploy:log:encrypt
# if: always()
# env:
# ANSIBLE_VAULT_PASSWORD_FILE: .infra/.vault_pwd.txt
# - name: Add Job summary
# if: always()
# run: echo 'You can get logs using `.bin/mna-tdb deploy:log:decrypt ${{ github.run_id }} ${{ github.event.issue.number }}`' >> $GITHUB_STEP_SUMMARY

# - name: Upload logs artifacts
# if: always()
Expand Down
2 changes: 1 addition & 1 deletion .husky/preventSensibleFilesCommit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exception="$exception|docker-bake.json|eslintrc.json|app.json|tsconfig.json|.moc
exception="$exception|launch.json|arborescence-rome-14-06-2021.json"
exception="$exception|server/static/organismes/organismes-prepa-apprentissage.csv"
exception="$exception|server/static/opcos/.*.csv"
exception="$exception|modele-import.xlsx|.env|open-api.json"
exception="$exception|modele-import.xlsx|.env|open-api.json|knip.json"
exception="$exception)$|cypress/(.*).json"

files=$(git diff --cached --name-only | grep -v -E "$exception" | grep -E "$sensible_files_pattern")
Expand Down
4 changes: 2 additions & 2 deletions .infra/files/configs/mongodb/seed.gpg
Git LFS file not shown
96 changes: 39 additions & 57 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,58 +1,4 @@
fileignoreconfig:
- filename: .infra/vault/vault.yml
checksum: d86cec8212e2e16392af0c5c5c211b41b078902f8e815cea097c418eca76c235
- filename: shared/constants/aide.ts
checksum: 70dcdce75bb98d7c5b05a34074ccef0412a7bbfb1755b472d66a74a144d0e882
- filename: ui/modules/referencement-organisme/tabs/AideRelationsOrganismes.tsx
checksum: 7174dc73718c7b2fb9c175d783c7ca5e0d02dd85db8c7c1453a2a23d9c171461
- filename: ui/pages/contact.tsx
checksum: d5a5f0510520b403d6cb83db5c9724b2408866c7f624f109fc9d9576944feac1
- filename: ui/pages/organismes-formation.tsx
checksum: 10ba3e10dc58d0b882a87038c57b632173d3428e8a3c3ceee514deff720fdf67
- filename: ui/modules/organismes/ListeOrganismesPage.tsx
checksum: 4e6f888f418eddb3217e5e1e2b56d399de1e5301bca88070b6dcac79c98bfa46
- filename: ui/modules/organismes/ListeOrganismesPage.tsx
checksum: 9159c8f27b8f19a39cc8bc7f6287f14b53c6c2ea72eb49237bb2ac789ac0b4af
- filename: ui/modules/organismes/ListeOrganismesPage.tsx
checksum: e285f15ddbe8dd5fcde340845aae461cfaafc7b053154112f058586e30faf19d
- filename: ui/modules/organismes/OrganismesTable.tsx
checksum: c7ff0a828fc1a5e11d8aba340333231ecb9ad5a58a1dcbfeb055ca7c45c03902
- filename: ui/modules/dashboard/IndicateursOrganisme.tsx
checksum: 7be002672d4416488c495035efee32ace010bf48346f0b1562487db6d84f2c9c
- filename: .infra/vault/vault.yml
checksum: f0b1527c7c2e79cf9eb1253813d2b94fd0e3f76f8cf5deb22882f26ce5c3dc49
- filename: ui/modules/organismes/ListeOrganismesPage.tsx
checksum: 9cb75a32b1fb7c42d111aa642b679d8506be96df46a6f80b5a748abd128472d8
- filename: ui/modules/referencement-organisme/tabs/AideCodeRncp.tsx
checksum: 7f69cdfe1cd6fa9ee3332171656f6961156690a5aa5392c1dd239681f3878bea
- filename: ui/components/Televersement/DocumentsActionButtons.tsx
checksum: f3598ec013dca8f849c41c42cd8c0c75457ece9166b36717e8d1db84cfde12fa
- filename: ui/modules/referencement-organisme/ReferencementOrganisme.tsx
checksum: 6e755a406ed7a6901f59e3581ea5485d6f42b02b3d062d2fe6a50b044ea8c392
- filename: ui/modules/aide/AideCodeRncp.tsx
checksum: 9eef5c3608c09e91abcf400b96687782b0fc5598f875aac9d41f3bb19414f092
- filename: ui/modules/aide/AideUai.tsx
checksum: ce81bb8b7b97a0ae7ba129be2cee66364f5f970669d2b4b0524c604d981d9318
- filename: ui/modules/aide/AideNature.tsx
checksum: f4bd606392ac321df0d1de797a33a14cbc3fcfa76c6d3ac6bc3cf20339f76166
- filename: ui/modules/dashboard/DashboardOrganisme.tsx
checksum: 1c87719cbf9d12856f175d428c7e37db395840e094da5f807cd17c240389abc7
- filename: ui/common/utils/televersement.ts
checksum: a6097b52f42a834065f03b2852bcd9f90c48ea18c0757d473ca80f5c838240a2
- filename: ui/components/Televersement/DocumentsActionButtons.tsx
checksum: 05d8d57ce39a5cfd5d18235640a82aeccbf4105c7339f2191f94ce8b77d6c402
- filename: ui/hooks/useExcelFileProcessor.ts
checksum: 0055dc0681ebee52fd44596ba15523aaf82d9ee2f04574cc6cd65718f38e6082
- filename: ui/modules/organismes/Televersement.tsx
checksum: b3d643cc3d12958de0b6dad13b3d141a277a6c2d4f4fbb728616c09ea85478b7
- filename: ui/modules/organismes/Televersement.tsx
checksum: 8de0a20f971af68a8163bcd96fb2bb46f8d7dd64415d55d138c4102ff9af9026
- filename: ui/modules/mon-espace/SIFA/SIFAPage.tsx
checksum: 351bfd9e64f0438011c621c9357e582218e186f396a4246453f40dd246c38348
- filename: ui/components/Page/components/Footer.tsx
checksum: 531b22a70ecf2772a72889c3bb5bc90008ccdf78ee1f196457d668a69920ebf2
- filename: ui/modules/dashboard/DashboardOrganisme.tsx
checksum: 3bcfa6a077baaf2011d152e3a0c44175f2a44d6f83c4486575cccc3f93f4b2e4
- filename: .bin/commands.sh
checksum: 229b0af8587bef9f35ba5bae8e90a4f0eecbde15239a8f6b807e2d4a79de5332
- filename: .bin/scripts/get-vault-password-client.sh
Expand All @@ -61,12 +7,48 @@ fileignoreconfig:
checksum: 5d6c4905865f66008d6ffd23eff04577bb8d1260022106b0be24062591bf0883
- filename: .bin/scripts/setup-local-env.sh
checksum: c688cb656af49c2f824ae7a0c9664bf7bdecdcf29d93ec4a99976fb08dcd9285
ignore_detectors:
- filename
- filename: .infra/files/configs/mongodb/seed.gpg
checksum: 086c2803a427b3f3c48906bcfd04cd36fe61b3a757c349aa345371e47bdfb505
- filename: .infra/vault/vault.yml
checksum: 0a12992a1cebf8e2693b986aa8f8b7bf7b8fb4f5b629bb43511958489ec7a2c8
checksum: 796635402459cd6f6edb18a01b54bb2ecbb75067335ec7b3a6fd291dfd25e806
- filename: server/src/common/actions/formations.actions.ts
checksum: c5e0d6f4a69dbae2c808fae2f8a2b9f9a54f4ff6ce2369b1d08f3b4034cffbcd
- filename: shared/constants/aide.ts
checksum: 70dcdce75bb98d7c5b05a34074ccef0412a7bbfb1755b472d66a74a144d0e882
- filename: ui/common/utils/televersement.ts
checksum: a6097b52f42a834065f03b2852bcd9f90c48ea18c0757d473ca80f5c838240a2
- filename: ui/components/Page/components/Footer.tsx
checksum: 531b22a70ecf2772a72889c3bb5bc90008ccdf78ee1f196457d668a69920ebf2
- filename: ui/components/Televersement/DocumentsActionButtons.tsx
checksum: 05d8d57ce39a5cfd5d18235640a82aeccbf4105c7339f2191f94ce8b77d6c402
- filename: ui/hooks/useExcelFileProcessor.ts
checksum: 0055dc0681ebee52fd44596ba15523aaf82d9ee2f04574cc6cd65718f38e6082
- filename: ui/modules/aide/AideCodeRncp.tsx
checksum: 9eef5c3608c09e91abcf400b96687782b0fc5598f875aac9d41f3bb19414f092
- filename: ui/modules/aide/AideNature.tsx
checksum: f4bd606392ac321df0d1de797a33a14cbc3fcfa76c6d3ac6bc3cf20339f76166
- filename: ui/modules/aide/AideUai.tsx
checksum: ce81bb8b7b97a0ae7ba129be2cee66364f5f970669d2b4b0524c604d981d9318
- filename: ui/modules/dashboard/DashboardOrganisme.tsx
checksum: 3bcfa6a077baaf2011d152e3a0c44175f2a44d6f83c4486575cccc3f93f4b2e4
- filename: ui/modules/dashboard/IndicateursOrganisme.tsx
checksum: 7be002672d4416488c495035efee32ace010bf48346f0b1562487db6d84f2c9c
- filename: ui/modules/mon-espace/SIFA/SIFAPage.tsx
checksum: 351bfd9e64f0438011c621c9357e582218e186f396a4246453f40dd246c38348
- filename: ui/modules/organismes/ListeOrganismesPage.tsx
checksum: 9cb75a32b1fb7c42d111aa642b679d8506be96df46a6f80b5a748abd128472d8
- filename: ui/modules/organismes/OrganismesTable.tsx
checksum: c7ff0a828fc1a5e11d8aba340333231ecb9ad5a58a1dcbfeb055ca7c45c03902
- filename: ui/modules/organismes/Televersement.tsx
checksum: 8de0a20f971af68a8163bcd96fb2bb46f8d7dd64415d55d138c4102ff9af9026
- filename: ui/modules/referencement-organisme/ReferencementOrganisme.tsx
checksum: 6e755a406ed7a6901f59e3581ea5485d6f42b02b3d062d2fe6a50b044ea8c392
- filename: ui/modules/referencement-organisme/tabs/AideCodeRncp.tsx
checksum: 7f69cdfe1cd6fa9ee3332171656f6961156690a5aa5392c1dd239681f3878bea
- filename: ui/modules/referencement-organisme/tabs/AideRelationsOrganismes.tsx
checksum: 7174dc73718c7b2fb9c175d783c7ca5e0d02dd85db8c7c1453a2a23d9c171461
- filename: ui/pages/organismes-formation.tsx
checksum: 10ba3e10dc58d0b882a87038c57b632173d3428e8a3c3ceee514deff720fdf67
scopeconfig:
- scope: node
custom_patterns:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"esbenp.prettier-vscode",
"yoavbls.pretty-ts-errors",
"pflannery.vscode-versionlens",
"Orta.vscode-jest",
"vitest.explorer",
"fabiospampinato.vscode-terminals",
"redhat.vscode-yaml"
]
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

# You only need to copy next.config.js if you are NOT using the default configuration
COPY --from=builder_ui --chown=nextjs:nodejs /app/ui/next.config.js /app/
COPY --from=builder_ui --chown=nextjs:nodejs /app/ui/next.config.mjs /app/
COPY --from=builder_ui --chown=nextjs:nodejs /app/ui/public /app/ui/public
COPY --from=builder_ui --chown=nextjs:nodejs /app/ui/package.json /app/ui/package.json

Expand Down
4 changes: 0 additions & 4 deletions docs/DATASOURCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ Pour cela nous utilisons l'API du référentiel qui nous renvoie le contenu de l

https://catalogue-apprentissage.intercariforef.org/

## Tables de correspondances

https://tables-correspondances.apprentissage.beta.gouv.fr/api/v1/docs/

## API Entreprise

https://entreprise.api.gouv.fr
Expand Down
86 changes: 0 additions & 86 deletions jest.config.js

This file was deleted.

27 changes: 27 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"workspaces": {
"server": {
"entry": ["src/main.ts!", "src/dev.ts", "src/db/migrations/*.ts!", "scripts/**/*.ts"],
"project": ["src/**/*.ts!", "tests/**/*.ts", "scripts/**/*.ts", "!src/**/*.test.ts!"],
"ignoreDependencies": ["@sentry/cli", "tsx"]
},
"shared": {
"entry": ["./**/*.ts!", "!./dist/**/*", "!./**/*.test.ts"],
"project": ["./**/*.ts", "!./dist", "!./**/*.test.ts!"],
"includeEntryExports": true
},
".": {
"husky": true,
"commitlint": true,
"ignoreDependencies": [
"@commitlint/config-conventional",
"@semantic-release/changelog",
"@semantic-release/commit-analyzer",
"@semantic-release/github",
"@semantic-release/release-notes-generator"
],
"ignoreBinaries": ["mna-tdb"],
"project": ["!.husky/commitlint.config.js"]
}
}
}
39 changes: 17 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,51 +40,46 @@
"release:interactive": "./.bin/mna-tdb release:interactive",
"postinstall": "husky install",
"talisman:add-exception": "yarn node-talisman --githook pre-commit -i",
"test": "cross-env NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-vm-modules jest",
"test:ci": "yarn test --ci -w 2",
"test": "vitest",
"test:ci": "yarn test --run",
"test:watch": "yarn test --watch",
"typecheck": "yarn foreach:parallel run typecheck",
"typecheck:ci": "yarn foreach:ci run typecheck",
"vault:edit": ".bin/mna-tdb vault:edit",
"foreach:seq": "yarn workspaces foreach -Av --exclude mna-tdb",
"foreach:parallel": "yarn foreach:seq -pi",
"foreach:ci": "yarn foreach:seq -p"
"foreach:ci": "yarn foreach:seq -p",
"knip": "knip"
},
"dependencies": {
"chart.js": "^4.4.4",
"husky": "^8.0.3",
"react-chartjs-2": "^5.2.0"
"husky": "^8.0.3"
},
"devDependencies": {
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@types/node": "^22.2.0",
"@types/node": "^22.7.5",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"eslint": "^8.57.1",
"eslint-config-next": "^13.5.7",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-unused-imports": "^3.1.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^15.2.2",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^3.2.0",
"knip": "^5.34.1",
"lint-staged": "^15.2.10",
"next": "^13.5.7",
"node-talisman": "^1.29.11",
"prettier": "^3.2.5",
"prettier": "^3.3.3",
"semantic-release": "^21.1.2",
"semantic-release-slack-bot": "^4.0.2",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
"typescript": "^5.6.3",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.1.3"
},
"prettier": {
"printWidth": 120,
Expand Down
2 changes: 1 addition & 1 deletion server/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
MNA_TDB_ENV=test
MNA_TDB_PUBLIC_URL=test
MNA_TDB_MONGODB_URI=mongodb://127.0.0.1:27017/
MNA_TDB_MONGODB_DB_NAME=TDB-test-{{JEST_WORKER_ID}}
MNA_TDB_MONGODB_DB_NAME=TDB-test-{{VITEST_WORKER_ID}}
MNA_TDB_MONGODB_OPTIONS="retryWrites=false"
MNA_TDB_BODY_PARSER_LIMIT=100kb

Expand Down
Loading

0 comments on commit 02f2535

Please sign in to comment.