riksdagsmonitor 0.9.0 → 0.9.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/lib/dashboards/anomaly-detection.d.ts.map +1 -1
- package/dist/lib/dashboards/anomaly-detection.js +2 -7
- package/dist/lib/dashboards/anomaly-detection.js.map +1 -1
- package/dist/lib/dashboards/coalition-loader.d.ts.map +1 -1
- package/dist/lib/dashboards/coalition-loader.js +2 -7
- package/dist/lib/dashboards/coalition-loader.js.map +1 -1
- package/dist/lib/dashboards/committees-dashboard.d.ts.map +1 -1
- package/dist/lib/dashboards/committees-dashboard.js +4 -6
- package/dist/lib/dashboards/committees-dashboard.js.map +1 -1
- package/dist/lib/dashboards/election-cycle.d.ts.map +1 -1
- package/dist/lib/dashboards/election-cycle.js +2 -24
- package/dist/lib/dashboards/election-cycle.js.map +1 -1
- package/dist/lib/dashboards/ministry-dashboard.d.ts.map +1 -1
- package/dist/lib/dashboards/ministry-dashboard.js +3 -3
- package/dist/lib/dashboards/ministry-dashboard.js.map +1 -1
- package/dist/lib/dashboards/party-dashboard.d.ts.map +1 -1
- package/dist/lib/dashboards/party-dashboard.js +5 -5
- package/dist/lib/dashboards/party-dashboard.js.map +1 -1
- package/dist/lib/dashboards/pre-election.d.ts.map +1 -1
- package/dist/lib/dashboards/pre-election.js +2 -7
- package/dist/lib/dashboards/pre-election.js.map +1 -1
- package/dist/lib/dashboards/risk-dashboard.d.ts.map +1 -1
- package/dist/lib/dashboards/risk-dashboard.js +18 -1
- package/dist/lib/dashboards/risk-dashboard.js.map +1 -1
- package/dist/lib/dashboards/seasonal-patterns.js +2 -7
- package/dist/lib/dashboards/seasonal-patterns.js.map +1 -1
- package/dist/lib/shared/index.d.ts +1 -0
- package/dist/lib/shared/index.d.ts.map +1 -1
- package/dist/lib/shared/index.js +1 -0
- package/dist/lib/shared/index.js.map +1 -1
- package/dist/lib/shared/register-globals-bootstrap.d.ts +27 -0
- package/dist/lib/shared/register-globals-bootstrap.d.ts.map +1 -0
- package/dist/lib/shared/register-globals-bootstrap.js +28 -0
- package/dist/lib/shared/register-globals-bootstrap.js.map +1 -0
- package/dist/lib/shared/safe-storage.d.ts +28 -0
- package/dist/lib/shared/safe-storage.d.ts.map +1 -0
- package/dist/lib/shared/safe-storage.js +101 -0
- package/dist/lib/shared/safe-storage.js.map +1 -0
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;KAUK;AAEL,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AAEjC,wEAAwE;AACxE,mEAAmE;AACnE,uGAAuG"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/browser/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;KAUK;AAEL,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AAEjC,wEAAwE;AACxE,mEAAmE;AACnE,uGAAuG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Shared/RegisterGlobalsBootstrap
|
|
3
|
+
* @description Side-effect-only module that registers Chart.js, D3.js, and
|
|
4
|
+
* Papa Parse on `globalThis` at module evaluation time.
|
|
5
|
+
*
|
|
6
|
+
* The CIA dashboard modules (`src/browser/cia/visualizations.ts` etc.)
|
|
7
|
+
* capture `globalThis.Chart` at module-init time via
|
|
8
|
+
* `const Chart = (globalThis as ...).Chart`. Because ECMAScript module
|
|
9
|
+
* imports are hoisted, importing this bootstrap module FIRST in
|
|
10
|
+
* `cia-entry.ts` guarantees the globals exist before downstream modules
|
|
11
|
+
* evaluate. Without this, `Chart` would be captured as `undefined` and
|
|
12
|
+
* every chart on `dashboard/index*.html` would silently fail.
|
|
13
|
+
*
|
|
14
|
+
* The dedicated bootstrap module exists (rather than calling
|
|
15
|
+
* `registerBrowserGlobals()` from `register-globals.ts` itself or from
|
|
16
|
+
* the `cia-entry.ts` body) so that:
|
|
17
|
+
* 1. `register-globals.ts` remains a pure exports-only module — the
|
|
18
|
+
* `cia-dashboard-entry-contract.test.ts` contract forbids top-level
|
|
19
|
+
* side effects there for tree-shaking integrity.
|
|
20
|
+
* 2. The static (non-dynamic) import graph is preserved so Vite emits
|
|
21
|
+
* the canonical `styles-*.css` asset chunk that the
|
|
22
|
+
* `static-pages-emit` plugin expects.
|
|
23
|
+
*
|
|
24
|
+
* @security No inline scripts — programmatic global registration only.
|
|
25
|
+
*/
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=register-globals-bootstrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-globals-bootstrap.d.ts","sourceRoot":"","sources":["../../../src/browser/shared/register-globals-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Shared/RegisterGlobalsBootstrap
|
|
3
|
+
* @description Side-effect-only module that registers Chart.js, D3.js, and
|
|
4
|
+
* Papa Parse on `globalThis` at module evaluation time.
|
|
5
|
+
*
|
|
6
|
+
* The CIA dashboard modules (`src/browser/cia/visualizations.ts` etc.)
|
|
7
|
+
* capture `globalThis.Chart` at module-init time via
|
|
8
|
+
* `const Chart = (globalThis as ...).Chart`. Because ECMAScript module
|
|
9
|
+
* imports are hoisted, importing this bootstrap module FIRST in
|
|
10
|
+
* `cia-entry.ts` guarantees the globals exist before downstream modules
|
|
11
|
+
* evaluate. Without this, `Chart` would be captured as `undefined` and
|
|
12
|
+
* every chart on `dashboard/index*.html` would silently fail.
|
|
13
|
+
*
|
|
14
|
+
* The dedicated bootstrap module exists (rather than calling
|
|
15
|
+
* `registerBrowserGlobals()` from `register-globals.ts` itself or from
|
|
16
|
+
* the `cia-entry.ts` body) so that:
|
|
17
|
+
* 1. `register-globals.ts` remains a pure exports-only module — the
|
|
18
|
+
* `cia-dashboard-entry-contract.test.ts` contract forbids top-level
|
|
19
|
+
* side effects there for tree-shaking integrity.
|
|
20
|
+
* 2. The static (non-dynamic) import graph is preserved so Vite emits
|
|
21
|
+
* the canonical `styles-*.css` asset chunk that the
|
|
22
|
+
* `static-pages-emit` plugin expects.
|
|
23
|
+
*
|
|
24
|
+
* @security No inline scripts — programmatic global registration only.
|
|
25
|
+
*/
|
|
26
|
+
import { registerBrowserGlobals } from './register-globals.js';
|
|
27
|
+
registerBrowserGlobals();
|
|
28
|
+
//# sourceMappingURL=register-globals-bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-globals-bootstrap.js","sourceRoot":"","sources":["../../../src/browser/shared/register-globals-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Safe localStorage wrapper with quota-aware eviction.
|
|
3
|
+
*
|
|
4
|
+
* Wraps `localStorage.setItem` so that `QuotaExceededError` (and the legacy
|
|
5
|
+
* Firefox `NS_ERROR_DOM_QUOTA_REACHED`) does not leak as an unhandled
|
|
6
|
+
* exception or noisy console error. On quota errors the helper evicts the
|
|
7
|
+
* oldest entries that share the caller's key prefix and retries once. If the
|
|
8
|
+
* payload still does not fit (e.g. a single oversized blob), the write is
|
|
9
|
+
* silently skipped — the caller will simply re-fetch on the next page load.
|
|
10
|
+
*
|
|
11
|
+
* @intelligence Resilient browser-cache layer — keeps dashboards functional
|
|
12
|
+
* when committee/election CSV blobs exceed the ~5 MB localStorage quota.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Attempt `localStorage.setItem`. On quota exceeded, evict half of the
|
|
16
|
+
* entries sharing `evictionPrefix` (oldest-timestamp first when payloads are
|
|
17
|
+
* JSON `{ timestamp }` objects) and retry once. Other errors are logged and
|
|
18
|
+
* swallowed.
|
|
19
|
+
*
|
|
20
|
+
* @param key Full storage key to write.
|
|
21
|
+
* @param payload Serialized payload to store.
|
|
22
|
+
* @param evictionPrefix Prefix identifying related entries that may be
|
|
23
|
+
* evicted to make room. Typically the caller's namespace, e.g.
|
|
24
|
+
* `'committees-cache:'`.
|
|
25
|
+
* @returns `true` if the write succeeded, `false` otherwise.
|
|
26
|
+
*/
|
|
27
|
+
export declare function safeSetItem(key: string, payload: string, evictionPrefix: string): boolean;
|
|
28
|
+
//# sourceMappingURL=safe-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-storage.d.ts","sourceRoot":"","sources":["../../../src/browser/shared/safe-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAmBH;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,GACrB,OAAO,CAqDT"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Safe localStorage wrapper with quota-aware eviction.
|
|
3
|
+
*
|
|
4
|
+
* Wraps `localStorage.setItem` so that `QuotaExceededError` (and the legacy
|
|
5
|
+
* Firefox `NS_ERROR_DOM_QUOTA_REACHED`) does not leak as an unhandled
|
|
6
|
+
* exception or noisy console error. On quota errors the helper evicts the
|
|
7
|
+
* oldest entries that share the caller's key prefix and retries once. If the
|
|
8
|
+
* payload still does not fit (e.g. a single oversized blob), the write is
|
|
9
|
+
* silently skipped — the caller will simply re-fetch on the next page load.
|
|
10
|
+
*
|
|
11
|
+
* @intelligence Resilient browser-cache layer — keeps dashboards functional
|
|
12
|
+
* when committee/election CSV blobs exceed the ~5 MB localStorage quota.
|
|
13
|
+
*/
|
|
14
|
+
import { logger } from './logger.js';
|
|
15
|
+
/**
|
|
16
|
+
* Detect whether an error represents a quota-exceeded condition.
|
|
17
|
+
* Covers DOMException name 'QuotaExceededError', legacy code 22, and the
|
|
18
|
+
* historical Firefox name 'NS_ERROR_DOM_QUOTA_REACHED' (code 1014).
|
|
19
|
+
*/
|
|
20
|
+
function isQuotaError(e) {
|
|
21
|
+
if (!(e instanceof DOMException))
|
|
22
|
+
return false;
|
|
23
|
+
return (e.name === 'QuotaExceededError' ||
|
|
24
|
+
e.name === 'NS_ERROR_DOM_QUOTA_REACHED' ||
|
|
25
|
+
e.code === 22 ||
|
|
26
|
+
e.code === 1014);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Attempt `localStorage.setItem`. On quota exceeded, evict half of the
|
|
30
|
+
* entries sharing `evictionPrefix` (oldest-timestamp first when payloads are
|
|
31
|
+
* JSON `{ timestamp }` objects) and retry once. Other errors are logged and
|
|
32
|
+
* swallowed.
|
|
33
|
+
*
|
|
34
|
+
* @param key Full storage key to write.
|
|
35
|
+
* @param payload Serialized payload to store.
|
|
36
|
+
* @param evictionPrefix Prefix identifying related entries that may be
|
|
37
|
+
* evicted to make room. Typically the caller's namespace, e.g.
|
|
38
|
+
* `'committees-cache:'`.
|
|
39
|
+
* @returns `true` if the write succeeded, `false` otherwise.
|
|
40
|
+
*/
|
|
41
|
+
export function safeSetItem(key, payload, evictionPrefix) {
|
|
42
|
+
try {
|
|
43
|
+
localStorage.setItem(key, payload);
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
catch (e) {
|
|
47
|
+
if (!isQuotaError(e)) {
|
|
48
|
+
// Non-quota error (e.g. SecurityError when storage is disabled) — warn and bail.
|
|
49
|
+
logger.warn('safeSetItem: non-quota storage error', e);
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// Quota exceeded — collect candidates with the same prefix.
|
|
54
|
+
const candidates = [];
|
|
55
|
+
try {
|
|
56
|
+
for (let i = 0; i < localStorage.length; i++) {
|
|
57
|
+
const k = localStorage.key(i);
|
|
58
|
+
if (!k || !k.startsWith(evictionPrefix) || k === key)
|
|
59
|
+
continue;
|
|
60
|
+
let ts = 0;
|
|
61
|
+
try {
|
|
62
|
+
const raw = localStorage.getItem(k);
|
|
63
|
+
if (raw) {
|
|
64
|
+
const parsed = JSON.parse(raw);
|
|
65
|
+
if (typeof parsed.timestamp === 'number')
|
|
66
|
+
ts = parsed.timestamp;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
// Non-JSON entry under this prefix — treat as oldest so it gets purged first.
|
|
71
|
+
}
|
|
72
|
+
candidates.push({ key: k, timestamp: ts });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
// Iteration over localStorage failed (e.g. storage disabled mid-flight) — give up.
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
// Evict oldest half (at minimum one).
|
|
80
|
+
candidates.sort((a, b) => a.timestamp - b.timestamp);
|
|
81
|
+
const removeCount = Math.max(1, Math.ceil(candidates.length / 2));
|
|
82
|
+
for (const entry of candidates.slice(0, removeCount)) {
|
|
83
|
+
try {
|
|
84
|
+
localStorage.removeItem(entry.key);
|
|
85
|
+
}
|
|
86
|
+
catch { /* ignore */ }
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
localStorage.setItem(key, payload);
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
catch (retryErr) {
|
|
93
|
+
if (isQuotaError(retryErr)) {
|
|
94
|
+
// Single payload still too large — skip silently. Caller will re-fetch on next load.
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
logger.warn('safeSetItem: retry failed', retryErr);
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=safe-storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-storage.js","sourceRoot":"","sources":["../../../src/browser/shared/safe-storage.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "riksdagsmonitor",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Swedish Parliament (Riksdag) intelligence platform — TypeScript utilities for political data visualization, dashboards, and open data analysis with Chart.js and D3.js",
|
|
6
6
|
"main": "dist/lib/shared/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"dev": "vite",
|
|
52
52
|
"predev": "npx tsx scripts/copy-vendor-mermaid.ts --quiet",
|
|
53
53
|
"copy-vendor": "npx tsx scripts/copy-vendor-mermaid.ts",
|
|
54
|
-
"prebuild": "npx tsx scripts/generate-article-types-doc.ts && npx tsx scripts/copy-vendor-mermaid.ts --quiet && npx tsx scripts/aggregate-analysis.ts --all --quiet && npx tsx scripts/render-articles.ts --all --lang
|
|
54
|
+
"prebuild": "npx tsx scripts/generate-article-types-doc.ts && npx tsx scripts/copy-vendor-mermaid.ts --quiet && npx tsx scripts/aggregate-analysis.ts --all --quiet && npx tsx scripts/render-articles.ts --all --lang all --quiet && npx tsx scripts/generate-news-indexes/index.ts && npx tsx scripts/extract-news-metadata.ts && npx tsx scripts/generate-sitemap-html.ts && npx tsx scripts/generate-political-intelligence.ts && npx tsx scripts/generate-rss.ts && npx tsx scripts/generate-sitemap.ts && npx tsx scripts/normalize-static-html-chrome.ts && npx tsx scripts/backfill-translated-chrome.ts && npx tsx scripts/strip-legacy-chrome-script-tags.ts",
|
|
55
55
|
"build": "vite build",
|
|
56
56
|
"build:lib": "tsc -p tsconfig.lib.json && tsc -p tsconfig.npm-scripts.json",
|
|
57
57
|
"postbuild": "cp rss.xml dist/rss.xml && cp sitemap.xml dist/sitemap.xml && cp -r cia-data dist/cia-data && cp manifest.json dist/manifest.json",
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
"validate-news": "node scripts/validate-news-translations.ts",
|
|
75
75
|
"validate-article": "npx tsx scripts/validate-article.ts",
|
|
76
76
|
"validate-all": "npm run htmlhint && npm run validate-translations && npm run validate-news && npm run validate-article",
|
|
77
|
-
"generate-news": "npx tsx scripts/render-articles.ts --all --lang
|
|
77
|
+
"generate-news": "npx tsx scripts/render-articles.ts --all --lang all",
|
|
78
78
|
"aggregate-analysis": "npx tsx scripts/aggregate-analysis.ts --all",
|
|
79
|
-
"render-articles": "npx tsx scripts/render-articles.ts --all --lang
|
|
79
|
+
"render-articles": "npx tsx scripts/render-articles.ts --all --lang all",
|
|
80
80
|
"generate-news-indexes": "node scripts/generate-news-indexes.ts",
|
|
81
81
|
"generate-sitemap": "tsx scripts/generate-sitemap.ts",
|
|
82
82
|
"generate-sitemap-html": "npx tsx scripts/generate-sitemap-html.ts",
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"@eslint/js": "10.0.1",
|
|
169
169
|
"@types/d3": "7.4.3",
|
|
170
170
|
"@types/hast": "3.0.4",
|
|
171
|
-
"@types/node": "25.6.
|
|
171
|
+
"@types/node": "25.6.1",
|
|
172
172
|
"@types/papaparse": "5.5.2",
|
|
173
173
|
"@vitest/coverage-v8": "4.1.5",
|
|
174
174
|
"@vitest/ui": "4.1.5",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"js-yaml": "4.1.1",
|
|
188
188
|
"json-schema-to-typescript": "15.0.4",
|
|
189
189
|
"jszip": "3.10.1",
|
|
190
|
-
"knip": "6.
|
|
190
|
+
"knip": "6.12.1",
|
|
191
191
|
"mermaid": "11.14.0",
|
|
192
192
|
"papaparse": "5.5.3",
|
|
193
193
|
"rehype-autolink-headings": "^7.1.0",
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
"typescript-eslint": "8.59.2",
|
|
206
206
|
"unified": "^11.0.5",
|
|
207
207
|
"unist-util-visit": "5.1.0",
|
|
208
|
-
"vite": "8.0.
|
|
208
|
+
"vite": "8.0.11",
|
|
209
209
|
"vite-plugin-sri-gen": "1.4.1",
|
|
210
210
|
"vitest": "4.1.5",
|
|
211
211
|
"worldbank-mcp": "1.0.1"
|