@tricoteuses/assemblee 3.0.9 → 3.0.11
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/lib/{amendements-Cd3JcAtS.js → amendements-BKGwufEi.js} +1 -1
- package/lib/{amendements-CusGbzsz.js → amendements-Bab1iUCY.js} +5 -5
- package/lib/cleaners.js +3 -3
- package/lib/index.d.ts +1 -2
- package/lib/index.js +87 -88
- package/lib/legislatures.d.ts +1 -0
- package/lib/loaders.js +2147 -29
- package/lib/parsers.js +5402 -5459
- package/lib/{questions-BwsFy7G_.js → questions-C3qN4PsC.js} +1 -1
- package/lib/questions-CDMdh7at.js +2806 -0
- package/lib/scripts/retrieve_documents.d.ts +4 -0
- package/lib/scripts/retrieve_open_data.d.ts +5 -1
- package/lib/scripts/shared/cli_helpers.d.ts +8 -0
- package/package.json +1 -1
- package/lib/loaders-xu4AcOqG.js +0 -4938
package/lib/cleaners.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "node:assert";
|
|
2
|
-
import { c, a as b, b as _ } from "./amendements-
|
|
3
|
-
import { d as ee } from "./amendements-
|
|
4
|
-
import { a as H, C as Q } from "./questions-
|
|
2
|
+
import { c, a as b, b as _ } from "./amendements-BKGwufEi.js";
|
|
3
|
+
import { d as ee } from "./amendements-BKGwufEi.js";
|
|
4
|
+
import { a as H, C as Q } from "./questions-C3qN4PsC.js";
|
|
5
5
|
function W(e) {
|
|
6
6
|
c(e), t.strictEqual(e.uid["@xsi:type"], "IdActeur_type"), e.uid = e.uid["#text"], t(e.uid);
|
|
7
7
|
const s = e.etatCivil;
|
package/lib/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { allFacets, allFollows, Facet, Follow, type SearchQuery, type ValidSearc
|
|
|
2
2
|
export { dateFromNullableDateOrIsoString, dateFromYearMonthDayTimezoneString, displayDateFromLocalIsoString, existingDateToJson, formatRelativeFrenchTime, frenchDateFormat, frenchDateSameYearShortFormat, frenchDateWithoutDayOfWeekFromDateOrString, frenchTimeFormat, frenchTimeFromDateOrString, localIso8601StringFromDate, patchedDateToJson, } from './dates.js';
|
|
3
3
|
export { commissionFondUidFromDossier, type DocumentFileInfos, type DocumentFilesIndex, FinalStatus, type State, stateFromActePath, stateFromActes, stateFromDossier, type Status, statusFromCodierLibelle, StatusOnly, walkActes, walkDocumentAndDivisions, } from './dossiers_legislatifs.js';
|
|
4
4
|
export { insertActeurReferences, insertAmendementReferences, insertDocumentReferences, insertDossierReferences, insertOrganeReferences, insertReunionReferences, insertScrutinReferences, type OutputData, } from './inserters.js';
|
|
5
|
-
export { Legislature } from './legislatures.js';
|
|
5
|
+
export { legislatureOptions, type Legislature } from './legislatures.js';
|
|
6
6
|
export { shortNameFromOrgane } from './organes.js';
|
|
7
7
|
export { civOptions, CivSchema, type Civ, codeNatureDepOptions, CodeNatureDepSchema, type CodeNatureDep, codeTypeOrganeOptions, CodeTypeOrganeSchema, type CodeTypeOrgane, type CodeTypeOrgane as TypeOrgane, depNaisOptions, DepNaisSchema, type DepNais, famSocProEnumOptions, FamSocProEnumSchema, type FamSocProEnum as FamSocPro, libelleOptions, LibelleSchema, type Libelle, mandatXsiTypeOptions, MandatXsiTypeSchema, type MandatXsiType, organeXsiTypeOptions, OrganeXsiTypeSchema, type OrganeXsiType, positionPolitiqueOptions, PositionPolitiqueSchema, type PositionPolitique, regimeOptions, RegimeSchema, type Regime, regionTypeOptions, RegionTypeSchema, type RegionType, } from './schemas/raw/acteurs_et_organes.js';
|
|
8
8
|
export { accordGouvernementDepotHorsDelaiOptions, AccordGouvernementDepotHorsDelaiSchema, type AccordGouvernementDepotHorsDelai, actionOptions, ActionSchema, type Action, codeEtatOptions, CodeEtatSchema, type CodeEtat, divisionTypeOptions, DivisionTypeSchema, type DivisionType, typeAuteurOptions, TypeAuteurSchema, type TypeAuteur, typePositionOptions, TypePositionSchema, type TypePosition, } from './schemas/raw/amendements.js';
|
|
@@ -22,4 +22,3 @@ export { acteLegislatifXsiTypeOptions, documentXsiTypeOptions, dossierParlementa
|
|
|
22
22
|
export { type ContenuSubdivisionEnriched as ContenuSubdivision, type SubdivisionEnriched as Subdivision, } from './schemas/enriched/dossiers_legislatifs.js';
|
|
23
23
|
export { typeJoQuestionOptions, type AnalyseClean as Analyse, type AuteurQuestionClean as AuteurQuestion, type ClotureClean as Cloture, type GroupeClean as Groupe, type IdentifiantClean as Identifiant, type IdentiteAuteurQuestionClean as IdentiteAuteurQuestion, type IndexationAnClean as IndexationAn, type InfoJoQuestionClean as InfoJoQuestion, type MinAttribElementClean as MinAttribElement, type MinAttribsClean as MinAttribs, type QuestionClean as Question, type RenouvellementClean as Renouvellement, type RenouvellementCleans as Renouvellements, type SignalementClean as Signalement, type TexteQuestionClean as TexteQuestion, type TextesQuestionClean as TextesQuestion, type TextesReponseClean as TextesReponse, type TypeJoQuestion, } from './schemas/clean/questions.js';
|
|
24
24
|
export { type DecompteNominatifClean as DecompteNominatif, type DecompteVoixClean as DecompteVoix, type DemandeurClean as Demandeur, type DysfonctionnementClean as Dysfonctionnement, type MiseAuPointClean as MiseAuPoint, type ObjetVoteClean as ObjetVote, type ScrutinClean as Scrutin, type SortScrutinClean as SortScrutin, type SyntheseVoteClean as SyntheseVote, type TypeVoteClean as TypeVote, type VentilationVotesClean as VentilationVotes, type VentilationVotesGroupeClean as VentilationVotesGroupe, type VotantClean as Votant, type VoteClean as Vote, } from './schemas/clean/scrutins.js';
|
|
25
|
-
export { datasets } from './loaders.js';
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as k, n as Q, B as J, C as z, D as H, T as W, s as Y, k as K, m as Z, u as ee, o as ie, d as te, a as oe, b as ne, q as re, v as se, w as ae, e as ce, f as ue, c as fe, g as pe, h as
|
|
2
|
-
import { W as Te, C as xe, S as _e, b as Pe, Y as Ce, e as Ee, _ as Ue, D as Be, E as De, F as be, q as Ie, L as Le,
|
|
3
|
-
import { D as
|
|
1
|
+
import { A as k, n as Q, B as J, C as z, D as H, T as W, s as Y, k as K, m as Z, u as ee, o as ie, d as te, a as oe, b as ne, q as re, v as se, w as ae, e as ce, f as ue, c as fe, g as pe, h as le, i as de, j as me, l as ye, p as ge, x as Re, t as Se, y as ve, z as Ae, r as he } from "./amendements-Bab1iUCY.js";
|
|
2
|
+
import { W as Te, C as xe, S as _e, b as Pe, Y as Ce, e as Ee, _ as Ue, D as Be, E as De, F as be, q as Ie, L as Le, a0 as Ne, a2 as Me, a4 as je, M as $e, a6 as Ve, N as Xe, O as we, aj as qe, u as Fe, a8 as Ge, P as ke, w as Qe, y as Je, Q as ze, R as He, j as We, B as Ye, aa as Ke, T as Ze, I as ei, U as ii, ak as ti, V as oi, c as ni, K as ri, a as si, X as ai, d as ci, Z as ui, ab as fi, f as pi, ac as li, al as di, am as mi, ad as yi, ah as gi, k as Ri, g as Si, n as vi, l as Ai, h as hi, $ as Oi, a1 as Ti, a3 as xi, m as _i, a5 as Pi, s as Ci, o as Ei, ai as Ui, t as Bi, a7 as Di, p as bi, v as Ii, x as Li, z as Ni, ae as Mi, r as ji, i as $i, af as Vi, A as Xi, ag as wi, an as qi, a9 as Fi, G as Gi, H as ki, J as Qi } from "./questions-CDMdh7at.js";
|
|
3
|
+
import { D as zi, Q as Hi, T as Wi, d as Yi, q as Ki, t as Zi } from "./questions-C3qN4PsC.js";
|
|
4
4
|
var R = /* @__PURE__ */ ((e) => (e.Amendements = "amendements", e))(R || {});
|
|
5
5
|
const I = Object.values(R);
|
|
6
6
|
var S = /* @__PURE__ */ ((e) => (e.Acte_organe = "acte.organe", e.Acte_provenance = "acte.provenance", e.Acte_rapporteurs_acteur = "acte.rapporteurs.acteur", e.Acte_reunion = "acte.reunion", e.Acte_texteAdopte = "acte.texteAdopte", e.Acte_texteAssocie = "acte.texteAssocie", e.Acte_textesAssocies_texteAssocie = "acte.textesAssocies.texteAssocie", e.Acte_votes = "acte.votes", e.Acteur_mandats_organes = "acteur.mandats.organes", e.Amendement_signataires_auteur_acteur = "amendement.signataires.auteur.acteur", e.Amendement_signataires_auteur_auteurRapporteurOrgane = "amendement.signataires.auteur.auteurRapporteurOrgane", e.Amendement_signataires_auteur_gouvernement = "amendement.signataires.auteur.gouvernement", e.Amendement_signataires_auteur_groupePolitique = "amendement.signataires.auteur.groupePolitique", e.Amendement_signataires_cosignataires = "amendement.signataires.cosignataires", e.Amendement_texteLegislatif = "amendement.texteLegislatif", e.Document_auteurs_acteur_acteur = "document.auteurs.acteur.acteur", e.Document_auteurs_organe = "document.auteurs.organe", e.Document_dossier = "document.dossier", e.Dossier_initiateur_acteurs_acteur = "dossier.initiateur.acteurs.acteur", e.Dossier_initiateur_organe = "dossier.initiateur.organe", e.Organe_organeParent = "organe.organeParent", e.Organe_organePrecedent = "organe.organePrecedent", e.Reunion_demandeurs_acteurs_acteur = "reunion.demandeurs.acteurs.acteur", e.Reunion_demandeurs_organe_organe = "reunion.demandeurs.organe.organe", e.Reunion_organeReuni = "reunion.organeReuni", e.Reunion_participants_participantsInternes_acteur = "reunion.participants.participantsInternes.acteur", e.Scrutin_miseAuPoint = "scrutin.miseAuPoint", e.Scrutin_organe = "scrutin.organe", e.Scrutin_ventilationVotes_groupes_organe = "scrutin.ventilationVotes.groupes.organe", e))(S || {});
|
|
@@ -265,8 +265,8 @@ function $(e, t, o) {
|
|
|
265
265
|
}
|
|
266
266
|
if (t.acteurByUid !== void 0 && i.cosignatairesRefs !== void 0) {
|
|
267
267
|
const s = [];
|
|
268
|
-
for (const
|
|
269
|
-
const f = t.acteurByUid[
|
|
268
|
+
for (const l of i.cosignatairesRefs || []) {
|
|
269
|
+
const f = t.acteurByUid[l];
|
|
270
270
|
f !== void 0 && (s.push(f), p(f, t, o));
|
|
271
271
|
}
|
|
272
272
|
i.cosignataires = s;
|
|
@@ -609,27 +609,27 @@ function y(e, t, o = !1) {
|
|
|
609
609
|
`Unable to generate URL for document or division in Sénat. UID: "${e.uid}"`
|
|
610
610
|
), null;
|
|
611
611
|
const s = n[5];
|
|
612
|
-
let
|
|
612
|
+
let l = n[7];
|
|
613
613
|
if (t === "raw-html")
|
|
614
614
|
return {
|
|
615
615
|
directory: "textes",
|
|
616
|
-
url: `https://www.assemblee-nationale.fr/${s}/textes/${
|
|
616
|
+
url: `https://www.assemblee-nationale.fr/${s}/textes/${l}${i}`
|
|
617
617
|
};
|
|
618
618
|
let f = {
|
|
619
619
|
BTC: "TCOM",
|
|
620
620
|
BTA: "TADO",
|
|
621
621
|
TAP: "TADO"
|
|
622
622
|
}[n[6]] || n[1];
|
|
623
|
-
e.classification !== void 0 && e.classification.sousType !== void 0 && e.classification.sousType.code === "COMPA" && (
|
|
624
|
-
const
|
|
625
|
-
if (
|
|
623
|
+
e.classification !== void 0 && e.classification.sousType !== void 0 && e.classification.sousType.code === "COMPA" && (l = l.replace(/-COMPA/, "-aCOMPA")), f == "AVCE" && (f = `AVCE${e.classification.famille?.classe.code}`);
|
|
624
|
+
const d = D[f];
|
|
625
|
+
if (d === void 0)
|
|
626
626
|
return o && console.log(
|
|
627
627
|
`Unable to generate URL from document or division of UID "${e.uid}" and type "${f}"`
|
|
628
628
|
), null;
|
|
629
|
-
const g = t === "pdf" ? `pdf/${
|
|
629
|
+
const g = t === "pdf" ? `pdf/${d.directory}` : d.directory;
|
|
630
630
|
return {
|
|
631
631
|
directory: g,
|
|
632
|
-
url: `https://www.assemblee-nationale.fr/${s}/${g}/${
|
|
632
|
+
url: `https://www.assemblee-nationale.fr/${s}/${g}/${d.prefix}${l}${d.suffix}${i}`
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
635
|
export {
|
|
@@ -644,7 +644,7 @@ export {
|
|
|
644
644
|
Ce as CodeSortScrutinSchema,
|
|
645
645
|
Ee as CodeTypeOrganeSchema,
|
|
646
646
|
Ue as CodeTypeVoteSchema,
|
|
647
|
-
|
|
647
|
+
zi as DecisionSchema,
|
|
648
648
|
Be as DepNaisSchema,
|
|
649
649
|
H as DivisionTypeSchema,
|
|
650
650
|
B as DocumentUrlFormat,
|
|
@@ -654,74 +654,72 @@ export {
|
|
|
654
654
|
x as FinalStatus,
|
|
655
655
|
S as Follow,
|
|
656
656
|
Ie as FormatReunionSchema,
|
|
657
|
-
Le as
|
|
658
|
-
Ne as
|
|
659
|
-
Me as
|
|
660
|
-
je as
|
|
661
|
-
$e as
|
|
662
|
-
Ve as
|
|
663
|
-
Xe as
|
|
664
|
-
we as
|
|
665
|
-
qe as
|
|
666
|
-
Fe as
|
|
667
|
-
Ge as
|
|
668
|
-
ke as
|
|
669
|
-
Qe as
|
|
670
|
-
Je as
|
|
671
|
-
ze as
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
We as
|
|
675
|
-
Ye as
|
|
676
|
-
Ke as ReunionXsiTypeSchema,
|
|
657
|
+
Le as LibelleSchema,
|
|
658
|
+
Ne as LibelleSortScrutinSchema,
|
|
659
|
+
Me as LibelleTypeVoteSchema,
|
|
660
|
+
je as LieuVoteSchema,
|
|
661
|
+
$e as MandatXsiTypeSchema,
|
|
662
|
+
Ve as ModePublicationDesVotesSchema,
|
|
663
|
+
Xe as NatureTravauxOdjSchema,
|
|
664
|
+
we as OrganeXsiTypeSchema,
|
|
665
|
+
qe as PersonneAuditionneeXsiTypeSchema,
|
|
666
|
+
Fe as PointOdjXsiTypeSchema,
|
|
667
|
+
Ge as PositionMajoritaireSchema,
|
|
668
|
+
ke as PositionPolitiqueSchema,
|
|
669
|
+
Qe as PresenceSchema,
|
|
670
|
+
Je as ProcedureSchema,
|
|
671
|
+
ze as QuantiemeSchema,
|
|
672
|
+
Hi as QuestionXsiTypeSchema,
|
|
673
|
+
He as RegimeSchema,
|
|
674
|
+
We as RegionTypeSchema,
|
|
675
|
+
Ye as ReunionXsiTypeSchema,
|
|
677
676
|
_ as StatusOnly,
|
|
678
677
|
W as TypeAuteurSchema,
|
|
679
|
-
|
|
680
|
-
|
|
678
|
+
Ke as TypeMajoriteSchema,
|
|
679
|
+
Ze as TypePointOdjSchema,
|
|
681
680
|
Y as TypePositionSchema,
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
681
|
+
Wi as TypeQuestionSchema,
|
|
682
|
+
ei as TypeReunionSchema,
|
|
683
|
+
ii as UidXsiTypeSchema,
|
|
685
684
|
K as accordGouvernementDepotHorsDelaiOptions,
|
|
686
|
-
|
|
685
|
+
ti as acteLegislatifXsiTypeOptions,
|
|
687
686
|
Z as actionOptions,
|
|
688
687
|
I as allFacets,
|
|
689
688
|
L as allFollows,
|
|
690
689
|
ee as avantAApresOptions,
|
|
691
690
|
N as capitalizeFirstLetter,
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
691
|
+
oi as causePositionVoteOptions,
|
|
692
|
+
ni as civOptions,
|
|
693
|
+
ri as codeActeOptions,
|
|
695
694
|
ie as codeEtatOptions,
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
695
|
+
si as codeNatureDepOptions,
|
|
696
|
+
ai as codeSortScrutinOptions,
|
|
697
|
+
ci as codeTypeOrganeOptions,
|
|
698
|
+
ui as codeTypeVoteOptions,
|
|
700
699
|
M as commissionFondUidFromDossier,
|
|
701
|
-
|
|
702
|
-
di as datasets,
|
|
700
|
+
fi as compteRenduUidRegex,
|
|
703
701
|
te as dateFromNullableDateOrIsoString,
|
|
704
702
|
oe as dateFromYearMonthDayTimezoneString,
|
|
705
|
-
|
|
706
|
-
|
|
703
|
+
Yi as decisionOptions,
|
|
704
|
+
pi as depNaisOptions,
|
|
707
705
|
ne as displayDateFromLocalIsoString,
|
|
708
706
|
re as divisionTypeOptions,
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
707
|
+
li as documentUidRegex,
|
|
708
|
+
di as documentXsiTypeOptions,
|
|
709
|
+
mi as dossierParlementaireXsiTypeOptions,
|
|
710
|
+
yi as dossierUidRegex,
|
|
713
711
|
se as etatAmendementCodeOptions,
|
|
714
712
|
ae as etatAmendementLibelleOptions,
|
|
715
|
-
|
|
716
|
-
|
|
713
|
+
gi as etatCycleDeVieOptions,
|
|
714
|
+
Ri as etatOptions,
|
|
717
715
|
ce as existingDateToJson,
|
|
718
|
-
|
|
716
|
+
Si as famSocProEnumOptions,
|
|
719
717
|
ue as formatRelativeFrenchTime,
|
|
720
|
-
|
|
718
|
+
vi as formatReunionOptions,
|
|
721
719
|
fe as frenchDateFormat,
|
|
722
720
|
pe as frenchDateSameYearShortFormat,
|
|
723
|
-
|
|
724
|
-
|
|
721
|
+
le as frenchDateWithoutDayOfWeekFromDateOrString,
|
|
722
|
+
de as frenchTimeFormat,
|
|
725
723
|
me as frenchTimeFromDateOrString,
|
|
726
724
|
p as insertActeurReferences,
|
|
727
725
|
$ as insertAmendementReferences,
|
|
@@ -731,30 +729,31 @@ export {
|
|
|
731
729
|
E as insertReunionReferences,
|
|
732
730
|
U as insertScrutinReferences,
|
|
733
731
|
X as iterDocumentOrDivisionUrls,
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
732
|
+
Ai as legislatureOptions,
|
|
733
|
+
hi as libelleOptions,
|
|
734
|
+
Oi as libelleSortScrutinOptions,
|
|
735
|
+
Ti as libelleTypeVoteOptions,
|
|
736
|
+
xi as lieuVoteOptions,
|
|
738
737
|
ye as localIso8601StringFromDate,
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
738
|
+
_i as mandatXsiTypeOptions,
|
|
739
|
+
Pi as modePublicationDesVotesOptions,
|
|
740
|
+
Ci as natureTravauxOdjOptions,
|
|
741
|
+
Ei as organeXsiTypeOptions,
|
|
743
742
|
ge as patchedDateToJson,
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
743
|
+
Ui as personneAuditionneeXsiTypeOptions,
|
|
744
|
+
Bi as pointOdjXsiTypeOptions,
|
|
745
|
+
Di as positionMajoritaireOptions,
|
|
746
|
+
bi as positionPolitiqueOptions,
|
|
747
|
+
Ii as presenceOptions,
|
|
748
|
+
Li as procedureOptions,
|
|
749
|
+
Ni as quantiemeOptions,
|
|
750
|
+
Mi as questionUidRegex,
|
|
751
|
+
Ki as questionXsiTypeOptions,
|
|
752
|
+
ji as regimeOptions,
|
|
753
|
+
$i as regionTypeOptions,
|
|
754
|
+
Vi as reunionUidRegex,
|
|
755
|
+
Xi as reunionXsiTypeOptions,
|
|
756
|
+
wi as scrutinUidRegex,
|
|
758
757
|
V as shortNameFromOrgane,
|
|
759
758
|
Re as sortAmendementOptions,
|
|
760
759
|
P as stateFromActePath,
|
|
@@ -762,15 +761,15 @@ export {
|
|
|
762
761
|
j as stateFromDossier,
|
|
763
762
|
u as statusFromCodierLibelle,
|
|
764
763
|
Se as typeAuteurOptions,
|
|
765
|
-
|
|
766
|
-
|
|
764
|
+
qi as typeJoQuestionOptions,
|
|
765
|
+
Fi as typeMajoriteOptions,
|
|
767
766
|
ve as typeMimeNomOptions,
|
|
768
767
|
Ae as typeMimeTypeOptions,
|
|
769
|
-
|
|
768
|
+
Gi as typePointOdjOptions,
|
|
770
769
|
he as typePositionOptions,
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
770
|
+
Zi as typeQuestionOptions,
|
|
771
|
+
ki as typeReunionOptions,
|
|
772
|
+
Qi as uidXsiTypeOptions,
|
|
774
773
|
c as uncapitalizeFirstLetter,
|
|
775
774
|
w as urlFromDocument,
|
|
776
775
|
q as urlFromScrutin,
|
package/lib/legislatures.d.ts
CHANGED