mcp-scraper 0.57.0 → 0.57.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.
@@ -13,7 +13,7 @@ import {
13
13
  registerScheduledResultsMcpTools,
14
14
  registerSerpIntelligenceCaptureTools,
15
15
  resolveDeploymentProfile
16
- } from "../chunk-ULAJAZQF.js";
16
+ } from "../chunk-67JUTUQD.js";
17
17
  import "../chunk-2K74LVV7.js";
18
18
  import "../chunk-4PNMJUSG.js";
19
19
  import "../chunk-AK2NNIYA.js";
@@ -22,7 +22,7 @@ import {
22
22
  } from "../chunk-HU4R6BP2.js";
23
23
  import {
24
24
  PACKAGE_VERSION
25
- } from "../chunk-QQ6ZBYZZ.js";
25
+ } from "../chunk-QN4W5SX6.js";
26
26
  import "../chunk-R6CO77BN.js";
27
27
  import "../chunk-NDIAJIKQ.js";
28
28
  import "../chunk-KSAXVGKC.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-AK2NNIYA.js";
22
22
  import {
23
23
  PACKAGE_VERSION
24
- } from "./chunk-QQ6ZBYZZ.js";
24
+ } from "./chunk-QN4W5SX6.js";
25
25
  import {
26
26
  MC_PER_CREDIT,
27
27
  PAA_BASE_CREDITS,
@@ -15972,4 +15972,4 @@ export {
15972
15972
  ScheduledResultsMcpExecutor,
15973
15973
  registerScheduledResultsMcpTools
15974
15974
  };
15975
- //# sourceMappingURL=chunk-ULAJAZQF.js.map
15975
+ //# sourceMappingURL=chunk-67JUTUQD.js.map
@@ -0,0 +1,7 @@
1
+ // src/version.ts
2
+ var PACKAGE_VERSION = "0.57.2";
3
+
4
+ export {
5
+ PACKAGE_VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-QN4W5SX6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = '0.57.2'\n"],"mappings":";AAAO,IAAM,kBAAkB;","names":[]}
@@ -169,7 +169,7 @@ import {
169
169
  resolveDeploymentProfile,
170
170
  resolveLocalSourcebookSchemaType,
171
171
  transcribeMediaUrl
172
- } from "./chunk-ULAJAZQF.js";
172
+ } from "./chunk-67JUTUQD.js";
173
173
  import {
174
174
  auditImageUrls,
175
175
  auditImages,
@@ -225,7 +225,7 @@ import {
225
225
  } from "./chunk-FG6LJGJ7.js";
226
226
  import {
227
227
  PACKAGE_VERSION
228
- } from "./chunk-QQ6ZBYZZ.js";
228
+ } from "./chunk-QN4W5SX6.js";
229
229
  import {
230
230
  abandonExtractSettlement,
231
231
  countSuccessfulPages,
@@ -20449,13 +20449,27 @@ function localBaseDir() {
20449
20449
  return process.env.MCP_SCRAPER_OUTPUT_DIR?.trim() || join4(homedir(), "Downloads", "mcp-scraper");
20450
20450
  }
20451
20451
  var cached = null;
20452
+ var UnconfiguredBlobStore = class {
20453
+ kind = "unconfigured";
20454
+ async put() {
20455
+ throw new Error("Blob storage is not configured on this deployment: set BLOB_READ_WRITE_TOKEN. Refusing to write to a local path that no request can read back.");
20456
+ }
20457
+ async get() {
20458
+ return null;
20459
+ }
20460
+ };
20461
+ function runsWithoutLocalDisk(env = process.env) {
20462
+ return Boolean(env.VERCEL || env.AWS_LAMBDA_FUNCTION_NAME);
20463
+ }
20464
+ function resolveBlobStore(env = process.env) {
20465
+ const token6 = env.BLOB_READ_WRITE_TOKEN?.trim();
20466
+ if (token6) return new VercelBlobStore(token6);
20467
+ if (runsWithoutLocalDisk(env)) return new UnconfiguredBlobStore();
20468
+ return new LocalBlobStore(localBaseDir());
20469
+ }
20452
20470
  function getBlobStore() {
20453
20471
  if (cached) return cached;
20454
- if (process.env.BLOB_READ_WRITE_TOKEN) {
20455
- cached = new VercelBlobStore(process.env.BLOB_READ_WRITE_TOKEN);
20456
- } else {
20457
- cached = new LocalBlobStore(localBaseDir());
20458
- }
20472
+ cached = resolveBlobStore();
20459
20473
  return cached;
20460
20474
  }
20461
20475
  var VercelBlobStore = class {
@@ -33091,8 +33105,12 @@ function decodeBase64Image(value) {
33091
33105
  }
33092
33106
  return bytes;
33093
33107
  }
33108
+ function commonsImageBlobStore() {
33109
+ const token6 = process.env.COMMONS_IMAGE_READ_WRITE_TOKEN?.trim() || process.env.COMMONS_IMAGE_BLOB_READ_WRITE_TOKEN?.trim() || process.env.BLOB_READ_WRITE_TOKEN?.trim();
33110
+ return token6 ? new VercelBlobStore(token6) : getBlobStore();
33111
+ }
33094
33112
  function isCommonsHostedImageUrl(url) {
33095
- return /^https:\/\/[^/]*(\.public\.blob\.vercel-storage\.com|blob\.vercel-storage\.com)\//i.test(url) || url.startsWith("file://");
33113
+ return /^https:\/\/[^/]*(\.public\.blob\.vercel-storage\.com|blob\.vercel-storage\.com)\//i.test(url);
33096
33114
  }
33097
33115
  var hostOverride = null;
33098
33116
  async function hostCommonsImage(input) {
@@ -33129,7 +33147,15 @@ async function hostCommonsImage(input) {
33129
33147
  }
33130
33148
  const extension = contentType.split("/")[1] === "jpeg" ? "jpg" : contentType.split("/")[1];
33131
33149
  const storageKey = `commons/images/${digest2.slice(0, 2)}/${digest2}.${extension}`;
33132
- const stored = await getBlobStore().put(storageKey, bytes, contentType);
33150
+ const store = commonsImageBlobStore();
33151
+ if (store.kind !== "vercel-blob") {
33152
+ throw new CommonsImageError(
33153
+ "image_storage_unconfigured",
33154
+ "Commons image hosting needs a Vercel Blob token. Refusing to write a local file path into a public wiki entity.",
33155
+ 422
33156
+ );
33157
+ }
33158
+ const stored = await store.put(storageKey, bytes, contentType);
33133
33159
  const id = `TPW-IMG-${digest2.slice(0, 16).toUpperCase()}`;
33134
33160
  await getDb().execute({
33135
33161
  sql: `
@@ -47436,4 +47462,4 @@ app.get("/blog/:slug/", (c) => {
47436
47462
  export {
47437
47463
  app
47438
47464
  };
47439
- //# sourceMappingURL=server-NBGZJX4P.js.map
47465
+ //# sourceMappingURL=server-OZJXK7AB.js.map