@tricoteuses/tisseuse 0.21.2 → 0.22.0
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/dist/{html-DWNF_0Ek.js → html-BTaoaqX5.js} +6688 -5737
- package/dist/index.js +72 -72
- package/dist/{src/lib → lib}/extractors/article_portions.d.ts +14 -0
- package/dist/{src/lib → lib}/extractors/links.d.ts +117 -3
- package/dist/{src/lib → lib}/f_legi/resolver.d.ts +23 -4
- package/dist/lib/legi/article_abrogation.d.ts +25 -0
- package/dist/lib/legi/article_history.d.ts +11 -0
- package/dist/lib/legi/article_structure.d.ts +9 -0
- package/dist/{src/lib → lib}/legi/canutes_resolver.d.ts +17 -16
- package/dist/lib/legi/law_article.d.ts +13 -0
- package/dist/lib/legi/named_text_article.d.ts +22 -0
- package/dist/lib/legi/publication_components.d.ts +22 -0
- package/dist/lib/legi/publication_components.fixture.d.ts +3 -0
- package/dist/{src/lib → lib}/legi/resolver.d.ts +40 -0
- package/dist/lib/linkers/enumeration_scope.fixture.d.ts +19 -0
- package/dist/{src/lib → lib}/linkers/html.d.ts +16 -3
- package/dist/lib/linkers/html_decision_capture.d.ts +18 -0
- package/dist/lib/linkers/link_decision_html.d.ts +4 -0
- package/dist/lib/linkers/link_decision_metadata.d.ts +15 -0
- package/dist/{src/lib → lib}/linkers/markdown.d.ts +7 -1
- package/dist/lib/linkers/named_text_article.d.ts +1 -0
- package/dist/lib/linkers/quoted_section.fixture.d.ts +1 -0
- package/dist/lib/linkers/table_column_texts.d.ts +4 -0
- package/dist/{src/lib → lib}/server/parsed_bills.d.ts +19 -0
- package/dist/{src/lib → lib}/text_parsers/ast.d.ts +13 -3
- package/dist/lib/text_parsers/historical_versions.d.ts +18 -0
- package/dist/{src/lib → lib}/text_parsers/parsers.d.ts +2 -0
- package/dist/{src/lib → lib}/text_parsers/repeated_actions.d.ts +1 -0
- package/dist/{src/lib → lib}/text_parsers/texts.d.ts +12 -0
- package/dist/link-decision-metadata.js +32 -0
- package/dist/{resolver-BBrU9oGB.js → resolver-GT7457lQ.js} +316 -127
- package/dist/scripts/enrich_assemblee_documents.d.ts +1 -0
- package/dist/scripts/enrich_senat_documents.d.ts +1 -0
- package/dist/scripts/html_document_to_text.d.ts +1 -0
- package/dist/scripts/index_postgres_assemblee_amendments.d.ts +1 -0
- package/dist/scripts/index_postgres_assemblee_texts.d.ts +1 -0
- package/dist/scripts/index_postgres_judilibre.d.ts +1 -0
- package/dist/scripts/index_postgres_legifrance_articles.d.ts +1 -0
- package/dist/scripts/index_postgres_legifrance_jurisprudence.d.ts +1 -0
- package/dist/scripts/index_postgres_senat_amendments.d.ts +1 -0
- package/dist/scripts/index_postgres_senat_texts.d.ts +1 -0
- package/dist/scripts/parse_akoma_ntoso_bill_raw.d.ts +1 -0
- package/dist/scripts/parse_assemblee_bill_raw.d.ts +1 -0
- package/dist/scripts/profile_assemblee_document_parsing.d.ts +1 -0
- package/dist/scripts/profile_canutes_bill.d.ts +1 -0
- package/dist/scripts/replay_linker_scope.d.ts +1 -0
- package/dist/scripts/shared/assemblee_legislature.test.d.ts +1 -0
- package/dist/scripts/shared/checkpoint_cli_options.test.d.ts +1 -0
- package/dist/scripts/simplified_html_bill_to_table_of_contents.d.ts +1 -0
- package/dist/scripts/simplify_word_html.d.ts +1 -0
- package/dist/scripts/sync_postgres_assemblee_document_content.d.ts +1 -0
- package/dist/scripts/sync_postgres_senat_document_content.d.ts +1 -0
- package/dist/scripts/test_canutes_titles_cache.d.ts +1 -0
- package/dist/scripts/warm_canutes_text_titles_cache.d.ts +1 -0
- package/dist/server-f-legi.js +200 -94
- package/dist/server.js +1080 -959
- package/package.json +9 -4
- package/dist/{src/lib → lib}/alineas/alineas_numbers.d.ts +0 -0
- package/dist/{src/lib → lib}/article_temporal_status.test.d.ts +0 -0
- package/dist/{src/lib → lib}/articles.d.ts +0 -0
- package/dist/{src/lib → lib}/articles.test.d.ts +0 -0
- package/dist/{src/lib → lib}/assemblee_document_date.d.ts +0 -0
- package/dist/{src/lib → lib}/assemblee_document_date.test.d.ts +0 -0
- package/dist/{src/lib → lib}/asserts.d.ts +0 -0
- package/dist/{src/lib → lib}/cache.d.ts +0 -0
- package/dist/{src/lib → lib}/dates.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/action_directives.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/action_directives.test.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/action_directives_cpu.test.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/article_action_effects.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/article_action_effects.test.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/article_action_effects_long.test.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/article_action_targets.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/article_action_targets.test.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/article_portions.test.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/definitions.d.ts +0 -0
- package/dist/{src/lib/extractors/links.citation_scope.test.d.ts → lib/extractors/link_decisions.test.d.ts} +0 -0
- package/dist/{src/lib/extractors/links.code_titles.test.d.ts → lib/extractors/links.citation_scope.test.d.ts} +0 -0
- package/dist/{src/lib/extractors/links.doctrinal.test.d.ts → lib/extractors/links.code_titles.test.d.ts} +0 -0
- package/dist/{src/lib/extractors/links.european.test.d.ts → lib/extractors/links.doctrinal.test.d.ts} +0 -0
- package/dist/{src/lib/extractors/links.test.d.ts → lib/extractors/links.european.test.d.ts} +0 -0
- package/dist/{src/lib/extractors/portion_references.test.d.ts → lib/extractors/links.test.d.ts} +0 -0
- package/dist/{src/lib → lib}/extractors/portion_references.d.ts +0 -0
- package/dist/{src/lib/extractors/portion_references_cpu.test.d.ts → lib/extractors/portion_references.test.d.ts} +0 -0
- package/dist/{src/lib/extractors/qualified_versions.test.d.ts → lib/extractors/portion_references_cpu.test.d.ts} +0 -0
- package/dist/{src/lib → lib}/extractors/qualified_versions.d.ts +0 -0
- package/dist/{src/lib/extractors/references.test.d.ts → lib/extractors/qualified_versions.test.d.ts} +0 -0
- package/dist/{src/lib → lib}/extractors/quoted_text.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/references.d.ts +0 -0
- package/dist/{src/lib/text_parsers → lib/extractors}/references.test.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/table_of_contents.d.ts +0 -0
- package/dist/{src/lib → lib}/extractors/table_of_contents.test.d.ts +0 -0
- package/dist/{src/lib → lib}/f_legi/resolver.test.d.ts +0 -0
- package/dist/{src/lib → lib}/index.d.ts +0 -0
- package/dist/{src/lib → lib}/json.d.ts +0 -0
- package/dist/{src/lib/legi/canutes_article_preload.test.d.ts → lib/legi/article_abrogation.test.d.ts} +0 -0
- package/dist/{src/lib/legi/canutes_candidates.test.d.ts → lib/legi/article_history.test.d.ts} +0 -0
- package/dist/{src/lib/legi/canutes_resolver.test.d.ts → lib/legi/canutes_article_preload.test.d.ts} +0 -0
- package/dist/{src/lib/legi/canutes_resolver_cache.test.d.ts → lib/legi/canutes_candidates.test.d.ts} +0 -0
- package/dist/{src/lib/legi/canutes_resolver_europe.test.d.ts → lib/legi/canutes_resolver.test.d.ts} +0 -0
- package/dist/{src/lib/legi/canutes_root_cid_index.integration.test.d.ts → lib/legi/canutes_resolver_cache.test.d.ts} +0 -0
- package/dist/{src/lib/legi/canutes_section_roots.test.d.ts → lib/legi/canutes_resolver_europe.test.d.ts} +0 -0
- package/dist/{src/lib/legi/canutes_text_titles_cache.integration.test.d.ts → lib/legi/canutes_root_cid_index.integration.test.d.ts} +0 -0
- package/dist/{src/lib/legi/resolver.test.d.ts → lib/legi/canutes_section_roots.test.d.ts} +0 -0
- package/dist/{src/lib → lib}/legi/canutes_sql.d.ts +0 -0
- package/dist/{src/lib → lib}/legi/canutes_text_titles_cache.d.ts +0 -0
- package/dist/{src/lib/linkers/cited-article.test.d.ts → lib/legi/canutes_text_titles_cache.integration.test.d.ts} +0 -0
- package/dist/{src/lib → lib}/legi/canutes_titles_metrics.d.ts +0 -0
- package/dist/{src/lib/linkers/reference-mode.test.d.ts → lib/legi/modifying_act_article_real.test.d.ts} +0 -0
- package/dist/{src/lib/server/administrative_acts_autocompletion.test.d.ts → lib/legi/publication_components.test.d.ts} +0 -0
- package/dist/{src/lib/server/akn_rendering.test.d.ts → lib/legi/resolver.test.d.ts} +0 -0
- package/dist/{src/lib → lib}/legi/text_titles_infos.d.ts +0 -0
- package/dist/{src/lib/server/ameli_autocompletion.test.d.ts → lib/linkers/ambiguous_publication.test.d.ts} +0 -0
- package/dist/{src/lib/server/assemblee_amendment_search.test.d.ts → lib/linkers/cited-article.test.d.ts} +0 -0
- package/dist/{src/lib/server/assemblee_document_search.test.d.ts → lib/linkers/enumeration_scope.test.d.ts} +0 -0
- package/dist/{src/lib/server/atomic_files.test.d.ts → lib/linkers/html_decision_capture.test.d.ts} +0 -0
- package/dist/{src/lib/server/bill_action_resolver_invariance.test.d.ts → lib/linkers/html_named_text_article.test.d.ts} +0 -0
- package/dist/{src/lib/server/bill_citation_anaphora.test.d.ts → lib/linkers/html_publication_93_859_real.test.d.ts} +0 -0
- package/dist/{src/lib/server/bill_comparison.test.d.ts → lib/linkers/html_structure_real.test.d.ts} +0 -0
- package/dist/{src/lib/server/bill_target_scope.test.d.ts → lib/linkers/html_undecidable_real.test.d.ts} +0 -0
- package/dist/{src/lib/server/bofip_autocompletion.test.d.ts → lib/linkers/link_decision_html.test.d.ts} +0 -0
- package/dist/{src/lib/server/boss_autocompletion.test.d.ts → lib/linkers/named_text_article.test.d.ts} +0 -0
- package/dist/{src/lib/server/canutes_only_compatibility.test.d.ts → lib/linkers/quoted_section_scope.test.d.ts} +0 -0
- package/dist/{src/lib/server/document_git_checkpoint.test.d.ts → lib/linkers/reference-mode.test.d.ts} +0 -0
- package/dist/{src/lib → lib}/links.d.ts +6 -6
- /package/dist/{src/lib/server/enriched_document_checkpoint.test.d.ts → lib/links.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/loaders/assemblee.d.ts +0 -0
- /package/dist/{src/lib → lib}/loaders/legifrance.d.ts +0 -0
- /package/dist/{src/lib → lib}/markdown.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/administrative_acts_autocompletion.d.ts +0 -0
- /package/dist/{src/lib/server/europe_autocompletion.test.d.ts → lib/server/administrative_acts_autocompletion.test.d.ts} +0 -0
- /package/dist/{src/lib/server/flegi_profiling.test.d.ts → lib/server/akn_rendering.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/alineas/alineas_images_utils.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/ameli_autocompletion.d.ts +0 -0
- /package/dist/{src/lib/server/html_simplifier.test.d.ts → lib/server/ameli_autocompletion.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/assemblee_amendment_search.d.ts +0 -0
- /package/dist/{src/lib/server/international_treaties_autocompletion.test.d.ts → lib/server/assemblee_amendment_search.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/assemblee_document_search.d.ts +0 -0
- /package/dist/{src/lib/server/judilibre_search.test.d.ts → lib/server/assemblee_document_search.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/atomic_files.d.ts +0 -0
- /package/dist/{src/lib/server/jurisprudence_citations.test.d.ts → lib/server/atomic_files.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/auditors/config.d.ts +0 -0
- /package/dist/{src/lib/server/jurisprudence_jade.test.d.ts → lib/server/bill_action_resolver_invariance.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/bill_action_target_fixtures.d.ts +0 -0
- /package/dist/{src/lib/server/jurisprudence_store.integration.test.d.ts → lib/server/bill_citation_anaphora.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/bill_comparison.d.ts +0 -0
- /package/dist/{src/lib/server/jurisprudence_store_closed.test.d.ts → lib/server/bill_comparison.test.d.ts} +0 -0
- /package/dist/{src/lib/server/legifrance_article_search.test.d.ts → lib/server/bill_target_scope.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/bofip_autocompletion.d.ts +0 -0
- /package/dist/{src/lib/server/legifrance_jurisprudence_search.test.d.ts → lib/server/bofip_autocompletion.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/boss_autocompletion.d.ts +0 -0
- /package/dist/{src/lib/server/local_acts_autocompletion.test.d.ts → lib/server/boss_autocompletion.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/canutes_legacy_candidates.d.ts +0 -0
- /package/dist/{src/lib/server/masquage-typesense.test.d.ts → lib/server/canutes_only_compatibility.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/config.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/databases/canutes_root_cid_index.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/databases/canutes_text_titles_cache.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/databases/index.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/document_git_checkpoint.d.ts +0 -0
- /package/dist/{src/lib/server/parsed_amendments.test.d.ts → lib/server/document_git_checkpoint.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/enriched_document_checkpoint.d.ts +0 -0
- /package/dist/{src/lib/server/parsed_bills.test.d.ts → lib/server/enriched_document_checkpoint.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/europe_autocompletion.d.ts +0 -0
- /package/dist/{src/lib/server/raa_autocompletion.test.d.ts → lib/server/europe_autocompletion.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/f_legi/index.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/flegi_profiling.d.ts +0 -0
- /package/dist/{src/lib/server/senat_amendment_search.test.d.ts → lib/server/flegi_profiling.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/html_simplifier.d.ts +0 -0
- /package/dist/{src/lib/server/senat_document_search.test.d.ts → lib/server/html_simplifier.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/index.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/international_treaties_autocompletion.d.ts +0 -0
- /package/dist/{src/lib/server/shared_legal_text_sections.test.d.ts → lib/server/international_treaties_autocompletion.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/judilibre_search.d.ts +0 -0
- /package/dist/{src/lib/server/sql_profiling.test.d.ts → lib/server/judilibre_search.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/jurisprudence_citations.d.ts +0 -0
- /package/dist/{src/lib/server/sync_administrative_act_titles.test.d.ts → lib/server/jurisprudence_citations.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/jurisprudence_consultation.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/jurisprudence_jade.d.ts +0 -0
- /package/dist/{src/lib/server/sync_assemblee_legal_texts.test.d.ts → lib/server/jurisprudence_jade.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/jurisprudence_store.d.ts +0 -0
- /package/dist/{src/lib/server/sync_local_act_titles.test.d.ts → lib/server/jurisprudence_store.integration.test.d.ts} +0 -0
- /package/dist/{src/lib/server/typesense_blue_green.test.d.ts → lib/server/jurisprudence_store_closed.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/legi/resolvers.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/legifrance_article_search.d.ts +0 -0
- /package/dist/{src/lib/server/typesense_index_lock.test.d.ts → lib/server/legifrance_article_search.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/legifrance_jurisprudence_search.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/action_citation_patterns.test.d.ts → lib/server/legifrance_jurisprudence_search.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/linkers/html.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/local_acts_autocompletion.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/action_directives.test.d.ts → lib/server/local_acts_autocompletion.test.d.ts} +0 -0
- /package/dist/{src/lib/text_parsers/action_occurrences.test.d.ts → lib/server/masquage-typesense.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/masquage_typesense.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/action_position_cues.test.d.ts → lib/server/named_text_article_decisions.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/parsed_amendments.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/action_words.test.d.ts → lib/server/parsed_amendments.test.d.ts} +0 -0
- /package/dist/{src/lib/text_parsers/actions.test.d.ts → lib/server/parsed_bill_abrogation.test.d.ts} +0 -0
- /package/dist/{src/lib/text_parsers/articles.test.d.ts → lib/server/parsed_bill_future_consultation.test.d.ts} +0 -0
- /package/dist/{src/lib/text_parsers/citations.test.d.ts → lib/server/parsed_bill_link_decisions.test.d.ts} +0 -0
- /package/dist/{src/lib/text_parsers/dates.test.d.ts → lib/server/parsed_bills.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/raa_autocompletion.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/divisions.test.d.ts → lib/server/raa_autocompletion.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/senat_amendment_search.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/doctrinal_references.test.d.ts → lib/server/senat_amendment_search.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/senat_document_search.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/numbers.test.d.ts → lib/server/senat_document_search.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/senat_document_sources.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/shared_legal_text_sections.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/parsers.test.d.ts → lib/server/shared_legal_text_sections.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/sql_profiling.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/portions.test.d.ts → lib/server/sql_profiling.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/sync_administrative_act_titles.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/prepositions.test.d.ts → lib/server/sync_administrative_act_titles.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/sync_ameli_titles.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/sync_assemblee_legal_texts.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/relative_locations.test.d.ts → lib/server/sync_assemblee_legal_texts.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/sync_boss_titles.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/sync_europe_titles.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/sync_international_treaty_titles.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/sync_local_act_titles.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/repeated_actions.test.d.ts → lib/server/sync_local_act_titles.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/sync_raa_titles.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/tables_of_contents.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/text_parsers/transformers.d.ts +0 -0
- /package/dist/{src/lib → lib}/server/typesense_blue_green.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/search_queries.test.d.ts → lib/server/typesense_blue_green.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/server/typesense_index_lock.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/simplifiers.test.d.ts → lib/server/typesense_index_lock.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/test/text_titles_infos.d.ts +0 -0
- /package/dist/{src/lib → lib}/text_parsers/action_citation_patterns.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/texts.test.d.ts → lib/text_parsers/action_citation_patterns.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/action_directives.d.ts +0 -0
- /package/dist/{src/lib/text_parsers/typography.test.d.ts → lib/text_parsers/action_directives.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/action_occurrences.d.ts +0 -0
- /package/dist/{src/scripts/add_links_to_assemblee_parsed_documents.d.ts → lib/text_parsers/action_occurrences.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/action_position_cues.d.ts +0 -0
- /package/dist/{src/scripts/add_links_to_html_document.d.ts → lib/text_parsers/action_position_cues.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/action_target_scopes.d.ts +0 -0
- /package/dist/{src/lib → lib}/text_parsers/action_words.d.ts +0 -0
- /package/dist/{src/scripts/add_links_to_legifrance.d.ts → lib/text_parsers/action_words.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/actions.d.ts +0 -0
- /package/dist/{src/scripts/add_links_to_senat_comptes_rendus.d.ts → lib/text_parsers/actions.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/amendment_action_directives.d.ts +0 -0
- /package/dist/{src/lib → lib}/text_parsers/articles.d.ts +0 -0
- /package/dist/{src/scripts/add_links_to_senat_parsed_documents.d.ts → lib/text_parsers/articles.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/citations.d.ts +0 -0
- /package/dist/{src/scripts/alimenter_jurisprudence_pilote.d.ts → lib/text_parsers/citations.test.d.ts} +0 -0
- /package/dist/{src/scripts/associate_jorf_textes_with_assemblee_commissions.d.ts → lib/text_parsers/code_annexes.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/dates.d.ts +0 -0
- /package/dist/{src/scripts/associate_jorf_textes_with_dossiers_legislatifs_assemblee.d.ts → lib/text_parsers/dates.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/divisions.d.ts +0 -0
- /package/dist/{src/scripts/compare_legi_bills.d.ts → lib/text_parsers/divisions.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/doctrinal_references.d.ts +0 -0
- /package/dist/{src/scripts/configure_postgres_assemblee_document_triggers.d.ts → lib/text_parsers/doctrinal_references.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/fragments.d.ts +0 -0
- /package/dist/{src/lib → lib}/text_parsers/helpers.d.ts +0 -0
- /package/dist/{src/scripts/configure_postgres_legi_resolver.d.ts → lib/text_parsers/historical_versions.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/legal_text_aliases.d.ts +0 -0
- /package/dist/{src/lib → lib}/text_parsers/numbers.d.ts +0 -0
- /package/dist/{src/scripts/configure_postgres_root_cid_index.d.ts → lib/text_parsers/numbers.test.d.ts} +0 -0
- /package/dist/{src/scripts/configure_postgres_senat_document_triggers.d.ts → lib/text_parsers/parsers.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/portions.d.ts +0 -0
- /package/dist/{src/scripts/enrich_assemblee_documents.d.ts → lib/text_parsers/portions.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/prepositions.d.ts +0 -0
- /package/dist/{src/scripts/enrich_senat_documents.d.ts → lib/text_parsers/prepositions.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/qualified_versions.d.ts +0 -0
- /package/dist/{src/lib → lib}/text_parsers/references.d.ts +0 -0
- /package/dist/{src/scripts/html_document_to_text.d.ts → lib/text_parsers/references.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/relative_locations.d.ts +0 -0
- /package/dist/{src/scripts/index_postgres_assemblee_amendments.d.ts → lib/text_parsers/relative_locations.test.d.ts} +0 -0
- /package/dist/{src/scripts/index_postgres_assemblee_texts.d.ts → lib/text_parsers/repeated_actions.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/search_queries.d.ts +0 -0
- /package/dist/{src/scripts/index_postgres_judilibre.d.ts → lib/text_parsers/search_queries.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/separators.d.ts +0 -0
- /package/dist/{src/lib → lib}/text_parsers/simplifiers.d.ts +0 -0
- /package/dist/{src/scripts/index_postgres_legifrance_articles.d.ts → lib/text_parsers/simplifiers.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/table_row_targets.d.ts +0 -0
- /package/dist/{src/lib → lib}/text_parsers/table_unit_notes.d.ts +0 -0
- /package/dist/{src/scripts/index_postgres_legifrance_jurisprudence.d.ts → lib/text_parsers/texts.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/text_parsers/transformers.d.ts +0 -0
- /package/dist/{src/lib → lib}/text_parsers/typography.d.ts +0 -0
- /package/dist/{src/scripts/index_postgres_senat_amendments.d.ts → lib/text_parsers/typography.test.d.ts} +0 -0
- /package/dist/{src/lib → lib}/textes.d.ts +0 -0
- /package/dist/{src/lib → lib}/timings.d.ts +0 -0
- /package/dist/{src/scripts/index_postgres_senat_texts.d.ts → scripts/add_links_to_assemblee_parsed_documents.d.ts} +0 -0
- /package/dist/{src/scripts/parse_akoma_ntoso_bill_raw.d.ts → scripts/add_links_to_html_document.d.ts} +0 -0
- /package/dist/{src/scripts/parse_assemblee_bill_raw.d.ts → scripts/add_links_to_legifrance.d.ts} +0 -0
- /package/dist/{src/scripts/profile_assemblee_document_parsing.d.ts → scripts/add_links_to_senat_comptes_rendus.d.ts} +0 -0
- /package/dist/{src/scripts/profile_canutes_bill.d.ts → scripts/add_links_to_senat_parsed_documents.d.ts} +0 -0
- /package/dist/{src/scripts → scripts}/add_positions_to_table_of_contents.d.ts +0 -0
- /package/dist/{src/scripts → scripts}/add_references_to_html_document.d.ts +0 -0
- /package/dist/{src/scripts/shared/assemblee_legislature.test.d.ts → scripts/alimenter_jurisprudence_pilote.d.ts} +0 -0
- /package/dist/{src/scripts/shared/checkpoint_cli_options.test.d.ts → scripts/associate_jorf_textes_with_assemblee_commissions.d.ts} +0 -0
- /package/dist/{src/scripts/simplified_html_bill_to_table_of_contents.d.ts → scripts/associate_jorf_textes_with_dossiers_legislatifs_assemblee.d.ts} +0 -0
- /package/dist/{src/scripts → scripts}/audit_doctrinal_references.d.ts +0 -0
- /package/dist/{src/scripts/simplify_word_html.d.ts → scripts/compare_legi_bills.d.ts} +0 -0
- /package/dist/{src/scripts → scripts}/configure.d.ts +0 -0
- /package/dist/{src/scripts/sync_postgres_assemblee_document_content.d.ts → scripts/configure_postgres_assemblee_document_triggers.d.ts} +0 -0
- /package/dist/{src/scripts/sync_postgres_senat_document_content.d.ts → scripts/configure_postgres_legi_resolver.d.ts} +0 -0
- /package/dist/{src/scripts/test_canutes_titles_cache.d.ts → scripts/configure_postgres_root_cid_index.d.ts} +0 -0
- /package/dist/{src/scripts/warm_canutes_text_titles_cache.d.ts → scripts/configure_postgres_senat_document_triggers.d.ts} +0 -0
- /package/dist/{src/scripts → scripts}/extract_alineas_images.d.ts +0 -0
- /package/dist/{src/scripts → scripts}/generate_alineas_numbers_review.d.ts +0 -0
- /package/dist/{src/scripts → scripts}/index_typesense.d.ts +0 -0
- /package/dist/{src/scripts → scripts}/merge_reviewed_alineas_numbers.d.ts +0 -0
- /package/dist/{src/scripts → scripts}/set_articles_missing_num.d.ts +0 -0
- /package/dist/{src/scripts → scripts}/shared/assemblee_legislature.d.ts +0 -0
- /package/dist/{src/scripts → scripts}/shared/checkpoint_cli_options.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { $ as e, $t as t, At as n, B as r, Bt as i,
|
|
2
|
-
import { $ as
|
|
1
|
+
import { $ as e, $t as t, At as n, B as r, Bt as i, C as a, Cn as o, Ct as s, Dt as c, Et as l, Ft as u, G as d, Gt as f, H as p, Ht as m, It as h, Jt as ee, K as te, Kt as ne, L as re, Lt as ie, Mt as g, N as ae, Nt as oe, O as se, Ot as ce, Pt as le, Q as ue, Qt as de, R as fe, Rt as pe, S as me, Sn as he, St as ge, Tt as _e, U as ve, Ut as ye, V as be, Vt as xe, W as Se, Wt as Ce, X as we, Xt as Te, Y as Ee, Yt as De, Z as Oe, Zt as ke, _n as _, _t as v, a as y, an as b, at as x, b as S, bn as C, bt as w, c as Ae, cn as je, ct as Me, d as T, dn as Ne, dt as Pe, en as Fe, et as Ie, f as E, fn as Le, ft as Re, gn as ze, hn as Be, ht as Ve, i as He, in as Ue, it as We, jt as D, kt as Ge, l as O, ln as Ke, lt as qe, m as Je, mn as Ye, mt as Xe, n as Ze, nn as Qe, nt as $e, o as et, on as tt, p as nt, pn as rt, pt as it, qt as at, r as ot, rn as st, rt as ct, s as k, sn as lt, st as ut, t as dt, tn as ft, tt as pt, u as mt, un as ht, ut as gt, vn as _t, vt, wt as yt, x as bt, xn as xt, xt as St, y as Ct, yn as wt, yt as Tt, z as Et } from "./html-BTaoaqX5.js";
|
|
2
|
+
import { $ as Dt, A, B as Ot, Bt as j, C as kt, Ct as At, Dt as jt, E as Mt, Et as Nt, F as Pt, Ft, G as It, Gt as Lt, H as Rt, I as zt, J as M, Jt as Bt, K as Vt, Kt as N, L as Ht, Lt as Ut, M as Wt, N as Gt, Nt as Kt, O as qt, P as Jt, Pt as Yt, Q as Xt, R as Zt, Rt as P, S as Qt, T as $t, Tt as en, U as tn, V as nn, Vt as F, Wt as I, Xt as L, Y as R, Yt as rn, at as an, b as on, ct as sn, d as cn, dt as ln, f as un, gt as dn, it as fn, j as pn, jt as z, k as B, lt as mn, m as hn, mt as gn, nt as _n, o as vn, ot as yn, p as bn, pt as xn, q as Sn, qt as Cn, s as wn, st as Tn, t as En, ut as Dn, w as On, wt as kn, x as An, xt as jn, yt as Mn, z as V, zt as H } from "./resolver-GT7457lQ.js";
|
|
3
3
|
//#region src/lib/cache.ts
|
|
4
|
-
var U = () => /* @__PURE__ */ new Map(), W = () => /* @__PURE__ */ new Map(),
|
|
4
|
+
var U = () => /* @__PURE__ */ new Map(), W = () => /* @__PURE__ */ new Map(), Nn = () => ({
|
|
5
5
|
assemblee: U(),
|
|
6
6
|
legifrance: W()
|
|
7
|
-
}),
|
|
8
|
-
function
|
|
9
|
-
return
|
|
7
|
+
}), Pn = new Intl.DateTimeFormat("fr-FR", { dateStyle: "long" });
|
|
8
|
+
function G(e) {
|
|
9
|
+
return Pn.format(new Date(e)).replace(/^1 /, "1er ");
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/lib/json.ts
|
|
13
|
-
var
|
|
13
|
+
var Fn = (e, t) => t instanceof Object && !Array.isArray(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/lib/markdown.ts
|
|
16
16
|
function K(e) {
|
|
@@ -18,27 +18,32 @@ function K(e) {
|
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/lib/linkers/markdown.ts
|
|
21
|
-
async function q({ canutesDb: e,
|
|
22
|
-
let
|
|
23
|
-
if (
|
|
24
|
-
await
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
let
|
|
28
|
-
for await (let e of
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
async function q({ canutesDb: e, callerDate: t, legiResolver: n, date: r, linkBaseUrl: i, linkDecisionDocumentId: a, linkType: o, parsingMode: s, previousContext: c, text: l }) {
|
|
22
|
+
let u = n ?? (e === void 0 ? void 0 : new Je(e));
|
|
23
|
+
if (u === void 0) throw Error("A Canutes database or legal resolver is required");
|
|
24
|
+
await u.preloadTextTitlesInfos();
|
|
25
|
+
let d = V(l), f = new P(d.output);
|
|
26
|
+
f.currentArticle = c?.currentArticle, f.currentText = c?.currentText;
|
|
27
|
+
let p = l, m = 0, h = a === void 0 ? void 0 : [];
|
|
28
|
+
for await (let e of k({
|
|
29
|
+
callerDate: t,
|
|
30
|
+
legiResolver: u,
|
|
31
|
+
context: f,
|
|
32
|
+
date: r,
|
|
33
|
+
parsingMode: s,
|
|
34
|
+
decisionObserver: a === void 0 ? void 0 : {
|
|
35
|
+
documentId: a,
|
|
36
|
+
onDecision: (e) => h.push(e)
|
|
37
|
+
},
|
|
38
|
+
transformation: d
|
|
34
39
|
})) switch (e.type) {
|
|
35
40
|
case "article_definition": break;
|
|
36
41
|
case "external_article": {
|
|
37
|
-
let { articleId: t, historyArticleId: n, originalTransformation:
|
|
38
|
-
if (
|
|
39
|
-
if (
|
|
40
|
-
let t =
|
|
41
|
-
|
|
42
|
+
let { articleId: t, historyArticleId: n, originalTransformation: r } = e, a = t === void 0 ? n === void 0 ? void 0 : T(o, i, n) : E(o, i, t);
|
|
43
|
+
if (a !== void 0) {
|
|
44
|
+
if (r === void 0) throw Error(`Missing originalTransformation attribute in external article link: ${JSON.stringify(e, null, 2)}`);
|
|
45
|
+
let t = R(r, `[${K(M(p, r, m))}](${a})`);
|
|
46
|
+
p = p.slice(0, r.position.start + m) + t + p.slice(r.position.stop + m), m += t.length - (r.position.stop - r.position.start);
|
|
42
47
|
}
|
|
43
48
|
break;
|
|
44
49
|
}
|
|
@@ -46,64 +51,59 @@ async function q({ canutesDb: e, legiResolver: t, date: n, linkBaseUrl: r, linkT
|
|
|
46
51
|
let { originalTransformation: t, sectionTaId: n } = e;
|
|
47
52
|
if (n !== void 0) {
|
|
48
53
|
if (t === void 0) throw Error(`Missing originalTransformation attribute in external division link: ${JSON.stringify(e, null, 2)}`);
|
|
49
|
-
let
|
|
50
|
-
|
|
54
|
+
let r = R(t, `[${K(M(p, t, m))}](${E(o, i, n)})`);
|
|
55
|
+
p = p.slice(0, t.position.start + m) + r + p.slice(t.position.stop + m), m += r.length - (t.position.stop - t.position.start);
|
|
51
56
|
}
|
|
52
57
|
break;
|
|
53
58
|
}
|
|
54
59
|
case "external_text": {
|
|
55
|
-
let { originalTransformation: t, text:
|
|
56
|
-
if (
|
|
57
|
-
|
|
60
|
+
let { originalTransformation: t, text: n } = e;
|
|
61
|
+
if (n.cid === void 0) {
|
|
62
|
+
n.relative !== 0 && console.error(`Link to text "${f.text(n.position)}" without CID: ${JSON.stringify(n, null, 2)}`);
|
|
58
63
|
continue;
|
|
59
64
|
}
|
|
60
65
|
if (t === void 0) throw Error(`Missing originalTransformation attribute in external text link: ${JSON.stringify(e, null, 2)}`);
|
|
61
|
-
let
|
|
62
|
-
if (
|
|
63
|
-
let
|
|
64
|
-
date:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
let e = await c.getArticleHistoryInfo({
|
|
71
|
-
num: o,
|
|
72
|
-
textId: a.cid
|
|
73
|
-
});
|
|
74
|
-
e !== void 0 && (s = v(i, r, e.articleId));
|
|
75
|
-
}
|
|
66
|
+
let a = O(f.text(n.position)), s;
|
|
67
|
+
if (a !== void 0) {
|
|
68
|
+
let { articleId: t, historyArticleId: c } = e.namedArticle ?? await nt({
|
|
69
|
+
date: r,
|
|
70
|
+
legiResolver: u,
|
|
71
|
+
num: a,
|
|
72
|
+
textId: n.cid
|
|
73
|
+
});
|
|
74
|
+
t === void 0 ? c !== void 0 && (s = T(o, i, c)) : s = E(o, i, t);
|
|
76
75
|
}
|
|
77
|
-
s === void 0 && (s =
|
|
78
|
-
let
|
|
79
|
-
|
|
76
|
+
s === void 0 && (s = E(o, i, n.cid));
|
|
77
|
+
let c = R(t, `[${K(M(p, t, m))}](${s})`);
|
|
78
|
+
p = p.slice(0, t.position.start + m) + c + p.slice(t.position.stop + m), m += c.length - (t.position.stop - t.position.start);
|
|
80
79
|
break;
|
|
81
80
|
}
|
|
82
81
|
case "internal_article": {
|
|
83
82
|
let { definition: t, originalTransformation: n } = e;
|
|
84
83
|
if (n === void 0) throw Error(`Missing originalTransformation attribute in internal article link: ${JSON.stringify(e, null, 2)}`);
|
|
85
|
-
let r =
|
|
86
|
-
|
|
84
|
+
let r = R(n, `[${K(M(p, n, m))}](#definition_article_${t.textId}_${t.article.num.replaceAll(" ", "_")})`);
|
|
85
|
+
p = p.slice(0, n.position.start + m) + r + p.slice(n.position.stop + m), m += r.length - (n.position.stop - n.position.start);
|
|
87
86
|
break;
|
|
88
87
|
}
|
|
89
88
|
case "european_text": {
|
|
90
89
|
let { url: t, originalTransformation: n } = e;
|
|
91
90
|
if (t === void 0) continue;
|
|
92
91
|
if (n === void 0) throw Error(`Missing originalTransformation attribute in european text link: ${JSON.stringify(e, null, 2)}`);
|
|
93
|
-
let r =
|
|
94
|
-
|
|
92
|
+
let r = M(p, n, m), i = R(n, `<a class="lien_texte_european" href="${t}"${t.startsWith("/") ? "" : " target=\"_blank\""}>${r}</a>`);
|
|
93
|
+
p = p.slice(0, n.position.start + m) + i + p.slice(n.position.stop + m), m += i.length - (n.position.stop - n.position.start);
|
|
95
94
|
break;
|
|
96
95
|
}
|
|
97
|
-
default:
|
|
96
|
+
default: L("Link", e);
|
|
98
97
|
}
|
|
99
98
|
return {
|
|
100
|
-
context:
|
|
101
|
-
output:
|
|
99
|
+
context: f,
|
|
100
|
+
output: p === l ? null : p,
|
|
101
|
+
...h === void 0 ? {} : { linkDecisions: h }
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
105
|
//#region src/lib/loaders/assemblee.ts
|
|
106
|
-
async function
|
|
106
|
+
async function In(e, t, n) {
|
|
107
107
|
let r = t.get("Document");
|
|
108
108
|
r === void 0 && (r = /* @__PURE__ */ new Map(), t.set("Document", r));
|
|
109
109
|
let i = r.get(n);
|
|
@@ -113,7 +113,7 @@ async function Fn(e, t, n) {
|
|
|
113
113
|
WHERE uid = ${n}
|
|
114
114
|
`)[0]?.data, r.set(n, i ?? null)), i ?? void 0;
|
|
115
115
|
}
|
|
116
|
-
async function
|
|
116
|
+
async function Ln(e, t, n) {
|
|
117
117
|
let r = t.get("Document");
|
|
118
118
|
return r === void 0 && (r = /* @__PURE__ */ new Map(), t.set("Document", r)), (await e`
|
|
119
119
|
SELECT data, uid
|
|
@@ -121,7 +121,7 @@ async function In(e, t, n) {
|
|
|
121
121
|
WHERE data ->> 'dossierRef' = ${n}
|
|
122
122
|
`).map(({ data: e, uid: t }) => (r.set(t, e ?? null), e));
|
|
123
123
|
}
|
|
124
|
-
async function
|
|
124
|
+
async function Rn(e, t, n) {
|
|
125
125
|
let r = t.get("DossierParlementaire");
|
|
126
126
|
r === void 0 && (r = /* @__PURE__ */ new Map(), t.set("DossierParlementaire", r));
|
|
127
127
|
let i = r.get(n);
|
|
@@ -133,15 +133,15 @@ async function Ln(e, t, n) {
|
|
|
133
133
|
}
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region src/lib/text_parsers/search_queries.ts
|
|
136
|
-
var J = N("art(?:icle|icl|ic|i|s)?\\.?|al(?:inéa|inea|in|i)?\\.?", { flags: "i" }), Y =
|
|
136
|
+
var J = N("art(?:icle|icl|ic|i|s)?\\.?|al(?:inéa|inea|in|i)?\\.?", { flags: "i" }), Y = j([
|
|
137
137
|
J,
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
I(z, { default: "" }),
|
|
139
|
+
H(D, g)
|
|
140
140
|
], { value: (e, t) => ({
|
|
141
141
|
num: e[2],
|
|
142
142
|
position: t.position(),
|
|
143
143
|
type: "article"
|
|
144
|
-
}) }), X =
|
|
144
|
+
}) }), X = H(N("c(?:ode|\\.)? ?civ(?:il)?", {
|
|
145
145
|
flags: "i",
|
|
146
146
|
value: (e, t) => ({
|
|
147
147
|
cid: "LEGITEXT000006070721",
|
|
@@ -249,13 +249,13 @@ var J = N("art(?:icle|icl|ic|i|s)?\\.?|al(?:inéa|inea|in|i)?\\.?", { flags: "i"
|
|
|
249
249
|
title: "Code de commerce",
|
|
250
250
|
type: "texte"
|
|
251
251
|
})
|
|
252
|
-
})), Z =
|
|
252
|
+
})), Z = H(X, F(A, { value: (e, t) => e === void 0 ? void 0 : {
|
|
253
253
|
...e,
|
|
254
254
|
position: t.position()
|
|
255
|
-
} }),
|
|
255
|
+
} }), F(B, { value: (e, t) => ({
|
|
256
256
|
...e,
|
|
257
257
|
position: t.position()
|
|
258
|
-
}) })), Q =
|
|
258
|
+
}) })), Q = I(N(" (?:du |de la |de l'|des |de |d')?", { flags: "i" }), { default: "" }), zn = N(".+?(?=\\s*(?:du |de la |de l'|des |de |d')?\\s*(?:art(?:icle|icl|ic|i|s)?\\.?|al(?:inéa|inea|in|i)?\\.?))", {
|
|
259
259
|
flags: "i",
|
|
260
260
|
value: (e, t) => ({
|
|
261
261
|
type: "texte",
|
|
@@ -269,7 +269,7 @@ var J = N("art(?:icle|icl|ic|i|s)?\\.?|al(?:inéa|inea|in|i)?\\.?", { flags: "i"
|
|
|
269
269
|
title: e[0].trim(),
|
|
270
270
|
position: t.position()
|
|
271
271
|
})
|
|
272
|
-
}),
|
|
272
|
+
}), Bn = H(j([
|
|
273
273
|
Z,
|
|
274
274
|
Q,
|
|
275
275
|
Y
|
|
@@ -281,7 +281,7 @@ var J = N("art(?:icle|icl|ic|i|s)?\\.?|al(?:inéa|inea|in|i)?\\.?", { flags: "i"
|
|
|
281
281
|
position: t.position(),
|
|
282
282
|
type: "parent-enfant"
|
|
283
283
|
};
|
|
284
|
-
} }),
|
|
284
|
+
} }), j([
|
|
285
285
|
Y,
|
|
286
286
|
Q,
|
|
287
287
|
Z
|
|
@@ -290,8 +290,8 @@ var J = N("art(?:icle|icl|ic|i|s)?\\.?|al(?:inéa|inea|in|i)?\\.?", { flags: "i"
|
|
|
290
290
|
parent: e[2],
|
|
291
291
|
position: t.position(),
|
|
292
292
|
type: "parent-enfant"
|
|
293
|
-
}) }),
|
|
294
|
-
|
|
293
|
+
}) }), j([
|
|
294
|
+
zn,
|
|
295
295
|
Q,
|
|
296
296
|
Y
|
|
297
297
|
], { value: (e, t) => {
|
|
@@ -302,7 +302,7 @@ var J = N("art(?:icle|icl|ic|i|s)?\\.?|al(?:inéa|inea|in|i)?\\.?", { flags: "i"
|
|
|
302
302
|
position: t.position(),
|
|
303
303
|
type: "parent-enfant"
|
|
304
304
|
};
|
|
305
|
-
} }),
|
|
305
|
+
} }), j([
|
|
306
306
|
Y,
|
|
307
307
|
Q,
|
|
308
308
|
$
|
|
@@ -311,6 +311,6 @@ var J = N("art(?:icle|icl|ic|i|s)?\\.?|al(?:inéa|inea|in|i)?\\.?", { flags: "i"
|
|
|
311
311
|
parent: e[2],
|
|
312
312
|
position: t.position(),
|
|
313
313
|
type: "parent-enfant"
|
|
314
|
-
}) }), Y, Z, $),
|
|
314
|
+
}) }), Y, Z, $), Vn = q;
|
|
315
315
|
//#endregion
|
|
316
|
-
export {
|
|
316
|
+
export { En as LegiResolver, P as TextParserContext, pt as action, se as actionDirective, ee as actionTargets, m as addChildLeftToLastChild, dt as addLinksOrReferencesToHtmlPage, Ze as addLinksToHtml, q as addLinksToMarkdown, Vn as addLinksToText, ot as addPositionsToTableOfContentsItems, dn as adjectifNumeralCardinal, Mn as adjectifNumeralOrdinalCourt, an as adjectifTemporelSingulier, jn as adverbeMultiplicatifLatin, Xt as adverbeRelatif, H as alternatives, yt as article, _e as articles, L as assertNever, h as auPortion, ie as auxPortions, vn as buildAndInstallTextTitlesInfos, qe as buildArticlePortionTreeFromHtml, wn as buildTextTitlesInfos, j as chain, Rt as chainTransformers, $e as citation, ct as citationLigne, We as citationSimple, x as citationToText, O as citedArticleNumFromTextCitation, lt as classifyArticleTemporalStatus, cn as cleanTexteTitle, De as compoundReferencesSeparators, F as convert, Wt as convertHtmlElementsToText, ye as createEnumerationOrBoundedInterval, Ce as createParentChildTreeFromReferences, xn as date, Gt as decodeNamedHtmlEntities, Jt as decodeNumericHtmlEntities, l as definitionArticleDansCitation, c as definitionArticleDansProjetOuPropositionLoi, vt as definitionDivision, on as definitionTexteFrancais, ce as designationArticle, Tt as designationDivision, yn as ditPluriel, Tn as ditSingulier, w as division, Te as divisionTypes, St as divisions, gn as duDate, z as espace, Dt as espaceAdverbeRelatif, ke as europeanLawNatures, rt as extendLoadedArticle, Ct as extractActionDirectiveAstsFromText, S as extractActionDirectivesFromHtml, bt as extractActionDirectivesFromText, Ge as extractArticleDefinitionsFromCitation, v as extractBillDefinitions, re as extractCitationReferences, ut as extractFrenchCitations, gt as extractPortionSelectors, fe as extractReferences, Et as extractReferencesWithOriginalTransformations, k as extractTextLinks, ae as findBoundaryPositionCue, G as formatLongDate, de as frenchLawNatures, je as getArticleDateDebut, Ke as getArticleDateSignature, r as getExtractedReferences, be as getExtractedReferencesWithOriginalTransformations, He as getExtractedTableOfContentsFromTextBill, Pe as getLegalPhraseTextBounds, Ye as getOrLoadArticle, ht as getOrLoadArticleSiblingId, In as getOrLoadDocument, Ln as getOrLoadDocumentsByDossierParlementaireUid, Rn as getOrLoadDossierParlementaire, Be as getOrLoadJo, ze as getOrLoadSectionTa, _ as getOrLoadSectionsTa, _t as getOrLoadTexteVersion, wt as getOrLoadTextekali, C as getOrLoadTextelr, xt as getOrLoadTextesVersions, he as getOrLoadTexteslr, y as getTableOfContentsItems, Re as getTableUnitNoteRanges, un as getTexteVersionDateDebut, bn as getTexteVersionDateSignature, An as identificationTexteEuropeen, t as internationalLawNatures, sn as introPluriel, mn as introSingulier, it as isArticlePortionStructuralStart, Ne as isLegifranceSentinelDate, Fe as isTextAstAtomicReference, ft as isTextAstDivision, Qe as isTextAstPortion, f as iterAtomicFirstParentReferences, ne as iterAtomicReferences, at as iterIncludedReferences, Ae as iterReferenceLinks, Fn as jsonReplacer, st as lawNatures, Kt as lettreAscii, Dn as liaisonPluriel, ln as liaisonSingulier, mt as linkTypes, n as listeArticles, Ee as listeReferencesSeules, o as loadArticles, Ue as localizationAdverbs, ge as natureDivisionSingulier, Qt as natureTexteFrancais, U as newAssembleeObjectCache, W as newLegifranceObjectCache, Nn as newObjectCache, tn as newReverseTransformationsMergedFromPositionsIterator, D as nomArticle, g as nomSpecialArticle, At as nombreAsTextAstNumber, kn as nombreCardinal, en as nombreRomainCardinal, Nt as nombreRomainOrdinal, jt as nombreRomainOu0iAsTextAstNumber, Yt as nonLettre, oe as normalizeBillArticleNumber, Ft as numero, s as numeroDivision, kt as numeroEtOuDateTexteFrancais, pe as numeroPortion, On as numeroTexteEuropeen, $t as numeroTexteFrancais, I as optional, Mt as optionalEspaceDuTerritoire, le as parseArticleNumber, Xe as parseArticleSubdivisionMarker, u as parseBillArticleLabel, Me as parseFrenchCitationAt, Lt as parseText, b as portionTypes, i as portions, we as reference, ve as referenceDoctrinale, Se as referenceDoctrinaleArticleAvantSource, d as referenceDoctrinaleArticlesAvantSource, te as referenceDoctrinaleSourceAvantArticle, p as referenceParsingModes, Oe as referenceSeule, N as regExp, _n as relatifPlurielPrepose, fn as relatifSingulierPrepose, Cn as repeat, Pt as replaceHtmlPatterns, zt as replacePattern, Ht as replaceTextPatterns, me as resolveActionDirectivesFromHtml, a as resolveActionDirectivesFromText, Ve as resolvePortionSelector, It as reversePositionsSplitFromPositions, Vt as reverseTransformationFromPosition, Sn as reverseTransformationsMergedFromPositions, M as reverseTransformedInnerFragment, R as reverseTransformedReplacement, Y as searchArticle, J as searchArticleKeyword, Bn as searchQueryReference, Z as searchTexte, X as searchTexteAbbreviations, Zt as simplifyHtml, V as simplifyPlainText, Ot as simplifyText, nn as simplifyUnicodeCharacters, Le as sortArticlesByDate, hn as sortTextesVersionsByDate, tt as startCanutesTitlesMetrics, qt as texte, B as texteEuropeen, A as texteFrancais, Ie as texteFrancaisAbrege, pn as texteInternational, xe as unePortion, ue as uniteBasePreciseeSingulier, e as uniteBaseSingulier, T as urlFromArticleVersionsId, E as urlFromLegalId, Bt as variable, Ut as virguleOuEspace, et as walkTableOfContents, rn as wordsTree };
|
|
@@ -48,6 +48,20 @@ export interface ArticlePortionAlinea {
|
|
|
48
48
|
htmlStart?: number;
|
|
49
49
|
htmlStop?: number;
|
|
50
50
|
lineIndex?: number;
|
|
51
|
+
/** Quotation marks around a table belong to this alinéa, but its HTML
|
|
52
|
+
* offsets still designate the table itself for portion edits. */
|
|
53
|
+
tableQuotation?: {
|
|
54
|
+
opening: {
|
|
55
|
+
html: string;
|
|
56
|
+
htmlStart: number;
|
|
57
|
+
htmlStop: number;
|
|
58
|
+
};
|
|
59
|
+
closing: {
|
|
60
|
+
html: string;
|
|
61
|
+
htmlStart: number;
|
|
62
|
+
htmlStop: number;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
51
65
|
}
|
|
52
66
|
export interface ArticlePortionPhrase {
|
|
53
67
|
type: "phrase";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Sql } from 'postgres';
|
|
2
2
|
import { ReferenceParsingMode } from './references.js';
|
|
3
|
+
import { HistoricalVersionQualifier } from '../text_parsers/historical_versions.js';
|
|
4
|
+
import { NamedTextArticleTarget } from '../legi/named_text_article.js';
|
|
3
5
|
import { LegiResolver } from '../legi/resolver.js';
|
|
4
6
|
import { TextAstArticle, TextAstDivision, TextAstPosition, TextAstReference, TextAstText } from '../text_parsers/ast.js';
|
|
5
7
|
import { FragmentPosition, FragmentReverseTransformation } from '../text_parsers/fragments.js';
|
|
@@ -26,6 +28,10 @@ export interface ArticleDefinition {
|
|
|
26
28
|
export interface ArticleExternalLink {
|
|
27
29
|
article: TextAstArticle;
|
|
28
30
|
articleId?: string;
|
|
31
|
+
/** A direct version selected by an explicit historical drafting qualifier. */
|
|
32
|
+
historicalQualifiedArticle?: boolean;
|
|
33
|
+
/** Present (possibly empty) only for a uniquely selected future consultation. */
|
|
34
|
+
futureAlternativeArticleIds?: string[];
|
|
29
35
|
/**
|
|
30
36
|
* Defined only when no version of the cited article number is active at the
|
|
31
37
|
* reference date and the number has a single version chain in the cited
|
|
@@ -89,6 +95,11 @@ export interface TextEuropeanLink {
|
|
|
89
95
|
url?: string;
|
|
90
96
|
}
|
|
91
97
|
export interface TextExternalLink {
|
|
98
|
+
publicationComponentCids?: string[];
|
|
99
|
+
/** Article embedded in a named-text citation, resolved before rendering. */
|
|
100
|
+
namedArticle?: NamedTextArticleTarget & {
|
|
101
|
+
num: string;
|
|
102
|
+
};
|
|
92
103
|
/**
|
|
93
104
|
* Only defined when a transformation was used to convert input text
|
|
94
105
|
* to simplified text.
|
|
@@ -100,8 +111,103 @@ export interface TextExternalLink {
|
|
|
100
111
|
type: "external_text";
|
|
101
112
|
}
|
|
102
113
|
export type TextLink = TextEuropeanLink | TextExternalLink;
|
|
114
|
+
/** A source span, before rendering, identifies a citation even when its URL is shared. */
|
|
115
|
+
export interface LinkOccurrence {
|
|
116
|
+
documentId: string;
|
|
117
|
+
blockId?: string;
|
|
118
|
+
insideFrenchQuotes?: boolean;
|
|
119
|
+
sourceStart: number;
|
|
120
|
+
sourceStop: number;
|
|
121
|
+
}
|
|
122
|
+
export type LinkDecisionReason = "composant_publication" | "article_futur_a_date_reference" | "article_abroge_avant_date_reference" | "indice_structurel" | "structure_absente" | "reference_historique_explicite" | "publication_rectificative" | "plusieurs_candidats_indepartageables" | "cid_non_etabli" | "donnees_insuffisantes" | "hors_perimetre";
|
|
123
|
+
export interface LinkDecisionCandidate {
|
|
124
|
+
kind: "article" | "text";
|
|
125
|
+
id: string;
|
|
126
|
+
cid: string;
|
|
127
|
+
debut?: string;
|
|
128
|
+
fin?: string;
|
|
129
|
+
role: "retenu" | "alternatif" | "ecarte";
|
|
130
|
+
reasons: LinkDecisionReason[];
|
|
131
|
+
}
|
|
132
|
+
export interface LinkDecision {
|
|
133
|
+
occurrence: LinkOccurrence;
|
|
134
|
+
kind: LinkDecisionEvidence["kind"];
|
|
135
|
+
recognition: "reconnue" | "sans_candidat" | "non_prise_en_charge" | "non_reconnue";
|
|
136
|
+
date: {
|
|
137
|
+
value: string;
|
|
138
|
+
source: "appelant" | "qualification" | "document" | "aujourdhui";
|
|
139
|
+
qualifierRange?: {
|
|
140
|
+
start: number;
|
|
141
|
+
stop: number;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
textCids: string[];
|
|
145
|
+
candidates: LinkDecisionCandidate[];
|
|
146
|
+
consultationId?: string;
|
|
147
|
+
warnings: LinkDecisionReason[];
|
|
148
|
+
projection: {
|
|
149
|
+
mode: "etablie";
|
|
150
|
+
targetIds: string[];
|
|
151
|
+
} | {
|
|
152
|
+
mode: "indicative";
|
|
153
|
+
candidateIds: string[];
|
|
154
|
+
} | {
|
|
155
|
+
mode: "aucune";
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
export interface LinkDecisionEvidence {
|
|
159
|
+
/** Consultation established by published-component structure, not projection. */
|
|
160
|
+
publicationComponent?: boolean;
|
|
161
|
+
kind: "article" | "text" | "european_text";
|
|
162
|
+
occurrence: LinkOccurrence;
|
|
163
|
+
callerDate?: string;
|
|
164
|
+
documentDate?: string;
|
|
165
|
+
/** A qualifier only governs the citation whose source span lies within its scope. */
|
|
166
|
+
qualifier?: {
|
|
167
|
+
date: string;
|
|
168
|
+
range: {
|
|
169
|
+
start: number;
|
|
170
|
+
stop: number;
|
|
171
|
+
};
|
|
172
|
+
scope: {
|
|
173
|
+
start: number;
|
|
174
|
+
stop: number;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
/** The CONTEXTE text CID, or a text CID explicitly established by the citation. */
|
|
178
|
+
textCid?: string;
|
|
179
|
+
textCids?: string[];
|
|
180
|
+
/** Explicitly labelled rectificatifs of the selected original publication. */
|
|
181
|
+
rectificatifCids?: string[];
|
|
182
|
+
/** Selected using the law-specific LEGI/exceptional JORF rule. */
|
|
183
|
+
lawArticleTargetId?: string;
|
|
184
|
+
/** No law version satisfied the selection rule. */
|
|
185
|
+
lawArticleUnresolved?: boolean;
|
|
186
|
+
/** Evidence from a resolver; an empty list is distinct from unavailable evidence. */
|
|
187
|
+
candidates?: Array<{
|
|
188
|
+
kind: "article" | "text";
|
|
189
|
+
id: string;
|
|
190
|
+
cid: string;
|
|
191
|
+
debut?: string;
|
|
192
|
+
fin?: string;
|
|
193
|
+
/** SCTA can qualify a collision but cannot override CONTEXTE. */
|
|
194
|
+
structure?: "valable" | "absente" | "invalide";
|
|
195
|
+
abrogationVerified?: boolean;
|
|
196
|
+
}>;
|
|
197
|
+
recognized?: boolean;
|
|
198
|
+
}
|
|
199
|
+
export interface LinkDecisionObserver {
|
|
200
|
+
documentId: string;
|
|
201
|
+
blockId?: string;
|
|
202
|
+
onDecision: (decision: LinkDecision) => void;
|
|
203
|
+
}
|
|
204
|
+
/** Pure, opt-in oracle. Neither legacy link fields nor renderer output use it yet. */
|
|
205
|
+
export declare function decideLinkOccurrence(evidence: LinkDecisionEvidence): LinkDecision;
|
|
103
206
|
export interface TextLinksParserState {
|
|
104
207
|
articleId?: string;
|
|
208
|
+
historicalQualifier?: HistoricalVersionQualifier;
|
|
209
|
+
/** Multiple code-title CIDs contain the cited active article; no text is established. */
|
|
210
|
+
ambiguousCodeTitleCids?: string[];
|
|
105
211
|
codeId?: string;
|
|
106
212
|
constitutionId?: string;
|
|
107
213
|
decreeId?: string;
|
|
@@ -147,10 +253,15 @@ type TextLinksIterationDiagnostics = {
|
|
|
147
253
|
textLinkCount: number;
|
|
148
254
|
textLinkMs: number;
|
|
149
255
|
};
|
|
150
|
-
export declare function extractTextLinks({ canutesDb, context, date, includeInternalArticleLinks, legiResolver: providedLegiResolver, logIgnoredReferencesTypes, logPartialReferences, logReferences, parsingMode, state: inputState, transformation, }: {
|
|
256
|
+
export declare function extractTextLinks({ canutesDb, callerDate, context, date: documentDate, decisionObserver, extraReferences, includeInternalArticleLinks, legiResolver: providedLegiResolver, logIgnoredReferencesTypes, logPartialReferences, logReferences, parsingMode, state: inputState, transformation, }: {
|
|
151
257
|
canutesDb?: Sql;
|
|
258
|
+
/** An explicitly requested resolution date overrides a date quoted in the source. */
|
|
259
|
+
callerDate?: string;
|
|
152
260
|
context: TextParserContext;
|
|
153
261
|
date: string;
|
|
262
|
+
decisionObserver?: LinkDecisionObserver;
|
|
263
|
+
/** HTML table-cell references qualified by their column heading. */
|
|
264
|
+
extraReferences?: TextAstReference[];
|
|
154
265
|
includeInternalArticleLinks?: boolean;
|
|
155
266
|
legiResolver?: LegiResolver;
|
|
156
267
|
logIgnoredReferencesTypes?: boolean;
|
|
@@ -165,13 +276,16 @@ export declare function extractTextLinks({ canutesDb, context, date, includeInte
|
|
|
165
276
|
state?: TextLinksParserState;
|
|
166
277
|
transformation?: Transformation;
|
|
167
278
|
}): AsyncGenerator<DefinitionOrLink, void>;
|
|
168
|
-
export declare function iterReferenceLinks({ articleDefinitionByNumByTextId: articleDefinitionByNumByTextIdInput, inOriginalCitation, includeInternalArticleLinks, legiResolver, context, date, logIgnoredReferencesTypes, logPartialReferences, originalPositionsFromTransformedIterator, reference, iterationDiagnostics: inputIterationDiagnostics, resolverDiagnostics: inputResolverDiagnostics, state: inputState, }: {
|
|
169
|
-
articleDefinitionByNumByTextId?: Record<string, Record<string, ArticleDefinition>>;
|
|
279
|
+
export declare function iterReferenceLinks({ articleDefinitionByNumByTextId: articleDefinitionByNumByTextIdInput, callerDate, inOriginalCitation, includeInternalArticleLinks, legiResolver, context, date: inputDate, decisionObserver, documentDate, logIgnoredReferencesTypes, logPartialReferences, originalPositionsFromTransformedIterator, reference, iterationDiagnostics: inputIterationDiagnostics, resolverDiagnostics: inputResolverDiagnostics, state: inputState, }: {
|
|
280
|
+
articleDefinitionByNumByTextId?: Record<string, Record<string, ArticleDefinition[]>>;
|
|
281
|
+
callerDate?: string;
|
|
170
282
|
inOriginalCitation?: boolean;
|
|
171
283
|
includeInternalArticleLinks?: boolean;
|
|
172
284
|
legiResolver: LegiResolver;
|
|
173
285
|
context: TextParserContext;
|
|
174
286
|
date: string;
|
|
287
|
+
decisionObserver?: LinkDecisionObserver;
|
|
288
|
+
documentDate?: string;
|
|
175
289
|
logIgnoredReferencesTypes?: boolean;
|
|
176
290
|
logPartialReferences?: boolean;
|
|
177
291
|
originalPositionsFromTransformedIterator?: Generator<FragmentReverseTransformation, void, FragmentPosition | undefined>;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { Sql } from 'postgres';
|
|
2
|
-
import { LegiResolver, LegiArticleInfo, LegiSectionInfo, PreloadActiveArticlesByTextIdsOptions, PreloadTextTitlesInfosOptions } from '../legi/resolver.js';
|
|
2
|
+
import { LegiResolver, LegiArticleAbrogationProof, LegiArticleInfo, LegiArticleHistoryInfo, LegiArticleStructureProof, LegiSectionInfo, PreloadActiveArticlesByTextIdsOptions, PreloadTextTitlesInfosOptions } from '../legi/resolver.js';
|
|
3
3
|
export type FlegiArticleInfo = LegiArticleInfo;
|
|
4
4
|
export type FlegiSectionInfo = LegiSectionInfo;
|
|
5
5
|
export declare function checkFlegiResolverDatabase(flegiDb: Sql): Promise<void>;
|
|
6
6
|
export declare class FlegiResolver extends LegiResolver {
|
|
7
7
|
private readonly flegiDb;
|
|
8
|
+
private readonly articleHistoryInfoByTextAndNum;
|
|
9
|
+
getArticleHistoryInfo({ num, textId, }: {
|
|
10
|
+
num: string | undefined;
|
|
11
|
+
textId: string;
|
|
12
|
+
}): Promise<LegiArticleHistoryInfo | undefined>;
|
|
8
13
|
private readonly articleRowsByNumByTextAndDate;
|
|
9
14
|
private readonly articleNumsLoadedByTextAndDate;
|
|
10
15
|
private readonly articleRowsByContextTextId;
|
|
11
16
|
private readonly directSectionChildrenByParentAndDate;
|
|
12
|
-
private readonly
|
|
13
|
-
private readonly directSectionChildrenRootPromises;
|
|
17
|
+
private readonly directSectionChildrenParentPromises;
|
|
14
18
|
private readonly globalArticleRowsByNumAndDate;
|
|
15
19
|
private readonly rootTextIdsByTextId;
|
|
16
20
|
private readonly contextTextIdsByTextId;
|
|
@@ -23,6 +27,21 @@ export declare class FlegiResolver extends LegiResolver {
|
|
|
23
27
|
num: string | undefined;
|
|
24
28
|
textId: string;
|
|
25
29
|
}): Promise<FlegiArticleInfo[]>;
|
|
30
|
+
getLawArticleType({ articleId, textId, }: {
|
|
31
|
+
articleId: string;
|
|
32
|
+
textId: string;
|
|
33
|
+
}): Promise<"AUTONOME" | "ENTIEREMENT_MODIF" | "PARTIELLEMENT_MODIF" | undefined>;
|
|
34
|
+
getVerifiedPublicationComponents(candidateCids: string[]): Promise<import('../legi/resolver.js').LegiPublicationComponentsProof | undefined>;
|
|
35
|
+
getVerifiedArticleAbrogation({ date, num, textId, }: {
|
|
36
|
+
date: string;
|
|
37
|
+
num: string;
|
|
38
|
+
textId: string;
|
|
39
|
+
}): Promise<LegiArticleAbrogationProof | undefined>;
|
|
40
|
+
getVerifiedArticleStructure({ date, num, textId, }: {
|
|
41
|
+
date: string;
|
|
42
|
+
num: string;
|
|
43
|
+
textId: string;
|
|
44
|
+
}): Promise<LegiArticleStructureProof | undefined>;
|
|
26
45
|
getDirectSectionChildren({ date, parentPath, }: {
|
|
27
46
|
date: string;
|
|
28
47
|
parentPath: string;
|
|
@@ -47,7 +66,7 @@ export declare class FlegiResolver extends LegiResolver {
|
|
|
47
66
|
private getActiveArticleRowsByNum;
|
|
48
67
|
private getActiveArticleRowsForContextTextIdsWithRoots;
|
|
49
68
|
private queryActiveArticleRowsForContextTextIds;
|
|
50
|
-
private
|
|
69
|
+
private preloadDirectSectionChildrenByParentPath;
|
|
51
70
|
private getTextIdFromSegmentIdUsingContextHeuristic;
|
|
52
71
|
private getTextIdFromSegmentIdUsingSctaHeuristic;
|
|
53
72
|
private getContextTextIdsByTextIds;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LegiArticleAbrogationProof, LegiArticleInfo } from './resolver.js';
|
|
2
|
+
export type ArticleAbrogationRow = {
|
|
3
|
+
id: string;
|
|
4
|
+
num: string | null;
|
|
5
|
+
textId: string | null;
|
|
6
|
+
dateDebut: string | null;
|
|
7
|
+
dateFin: string | null;
|
|
8
|
+
etat: string | null;
|
|
9
|
+
versions: {
|
|
10
|
+
id: string;
|
|
11
|
+
dateDebut: string | null;
|
|
12
|
+
dateFin: string | null;
|
|
13
|
+
etat?: string | null;
|
|
14
|
+
}[] | null;
|
|
15
|
+
};
|
|
16
|
+
/** Only a complete, unique chain matching the actual resolver's candidates
|
|
17
|
+
* within the same read-only snapshot can certify an expired version. */
|
|
18
|
+
export declare function verifyArticleAbrogation({ candidates, date, missingContext, num, rows, textId, }: {
|
|
19
|
+
candidates: LegiArticleInfo[];
|
|
20
|
+
date: string;
|
|
21
|
+
missingContext: number;
|
|
22
|
+
num: string;
|
|
23
|
+
rows: ArticleAbrogationRow[];
|
|
24
|
+
textId: string;
|
|
25
|
+
}): LegiArticleAbrogationProof | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LegiArticleHistoryInfo } from './resolver.js';
|
|
2
|
+
/** Minimal view of an article and its declared version chain. */
|
|
3
|
+
export interface ArticleHistorySourceRow {
|
|
4
|
+
dateDebut: string | null;
|
|
5
|
+
id: string;
|
|
6
|
+
versions: {
|
|
7
|
+
VERSION?: unknown;
|
|
8
|
+
} | null;
|
|
9
|
+
}
|
|
10
|
+
/** Return the latest entry point only when every row declares the same chain. */
|
|
11
|
+
export declare function articleHistoryInfoFromRows(rows: ArticleHistorySourceRow[]): LegiArticleHistoryInfo | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LegiArticleInfo, LegiArticleStructureProof } from './resolver.js';
|
|
2
|
+
export type DatedStructureLink = {
|
|
3
|
+
dateDebut: string | null;
|
|
4
|
+
dateFin: string | null;
|
|
5
|
+
};
|
|
6
|
+
/** A missing, duplicated or malformed edge is not evidence against a candidate. */
|
|
7
|
+
export declare function structureStatusFromCompletePath(links: DatedStructureLink[] | undefined, date: string): "valable" | "invalide" | undefined;
|
|
8
|
+
/** The snapshot contains the same candidates as its structural evidence. */
|
|
9
|
+
export declare function verifiedArticleStructureProof(candidates: LegiArticleInfo[], paths: Map<string, DatedStructureLink[] | undefined>, date: string, textId: string, num: string): LegiArticleStructureProof | undefined;
|