@tricoteuses/assemblee 3.3.6 → 3.3.8
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/lib/{amendements-C_aR-BVu.js → amendements-Co_qQeCl.js} +1 -1
- package/lib/{amendements-Cpku2Ut-.js → amendements-s-5GIY_X.js} +7 -7
- package/lib/cleaners.js +3 -3
- package/lib/index.js +2 -2
- package/lib/{loaders-DQJLtTmE.js → loaders-Bdc1oCGG.js} +2 -2
- package/lib/loaders.js +1 -1
- package/lib/parsers/compte_rendu_commission.d.ts +1 -1
- package/lib/parsers/compte_rendu_commission.test.d.ts +1 -0
- package/lib/parsers.js +2 -2
- package/lib/registries.d.ts +8 -8
- package/lib/schemas/clean/acteurs_et_organes.d.ts +37 -37
- package/lib/schemas/clean/amendements.d.ts +12 -12
- package/lib/schemas/clean/debats.d.ts +26 -26
- package/lib/schemas/clean/dossiers_legislatifs.d.ts +16 -16
- package/lib/schemas/clean/questions.d.ts +122 -122
- package/lib/schemas/clean/scrutins.d.ts +2 -2
- package/lib/schemas/enriched/acteurs_et_organes.d.ts +2 -2
- package/lib/schemas/enriched/amendements.d.ts +9 -9
- package/lib/schemas/enriched/dossiers_legislatifs.d.ts +12 -12
- package/lib/schemas/enriched/questions.d.ts +108 -108
- package/lib/schemas/enriched/scrutins.d.ts +2 -2
- package/lib/schemas/raw/acteurs_et_organes.d.ts +132 -132
- package/lib/schemas/raw/agendas.d.ts +97 -97
- package/lib/schemas/raw/amendements.d.ts +83 -83
- package/lib/schemas/raw/debats.d.ts +51 -51
- package/lib/schemas/raw/dossiers_legislatifs.d.ts +171 -171
- package/lib/schemas/raw/questions.d.ts +222 -222
- package/lib/schemas/raw/scrutins.d.ts +164 -164
- package/lib/scripts/cr_commissions_status.d.ts +3 -1
- package/lib/scripts/shared/cr_redirect.d.ts +9 -0
- package/lib/scripts/shared/cr_redirect.test.d.ts +1 -0
- package/lib/{scrutins-BmIhL1xc.js → scrutins-UjCZmd8a.js} +1 -1
- package/package.json +1 -1
|
@@ -5,9 +5,11 @@ export declare const MAX_ERROR_LENGTH = 2000;
|
|
|
5
5
|
* misses (report not yet published, transient parsing issue) are tolerated:
|
|
6
6
|
* the next run fetches them again. */
|
|
7
7
|
export declare const CR_COMMISSIONS_FAILURE_RATIO_THRESHOLD = 0.1;
|
|
8
|
+
export type CrCommissionFetchOutcome = "success" | "not-published" | "failure";
|
|
8
9
|
export type CrCommissionsStats = {
|
|
9
10
|
attempts: number;
|
|
10
11
|
failures: number;
|
|
12
|
+
notPublished: number;
|
|
11
13
|
};
|
|
12
14
|
export type DatasetStatusEntry = {
|
|
13
15
|
status: "ok" | "failed";
|
|
@@ -21,7 +23,7 @@ export type DatasetStatusEntry = {
|
|
|
21
23
|
export type DatasetStatusFile = Record<string, DatasetStatusEntry>;
|
|
22
24
|
export declare function resetCrCommissionsStats(): void;
|
|
23
25
|
export declare function getCrCommissionsStats(): CrCommissionsStats;
|
|
24
|
-
export declare function recordCrCommissionFetch(
|
|
26
|
+
export declare function recordCrCommissionFetch(outcome: CrCommissionFetchOutcome): void;
|
|
25
27
|
export declare function crCommissionsDatasetFailed(threshold?: number): boolean;
|
|
26
28
|
/** Record the outcome of one agenda cleaning run for the CR commissions
|
|
27
29
|
* dataset of the given legislature. Nothing is written when no report was
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Outcome of scraping one AN redirect page for a commission report. */
|
|
2
|
+
export type CrRedirectPageKind = "html-export" | "not-published" | "no-html-export";
|
|
3
|
+
/** Classify the response of `cr_redirect.asp` for one commission report.
|
|
4
|
+
* CRs deposited but not yet (or never) published surface as a 404 or a stub
|
|
5
|
+
* page saying "Document non encore publié"; they are not fetch failures. */
|
|
6
|
+
export declare function classifyCrRedirectPage({ html, statusCode, }: {
|
|
7
|
+
html: string;
|
|
8
|
+
statusCode: number;
|
|
9
|
+
}): CrRedirectPageKind;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, Q as t, X as n, Y as r, Z as i, et as a, nt as o, rt as s, tt as c } from "./amendements-
|
|
1
|
+
import { $ as e, Q as t, X as n, Y as r, Z as i, et as a, nt as o, rt as s, tt as c } from "./amendements-s-5GIY_X.js";
|
|
2
2
|
import { z as l } from "zod";
|
|
3
3
|
//#region src/legislatures.ts
|
|
4
4
|
var ee = /* @__PURE__ */ function(e) {
|