@clarify-labs/cli 0.11.1 → 0.11.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.
@@ -18,6 +18,7 @@ import { createReadStream, existsSync, mkdirSync, mkdtempSync, readFileSync, rea
18
18
  import { build, loadConfigFromFile } from "vite";
19
19
  import { z } from "zod";
20
20
  import { stringify } from "yaml";
21
+ import { createHash } from "node:crypto";
21
22
  import { decode, encode } from "@msgpack/msgpack";
22
23
  import { create, insertMultiple, load, save, search } from "@orama/orama";
23
24
  import { fileURLToPath, pathToFileURL } from "node:url";
@@ -1556,7 +1557,7 @@ function createViteAdapter(engine) {
1556
1557
  }
1557
1558
  var cliPackageVersion = {
1558
1559
  name: "@clarify-labs/cli",
1559
- version: "0.11.1",
1560
+ version: "0.11.2",
1560
1561
  license: "AGPL-3.0-only",
1561
1562
  type: "module",
1562
1563
  repository: {
@@ -1929,6 +1930,7 @@ function createMcpSiteConfig(projectConfig, options) {
1929
1930
  capabilities: { search: {
1930
1931
  type: "search",
1931
1932
  indexPath: `${prefix}/mcp-search.msp`,
1933
+ indexHash: options.indexHash,
1932
1934
  defaultLocale: projectConfig.locales?.default,
1933
1935
  documentCount: options.documentCount,
1934
1936
  locales: options.locales
@@ -2222,13 +2224,16 @@ function createMcpSearchPlugin() {
2222
2224
  const defaultLocale = ctx.projectConfig.locales?.default;
2223
2225
  const { db, documentCount } = buildSearchIndex(ctx.routes, defaultLocale);
2224
2226
  const locales = collectIndexedLocales(ctx.routes, defaultLocale);
2227
+ const indexBytes = serializeSearchIndex(db);
2228
+ const indexHash = createHash("sha256").update(indexBytes).digest("hex");
2225
2229
  const mcpConfig = createMcpSiteConfig(ctx.projectConfig, {
2226
2230
  documentCount,
2227
- locales
2231
+ locales,
2232
+ indexHash
2228
2233
  });
2229
2234
  const assets = [{
2230
2235
  fileName: `${mcpConfig.capabilities.search?.indexPath.replace(/\/mcp-search\.msp$/, "") ?? ""}/mcp-search.msp`.replace(/^\//, ""),
2231
- source: serializeSearchIndex(db)
2236
+ source: indexBytes
2232
2237
  }, {
2233
2238
  fileName: "mcp.json",
2234
2239
  source: `${JSON.stringify(mcpConfig, null, 2)}\n`
@@ -3761,4 +3766,4 @@ function createClarifyEngine(options = {}) {
3761
3766
  //#endregion
3762
3767
  export { deserializeSearchIndex as a, cliPackageVersionWithCaret as c, createClarifyTempDir as i, createViteAdapter as l, createClarifyEngine as n, searchMcpIndex as o, createClarifyRuntimeAliases as r, cliPackageVersion as s, ClarifyEngine as t, defineConfig as u };
3763
3768
 
3764
- //# sourceMappingURL=engine-CxnKEKv8.js.map
3769
+ //# sourceMappingURL=engine-DI8Nd3v0.js.map