@tricoteuses/tisseuse 0.18.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { a as e, i as t, o as n, r, t as i } from "./resolver-cn-qJE70.js";
1
+ import { a as e, i as t, o as n, r, t as i } from "./resolver-tBQRf8TL.js";
2
2
  //#region src/lib/f_legi/resolver.ts
3
3
  var a = [
4
4
  "article_location_diffs",
@@ -92,7 +92,7 @@ var l = class extends i {
92
92
  throw this.schemaValidationPromise = void 0, e;
93
93
  }), await this.schemaValidationPromise, this.textTitlesInfosLoaded) {
94
94
  let e = await this.getTextTitlesInfosParserCacheMeta(r);
95
- if (e !== void 0 && e.formatVersion === 1 && e.generatedAt === o) {
95
+ if (e !== void 0 && e.formatVersion === 2 && e.generatedAt === o) {
96
96
  t("already-loaded");
97
97
  return;
98
98
  }
@@ -109,14 +109,20 @@ var l = class extends i {
109
109
  await a.time("lockTextTitlesInfos", () => i`SELECT lock_text_titles_infos_for_parser_cache()`), n("queryTextTitlesInfos:start");
110
110
  let o = await a.time("queryTextTitlesInfos", () => i`
111
111
  SELECT
112
- cid,
113
- date_texte::text AS "dateTexte",
114
- legi_id::text AS id,
115
- nature,
116
- num,
117
- title
118
- FROM text_titles_infos
119
- ORDER BY legi_id
112
+ t.cid,
113
+ v.debut::text AS "dateDebut",
114
+ v.fin::text AS "dateFin",
115
+ t.date_texte::text AS "dateTexte",
116
+ t.legi_id::text AS id,
117
+ t.nature,
118
+ t.num,
119
+ t.title
120
+ FROM text_titles_infos t
121
+ LEFT JOIN versions v ON
122
+ t.nature = 'CODE'
123
+ AND v.legi_id = t.cid
124
+ AND v.legi_id_lien = t.legi_id
125
+ ORDER BY t.legi_id
120
126
  `);
121
127
  n("queryTextTitlesInfos:done", { count: o.length }), n("buildTextTitlesInfos:start", { count: o.length });
122
128
  let s = performance.now(), c = await r(o, { onProgress: ({ count: e, phase: t }) => n(`buildTextTitlesInfos:${t}`, { count: e }) });
@@ -134,7 +140,7 @@ var l = class extends i {
134
140
  data
135
141
  ) VALUES (
136
142
  ${e},
137
- ${1},
143
+ ${2},
138
144
  ${o.length},
139
145
  now(),
140
146
  ${this.flegiDb.json(c)}
@@ -176,7 +182,7 @@ var l = class extends i {
176
182
  n("queryTextTitlesInfosParserCache:miss");
177
183
  return;
178
184
  }
179
- if (o.formatVersion !== 1) {
185
+ if (o.formatVersion !== 2) {
180
186
  n("queryTextTitlesInfosParserCache:format-mismatch");
181
187
  return;
182
188
  }