searchsocket 0.3.1 → 0.3.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.
- package/dist/cli.js +4 -3
- package/dist/index.cjs +3 -2
- package/dist/index.js +3 -2
- package/dist/sveltekit.cjs +3 -2
- package/dist/sveltekit.js +3 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -12,7 +12,7 @@ import { Command } from "commander";
|
|
|
12
12
|
// package.json
|
|
13
13
|
var package_default = {
|
|
14
14
|
name: "searchsocket",
|
|
15
|
-
version: "0.3.
|
|
15
|
+
version: "0.3.2",
|
|
16
16
|
description: "Semantic site search and MCP retrieval for SvelteKit static sites",
|
|
17
17
|
license: "MIT",
|
|
18
18
|
author: "Greg Priday <greg@siteorigin.com>",
|
|
@@ -189,7 +189,7 @@ var searchSocketConfigSchema = z.object({
|
|
|
189
189
|
ranking: z.object({
|
|
190
190
|
enableIncomingLinkBoost: z.boolean().optional(),
|
|
191
191
|
enableDepthBoost: z.boolean().optional(),
|
|
192
|
-
pageWeights: z.record(z.string(), z.number().
|
|
192
|
+
pageWeights: z.record(z.string(), z.number().min(0)).optional(),
|
|
193
193
|
aggregationCap: z.number().int().positive().optional(),
|
|
194
194
|
aggregationDecay: z.number().min(0).max(1).optional(),
|
|
195
195
|
minChunkScoreRatio: z.number().min(0).max(1).optional(),
|
|
@@ -1700,7 +1700,7 @@ function extractFromHtml(url, html, config) {
|
|
|
1700
1700
|
const $ = load(html);
|
|
1701
1701
|
const normalizedUrl = normalizeUrlPath(url);
|
|
1702
1702
|
const pageBaseUrl = new URL(`https://searchsocket.local${normalizedUrl}`);
|
|
1703
|
-
const title =
|
|
1703
|
+
const title = $("meta[property='og:title']").attr("content")?.trim() || normalizeText($(`${config.extract.mainSelector} h1`).first().text() || "") || $("meta[name='twitter:title']").attr("content")?.trim() || normalizeText($("title").first().text() || "") || normalizedUrl;
|
|
1704
1704
|
if (config.extract.respectRobotsNoindex) {
|
|
1705
1705
|
const robots = $("meta[name='robots']").attr("content") ?? "";
|
|
1706
1706
|
if (/\bnoindex\b/i.test(robots)) {
|
|
@@ -3010,6 +3010,7 @@ function aggregateByPage(ranked, config) {
|
|
|
3010
3010
|
}
|
|
3011
3011
|
let pageScore = maxScore + aggregationBonus * config.ranking.weights.aggregation;
|
|
3012
3012
|
const pageWeight = findPageWeight(url, config.ranking.pageWeights);
|
|
3013
|
+
if (pageWeight === 0) continue;
|
|
3013
3014
|
if (pageWeight !== 1) {
|
|
3014
3015
|
pageScore *= pageWeight;
|
|
3015
3016
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -16688,7 +16688,7 @@ var searchSocketConfigSchema = zod.z.object({
|
|
|
16688
16688
|
ranking: zod.z.object({
|
|
16689
16689
|
enableIncomingLinkBoost: zod.z.boolean().optional(),
|
|
16690
16690
|
enableDepthBoost: zod.z.boolean().optional(),
|
|
16691
|
-
pageWeights: zod.z.record(zod.z.string(), zod.z.number().
|
|
16691
|
+
pageWeights: zod.z.record(zod.z.string(), zod.z.number().min(0)).optional(),
|
|
16692
16692
|
aggregationCap: zod.z.number().int().positive().optional(),
|
|
16693
16693
|
aggregationDecay: zod.z.number().min(0).max(1).optional(),
|
|
16694
16694
|
minChunkScoreRatio: zod.z.number().min(0).max(1).optional(),
|
|
@@ -19038,7 +19038,7 @@ function extractFromHtml(url, html, config) {
|
|
|
19038
19038
|
const $ = cheerio.load(html);
|
|
19039
19039
|
const normalizedUrl = normalizeUrlPath(url);
|
|
19040
19040
|
const pageBaseUrl = new URL(`https://searchsocket.local${normalizedUrl}`);
|
|
19041
|
-
const title =
|
|
19041
|
+
const title = $("meta[property='og:title']").attr("content")?.trim() || normalizeText($(`${config.extract.mainSelector} h1`).first().text() || "") || $("meta[name='twitter:title']").attr("content")?.trim() || normalizeText($("title").first().text() || "") || normalizedUrl;
|
|
19042
19042
|
if (config.extract.respectRobotsNoindex) {
|
|
19043
19043
|
const robots = $("meta[name='robots']").attr("content") ?? "";
|
|
19044
19044
|
if (/\bnoindex\b/i.test(robots)) {
|
|
@@ -20279,6 +20279,7 @@ function aggregateByPage(ranked, config) {
|
|
|
20279
20279
|
}
|
|
20280
20280
|
let pageScore = maxScore + aggregationBonus * config.ranking.weights.aggregation;
|
|
20281
20281
|
const pageWeight = findPageWeight(url, config.ranking.pageWeights);
|
|
20282
|
+
if (pageWeight === 0) continue;
|
|
20282
20283
|
if (pageWeight !== 1) {
|
|
20283
20284
|
pageScore *= pageWeight;
|
|
20284
20285
|
}
|
package/dist/index.js
CHANGED
|
@@ -16676,7 +16676,7 @@ var searchSocketConfigSchema = z.object({
|
|
|
16676
16676
|
ranking: z.object({
|
|
16677
16677
|
enableIncomingLinkBoost: z.boolean().optional(),
|
|
16678
16678
|
enableDepthBoost: z.boolean().optional(),
|
|
16679
|
-
pageWeights: z.record(z.string(), z.number().
|
|
16679
|
+
pageWeights: z.record(z.string(), z.number().min(0)).optional(),
|
|
16680
16680
|
aggregationCap: z.number().int().positive().optional(),
|
|
16681
16681
|
aggregationDecay: z.number().min(0).max(1).optional(),
|
|
16682
16682
|
minChunkScoreRatio: z.number().min(0).max(1).optional(),
|
|
@@ -19026,7 +19026,7 @@ function extractFromHtml(url, html, config) {
|
|
|
19026
19026
|
const $ = load(html);
|
|
19027
19027
|
const normalizedUrl = normalizeUrlPath(url);
|
|
19028
19028
|
const pageBaseUrl = new URL(`https://searchsocket.local${normalizedUrl}`);
|
|
19029
|
-
const title =
|
|
19029
|
+
const title = $("meta[property='og:title']").attr("content")?.trim() || normalizeText($(`${config.extract.mainSelector} h1`).first().text() || "") || $("meta[name='twitter:title']").attr("content")?.trim() || normalizeText($("title").first().text() || "") || normalizedUrl;
|
|
19030
19030
|
if (config.extract.respectRobotsNoindex) {
|
|
19031
19031
|
const robots = $("meta[name='robots']").attr("content") ?? "";
|
|
19032
19032
|
if (/\bnoindex\b/i.test(robots)) {
|
|
@@ -20267,6 +20267,7 @@ function aggregateByPage(ranked, config) {
|
|
|
20267
20267
|
}
|
|
20268
20268
|
let pageScore = maxScore + aggregationBonus * config.ranking.weights.aggregation;
|
|
20269
20269
|
const pageWeight = findPageWeight(url, config.ranking.pageWeights);
|
|
20270
|
+
if (pageWeight === 0) continue;
|
|
20270
20271
|
if (pageWeight !== 1) {
|
|
20271
20272
|
pageScore *= pageWeight;
|
|
20272
20273
|
}
|
package/dist/sveltekit.cjs
CHANGED
|
@@ -16684,7 +16684,7 @@ var searchSocketConfigSchema = zod.z.object({
|
|
|
16684
16684
|
ranking: zod.z.object({
|
|
16685
16685
|
enableIncomingLinkBoost: zod.z.boolean().optional(),
|
|
16686
16686
|
enableDepthBoost: zod.z.boolean().optional(),
|
|
16687
|
-
pageWeights: zod.z.record(zod.z.string(), zod.z.number().
|
|
16687
|
+
pageWeights: zod.z.record(zod.z.string(), zod.z.number().min(0)).optional(),
|
|
16688
16688
|
aggregationCap: zod.z.number().int().positive().optional(),
|
|
16689
16689
|
aggregationDecay: zod.z.number().min(0).max(1).optional(),
|
|
16690
16690
|
minChunkScoreRatio: zod.z.number().min(0).max(1).optional(),
|
|
@@ -17940,6 +17940,7 @@ function aggregateByPage(ranked, config) {
|
|
|
17940
17940
|
}
|
|
17941
17941
|
let pageScore = maxScore + aggregationBonus * config.ranking.weights.aggregation;
|
|
17942
17942
|
const pageWeight = findPageWeight(url, config.ranking.pageWeights);
|
|
17943
|
+
if (pageWeight === 0) continue;
|
|
17943
17944
|
if (pageWeight !== 1) {
|
|
17944
17945
|
pageScore *= pageWeight;
|
|
17945
17946
|
}
|
|
@@ -19580,7 +19581,7 @@ function extractFromHtml(url, html, config) {
|
|
|
19580
19581
|
const $ = cheerio.load(html);
|
|
19581
19582
|
const normalizedUrl = normalizeUrlPath(url);
|
|
19582
19583
|
const pageBaseUrl = new URL(`https://searchsocket.local${normalizedUrl}`);
|
|
19583
|
-
const title =
|
|
19584
|
+
const title = $("meta[property='og:title']").attr("content")?.trim() || normalizeText($(`${config.extract.mainSelector} h1`).first().text() || "") || $("meta[name='twitter:title']").attr("content")?.trim() || normalizeText($("title").first().text() || "") || normalizedUrl;
|
|
19584
19585
|
if (config.extract.respectRobotsNoindex) {
|
|
19585
19586
|
const robots = $("meta[name='robots']").attr("content") ?? "";
|
|
19586
19587
|
if (/\bnoindex\b/i.test(robots)) {
|
package/dist/sveltekit.js
CHANGED
|
@@ -16672,7 +16672,7 @@ var searchSocketConfigSchema = z.object({
|
|
|
16672
16672
|
ranking: z.object({
|
|
16673
16673
|
enableIncomingLinkBoost: z.boolean().optional(),
|
|
16674
16674
|
enableDepthBoost: z.boolean().optional(),
|
|
16675
|
-
pageWeights: z.record(z.string(), z.number().
|
|
16675
|
+
pageWeights: z.record(z.string(), z.number().min(0)).optional(),
|
|
16676
16676
|
aggregationCap: z.number().int().positive().optional(),
|
|
16677
16677
|
aggregationDecay: z.number().min(0).max(1).optional(),
|
|
16678
16678
|
minChunkScoreRatio: z.number().min(0).max(1).optional(),
|
|
@@ -17928,6 +17928,7 @@ function aggregateByPage(ranked, config) {
|
|
|
17928
17928
|
}
|
|
17929
17929
|
let pageScore = maxScore + aggregationBonus * config.ranking.weights.aggregation;
|
|
17930
17930
|
const pageWeight = findPageWeight(url, config.ranking.pageWeights);
|
|
17931
|
+
if (pageWeight === 0) continue;
|
|
17931
17932
|
if (pageWeight !== 1) {
|
|
17932
17933
|
pageScore *= pageWeight;
|
|
17933
17934
|
}
|
|
@@ -19568,7 +19569,7 @@ function extractFromHtml(url, html, config) {
|
|
|
19568
19569
|
const $ = load(html);
|
|
19569
19570
|
const normalizedUrl = normalizeUrlPath(url);
|
|
19570
19571
|
const pageBaseUrl = new URL(`https://searchsocket.local${normalizedUrl}`);
|
|
19571
|
-
const title =
|
|
19572
|
+
const title = $("meta[property='og:title']").attr("content")?.trim() || normalizeText($(`${config.extract.mainSelector} h1`).first().text() || "") || $("meta[name='twitter:title']").attr("content")?.trim() || normalizeText($("title").first().text() || "") || normalizedUrl;
|
|
19572
19573
|
if (config.extract.respectRobotsNoindex) {
|
|
19573
19574
|
const robots = $("meta[name='robots']").attr("content") ?? "";
|
|
19574
19575
|
if (/\bnoindex\b/i.test(robots)) {
|