@tricoteuses/senat 2.20.2 → 2.20.4

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.
@@ -4,7 +4,7 @@ declare const findAllScrutinsQuery: import("kysely").SelectQueryBuilder<{
4
4
  [x: string]: any;
5
5
  [x: number]: any;
6
6
  [x: symbol]: any;
7
- }, "date_seance" | "lecass" | "lecture" | "scr" | "typlec", {
7
+ }, "date_seance" | "lecass" | "lecture" | "loi" | "scr" | "typlec", {
8
8
  [x: string]: any;
9
9
  }>;
10
10
  export declare function findAllScrutins(fromSession?: number): AsyncIterableIterator<{
@@ -78,12 +78,14 @@ const findAllScrutinsQuery = dbSenat
78
78
  .leftJoin("date_seance", "scr.code", "date_seance.code")
79
79
  .leftJoin("lecass", "date_seance.lecidt", "lecass.lecassidt")
80
80
  .leftJoin("lecture", "lecture.lecidt", "lecass.lecidt")
81
+ .leftJoin("loi", "loi.loicod", "lecture.loicod")
81
82
  .leftJoin("typlec", "typlec.typleccod", "lecture.typleccod")
82
83
  .select(({ eb, ref, val }) => [
83
84
  "scr.sesann as session",
84
85
  "scr.scrnum as numero",
85
86
  rtrim(ref("date_seance.lecidt")).as("lecture_id"),
86
87
  rtrim(ref("lecture.leccom")).as("lecture_libelle"),
88
+ "loi.signet as signet_dossier",
87
89
  rtrim(ref("typlec.typleclib")).as("type_lecture"),
88
90
  toDateString(ref("scr.scrdat")).as("date_scrutin"),
89
91
  toDateString(ref("scr.scrdateff")).as("date_scrutin_effective"),
@@ -1,16 +1,29 @@
1
- import { iterLoadSenatScrutins, iterLoadSenatAmendements, iterLoadSenatDossiersLegislatifs } from "../loaders";
1
+ import { iterLoadSenatScrutins } from "../loaders";
2
2
  import commandLineArgs from "command-line-args";
3
3
  import { dataDirDefaultOption } from "./shared/cli_helpers";
4
4
  const optionsDefinitions = [dataDirDefaultOption];
5
5
  const options = commandLineArgs(optionsDefinitions);
6
6
  const noValidation = false;
7
7
  const session = 2024;
8
+ const s = new Set();
8
9
  for (const { item: scrutin } of iterLoadSenatScrutins(options["dataDir"], session, { noValidation: noValidation })) {
9
- console.log(scrutin["numero"]);
10
+ s.add(scrutin["lecture_libelle"]);
10
11
  }
11
- for (const { item: amendement } of iterLoadSenatAmendements(options["dataDir"], session, { noValidation: noValidation })) {
12
- console.log(amendement["numero"]);
12
+ console.log(s);
13
+ /*
14
+ for (const { item: amendement } of iterLoadSenatAmendements(
15
+ options["dataDir"],
16
+ session,
17
+ { noValidation: noValidation },
18
+ )) {
19
+ console.log(amendement["numero"])
13
20
  }
14
- for (const { item: dossierLegislatif } of iterLoadSenatDossiersLegislatifs(options["dataDir"], session, { noValidation: noValidation })) {
15
- console.log(dossierLegislatif["numero"]);
21
+
22
+ for (const { item: dossierLegislatif } of iterLoadSenatDossiersLegislatifs(
23
+ options["dataDir"],
24
+ session,
25
+ { noValidation: noValidation },
26
+ )) {
27
+ console.log(dossierLegislatif["numero"])
16
28
  }
29
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tricoteuses/senat",
3
- "version": "2.20.2",
3
+ "version": "2.20.4",
4
4
  "description": "Handle French Sénat's open data",
5
5
  "keywords": [
6
6
  "France",