@cdxgen/cdxgen 13.0.1 → 13.2.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.
Files changed (286) hide show
  1. package/README.md +30 -16
  2. package/bin/audit.js +6 -0
  3. package/bin/cdxgen.js +141 -7
  4. package/bin/evinse.js +3 -1
  5. package/data/component-tags.json +8 -1
  6. package/data/crypto-oid.json +88 -12
  7. package/data/frameworks-list.json +86 -1
  8. package/data/remediations.json +1167 -0
  9. package/data/rules/ai-bom.yaml +78 -0
  10. package/data/rules/asar-archives.yaml +1 -1
  11. package/data/rules/build-fidelity.yaml +782 -0
  12. package/data/rules/cargo-rust.yaml +132 -0
  13. package/data/rules/mcp-servers.yaml +122 -0
  14. package/data/rules/package-integrity.yaml +13 -13
  15. package/lib/audit/index.js +48 -4
  16. package/lib/audit/scoring.js +2 -8
  17. package/lib/audit/targets.js +6 -1
  18. package/lib/cli/bomAssembly.js +32 -1
  19. package/lib/cli/cliOptions.js +94 -7
  20. package/lib/cli/index.js +268 -49
  21. package/lib/cli/jsBom.js +91 -5
  22. package/lib/cli/jvmBom.js +1515 -1314
  23. package/lib/cli/managedBom.js +249 -28
  24. package/lib/cli/nativeBom.js +986 -10
  25. package/lib/core/activity.js +120 -2
  26. package/lib/core/buildLedger.js +799 -0
  27. package/lib/core/deferredExit.js +141 -0
  28. package/lib/core/env.js +108 -2
  29. package/lib/core/fs.js +60 -0
  30. package/lib/core/logger.js +12 -99
  31. package/lib/core/severity.js +16 -0
  32. package/lib/core/syncFileWriter.js +106 -0
  33. package/lib/core/userAgent.js +151 -0
  34. package/lib/ecosystems/cargoCache.js +364 -0
  35. package/lib/ecosystems/caxa.js +13 -5
  36. package/lib/ecosystems/cppEvidence.js +40 -2
  37. package/lib/ecosystems/ecosystems.js +250 -91
  38. package/lib/ecosystems/golem.js +11 -1
  39. package/lib/ecosystems/gradleutils.js +498 -17
  40. package/lib/ecosystems/kosi.js +1256 -0
  41. package/lib/ecosystems/parsers-crystal.js +179 -0
  42. package/lib/ecosystems/parsers-dotnet.js +69 -39
  43. package/lib/ecosystems/parsers-elm.js +816 -0
  44. package/lib/ecosystems/parsers-gleam.js +1 -1
  45. package/lib/ecosystems/parsers-js.js +26 -0
  46. package/lib/ecosystems/parsers-julia.js +268 -0
  47. package/lib/ecosystems/parsers-jvm.js +9 -0
  48. package/lib/ecosystems/parsers-lua.js +218 -0
  49. package/lib/ecosystems/parsers-misc.js +188 -2
  50. package/lib/ecosystems/parsers-nim.js +221 -0
  51. package/lib/ecosystems/parsers-opam.js +180 -0
  52. package/lib/ecosystems/parsers-perl.js +277 -0
  53. package/lib/ecosystems/parsers-python.js +172 -36
  54. package/lib/ecosystems/parsers-r.js +148 -0
  55. package/lib/ecosystems/parsers-rebar.js +411 -0
  56. package/lib/ecosystems/parsers-rust.js +944 -19
  57. package/lib/ecosystems/parsers-spack.js +204 -0
  58. package/lib/ecosystems/parsers-stack.js +264 -0
  59. package/lib/ecosystems/parsers-terraform.js +194 -0
  60. package/lib/ecosystems/pypiClassifiers.js +326 -0
  61. package/lib/ecosystems/pythonutils.js +49 -1
  62. package/lib/ecosystems/rubyutils.js +13 -0
  63. package/lib/ecosystems/rusi.js +126 -6
  64. package/lib/evinser/evinser.js +141 -13
  65. package/lib/helpers/agenticToolutils.js +925 -0
  66. package/lib/helpers/remote/dependency-track.js +81 -14
  67. package/lib/inventory/agentFormulationParser.js +57 -4
  68. package/lib/inventory/aiCollector.js +504 -10
  69. package/lib/inventory/aiInventory.js +12 -0
  70. package/lib/inventory/analyzer.js +488 -30
  71. package/lib/inventory/astWorker.js +6 -0
  72. package/lib/inventory/auditCategories.js +17 -0
  73. package/lib/inventory/cbomutils.js +30 -0
  74. package/lib/inventory/cdxrs.js +7 -2
  75. package/lib/inventory/communityAiConfigParser.js +215 -2
  76. package/lib/inventory/depsUtils.js +72 -0
  77. package/lib/inventory/dosai.js +508 -22
  78. package/lib/inventory/envcontext.js +215 -24
  79. package/lib/inventory/evidenceUtils.js +13 -0
  80. package/lib/inventory/fetchBatch.js +131 -2
  81. package/lib/inventory/fetchRate.js +74 -11
  82. package/lib/inventory/forgeEnricher.js +3 -2
  83. package/lib/inventory/jvmToolEnv.js +594 -0
  84. package/lib/inventory/mcpConfigParser.js +166 -2
  85. package/lib/inventory/mcpDiscovery.js +11 -0
  86. package/lib/inventory/mcpServerManifest.js +389 -0
  87. package/lib/inventory/mcpbBundle.js +419 -0
  88. package/lib/inventory/osinfo.js +1 -0
  89. package/lib/inventory/plugins.js +3 -0
  90. package/lib/inventory/protobom.js +54 -88
  91. package/lib/inventory/protobomLoader.js +4 -0
  92. package/lib/inventory/rustFormulationParser.js +1 -1
  93. package/lib/inventory/source.js +10 -4
  94. package/lib/inventory/stylePackageRefs.js +41 -0
  95. package/lib/inventory/svelteUtils.js +524 -0
  96. package/lib/inventory/toolRequirements.js +903 -0
  97. package/lib/managers/binary.js +24 -0
  98. package/lib/managers/docker.js +26 -5
  99. package/lib/parsers/huggingfaceUtils.js +15 -7
  100. package/lib/parsers/onnx.js +294 -0
  101. package/lib/parsers/safetensors.js +114 -0
  102. package/lib/server/server.js +1 -1
  103. package/lib/stages/postgen/annotationBuilder.js +97 -0
  104. package/lib/stages/postgen/auditBom.js +76 -79
  105. package/lib/stages/postgen/introspection/annotate.js +320 -0
  106. package/lib/stages/postgen/introspection/commandFacts.js +293 -0
  107. package/lib/stages/postgen/introspection/emit.js +192 -0
  108. package/lib/stages/postgen/introspection/formulationEvidence.js +427 -0
  109. package/lib/stages/postgen/introspection/markers.js +250 -0
  110. package/lib/stages/postgen/introspection/reflect.js +1214 -0
  111. package/lib/stages/postgen/introspection/report.js +1208 -0
  112. package/lib/stages/postgen/introspection/score.js +1067 -0
  113. package/lib/stages/postgen/introspection/shapeCommand.js +304 -0
  114. package/lib/stages/postgen/parentEdge.js +156 -0
  115. package/lib/stages/postgen/postgen.js +284 -3
  116. package/lib/stages/postgen/ruleEngine.js +17 -0
  117. package/lib/stages/pregen/envAudit.js +42 -2
  118. package/lib/stages/pregen/pregen.js +1171 -6
  119. package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +462 -0
  120. package/lib/validator/bomValidator.js +11 -2
  121. package/package.json +26 -26
  122. package/types/lib/audit/index.d.ts.map +1 -1
  123. package/types/lib/audit/scoring.d.ts +2 -8
  124. package/types/lib/audit/scoring.d.ts.map +1 -1
  125. package/types/lib/audit/targets.d.ts.map +1 -1
  126. package/types/lib/cli/bomAssembly.d.ts.map +1 -1
  127. package/types/lib/cli/cliOptions.d.ts +2 -1
  128. package/types/lib/cli/cliOptions.d.ts.map +1 -1
  129. package/types/lib/cli/index.d.ts +10 -2
  130. package/types/lib/cli/index.d.ts.map +1 -1
  131. package/types/lib/cli/jsBom.d.ts +23 -0
  132. package/types/lib/cli/jsBom.d.ts.map +1 -1
  133. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  134. package/types/lib/cli/managedBom.d.ts +33 -0
  135. package/types/lib/cli/managedBom.d.ts.map +1 -1
  136. package/types/lib/cli/nativeBom.d.ts +88 -8
  137. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  138. package/types/lib/core/activity.d.ts.map +1 -1
  139. package/types/lib/core/buildLedger.d.ts +272 -0
  140. package/types/lib/core/buildLedger.d.ts.map +1 -0
  141. package/types/lib/core/deferredExit.d.ts +84 -0
  142. package/types/lib/core/deferredExit.d.ts.map +1 -0
  143. package/types/lib/core/env.d.ts +43 -1
  144. package/types/lib/core/env.d.ts.map +1 -1
  145. package/types/lib/core/fs.d.ts +21 -0
  146. package/types/lib/core/fs.d.ts.map +1 -1
  147. package/types/lib/core/logger.d.ts +2 -11
  148. package/types/lib/core/logger.d.ts.map +1 -1
  149. package/types/lib/core/severity.d.ts +11 -0
  150. package/types/lib/core/severity.d.ts.map +1 -0
  151. package/types/lib/core/syncFileWriter.d.ts +33 -0
  152. package/types/lib/core/syncFileWriter.d.ts.map +1 -0
  153. package/types/lib/core/userAgent.d.ts +56 -0
  154. package/types/lib/core/userAgent.d.ts.map +1 -0
  155. package/types/lib/ecosystems/cargoCache.d.ts +75 -0
  156. package/types/lib/ecosystems/cargoCache.d.ts.map +1 -0
  157. package/types/lib/ecosystems/caxa.d.ts.map +1 -1
  158. package/types/lib/ecosystems/cppEvidence.d.ts +1 -1
  159. package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
  160. package/types/lib/ecosystems/ecosystems.d.ts +15 -1
  161. package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
  162. package/types/lib/ecosystems/gradleutils.d.ts +53 -0
  163. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  164. package/types/lib/ecosystems/kosi.d.ts +73 -0
  165. package/types/lib/ecosystems/kosi.d.ts.map +1 -0
  166. package/types/lib/ecosystems/parsers-crystal.d.ts +27 -0
  167. package/types/lib/ecosystems/parsers-crystal.d.ts.map +1 -0
  168. package/types/lib/ecosystems/parsers-dotnet.d.ts +19 -0
  169. package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
  170. package/types/lib/ecosystems/parsers-elm.d.ts +79 -0
  171. package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -0
  172. package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
  173. package/types/lib/ecosystems/parsers-julia.d.ts +57 -0
  174. package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -0
  175. package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
  176. package/types/lib/ecosystems/parsers-lua.d.ts +50 -0
  177. package/types/lib/ecosystems/parsers-lua.d.ts.map +1 -0
  178. package/types/lib/ecosystems/parsers-misc.d.ts +23 -0
  179. package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
  180. package/types/lib/ecosystems/parsers-nim.d.ts +43 -0
  181. package/types/lib/ecosystems/parsers-nim.d.ts.map +1 -0
  182. package/types/lib/ecosystems/parsers-opam.d.ts +31 -0
  183. package/types/lib/ecosystems/parsers-opam.d.ts.map +1 -0
  184. package/types/lib/ecosystems/parsers-perl.d.ts +36 -0
  185. package/types/lib/ecosystems/parsers-perl.d.ts.map +1 -0
  186. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  187. package/types/lib/ecosystems/parsers-r.d.ts +35 -0
  188. package/types/lib/ecosystems/parsers-r.d.ts.map +1 -0
  189. package/types/lib/ecosystems/parsers-rebar.d.ts +42 -0
  190. package/types/lib/ecosystems/parsers-rebar.d.ts.map +1 -0
  191. package/types/lib/ecosystems/parsers-rust.d.ts +199 -0
  192. package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
  193. package/types/lib/ecosystems/parsers-spack.d.ts +33 -0
  194. package/types/lib/ecosystems/parsers-spack.d.ts.map +1 -0
  195. package/types/lib/ecosystems/parsers-stack.d.ts +35 -0
  196. package/types/lib/ecosystems/parsers-stack.d.ts.map +1 -0
  197. package/types/lib/ecosystems/parsers-terraform.d.ts +34 -0
  198. package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -0
  199. package/types/lib/ecosystems/pypiClassifiers.d.ts +80 -0
  200. package/types/lib/ecosystems/pypiClassifiers.d.ts.map +1 -0
  201. package/types/lib/ecosystems/pythonutils.d.ts +21 -1
  202. package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
  203. package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
  204. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  205. package/types/lib/evinser/evinser.d.ts +34 -1
  206. package/types/lib/evinser/evinser.d.ts.map +1 -1
  207. package/types/lib/helpers/agenticToolutils.d.ts +87 -0
  208. package/types/lib/helpers/agenticToolutils.d.ts.map +1 -0
  209. package/types/lib/helpers/remote/dependency-track.d.ts +45 -4
  210. package/types/lib/helpers/remote/dependency-track.d.ts.map +1 -1
  211. package/types/lib/inventory/agentFormulationParser.d.ts.map +1 -1
  212. package/types/lib/inventory/aiCollector.d.ts.map +1 -1
  213. package/types/lib/inventory/aiInventory.d.ts.map +1 -1
  214. package/types/lib/inventory/analyzer.d.ts.map +1 -1
  215. package/types/lib/inventory/auditCategories.d.ts +12 -0
  216. package/types/lib/inventory/auditCategories.d.ts.map +1 -1
  217. package/types/lib/inventory/cbomutils.d.ts.map +1 -1
  218. package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
  219. package/types/lib/inventory/depsUtils.d.ts.map +1 -1
  220. package/types/lib/inventory/dosai.d.ts +43 -0
  221. package/types/lib/inventory/dosai.d.ts.map +1 -1
  222. package/types/lib/inventory/envcontext.d.ts.map +1 -1
  223. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  224. package/types/lib/inventory/fetchBatch.d.ts +43 -0
  225. package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
  226. package/types/lib/inventory/fetchRate.d.ts +9 -6
  227. package/types/lib/inventory/fetchRate.d.ts.map +1 -1
  228. package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
  229. package/types/lib/inventory/jvmToolEnv.d.ts +190 -0
  230. package/types/lib/inventory/jvmToolEnv.d.ts.map +1 -0
  231. package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
  232. package/types/lib/inventory/mcpDiscovery.d.ts.map +1 -1
  233. package/types/lib/inventory/mcpServerManifest.d.ts +19 -0
  234. package/types/lib/inventory/mcpServerManifest.d.ts.map +1 -0
  235. package/types/lib/inventory/mcpbBundle.d.ts +19 -0
  236. package/types/lib/inventory/mcpbBundle.d.ts.map +1 -0
  237. package/types/lib/inventory/osinfo.d.ts.map +1 -1
  238. package/types/lib/inventory/plugins.d.ts.map +1 -1
  239. package/types/lib/inventory/protobom.d.ts +18 -13
  240. package/types/lib/inventory/protobom.d.ts.map +1 -1
  241. package/types/lib/inventory/protobomLoader.d.ts.map +1 -1
  242. package/types/lib/inventory/source.d.ts.map +1 -1
  243. package/types/lib/inventory/stylePackageRefs.d.ts +17 -0
  244. package/types/lib/inventory/stylePackageRefs.d.ts.map +1 -0
  245. package/types/lib/inventory/svelteUtils.d.ts +124 -0
  246. package/types/lib/inventory/svelteUtils.d.ts.map +1 -0
  247. package/types/lib/inventory/toolRequirements.d.ts +216 -0
  248. package/types/lib/inventory/toolRequirements.d.ts.map +1 -0
  249. package/types/lib/managers/binary.d.ts.map +1 -1
  250. package/types/lib/managers/docker.d.ts.map +1 -1
  251. package/types/lib/parsers/huggingfaceUtils.d.ts +8 -1
  252. package/types/lib/parsers/huggingfaceUtils.d.ts.map +1 -1
  253. package/types/lib/parsers/onnx.d.ts +28 -0
  254. package/types/lib/parsers/onnx.d.ts.map +1 -0
  255. package/types/lib/parsers/safetensors.d.ts +22 -0
  256. package/types/lib/parsers/safetensors.d.ts.map +1 -0
  257. package/types/lib/stages/postgen/annotationBuilder.d.ts +53 -0
  258. package/types/lib/stages/postgen/annotationBuilder.d.ts.map +1 -0
  259. package/types/lib/stages/postgen/auditBom.d.ts.map +1 -1
  260. package/types/lib/stages/postgen/introspection/annotate.d.ts +81 -0
  261. package/types/lib/stages/postgen/introspection/annotate.d.ts.map +1 -0
  262. package/types/lib/stages/postgen/introspection/commandFacts.d.ts +32 -0
  263. package/types/lib/stages/postgen/introspection/commandFacts.d.ts.map +1 -0
  264. package/types/lib/stages/postgen/introspection/emit.d.ts +71 -0
  265. package/types/lib/stages/postgen/introspection/emit.d.ts.map +1 -0
  266. package/types/lib/stages/postgen/introspection/formulationEvidence.d.ts +154 -0
  267. package/types/lib/stages/postgen/introspection/formulationEvidence.d.ts.map +1 -0
  268. package/types/lib/stages/postgen/introspection/markers.d.ts +58 -0
  269. package/types/lib/stages/postgen/introspection/markers.d.ts.map +1 -0
  270. package/types/lib/stages/postgen/introspection/reflect.d.ts +77 -0
  271. package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -0
  272. package/types/lib/stages/postgen/introspection/report.d.ts +85 -0
  273. package/types/lib/stages/postgen/introspection/report.d.ts.map +1 -0
  274. package/types/lib/stages/postgen/introspection/score.d.ts +149 -0
  275. package/types/lib/stages/postgen/introspection/score.d.ts.map +1 -0
  276. package/types/lib/stages/postgen/introspection/shapeCommand.d.ts +79 -0
  277. package/types/lib/stages/postgen/introspection/shapeCommand.d.ts.map +1 -0
  278. package/types/lib/stages/postgen/parentEdge.d.ts +35 -0
  279. package/types/lib/stages/postgen/parentEdge.d.ts.map +1 -0
  280. package/types/lib/stages/postgen/postgen.d.ts +35 -2
  281. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  282. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  283. package/types/lib/stages/pregen/envAudit.d.ts.map +1 -1
  284. package/types/lib/stages/pregen/pregen.d.ts +131 -0
  285. package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
  286. package/types/lib/validator/bomValidator.d.ts.map +1 -1
@@ -0,0 +1,190 @@
1
+ import { compareVersions, extractJavaMajor, isPrereleaseVersion } from "./toolRequirements.js";
2
+ /**
3
+ * The general-purpose version comparator, prerelease classifier, and JDK
4
+ * major extractor live in `toolRequirements.js` so every ecosystem shares one
5
+ * comparator; they are re-exported here under the names this module's
6
+ * consumers already use.
7
+ */
8
+ export { compareVersions as compareSdkmanVersions, extractJavaMajor, isPrereleaseVersion, };
9
+ /**
10
+ * Anchored validator for sdkman version identifiers such as `3.9.9`,
11
+ * `4.0.0-rc-5`, `8.14`, `21.0.7-tem`, or `26.0.2+1.1-tem`. Versions are
12
+ * interpolated into a shell command by the sdkman installer, so every
13
+ * identifier must be a single safe token: it must start with a digit and may
14
+ * only contain digits, ascii letters, dots, hyphens, and plus signs (`+` has
15
+ * no shell meaning and sdkman uses it in Temurin respin identifiers).
16
+ *
17
+ * Every separator must be followed by at least one alphanumeric character, and
18
+ * a single repeated group covers both the dotted numeric part and the vendor
19
+ * or prerelease suffix. That leaves each character exactly one role, so the
20
+ * pattern matches in linear time on untrusted input.
21
+ *
22
+ * @param {string} version Candidate version identifier
23
+ * @returns {boolean} True when the identifier is safe to pass to sdkman
24
+ */
25
+ export declare function isValidSdkmanVersion(version: string): boolean;
26
+ /**
27
+ * Parse a versioned JVM build tool project type such as `maven3.9.9`,
28
+ * `mvn3.9.9`, `gradle8.14`, `sbt1.10`, or `scala3.6.4` into its sdkman
29
+ * candidate name and version token.
30
+ *
31
+ * The returned object distinguishes between a syntactically valid pin and a
32
+ * rejected one so callers can print a precise CLI error instead of silently
33
+ * ignoring the type.
34
+ *
35
+ * @param {string} projectType Project type argument from the CLI
36
+ * @returns {Object|undefined} `{ tool, version, valid }` when the type looks
37
+ * like a versioned JVM build tool, `undefined` otherwise. `valid` is false
38
+ * when the version token fails validation.
39
+ */
40
+ export declare function parseJvmToolProjectType(projectType: string): Object | undefined;
41
+ /**
42
+ * Parse a `.sdkmanrc` environment file into the sdkman candidates it pins.
43
+ * Only the JVM-related candidates cdxgen knows how to provision are kept;
44
+ * unknown keys are ignored so newer sdkman files remain readable. Malformed
45
+ * lines are skipped instead of aborting the whole file.
46
+ *
47
+ * @param {string} filePath Project directory that may contain a `.sdkmanrc`
48
+ * @returns {Object|undefined} Map of candidate name to exact version
49
+ * identifier, or `undefined` when the file is missing or unreadable.
50
+ */
51
+ export declare function parseSdkmanrc(filePath: string): Object | undefined;
52
+ /**
53
+ * Read the version pinned by a Gradle wrapper's `gradle-wrapper.properties`.
54
+ * The `distributionUrl` value may escape colons as `\:` per the Java
55
+ * properties format; the escapes are removed before parsing.
56
+ *
57
+ * @param {string} rootPath Directory holding the `gradle/wrapper` folder
58
+ * @returns {Object|undefined} `{ version, distributionUrl, distributionSha256Sum? }`
59
+ * or `undefined` when the wrapper is missing or unparsable.
60
+ */
61
+ export declare function readGradleWrapperVersion(rootPath: string): Object | undefined;
62
+ /**
63
+ * Read the version pinned by a Maven wrapper's `maven-wrapper.properties`.
64
+ * Legacy wrappers (pre wrapper-distribution downloads) lack a
65
+ * `distributionUrl` and are treated as unpinned.
66
+ *
67
+ * @param {string} rootPath Directory holding the `.mvn/wrapper` folder
68
+ * @returns {Object|undefined} `{ version, distributionUrl }` or `undefined`
69
+ * when the wrapper is missing or unpinned.
70
+ */
71
+ export declare function readMavenWrapperVersion(rootPath: string): Object | undefined;
72
+ /**
73
+ * Read the sbt version declared in `project/build.properties`. Kept here as a
74
+ * small properties-file read so environment preparation does not depend on
75
+ * higher layers.
76
+ *
77
+ * @param {string} projectPath SBT project directory
78
+ * @returns {string|undefined} Declared sbt version, when present and valid.
79
+ */
80
+ export declare function readSbtBuildPropertiesVersion(projectPath: string): string | undefined;
81
+ /**
82
+ * Minimum JDK major version required to run each build tool, keyed by the
83
+ * tool's major version line. Versions absent from the table fall back to the
84
+ * tool's `default` entry.
85
+ *
86
+ * Sources: Maven release history (maven.apache.org/docs/history.html), the
87
+ * Gradle compatibility table (docs.gradle.org), and the sbt setup notes.
88
+ *
89
+ * @type {Object<string, Object<number, number>|number>}
90
+ */
91
+ export declare const TOOL_JDK_REQUIREMENTS: Record<string, number | Record<number, number>>;
92
+ /**
93
+ * Minimum Gradle version that supports a given JDK major, for the
94
+ * combinations where running an older Gradle on a newer JDK is known to fail.
95
+ * Used to warn instead of guess-installing when the environment contradicts
96
+ * the project's Gradle pin.
97
+ *
98
+ * @type {Object<number, string>}
99
+ */
100
+ export declare const GRADLE_JAVA_CAPS: Record<number, string>;
101
+ /** JDK major that satisfies every current build tool minimum. */
102
+ export declare const DEFAULT_JAVA_MAJOR = 21;
103
+ /**
104
+ * Look up the minimum JDK major required to run a tool version.
105
+ *
106
+ * @param {string} tool Tool name (maven, gradle, sbt, scala)
107
+ * @param {string} version Tool version identifier
108
+ * @returns {number|undefined} Minimum JDK major, when known.
109
+ */
110
+ export declare function minimumJdkForToolVersion(tool: string, version: string): number | undefined;
111
+ /**
112
+ * Compute the highest JDK major required across a set of tool pins.
113
+ *
114
+ * @param {Array<{tool: string, version: string}>} toolPins Pinned tools
115
+ * @returns {number|undefined} Highest required JDK major, when any pin maps.
116
+ */
117
+ export declare function determineRequiredJavaVersion(toolPins: Array<{
118
+ tool: string;
119
+ version: string;
120
+ }>): number | undefined;
121
+ /**
122
+ * Minimum Gradle version that can run on the given JDK major, when such a cap
123
+ * is known.
124
+ *
125
+ * @param {number} javaMajor JDK major version
126
+ * @returns {string|undefined} Minimum Gradle version, when capped.
127
+ */
128
+ export declare function minimumGradleVersionForJava(javaMajor: number): string | undefined;
129
+ /**
130
+ * Collect the version tokens printed by `sdk list <candidate>`. The output is
131
+ * a fixed-width table whose cells may carry `+`, `*`, or `>` status markers;
132
+ * every token that passes the sdkman version validator is kept, which
133
+ * naturally drops banners, legends, and shell noise.
134
+ *
135
+ * @param {string} stdout Raw `sdk list` output
136
+ * @returns {string[]} Version identifiers found in the output.
137
+ */
138
+ export declare function extractSdkListVersions(stdout: string): string[];
139
+ /**
140
+ * Resolve a partial version prefix such as `3.9` or `8.14` to the newest
141
+ * matching version in `sdk list` output. Stable versions are preferred unless
142
+ * the requested prefix itself is a prerelease.
143
+ *
144
+ * @param {string} stdout Raw `sdk list <candidate>` output
145
+ * @param {string} prefix Partial or exact version prefix; empty matches all
146
+ * @returns {string|undefined} Best matching version identifier.
147
+ */
148
+ export declare function resolvePartialVersion(stdout: string, prefix: string): string | undefined;
149
+ /**
150
+ * Environment variable hints that carry a tool version, used by container
151
+ * images and CI setups to describe the preinstalled JVM toolchain.
152
+ *
153
+ * @type {Object<string, string>}
154
+ */
155
+ export declare const JVM_TOOL_VERSION_ENV_HINTS: Record<string, string>;
156
+ /**
157
+ * Environment variable overrides that declare the sdkman version to use for
158
+ * a tool, mirroring the existing `JAVA<NN>_TOOL` pattern.
159
+ *
160
+ * @type {Object<string, string>}
161
+ */
162
+ export declare const JVM_TOOL_VERSION_OVERRIDES: Record<string, string>;
163
+ /**
164
+ * Read the `MAVEN_TOOL`/`GRADLE_TOOL`/`SBT_TOOL`/`SCALA_TOOL` override for a
165
+ * tool, when set to a valid sdkman version identifier.
166
+ *
167
+ * @param {string} tool Tool name
168
+ * @returns {string|undefined} Overridden version identifier.
169
+ */
170
+ export declare function readToolVersionOverride(tool: string): string | undefined;
171
+ /**
172
+ * Read the container/CI version hint (`MAVEN_VERSION` etc.) for a tool, when
173
+ * set to a valid sdkman version identifier.
174
+ *
175
+ * @param {string} tool Tool name
176
+ * @returns {string|undefined} Hinted version identifier.
177
+ */
178
+ export declare function readToolVersionEnvHint(tool: string): string | undefined;
179
+ /**
180
+ * Detect the JDK major a project asks for from its build files: Gradle
181
+ * toolchain declarations (`JavaLanguageVersion.of(N)`) and Maven compiler or
182
+ * enforcer properties (`maven.compiler.release`, `maven.compiler.source`,
183
+ * `requireJavaVersion`). The scan is intentionally line-based and
184
+ * conservative: it only recognises whole-number values.
185
+ *
186
+ * @param {string} projectPath Project directory
187
+ * @returns {number|undefined} JDK major requested by the project.
188
+ */
189
+ export declare function detectProjectJavaMajor(projectPath: string): number | undefined;
190
+ //# sourceMappingURL=jvmToolEnv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jvmToolEnv.d.ts","sourceRoot":"","sources":["../../../lib/inventory/jvmToolEnv.js"],"names":[],"mappings":"AAMA,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,OAAO,EACL,eAAe,IAAI,qBAAqB,EACxC,gBAAgB,EAChB,mBAAmB,GACpB,CAAC;AAuBF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAHjC,MAGiC,GAF/B,OAAO,CASnB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EALxC,MAKwC,GAJtC,MAAM,GAAC,SAAS,CAmB5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAJ3B,MAI2B,GAHzB,MAAM,GAAC,SAAS,CA4C5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAJtC,MAIsC,GAHpC,MAAM,GAAC,SAAS,CAwC5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAJrC,MAIqC,GAHnC,MAAM,GAAC,SAAS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H,wBAAgB,sBAAsB,CAAC,WAAW,EAHvC,MAGuC,GAFrC,MAAM,GAAC,SAAS,CAuB5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"mcpConfigParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpConfigParser.js"],"names":[],"mappings":"AAknBA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAFlB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CA+C9H,CAAC"}
1
+ {"version":3,"file":"mcpConfigParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpConfigParser.js"],"names":[],"mappings":"AAoxBA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAFlB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAiD9H,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mcpDiscovery.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpDiscovery.js"],"names":[],"mappings":"AAkBA;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAH9B,MAG8B,GAF5B,MAAM,CAiBlB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAHzB,MAGyB,GAFvB,OAAO,CA8BnB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAH9B,MAG8B,GAF5B,MAAM,EAAE,CAUpB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAHrC,MAGqC,GAFnC,MAAM,EAAE,CAUpB"}
1
+ {"version":3,"file":"mcpDiscovery.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpDiscovery.js"],"names":[],"mappings":"AA6BA;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAH9B,MAG8B,GAF5B,MAAM,CAiBlB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAHzB,MAGyB,GAFvB,OAAO,CA8BnB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAH9B,MAG8B,GAF5B,MAAM,EAAE,CAUpB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAHrC,MAGqC,GAFnC,MAAM,EAAE,CAUpB"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Parser for MCP Registry server manifests (`server.json`).
3
+ *
4
+ * Converts each declared distributable package into a CycloneDX component
5
+ * (with a purl when the registry type maps to a supported ecosystem) and each
6
+ * remotely hosted endpoint into a service, alongside a file component that
7
+ * summarizes the manifest.
8
+ *
9
+ * @type {{id: string, patterns: string[], parse(files: string[], options?: Object): {components: Object[], services: Object[]}}}
10
+ */
11
+ export declare const mcpServerManifestParser: {
12
+ id: string;
13
+ patterns: string[];
14
+ parse(files: string[], options?: Object): {
15
+ components: Object[];
16
+ services: Object[];
17
+ };
18
+ };
19
+ //# sourceMappingURL=mcpServerManifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcpServerManifest.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpServerManifest.js"],"names":[],"mappings":"AAsTA;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,EAF1B;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAsE9H,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Parser for MCPB / DXT desktop-extension bundles.
3
+ *
4
+ * A bundle is a zip archive carrying a local MCP server, its dependencies, and
5
+ * a `manifest.json`. This parser reads only the manifest to describe the
6
+ * bundled server, the tools/prompts it exposes, the number of precompiled
7
+ * platform binaries, and whether it injects secret-typed configuration values
8
+ * as environment variables.
9
+ *
10
+ * @type {{id: string, patterns: string[], parse(files: string[], options?: Object): {components: Object[]}}}
11
+ */
12
+ export declare const mcpbBundleParser: {
13
+ id: string;
14
+ patterns: string[];
15
+ parse(files: string[], options?: Object): {
16
+ components: Object[];
17
+ };
18
+ };
19
+ //# sourceMappingURL=mcpbBundle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcpbBundle.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpbBundle.js"],"names":[],"mappings":"AAgYA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAFnB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAyB1G,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"osinfo.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osinfo.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,cAAc;IAC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AwB,CAAC,SAAS,EAHvC,MAGuC,GAFrC,MAAM,CAYlB;AAQD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,IAAI,AAJ/B,CAEA,EAFQ,MAI6B,GAF3B,MAAM,CAqClB;AAGD;;GAEG;AACH,wBAAgB,oBAAoB,SAEnC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,IAAI,AAH/B,CACA,EADQ,MAG6B,GAF3B;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAiHzF"}
1
+ {"version":3,"file":"osinfo.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osinfo.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,aAAa;IACb,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,UAAU;IACV,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,UAAU;IACV,UAAU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XvB;IACR,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,GAAC,SAAS,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,GAAC,SAAS,CAAC;IACrC,aAAa,EAAE,MAAM,GAAC,SAAS,CAAC;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAqMH;AAYD;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAF1B,UAAU,CAAC,OAAO,oBAAoB,CAAC,CASnD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,AAH5C,CACA,EADQ,UAAU,CAAC,OAAO,oBAAoB,CAGU,GAF9C,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAWnD;AAwDD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAJjC,MAIiC,EAAE,aAAa,AAHxD,CACA,EADQ,UAAU,CAAC,OAAO,oBAAoB,CAGsB,GAF1D,MAAM,GAAC,SAAS,CAS5B"}
@@ -1,6 +1,12 @@
1
+ import { isProtoBomFile } from "@cdxgen/cdx-proto/node";
2
+ export { isProtoBomFile };
1
3
  /**
2
4
  * Determine whether a spec version is supported for protobuf serialization.
3
5
  *
6
+ * Delegates to cdx-proto's `isSupportedSpecVersion`, which accepts the
7
+ * spellings seen in the wild (`v1.6`, `1.6`, `1.6.0`) in addition to the
8
+ * canonical strings.
9
+ *
4
10
  * @param {string|undefined} specVersion CycloneDX spec version string
5
11
  * @returns {boolean} `true` when supported by `@cdxgen/cdx-proto`, or when no spec version is provided
6
12
  */
@@ -16,13 +22,6 @@ export declare const isProtoSupportedSpecVersion: (specVersion: string | undefin
16
22
  * @param {string} [operation="protobuf operations"] Operation label used in the error message
17
23
  */
18
24
  export declare const assertProtoSupportedSpecVersion: (specVersion: string | undefined, operation?: string) => void;
19
- /**
20
- * Determine whether a path looks like a CycloneDX protobuf file.
21
- *
22
- * @param {string} filePath File path
23
- * @returns {boolean} true when the path looks like a protobuf BOM file
24
- */
25
- export declare const isProtoBomFile: (filePath: string) => boolean;
26
25
  /**
27
26
  * Method to convert the given bom json to proto binary
28
27
  *
@@ -51,13 +50,19 @@ export declare const getBomStats: (bomJson: string | Object, specVersion?: strin
51
50
  * Method to cross-convert a BOM between CycloneDX specification versions using
52
51
  * the protobuf schemas.
53
52
  *
54
- * Downgrades are lossy: fields that the target version does not define are
55
- * dropped and reported in `warnings` as field paths.
53
+ * cdx-proto's conversion is cardinality-safe: fields that change shape between
54
+ * versions (`metadata.licenses` and `evidence.identity`, singular in 1.5 and an
55
+ * array since 1.6) are reshaped automatically — wrapped on upgrade, collapsed
56
+ * to their first entry on downgrade — including `evidence.identity` on nested
57
+ * components, `metadata.component`, `metadata.tools.components[]`, and
58
+ * `formulation[].components[]`. Downgrades are otherwise lossy: fields the
59
+ * target version does not define are dropped and reported in `warnings` as
60
+ * field paths, alongside collapsed list siblings.
56
61
  *
57
- * This is the raw `@cdxgen/cdx-proto` conversion. It reshapes nothing that the
58
- * two schemas model with different cardinality, so a BOM crossing the 1.5/1.6
59
- * `evidence.identity` boundary must be normalized first. Prefer
60
- * `applySpecVersionCompatibility` from the postgen stage for that.
62
+ * Only the protobuf-supported versions (1.5–1.7) can be targeted here. For the
63
+ * full JSON-level normalization across every version cdxgen emits (component
64
+ * types, license attributes, 1.4/2.0 reshaping), prefer
65
+ * `applySpecVersionCompatibility` from the postgen stage.
61
66
  *
62
67
  * @param {string | Object} bomJson BOM Json, BOM Json string, or proto message
63
68
  * @param {string | number} targetSpecVersion Target CycloneDX spec version
@@ -1 +1 @@
1
- {"version":3,"file":"protobom.d.ts","sourceRoot":"","sources":["../../../lib/inventory/protobom.js"],"names":[],"mappings":"AAiEA;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,gBAH7B,MAAM,GAAC,SAAS,KACd,OAWZ,CAAC;AAEF;;;;;;;;;GASG;A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MAAM,GAAG,MAAM,4FAiBzB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,YAJb,MAAM,GAAG,MAAM,gBACf,MAAM,GAAG,MAAM,KACb,MAKV,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qBAAqB,YALvB,MAAM,GAAG,MAAM,qBACf,MAAM,GAAG,MAAM,gBACf,MAAM,GAAG,MAAM,KACb;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAahD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"protobomLoader.d.ts","sourceRoot":"","sources":["../../../lib/inventory/protobomLoader.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAH5B,MAG4B,GAF1B,OAAO,CAOnB;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,AALV,CACA,EADQ,MAKa,EACtB,kBAAkB,AALjB,CACA,EADQ,MAK8B,GAJ5B,OAAO,CAAC,MAAM,CAAC,CAqB3B"}
1
+ {"version":3,"file":"protobomLoader.d.ts","sourceRoot":"","sources":["../../../lib/inventory/protobomLoader.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAH5B,MAG4B,GAF1B,OAAO,CAOnB;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,AALV,CACA,EADQ,MAKa,EACtB,kBAAkB,AALjB,CACA,EADQ,MAK8B,GAJ5B,OAAO,CAAC,MAAM,CAAC,CAqB3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../lib/inventory/source.js"],"names":[],"mappings":"AAmCA,6FAA6F;AAC7F,eAAO,MAAM,4BAA4B,wIAC8F,CAAC;AAExI,6DAA6D;AAC7D,eAAO,MAAM,2BAA2B,UAWvC,CAAC;AAuBF;;;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;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAJrC,MAIqC,EAAE,cAAc,EAHrD,MAAM,GAAC,SAG8C,GAFnD,MAAM,GAAC,SAAS,CA8D5B;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAJtC,MAIsC,EAAE,cAAc,EAHtD,MAAM,GAAC,SAG+C,GAFpD,MAAM,GAAC,SAAS,CAiF5B;AAoHD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAHlC,MAGkC,GAFhC;IAAC,MAAM,EAAC,MAAM,CAAC;IAAA,KAAK,EAAC,MAAM,CAAC;IAAA,OAAO,EAAC,MAAM,CAAA;CAAC,GAAC,IAAI,CA8D5D;AA6GD;;GAEG;AACH,wBAAgB,yBAAyB,SAExC;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CAAC,WAAW,EAJ5C,KAAK,CAAC,MAAM,CAIgC,GAF1C,OAAO,CAAC,IAAI,CAAC,CA6BzB;AA8DD;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CAAC,UAAU,EAJ3C,MAI2C,EAAE,OAAO,AAH5D,CACA,EADQ,MAGyD,GAFvD,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAAC,CA4MlI;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAF5B,MAE4B,QAkCtC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Patterns matching a package reference inside CSS/SCSS/Less/Stylus content.
3
+ * Capture group 1 holds the reference (for example `bulma/sass/utilities`).
4
+ *
5
+ * @type {RegExp[]}
6
+ */
7
+ export declare const STYLE_PACKAGE_REFERENCE_PATTERNS: RegExp[];
8
+ /**
9
+ * True when a `url()` reference points at a package rather than a local file.
10
+ * Only the `~package/...` and `node_modules/...` spellings qualify; plain
11
+ * relative URLs stay local.
12
+ *
13
+ * @param {string} reference Value captured from a `url()` rule.
14
+ * @returns {boolean}
15
+ */
16
+ export declare const isPackageStyleUrlReference: (reference: string) => boolean;
17
+ //# sourceMappingURL=stylePackageRefs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stylePackageRefs.d.ts","sourceRoot":"","sources":["../../../lib/inventory/stylePackageRefs.js"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,EAFnC,MAAM,EAKf,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,cAH5B,MAAM,KACJ,OAUZ,CAAC"}
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Build a same-length masked buffer of a `.svelte` source where every byte
3
+ * outside the `<script>` / `<script module>` / `<script context="module">`
4
+ * bodies is replaced by a space (newlines preserved). Because nothing moves,
5
+ * the Babel parse of the buffer yields statement offsets and `loc.line`
6
+ * values that are true to the original file.
7
+ *
8
+ * Handles multiple script blocks, arbitrary attribute order, self-closing and
9
+ * unterminated tags, CRLF input, and a script block appearing after the
10
+ * markup.
11
+ *
12
+ * @param {string} source `.svelte` file content.
13
+ * @returns {string} Same-length buffer containing only the script bodies.
14
+ */
15
+ export declare const maskSvelteScripts: (source: string) => string;
16
+ /**
17
+ * The `lang` attribute values of the `<script>` blocks, lowercased.
18
+ *
19
+ * @param {string} source `.svelte` file content.
20
+ * @returns {string[]}
21
+ */
22
+ export declare const extractSvelteScriptLanguages: (source: string) => string[];
23
+ /**
24
+ * Collect `<style>` block facts: the block's `lang` and the package
25
+ * references found in its `@use` / `@import` / `@forward` / `url()` rules.
26
+ * Reference offsets are absolute indices into the original source so callers
27
+ * can derive line numbers.
28
+ *
29
+ * @param {string} source `.svelte` file content.
30
+ * @returns {Array<{lang: string|undefined, start: number, references: Array<{reference: string, index: number}>}>}
31
+ */
32
+ export declare const extractSvelteStyleReferences: (source: string) => Array<{
33
+ lang: string | undefined;
34
+ start: number;
35
+ references: Array<{
36
+ reference: string;
37
+ index: number;
38
+ }>;
39
+ }>;
40
+ /** Rune names that imply the `svelte` package even without an import. */
41
+ export declare const SVELTE_RUNE_NAMES: string[];
42
+ /**
43
+ * Find Svelte 5 rune usages (`$state`, `$derived`, `$effect`, ...). A
44
+ * rune-only component may never `import` from `svelte`, yet it cannot compile
45
+ * without the compiler, so rune usage is `svelte` evidence.
46
+ *
47
+ * @param {string} source `.svelte` content (script blocks scanned) or the
48
+ * full text of a `.svelte.js` / `.svelte.ts` module (pass
49
+ * `scriptBlocksOnly = false`).
50
+ * @param {boolean} [scriptBlocksOnly=true] Scan only `<script>` block bodies.
51
+ * @returns {Array<{rune: string, index: number}>} Absolute rune offsets.
52
+ */
53
+ export declare const findSvelteRunes: (source: string, scriptBlocksOnly?: boolean) => Array<{
54
+ rune: string;
55
+ index: number;
56
+ }>;
57
+ /** SvelteKit virtual module prefixes that resolve inside `@sveltejs/kit`. */
58
+ export declare const SVELTE_KIT_VIRTUAL_MODULE_PREFIXES: string[];
59
+ /**
60
+ * True for import specifiers provided by SvelteKit itself (`$app/stores`,
61
+ * `$env/static/public`, `$service-worker`, ...).
62
+ *
63
+ * @param {string} specifier Import specifier.
64
+ * @returns {boolean}
65
+ */
66
+ export declare const isSvelteKitVirtualModuleSpecifier: (specifier: string) => boolean;
67
+ /** The default SvelteKit `$lib` alias target. */
68
+ export declare const SVELTE_DEFAULT_LIB_ALIAS = "src/lib";
69
+ /**
70
+ * Extract framework facts from a `svelte.config.*` source: the adapter named
71
+ * in string form (`adapter: "netlify"`), the `kit.alias` entries, and the
72
+ * `extensions` list. Adapter and preprocessor *imports* are collected by the
73
+ * regular config-file parse once `svelte.config.*` stops being ignored; the
74
+ * string adapter form has no import to recover, so it is extracted here.
75
+ *
76
+ * @param {string} source `svelte.config.*` file content.
77
+ * @returns {{adapterName: string|undefined, aliases: Object<string, string>, extensions: string[]}}
78
+ */
79
+ export declare const parseSvelteConfigSource: (source: string) => {
80
+ adapterName: string | undefined;
81
+ aliases: Record<string, string>;
82
+ extensions: string[];
83
+ };
84
+ /** `<style lang>` values that require a CSS preprocessor package. */
85
+ export declare const SVELTE_STYLE_LANG_PACKAGES: {
86
+ less: string;
87
+ postcss: string;
88
+ sass: string;
89
+ scss: string;
90
+ stylus: string;
91
+ };
92
+ /**
93
+ * Executable names appearing in Svelte project npm scripts and the npm
94
+ * packages that provide them. Used by the shared script-evidence walk so a
95
+ * `svelte-kit sync` script marks `@sveltejs/kit` required on its own
96
+ * evidence.
97
+ */
98
+ export declare const SVELTE_SCRIPT_EXECUTABLE_PACKAGE_MAP: {
99
+ "svelte-kit": string;
100
+ "svelte-check": string;
101
+ "svelte-package": string;
102
+ vite: string;
103
+ vitest: string;
104
+ playwright: string;
105
+ };
106
+ /**
107
+ * Prime the module-scoped template-parser handle with a dynamic import,
108
+ * which works on every supported runtime. Called before the parse fan-out so
109
+ * the inline (small-project) path can use tier 2 on the main thread. Any
110
+ * failure is silent at default verbosity: the optional package is absent
111
+ * from the plain cdxgen binaries, and tier 1 already recovers all scope
112
+ * evidence.
113
+ *
114
+ * @returns {Promise<Object|null>} The module namespace, or null when unavailable.
115
+ */
116
+ export declare const primeSvelteParser: () => Promise<Object | null>;
117
+ /**
118
+ * Synchronous accessor for the parse path: returns the primed handle, lazily
119
+ * resolving it once when called before `primeSvelteParser`.
120
+ *
121
+ * @returns {Object|null} The module namespace, or null when unavailable.
122
+ */
123
+ export declare const getSvelteTemplateParser: () => Object | null;
124
+ //# sourceMappingURL=svelteUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svelteUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/svelteUtils.js"],"names":[],"mappings":"AAgNA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,WAHnB,MAAM,KACJ,MAkBZ,CAA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