@cdxgen/cdxgen 13.2.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.
- package/README.md +33 -14
- package/bin/cdxgen.js +310 -138
- package/bin/evinse.js +22 -0
- package/bin/repl.js +86 -0
- package/bin/sign.js +119 -15
- package/bin/tracebom.js +69 -5
- package/bin/validate.js +107 -19
- package/bin/verify.js +172 -63
- package/data/helpers/init.gradle +46 -21
- package/data/remediations.json +85 -0
- package/data/rules/dependency-sources.yaml +67 -0
- package/data/rules/scala-evidence.yaml +115 -0
- package/lib/audit/index.js +38 -6
- package/lib/cli/bomAssembly.js +105 -15
- package/lib/cli/cliOptions.js +93 -1
- package/lib/cli/index.js +156 -58
- package/lib/cli/jsBom.js +99 -53
- package/lib/cli/jvmBom.js +708 -147
- package/lib/cli/managedBom.js +415 -224
- package/lib/cli/nativeBom.js +264 -44
- package/lib/core/activity.js +12 -0
- package/lib/core/env.js +22 -15
- package/lib/core/fs.js +176 -7
- package/lib/core/httpClient.js +159 -24
- package/lib/core/metadataProperties.js +97 -0
- package/lib/core/pluginRun.js +184 -0
- package/lib/core/processTree.js +100 -0
- package/lib/core/projectConfig.js +31 -4
- package/lib/core/runState.js +39 -0
- package/lib/core/toml.js +72 -0
- package/lib/ecosystems/asarutils.js +4 -2
- package/lib/ecosystems/bunutils.js +274 -108
- package/lib/ecosystems/cargoCache.js +231 -8
- package/lib/ecosystems/caxa.js +434 -2
- package/lib/ecosystems/cmakeResolver.js +76 -21
- package/lib/ecosystems/cppBuildContext.js +631 -0
- package/lib/ecosystems/cppEvidence.js +399 -51
- package/lib/ecosystems/cppIncludeResolver.js +294 -0
- package/lib/ecosystems/denoutils.js +93 -66
- package/lib/ecosystems/ecosystems.js +1983 -793
- package/lib/ecosystems/golem.js +28 -12
- package/lib/ecosystems/gradleutils.js +356 -37
- package/lib/ecosystems/jsEvidence.js +104 -44
- package/lib/ecosystems/kosi.js +31 -7
- package/lib/ecosystems/npmutils.js +174 -9
- package/lib/ecosystems/parsers-dotnet.js +616 -159
- package/lib/ecosystems/parsers-elm.js +46 -28
- package/lib/ecosystems/parsers-gleam.js +3 -4
- package/lib/ecosystems/parsers-go.js +371 -70
- package/lib/ecosystems/parsers-js.js +263 -76
- package/lib/ecosystems/parsers-julia.js +2 -3
- package/lib/ecosystems/parsers-jvm.js +204 -12
- package/lib/ecosystems/parsers-misc.js +929 -216
- package/lib/ecosystems/parsers-python.js +167 -24
- package/lib/ecosystems/parsers-rust.js +28 -22
- package/lib/ecosystems/parsers-terraform.js +1573 -19
- package/lib/ecosystems/pythonutils.js +102 -6
- package/lib/ecosystems/remote/huggingface.js +3 -0
- package/lib/ecosystems/rubyutils.js +1492 -182
- package/lib/ecosystems/rusi.js +54 -10
- package/lib/ecosystems/sbtutils.js +243 -187
- package/lib/ecosystems/scalacliutils.js +342 -0
- package/lib/ecosystems/scalasem.js +2618 -0
- package/lib/ecosystems/terraformRegistry.js +288 -0
- package/lib/ecosystems/utils.js +2 -0
- package/lib/ecosystems/vendoredCode.js +156 -0
- package/lib/evinser/evinser.js +1008 -191
- package/lib/evinser/swiftsem.js +1914 -302
- package/lib/helpers/agenticToolutils.js +2 -2
- package/lib/helpers/bomSigner.js +1101 -222
- package/lib/inventory/aiCollector.js +4 -1
- package/lib/inventory/analyzer.js +110 -127
- package/lib/inventory/atomUtils.js +703 -43
- package/lib/inventory/auditCategories.js +7 -0
- package/lib/inventory/buildToolRateLimit.js +144 -0
- package/lib/inventory/cacheCommands.js +2 -1
- package/lib/inventory/cdxrs.js +103 -12
- package/lib/inventory/cmakeBuildDirs.js +254 -0
- package/lib/inventory/deps.js +501 -124
- package/lib/inventory/depsUtils.js +183 -11
- package/lib/inventory/display.js +4 -5
- package/lib/inventory/dosai.js +798 -57
- package/lib/inventory/dosaiParsers.js +310 -15
- package/lib/inventory/dynamic.js +90 -6
- package/lib/inventory/evidenceUtils.js +166 -113
- package/lib/inventory/fetchBatch.js +690 -55
- package/lib/inventory/fetchDiskCache.js +597 -0
- package/lib/inventory/forgeEnricher.js +14 -5
- package/lib/inventory/jvmLocalRepos.js +917 -0
- package/lib/inventory/mcpConfigParser.js +2 -3
- package/lib/inventory/parentSelection.js +146 -0
- package/lib/inventory/protobom.js +8 -1
- package/lib/inventory/purl.js +152 -3
- package/lib/inventory/rustFormulationParser.js +3 -4
- package/lib/inventory/sbomDocument.js +2 -70
- package/lib/inventory/scalaCoords.js +153 -0
- package/lib/inventory/source.js +45 -27
- package/lib/inventory/spdx.js +101 -0
- package/lib/inventory/traceRunner.js +295 -25
- package/lib/inventory/tracedCrypto.js +294 -0
- package/lib/managers/binary.js +115 -24
- package/lib/managers/docker.js +467 -46
- package/lib/managers/oci.js +63 -3
- package/lib/parsers/cmakeCache.js +69 -0
- package/lib/parsers/cmakeLists.js +466 -0
- package/lib/parsers/cmakePresets.js +400 -0
- package/lib/parsers/compileCommands.js +557 -0
- package/lib/parsers/largeJson.js +454 -0
- package/lib/parsers/npmrc.js +19 -1
- package/lib/parsers/strictJson.js +322 -0
- package/lib/parsers/terraformConfig.js +1073 -0
- package/lib/parsers/terraformSource.js +652 -0
- package/lib/server/server.js +23 -0
- package/lib/stages/postgen/introspection/markers.js +1 -1
- package/lib/stages/postgen/postgen.js +83 -16
- package/lib/stages/postgen/specVersionCompat.js +32 -0
- package/lib/validator/bomValidator.js +6 -16
- package/lib/validator/index.js +64 -11
- package/lib/validator/reporters/console.js +3 -0
- package/lib/validator/reporters/json.js +2 -0
- package/lib/validator/reporters/sarif.js +7 -0
- package/package.json +23 -23
- package/types/lib/audit/index.d.ts.map +1 -1
- package/types/lib/cli/bomAssembly.d.ts +2 -1
- package/types/lib/cli/bomAssembly.d.ts.map +1 -1
- package/types/lib/cli/cliOptions.d.ts +33 -1
- package/types/lib/cli/cliOptions.d.ts.map +1 -1
- package/types/lib/cli/index.d.ts.map +1 -1
- package/types/lib/cli/jsBom.d.ts.map +1 -1
- package/types/lib/cli/jvmBom.d.ts +24 -1
- package/types/lib/cli/jvmBom.d.ts.map +1 -1
- package/types/lib/cli/managedBom.d.ts +7 -4
- package/types/lib/cli/managedBom.d.ts.map +1 -1
- package/types/lib/cli/nativeBom.d.ts +3 -1
- package/types/lib/cli/nativeBom.d.ts.map +1 -1
- package/types/lib/core/activity.d.ts.map +1 -1
- package/types/lib/core/env.d.ts +9 -0
- package/types/lib/core/env.d.ts.map +1 -1
- package/types/lib/core/fs.d.ts +55 -0
- package/types/lib/core/fs.d.ts.map +1 -1
- package/types/lib/core/httpClient.d.ts +13 -8
- package/types/lib/core/httpClient.d.ts.map +1 -1
- package/types/lib/core/metadataProperties.d.ts +39 -0
- package/types/lib/core/metadataProperties.d.ts.map +1 -0
- package/types/lib/core/pluginRun.d.ts +97 -0
- package/types/lib/core/pluginRun.d.ts.map +1 -0
- package/types/lib/core/processTree.d.ts +36 -0
- package/types/lib/core/processTree.d.ts.map +1 -0
- package/types/lib/core/projectConfig.d.ts +6 -2
- package/types/lib/core/projectConfig.d.ts.map +1 -1
- package/types/lib/core/runState.d.ts +29 -0
- package/types/lib/core/runState.d.ts.map +1 -0
- package/types/lib/core/toml.d.ts +20 -0
- package/types/lib/core/toml.d.ts.map +1 -0
- package/types/lib/ecosystems/asarutils.d.ts.map +1 -1
- package/types/lib/ecosystems/bunutils.d.ts +12 -5
- package/types/lib/ecosystems/bunutils.d.ts.map +1 -1
- package/types/lib/ecosystems/cargoCache.d.ts +12 -0
- package/types/lib/ecosystems/cargoCache.d.ts.map +1 -1
- package/types/lib/ecosystems/caxa.d.ts +14 -0
- package/types/lib/ecosystems/caxa.d.ts.map +1 -1
- package/types/lib/ecosystems/cmakeResolver.d.ts +28 -3
- package/types/lib/ecosystems/cmakeResolver.d.ts.map +1 -1
- package/types/lib/ecosystems/cppBuildContext.d.ts +55 -0
- package/types/lib/ecosystems/cppBuildContext.d.ts.map +1 -0
- package/types/lib/ecosystems/cppEvidence.d.ts +17 -1
- package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/cppIncludeResolver.d.ts +92 -0
- package/types/lib/ecosystems/cppIncludeResolver.d.ts.map +1 -0
- package/types/lib/ecosystems/denoutils.d.ts +9 -3
- package/types/lib/ecosystems/denoutils.d.ts.map +1 -1
- package/types/lib/ecosystems/ecosystems.d.ts +62 -13
- package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
- package/types/lib/ecosystems/golem.d.ts.map +1 -1
- package/types/lib/ecosystems/gradleutils.d.ts +70 -4
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
- package/types/lib/ecosystems/jsEvidence.d.ts +5 -2
- package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/kosi.d.ts +13 -0
- package/types/lib/ecosystems/kosi.d.ts.map +1 -1
- package/types/lib/ecosystems/npmutils.d.ts +57 -0
- package/types/lib/ecosystems/npmutils.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-dotnet.d.ts +118 -4
- package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-gleam.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-go.d.ts +54 -2
- package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-js.d.ts +16 -5
- package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-jvm.d.ts +46 -1
- package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-misc.d.ts +70 -4
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-python.d.ts +53 -3
- package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-terraform.d.ts +38 -21
- package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -1
- package/types/lib/ecosystems/pythonutils.d.ts +27 -2
- package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
- package/types/lib/ecosystems/remote/huggingface.d.ts.map +1 -1
- package/types/lib/ecosystems/rubyutils.d.ts +164 -3
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
- package/types/lib/ecosystems/rusi.d.ts +13 -0
- package/types/lib/ecosystems/rusi.d.ts.map +1 -1
- package/types/lib/ecosystems/sbtutils.d.ts +88 -2
- package/types/lib/ecosystems/sbtutils.d.ts.map +1 -1
- package/types/lib/ecosystems/scalacliutils.d.ts +56 -0
- package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -0
- package/types/lib/ecosystems/scalasem.d.ts +311 -0
- package/types/lib/ecosystems/scalasem.d.ts.map +1 -0
- package/types/lib/ecosystems/terraformRegistry.d.ts +9 -0
- package/types/lib/ecosystems/terraformRegistry.d.ts.map +1 -0
- package/types/lib/ecosystems/utils.d.ts +2 -2
- package/types/lib/ecosystems/utils.d.ts.map +1 -1
- package/types/lib/ecosystems/vendoredCode.d.ts +32 -0
- package/types/lib/ecosystems/vendoredCode.d.ts.map +1 -0
- package/types/lib/evinser/evinser.d.ts +132 -15
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/evinser/swiftsem.d.ts +280 -15
- package/types/lib/evinser/swiftsem.d.ts.map +1 -1
- package/types/lib/helpers/bomSigner.d.ts +182 -13
- package/types/lib/helpers/bomSigner.d.ts.map +1 -1
- package/types/lib/inventory/aiCollector.d.ts.map +1 -1
- package/types/lib/inventory/analyzer.d.ts.map +1 -1
- package/types/lib/inventory/atomUtils.d.ts +219 -5
- package/types/lib/inventory/atomUtils.d.ts.map +1 -1
- package/types/lib/inventory/auditCategories.d.ts +3 -0
- package/types/lib/inventory/auditCategories.d.ts.map +1 -1
- package/types/lib/inventory/buildToolRateLimit.d.ts +38 -0
- package/types/lib/inventory/buildToolRateLimit.d.ts.map +1 -0
- package/types/lib/inventory/cacheCommands.d.ts +2 -1
- package/types/lib/inventory/cacheCommands.d.ts.map +1 -1
- package/types/lib/inventory/cdxrs.d.ts +8 -3
- package/types/lib/inventory/cdxrs.d.ts.map +1 -1
- package/types/lib/inventory/cmakeBuildDirs.d.ts +58 -0
- package/types/lib/inventory/cmakeBuildDirs.d.ts.map +1 -0
- package/types/lib/inventory/deps.d.ts +59 -1
- package/types/lib/inventory/deps.d.ts.map +1 -1
- package/types/lib/inventory/depsUtils.d.ts +15 -0
- package/types/lib/inventory/depsUtils.d.ts.map +1 -1
- package/types/lib/inventory/display.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +121 -9
- package/types/lib/inventory/dosai.d.ts.map +1 -1
- package/types/lib/inventory/dosaiParsers.d.ts +53 -7
- package/types/lib/inventory/dosaiParsers.d.ts.map +1 -1
- package/types/lib/inventory/dynamic.d.ts +10 -0
- package/types/lib/inventory/dynamic.d.ts.map +1 -1
- package/types/lib/inventory/evidenceUtils.d.ts +19 -4
- package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
- package/types/lib/inventory/fetchBatch.d.ts +83 -14
- package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
- package/types/lib/inventory/fetchDiskCache.d.ts +169 -0
- package/types/lib/inventory/fetchDiskCache.d.ts.map +1 -0
- package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
- package/types/lib/inventory/jvmLocalRepos.d.ts +178 -0
- package/types/lib/inventory/jvmLocalRepos.d.ts.map +1 -0
- package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/parentSelection.d.ts +34 -0
- package/types/lib/inventory/parentSelection.d.ts.map +1 -0
- package/types/lib/inventory/plugins.d.ts.map +1 -1
- package/types/lib/inventory/protobom.d.ts.map +1 -1
- package/types/lib/inventory/purl.d.ts +71 -2
- package/types/lib/inventory/purl.d.ts.map +1 -1
- package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
- package/types/lib/inventory/sbomDocument.d.ts.map +1 -1
- package/types/lib/inventory/scalaCoords.d.ts +80 -0
- package/types/lib/inventory/scalaCoords.d.ts.map +1 -0
- package/types/lib/inventory/source.d.ts.map +1 -1
- package/types/lib/inventory/spdx.d.ts +9 -0
- package/types/lib/inventory/spdx.d.ts.map +1 -1
- package/types/lib/inventory/traceRunner.d.ts +59 -1
- package/types/lib/inventory/traceRunner.d.ts.map +1 -1
- package/types/lib/inventory/tracedCrypto.d.ts +42 -0
- package/types/lib/inventory/tracedCrypto.d.ts.map +1 -0
- package/types/lib/managers/binary.d.ts +30 -1
- package/types/lib/managers/binary.d.ts.map +1 -1
- package/types/lib/managers/docker.d.ts +29 -0
- package/types/lib/managers/docker.d.ts.map +1 -1
- package/types/lib/managers/oci.d.ts +17 -1
- package/types/lib/managers/oci.d.ts.map +1 -1
- package/types/lib/parsers/cmakeCache.d.ts +16 -0
- package/types/lib/parsers/cmakeCache.d.ts.map +1 -1
- package/types/lib/parsers/cmakeLists.d.ts +77 -0
- package/types/lib/parsers/cmakeLists.d.ts.map +1 -0
- package/types/lib/parsers/cmakePresets.d.ts +78 -0
- package/types/lib/parsers/cmakePresets.d.ts.map +1 -0
- package/types/lib/parsers/compileCommands.d.ts +115 -0
- package/types/lib/parsers/compileCommands.d.ts.map +1 -0
- package/types/lib/parsers/largeJson.d.ts +52 -0
- package/types/lib/parsers/largeJson.d.ts.map +1 -0
- package/types/lib/parsers/npmrc.d.ts +5 -0
- package/types/lib/parsers/npmrc.d.ts.map +1 -1
- package/types/lib/parsers/strictJson.d.ts +46 -0
- package/types/lib/parsers/strictJson.d.ts.map +1 -0
- package/types/lib/parsers/terraformConfig.d.ts +70 -0
- package/types/lib/parsers/terraformConfig.d.ts.map +1 -0
- package/types/lib/parsers/terraformSource.d.ts +66 -0
- package/types/lib/parsers/terraformSource.d.ts.map +1 -0
- package/types/lib/server/server.d.ts.map +1 -1
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
- package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
- package/types/lib/validator/index.d.ts +18 -1
- package/types/lib/validator/index.d.ts.map +1 -1
- package/types/lib/validator/reporters/console.d.ts.map +1 -1
- package/types/lib/validator/reporters/json.d.ts.map +1 -1
- package/types/lib/validator/reporters/sarif.d.ts.map +1 -1
- package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +0 -462
|
@@ -311,8 +311,6 @@ export declare function parseSwiftResolved(resolvedFile: string): {
|
|
|
311
311
|
name: any;
|
|
312
312
|
group: any;
|
|
313
313
|
version: any;
|
|
314
|
-
purl: string;
|
|
315
|
-
"bom-ref": string;
|
|
316
314
|
properties: {
|
|
317
315
|
name: string;
|
|
318
316
|
value: string;
|
|
@@ -329,6 +327,55 @@ export declare function parseSwiftResolved(resolvedFile: string): {
|
|
|
329
327
|
};
|
|
330
328
|
};
|
|
331
329
|
}[];
|
|
330
|
+
/**
|
|
331
|
+
* Identify the targets of a Swift package that are part of what it ships.
|
|
332
|
+
*
|
|
333
|
+
* Production targets are the non-test targets that are part of a product,
|
|
334
|
+
* executables, macros, plugins, targets nothing else depends on, and every
|
|
335
|
+
* target they depend on. The remaining non-test targets only serve tests,
|
|
336
|
+
* such as snapshot or fixture helper libraries.
|
|
337
|
+
*
|
|
338
|
+
* @param {Object} dumpJson `swift package dump-package` document
|
|
339
|
+
* @returns {Set<string>} Lowercase names of the production targets
|
|
340
|
+
*/
|
|
341
|
+
export declare function collectSwiftProductionTargets(dumpJson: Object): Set<string>;
|
|
342
|
+
/**
|
|
343
|
+
* Classify the dependencies of a Swift package into the packages its shipped
|
|
344
|
+
* code needs and the packages only its tests need.
|
|
345
|
+
*
|
|
346
|
+
* Production targets are the non-test targets that are part of a product,
|
|
347
|
+
* executables, macros, plugins, targets nothing else depends on, and every
|
|
348
|
+
* target they depend on. The remaining non-test targets only serve tests
|
|
349
|
+
* (test-support libraries). A package is test-only when only test and
|
|
350
|
+
* test-support targets reference its products or use its plugins. With the dependency graph from
|
|
351
|
+
* `swift package show-dependencies`, the packages reachable only through
|
|
352
|
+
* test-only packages are test-only as well; a package reachable from a
|
|
353
|
+
* production dependency, or from a declared dependency no target references,
|
|
354
|
+
* stays required.
|
|
355
|
+
*
|
|
356
|
+
* Target dependencies reference products either as
|
|
357
|
+
* `{"product": [name, package]}` or `{"byName": [name]}`; SwiftPM resolves a
|
|
358
|
+
* `byName` product through the package of the same name. When a production
|
|
359
|
+
* `byName` reference names neither a local target nor a package, the
|
|
360
|
+
* classification is abandoned rather than risking a required package being
|
|
361
|
+
* scoped optional.
|
|
362
|
+
*
|
|
363
|
+
* @param {Object|String} dumpJson `swift package dump-package` document, parsed or as text
|
|
364
|
+
* @param {Object|String} [treeJson] `swift package show-dependencies --format json` document, parsed or as text
|
|
365
|
+
* @returns {Object} `{ optionalRefs, requiredRefs, optionalNames, requiredNames }`:
|
|
366
|
+
* bom-refs from the dependency graph, and lowercase package identities,
|
|
367
|
+
* names, and repository names (the only result without a graph)
|
|
368
|
+
*/
|
|
369
|
+
export declare function classifySwiftDependencyScopes(dumpJson: Object | string, treeJson?: Object | string): Object;
|
|
370
|
+
/**
|
|
371
|
+
* Decide whether a dump-package target is a test target. The `type` field is
|
|
372
|
+
* usually the string `"test"`, but manifest APIs have also been observed
|
|
373
|
+
* representing it as an object.
|
|
374
|
+
*
|
|
375
|
+
* @param {Object} atarget dump-package target
|
|
376
|
+
* @returns {boolean} `true` for test targets
|
|
377
|
+
*/
|
|
378
|
+
export declare function isSwiftTestTarget(atarget: Object): boolean;
|
|
332
379
|
/**
|
|
333
380
|
* Parse a CMake-generated dot/graphviz file and extract components and their dependency
|
|
334
381
|
* relationships.
|
|
@@ -347,12 +394,29 @@ export declare function parseCmakeDotFile(dotFile: string, pkgType: string, opti
|
|
|
347
394
|
pkgList: Object[];
|
|
348
395
|
dependenciesList: Object[];
|
|
349
396
|
};
|
|
397
|
+
/**
|
|
398
|
+
* The component for a dependency a CMake file downloads at configure time
|
|
399
|
+
* (`FetchContent_Declare`, `ExternalProject_Add`, `CPMAddPackage`).
|
|
400
|
+
*
|
|
401
|
+
* A git repository becomes a `github` purl, or a `generic` one with a
|
|
402
|
+
* `vcs_url`, at its tag or commit. A GitHub archive URL becomes a `github` purl
|
|
403
|
+
* at the ref it names. Any other URL becomes a `generic` purl with a
|
|
404
|
+
* `download_url`, and a `URL_HASH` becomes a hash. A version that still holds an
|
|
405
|
+
* unresolved `${VAR}` is left out rather than published.
|
|
406
|
+
*
|
|
407
|
+
* @param {Object} dep Dependency facts from `cmakeFetchDependencies`
|
|
408
|
+
* @param {string} srcFile The CMake file the dependency was read from
|
|
409
|
+
* @returns {Object} The component
|
|
410
|
+
*/
|
|
411
|
+
export declare function cmakeFetchDependencyComponent(dep: Object, srcFile: string): Object;
|
|
350
412
|
/**
|
|
351
413
|
* Parse a CMake-like build file (CMakeLists.txt, meson.build, etc.) and extract the
|
|
352
414
|
* parent component and list of dependency packages.
|
|
353
415
|
*
|
|
354
416
|
* Handles `set`, `project`, `find_package`, `find_library`, `find_dependency`,
|
|
355
|
-
* `find_file
|
|
417
|
+
* `find_file` and `dependency()` directives (CMake command names in any case),
|
|
418
|
+
* and, for CMake files, the dependencies downloaded at configure time by
|
|
419
|
+
* `FetchContent_Declare`, `ExternalProject_Add` and `CPMAddPackage`.
|
|
356
420
|
* Uses the MesonWrapDB to improve name resolution confidence.
|
|
357
421
|
*
|
|
358
422
|
* @param {string} cmakeListFile Path to the CMake-like build file
|
|
@@ -389,9 +453,11 @@ export declare function parseMakeDFile(dfile: string): Object;
|
|
|
389
453
|
*
|
|
390
454
|
* @param {Object} podfileLock The content of the podfile.lock as an Object
|
|
391
455
|
* @param {String} projectPath The path to the project root
|
|
456
|
+
* @param {String} [scanRoot] Directory the scan was asked for. Local `:path`
|
|
457
|
+
* and `:podspec` sources outside it are not read. Defaults to projectPath.
|
|
392
458
|
* @returns {Map} Map of all dependencies with their direct dependencies
|
|
393
459
|
*/
|
|
394
|
-
export declare function parsePodfileLock(podfileLock: Object, projectPath: string): Map<any, any>;
|
|
460
|
+
export declare function parsePodfileLock(podfileLock: Object, projectPath: string, scanRoot?: string): Map<any, any>;
|
|
395
461
|
/**
|
|
396
462
|
* Parse all targets and their direct dependencies from the 'Podfile'
|
|
397
463
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers-misc.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-misc.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsers-misc.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-misc.js"],"names":[],"mappings":"AA4EA;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,KAAA,EAAE,QAAQ,KAAA,GAF/C,MAAM,CA8ElB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAHjC,MAGiC,GAF/B,MAAM,EAAE,CA+BpB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAH/B,MAG+B,GAF7B,MAAM,EAAE,CAiEpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EALvC,MAAM,WAAO,MAK0B,EAAE,OAAO,EAJhD,MAAM,EAI0C,EAAE,OAAO,EAHzD,MAAM,EAGmD,GAFvD,MAAM,EAAE,CAoEpB;AAmBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAHpC,MAGoC,GAFlC,MAAM,EAAE,CAmEpB;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAH7C,MAG6C,GAF3C,MAAM,EAAE,CA6DpB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAHlC,MAGkC,GAFhC,MAAM,EAAE,CAmEpB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAH/B,MAG+B,GAF7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,EALjC,QAKiC,EAAE,IAAI,QAAA,EAAE,OAAO,EAHhD,MAGgD,GAF9C,MAAM,CAyDlB;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,UAAU,EAND,MAMC,EACV,OAAO,EANE,MAMF,EACP,IAAI,AANH,CACA,QAKe,GALL,MAAM,CA0FlB;AA+BD;;GAEG;AACH,wBAAgB,yBAAyB,SAExC;AAID;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CAAC,YAAY,EAJ7C,KAAK,CAAC,MAAM,CAIiC,GAF3C,OAAO,CAAC,IAAI,CAAC,CA4CzB;AA0UD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAHpC,MAGoC,GAFlC,MAAM,EAAE,CAoHpB"}
|
|
@@ -11,8 +11,11 @@ export declare function parsePyRequiresDist(dist_string: string): {
|
|
|
11
11
|
* Method to parse pipfile.lock data
|
|
12
12
|
*
|
|
13
13
|
* @param {Object} lockData JSON data from Pipfile.lock
|
|
14
|
+
* @param {Object[]} [installedMetadata] Components parsed from the installed
|
|
15
|
+
* `*.dist-info/METADATA` files of this machine, which answer before PyPI
|
|
16
|
+
* is asked
|
|
14
17
|
*/
|
|
15
|
-
export declare function parsePiplockData(lockData: Object): Promise<any[]>;
|
|
18
|
+
export declare function parsePiplockData(lockData: Object, installedMetadata?: Object[]): Promise<any[]>;
|
|
16
19
|
/**
|
|
17
20
|
* Append a deduplicated name/value property to a component's properties array.
|
|
18
21
|
*
|
|
@@ -41,14 +44,58 @@ export declare function parsePyProjectTomlFile(tomlFile: string): Object;
|
|
|
41
44
|
* @returns {string | undefined} The derived file name, or undefined when none can be derived.
|
|
42
45
|
*/
|
|
43
46
|
export declare function derivePythonLockMetadataFileName(fileEntry: object): string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Normalise a Python distribution name the way PEP 503 does, so an installed
|
|
49
|
+
* distribution and the lockfile entry it belongs to compare equal whatever
|
|
50
|
+
* separator and case each of them used.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} value Distribution name
|
|
53
|
+
* @returns {string|undefined} The normalised name, or undefined for no name
|
|
54
|
+
*/
|
|
55
|
+
export declare function normalizePep503Name(value: string): string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* The key an installed distribution and a lockfile entry are matched by: the
|
|
58
|
+
* PEP 503 normalised name and the version.
|
|
59
|
+
*
|
|
60
|
+
* @param {Object} p Component with `name` and `version`
|
|
61
|
+
* @returns {string|undefined} The key, or undefined without a name or version
|
|
62
|
+
*/
|
|
63
|
+
export declare function installedMetadataKey(p: Object): string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Enrich lockfile entries from the installed distributions on this machine,
|
|
66
|
+
* before PyPI is asked.
|
|
67
|
+
*
|
|
68
|
+
* Each entry of `installedMetadata` is a component as
|
|
69
|
+
* {@link parseBdistMetadata} builds it from an installed `*.dist-info/METADATA`
|
|
70
|
+
* file. An entry is matched to the lockfile component with the same PEP 503
|
|
71
|
+
* normalised name and the same version, and fills the fields it lacks, so the
|
|
72
|
+
* registry is left only what the installed distributions do not answer. An
|
|
73
|
+
* installed release of another version describes a different release, so it
|
|
74
|
+
* enriches nothing. The distributions enrich the entries in place; no new
|
|
75
|
+
* components are created.
|
|
76
|
+
*
|
|
77
|
+
* @param {Object[]} pkgList Lockfile components, enriched in place
|
|
78
|
+
* @param {Object[]} installedMetadata Components parsed from installed
|
|
79
|
+
* `*.dist-info/METADATA` files
|
|
80
|
+
* @returns {Set<string>} The keys of the installations that enriched an entry,
|
|
81
|
+
* as {@link installedMetadataKey} builds them, so a caller that also walks
|
|
82
|
+
* the METADATA files can skip those as components
|
|
83
|
+
*/
|
|
84
|
+
export declare function enrichFromInstalledMetadata(pkgList: Object[], installedMetadata: Object[]): Set<string>;
|
|
44
85
|
/**
|
|
45
86
|
* Method to parse python lock files such as poetry.lock, pdm.lock, uv.lock, and pylock.toml.
|
|
46
87
|
*
|
|
47
88
|
* @param {string} lockData Raw TOML text from poetry.lock, pdm.lock, uv.lock, or pylock.toml
|
|
48
89
|
* @param {string} lockFile Lock file name for evidence
|
|
49
90
|
* @param {string} pyProjectFile pyproject.toml file
|
|
91
|
+
* @param {Object} [options] Options
|
|
92
|
+
* @param {Object[]} [options.installedMetadata] Components parsed from the
|
|
93
|
+
* installed `*.dist-info/METADATA` files of this machine, which answer
|
|
94
|
+
* before PyPI is asked
|
|
50
95
|
*/
|
|
51
|
-
export declare function parsePyLockData(lockData: string, lockFile: string, pyProjectFile: string
|
|
96
|
+
export declare function parsePyLockData(lockData: string, lockFile: string, pyProjectFile: string, options?: {
|
|
97
|
+
installedMetadata?: Object[];
|
|
98
|
+
}): Promise<{
|
|
52
99
|
pkgList: any[];
|
|
53
100
|
dependenciesList: any[];
|
|
54
101
|
parentComponent?: undefined;
|
|
@@ -76,10 +123,13 @@ export declare function parsePyLockData(lockData: string, lockFile: string, pyPr
|
|
|
76
123
|
*
|
|
77
124
|
* @param {String} reqFile Requirements.txt file
|
|
78
125
|
* @param {Boolean} fetchDepsInfo Fetch dependencies info from pypi
|
|
126
|
+
* @param {Object[]} [installedMetadata] Components parsed from the installed
|
|
127
|
+
* `*.dist-info/METADATA` files of this machine, which answer before PyPI
|
|
128
|
+
* is asked
|
|
79
129
|
*
|
|
80
130
|
* @returns {Promise[Array<Object>]} List of direct dependencies from the requirements file
|
|
81
131
|
*/
|
|
82
|
-
export declare function parseReqFile(reqFile: string, fetchDepsInfo?: boolean): any;
|
|
132
|
+
export declare function parseReqFile(reqFile: string, fetchDepsInfo?: boolean, installedMetadata?: Object[]): any;
|
|
83
133
|
/**
|
|
84
134
|
* Parse environment markers into structured format
|
|
85
135
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers-python.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-python.js"],"names":[],"mappings":"AAiEA;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,QAAA;;;cAq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,EAAE,CAAA;CAAC,CAwJ1D;AAED;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAAC,SAAS,EAH5C,MAG4C,GAF1C,OAAO,CAAC,MAAM,EAAE,CAAC,CA4B7B"}
|
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Terraform
|
|
2
|
+
* Whether a path holds any Terraform or OpenTofu configuration or lock file
|
|
3
|
+
* the workspace assembly would consider; used by project-type autodetection.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `version` and `constraints` attributes, and a `hashes` list of prefixed
|
|
8
|
-
* digests. A line scanner is sufficient and avoids a general HCL parser.
|
|
9
|
-
*
|
|
10
|
-
* Provider addresses look like `registry.terraform.io/hashicorp/aws`; the
|
|
11
|
-
* registry host and namespace identify the provider upstream, so they are
|
|
12
|
-
* kept in the component group and a generic purl
|
|
13
|
-
* (`pkg:generic/<host>/<namespace>/<type>@<version>`), with the intended type
|
|
14
|
-
* recorded as a `cdx:purl:proposedType` property because no `terraform`
|
|
15
|
-
* purl type is registered.
|
|
16
|
-
*
|
|
17
|
-
* The two hash schemes in the `hashes` list mean different things. A `zh:`
|
|
18
|
-
* digest is a SHA-256 of the official `.zip` package as the registry indexes
|
|
19
|
-
* it, so it is the one a consumer can check an artifact against and the one
|
|
20
|
-
* emitted in the CycloneDX `hashes` array. An `h1:` digest is base64 over a
|
|
21
|
-
* hash of the package's *contents* rather than the archive, which lets
|
|
22
|
-
* Terraform verify an unpacked directory but makes it useless as an artifact
|
|
23
|
-
* checksum; it is kept as a property instead of being mislabelled SHA-256.
|
|
5
|
+
* @param {string} scanPath Directory to scan
|
|
6
|
+
* @param {Object} [options] CLI options
|
|
7
|
+
* @returns {boolean}
|
|
24
8
|
*/
|
|
9
|
+
export declare function hasTerraformConfiguration(scanPath: string, options?: Object): boolean;
|
|
25
10
|
/**
|
|
26
11
|
* Parse a `.terraform.lock.hcl` file.
|
|
27
12
|
*
|
|
@@ -31,4 +16,36 @@
|
|
|
31
16
|
export declare function parseTerraformLockFile(lockFile: string): {
|
|
32
17
|
pkgList: object[];
|
|
33
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* Locate the Terraform roots under `scanPath`: directories that own a
|
|
21
|
+
* configuration — those with a lock file or module manifest, plus config
|
|
22
|
+
* directories no other config directory references through a local module
|
|
23
|
+
* call.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} scanPath Directory to scan
|
|
26
|
+
* @param {Object} options CLI options
|
|
27
|
+
* @returns {{ dir: string, lockFile?: string, manifestFile?: string }[]} Roots sorted by relative POSIX path
|
|
28
|
+
*/
|
|
29
|
+
export declare function findTerraformRoots(scanPath: string, options?: Object): {
|
|
30
|
+
dir: string;
|
|
31
|
+
lockFile?: string;
|
|
32
|
+
manifestFile?: string;
|
|
33
|
+
}[];
|
|
34
|
+
/**
|
|
35
|
+
* Inventory a Terraform workspace: providers from the lock file and
|
|
36
|
+
* `required_providers`, modules from the manifest or the configuration, the
|
|
37
|
+
* dependency graph between them, and offline licenses from the installed
|
|
38
|
+
* packages.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} scanPath Directory to scan
|
|
41
|
+
* @param {Object} options CLI options
|
|
42
|
+
* @param {string} parentRef `bom-ref` of the parent component the CLI built
|
|
43
|
+
* @returns {{ pkgList: object[], dependencies: object[], parentProperties: object[], srcFiles: string[] }}
|
|
44
|
+
*/
|
|
45
|
+
export declare function parseTerraformWorkspace(scanPath: string, options: Object, parentRef: string): {
|
|
46
|
+
pkgList: object[];
|
|
47
|
+
dependencies: object[];
|
|
48
|
+
parentProperties: object[];
|
|
49
|
+
srcFiles: string[];
|
|
50
|
+
};
|
|
34
51
|
//# sourceMappingURL=parsers-terraform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers-terraform.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-terraform.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsers-terraform.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-terraform.js"],"names":[],"mappings":"AAuHA;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAJvC,MAIuC,EAAE,OAAO,AAHxD,CACA,EADQ,MAGqD,GAFnD,OAAO,CAInB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAHpC,MAGoC,GAFlC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAkEjC;AAuLD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAJhC,MAIgC,EAAE,OAAO,GAHzC,MAG8C,GAF5C;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,CA+DvE;AAiGD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EALrC,MAKqC,EAAE,OAAO,EAJ9C,MAI8C,EAAE,SAAS,EAHzD,MAGyD,GAFvD;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAoDzG"}
|
|
@@ -15,6 +15,17 @@ export declare function getVenvMetadata(env?: Object, explicitPath?: string): Ob
|
|
|
15
15
|
* @returns {string} Path to the Python executable or the fallback command name
|
|
16
16
|
*/
|
|
17
17
|
export declare function get_python_command_from_env(env: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* The top-level packages and modules a project provides, wherever they sit
|
|
20
|
+
* in its tree: each outermost package directory (one with an `__init__.py`
|
|
21
|
+
* whose parent has none), and the module files beside such packages, since
|
|
22
|
+
* their directory is a source root. Directories of installed packages
|
|
23
|
+
* (virtual environments, `site-packages`) are not the project's.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} src Path to the project being analysed
|
|
26
|
+
* @returns {Set<string>} Module names
|
|
27
|
+
*/
|
|
28
|
+
export declare function projectModuleNames(src: string): Set<string>;
|
|
18
29
|
/**
|
|
19
30
|
* Is this import satisfied by a module that lives in the project itself?
|
|
20
31
|
*
|
|
@@ -28,13 +39,27 @@ export declare function get_python_command_from_env(env: string): string;
|
|
|
28
39
|
* filesystem whether the module is ours answers it exactly.
|
|
29
40
|
*
|
|
30
41
|
* Checks the project root and a `src/` layout for a module file, a package directory,
|
|
31
|
-
* and a PEP 420 namespace package directory
|
|
42
|
+
* and a PEP 420 namespace package directory, then the top-level packages found
|
|
43
|
+
* anywhere in the project and the modules beside them (tool-heavy repositories
|
|
44
|
+
* keep their Python libraries in places such as `dev_tools/pylibs/`).
|
|
32
45
|
*
|
|
33
46
|
* @param {string} src Path to the project being analysed
|
|
34
47
|
* @param {string} name Imported top-level module name
|
|
35
48
|
* @returns {boolean} `true` if the project supplies this module itself
|
|
36
49
|
*/
|
|
37
50
|
export declare function isFirstPartyModule(src: string, name: string): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Whether a directory holds Python sources for atom to parse.
|
|
53
|
+
*
|
|
54
|
+
* The search skips the directories the manifest searches skip, such as
|
|
55
|
+
* node_modules and dot directories, and honours the exclude patterns, so a
|
|
56
|
+
* Python file shipped inside an npm package does not count.
|
|
57
|
+
*
|
|
58
|
+
* @param {string} src directory
|
|
59
|
+
* @param {Object} options CLI options
|
|
60
|
+
* @returns {boolean} true when the directory holds at least one Python file
|
|
61
|
+
*/
|
|
62
|
+
export declare function hasPythonSources(src: string, options?: Object): boolean;
|
|
38
63
|
/**
|
|
39
64
|
* Method to find python modules by parsing the imports and then checking with PyPI to obtain the latest version
|
|
40
65
|
*
|
|
@@ -71,9 +96,9 @@ export declare function createUVLock(basePath: string, options: Object): void;
|
|
|
71
96
|
*/
|
|
72
97
|
export declare function getPipFrozenTree(basePath: string, reqOrSetupFile: string, tempVenvDir: string, parentComponent: Object, projectRoot: any, getTreeWithPluginFn: any): Object;
|
|
73
98
|
export declare function getPipTreeForPackages(basePath: any, pkgList: any, tempVenvDir: any, parentComponent: any, getTreeWithPluginFn: any): {
|
|
74
|
-
failedPkgList?: undefined;
|
|
75
99
|
rootList?: undefined;
|
|
76
100
|
dependenciesList?: undefined;
|
|
101
|
+
failedPkgList?: undefined;
|
|
77
102
|
} | {
|
|
78
103
|
failedPkgList: any[];
|
|
79
104
|
rootList: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pythonutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/pythonutils.js"],"names":[],"mappings":"AAiCA;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,GAJxB,MAIsC,EAAE,YAAY,AAH5D,CACA,EADQ,MAG2D,GAFzD,MAAM,CAyLlB;AAyED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAHpC,MAGoC,GAFlC,MAAM,CA6BlB;AAED
|
|
1
|
+
{"version":3,"file":"pythonutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/pythonutils.js"],"names":[],"mappings":"AAiCA;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,GAJxB,MAIsC,EAAE,YAAY,AAH5D,CACA,EADQ,MAG2D,GAFzD,MAAM,CAyLlB;AAyED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAHpC,MAGoC,GAFlC,MAAM,CA6BlB;AAgBD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAH3B,MAG2B,GAFzB,GAAG,CAAC,MAAM,CAAC,CAwCvB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAJ3B,MAI2B,EAAE,IAAI,EAHjC,MAGiC,GAF/B,OAAO,CA+BnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAJzB,MAIyB,EAAE,OAAO,GAHlC,MAGuC,GAFrC,OAAO,CAInB;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAL3B,MAK2B,EAAE,QAAQ,OAAA,EAAE,OAAO,EAH9C,MAG8C;;;;;;;;GAoFxD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAH1B,MAG0B,EAAE,OAAO,EAFnC,MAEmC,QAgD7C;AAED;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EARC,MAQD,EACR,cAAc,EARL,MAQK,EACd,WAAW,EARF,MAQE,EACX,eAAe,EARN,MAQM,EACf,WAAW,KAAA,EACX,mBAAmB,KAAA,GARR,MAAM,CAmkBlB;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,KAAA,EACR,OAAO,KAAA,EACP,WAAW,KAAA,EACX,eAAe,KAAA,EACf,mBAAmB,KAAA;;;;;;;;;;;;;;;;EAwNpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huggingface.d.ts","sourceRoot":"","sources":["../../../../lib/ecosystems/remote/huggingface.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"huggingface.d.ts","sourceRoot":"","sources":["../../../../lib/ecosystems/remote/huggingface.js"],"names":[],"mappings":"AA6JA,OAAO,EACL,6BAA6B,EAC7B,iBAAiB,GAClB,MAAM,mCAAmC,CAAC;AAE3C;;GAEG;AACH,wBAAgB,4BAA4B,SAG3C;AAu6BD;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,aAH5B,MAAM,KACJ,OAOV,CAAC;AAEJ;;;;;;;GAOG;AACH,wBAAsB,8BAA8B,CAClD,SAAS,EANA,MAMA,EACT,MAAM,EANG,MAMH,EACN,OAAO,AANN,CACA,EADQ,MAMG,GALD,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CA0MrC;AAED;;;;;;;GAOG;AACH,wBAAsB,6BAA6B,CACjD,SAAS,EANA,MAMA,EACT,MAAM,EANG,MAMH,EACN,OAAO,AANN,CACA,EADQ,MAMG,GALD,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAarC"}
|
|
@@ -61,6 +61,39 @@ export declare function simplifyRubyVersion(version: string): string;
|
|
|
61
61
|
* @returns {string} purl string
|
|
62
62
|
*/
|
|
63
63
|
export declare function toGemPurl(name: string, version: string | undefined, platform: string | undefined): string;
|
|
64
|
+
/**
|
|
65
|
+
* Read the Ruby string literal at the start of `text`: a double or single
|
|
66
|
+
* quoted string, or a `%q`/`%Q`/`%` percent literal. Escaped delimiters and
|
|
67
|
+
* backslashes are unescaped; every other escape sequence is kept as written.
|
|
68
|
+
* An interpolation such as `#{spec.name}` is kept verbatim, including any
|
|
69
|
+
* quotes inside it.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} text Source starting with the literal
|
|
72
|
+
* @returns {{value: string, interpolated: boolean, complete: boolean, rest: string} | undefined}
|
|
73
|
+
* The literal's value, whether it holds an interpolation, whether it was
|
|
74
|
+
* closed within `text`, and the source after it. Undefined when `text` does
|
|
75
|
+
* not start with a string literal.
|
|
76
|
+
*/
|
|
77
|
+
export declare function readRubyStringLiteral(text: string): {
|
|
78
|
+
value: string;
|
|
79
|
+
interpolated: boolean;
|
|
80
|
+
complete: boolean;
|
|
81
|
+
rest: string;
|
|
82
|
+
} | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Read a Ruby list of strings as written for `authors`, `email`, or `licenses`:
|
|
85
|
+
* an array of string literals, a `%w[]` word array, or a single string. Array
|
|
86
|
+
* elements that are not string literals, such as constants, are skipped.
|
|
87
|
+
*
|
|
88
|
+
* @param {string} text Source of the value
|
|
89
|
+
* @returns {{values: string[], complete: boolean} | undefined} The strings,
|
|
90
|
+
* and whether the array was closed within `text`. Undefined when the value
|
|
91
|
+
* is an expression that cannot be read statically.
|
|
92
|
+
*/
|
|
93
|
+
export declare function readRubyStringList(text: string): {
|
|
94
|
+
values: string[];
|
|
95
|
+
complete: boolean;
|
|
96
|
+
} | undefined;
|
|
64
97
|
/**
|
|
65
98
|
* Parse a single line from the `CHECKSUMS` section of a Gemfile.lock. Bundler
|
|
66
99
|
* 2.5 onwards writes `name (version[-platform]) algo=digest[,algo=digest]`,
|
|
@@ -159,24 +192,152 @@ export declare function toGemModuleNames(name: any): string[];
|
|
|
159
192
|
*/
|
|
160
193
|
export declare function collectGemModuleNames(rubyCommand: string, bundleCommand: string, gemHome: string, gemName: string, filePath: string): Array<string>;
|
|
161
194
|
/**
|
|
162
|
-
* Method to parse Gemspec file contents
|
|
195
|
+
* Method to parse Gemspec file contents.
|
|
196
|
+
*
|
|
197
|
+
* A source gemspec is Ruby code. The values that can be read without running
|
|
198
|
+
* it are string literals, lists of them, heredocs, and a version constant
|
|
199
|
+
* defined in the version file the gemspec requires. Anything else is left
|
|
200
|
+
* unresolved instead of being guessed.
|
|
201
|
+
*
|
|
202
|
+
* Bundler evaluates the gemspec of a project that uses the Gemfile `gemspec`
|
|
203
|
+
* directive, and locks the gem under `PATH remote: .`. Such a locked version
|
|
204
|
+
* can be supplied through `options.lockedVersions` and is used when the
|
|
205
|
+
* gemspec computes its version in a way that cannot be read statically.
|
|
163
206
|
*
|
|
164
207
|
* @param {string} gemspecData Gemspec data
|
|
165
208
|
* @param {string} gemspecFile File name for evidence.
|
|
209
|
+
* @param {Object} [options] Parse options
|
|
210
|
+
* @param {Object<string, string>} [options.lockedVersions] Locked versions of
|
|
211
|
+
* the gems the project directory serves, by gem name
|
|
212
|
+
* @param {boolean} [options.projectGemspec] The gemspec describes the project
|
|
213
|
+
* being scanned. No registry holds the project, so its gem is never looked
|
|
214
|
+
* up and keeps what the gemspec says.
|
|
215
|
+
* @param {boolean} [options.noFetch] Read the gemspec for the fields it holds
|
|
216
|
+
* without asking the registry about the gem. The local cache enricher uses
|
|
217
|
+
* this, since the caller is responsible for the registry round.
|
|
166
218
|
*/
|
|
167
|
-
export declare function parseGemspecData(gemspecData: string, gemspecFile: string
|
|
219
|
+
export declare function parseGemspecData(gemspecData: string, gemspecFile: string, options?: {
|
|
220
|
+
lockedVersions?: Record<string, string>;
|
|
221
|
+
projectGemspec?: boolean;
|
|
222
|
+
noFetch?: boolean;
|
|
223
|
+
}): Promise<any[]>;
|
|
168
224
|
/**
|
|
169
225
|
* Method to parse Gemfile.lock
|
|
170
226
|
*
|
|
227
|
+
* Besides the components and the dependency tree, the result lists as
|
|
228
|
+
* `projectGemRefs` the bom-refs of the gems served from the lockfile's own
|
|
229
|
+
* directory (`PATH` with `remote: .`), which is how Bundler records the gem a
|
|
230
|
+
* project builds when its Gemfile uses the `gemspec` directive.
|
|
231
|
+
*
|
|
232
|
+
* Gems the lockfile serves from a git remote or from a path outside the
|
|
233
|
+
* project are never sent to rubygems.org: no public registry holds the release
|
|
234
|
+
* they pinned. Before the registry round, the caches on this machine are read
|
|
235
|
+
* first, so a gem whose installed gemspec or compact index entry is present
|
|
236
|
+
* keeps those answers.
|
|
237
|
+
*
|
|
171
238
|
* @param {object} gemLockData Gemfile.lock data
|
|
172
239
|
* @param {string} lockFile Lock file
|
|
240
|
+
* @param {object} [options] Options
|
|
241
|
+
* @param {string} [options.gemHome] GEM_HOME to read installed gemspecs from
|
|
242
|
+
* @param {string} [options.compactIndexCacheDir] Bundler compact index cache
|
|
173
243
|
*/
|
|
174
|
-
export declare function parseGemfileLockData(gemLockData: object, lockFile: string
|
|
244
|
+
export declare function parseGemfileLockData(gemLockData: object, lockFile: string, options?: {
|
|
245
|
+
gemHome?: string;
|
|
246
|
+
compactIndexCacheDir?: string;
|
|
247
|
+
}): Promise<any[] | {
|
|
175
248
|
pkgList: any[];
|
|
176
249
|
dependenciesList: {
|
|
177
250
|
ref: string;
|
|
178
251
|
dependsOn: any[];
|
|
179
252
|
}[];
|
|
180
253
|
rootList: any[];
|
|
254
|
+
projectGemRefs: any[];
|
|
181
255
|
}>;
|
|
256
|
+
/**
|
|
257
|
+
* Describe the gem a project builds in its parent component.
|
|
258
|
+
*
|
|
259
|
+
* A gem project sees its own gem more than once: in its gemspec, in the `PATH`
|
|
260
|
+
* entry the Gemfile `gemspec` directive adds to its lockfile, and possibly as
|
|
261
|
+
* an installed copy. Each of them describes the project itself, so all are
|
|
262
|
+
* folded into the parent (discussion 4388). The parent takes the gem's
|
|
263
|
+
* identity, its descriptive metadata, and its `cdx:gem:*` properties; the
|
|
264
|
+
* dependency edges of the sightings move to the parent; and the sightings
|
|
265
|
+
* leave the component list, so the gem is never a dependency of itself.
|
|
266
|
+
*
|
|
267
|
+
* An explicit `--project-version` names the version of the parent. Otherwise
|
|
268
|
+
* the version of the gemspec, which may have come from the lockfile, is used.
|
|
269
|
+
*
|
|
270
|
+
* @param {object} parentComponent Parent component, updated in place
|
|
271
|
+
* @param {object} projectGem Component parsed from the root gemspec
|
|
272
|
+
* @param {object[]} pkgList Components
|
|
273
|
+
* @param {object[]} dependencies Dependency edges
|
|
274
|
+
* @param {string[]} rootList bom-refs of the direct dependencies
|
|
275
|
+
* @param {string[]} projectGemRefs bom-refs of the gems the lockfiles serve from the project directory
|
|
276
|
+
* @param {object} options CLI options
|
|
277
|
+
* @returns {{pkgList: object[], dependencies: object[], rootList: string[]}}
|
|
278
|
+
* The components, edges, and direct dependencies with the gem folded in
|
|
279
|
+
*/
|
|
280
|
+
export declare function describeProjectGem(parentComponent: object, projectGem: object, pkgList: object[], dependencies: object[], rootList: string[], projectGemRefs: string[], options?: object): {
|
|
281
|
+
pkgList: object[];
|
|
282
|
+
dependencies: object[];
|
|
283
|
+
rootList: string[];
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* Point each gem resolved from the public RubyGems registry at its `.gem`
|
|
287
|
+
* tarball with a `distribution` external reference (discussion 4406).
|
|
288
|
+
*
|
|
289
|
+
* The registry API supplies `gem_uri` when it is reachable, but an offline
|
|
290
|
+
* scan — a dry run, an air-gapped host, or one that only consulted Bundler's
|
|
291
|
+
* local caches — has no way to learn it. For the public registry the URL is
|
|
292
|
+
* deterministic, so it is derived from the recorded `cdx:gem:remote` and the
|
|
293
|
+
* release identity instead. Gems from any other remote are left alone: a
|
|
294
|
+
* private mirror's layout is its own business.
|
|
295
|
+
*
|
|
296
|
+
* @param {Array} pkgList Gem components, enriched in place
|
|
297
|
+
* @returns {Array} The package list
|
|
298
|
+
*/
|
|
299
|
+
export declare function addRubyGemsDistributionUrls(pkgList: any[]): any[];
|
|
300
|
+
/**
|
|
301
|
+
* Intersect Gem::Requirement strings into one `vers` range with the RubyGems
|
|
302
|
+
* versioning scheme, as the CycloneDX `versionRange` requires. `>= 2.3` and
|
|
303
|
+
* `>= 3.3` intersect to `vers:gem/>=3.3`, and `~> 3.1` becomes
|
|
304
|
+
* `vers:gem/>=3.1|<4`, since vers has no pessimistic operator.
|
|
305
|
+
*
|
|
306
|
+
* @param {string[]} requirements Requirement strings, each possibly holding
|
|
307
|
+
* several comma separated constraints
|
|
308
|
+
* @returns {string|null|undefined} The range, `null` when the requirements
|
|
309
|
+
* exclude each other, or undefined when none of them could be read
|
|
310
|
+
*/
|
|
311
|
+
export declare function rubyRequirementToVers(requirements: string[]): string | null | undefined;
|
|
312
|
+
/**
|
|
313
|
+
* Describe the Ruby runtime the gems require as one external `platform`
|
|
314
|
+
* component, and make the components that declare a `required_ruby_version`
|
|
315
|
+
* depend on it (discussion 4409).
|
|
316
|
+
*
|
|
317
|
+
* The component stands for the Ruby the bundle as a whole runs on, so its
|
|
318
|
+
* `versionRange` is the intersection of every requirement that could be read,
|
|
319
|
+
* in the `vers` syntax CycloneDX mandates for the field. Each component's own
|
|
320
|
+
* requirement stays in its `cdx:gem:rubyVersionSpecifiers` property. One
|
|
321
|
+
* runtime component per distinct requirement would describe the same
|
|
322
|
+
* interpreter many times over: a modest bundle spells `>= 2.x` a dozen ways.
|
|
323
|
+
*
|
|
324
|
+
* The type is `platform`, the CycloneDX type for a runtime environment that
|
|
325
|
+
* interprets software, and the one cdxgen gives the Ruby it finds in the
|
|
326
|
+
* build environment. The purl names no version, since a range is not one.
|
|
327
|
+
*
|
|
328
|
+
* `isExternal` and `versionRange` are CycloneDX 1.7 fields, and without them
|
|
329
|
+
* the component would claim the product bundles its interpreter, so the caller
|
|
330
|
+
* decides whether the BOM should carry it at all.
|
|
331
|
+
*
|
|
332
|
+
* @param {Array} pkgList Components
|
|
333
|
+
* @param {object} parentComponent The metadata.component, when the project is
|
|
334
|
+
* itself a gem
|
|
335
|
+
* @param {Array} dependencies Dependency edges
|
|
336
|
+
* @returns {{pkgList: Array, dependencies: Array}} Components and edges with
|
|
337
|
+
* the runtime component added
|
|
338
|
+
*/
|
|
339
|
+
export declare function addRubyRuntimeComponent(pkgList: any[], parentComponent: object, dependencies: any[]): {
|
|
340
|
+
pkgList: any[];
|
|
341
|
+
dependencies: any[];
|
|
342
|
+
};
|
|
182
343
|
//# sourceMappingURL=rubyutils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rubyutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/rubyutils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rubyutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/rubyutils.js"],"names":[],"mappings":"AAmEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAHzB,MAGyB,GAFvB,OAAO,CAOnB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAHlC,MAAM,GAAG,SAGyB,GAFhC,MAAM,GAAG,SAAS,CAO9B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAHrC,MAAM,GAAG,SAG4B,GAFnC;IAAC,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CAAC,CAe3E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAHhC,MAGgC,GAF9B,MAA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mClD;AA8GD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EALvC,MAAM,EAKiC,GAHrC,MAAM,GAAC,IAAI,GAAC,SAAS,CAoHjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,OAAA,EACP,eAAe,EARN,MAQM,EACf,YAAY,OAAA,GAND;IAAC,OAAO,QAAQ;IAAC,YAAY,QAAO;CAAC,CAmEjD"}
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the backend rusi actually used. `options.backend` is only the
|
|
3
|
+
* requested backend: when the compiler backend cannot run (missing
|
|
4
|
+
* components, wrapper build failure), rusi still echoes "compiler" but falls
|
|
5
|
+
* back to the stable source analysis. Compiler evidence was collected only
|
|
6
|
+
* when rusi emits its compiler-source-evidence diagnostic; a backend-error
|
|
7
|
+
* alone is not conclusive because native interop scanning reports failures
|
|
8
|
+
* under that kind too.
|
|
9
|
+
*
|
|
10
|
+
* @param {Object} rusiReport Parsed rusi report
|
|
11
|
+
* @returns {string|undefined} Effective backend name
|
|
12
|
+
*/
|
|
13
|
+
export declare function effectiveRusiBackend(rusiReport?: Object): string | undefined;
|
|
1
14
|
/**
|
|
2
15
|
* Checks if the provided language is a Rust language alias.
|
|
3
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rusi.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/rusi.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rusi.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/rusi.js"],"names":[],"mappings":"AAoWA;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,GAHpC,MAGyC,GAFvC,MAAM,GAAC,SAAS,CAW5B;AAsZD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAHhC,MAGgC,GAF9B,OAAO,CAInB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAH9B,MAG8B,GAF5B,MAAM,GAAC,SAAS,CAW5B;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,GAAG,EALxB,MAKwB,EAAE,UAAU,EAJpC,MAIoC,EAAE,OAAO,GAH7C,MAGkD,GAFhD,OAAO,CAgEnB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAJ3B,MAI2B,EAAE,OAAO,GAHpC,MAGyC,GAFvC,MAAM,GAAC,SAAS,CA2B5B;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,GAJnC,MAIwC,EAAE,UAAU,QAAK,GAFvD,MAAM,CA8DlB"}
|