mcp-scraper 0.44.3 → 0.44.4

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.
@@ -12,7 +12,7 @@ import {
12
12
  registerScheduledResultsMcpTools,
13
13
  registerSerpIntelligenceCaptureTools,
14
14
  resolveDeploymentProfile
15
- } from "../chunk-2SE4GYCS.js";
15
+ } from "../chunk-ZVOVPXDL.js";
16
16
  import "../chunk-2K74LVV7.js";
17
17
  import "../chunk-BBI7RGOT.js";
18
18
  import "../chunk-T5AFM4G5.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "../chunk-GRODXRUY.js";
22
22
  import {
23
23
  PACKAGE_VERSION
24
- } from "../chunk-32Z52OE4.js";
24
+ } from "../chunk-HFCIHZHA.js";
25
25
  import "../chunk-X5WDJ7D7.js";
26
26
  import "../chunk-5UN33CGU.js";
27
27
  import "../chunk-5X7CJEK3.js";
@@ -0,0 +1,7 @@
1
+ // src/version.ts
2
+ var PACKAGE_VERSION = "0.44.4";
3
+
4
+ export {
5
+ PACKAGE_VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-HFCIHZHA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = '0.44.4'\n"],"mappings":";AAAO,IAAM,kBAAkB;","names":[]}
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-T5AFM4G5.js";
22
22
  import {
23
23
  PACKAGE_VERSION
24
- } from "./chunk-32Z52OE4.js";
24
+ } from "./chunk-HFCIHZHA.js";
25
25
  import {
26
26
  MC_PER_CREDIT
27
27
  } from "./chunk-X5WDJ7D7.js";
@@ -13238,4 +13238,4 @@ export {
13238
13238
  ScheduledResultsMcpExecutor,
13239
13239
  registerScheduledResultsMcpTools
13240
13240
  };
13241
- //# sourceMappingURL=chunk-2SE4GYCS.js.map
13241
+ //# sourceMappingURL=chunk-ZVOVPXDL.js.map
@@ -86,7 +86,7 @@ import {
86
86
  renewDirectoryArtifactDownload,
87
87
  resolveDeploymentProfile,
88
88
  transcribeMediaUrl
89
- } from "./chunk-2SE4GYCS.js";
89
+ } from "./chunk-ZVOVPXDL.js";
90
90
  import {
91
91
  auditImageUrls,
92
92
  auditImages,
@@ -142,7 +142,7 @@ import {
142
142
  } from "./chunk-3ZUBQQPQ.js";
143
143
  import {
144
144
  PACKAGE_VERSION
145
- } from "./chunk-32Z52OE4.js";
145
+ } from "./chunk-HFCIHZHA.js";
146
146
  import {
147
147
  abandonExtractSettlement,
148
148
  countSuccessfulPages,
@@ -12779,12 +12779,21 @@ import { createHash as createHash3 } from "crypto";
12779
12779
 
12780
12780
  // src/api/local-sourcebook-public-urls.ts
12781
12781
  var DEFAULT_ROOT_DOMAIN = "localsourcebook.com";
12782
+ var CATEGORY_PUBLIC_SLUGS = {
12783
+ home: "home-services",
12784
+ professional: "professional",
12785
+ restaurants: "restaurants",
12786
+ financial: "financial",
12787
+ realestate: "realestate",
12788
+ auto: "auto",
12789
+ wellness: "wellness"
12790
+ };
12782
12791
  function rootDomain() {
12783
12792
  const configured = process.env.LOCAL_SOURCEBOOK_PUBLIC_ROOT_DOMAIN?.trim() || DEFAULT_ROOT_DOMAIN;
12784
12793
  return configured.replace(/^https?:\/\//i, "").replace(/^www\./i, "").replace(/\/.*$/, "").replace(/\.+$/, "").toLowerCase();
12785
12794
  }
12786
12795
  function localSourcebookPublicUrls(category, state, slug2) {
12787
- const categoryUrl = `https://${category}.${rootDomain()}`;
12796
+ const categoryUrl = `https://${CATEGORY_PUBLIC_SLUGS[category]}.${rootDomain()}`;
12788
12797
  const statePath = `/${state.toLowerCase()}`;
12789
12798
  const profilePath = `${statePath}/${slug2}/`;
12790
12799
  const reviewsPath = `${statePath}/${slug2}/reviews`;
@@ -21506,6 +21515,18 @@ var ValidateWriteSchema = z26.object({
21506
21515
  tagDecisions: z26.array(DirectoryTagDecisionSchema).max(20).optional()
21507
21516
  }).strict();
21508
21517
  var CaptureWriteSchema = ValidateWriteSchema.extend({ idempotencyKey: z26.string().trim().min(8).max(200).optional() });
21518
+ function withCanonicalLocalSourcebookUrls(listing) {
21519
+ const category = z26.enum(LOCAL_SOURCEBOOK_CATEGORIES).safeParse(listing.category);
21520
+ const state = typeof listing.state === "string" ? listing.state : "";
21521
+ const listingSlug = typeof listing.slug === "string" ? listing.slug : "";
21522
+ if (!category.success || !state || !listingSlug) return listing;
21523
+ const publicUrls = localSourcebookPublicUrls(category.data, state, listingSlug);
21524
+ return {
21525
+ ...listing,
21526
+ canonicalPaths: { profile: publicUrls.profilePath, reviews: publicUrls.reviewsPath },
21527
+ canonicalUrls: { profile: publicUrls.profileUrl, reviews: publicUrls.reviewsUrl }
21528
+ };
21529
+ }
21509
21530
  function acquisitionPlan(websiteUrl) {
21510
21531
  return {
21511
21532
  website: { startUrl: websiteUrl, mode: "broad_site_crawl", capture: ["homepage", "services", "products", "locations", "service_areas", "about", "team_staff", "contact", "policies"] },
@@ -21639,12 +21660,12 @@ localSourcebookApp.post("/submissions/:id/refresh", createApiKeyAuth(), async (c
21639
21660
  }
21640
21661
  });
21641
21662
  var publicLocalSourcebookApp = new Hono17();
21642
- publicLocalSourcebookApp.get("/", async (c) => c.json({ ok: true, listings: await listAllPublicLocalSourcebook() }));
21643
- publicLocalSourcebookApp.get("/:category", async (c) => c.json({ ok: true, listings: await listAllPublicLocalSourcebook(c.req.param("category")) }));
21644
- publicLocalSourcebookApp.get("/:category/:state", async (c) => c.json({ ok: true, listings: await listPublicLocalSourcebook(c.req.param("category"), c.req.param("state").toLowerCase()) }));
21663
+ publicLocalSourcebookApp.get("/", async (c) => c.json({ ok: true, listings: (await listAllPublicLocalSourcebook()).map(withCanonicalLocalSourcebookUrls) }));
21664
+ publicLocalSourcebookApp.get("/:category", async (c) => c.json({ ok: true, listings: (await listAllPublicLocalSourcebook(c.req.param("category"))).map(withCanonicalLocalSourcebookUrls) }));
21665
+ publicLocalSourcebookApp.get("/:category/:state", async (c) => c.json({ ok: true, listings: (await listPublicLocalSourcebook(c.req.param("category"), c.req.param("state").toLowerCase())).map(withCanonicalLocalSourcebookUrls) }));
21645
21666
  publicLocalSourcebookApp.get("/:category/:state/:slug", async (c) => {
21646
21667
  const listing = await getPublicLocalSourcebook(c.req.param("category"), c.req.param("state").toLowerCase(), c.req.param("slug"));
21647
- return listing ? c.json({ ok: true, listing }) : c.json({ error: "not_found" }, 404);
21668
+ return listing ? c.json({ ok: true, listing: withCanonicalLocalSourcebookUrls(listing) }) : c.json({ error: "not_found" }, 404);
21648
21669
  });
21649
21670
  var adminLocalSourcebookApp = new Hono17();
21650
21671
  adminLocalSourcebookApp.use("*", adminAuth);
@@ -41018,4 +41039,4 @@ app.get("/blog/:slug/", (c) => {
41018
41039
  export {
41019
41040
  app
41020
41041
  };
41021
- //# sourceMappingURL=server-JJLFY46K.js.map
41042
+ //# sourceMappingURL=server-W4JLSNKW.js.map