mcp-scraper 0.88.2 → 0.89.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 +36 -15
- package/README.md +6 -5
- package/THIRD_PARTY_NOTICES.html +203 -0
- package/dist/analytics-repository-2BMT5JNE.js +1 -0
- package/dist/bin/api-server.js +2 -41
- package/dist/bin/mcp-scraper-cli.js +39 -756
- package/dist/bin/mcp-scraper-core.js +1 -60
- package/dist/bin/mcp-scraper-install.js +2 -25
- package/dist/bin/mcp-stdio-server.js +1 -19
- package/dist/bin/paa-harvest.js +1 -41
- package/dist/chunk-3GP5CYZX.js +1 -0
- package/dist/chunk-4AI7DOS7.js +59 -0
- package/dist/chunk-4FROKQJN.js +1 -0
- package/dist/chunk-7YGVI5J4.js +21710 -0
- package/dist/chunk-CCYWSJNG.js +16 -0
- package/dist/chunk-CFI6CXIV.js +182 -0
- package/dist/chunk-E2WRWV3A.js +1 -0
- package/dist/chunk-GMWKPIYX.js +1172 -0
- package/dist/chunk-HDPYG3XV.js +102 -0
- package/dist/chunk-HE45FFBU.js +1 -0
- package/dist/chunk-HUV2WTRW.js +1 -0
- package/dist/chunk-KJQXUZ4Y.js +4 -0
- package/dist/chunk-L4CGLFPU.js +4 -0
- package/dist/chunk-M22MM4N4.js +84 -0
- package/dist/chunk-MASR22K4.js +73 -0
- package/dist/chunk-MZN4U5BL.js +1 -0
- package/dist/chunk-PUHFVA7P.js +1280 -0
- package/dist/chunk-QPWPR5XG.js +10 -0
- package/dist/chunk-TMB56NCA.js +1 -0
- package/dist/chunk-TXENITMS.js +20 -0
- package/dist/chunk-W2BVJ7S2.js +13 -0
- package/dist/chunk-WO3N5FH2.js +5 -0
- package/dist/chunk-WSCGYRWA.js +2595 -0
- package/dist/chunk-X54CQLK2.js +1 -0
- package/dist/chunk-XLWNEVUZ.js +27 -0
- package/dist/chunk-XPZVJIZ2.js +100 -0
- package/dist/chunk-YQZGZBB4.js +1 -0
- package/dist/chunk-Z2QGQJS2.js +1 -0
- package/dist/db-F2MX63GI.js +1 -0
- package/dist/extract-bundle-SNUIHM3J.js +26 -0
- package/dist/gmail-service-BZ3H75XC.js +1 -0
- package/dist/index.cjs +21750 -6045
- package/dist/index.d.cts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.js +18 -315
- package/dist/lead-list-enrichment-repository-S2H3U7T7.js +1 -0
- package/dist/location-data-repository-OTWHWMV6.js +1 -0
- package/dist/server-RFR2A5UJ.js +7303 -0
- package/dist/site-extract-repository-SE776XDC.js +1 -0
- package/dist/worker-XUDSM3AL.js +1 -0
- package/package.json +17 -124
- package/dist/analytics-repository-GGJJCVVP.js +0 -194
- package/dist/chunk-4QMUF6XM.js +0 -1013
- package/dist/chunk-6HAV7LCE.js +0 -265
- package/dist/chunk-ABF2CGOZ.js +0 -113
- package/dist/chunk-C5Z4OFKW.js +0 -404
- package/dist/chunk-DNM65UCK.js +0 -299
- package/dist/chunk-EQGTEHLZ.js +0 -592
- package/dist/chunk-F5GQJWZU.js +0 -732
- package/dist/chunk-GGZEC22A.js +0 -215
- package/dist/chunk-GXBZXWXB.js +0 -184
- package/dist/chunk-IHXAXYIS.js +0 -843
- package/dist/chunk-K3Z5AQYE.js +0 -683
- package/dist/chunk-K45K75OF.js +0 -6
- package/dist/chunk-LFW2FRPJ.js +0 -224
- package/dist/chunk-MZDNZQWT.js +0 -2078
- package/dist/chunk-NVUKO5NN.js +0 -256
- package/dist/chunk-OM7HVEJ3.js +0 -26
- package/dist/chunk-OPQIGAFB.js +0 -286
- package/dist/chunk-OZJMVCDK.js +0 -16
- package/dist/chunk-P7FWOMU7.js +0 -505
- package/dist/chunk-PGJQDMC2.js +0 -383
- package/dist/chunk-PKZS6SHW.js +0 -33139
- package/dist/chunk-RJ7JVYKU.js +0 -68
- package/dist/chunk-S24LFPL7.js +0 -5262
- package/dist/chunk-T3MZISOF.js +0 -240
- package/dist/chunk-UZPTGUDV.js +0 -1915
- package/dist/chunk-X623GTBV.js +0 -8290
- package/dist/chunk-YXNDOQXN.js +0 -4018
- package/dist/db-Z34LPZNR.js +0 -284
- package/dist/extract-bundle-565SBZCR.js +0 -1003
- package/dist/gmail-service-E6ALS7JG.js +0 -25
- package/dist/lead-list-enrichment-repository-36RPVV6N.js +0 -67
- package/dist/location-data-repository-WPRG62GE.js +0 -34
- package/dist/server-SQZ3A7SY.js +0 -86606
- package/dist/site-extract-repository-VYFZASPU.js +0 -69
- package/dist/worker-LDCAULWL.js +0 -146
package/dist/chunk-RJ7JVYKU.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// src/directory/csv.ts
|
|
2
|
-
function parseCsv(text) {
|
|
3
|
-
const rows = [];
|
|
4
|
-
let row = [];
|
|
5
|
-
let field = "";
|
|
6
|
-
let quoted = false;
|
|
7
|
-
for (let i = 0; i < text.length; i += 1) {
|
|
8
|
-
const ch = text[i];
|
|
9
|
-
const next = text[i + 1];
|
|
10
|
-
if (quoted) {
|
|
11
|
-
if (ch === '"' && next === '"') {
|
|
12
|
-
field += '"';
|
|
13
|
-
i += 1;
|
|
14
|
-
} else if (ch === '"') {
|
|
15
|
-
quoted = false;
|
|
16
|
-
} else {
|
|
17
|
-
field += ch;
|
|
18
|
-
}
|
|
19
|
-
continue;
|
|
20
|
-
}
|
|
21
|
-
if (ch === '"') {
|
|
22
|
-
quoted = true;
|
|
23
|
-
} else if (ch === ",") {
|
|
24
|
-
row.push(field);
|
|
25
|
-
field = "";
|
|
26
|
-
} else if (ch === "\n") {
|
|
27
|
-
row.push(field);
|
|
28
|
-
rows.push(row);
|
|
29
|
-
row = [];
|
|
30
|
-
field = "";
|
|
31
|
-
} else if (ch !== "\r") {
|
|
32
|
-
field += ch;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (field.length > 0 || row.length > 0) {
|
|
36
|
-
row.push(field);
|
|
37
|
-
rows.push(row);
|
|
38
|
-
}
|
|
39
|
-
return rows;
|
|
40
|
-
}
|
|
41
|
-
function csvRecords(text) {
|
|
42
|
-
const rows = parseCsv(text).filter((row) => row.some((cell) => cell.trim() !== ""));
|
|
43
|
-
const header = rows[0]?.map((cell) => cell.trim()) ?? [];
|
|
44
|
-
return rows.slice(1).map((row) => {
|
|
45
|
-
const record = {};
|
|
46
|
-
for (let i = 0; i < header.length; i += 1) {
|
|
47
|
-
record[header[i]] = row[i] ?? "";
|
|
48
|
-
}
|
|
49
|
-
return record;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function csvCell(value) {
|
|
53
|
-
if (value === null || value === void 0) return "";
|
|
54
|
-
const text = String(value);
|
|
55
|
-
return /[",\n\r]/.test(text) ? `"${text.replace(/"/g, '""')}"` : text;
|
|
56
|
-
}
|
|
57
|
-
function rowsToCsv(headers, rows) {
|
|
58
|
-
return [
|
|
59
|
-
headers.join(","),
|
|
60
|
-
...rows.map((row) => headers.map((header) => csvCell(row[header])).join(","))
|
|
61
|
-
].join("\n") + "\n";
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export {
|
|
65
|
-
parseCsv,
|
|
66
|
-
csvRecords,
|
|
67
|
-
rowsToCsv
|
|
68
|
-
};
|