bluera-knowledge 0.18.0 → 0.18.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/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [0.18.2](https://github.com/blueraai/bluera-knowledge/compare/v0.18.1...v0.18.2) (2026-01-29)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * add tests for tree-sitter unavailable paths and improve coverage ([febde0d](https://github.com/blueraai/bluera-knowledge/commit/febde0d7d6ea89ae928e99b20294a4d3e42f5e29))
11
+ * make tree-sitter optional and use bun for integration tests ([6c50cca](https://github.com/blueraai/bluera-knowledge/commit/6c50cca142020899b7e4758b4026da18466e87b0))
12
+
13
+ ## [0.18.1](https://github.com/blueraai/bluera-knowledge/compare/v0.18.0...v0.18.1) (2026-01-28)
14
+
5
15
  ## [0.18.0](https://github.com/blueraai/bluera-knowledge/compare/v0.17.2...v0.18.0) (2026-01-28)
6
16
 
7
17
 
@@ -4,10 +4,11 @@ import {
4
4
  isDocumentId,
5
5
  isStoreId
6
6
  } from "./chunk-CLIMKLTW.js";
7
+ import "./chunk-DGUM43GV.js";
7
8
  export {
8
9
  createDocumentId,
9
10
  createStoreId,
10
11
  isDocumentId,
11
12
  isStoreId
12
13
  };
13
- //# sourceMappingURL=brands-3EYIYV6T.js.map
14
+ //# sourceMappingURL=brands-XDTIHFNU.js.map
@@ -0,0 +1,11 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
8
+ export {
9
+ __require
10
+ };
11
+ //# sourceMappingURL=chunk-DGUM43GV.js.map
@@ -3,7 +3,7 @@ import {
3
3
  createLogger,
4
4
  summarizePayload,
5
5
  truncateForLog
6
- } from "./chunk-RDDGZIDL.js";
6
+ } from "./chunk-YMSMKOMF.js";
7
7
 
8
8
  // src/crawl/intelligent-crawler.ts
9
9
  import { EventEmitter } from "events";
@@ -837,4 +837,4 @@ export {
837
837
  getCrawlStrategy,
838
838
  IntelligentCrawler
839
839
  };
840
- //# sourceMappingURL=chunk-VUGQ7HAR.js.map
840
+ //# sourceMappingURL=chunk-JSCOGKNU.js.map
@@ -9,7 +9,7 @@ import {
9
9
  isRepoStoreDefinition,
10
10
  isWebStoreDefinition,
11
11
  summarizePayload
12
- } from "./chunk-RDDGZIDL.js";
12
+ } from "./chunk-YMSMKOMF.js";
13
13
 
14
14
  // src/mcp/server.ts
15
15
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -2202,4 +2202,4 @@ export {
2202
2202
  createMCPServer,
2203
2203
  runMCPServer
2204
2204
  };
2205
- //# sourceMappingURL=chunk-EZXJ3W5X.js.map
2205
+ //# sourceMappingURL=chunk-NYRKKRRA.js.map
@@ -5,6 +5,9 @@ import {
5
5
  import {
6
6
  parseIgnorePatternsForScanning
7
7
  } from "./chunk-HXBIIMYL.js";
8
+ import {
9
+ __require
10
+ } from "./chunk-DGUM43GV.js";
8
11
 
9
12
  // src/analysis/adapter-registry.ts
10
13
  var AdapterRegistry = class _AdapterRegistry {
@@ -949,30 +952,58 @@ var CodeGraph = class {
949
952
  };
950
953
 
951
954
  // src/analysis/tree-sitter-parser.ts
952
- import Parser from "tree-sitter";
953
- import Go from "tree-sitter-go";
954
- import Rust from "tree-sitter-rust";
955
+ var TreeSitterParser = null;
956
+ var GoLanguage = null;
957
+ var RustLanguage = null;
958
+ var _initialized = false;
959
+ var _available = false;
960
+ function isTreeSitterAvailable() {
961
+ if (!_initialized) {
962
+ try {
963
+ TreeSitterParser = __require("tree-sitter");
964
+ GoLanguage = __require("tree-sitter-go");
965
+ RustLanguage = __require("tree-sitter-rust");
966
+ _available = true;
967
+ } catch {
968
+ _available = false;
969
+ }
970
+ _initialized = true;
971
+ }
972
+ return _available;
973
+ }
955
974
  function createRustParser() {
956
- const parser = new Parser();
957
- parser.setLanguage(Rust);
975
+ if (!isTreeSitterAvailable() || TreeSitterParser === null || RustLanguage === null) {
976
+ return null;
977
+ }
978
+ const parser = new TreeSitterParser();
979
+ parser.setLanguage(RustLanguage);
958
980
  return parser;
959
981
  }
960
982
  function parseRustCode(code) {
961
983
  try {
962
984
  const parser = createRustParser();
985
+ if (parser === null) {
986
+ return null;
987
+ }
963
988
  return parser.parse(code);
964
989
  } catch {
965
990
  return null;
966
991
  }
967
992
  }
968
993
  function createGoParser() {
969
- const parser = new Parser();
970
- parser.setLanguage(Go);
994
+ if (!isTreeSitterAvailable() || TreeSitterParser === null || GoLanguage === null) {
995
+ return null;
996
+ }
997
+ const parser = new TreeSitterParser();
998
+ parser.setLanguage(GoLanguage);
971
999
  return parser;
972
1000
  }
973
1001
  function parseGoCode(code) {
974
1002
  try {
975
1003
  const parser = createGoParser();
1004
+ if (parser === null) {
1005
+ return null;
1006
+ }
976
1007
  return parser.parse(code);
977
1008
  } catch {
978
1009
  return null;
@@ -2628,7 +2659,7 @@ var DriftService = class {
2628
2659
  const stats = await stat(path4);
2629
2660
  const content = await readFile4(path4);
2630
2661
  const hash = createHash2("md5").update(content).digest("hex");
2631
- const { createDocumentId: createDocumentId2 } = await import("./brands-3EYIYV6T.js");
2662
+ const { createDocumentId: createDocumentId2 } = await import("./brands-XDTIHFNU.js");
2632
2663
  return {
2633
2664
  state: {
2634
2665
  mtime: stats.mtimeMs,
@@ -5976,4 +6007,4 @@ export {
5976
6007
  createServices,
5977
6008
  destroyServices
5978
6009
  };
5979
- //# sourceMappingURL=chunk-RDDGZIDL.js.map
6010
+ //# sourceMappingURL=chunk-YMSMKOMF.js.map