mcp-scraper 0.54.0 → 0.54.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.
@@ -13,7 +13,7 @@ import {
13
13
  registerScheduledResultsMcpTools,
14
14
  registerSerpIntelligenceCaptureTools,
15
15
  resolveDeploymentProfile
16
- } from "../chunk-ULKRU7CS.js";
16
+ } from "../chunk-7MIOE5DQ.js";
17
17
  import "../chunk-2K74LVV7.js";
18
18
  import "../chunk-BBI7RGOT.js";
19
19
  import "../chunk-BXZDBKUE.js";
@@ -22,7 +22,7 @@ import {
22
22
  } from "../chunk-HG3ZNOXB.js";
23
23
  import {
24
24
  PACKAGE_VERSION
25
- } from "../chunk-K7TL7VZB.js";
25
+ } from "../chunk-6XQJJLTK.js";
26
26
  import "../chunk-VEQAPOOD.js";
27
27
  import "../chunk-5UN33CGU.js";
28
28
  import "../chunk-UXSCCXYY.js";
@@ -0,0 +1,7 @@
1
+ // src/version.ts
2
+ var PACKAGE_VERSION = "0.54.1";
3
+
4
+ export {
5
+ PACKAGE_VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-6XQJJLTK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = '0.54.1'\n"],"mappings":";AAAO,IAAM,kBAAkB;","names":[]}
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-BXZDBKUE.js";
22
22
  import {
23
23
  PACKAGE_VERSION
24
- } from "./chunk-K7TL7VZB.js";
24
+ } from "./chunk-6XQJJLTK.js";
25
25
  import {
26
26
  MC_PER_CREDIT,
27
27
  PAA_BASE_CREDITS,
@@ -15823,4 +15823,4 @@ export {
15823
15823
  ScheduledResultsMcpExecutor,
15824
15824
  registerScheduledResultsMcpTools
15825
15825
  };
15826
- //# sourceMappingURL=chunk-ULKRU7CS.js.map
15826
+ //# sourceMappingURL=chunk-7MIOE5DQ.js.map
@@ -12,14 +12,38 @@ const elements = {
12
12
  desktopJumps: document.querySelector("#desktop-jump-links")
13
13
  };
14
14
 
15
+ function storageGet(key, fallback = null) {
16
+ try {
17
+ return localStorage.getItem(key) ?? fallback;
18
+ } catch {
19
+ return fallback;
20
+ }
21
+ }
22
+
23
+ function storageSet(key, value) {
24
+ try {
25
+ localStorage.setItem(key, value);
26
+ } catch {
27
+ // Sandboxed previews can intentionally deny storage. The reading room
28
+ // remains fully usable for the current session without persistence.
29
+ }
30
+ }
31
+
32
+ function storageArray(key) {
33
+ try {
34
+ const value = JSON.parse(storageGet(key, "[]"));
35
+ return Array.isArray(value) ? value : [];
36
+ } catch {
37
+ return [];
38
+ }
39
+ }
40
+
15
41
  const state = {
16
42
  data: null,
17
43
  current: null,
18
44
  storageKey: "editorial-reading-room",
19
- typeIndex: Number(localStorage.getItem("editorial-reading-room:type") || 0),
20
- completed: new Set(
21
- JSON.parse(localStorage.getItem("editorial-reading-room:completed") || "[]")
22
- )
45
+ typeIndex: Number(storageGet("editorial-reading-room:type", "0")),
46
+ completed: new Set(storageArray("editorial-reading-room:completed"))
23
47
  };
24
48
 
25
49
  const typeModes = ["default", "large", "larger"];
@@ -69,13 +93,13 @@ function setTypeMode() {
69
93
  const mode = typeModes[state.typeIndex % typeModes.length];
70
94
  if (mode === "default") document.documentElement.removeAttribute("data-type");
71
95
  else document.documentElement.dataset.type = mode;
72
- localStorage.setItem(`${state.storageKey}:type`, String(state.typeIndex % typeModes.length));
96
+ storageSet(`${state.storageKey}:type`, String(state.typeIndex % typeModes.length));
73
97
  }
74
98
 
75
99
  function setTheme(theme) {
76
100
  if (theme === "evening") document.documentElement.dataset.theme = "evening";
77
101
  else document.documentElement.removeAttribute("data-theme");
78
- localStorage.setItem(`${state.storageKey}:theme`, theme);
102
+ storageSet(`${state.storageKey}:theme`, theme);
79
103
  }
80
104
 
81
105
  function routeSlug() {
@@ -313,10 +337,10 @@ function updateReadingProgress() {
313
337
  const end = start + article.offsetHeight - window.innerHeight * 0.55;
314
338
  const percent = Math.max(0, Math.min(1, (window.scrollY - start) / Math.max(1, end - start)));
315
339
  elements.progress.style.width = `${percent * 100}%`;
316
- localStorage.setItem(`${state.storageKey}:progress:${state.current.slug}`, String(percent));
340
+ storageSet(`${state.storageKey}:progress:${state.current.slug}`, String(percent));
317
341
  if (percent > 0.94 && !state.completed.has(state.current.slug)) {
318
342
  state.completed.add(state.current.slug);
319
- localStorage.setItem(`${state.storageKey}:completed`, JSON.stringify([...state.completed]));
343
+ storageSet(`${state.storageKey}:completed`, JSON.stringify([...state.completed]));
320
344
  }
321
345
 
322
346
  let active = null;
@@ -378,11 +402,9 @@ async function boot() {
378
402
  if (!dataElement?.textContent) throw new Error("Could not load the reading-room content.");
379
403
  state.data = JSON.parse(dataElement.textContent);
380
404
  state.storageKey = `editorial-reading-room:${state.data.site.slug}`;
381
- state.typeIndex = Number(localStorage.getItem(`${state.storageKey}:type`) || 0);
382
- state.completed = new Set(
383
- JSON.parse(localStorage.getItem(`${state.storageKey}:completed`) || "[]")
384
- );
385
- const savedTheme = localStorage.getItem(`${state.storageKey}:theme`);
405
+ state.typeIndex = Number(storageGet(`${state.storageKey}:type`, "0"));
406
+ state.completed = new Set(storageArray(`${state.storageKey}:completed`));
407
+ const savedTheme = storageGet(`${state.storageKey}:theme`);
386
408
  if (savedTheme === "evening") setTheme("evening");
387
409
  setTypeMode();
388
410
  renderRoute();
@@ -168,7 +168,7 @@ import {
168
168
  resolveDeploymentProfile,
169
169
  resolveLocalSourcebookSchemaType,
170
170
  transcribeMediaUrl
171
- } from "./chunk-ULKRU7CS.js";
171
+ } from "./chunk-7MIOE5DQ.js";
172
172
  import {
173
173
  auditImageUrls,
174
174
  auditImages,
@@ -224,7 +224,7 @@ import {
224
224
  } from "./chunk-FG6LJGJ7.js";
225
225
  import {
226
226
  PACKAGE_VERSION
227
- } from "./chunk-K7TL7VZB.js";
227
+ } from "./chunk-6XQJJLTK.js";
228
228
  import {
229
229
  abandonExtractSettlement,
230
230
  countSuccessfulPages,
@@ -46649,4 +46649,4 @@ app.get("/blog/:slug/", (c) => {
46649
46649
  export {
46650
46650
  app
46651
46651
  };
46652
- //# sourceMappingURL=server-A6NVOQJF.js.map
46652
+ //# sourceMappingURL=server-GFS5L2NA.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-scraper",
3
- "version": "0.54.0",
3
+ "version": "0.54.1",
4
4
  "description": "MCP server for MCP Scraper web intelligence tools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,7 +0,0 @@
1
- // src/version.ts
2
- var PACKAGE_VERSION = "0.54.0";
3
-
4
- export {
5
- PACKAGE_VERSION
6
- };
7
- //# sourceMappingURL=chunk-K7TL7VZB.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = '0.54.0'\n"],"mappings":";AAAO,IAAM,kBAAkB;","names":[]}