diff --git a/.gitignore b/.gitignore index ebc7c7a15cd76f5f19b2613f752ff29055b2ccda..b2e8eafe382781f93a4217b0e0b2e1a86b844317 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ node_modules !/example.env /.svelte-kit /build/ -/src/lib/openfisca diff --git a/.prettierignore b/.prettierignore index 5421174f88eb85ad3050ba62f557dbdcdffc0e08..7dde8a0aed1f0aaeeae5e90d104331528e2d9950 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,4 @@ .svelte-kit/** build/** node_modules/** -src/lib/openfisca/** static/** diff --git a/src/lib/auditors/config.ts b/src/lib/auditors/config.ts index 841b00e8c35831bf65753c76e82627dd6b3d23ec..d82225854ddbced375c9f730c3580b4d7d2ce9c0 100644 --- a/src/lib/auditors/config.ts +++ b/src/lib/auditors/config.ts @@ -68,7 +68,6 @@ export function auditConfig( for (const key of [ "childrenKey", "familyEntityKey", - "openfiscaDir", "simulationsDir", "title", ]) { diff --git a/src/lib/server/config.ts b/src/lib/server/config.ts index 528817291b4fc2c8772d0b8190f27a08f5518757..aa87f97ae328eb42ffcb923c413017cc4b5e61ee 100644 --- a/src/lib/server/config.ts +++ b/src/lib/server/config.ts @@ -26,7 +26,6 @@ export interface Config { jwtSecret: string profileUrl: string } - openfiscaDir: string openfiscaRepository: { branch: string group: string @@ -70,7 +69,6 @@ const [validConfig, error] = validateConfig({ profileUrl: process.env["OAUTH2_PROFILE_URL"], } : null, - openfiscaDir: "src/lib/openfisca", openfiscaRepository: { branch: process.env["OPENFISCA_BRANCH"], group: process.env["OPENFISCA_GROUP"], diff --git a/src/routes/variables/[variable]/index.json.ts b/src/routes/variables/[variable]/index.json.ts index 8a897082b4040e3bd244fa2fe54c0d654f9c768e..50f7c387b5abfd47afdd5e80132fa6f09f3e83bf 100644 --- a/src/routes/variables/[variable]/index.json.ts +++ b/src/routes/variables/[variable]/index.json.ts @@ -3,14 +3,12 @@ import fs from "fs-extra" import path from "path" import sanitizeFilename from "sanitize-filename" -import config from "$lib/server/config" - -const { openfiscaDir } = config - export const get: RequestHandler = async ({ params }) => { const { variable: name } = params const variableFilePath = path.join( - openfiscaDir, + "node_modules", + "@openfisca", + "france-json", "variables", `${sanitizeFilename(name)}.json`, )