mcp-scraper 0.58.0 → 0.60.0
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/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/dist/bin/api-server.cjs +415 -100
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +1 -1
- package/dist/bin/mcp-scraper-cli.cjs +1 -1
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +1 -1
- package/dist/bin/mcp-scraper-install.cjs +1 -1
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +1 -1
- package/dist/bin/mcp-stdio-server.cjs +7 -6
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +2 -2
- package/dist/{chunk-P32KEY3D.js → chunk-AIA3MFT2.js} +8 -7
- package/dist/chunk-AIA3MFT2.js.map +1 -0
- package/dist/chunk-AQA2ZL4X.js +7 -0
- package/dist/chunk-AQA2ZL4X.js.map +1 -0
- package/dist/editorial-reading-room/assets/app.js +17 -3
- package/dist/{server-J4YGBOTS.js → server-IRKNU6LO.js} +395 -96
- package/dist/server-IRKNU6LO.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-EJ6KU4PC.js +0 -7
- package/dist/chunk-EJ6KU4PC.js.map +0 -1
- package/dist/chunk-P32KEY3D.js.map +0 -1
- package/dist/server-J4YGBOTS.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = '0.60.0'\n"],"mappings":";AAAO,IAAM,kBAAkB;","names":[]}
|
|
@@ -102,14 +102,28 @@ function setTheme(theme) {
|
|
|
102
102
|
storageSet(`${state.storageKey}:theme`, theme);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
function editionBasePath() {
|
|
106
|
+
const path = new URL(window.location.href).pathname.replace(/\/+$/, "");
|
|
107
|
+
const editionMatch = path.match(/^(\/editions\/[a-z0-9]+(?:-[a-z0-9]+)*)(?:\/[a-z0-9-]+)?$/);
|
|
108
|
+
return editionMatch ? editionMatch[1] : "";
|
|
109
|
+
}
|
|
110
|
+
|
|
105
111
|
function routeSlug() {
|
|
106
|
-
|
|
112
|
+
const url = new URL(window.location.href);
|
|
113
|
+
const legacy = url.searchParams.get("article");
|
|
114
|
+
if (legacy) return legacy;
|
|
115
|
+
const path = url.pathname.replace(/\/+$/, "");
|
|
116
|
+
const base = editionBasePath();
|
|
117
|
+
const remainder = base ? path.slice(base.length) : path;
|
|
118
|
+
const match = remainder.match(/^\/([a-z0-9]+(?:-[a-z0-9]+)*)$/);
|
|
119
|
+
return match ? match[1] : null;
|
|
107
120
|
}
|
|
108
121
|
|
|
109
122
|
function articleUrl(slug, section = "") {
|
|
110
123
|
const url = new URL(window.location.href);
|
|
111
|
-
|
|
112
|
-
|
|
124
|
+
const base = editionBasePath();
|
|
125
|
+
url.pathname = slug ? `${base}/${slug}` : `${base || "/"}`;
|
|
126
|
+
url.searchParams.delete("article");
|
|
113
127
|
url.hash = section ? `#${section}` : "";
|
|
114
128
|
return `${url.pathname}${url.search}${url.hash}`;
|
|
115
129
|
}
|