diff --git a/lib/compose/import-from-api-depot.cjs b/lib/compose/import-from-api-depot.cjs index 8fb3c61d..4cce8ac6 100644 --- a/lib/compose/import-from-api-depot.cjs +++ b/lib/compose/import-from-api-depot.cjs @@ -5,9 +5,11 @@ function isErroredRow(row) { return row.errors.some(({level}) => level === 'E') } +const relaxProfile = 'relax' + async function importFromApiDepot(revision) { const revisionFile = await getRevisionFile(revision._id) - const validationResult = await validate(revisionFile, {profile: '1.3-relax'}) + const validationResult = await validate(revisionFile, {profile: relaxProfile}) if (!validationResult.parseOk) { throw new Error(`Le fichier BAL récupéré n’est pas valide : ${revision._id}`) diff --git a/package.json b/package.json index b75ca3a1..52156ba0 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "dependencies": { "@ban-team/fantoir": "^0.15.0", "@ban-team/gazetteer": "^2.0.0", - "@ban-team/validateur-bal": "^2.16.0", + "@ban-team/validateur-bal": "^2.17.0", "@etalab/adresses-util": "^0.8.2", "@etalab/decoupage-administratif": "^3.0.0", "@etalab/majic": "^0.11.0", diff --git a/yarn.lock b/yarn.lock index ac56d731..42bc12a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1058,10 +1058,10 @@ resolved "https://registry.yarnpkg.com/@ban-team/shared-data/-/shared-data-1.2.0.tgz#0e29e84a00f7df3b17e5821bde1405a2bfa656b5" integrity sha512-35jz6ITHHufUKxXAfa8ReSMl6lZarnfVBkS++wgHpk27e9K52bXyAHo+n3X331n2mSzoIQXxFK7SEcPob7a5cA== -"@ban-team/validateur-bal@^2.16.0": - version "2.16.0" - resolved "https://registry.yarnpkg.com/@ban-team/validateur-bal/-/validateur-bal-2.16.0.tgz#0ef7754334e58dc9cc80a791731616b5cd82a896" - integrity sha512-OO/rpOfnU7VfzAH57v6pQttoMCNnHB5sKFmLUtFJ6AGGsgvZJoUJ32XAGvofK5QVHvT7QUv/Xrn21zpoo0Lx9A== +"@ban-team/validateur-bal@^2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@ban-team/validateur-bal/-/validateur-bal-2.17.0.tgz#a43965db72d3f5cc19dc710d209f1543ac9eef91" + integrity sha512-cNCbiVkQ5sCKs4dN6WSxug65F8oceIdiSmnl4OgYZQ4PY3U0xSf05MqfVd6+xXC4pxAZCRvoxtXrhXGJc9f37A== dependencies: "@ban-team/shared-data" "^1.2.0" "@etalab/project-legal" "^0.6.0" @@ -1074,6 +1074,7 @@ iconv-lite "^0.6.3" lodash "^4.17.21" papaparse "^5.3.2" + uuidv4 "^6.2.13" yargs "^17.5.1" "@bcoe/v8-coverage@^0.2.3": @@ -2822,6 +2823,11 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== +"@types/uuid@8.3.4": + version "8.3.4" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" + integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== + "@types/validator@^13.7.1": version "13.7.17" resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.7.17.tgz#0a6d1510395065171e3378a4afc587a3aefa7cc1" @@ -8398,11 +8404,19 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== -uuid@^8.3.0, uuid@^8.3.2: +uuid@8.3.2, uuid@^8.3.0, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuidv4@^6.2.13: + version "6.2.13" + resolved "https://registry.yarnpkg.com/uuidv4/-/uuidv4-6.2.13.tgz#8f95ec5ef22d1f92c8e5d4c70b735d1c89572cb7" + integrity sha512-AXyzMjazYB3ovL3q051VLH06Ixj//Knx7QnUSi1T//Ie3io6CpsPu9nVMOx5MoLWh6xV0B9J0hIaxungxXUbPQ== + dependencies: + "@types/uuid" "8.3.4" + uuid "8.3.2" + v8-to-istanbul@^9.0.1: version "9.1.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz#1b83ed4e397f58c85c266a570fc2558b5feb9265"