@cdxgen/cdxgen 13.3.0 → 13.4.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 (255) hide show
  1. package/README.md +9 -6
  2. package/bin/cdxgen.js +90 -26
  3. package/bin/evinse.js +18 -1
  4. package/bin/repl.js +86 -0
  5. package/bin/sign.js +45 -15
  6. package/bin/tracebom.js +5 -1
  7. package/bin/validate.js +84 -18
  8. package/bin/verify.js +155 -86
  9. package/data/helpers/init.gradle +46 -21
  10. package/data/remediations.json +61 -0
  11. package/data/rules/dependency-sources.yaml +67 -0
  12. package/data/rules/scala-evidence.yaml +115 -0
  13. package/lib/audit/index.js +38 -6
  14. package/lib/cli/index.js +113 -54
  15. package/lib/cli/jsBom.js +50 -29
  16. package/lib/cli/jvmBom.js +665 -138
  17. package/lib/cli/managedBom.js +320 -200
  18. package/lib/cli/nativeBom.js +139 -30
  19. package/lib/core/activity.js +12 -0
  20. package/lib/core/env.js +17 -9
  21. package/lib/core/fs.js +3 -2
  22. package/lib/core/httpClient.js +159 -24
  23. package/lib/core/pluginRun.js +184 -0
  24. package/lib/core/processTree.js +100 -0
  25. package/lib/core/runState.js +39 -0
  26. package/lib/core/toml.js +72 -0
  27. package/lib/ecosystems/asarutils.js +4 -2
  28. package/lib/ecosystems/bunutils.js +5 -7
  29. package/lib/ecosystems/cargoCache.js +231 -8
  30. package/lib/ecosystems/cmakeResolver.js +10 -21
  31. package/lib/ecosystems/cppBuildContext.js +631 -0
  32. package/lib/ecosystems/cppEvidence.js +337 -22
  33. package/lib/ecosystems/cppIncludeResolver.js +294 -0
  34. package/lib/ecosystems/denoutils.js +93 -66
  35. package/lib/ecosystems/ecosystems.js +1967 -788
  36. package/lib/ecosystems/golem.js +28 -12
  37. package/lib/ecosystems/gradleutils.js +314 -30
  38. package/lib/ecosystems/jsEvidence.js +85 -24
  39. package/lib/ecosystems/kosi.js +21 -4
  40. package/lib/ecosystems/npmutils.js +64 -0
  41. package/lib/ecosystems/parsers-dotnet.js +567 -151
  42. package/lib/ecosystems/parsers-elm.js +46 -28
  43. package/lib/ecosystems/parsers-gleam.js +3 -4
  44. package/lib/ecosystems/parsers-go.js +324 -61
  45. package/lib/ecosystems/parsers-js.js +92 -26
  46. package/lib/ecosystems/parsers-julia.js +2 -3
  47. package/lib/ecosystems/parsers-jvm.js +204 -12
  48. package/lib/ecosystems/parsers-misc.js +182 -55
  49. package/lib/ecosystems/parsers-python.js +141 -10
  50. package/lib/ecosystems/parsers-rust.js +4 -4
  51. package/lib/ecosystems/parsers-terraform.js +1573 -19
  52. package/lib/ecosystems/pythonutils.js +102 -6
  53. package/lib/ecosystems/remote/huggingface.js +3 -0
  54. package/lib/ecosystems/rubyutils.js +67 -17
  55. package/lib/ecosystems/rusi.js +22 -9
  56. package/lib/ecosystems/sbtutils.js +243 -187
  57. package/lib/ecosystems/scalacliutils.js +342 -0
  58. package/lib/ecosystems/scalasem.js +2618 -0
  59. package/lib/ecosystems/terraformRegistry.js +288 -0
  60. package/lib/ecosystems/utils.js +2 -0
  61. package/lib/ecosystems/vendoredCode.js +156 -0
  62. package/lib/evinser/evinser.js +578 -69
  63. package/lib/helpers/agenticToolutils.js +2 -2
  64. package/lib/helpers/bomSigner.js +576 -128
  65. package/lib/inventory/aiCollector.js +4 -1
  66. package/lib/inventory/analyzer.js +110 -127
  67. package/lib/inventory/atomUtils.js +171 -48
  68. package/lib/inventory/auditCategories.js +7 -0
  69. package/lib/inventory/buildToolRateLimit.js +144 -0
  70. package/lib/inventory/cacheCommands.js +2 -1
  71. package/lib/inventory/cmakeBuildDirs.js +254 -0
  72. package/lib/inventory/deps.js +501 -124
  73. package/lib/inventory/dosai.js +248 -44
  74. package/lib/inventory/dosaiParsers.js +310 -15
  75. package/lib/inventory/dynamic.js +52 -6
  76. package/lib/inventory/evidenceUtils.js +154 -109
  77. package/lib/inventory/fetchBatch.js +574 -38
  78. package/lib/inventory/fetchDiskCache.js +597 -0
  79. package/lib/inventory/forgeEnricher.js +14 -5
  80. package/lib/inventory/jvmLocalRepos.js +917 -0
  81. package/lib/inventory/mcpConfigParser.js +2 -3
  82. package/lib/inventory/parentSelection.js +146 -0
  83. package/lib/inventory/rustFormulationParser.js +3 -4
  84. package/lib/inventory/scalaCoords.js +153 -0
  85. package/lib/inventory/source.js +8 -8
  86. package/lib/inventory/spdx.js +101 -0
  87. package/lib/inventory/traceRunner.js +88 -7
  88. package/lib/inventory/tracedCrypto.js +294 -0
  89. package/lib/managers/docker.js +33 -32
  90. package/lib/managers/oci.js +24 -2
  91. package/lib/parsers/cmakeCache.js +69 -0
  92. package/lib/parsers/cmakeLists.js +16 -2
  93. package/lib/parsers/cmakePresets.js +400 -0
  94. package/lib/parsers/compileCommands.js +557 -0
  95. package/lib/parsers/strictJson.js +322 -0
  96. package/lib/parsers/terraformConfig.js +1073 -0
  97. package/lib/parsers/terraformSource.js +652 -0
  98. package/lib/server/server.js +23 -0
  99. package/lib/stages/postgen/introspection/markers.js +1 -1
  100. package/lib/stages/postgen/postgen.js +15 -1
  101. package/lib/stages/postgen/specVersionCompat.js +32 -0
  102. package/lib/validator/index.js +25 -10
  103. package/lib/validator/reporters/json.js +1 -0
  104. package/package.json +21 -21
  105. package/types/lib/audit/index.d.ts.map +1 -1
  106. package/types/lib/cli/index.d.ts.map +1 -1
  107. package/types/lib/cli/jsBom.d.ts.map +1 -1
  108. package/types/lib/cli/jvmBom.d.ts +24 -1
  109. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  110. package/types/lib/cli/managedBom.d.ts +7 -4
  111. package/types/lib/cli/managedBom.d.ts.map +1 -1
  112. package/types/lib/cli/nativeBom.d.ts +3 -1
  113. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  114. package/types/lib/core/activity.d.ts.map +1 -1
  115. package/types/lib/core/env.d.ts +9 -0
  116. package/types/lib/core/env.d.ts.map +1 -1
  117. package/types/lib/core/fs.d.ts.map +1 -1
  118. package/types/lib/core/httpClient.d.ts +13 -8
  119. package/types/lib/core/httpClient.d.ts.map +1 -1
  120. package/types/lib/core/pluginRun.d.ts +97 -0
  121. package/types/lib/core/pluginRun.d.ts.map +1 -0
  122. package/types/lib/core/processTree.d.ts +36 -0
  123. package/types/lib/core/processTree.d.ts.map +1 -0
  124. package/types/lib/core/runState.d.ts +29 -0
  125. package/types/lib/core/runState.d.ts.map +1 -0
  126. package/types/lib/core/toml.d.ts +20 -0
  127. package/types/lib/core/toml.d.ts.map +1 -0
  128. package/types/lib/ecosystems/asarutils.d.ts.map +1 -1
  129. package/types/lib/ecosystems/bunutils.d.ts.map +1 -1
  130. package/types/lib/ecosystems/cargoCache.d.ts +12 -0
  131. package/types/lib/ecosystems/cargoCache.d.ts.map +1 -1
  132. package/types/lib/ecosystems/cmakeResolver.d.ts +5 -3
  133. package/types/lib/ecosystems/cmakeResolver.d.ts.map +1 -1
  134. package/types/lib/ecosystems/cppBuildContext.d.ts +55 -0
  135. package/types/lib/ecosystems/cppBuildContext.d.ts.map +1 -0
  136. package/types/lib/ecosystems/cppEvidence.d.ts +18 -2
  137. package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
  138. package/types/lib/ecosystems/cppIncludeResolver.d.ts +92 -0
  139. package/types/lib/ecosystems/cppIncludeResolver.d.ts.map +1 -0
  140. package/types/lib/ecosystems/denoutils.d.ts +9 -3
  141. package/types/lib/ecosystems/denoutils.d.ts.map +1 -1
  142. package/types/lib/ecosystems/ecosystems.d.ts +62 -13
  143. package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
  144. package/types/lib/ecosystems/golem.d.ts.map +1 -1
  145. package/types/lib/ecosystems/gradleutils.d.ts +50 -0
  146. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  147. package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
  148. package/types/lib/ecosystems/kosi.d.ts.map +1 -1
  149. package/types/lib/ecosystems/npmutils.d.ts +15 -0
  150. package/types/lib/ecosystems/npmutils.d.ts.map +1 -1
  151. package/types/lib/ecosystems/parsers-dotnet.d.ts +118 -4
  152. package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
  153. package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -1
  154. package/types/lib/ecosystems/parsers-gleam.d.ts.map +1 -1
  155. package/types/lib/ecosystems/parsers-go.d.ts +44 -2
  156. package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
  157. package/types/lib/ecosystems/parsers-js.d.ts +6 -1
  158. package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
  159. package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -1
  160. package/types/lib/ecosystems/parsers-jvm.d.ts +46 -1
  161. package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
  162. package/types/lib/ecosystems/parsers-misc.d.ts +3 -1
  163. package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
  164. package/types/lib/ecosystems/parsers-python.d.ts +53 -3
  165. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  166. package/types/lib/ecosystems/parsers-terraform.d.ts +38 -21
  167. package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -1
  168. package/types/lib/ecosystems/pythonutils.d.ts +27 -2
  169. package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
  170. package/types/lib/ecosystems/remote/huggingface.d.ts.map +1 -1
  171. package/types/lib/ecosystems/rubyutils.d.ts +21 -1
  172. package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
  173. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  174. package/types/lib/ecosystems/sbtutils.d.ts +88 -2
  175. package/types/lib/ecosystems/sbtutils.d.ts.map +1 -1
  176. package/types/lib/ecosystems/scalacliutils.d.ts +56 -0
  177. package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -0
  178. package/types/lib/ecosystems/scalasem.d.ts +311 -0
  179. package/types/lib/ecosystems/scalasem.d.ts.map +1 -0
  180. package/types/lib/ecosystems/terraformRegistry.d.ts +9 -0
  181. package/types/lib/ecosystems/terraformRegistry.d.ts.map +1 -0
  182. package/types/lib/ecosystems/utils.d.ts +2 -2
  183. package/types/lib/ecosystems/utils.d.ts.map +1 -1
  184. package/types/lib/ecosystems/vendoredCode.d.ts +32 -0
  185. package/types/lib/ecosystems/vendoredCode.d.ts.map +1 -0
  186. package/types/lib/evinser/evinser.d.ts +75 -8
  187. package/types/lib/evinser/evinser.d.ts.map +1 -1
  188. package/types/lib/helpers/bomSigner.d.ts +80 -4
  189. package/types/lib/helpers/bomSigner.d.ts.map +1 -1
  190. package/types/lib/inventory/aiCollector.d.ts.map +1 -1
  191. package/types/lib/inventory/analyzer.d.ts.map +1 -1
  192. package/types/lib/inventory/atomUtils.d.ts +82 -10
  193. package/types/lib/inventory/atomUtils.d.ts.map +1 -1
  194. package/types/lib/inventory/auditCategories.d.ts +3 -0
  195. package/types/lib/inventory/auditCategories.d.ts.map +1 -1
  196. package/types/lib/inventory/buildToolRateLimit.d.ts +38 -0
  197. package/types/lib/inventory/buildToolRateLimit.d.ts.map +1 -0
  198. package/types/lib/inventory/cacheCommands.d.ts +2 -1
  199. package/types/lib/inventory/cacheCommands.d.ts.map +1 -1
  200. package/types/lib/inventory/cmakeBuildDirs.d.ts +58 -0
  201. package/types/lib/inventory/cmakeBuildDirs.d.ts.map +1 -0
  202. package/types/lib/inventory/deps.d.ts +59 -1
  203. package/types/lib/inventory/deps.d.ts.map +1 -1
  204. package/types/lib/inventory/dosai.d.ts +57 -8
  205. package/types/lib/inventory/dosai.d.ts.map +1 -1
  206. package/types/lib/inventory/dosaiParsers.d.ts +53 -7
  207. package/types/lib/inventory/dosaiParsers.d.ts.map +1 -1
  208. package/types/lib/inventory/dynamic.d.ts +10 -0
  209. package/types/lib/inventory/dynamic.d.ts.map +1 -1
  210. package/types/lib/inventory/evidenceUtils.d.ts +19 -4
  211. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  212. package/types/lib/inventory/fetchBatch.d.ts +83 -14
  213. package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
  214. package/types/lib/inventory/fetchDiskCache.d.ts +169 -0
  215. package/types/lib/inventory/fetchDiskCache.d.ts.map +1 -0
  216. package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
  217. package/types/lib/inventory/jvmLocalRepos.d.ts +178 -0
  218. package/types/lib/inventory/jvmLocalRepos.d.ts.map +1 -0
  219. package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
  220. package/types/lib/inventory/parentSelection.d.ts +34 -0
  221. package/types/lib/inventory/parentSelection.d.ts.map +1 -0
  222. package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
  223. package/types/lib/inventory/scalaCoords.d.ts +80 -0
  224. package/types/lib/inventory/scalaCoords.d.ts.map +1 -0
  225. package/types/lib/inventory/source.d.ts.map +1 -1
  226. package/types/lib/inventory/spdx.d.ts +9 -0
  227. package/types/lib/inventory/spdx.d.ts.map +1 -1
  228. package/types/lib/inventory/traceRunner.d.ts +12 -0
  229. package/types/lib/inventory/traceRunner.d.ts.map +1 -1
  230. package/types/lib/inventory/tracedCrypto.d.ts +42 -0
  231. package/types/lib/inventory/tracedCrypto.d.ts.map +1 -0
  232. package/types/lib/managers/docker.d.ts.map +1 -1
  233. package/types/lib/managers/oci.d.ts +3 -1
  234. package/types/lib/managers/oci.d.ts.map +1 -1
  235. package/types/lib/parsers/cmakeCache.d.ts +16 -0
  236. package/types/lib/parsers/cmakeCache.d.ts.map +1 -1
  237. package/types/lib/parsers/cmakeLists.d.ts +2 -1
  238. package/types/lib/parsers/cmakeLists.d.ts.map +1 -1
  239. package/types/lib/parsers/cmakePresets.d.ts +78 -0
  240. package/types/lib/parsers/cmakePresets.d.ts.map +1 -0
  241. package/types/lib/parsers/compileCommands.d.ts +115 -0
  242. package/types/lib/parsers/compileCommands.d.ts.map +1 -0
  243. package/types/lib/parsers/strictJson.d.ts +46 -0
  244. package/types/lib/parsers/strictJson.d.ts.map +1 -0
  245. package/types/lib/parsers/terraformConfig.d.ts +70 -0
  246. package/types/lib/parsers/terraformConfig.d.ts.map +1 -0
  247. package/types/lib/parsers/terraformSource.d.ts +66 -0
  248. package/types/lib/parsers/terraformSource.d.ts.map +1 -0
  249. package/types/lib/server/server.d.ts.map +1 -1
  250. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  251. package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
  252. package/types/lib/validator/index.d.ts +8 -0
  253. package/types/lib/validator/index.d.ts.map +1 -1
  254. package/types/lib/validator/reporters/json.d.ts.map +1 -1
  255. package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +0 -462
@@ -0,0 +1,178 @@
1
+ /**
2
+ * Forget every memoised lookup. A long-lived process (server mode) calls this
3
+ * per scan so that artifacts a build downloaded in the meantime are found, and
4
+ * tests call it after changing the cache environment variables.
5
+ *
6
+ * @returns {void}
7
+ */
8
+ export declare function resetJvmLocalRepoCaches(): void;
9
+ /**
10
+ * Read `<localRepository>` from a Maven settings file.
11
+ *
12
+ * @param {string} settingsFile Path to settings.xml.
13
+ * @returns {string|undefined} Absolute local repository path.
14
+ */
15
+ export declare function localRepositoryFromSettings(settingsFile: string): string | undefined;
16
+ /**
17
+ * Pull the values cdxgen needs out of a Maven argument list: the
18
+ * `maven.repo.local` system property and the user settings file.
19
+ *
20
+ * @param {string[]} args Parsed arguments.
21
+ * @param {string} [baseDir] Directory relative paths resolve against.
22
+ * @returns {{repoLocal?: string, settingsFile?: string}}
23
+ */
24
+ export declare function mavenRepoArgs(args: string[], baseDir?: string): {
25
+ repoLocal?: string;
26
+ settingsFile?: string;
27
+ };
28
+ /**
29
+ * The arguments that hand a scanned project's own `settings.xml` to Maven.
30
+ *
31
+ * The file is passed as global settings (`-gs`), so the user's
32
+ * `~/.m2/settings.xml` still applies and wins on mirrors, servers and proxies.
33
+ * Nothing is added, and `skipped` says why, in secure mode, where a scanned
34
+ * repository must not choose Maven's repositories, proxies or credentials, or
35
+ * when MVN_ARGS or MAVEN_ARGS already names a settings file.
36
+ *
37
+ * @param {string} projectDir Directory holding the project's pom.xml.
38
+ * @param {{secureMode?: boolean}} [opts]
39
+ * @returns {{settingsFile?: string, args: string[], skipped?: "secure-mode"|"user-settings"}}
40
+ */
41
+ export declare function projectSettingsArgs(projectDir: string, { secureMode }?: {
42
+ secureMode?: boolean;
43
+ }): {
44
+ settingsFile?: string;
45
+ args: string[];
46
+ skipped?: "secure-mode" | "user-settings";
47
+ };
48
+ /**
49
+ * Every Maven local repository this run may have populated, most specific
50
+ * first: MAVEN_CACHE_DIR, then an explicit `-Dmaven.repo.local` (from
51
+ * MVN_ARGS, MAVEN_ARGS, MAVEN_OPTS or the project's `.mvn/maven.config`), then
52
+ * `<localRepository>` from the settings Maven would read, then
53
+ * `~/.m2/repository`.
54
+ *
55
+ * @param {Object} [opts]
56
+ * @param {string} [opts.projectDir] Project directory, for `.mvn/maven.config`.
57
+ * @returns {string[]} Absolute paths. Not filtered for existence.
58
+ */
59
+ export declare function mavenLocalRepositories({ projectDir }?: {
60
+ projectDir?: string;
61
+ }): string[];
62
+ /**
63
+ * Gradle module cache directories (`.../modules-2/files-2.1`): the one under
64
+ * GRADLE_USER_HOME, the cdxgen-specific GRADLE_CACHE_DIR, the default
65
+ * `~/.gradle` when neither is set, and the read-only shared cache named by
66
+ * GRADLE_RO_DEP_CACHE.
67
+ *
68
+ * @returns {string[]} Absolute paths. Not filtered for existence.
69
+ */
70
+ export declare function gradleCacheRoots(): string[];
71
+ /**
72
+ * The Coursier cache directory used by sbt, Mill and scala-cli: COURSIER_CACHE
73
+ * when set, otherwise the platform default (XDG_CACHE_HOME is honoured on
74
+ * Linux).
75
+ *
76
+ * @returns {string|undefined} Absolute path. Not checked for existence.
77
+ */
78
+ export declare function coursierCacheDir(): string | undefined;
79
+ /**
80
+ * Convert a Coursier repository prefix into the repository URL it caches.
81
+ *
82
+ * @param {string[]} parts Prefix segments relative to the cache root.
83
+ * @returns {string|null} Repository URL.
84
+ */
85
+ export declare function coursierPrefixToUrl(parts: string[]): string | null;
86
+ /**
87
+ * Locate a Maven coordinate's directory in the Coursier cache.
88
+ *
89
+ * @param {string} group Maven groupId.
90
+ * @param {string} name Maven artifactId, including any Scala suffix.
91
+ * @param {string} version Version.
92
+ * @returns {{repoUrl: string, dir: string}|null} Repository URL and directory.
93
+ */
94
+ export declare function locateInCoursierCache(group: string, name: string, version: string): {
95
+ repoUrl: string;
96
+ dir: string;
97
+ } | null;
98
+ /**
99
+ * Locate a Maven artifact and its POM in the local caches.
100
+ *
101
+ * Only the exact file names Maven, Gradle and Coursier use are accepted, so a
102
+ * classifier jar (`-sources`, `-javadoc`, `-linux-x86_64`) is never mistaken
103
+ * for the main artifact. Results, including misses, are memoised until
104
+ * {@link resetJvmLocalRepoCaches}.
105
+ *
106
+ * @param {string} group Maven groupId.
107
+ * @param {string} name Maven artifactId.
108
+ * @param {string} version Version.
109
+ * @param {Object} [opts]
110
+ * @param {string} [opts.classifier] Classifier of the wanted jar.
111
+ * @param {string} [opts.extension] Artifact extension. Defaults to jar.
112
+ * @param {string} [opts.projectDir] Project directory, for `.mvn/maven.config`.
113
+ * @returns {{jarPath?: string, pomPath?: string, sha1?: string, repoUrl?: string}|null}
114
+ */
115
+ export declare function findLocalMavenArtifact(group: string, name: string, version: string, opts?: {
116
+ classifier?: string;
117
+ extension?: string;
118
+ projectDir?: string;
119
+ }): {
120
+ jarPath?: string;
121
+ pomPath?: string;
122
+ sha1?: string;
123
+ repoUrl?: string;
124
+ } | null;
125
+ /**
126
+ * Split an artifact file name into its classifier and extension, given the
127
+ * artifactId and version it belongs to.
128
+ *
129
+ * @param {string} fileName File name, for example `netty-4.1.1-linux.jar`.
130
+ * @param {string} name artifactId.
131
+ * @param {string} version Version.
132
+ * @returns {{classifier: string, extension: string}|undefined} Undefined when
133
+ * the name does not belong to the coordinate.
134
+ */
135
+ export declare function splitArtifactFileName(fileName: string, name: string, version: string): {
136
+ classifier: string;
137
+ extension: string;
138
+ } | undefined;
139
+ /**
140
+ * Infer Maven coordinates from where an artifact sits on disk.
141
+ *
142
+ * Paths inside a configured Maven repository or Gradle cache are read by
143
+ * their layout. Paths elsewhere are recognised by the conventional
144
+ * `.m2/repository` and `files-2.1` segments, so a copied cache still works. A
145
+ * Coursier path is resolved through its sibling POM, because the repository
146
+ * prefix and the group path cannot be told apart from the path alone.
147
+ *
148
+ * @param {string} filePath Absolute path of a jar or other artifact.
149
+ * @returns {{group: string, name: string, version: string, classifier: string, extension: string, sha1?: string}|undefined}
150
+ */
151
+ export declare function inferMavenCoordinatesFromPath(filePath: string): {
152
+ group: string;
153
+ name: string;
154
+ version: string;
155
+ classifier: string;
156
+ extension: string;
157
+ sha1?: string;
158
+ } | undefined;
159
+ /**
160
+ * Look up the Maven coordinates of a jar by its SHA-1 in the local caches.
161
+ *
162
+ * The index is built once, on first use, from the Gradle module cache (whose
163
+ * directory names are SHA-1s) and from the `*.jar.sha1` files Maven writes
164
+ * next to every downloaded jar. It answers the question cdxgen would otherwise
165
+ * send to the Maven Central search API.
166
+ *
167
+ * @param {string} sha1 Hex SHA-1 of the jar.
168
+ * @returns {{group: string, name: string, version: string, classifier: string, extension: string, path: string}|undefined}
169
+ */
170
+ export declare function findMavenCoordinatesBySha1(sha1: string): {
171
+ group: string;
172
+ name: string;
173
+ version: string;
174
+ classifier: string;
175
+ extension: string;
176
+ path: string;
177
+ } | undefined;
178
+ //# sourceMappingURL=jvmLocalRepos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jvmLocalRepos.d.ts","sourceRoot":"","sources":["../../../lib/inventory/jvmLocalRepos.js"],"names":[],"mappings":"AA2CA;;;;;;GAMG;AACH,wBAAgB,uBAAuB,IAF1B,IAAI,CAShB;AAuDD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAH7C,MAG6C,GAF3C,MAAM,GAAC,SAAS,CAkC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAJvB,MAAM,EAIiB,EAAE,OAAO,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;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
+ {"version":3,"file":"mcpConfigParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpConfigParser.js"],"names":[],"mappings":"AAmxBA;;;;;;;;;;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"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Which detected project becomes the parent (`metadata.component`) when one
3
+ * scan covers several ecosystems and no parent was given.
4
+ *
5
+ * Each ecosystem detects its own project from its own manifest. The project
6
+ * whose manifest sits at the scan root describes the repository; one found
7
+ * deeper is a part of it (a web client in `tools/ui/`, a helper script's
8
+ * `pyproject.toml`). So candidates are ordered by how deep their ecosystem's
9
+ * manifests sit, the scan root first, and ties keep the ecosystem order the
10
+ * scan ran in.
11
+ */
12
+ /**
13
+ * How deep the shallowest manifest of an ecosystem sits under a scan root:
14
+ * 0 for one at the root itself, `Infinity` when there is none (or the
15
+ * ecosystem is not one this module knows).
16
+ *
17
+ * @param {string} root Scan root
18
+ * @param {string} purlType Purl type of the ecosystem
19
+ * @param {Object} options CLI options (exclusions)
20
+ * @returns {number}
21
+ */
22
+ export declare function manifestDepth(root: string, purlType: string, options?: Object): number;
23
+ /**
24
+ * Order parent candidates by the depth of their ecosystem's manifests under
25
+ * the scan roots (the shallowest first). The sort is stable, so candidates of
26
+ * equal depth keep the order the ecosystems were scanned in.
27
+ *
28
+ * @param {Object[]} candidates Detected parent components, in scan order
29
+ * @param {string[]} roots Scan roots
30
+ * @param {Object} options CLI options
31
+ * @returns {Object[]} The candidates, reordered
32
+ */
33
+ export declare function orderParentCandidates(candidates: Object[], roots: string[], options?: Object): Object[];
34
+ //# sourceMappingURL=parentSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parentSelection.d.ts","sourceRoot":"","sources":["../../../lib/inventory/parentSelection.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA8DH;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EALvB,MAKuB,EAAE,QAAQ,EAJjC,MAIiC,EAAE,OAAO,GAH1C,MAG+C,GAF7C,MAAM,CA2BlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EALrC,MAAM,EAK+B,EAAE,KAAK,EAJ5C,MAAM,EAIsC,EAAE,OAAO,GAHrD,MAG0D,GAFxD,MAAM,EAAE,CA4BpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"rustFormulationParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/rustFormulationParser.js"],"names":[],"mappings":"AAmTA;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAFxB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAwBxF,CAAC"}
1
+ {"version":3,"file":"rustFormulationParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/rustFormulationParser.js"],"names":[],"mappings":"AAkTA;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAFxB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAwBxF,CAAC"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Parse a Scala-published Maven artifact name into its coordinate parts.
3
+ *
4
+ * @param {string} name Maven artifactId, for example `upickle_sjs1_3`
5
+ * @returns {{ originalName: string, artifactBase: string, binaryVersion: string|null,
6
+ * platformSuffix: string, purlName: string }} The artifact name without any
7
+ * Scala suffix (`upickle`), the Scala binary version from the suffix (`3`),
8
+ * the platform suffix including the underscore (`_sjs1`) or an empty string,
9
+ * and the artifact name sbt-style purls emit (binary suffix dropped, platform
10
+ * suffix kept).
11
+ */
12
+ export declare function parseScalaArtifact(name: string): {
13
+ originalName: string;
14
+ artifactBase: string;
15
+ binaryVersion: string | null;
16
+ platformSuffix: string;
17
+ purlName: string;
18
+ };
19
+ /**
20
+ * Build a qualifier-free coordinate key for a Scala-published artifact.
21
+ *
22
+ * The key ignores purl qualifiers such as `repository_url` and `type`, so the
23
+ * POM-coordinate keys of the jar namespace mapping and the sbt-style purls of
24
+ * the components resolve to the same entry.
25
+ *
26
+ * @param {Object} parts Coordinate parts
27
+ * @param {string} [parts.type] Purl type, defaults to `maven`
28
+ * @param {string} [parts.group] Maven groupId
29
+ * @param {string} parts.artifactBase Artifact name without any Scala suffix
30
+ * @param {string} [parts.platformSuffix] `_sjs1`, `_native0.5` or empty
31
+ * @param {string} [parts.version] Package version
32
+ * @returns {string} The coordinate key
33
+ */
34
+ export declare function scalaCoordinateKey({ type, group, artifactBase, platformSuffix, version, }?: {
35
+ type?: string;
36
+ group?: string;
37
+ artifactBase: string;
38
+ platformSuffix?: string;
39
+ version?: string;
40
+ }): string;
41
+ /**
42
+ * Build the qualifier-free coordinate key of a purl string.
43
+ *
44
+ * The artifact name is normalized with {@link parseScalaArtifact}, so
45
+ * `pkg:maven/g/foo_3@1.0` and the sbt-style `pkg:maven/g/foo@1.0` share a key,
46
+ * while the Scala.js build `foo_sjs1_3` keeps its own key (`foo` plus the
47
+ * `_sjs1` platform suffix) and never joins the plain `foo` component.
48
+ *
49
+ * @param {string} purlString Package URL to normalize
50
+ * @returns {string|undefined} The coordinate key, or undefined when the string
51
+ * is not a parseable purl
52
+ */
53
+ export declare function coordinateKeyFromPurl(purlString: string): string | undefined;
54
+ /**
55
+ * The coordinate key of a purl together with the Scala binary version its
56
+ * artifact name carries, if any.
57
+ *
58
+ * @param {string} purlString Package URL to normalize
59
+ * @returns {{ key: string, binaryVersion: string|null }|undefined} The key
60
+ * and binary version, or undefined when the string is not a parseable purl
61
+ */
62
+ export declare function scalaCoordinateOfPurl(purlString: string): {
63
+ key: string;
64
+ binaryVersion: string | null;
65
+ } | undefined;
66
+ /**
67
+ * The artifactId the library is published under, for cache and repository
68
+ * lookups only. Components a Scala build tool reports carry the name with the
69
+ * Scala binary suffix stripped (the platform suffix kept) together with
70
+ * `cdx:scala:compilerVersion`; on disk and in the repository the artifact is
71
+ * `cats-core_2.13` or `upickle_sjs1_3`. Names that end in a full Scala version
72
+ * are used as they are.
73
+ *
74
+ * The component's own `name`, `purl` and `bom-ref` never change.
75
+ *
76
+ * @param {Object} pkg Package with `name` and `properties`.
77
+ * @returns {string} The artifactId to look up.
78
+ */
79
+ export declare function publishedArtifactId(pkg: Object): string;
80
+ //# sourceMappingURL=scalaCoords.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scalaCoords.d.ts","sourceRoot":"","sources":["../../../lib/inventory/scalaCoords.js"],"names":[],"mappings":"AAWA;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAR5B,MAQ4B,GAP1B;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,GAAC,IAAI,CAAC;IACjF,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;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H,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,CA4D5D;AA6GD;;GAEG;AACH,wBAAgB,yBAAyB,SAExC;AAID;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CAAC,WAAW,EAJ5C,KAAK,CAAC,MAAM,CAIgC,GAF1C,OAAO,CAAC,IAAI,CAAC,CA6BzB;AAiDD;;;;;;;;;;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"}
@@ -57,6 +57,15 @@ export declare function readLicenseText(licenseFilepath: any, licenseContentType
57
57
  * @param {string} name License full name
58
58
  */
59
59
  export declare function findLicenseId(name: string): any;
60
+ /**
61
+ * Identify a license from the title and opening of its full text. A license
62
+ * text quotes other licenses (the GNU GPL's text names the GNU Lesser GPL),
63
+ * so the substring scan of `guessLicenseId` alone can name the wrong one.
64
+ *
65
+ * @param {string} content License file contents
66
+ * @returns {string|undefined} SPDX license id or expression
67
+ */
68
+ export declare function licenseIdFromText(content: string): string | undefined;
60
69
  /**
61
70
  * Method to guess the spdx license id from license contents
62
71
  *
@@ -1 +1 @@
1
- {"version":3,"file":"spdx.d.ts","sourceRoot":"","sources":["../../../lib/inventory/spdx.js"],"names":[],"mappings":"AAeA;;;;GA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;;GAGG;AACH,wBAAgB,eAAe,CAAC,eAAe,KAAA,EAAE,kBAAkB,KAAA;;SAUlE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAFvB,MAEuB,OAYjC;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAH9B,MAG8B,GAF5B,MAAM,GAAC,SAAS,CAyF5B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAF3B,MAE2B,OAcrC"}
@@ -97,6 +97,18 @@ export declare function executeAndTrace(commandStr: string, workingDir?: string,
97
97
  egressEntries?: Object[];
98
98
  dryRunSummary?: Object;
99
99
  }>;
100
+ /**
101
+ * Picks the safer-exec engine's own lines out of the stderr it shares with the
102
+ * traced command. Warnings start with "safer-exec: warning:"; when the engine
103
+ * stops a run, its error is the last other "safer-exec: " line it prints.
104
+ *
105
+ * @param {string} stderr Captured stderr of a safer-exec run
106
+ * @returns {{warnings: string[], error: string|undefined}} Unique engine warnings, and the engine's error if any
107
+ */
108
+ export declare function engineMessages(stderr: string): {
109
+ warnings: string[];
110
+ error: string | undefined;
111
+ };
100
112
  /**
101
113
  * Extracts the egress proxy's decisions from a safer-exec audit log.
102
114
  * "proxy-connect" targets are "host:port"; "proxy-violation" targets are
@@ -1 +1 @@
1
- {"version":3,"file":"traceRunner.d.ts","sourceRoot":"","sources":["../../../lib/inventory/traceRunner.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,IAFvB,OAAO,CAInB;AAKD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAHxB,MAGwB,GAFtB;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAC,CA6BzC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAFzB,MAAM,GAAC,SAAS,CAsE5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,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AAM,EAAE,CAAC;IAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAoWxH;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAH1B,MAG0B,GAFxB;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,GAAC,SAAS,CAAA;CAAC,CAazD;AAuBD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAHhC,MAAM,EAG0B,GAF9B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,EAAE,CAkD9E;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,iBAAiB,EAHjD,MAAM,EAG2C;eAFlB,GAAG,CAAC,MAAM,CAAC;gBAAc,MAAM,EAAE;GA+C1E"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Names the bulk cipher of a TLS cipher suite as a crypto-oid.json key, from
3
+ * either its IANA name (TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) or its OpenSSL
4
+ * name (ECDHE-RSA-AES128-GCM-SHA256).
5
+ *
6
+ * @param {string} suiteName Cipher suite name
7
+ * @returns {{name: string, bits: number, mode: string|undefined}|undefined} The cipher, when it has an OID
8
+ */
9
+ export declare function suiteCipher(suiteName: string): {
10
+ name: string;
11
+ bits: number;
12
+ mode: string | undefined;
13
+ } | undefined;
14
+ /**
15
+ * Turns the CBOM safer-exec writes for a traced command into components that
16
+ * cdxgen can merge and validate:
17
+ *
18
+ * - every asset gets a bom-ref, without which the assets merge into one
19
+ * - algorithms carry their OID, and those without one are left out
20
+ * - hybrid key-exchange groups become their classical and ML-KEM halves
21
+ * - cipher suites become their bulk cipher, which the protocol's suites refer
22
+ * to by bom-ref
23
+ * - algorithm properties keep only values the schema allows
24
+ * - crypto libraries are left out: they are the traced library components,
25
+ * marked with cdx:dynamic:cryptoLibrary
26
+ *
27
+ * @param {Object[]} cbomComponents Components of the safer-exec CBOM
28
+ * @returns {Object[]} Normalized cryptographic-asset components
29
+ */
30
+ export declare function normalizeTracedCryptoComponents(cbomComponents: Object[]): Object[];
31
+ /**
32
+ * Maps the crypto libraries safer-exec reported to the paths they were loaded
33
+ * from.
34
+ *
35
+ * @param {Object[]} cryptoEntries safer-exec crypto-library and crypto-cipher audit entries
36
+ * @returns {Map<string, {name: string, version: string}>} Crypto libraries by path
37
+ */
38
+ export declare function cryptoLibrariesByPath(cryptoEntries: Object[]): Map<string, {
39
+ name: string;
40
+ version: string;
41
+ }>;
42
+ //# sourceMappingURL=tracedCrypto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracedCrypto.d.ts","sourceRoot":"","sources":["../../../lib/inventory/tracedCrypto.js"],"names":[],"mappings":"AAqDA;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAH1B,MAG0B,GAFxB;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAC,SAAS,CAAA;CAAC,GAAC,SAAS,CAuB1E;AA+DD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,+BAA+B,CAAC,cAAc,EAHnD,MAAM,EAG6C,GAFjD,MAAM,EAAE,CA+GpB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAHxC,MAAM,EAGkC,GAFtC,GAAG,CAAC,MAAM,EAAE;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC,CAgBxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../lib/managers/docker.js"],"names":[],"mappings":"AAAA,OAAO,EA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18
18
  *
19
19
  * @param {string} image OCI image reference (e.g. `"registry.example.com/org/app:tag"`)
20
20
  * @param {string} [platform] OCI platform string (e.g. `"linux/amd64"`); no-op for JS implementation
21
+ * @param {Object} [options]
22
+ * @param {function(Buffer): void} [options.checkBytes] Called with the raw bytes of the BOM layer that is about to be returned. An error it throws is rethrown, and no other referrer is tried.
21
23
  * @returns {Promise<Object|undefined>} Parsed CycloneDX BOM JSON object, or `undefined` if not found
22
24
  */
23
- export declare function getBomWithOras(image: string, _platform?: undefined): Promise<Object | undefined>;
25
+ export declare function getBomWithOras(image: string, _platform?: undefined, options?: Object): Promise<Object | undefined>;
24
26
  /**
25
27
  * Attach a CycloneDX BOM to an OCI image using the OCI 1.1 artifact manifest
26
28
  * API, pushing the BOM as a blob and linking it via the referrers API (with a
@@ -1 +1 @@
1
- {"version":3,"file":"oci.d.ts","sourceRoot":"","sources":["../../../lib/managers/oci.js"],"names":[],"mappings":"AAuOA;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAJhC,MAIgC,EAAE,QAAQ,EAH1C,GAG0C,GAFxC,OAAO,CAgBnB;AAoJD;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAJ/B,MAI+B,EAAE,SAAS,YAAY,GAFpD,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CA4GrC;AAmFD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,KAAK,EALhC,MAKgC,EAAE,OAAO,EAJzC,MAIyC,GAHvC,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAmIrC"}
1
+ {"version":3,"file":"oci.d.ts","sourceRoot":"","sources":["../../../lib/managers/oci.js"],"names":[],"mappings":"AAuOA;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAJhC,MAIgC,EAAE,QAAQ,EAH1C,GAG0C,GAFxC,OAAO,CAgBnB;AAuJD;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAPI,MAOJ,EACL,SAAS,YAAY,EACrB,OAAO,AAPN,CACA,EADQ,MAOG,GALD,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CA6HrC;AAmFD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,KAAK,EALhC,MAKgC,EAAE,OAAO,EAJzC,MAIyC,GAHvC,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAmIrC"}
@@ -67,4 +67,20 @@ export declare function resolveCmakeCacheFacts(map: Map<string, {
67
67
  findPackages: Map<string, string>;
68
68
  fetchContentBase?: string;
69
69
  };
70
+ /**
71
+ * Parse a compiler description CMake writes when it configures a build
72
+ * (`CMakeFiles/<cmake version>/CMake<LANG>Compiler.cmake`): the compiler's
73
+ * path, CMake's id for it and its version, all identified by CMake itself.
74
+ *
75
+ * @param {string} text File contents
76
+ * @returns {{language: string, compiler: string, family: string, id: string, version: string}|null}
77
+ * `null` when the text names no compiler
78
+ */
79
+ export declare function parseCmakeCompilerFile(text: string): {
80
+ language: string;
81
+ compiler: string;
82
+ family: string;
83
+ id: string;
84
+ version: string;
85
+ } | null;
70
86
  //# sourceMappingURL=cmakeCache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cmakeCache.d.ts","sourceRoot":"","sources":["../../../lib/parsers/cmakeCache.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAHzB,MAGyB,GAFvB,GAAG,CAAC,MAAM,EAAE;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC,CA0BtD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAJlC,MAIkC,GAHhC,MAAM,GAAC,IAAI,CA0BvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAH/B,GAAG,CAAC,MAAM,EAAE;IAA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,GAAG,CAAC,MAAM,EAAE;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IAAC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,CAiG1P;AAeD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAJhC,MAIgC,GAH9B;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GAAC,IAAI,CAgDlG"}
@@ -27,7 +27,8 @@ export declare function parseCmakeCommands(text: string): {
27
27
  /**
28
28
  * Replace `${VAR}` references with the values of simple `set()` calls. A
29
29
  * reference to an unknown variable is left in place, so callers can tell a
30
- * resolved value from an unresolved one.
30
+ * resolved value from an unresolved one. Expansion stops at the previous
31
+ * round once the text would exceed 64 KiB.
31
32
  *
32
33
  * @param {string} value Argument text
33
34
  * @param {Map<string,string>} variables Known variable values
@@ -1 +1 @@
1
- {"version":3,"file":"cmakeLists.d.ts","sourceRoot":"","sources":["../../../lib/parsers/cmakeLists.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA8DH;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAL5B,MAK4B,GAJ1B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,EAAE,CA8G1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAJ/B,MA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I,EAAE,MAAM,EAAE,CAAA;CAAC,EAGC,GAF7B,GAAG,CAAC,MAAM,EAAC,MAAM,CAAC,CAwB9B;AAgFD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EALhC,MAKgC,GAJ9B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAC,EAAE,CAyG3K"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Pure reader for CMake presets (`CMakePresets.json` and
3
+ * `CMakeUserPresets.json`, schema versions 1 to 10).
4
+ *
5
+ * A configure preset names how a project is configured: the generator, the
6
+ * build directory, the toolchain file and the cache variables (build type,
7
+ * compilers). Presets inherit from one another, may be hidden (templates
8
+ * that only exist to be inherited), may be enabled only under a condition,
9
+ * and spell paths with macros such as `${sourceDir}` and `$env{NAME}`.
10
+ *
11
+ * This module is layer 1: text and a context object in, data out. Reading the
12
+ * files (and their `include` lists) is done by the caller, which also supplies
13
+ * the process environment through `context.penv`.
14
+ */
15
+ /**
16
+ * Parse the text of a presets file.
17
+ *
18
+ * @param {string} text File contents
19
+ * @returns {{version: number|undefined, include: string[], configurePresets: Object[]}|null}
20
+ * `null` when the text is not a presets document
21
+ */
22
+ export declare function parseCmakePresets(text: string): {
23
+ version: number | undefined;
24
+ include: string[];
25
+ configurePresets: Object[];
26
+ } | null;
27
+ /**
28
+ * Expand the macros CMake allows in preset strings.
29
+ *
30
+ * Supported: `${sourceDir}`, `${sourceParentDir}`, `${sourceDirName}`,
31
+ * `${presetName}`, `${generator}`, `${hostSystemName}`, `${fileDir}`,
32
+ * `${dollar}`, `${pathListSep}`, `$env{NAME}` (the preset's own environment,
33
+ * then the process environment) and `$penv{NAME}` (the process environment).
34
+ * `$vendor{...}` and unknown macros are left as written.
35
+ *
36
+ * @param {string} value String to expand
37
+ * @param {Object} context Macro values; `env` (preset environment, a plain
38
+ * object) and `penv` (a function reading the process environment) are
39
+ * optional
40
+ * @returns {string} Expanded string
41
+ */
42
+ export declare function expandPresetMacros(value: string, context?: Object): string;
43
+ /**
44
+ * Evaluate a preset condition (schema version 3 and later).
45
+ *
46
+ * @param {*} condition Condition object (or boolean, or null)
47
+ * @param {function(string): string} expand Macro expander for the preset
48
+ * @returns {boolean|undefined} `undefined` when the condition cannot be
49
+ * decided here: `matches`/`notMatches` take a regular expression from the
50
+ * repository, which is not run
51
+ */
52
+ export declare function evaluatePresetCondition(condition: any, expand: Function): boolean | undefined;
53
+ /**
54
+ * Resolve the configure presets of a set of presets documents.
55
+ *
56
+ * Inheritance follows CMake: a preset's own fields win, then those of its
57
+ * `inherits` entries in order (the first wins), recursively; `cacheVariables`
58
+ * and `environment` merge key by key the same way, and a `null` entry unsets
59
+ * the key. `name`, `hidden`, `inherits`, `description` and `displayName` are
60
+ * not inherited. A preset that is part of an inheritance cycle, or inherits
61
+ * one that does not exist, is dropped.
62
+ *
63
+ * @param {Array<{file: string, fileDir: string, document: Object}>} documents
64
+ * Parsed documents in reading order (`CMakePresets.json` first, then its
65
+ * includes, then `CMakeUserPresets.json`)
66
+ * @param {Object} context `sourceDir`, `hostSystemName`, `pathListSep`, and
67
+ * `penv` (a function reading the process environment)
68
+ * @returns {Object[]} Visible configure presets: `name`, `displayName`,
69
+ * `file`, `inherits`, `generator`, `binaryDir` (absolute), `toolchainFile`,
70
+ * `cacheVariables` (expanded strings), `environment` (expanded strings),
71
+ * `hasCondition`, and `conditionMet` (true, false or undefined)
72
+ */
73
+ export declare function resolveConfigurePresets(documents: Array<{
74
+ file: string;
75
+ fileDir: string;
76
+ document: Object;
77
+ }>, context?: Object): Object[];
78
+ //# sourceMappingURL=cmakePresets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmakePresets.d.ts","sourceRoot":"","sources":["../../../lib/parsers/cmakePresets.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAmBH;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAJ3B,MAI2B,GAHzB;IAAC,OAAO,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAAC,GAAC,IAAI,CAiC3F;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAN7B,MAM6B,EAAE,OAAO,GALtC,MAK2C,GAFzC,MAAM,CAkClB;AAgCD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EANtC,GAMsC,EAAE,MAAM,UAAA,GAJ5C,OAAO,GAAC,SAAS,CA8D7B;AAiBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAVtC,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAUjB,EAAE,OAAO,GAP/C,MAOoD,GALlD,MAAM,EAAE,CA0EpB"}