@tricoteuses/tisseuse 0.12.0 → 0.12.2
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-Ds2IZ1nn.js +12773 -0
- package/dist/index.js +233 -224
- package/dist/server.js +1 -1
- package/dist/{lib → src/lib}/extractors/action_directives.d.ts +3 -3
- package/dist/{lib → src/lib}/extractors/article_portions.d.ts +1 -1
- package/dist/src/lib/extractors/definitions.d.ts +3 -0
- package/dist/{lib → src/lib}/extractors/links.d.ts +4 -4
- package/dist/{lib → src/lib}/extractors/references.d.ts +3 -3
- package/dist/{lib → src/lib}/extractors/table_of_contents.d.ts +4 -4
- package/dist/{lib → src/lib}/linkers/html.d.ts +4 -4
- package/dist/{lib → src/lib}/linkers/markdown.d.ts +2 -2
- package/dist/{lib → src/lib}/loaders/assemblee.d.ts +1 -1
- package/dist/{lib → src/lib}/loaders/legifrance.d.ts +1 -1
- package/dist/src/lib/server/auditors/config.d.ts +1 -0
- package/dist/{lib → src/lib}/server/config.d.ts +1 -1
- package/dist/{lib → src/lib}/server/linkers/html.d.ts +1 -1
- package/dist/{lib → src/lib}/server/text_parsers/transformers.d.ts +1 -1
- package/package.json +10 -8
- package/dist/html-kKhAILq4.js +0 -12756
- package/dist/lib/extractors/definitions.d.ts +0 -3
- package/dist/lib/server/auditors/config.d.ts +0 -4
- package/dist/lib/text_parsers/text_titles_infos.json.d.ts +0 -4
- /package/dist/{lib → src/lib}/alineas/alineas_numbers.d.ts +0 -0
- /package/dist/{lib → src/lib}/articles.d.ts +0 -0
- /package/dist/{lib → src/lib}/articles.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/asserts.d.ts +0 -0
- /package/dist/{lib → src/lib}/cache.d.ts +0 -0
- /package/dist/{lib → src/lib}/dates.d.ts +0 -0
- /package/dist/{lib → src/lib}/extractors/action_directives.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/extractors/article_portions.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/extractors/links.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/extractors/references.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/index.d.ts +0 -0
- /package/dist/{lib → src/lib}/json.d.ts +0 -0
- /package/dist/{lib → src/lib}/links.d.ts +0 -0
- /package/dist/{lib → src/lib}/markdown.d.ts +0 -0
- /package/dist/{lib → src/lib}/server/alineas/alineas_images_utils.d.ts +0 -0
- /package/dist/{lib → src/lib}/server/databases/index.d.ts +0 -0
- /package/dist/{lib → src/lib}/server/html_simplifier.d.ts +0 -0
- /package/dist/{lib → src/lib}/server/html_simplifier.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/server/index.d.ts +0 -0
- /package/dist/{lib → src/lib}/server/tables_of_contents.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/actions.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/actions.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/articles.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/articles.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/ast.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/citations.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/citations.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/dates.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/dates.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/divisions.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/divisions.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/fragments.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/helpers.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/numbers.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/numbers.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/parsers.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/parsers.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/portions.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/portions.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/prepositions.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/prepositions.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/references.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/references.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/relative_locations.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/relative_locations.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/search_queries.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/search_queries.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/separators.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/simplifiers.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/simplifiers.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/texts.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/texts.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/transformers.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/typography.d.ts +0 -0
- /package/dist/{lib → src/lib}/text_parsers/typography.test.d.ts +0 -0
- /package/dist/{lib → src/lib}/textes.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/add_links_to_assemblee_parsed_documents.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/add_links_to_html_document.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/add_links_to_legifrance.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/add_links_to_senat_parsed_documents.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/add_positions_to_table_of_contents.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/add_references_to_html_document.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/associate_jorf_textes_with_assemblee_commissions.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/associate_jorf_textes_with_dossiers_legislatifs_assemblee.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/configure.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/enrich_assemblee_documents.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/enrich_senat_documents.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/extract_alineas_images.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/extract_texts_titles_infos.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/generate_alineas_numbers_review.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/html_document_to_text.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/index_typesense.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/merge_reviewed_alineas_numbers.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/set_articles_missing_num.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/simplified_html_bill_to_table_of_contents.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/simplify_word_html.d.ts +0 -0
package/dist/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PortionSelector } from '
|
|
2
|
-
import { ActionTarget, TextAstReference } from '
|
|
3
|
-
import { FragmentPosition } from '
|
|
1
|
+
import { PortionSelector } from '../../../lib/extractors/article_portions.js';
|
|
2
|
+
import { ActionTarget, TextAstReference } from '../../../lib/text_parsers/ast.js';
|
|
3
|
+
import { FragmentPosition } from '../../../lib/text_parsers/fragments.js';
|
|
4
4
|
export type ActionDirective = {
|
|
5
5
|
kind: "insert_after" | "insert_before";
|
|
6
6
|
targetType: ActionTarget;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DivisionType, PortionType, TextAstLocalization, TextAstReference } from '
|
|
1
|
+
import { DivisionType, PortionType, TextAstLocalization, TextAstReference } from '../../../lib/text_parsers/ast.js';
|
|
2
2
|
export type PortionSelectorStep = {
|
|
3
3
|
type: PortionType | DivisionType;
|
|
4
4
|
index?: number;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TextAstArticle, TextAstDivision } from '../../../lib/text_parsers/ast.js';
|
|
2
|
+
import { TextParserContext } from '../../../lib/text_parsers/parsers.js';
|
|
3
|
+
export declare function extractBillDefinitions(context: TextParserContext): Generator<TextAstArticle | TextAstDivision, void, unknown>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Sql } from 'postgres';
|
|
2
|
-
import { TextAstArticle, TextAstDivision, TextAstPosition, TextAstReference, TextAstText } from '
|
|
3
|
-
import { FragmentPosition, FragmentReverseTransformation } from '
|
|
4
|
-
import { TextParserContext } from '
|
|
5
|
-
import { Transformation } from '
|
|
2
|
+
import { TextAstArticle, TextAstDivision, TextAstPosition, TextAstReference, TextAstText } from '../../../lib/text_parsers/ast.js';
|
|
3
|
+
import { FragmentPosition, FragmentReverseTransformation } from '../../../lib/text_parsers/fragments.js';
|
|
4
|
+
import { TextParserContext } from '../../../lib/text_parsers/parsers.js';
|
|
5
|
+
import { Transformation } from '../../../lib/text_parsers/transformers.js';
|
|
6
6
|
export type DefinitionOrLink = ArticleDefinition | ArticleLink | DivisionLink | TextLink;
|
|
7
7
|
export interface ArticleDefinition {
|
|
8
8
|
article: TextAstArticle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TextAstCitation, TextAstReference } from '
|
|
2
|
-
import { TextParserContext } from '
|
|
3
|
-
import { Transformation } from '
|
|
1
|
+
import { TextAstCitation, TextAstReference } from '../../../lib/text_parsers/ast.js';
|
|
2
|
+
import { TextParserContext } from '../../../lib/text_parsers/parsers.js';
|
|
3
|
+
import { Transformation } from '../../../lib/text_parsers/transformers.js';
|
|
4
4
|
export declare function extractCitationReferences(context: TextParserContext, citation: TextAstCitation): Generator<TextAstReference, void>;
|
|
5
5
|
export declare function extractReferences(context: TextParserContext): Generator<TextAstReference, void>;
|
|
6
6
|
export declare function extractReferencesWithOriginalTransformations(context: TextParserContext, transformation: Transformation): Generator<TextAstReference, void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DivisionType } from '
|
|
2
|
-
import { FragmentPosition, FragmentReverseTransformation } from '
|
|
3
|
-
import { TextParserContext } from '
|
|
4
|
-
import { Transformation } from '
|
|
1
|
+
import { DivisionType } from '../../../lib/text_parsers/ast.js';
|
|
2
|
+
import { FragmentPosition, FragmentReverseTransformation } from '../../../lib/text_parsers/fragments.js';
|
|
3
|
+
import { TextParserContext } from '../../../lib/text_parsers/parsers.js';
|
|
4
|
+
import { Transformation } from '../../../lib/text_parsers/transformers.js';
|
|
5
5
|
export interface TableOfContents {
|
|
6
6
|
articles?: TableOfContentsArticle[];
|
|
7
7
|
divisions?: TableOfContentsDivision[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Sql } from 'postgres';
|
|
2
|
-
import { DefinitionOrLink, TextLinksParserState } from '
|
|
3
|
-
import { LinkType } from '
|
|
4
|
-
import { TextParserContext } from '
|
|
5
|
-
import { Transformation } from '
|
|
2
|
+
import { DefinitionOrLink, TextLinksParserState } from '../../../lib/extractors/links.js';
|
|
3
|
+
import { LinkType } from '../../../lib/links.js';
|
|
4
|
+
import { TextParserContext } from '../../../lib/text_parsers/parsers.js';
|
|
5
|
+
import { Transformation } from '../../../lib/text_parsers/transformers.js';
|
|
6
6
|
export declare function addLinksToHtml({ canutesDb, date, html, linkBaseUrl, linkType, logIgnoredReferencesTypes, logPartialReferences, logReferences, onLink, previousContext, state, }: {
|
|
7
7
|
canutesDb: Sql;
|
|
8
8
|
date: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Sql } from 'postgres';
|
|
2
|
-
import { LinkType } from '
|
|
3
|
-
import { TextParserContext } from '
|
|
2
|
+
import { LinkType } from '../../../lib/links.js';
|
|
3
|
+
import { TextParserContext } from '../../../lib/text_parsers/parsers.js';
|
|
4
4
|
export declare function addLinksToMarkdown({ canutesDb, date, linkBaseUrl, linkType, previousContext, text, }: {
|
|
5
5
|
canutesDb: Sql;
|
|
6
6
|
date: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Document, DossierParlementaire } from '@tricoteuses/assemblee';
|
|
2
2
|
import { Sql } from 'postgres';
|
|
3
|
-
import { AssembleeObjectCache } from '
|
|
3
|
+
import { AssembleeObjectCache } from '../../../lib/cache.js';
|
|
4
4
|
export declare function getOrLoadDocument(canutesDb: Sql, assembleeObjectCache: AssembleeObjectCache, uid: string): Promise<Document | undefined>;
|
|
5
5
|
export declare function getOrLoadDocumentsByDossierParlementaireUid(canutesDb: Sql, assembleeObjectCache: AssembleeObjectCache, dossierUid: string): Promise<Document[]>;
|
|
6
6
|
export declare function getOrLoadDossierParlementaire(canutesDb: Sql, assembleeObjectCache: AssembleeObjectCache, uid: string): Promise<DossierParlementaire | undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Jo, JorfArticle, JorfSectionTa, JorfTextelr, JorfTexteVersion, LegiArticle, LegiSectionTa, LegiTextelr, LegiTexteVersion } from '@tricoteuses/legifrance';
|
|
2
2
|
import { PendingQuery, Row, Sql } from 'postgres';
|
|
3
|
-
import { LegifranceObjectCache } from '
|
|
3
|
+
import { LegifranceObjectCache } from '../../../lib/cache.js';
|
|
4
4
|
export interface ArticleExtension {
|
|
5
5
|
num?: string;
|
|
6
6
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function validateConfig(data: unknown): [unknown, unknown];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LinkType } from '
|
|
1
|
+
import { LinkType } from '../../../../lib/links.js';
|
|
2
2
|
import { Sql } from 'postgres';
|
|
3
3
|
export declare function addLinksOrReferencesToHtmlFile({ canutesDb, date, defaultTextId, htmlFilePath, htmlTransformationsInputDir, htmlTransformationsOutputDir, htmlWithLinksFilePath, htmlWithLinksOrReferencesFilePath, htmlWithLinksTransformationsOutputDir, htmlWithReferencesFilePath, linkBaseUrl, linkType, logIgnoredReferencesTypes, logPartialReferences, logReferences, referredLegifranceTextsInfosFilePath, }: {
|
|
4
4
|
canutesDb: Sql;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Transformation } from '
|
|
1
|
+
import { Transformation } from '../../../../lib/text_parsers/transformers.js';
|
|
2
2
|
export declare function readTransformation(inputDocument: string, transformationDir: string): Transformation;
|
|
3
3
|
export declare function writeTransformation(transformation: Transformation, transformationDir: string, indexesPath?: string): void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tricoteuses/tisseuse",
|
|
3
3
|
"description": "Find links in/to French legislative documents",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Assemblée nationale",
|
|
7
7
|
"France",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"bugs": {
|
|
19
19
|
"url": "https://git.tricoteuses.fr/logiciels/tricoteuses-juridique/issues"
|
|
20
20
|
},
|
|
21
|
-
"homepage": "https://tricoteuses.fr/",
|
|
21
|
+
"homepage": "https://www.tricoteuses.fr/",
|
|
22
22
|
"license": "AGPL-3.0-or-later",
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
".": {
|
|
38
38
|
"typedoc": "./src/lib/index.ts",
|
|
39
39
|
"import": "./dist/index.js",
|
|
40
|
-
"types": "./dist/lib/index.d.ts"
|
|
40
|
+
"types": "./dist/src/lib/index.d.ts"
|
|
41
41
|
},
|
|
42
42
|
"./server": {
|
|
43
|
-
"typedoc": "./src/server/index.ts",
|
|
43
|
+
"typedoc": "./src/lib/server/index.ts",
|
|
44
44
|
"import": "./dist/server.js",
|
|
45
|
-
"types": "./dist/lib/server/index.d.ts"
|
|
45
|
+
"types": "./dist/src/lib/server/index.d.ts"
|
|
46
46
|
},
|
|
47
47
|
"./package.json": "./package.json"
|
|
48
48
|
},
|
|
@@ -63,9 +63,8 @@
|
|
|
63
63
|
"test:unit": "vitest"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@auditors/core": "^0.7.4",
|
|
67
66
|
"@tricoteuses/assemblee": "^3.2.0",
|
|
68
|
-
"@tricoteuses/legifrance": "^0.18.
|
|
67
|
+
"@tricoteuses/legifrance": "^0.18.5",
|
|
69
68
|
"@tricoteuses/senat": "^3.0.1",
|
|
70
69
|
"@types/fs-extra": "^11.0.4",
|
|
71
70
|
"@types/node": "^25.5.0",
|
|
@@ -82,10 +81,13 @@
|
|
|
82
81
|
"prettier": "^3.8.1",
|
|
83
82
|
"sade": "^1.8.1",
|
|
84
83
|
"tsx": "^4.21.0",
|
|
85
|
-
"typescript": "^
|
|
84
|
+
"typescript": "^6.0.2",
|
|
86
85
|
"typesense": "^3.0.4",
|
|
87
86
|
"vite": "^8.0.3",
|
|
88
87
|
"vite-plugin-dts": "^4.5.4",
|
|
89
88
|
"vitest": "^4.1.2"
|
|
89
|
+
},
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"zod": "^4.3.6"
|
|
90
92
|
}
|
|
91
93
|
}
|