@tricoteuses/assemblee 2.1.2 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -12,7 +12,7 @@ Copyright:
12
12
  * © 2022 Emmanuel Raviart
13
13
  * © 2023 Henry Boisgibault & Emmanuel Raviart
14
14
 
15
- https://git.en-root.org/tricoteuses/tricoteuses-assemblee
15
+ https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee
16
16
 
17
17
  > Tricoteuses-Assemblee is free software; you can redistribute it and/or modify
18
18
  > it under the terms of the GNU Affero General Public License as
package/README.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  _Tricoteuses Légifrance_ is free and open source software.
6
6
 
7
- - [software repository](https://git.en-root.org/tricoteuses/tricoteuses-assemblee)
8
- - [GNU Affero General Public License version 3 or greater](https://git.en-root.org/tricoteuses/tricoteuses-assemblee/-/tree/master/LICENSE.md)
7
+ - [software repository](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee)
8
+ - [GNU Affero General Public License version 3 or greater](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/-/tree/master/LICENSE.md)
9
9
 
10
10
  ## documentation
11
11
 
@@ -30,7 +30,7 @@ _Tricoteuses Légifrance_ is free and open source software.
30
30
  ## Installation
31
31
 
32
32
  ```bash
33
- git clone https://git.en-root.org/tricoteuses/tricoteuses-assemblee
33
+ git clone https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee
34
34
  cd tricoteuses-assemblee/
35
35
  ```
36
36
 
@@ -91,17 +91,11 @@ If you use such options, use them in all subsequent commands too (_data:regorgan
91
91
 
92
92
  ## Download using Docker
93
93
 
94
- A Docker image that downloads and cleans the data all at once is available. Build it locally or pull it from the container registry :
94
+ A Docker image that downloads and cleans the data all at once is available. Build it locally or run it from the container registry.
95
+ Use the environment variables `LEGISLATURE` and `CATEGORIES` if needed.
95
96
 
96
97
  ```bash
97
- docker pull registry.en-root.org/tricoteuses/tricoteuses-assemblee:latest
98
- ```
99
-
100
- Create a volume to download the data and use the environment variables `LEGISLATURE` and `CATEGORIES` if needed :
101
-
102
- ```bash
103
- docker volume create assemblee-data
104
- docker run --name tricoteuses-assemblee -v assemblee-data:/app/assemblee -e LEGISLATURE=17 -d registry.en-root.org/tricoteuses/tricoteuses-assemblee:latest
98
+ docker run --pull always --name tricoteuses-assemblee -v ../assemblee-data:/app/assemblee-data -e LEGISLATURE=17 -d git.tricoteuses.fr/logiciels/tricoteuses-assemblee:latest
105
99
  ```
106
100
 
107
101
  ## Using the data
@@ -134,4 +128,4 @@ for (const { acteur } of iterLoadAssembleeActeurs("../assemblee-data", 17)) {
134
128
 
135
129
  ## Generating schemas and documentation (for contributors only)
136
130
 
137
- View instructions [here](https://git.en-root.org/tricoteuses/tricoteuses-assemblee/-/blob/master/src/types)
131
+ View instructions [here](https://git.tricoteuses.fr/logiciels/tricoteuses-assemblee/-/blob/master/src/types)
package/lib/cleaners.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import t from "node:assert";
2
- import { c as f, a as S, b as _ } from "./amendements-DcffXOt8.js";
2
+ import { c as f, a as b, b as _ } from "./amendements-DcffXOt8.js";
3
3
  import { d as Y } from "./amendements-DcffXOt8.js";
4
4
  function $(e) {
5
5
  f(e), t.strictEqual(e.uid["@xsi:type"], "IdActeur_type"), e.uid = e.uid["#text"], t(e.uid);
@@ -58,22 +58,22 @@ function $(e) {
58
58
  const D = R.lieu;
59
59
  f(D);
60
60
  }
61
- const q = s.mandature;
62
- q !== void 0 && f(q), t.strictEqual(s.chambre, void 0);
61
+ const O = s.mandature;
62
+ O !== void 0 && f(O), t.strictEqual(s.chambre, void 0);
63
63
  let y = s.collaborateurs;
64
64
  if (y !== void 0) {
65
65
  const D = Array.isArray(y) ? y.filter((A) => A !== null) : [y];
66
66
  y = [], D.map(({ collaborateur: A }) => {
67
67
  if (Array.isArray(A))
68
- for (const O of A)
69
- O !== null && y.push(O);
68
+ for (const q of A)
69
+ q !== null && y.push(q);
70
70
  else A && y.push(A);
71
71
  }), y.length === 0 ? (delete s.collaborateurs, y = void 0) : s.collaborateurs = y;
72
72
  for (const A of y || [])
73
73
  f(A), t.strictEqual(A.dateDebut, void 0), t.strictEqual(A.dateFin, void 0);
74
74
  }
75
- const E = s.InfosHorsSIAN;
76
- E !== void 0 && (f(E), t.strictEqual(E.HATVP_URI, void 0), t.strictEqual(Object.keys(E).length, 0), delete s.InfosHorsSIAN);
75
+ const x = s.InfosHorsSIAN;
76
+ x !== void 0 && (f(x), t.strictEqual(x.HATVP_URI, void 0), t.strictEqual(Object.keys(x).length, 0), delete s.InfosHorsSIAN);
77
77
  }
78
78
  l.sort(
79
79
  (s, u) => s.uid.length === u.uid.length ? s.uid.localeCompare(u.uid) : s.uid.length - u.uid.length
@@ -129,28 +129,28 @@ function w(e) {
129
129
  }
130
130
  }
131
131
  const p = e.notice;
132
- S(p, "adoptionConforme");
132
+ b(p, "adoptionConforme");
133
133
  let o = e.coSignataires;
134
134
  if (o !== void 0) {
135
135
  o = o.coSignataire, Array.isArray(o) || (t(o), o = [o]), e.coSignataires = o;
136
136
  for (const i of o) {
137
- f(i), S(i, "edite");
137
+ f(i), b(i, "edite");
138
138
  let a = i.acteur;
139
139
  a !== void 0 && (a = a.acteurRef, t(a), delete i.acteur, i.acteurRef = a);
140
140
  const v = i.organe;
141
- v !== void 0 && S(v, "etApparentes");
141
+ v !== void 0 && b(v, "etApparentes");
142
142
  }
143
143
  }
144
144
  const s = e.depotAmendements;
145
145
  if (s !== void 0) {
146
146
  f(s);
147
147
  const i = s.amendementsSeance;
148
- f(i), S(i, "amendable");
148
+ f(i), b(i, "amendable");
149
149
  let a = s.amendementsCommission;
150
150
  if (a !== void 0) {
151
151
  a = a.commission, Array.isArray(a) || (t(a), a = [a]), s.amendementsCommission = a;
152
152
  for (const v of a)
153
- f(v), S(v, "amendable"), t.strictEqual(v.dateLimiteDepot, void 0);
153
+ f(v), b(v, "amendable"), t.strictEqual(v.dateLimiteDepot, void 0);
154
154
  }
155
155
  }
156
156
  const u = e.imprimerie;
@@ -159,9 +159,11 @@ function w(e) {
159
159
  const i = u.DIAN;
160
160
  i !== void 0 && (delete u.DIAN, u.dian = i);
161
161
  const a = u.ISBN;
162
- a !== void 0 && (delete u.ISBN, u.isbn = a), t.strictEqual(u.ISSN, void 0);
162
+ a !== void 0 && (delete u.ISBN, u.isbn = a);
163
+ const v = u.ISSN;
164
+ v !== void 0 && (delete u.ISSN, u.issn = v);
163
165
  }
164
- S(e, "rapportPublie");
166
+ b(e, "rapportPublie");
165
167
  let m = e.organesReferents;
166
168
  m !== void 0 && (m = m.organeRef, Array.isArray(m) || (t(m), m = [m]), e.organesReferents = m);
167
169
  }
@@ -182,16 +184,16 @@ function j(e) {
182
184
  const o = e.infoJOCE;
183
185
  if (o !== void 0) {
184
186
  e.infoJoce = o, delete e.infoJOCE;
185
- const b = o.refJOCE;
186
- b !== void 0 && (o.refJoce = b, delete o.refJOCE);
187
+ const S = o.refJOCE;
188
+ S !== void 0 && (o.refJoce = S, delete o.refJOCE);
187
189
  const h = o.dateJOCE;
188
190
  h !== void 0 && (o.dateJoce = h, delete o.dateJOCE);
189
191
  }
190
192
  let s = e.infoJORect;
191
193
  if (s !== void 0) {
192
194
  Array.isArray(s) || (s = [s]), e.infoJoRect = s, delete e.infoJORect;
193
- for (const b of s)
194
- P(b);
195
+ for (const S of s)
196
+ P(S);
195
197
  }
196
198
  F(e);
197
199
  let u = e.initiateurs;
@@ -203,8 +205,8 @@ function j(e) {
203
205
  let i = e.rapporteurs;
204
206
  if (i !== void 0) {
205
207
  i = i.rapporteur, Array.isArray(i) || (t(i), i = [i]), e.rapporteurs = i;
206
- for (const b of i)
207
- C(b);
208
+ for (const S of i)
209
+ C(S);
208
210
  }
209
211
  const a = e.referenceNOR;
210
212
  a !== void 0 && (e.referenceNor = a, delete e.referenceNOR), t.strictEqual(e.reunion, void 0);
@@ -212,31 +214,31 @@ function j(e) {
212
214
  v !== void 0 && V(v);
213
215
  const R = e.statutConclusion;
214
216
  R !== void 0 && (V(R), R.famCode === "TSORTFnull" && delete e.statutConclusion);
215
- const q = e.texteAdopte;
216
- q !== void 0 && (delete e.texteAdopte, e.texteAdopteRef = q);
217
+ const O = e.texteAdopte;
218
+ O !== void 0 && (delete e.texteAdopte, e.texteAdopteRef = O);
217
219
  const y = e.texteAssocie;
218
220
  y !== void 0 && (delete e.texteAssocie, e.texteAssocieRef = y);
219
- let E = e.textesAssocies;
220
- if (E !== void 0) {
221
- E = E.texteAssocie, Array.isArray(E) || (t(E), E = [E]), e.textesAssocies = E;
222
- for (const b of E) {
223
- const h = b.refTexteAssocie;
224
- h !== void 0 && (delete b.refTexteAssocie, b.texteAssocieRef = h);
221
+ let x = e.textesAssocies;
222
+ if (x !== void 0) {
223
+ x = x.texteAssocie, Array.isArray(x) || (t(x), x = [x]), e.textesAssocies = x;
224
+ for (const S of x) {
225
+ const h = S.refTexteAssocie;
226
+ h !== void 0 && (delete S.refTexteAssocie, S.texteAssocieRef = h);
225
227
  }
226
228
  }
227
229
  const D = e.typeDeclaration;
228
230
  D !== void 0 && V(D);
229
231
  const A = e.typeMotion;
230
232
  A !== void 0 && V(A);
231
- const O = e.typeMotionCensure;
232
- O !== void 0 && V(O);
233
- let x = e.voteRefs;
234
- x !== void 0 && (x = x.voteRef, Array.isArray(x) || (t(x), x = [x]), e.voteRefs = x);
233
+ const q = e.typeMotionCensure;
234
+ q !== void 0 && V(q);
235
+ let E = e.voteRefs;
236
+ E !== void 0 && (E = E.voteRef, Array.isArray(E) || (t(E), E = [E]), e.voteRefs = E);
235
237
  let J = e.actesLegislatifs;
236
238
  if (J !== void 0) {
237
239
  J = J.acteLegislatif, Array.isArray(J) || (t(J), J = [J]), e.actesLegislatifs = J;
238
- for (const b of J)
239
- j(b);
240
+ for (const S of J)
241
+ j(S);
240
242
  }
241
243
  }
242
244
  function F(e) {
@@ -332,7 +334,7 @@ function g(e) {
332
334
  }
333
335
  }
334
336
  function U(e) {
335
- f(e), S(e, "captationVideo"), S(e, "comiteSecret"), S(e, "ouverturePresse");
337
+ f(e), b(e, "captationVideo"), b(e, "comiteSecret"), b(e, "ouverturePresse");
336
338
  const n = e["@xsi:type"];
337
339
  n !== void 0 && (e.xsiType = n, delete e["@xsi:type"]);
338
340
  const d = e.timeStampDebut;
@@ -384,8 +386,8 @@ function U(e) {
384
386
  for (const v of a) {
385
387
  const R = v.uid["@xsi:type"];
386
388
  t(R), v.xsiType = R;
387
- const q = v.uid["#text"];
388
- t(q), v.uid = q;
389
+ const O = v.uid["#text"];
390
+ t(O), v.uid = O;
389
391
  const y = v.ident;
390
392
  t(y), f(y);
391
393
  }
@@ -402,20 +404,20 @@ function U(e) {
402
404
  v !== void 0 && (Array.isArray(v.item) ? v = v.item : (t(v.item), v = [v.item]), i.resumeOdj = v, delete i.resumeODJ);
403
405
  let R = i.pointsODJ;
404
406
  if (R !== void 0) {
405
- let q = R.pointODJ;
406
- Array.isArray(q) ? R = q : (t(q), R = [q]), i.pointsOdj = R;
407
+ let O = R.pointODJ;
408
+ Array.isArray(O) ? R = O : (t(O), R = [O]), i.pointsOdj = R;
407
409
  for (const y of R) {
408
- f(y), S(y, "comiteSecret");
409
- const E = y["@xsi:type"];
410
- E !== void 0 && (y.xsiType = E, delete y["@xsi:type"]);
410
+ f(y), b(y, "comiteSecret");
411
+ const x = y["@xsi:type"];
412
+ x !== void 0 && (y.xsiType = x, delete y["@xsi:type"]);
411
413
  const D = y.cycleDeVie;
412
414
  t.notStrictEqual(D, void 0), g(D), t.strictEqual(y.demandeurPoint, void 0);
413
415
  let A = y.dossiersLegislatifsRefs;
414
416
  A !== void 0 && (Array.isArray(A.dossierRef) ? A = A.dossierRef : (t(A.dossierRef), A = [A.dossierRef]), y.dossiersLegislatifsRefs = A), y.typePointOdj = y.typePointODJ, delete y.typePointODJ, t.strictEqual(y.textesAssocies, void 0), y.natureTravauxOdj = y.natureTravauxODJ, delete y.natureTravauxODJ;
415
- let O = y.dateConfPres;
416
- O !== void 0 && (t.strictEqual(typeof O, "string"), t(/^\d{4}-\d{2}-\d{2}\+\d{2}:00$/.test(O)), O = new Date(O.split("+")[0]), y.dateConfPres = O);
417
- let x = y.dateLettreMinistre;
418
- x !== void 0 && (t.strictEqual(typeof x, "string"), t(/^\d{4}-\d{2}-\d{2}\+\d{2}:00$/.test(x)), x = new Date(x.split("+")[0]), y.dateLettreMinistre = x);
417
+ let q = y.dateConfPres;
418
+ q !== void 0 && (t.strictEqual(typeof q, "string"), t(/^\d{4}-\d{2}-\d{2}\+\d{2}:00$/.test(q)), q = new Date(q.split("+")[0]), y.dateConfPres = q);
419
+ let E = y.dateLettreMinistre;
420
+ E !== void 0 && (t.strictEqual(typeof E, "string"), t(/^\d{4}-\d{2}-\d{2}\+\d{2}:00$/.test(E)), E = new Date(E.split("+")[0]), y.dateLettreMinistre = E);
419
421
  }
420
422
  delete i.pointsODJ;
421
423
  }
@@ -433,7 +435,7 @@ function U(e) {
433
435
  }
434
436
  const m = e.infosReunionsInternationale;
435
437
  if (m !== void 0) {
436
- f(m), S(
438
+ f(m), b(
437
439
  m,
438
440
  "estReunionInternationale"
439
441
  );
@@ -543,7 +545,7 @@ function W(e) {
543
545
  }
544
546
  }
545
547
  function I(e) {
546
- S(e, "parDelegation"), _(e, "numPlace");
548
+ b(e, "parDelegation"), _(e, "numPlace");
547
549
  }
548
550
  function X(e) {
549
551
  f(e);