@tricoteuses/tisseuse 0.12.6 → 0.12.9

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.
@@ -1075,6 +1075,8 @@ async function De(e, t, n) {
1075
1075
  //#endregion
1076
1076
  //#region src/lib/text_parsers/parsers.ts
1077
1077
  var Oe = class {
1078
+ input;
1079
+ offset;
1078
1080
  currentArticle = void 0;
1079
1081
  currentText = void 0;
1080
1082
  length = 0;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as e, $t as t, A as n, An as r, At as i, B as a, Bt as o, C as s, Cn as c, Ct as l, D as u, Dn as d, Dt as f, E as p, En as m, Et as h, F as g, Fn as ee, Ft as te, G as ne, Gt as re, H as ie, Ht as ae, I as oe, In as _, It as se, J as ce, Jt as le, K as ue, Kt as de, L as fe, Lt as v, M as pe, Mn as me, Mt as y, N as he, Nn as ge, Nt as b, O as _e, On as ve, Ot as ye, P as be, Pn as xe, Pt as Se, Q as Ce, Qt as we, R as Te, Rt as Ee, S as De, Sn as x, St as Oe, T as ke, Tn as Ae, Tt as je, U as Me, Ut as Ne, V as Pe, Vt as S, W as Fe, Wt as Ie, X as Le, Xt as Re, Y as ze, Yt as Be, Z as Ve, Zt as He, _ as Ue, _n as C, _t as We, a as Ge, an as Ke, at as qe, b as Je, bn as Ye, bt as Xe, c as Ze, cn as Qe, ct as $e, d as et, dn as tt, dt as nt, en as rt, et as it, f as at, fn as ot, ft as st, g as ct, gn as w, gt as lt, h as ut, hn as dt, ht as ft, i as T, in as pt, it as mt, j as E, jn as ht, jt as gt, k as _t, kn as D, kt as vt, l as yt, ln as bt, lt as xt, m as St, mn as Ct, mt as wt, n as Tt, nn as Et, nt as Dt, o as Ot, on as kt, ot as At, p as jt, pn as Mt, pt as Nt, q as Pt, qt as Ft, r as It, rn as Lt, rt as Rt, s as zt, sn as Bt, st as Vt, t as Ht, tn as Ut, tt as Wt, u as Gt, un as Kt, ut as qt, v as Jt, vn as O, vt as Yt, w as Xt, wn as Zt, wt as Qt, x as $t, xn as en, xt as tn, y as nn, yn as rn, yt as an, z as on, zt as sn } from "./html-C6wrEfXU.js";
1
+ import { $ as e, $t as t, A as n, An as r, At as i, B as a, Bt as o, C as s, Cn as c, Ct as l, D as u, Dn as d, Dt as f, E as p, En as m, Et as h, F as g, Fn as ee, Ft as te, G as ne, Gt as re, H as ie, Ht as ae, I as oe, In as _, It as se, J as ce, Jt as le, K as ue, Kt as de, L as fe, Lt as v, M as pe, Mn as me, Mt as y, N as he, Nn as ge, Nt as b, O as _e, On as ve, Ot as ye, P as be, Pn as xe, Pt as Se, Q as Ce, Qt as we, R as Te, Rt as Ee, S as De, Sn as x, St as Oe, T as ke, Tn as Ae, Tt as je, U as Me, Ut as Ne, V as Pe, Vt as S, W as Fe, Wt as Ie, X as Le, Xt as Re, Y as ze, Yt as Be, Z as Ve, Zt as He, _ as Ue, _n as C, _t as We, a as Ge, an as Ke, at as qe, b as Je, bn as Ye, bt as Xe, c as Ze, cn as Qe, ct as $e, d as et, dn as tt, dt as nt, en as rt, et as it, f as at, fn as ot, ft as st, g as ct, gn as w, gt as lt, h as ut, hn as dt, ht as ft, i as T, in as pt, it as mt, j as E, jn as ht, jt as gt, k as _t, kn as D, kt as vt, l as yt, ln as bt, lt as xt, m as St, mn as Ct, mt as wt, n as Tt, nn as Et, nt as Dt, o as Ot, on as kt, ot as At, p as jt, pn as Mt, pt as Nt, q as Pt, qt as Ft, r as It, rn as Lt, rt as Rt, s as zt, sn as Bt, st as Vt, t as Ht, tn as Ut, tt as Wt, u as Gt, un as Kt, ut as qt, v as Jt, vn as O, vt as Yt, w as Xt, wn as Zt, wt as Qt, x as $t, xn as en, xt as tn, y as nn, yn as rn, yt as an, z as on, zt as sn } from "./html-D3MxsPeu.js";
2
2
  //#region ../../node_modules/@tricoteuses/legifrance/dist/legal/index.js
3
3
  function cn(e, t) {
4
4
  if (e != null) {
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as e, a as t, g as n, gn as r, o as i, t as a } from "./html-C6wrEfXU.js";
1
+ import { $ as e, a as t, g as n, gn as r, o as i, t as a } from "./html-D3MxsPeu.js";
2
2
  import * as o from "node:crypto";
3
3
  import s from "fs-extra";
4
4
  import c from "node:path";
@@ -1,6 +1,6 @@
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';
1
+ import { PortionSelector } from './article_portions.js';
2
+ import { ActionTarget, TextAstReference } from '../text_parsers/ast.js';
3
+ import { FragmentPosition } from '../text_parsers/fragments.js';
4
4
  export type ActionReplacement = {
5
5
  type: "text";
6
6
  text: string;
@@ -1,4 +1,4 @@
1
- import { DivisionType, PortionType, TextAstLocalization, TextAstReference } from '../../../lib/text_parsers/ast.js';
1
+ import { DivisionType, PortionType, TextAstLocalization, TextAstReference } from '../text_parsers/ast.js';
2
2
  export type PortionSelectorStep = {
3
3
  type: PortionType | DivisionType;
4
4
  index?: number;
@@ -1,3 +1,3 @@
1
- import { TextAstArticle, TextAstDivision } from '../../../lib/text_parsers/ast.js';
2
- import { TextParserContext } from '../../../lib/text_parsers/parsers.js';
1
+ import { TextAstArticle, TextAstDivision } from '../text_parsers/ast.js';
2
+ import { TextParserContext } from '../text_parsers/parsers.js';
3
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 '../../../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';
2
+ import { TextAstArticle, TextAstDivision, TextAstPosition, TextAstReference, TextAstText } from '../text_parsers/ast.js';
3
+ import { FragmentPosition, FragmentReverseTransformation } from '../text_parsers/fragments.js';
4
+ import { TextParserContext } from '../text_parsers/parsers.js';
5
+ import { Transformation } from '../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 '../../../lib/text_parsers/ast.js';
2
- import { TextParserContext } from '../../../lib/text_parsers/parsers.js';
3
- import { Transformation } from '../../../lib/text_parsers/transformers.js';
1
+ import { TextAstCitation, TextAstReference } from '../text_parsers/ast.js';
2
+ import { TextParserContext } from '../text_parsers/parsers.js';
3
+ import { Transformation } from '../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 '../../../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';
1
+ import { DivisionType } from '../text_parsers/ast.js';
2
+ import { FragmentPosition, FragmentReverseTransformation } from '../text_parsers/fragments.js';
3
+ import { TextParserContext } from '../text_parsers/parsers.js';
4
+ import { Transformation } from '../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 '../../../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';
2
+ import { DefinitionOrLink, TextLinksParserState } from '../extractors/links.js';
3
+ import { LinkType } from '../links.js';
4
+ import { TextParserContext } from '../text_parsers/parsers.js';
5
+ import { Transformation } from '../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 '../../../lib/links.js';
3
- import { TextParserContext } from '../../../lib/text_parsers/parsers.js';
2
+ import { LinkType } from '../links.js';
3
+ import { TextParserContext } from '../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 '../../../lib/cache.js';
3
+ import { AssembleeObjectCache } from '../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 '../../../lib/cache.js';
3
+ import { LegifranceObjectCache } from '../cache.js';
4
4
  export interface ArticleExtension {
5
5
  num?: string;
6
6
  }
@@ -1,4 +1,4 @@
1
- import { LinkType } from '../../../lib/links';
1
+ import { LinkType } from '../links';
2
2
  export interface Config {
3
3
  canutesDb: DatabaseConfig;
4
4
  linkBaseUrl: string;
@@ -1,4 +1,4 @@
1
- import { LinkType } from '../../../../lib/links.js';
1
+ import { LinkType } from '../../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 '../../../../lib/text_parsers/transformers.js';
1
+ import { Transformation } from '../../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.6",
4
+ "version": "0.12.9",
5
5
  "keywords": [
6
6
  "Assemblée nationale",
7
7
  "France",
@@ -63,31 +63,31 @@
63
63
  "test:unit": "vitest"
64
64
  },
65
65
  "devDependencies": {
66
- "@tricoteuses/assemblee": "^3.2.0",
67
- "@tricoteuses/legifrance": "^0.18.5",
68
- "@tricoteuses/senat": "^3.0.1",
66
+ "@tricoteuses/assemblee": "^3.2.7",
67
+ "@tricoteuses/legifrance": "^0.18.7",
68
+ "@tricoteuses/senat": "^3.1.11",
69
69
  "@types/fs-extra": "^11.0.4",
70
- "@types/node": "^25.5.0",
70
+ "@types/node": "^25.8.0",
71
71
  "@types/papaparse": "^5.5.2",
72
- "@typescript-eslint/eslint-plugin": "^8.57.2",
73
- "@typescript-eslint/parser": "^8.57.2",
72
+ "@typescript-eslint/eslint-plugin": "^8.59.2",
73
+ "@typescript-eslint/parser": "^8.59.2",
74
74
  "cheerio": "^1.2.0",
75
75
  "dedent-js": "^1.0.1",
76
- "dotenv": "^17.3.1",
77
- "eslint": "^10.1.0",
78
- "fs-extra": "^11.3.4",
76
+ "dotenv": "^17.4.2",
77
+ "eslint": "^10.4.0",
78
+ "fs-extra": "^11.3.5",
79
79
  "papaparse": "^5.5.3",
80
- "postgres": "^3.4.8",
81
- "prettier": "^3.8.1",
80
+ "postgres": "^3.4.9",
81
+ "prettier": "^3.8.3",
82
82
  "sade": "^1.8.1",
83
- "tsx": "^4.21.0",
84
- "typescript": "^6.0.2",
85
- "typesense": "^3.0.4",
86
- "vite": "^8.0.3",
87
- "vite-plugin-dts": "^4.5.4",
88
- "vitest": "^4.1.2"
83
+ "tsx": "^4.22.0",
84
+ "typescript": "^6.0.3",
85
+ "typesense": "^3.0.6",
86
+ "vite": "^8.0.13",
87
+ "vite-plugin-dts": "^5.0.0",
88
+ "vitest": "^4.1.6"
89
89
  },
90
90
  "dependencies": {
91
- "zod": "^4.3.6"
91
+ "zod": "^4.4.3"
92
92
  }
93
93
  }