@cdxgen/cdxgen 13.3.0 → 13.5.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 +12 -9
- package/bin/cdxgen-secure.js +15 -0
- package/bin/cdxgen.js +115 -31
- package/bin/evinse.js +23 -1
- package/bin/hbom.js +15 -7
- package/bin/repl.js +115 -0
- package/bin/sign.js +45 -15
- package/bin/tracebom.js +5 -1
- package/bin/validate.js +84 -18
- package/bin/verify.js +155 -86
- package/data/cbomosdb-queries.json +13 -1
- package/data/component-tags.json +8 -0
- package/data/helpers/init.gradle +46 -21
- package/data/queries-darwin.json +25 -1
- package/data/queries-win.json +19 -1
- package/data/queries.json +41 -0
- package/data/remediations.json +344 -1
- package/data/rules/cbom-security.yaml +235 -4
- package/data/rules/dependency-sources.yaml +67 -0
- package/data/rules/go-binaries.yaml +46 -0
- package/data/rules/golem-go.yaml +80 -0
- package/data/rules/hbom-compliance.yaml +40 -22
- package/data/rules/hbom-performance.yaml +7 -1
- package/data/rules/host-topology.yaml +1 -1
- package/data/rules/obom-runtime.yaml +31 -2
- package/data/rules/php-runtime.yaml +143 -0
- package/data/rules/scala-evidence.yaml +115 -0
- package/lib/audit/index.js +52 -6
- package/lib/cli/bomAssembly.js +28 -3
- package/lib/cli/cliOptions.js +110 -3
- package/lib/cli/index.js +186 -58
- package/lib/cli/jsBom.js +50 -29
- package/lib/cli/jvmBom.js +779 -146
- package/lib/cli/managedBom.js +1021 -261
- package/lib/cli/nativeBom.js +364 -58
- package/lib/core/activity.js +12 -0
- package/lib/core/env.js +47 -17
- package/lib/core/fs.js +31 -21
- package/lib/core/httpClient.js +233 -69
- package/lib/core/pluginRun.js +184 -0
- package/lib/core/processTree.js +100 -0
- package/lib/core/projectConfig.js +1 -0
- package/lib/core/projectTooling.js +97 -0
- package/lib/core/propertySanitizer.js +72 -0
- 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 +5 -7
- package/lib/ecosystems/cargoCache.js +231 -8
- package/lib/ecosystems/cmakeResolver.js +10 -21
- package/lib/ecosystems/cppBuildContext.js +631 -0
- package/lib/ecosystems/cppEvidence.js +337 -22
- package/lib/ecosystems/cppIncludeResolver.js +294 -0
- package/lib/ecosystems/denoutils.js +93 -66
- package/lib/ecosystems/ecosystems.js +1967 -788
- package/lib/ecosystems/golem.js +578 -18
- package/lib/ecosystems/gradleutils.js +340 -46
- package/lib/ecosystems/jsEvidence.js +85 -24
- package/lib/ecosystems/kosi.js +21 -4
- package/lib/ecosystems/npmutils.js +64 -0
- package/lib/ecosystems/parsers-dotnet.js +668 -153
- package/lib/ecosystems/parsers-elm.js +46 -28
- package/lib/ecosystems/parsers-gleam.js +3 -4
- package/lib/ecosystems/parsers-go.js +1283 -297
- package/lib/ecosystems/parsers-js.js +92 -26
- package/lib/ecosystems/parsers-julia.js +2 -3
- package/lib/ecosystems/parsers-jvm.js +463 -29
- package/lib/ecosystems/parsers-misc.js +405 -93
- package/lib/ecosystems/parsers-python.js +152 -20
- package/lib/ecosystems/parsers-rust.js +4 -4
- 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 +73 -20
- package/lib/ecosystems/rusi.js +32 -9
- package/lib/ecosystems/sbtutils.js +243 -187
- package/lib/ecosystems/scalacliutils.js +343 -0
- package/lib/ecosystems/scalasem.js +2620 -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 +695 -78
- package/lib/evinser/swiftsem.js +68 -5
- package/lib/helpers/agenticToolutils.js +2 -2
- package/lib/helpers/bomSigner.js +576 -128
- package/lib/inventory/agentSkillSpec.js +17 -0
- package/lib/inventory/aiCollector.js +4 -1
- package/lib/inventory/analyzer.js +110 -127
- package/lib/inventory/apkInstalledDb.js +243 -0
- package/lib/inventory/atomUtils.js +204 -48
- package/lib/inventory/auditCategories.js +10 -3
- package/lib/inventory/buildToolRateLimit.js +144 -0
- package/lib/inventory/cacheCommands.js +2 -1
- package/lib/inventory/cacheDir.js +52 -9
- package/lib/inventory/certificates.js +2371 -0
- package/lib/inventory/cmakeBuildDirs.js +254 -0
- package/lib/inventory/communityAiConfigParser.js +4 -9
- package/lib/inventory/deps.js +507 -128
- package/lib/inventory/display.js +200 -3
- package/lib/inventory/dosai.js +747 -101
- package/lib/inventory/dosaiParsers.js +310 -15
- package/lib/inventory/dynamic.js +96 -8
- package/lib/inventory/envcontext.js +168 -5
- package/lib/inventory/evidenceUtils.js +590 -132
- package/lib/inventory/fetchBatch.js +574 -38
- package/lib/inventory/fetchDiskCache.js +597 -0
- package/lib/inventory/forgeEnricher.js +14 -5
- package/lib/inventory/formulationParsers.js +3 -2
- package/lib/inventory/goBuildInfo.js +140 -0
- package/lib/inventory/hbom.js +67 -7
- package/lib/inventory/hbomAnalysis.js +16 -0
- package/lib/inventory/hostTopology.js +21 -0
- package/lib/inventory/jvmLocalRepos.js +917 -0
- package/lib/inventory/mcpConfigParser.js +2 -3
- package/lib/inventory/osPackagePurl.js +244 -0
- package/lib/inventory/osPackageResolver.js +89 -87
- package/lib/inventory/osinfo.js +79 -31
- package/lib/inventory/osqueryTransform.js +114 -5
- package/lib/inventory/parentSelection.js +146 -0
- package/lib/inventory/phpBuildInfo.js +487 -0
- package/lib/inventory/phpHostProbe.js +641 -0
- package/lib/inventory/rootfsCerts.js +426 -0
- package/lib/inventory/rustFormulationParser.js +3 -4
- package/lib/inventory/scalaCoords.js +153 -0
- package/lib/inventory/source.js +215 -11
- package/lib/inventory/spdx.js +245 -0
- package/lib/inventory/traceRunner.js +93 -8
- package/lib/inventory/tracedCrypto.js +423 -0
- package/lib/managers/binary.js +529 -183
- package/lib/managers/docker.js +199 -44
- package/lib/managers/oci.js +24 -2
- package/lib/parsers/cmakeCache.js +69 -0
- package/lib/parsers/cmakeLists.js +16 -2
- package/lib/parsers/cmakePresets.js +400 -0
- package/lib/parsers/compileCommands.js +557 -0
- package/lib/parsers/email.js +277 -0
- package/lib/parsers/largeJson.js +34 -2
- 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 +209 -1
- package/lib/stages/postgen/annotator.js +17 -1
- package/lib/stages/postgen/introspection/markers.js +1 -1
- package/lib/stages/postgen/introspection/reflect.js +4 -1
- package/lib/stages/postgen/postgen.js +20 -6
- package/lib/stages/postgen/ruleEngine.js +58 -1
- package/lib/stages/postgen/specVersionCompat.js +62 -0
- package/lib/stages/pregen/pregen.js +117 -5
- package/lib/validator/bomValidator.js +26 -5
- package/lib/validator/generated/runtime.mjs +13 -0
- package/lib/validator/generated/validate-1.6.mjs +26 -7
- package/lib/validator/generated/validate-1.7.mjs +31 -12
- package/lib/validator/generated/validate-2.0.mjs +30 -11
- package/lib/validator/index.js +25 -10
- package/lib/validator/reporters/json.js +1 -0
- package/package.json +23 -23
- package/types/bin/cdxgen-secure.d.ts +3 -0
- package/types/bin/cdxgen-secure.d.ts.map +1 -0
- package/types/bin/repl.d.ts.map +1 -1
- package/types/lib/audit/index.d.ts.map +1 -1
- package/types/lib/cli/bomAssembly.d.ts +9 -2
- package/types/lib/cli/bomAssembly.d.ts.map +1 -1
- package/types/lib/cli/cliOptions.d.ts +43 -0
- 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 +44 -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 +27 -2
- package/types/lib/core/env.d.ts.map +1 -1
- 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/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.map +1 -1
- package/types/lib/core/projectTooling.d.ts +41 -0
- package/types/lib/core/projectTooling.d.ts.map +1 -0
- package/types/lib/core/propertySanitizer.d.ts +26 -0
- package/types/lib/core/propertySanitizer.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.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/cmakeResolver.d.ts +5 -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 +19 -3
- 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 +81 -1
- package/types/lib/ecosystems/golem.d.ts.map +1 -1
- package/types/lib/ecosystems/gradleutils.d.ts +59 -7
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
- package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/kosi.d.ts.map +1 -1
- package/types/lib/ecosystems/npmutils.d.ts +15 -0
- package/types/lib/ecosystems/npmutils.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-dotnet.d.ts +155 -5
- 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 +119 -5
- package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-js.d.ts +6 -1
- 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 +74 -3
- package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-misc.d.ts +21 -59
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-python.d.ts +57 -6
- package/types/lib/ecosystems/parsers-python.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 +26 -1
- 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 +21 -1
- package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
- 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 +100 -8
- package/types/lib/evinser/evinser.d.ts.map +1 -1
- package/types/lib/evinser/swiftsem.d.ts +10 -0
- package/types/lib/evinser/swiftsem.d.ts.map +1 -1
- package/types/lib/helpers/bomSigner.d.ts +80 -4
- package/types/lib/helpers/bomSigner.d.ts.map +1 -1
- package/types/lib/inventory/agentSkillSpec.d.ts +13 -0
- package/types/lib/inventory/agentSkillSpec.d.ts.map +1 -0
- package/types/lib/inventory/aiCollector.d.ts.map +1 -1
- package/types/lib/inventory/analyzer.d.ts.map +1 -1
- package/types/lib/inventory/apkInstalledDb.d.ts +42 -0
- package/types/lib/inventory/apkInstalledDb.d.ts.map +1 -0
- package/types/lib/inventory/atomUtils.d.ts +96 -10
- 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/cacheDir.d.ts +12 -4
- package/types/lib/inventory/cacheDir.d.ts.map +1 -1
- package/types/lib/inventory/certificates.d.ts +205 -0
- package/types/lib/inventory/certificates.d.ts.map +1 -0
- package/types/lib/inventory/cmakeBuildDirs.d.ts +58 -0
- package/types/lib/inventory/cmakeBuildDirs.d.ts.map +1 -0
- package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/deps.d.ts +61 -2
- package/types/lib/inventory/deps.d.ts.map +1 -1
- package/types/lib/inventory/display.d.ts +18 -0
- package/types/lib/inventory/display.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +202 -14
- 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 +16 -1
- package/types/lib/inventory/dynamic.d.ts.map +1 -1
- package/types/lib/inventory/envcontext.d.ts +40 -2
- package/types/lib/inventory/envcontext.d.ts.map +1 -1
- package/types/lib/inventory/evidenceUtils.d.ts +48 -14
- 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/formulationParsers.d.ts.map +1 -1
- package/types/lib/inventory/goBuildInfo.d.ts +10 -0
- package/types/lib/inventory/goBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/hbom.d.ts.map +1 -1
- package/types/lib/inventory/hbomAnalysis.d.ts +10 -0
- package/types/lib/inventory/hbomAnalysis.d.ts.map +1 -1
- package/types/lib/inventory/hostTopology.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/osPackagePurl.d.ts +99 -0
- package/types/lib/inventory/osPackagePurl.d.ts.map +1 -0
- package/types/lib/inventory/osPackageResolver.d.ts +6 -2
- package/types/lib/inventory/osPackageResolver.d.ts.map +1 -1
- package/types/lib/inventory/osinfo.d.ts +31 -6
- package/types/lib/inventory/osinfo.d.ts.map +1 -1
- package/types/lib/inventory/osqueryTransform.d.ts +51 -0
- package/types/lib/inventory/osqueryTransform.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/phpBuildInfo.d.ts +142 -0
- package/types/lib/inventory/phpBuildInfo.d.ts.map +1 -0
- package/types/lib/inventory/phpHostProbe.d.ts +35 -0
- package/types/lib/inventory/phpHostProbe.d.ts.map +1 -0
- package/types/lib/inventory/rootfsCerts.d.ts +27 -0
- package/types/lib/inventory/rootfsCerts.d.ts.map +1 -0
- package/types/lib/inventory/rustFormulationParser.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 +28 -0
- package/types/lib/inventory/source.d.ts.map +1 -1
- package/types/lib/inventory/spdx.d.ts +24 -0
- package/types/lib/inventory/spdx.d.ts.map +1 -1
- package/types/lib/inventory/traceRunner.d.ts +16 -1
- package/types/lib/inventory/traceRunner.d.ts.map +1 -1
- package/types/lib/inventory/tracedCrypto.d.ts +64 -0
- package/types/lib/inventory/tracedCrypto.d.ts.map +1 -0
- package/types/lib/managers/binary.d.ts +10 -0
- package/types/lib/managers/binary.d.ts.map +1 -1
- package/types/lib/managers/docker.d.ts +12 -0
- package/types/lib/managers/docker.d.ts.map +1 -1
- package/types/lib/managers/oci.d.ts +3 -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 +2 -1
- package/types/lib/parsers/cmakeLists.d.ts.map +1 -1
- 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/email.d.ts +19 -0
- package/types/lib/parsers/email.d.ts.map +1 -0
- package/types/lib/parsers/largeJson.d.ts +13 -0
- package/types/lib/parsers/largeJson.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 +8 -0
- package/types/lib/server/server.d.ts.map +1 -1
- package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
- package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -1
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
- package/types/lib/stages/postgen/ruleEngine.d.ts +7 -4
- package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
- package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
- package/types/lib/stages/pregen/pregen.d.ts +14 -1
- package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
- package/types/lib/validator/index.d.ts +8 -0
- package/types/lib/validator/index.d.ts.map +1 -1
- package/types/lib/validator/reporters/json.d.ts.map +1 -1
- package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +0 -462
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { isProjectToolingAllowed } from "../core/projectTooling.js";
|
|
2
|
+
export { isProjectToolingAllowed };
|
|
1
3
|
/**
|
|
2
4
|
* Method to return the gradle command to use.
|
|
3
5
|
*
|
|
4
6
|
* Project-local wrapper scripts (`gradlew`) are attacker-controlled files in
|
|
5
|
-
* the scanned project, so they are only used when
|
|
6
|
-
*
|
|
7
|
-
* used.
|
|
7
|
+
* the scanned project, so they are only used when the project's own tooling
|
|
8
|
+
* may run (see isProjectToolingAllowed); otherwise the system Gradle is used.
|
|
8
9
|
*
|
|
9
10
|
* @param {string} srcPath Path to look for gradlew wrapper
|
|
10
11
|
* @param {string|null} rootPath Root directory to look for gradlew wrapper
|
|
@@ -25,6 +26,18 @@ export declare function buildGradleCommandArguments(gradleArguments: string[], g
|
|
|
25
26
|
/**
|
|
26
27
|
* Method to split the output produced by Gradle using parallel processing by project
|
|
27
28
|
*
|
|
29
|
+
* Gradle groups console output by task and prints a `> Task :path` header
|
|
30
|
+
* before each group, repeating it whenever a task's output resumes after
|
|
31
|
+
* another task's. Each group is therefore keyed by the project in its own
|
|
32
|
+
* header (`> Task :app:dependencies` belongs to `:app`), never by whatever
|
|
33
|
+
* report header happened to precede it, and the groups of one project are
|
|
34
|
+
* concatenated in order, so reordering or interrupting the task reports cannot
|
|
35
|
+
* move a report to another project or overwrite one (issue 4465). The groups
|
|
36
|
+
* of a root task (`:dependencies`) all take the root project's name from the
|
|
37
|
+
* `Root project '…'` header that only a root task prints, so a continuation
|
|
38
|
+
* group, which carries no report header, stays with the rest of the root
|
|
39
|
+
* report. The groups of other tasks are dropped along with their headers.
|
|
40
|
+
*
|
|
28
41
|
* @param {string} rawOutput Full output produced by Gradle using parallel processing
|
|
29
42
|
* @param {string[]} relevantTasks The list of gradle tasks whose output need to be considered.
|
|
30
43
|
* @returns {map} Map with subProject names as keys and corresponding dependency task outputs as values.
|
|
@@ -166,19 +179,58 @@ _includeCacheDir?: boolean): Promise<Object>;
|
|
|
166
179
|
* Method to return the mill command to use.
|
|
167
180
|
*
|
|
168
181
|
* The project-local `mill` script is an attacker-controlled file in the
|
|
169
|
-
* scanned project, so it is only used when
|
|
170
|
-
* (
|
|
182
|
+
* scanned project, so it is only used when the project's own tooling may run
|
|
183
|
+
* (see isProjectToolingAllowed).
|
|
171
184
|
*
|
|
172
185
|
* @param {string} srcPath Path to look for mill wrapper
|
|
173
186
|
* @param {Object} [options] CLI options (`installDeps` gates wrapper use)
|
|
174
187
|
*/
|
|
175
188
|
export declare function getMillCommand(srcPath: string, options?: Object): string;
|
|
189
|
+
/**
|
|
190
|
+
* Determine the Mill version of a build.
|
|
191
|
+
*
|
|
192
|
+
* The version is read from the `.mill-version` file, from the
|
|
193
|
+
* `//| mill-version:` header of the build file, or from the launcher itself.
|
|
194
|
+
*
|
|
195
|
+
* @param {string} millRootPath Root of the Mill build
|
|
196
|
+
* @param {string} millCmd Mill command to use for the fallback probe
|
|
197
|
+
* @returns {string|null} The Mill version, or null when it cannot be determined
|
|
198
|
+
*/
|
|
199
|
+
export declare function getMillVersion(millRootPath: string, millCmd: string): string | null;
|
|
200
|
+
/**
|
|
201
|
+
* Find the Mill daemons running under a tree.
|
|
202
|
+
*
|
|
203
|
+
* Daemons record their process id in `out/mill-daemon*` (Mill 1.x) or
|
|
204
|
+
* `out/mill-server*` directories, directly or one level below (Mill 0.12
|
|
205
|
+
* keeps one subdirectory per server). Only processes that are still alive
|
|
206
|
+
* are returned.
|
|
207
|
+
*
|
|
208
|
+
* @param {string} rootPath Tree to search
|
|
209
|
+
* @returns {Map<string, Set<number>>} Live daemon process ids by the root of
|
|
210
|
+
* the build they belong to
|
|
211
|
+
*/
|
|
212
|
+
export declare function findMillDaemons(rootPath: string): Map<string, Set<number>>;
|
|
213
|
+
/**
|
|
214
|
+
* Stop the Mill daemons that started under the scanned tree during the scan.
|
|
215
|
+
*
|
|
216
|
+
* cdxgen's own Mill calls run with --no-server, but a project build cdxgen
|
|
217
|
+
* runs can shell out to Mill without it and leave a daemon behind. Daemons
|
|
218
|
+
* that were already running when the scan started belong to the user, for
|
|
219
|
+
* example to an IDE, and are left alone; every other live daemon is shut
|
|
220
|
+
* down through the launcher of the build it belongs to.
|
|
221
|
+
*
|
|
222
|
+
* @param {string} rootPath Scanned tree
|
|
223
|
+
* @param {Map<string, Set<number>>} [runningBefore] Result of
|
|
224
|
+
* {@link findMillDaemons} taken before the scan
|
|
225
|
+
* @param {Object} [options] CLI options
|
|
226
|
+
*/
|
|
227
|
+
export declare function stopMillDaemons(rootPath: string, runningBefore?: Map<string, Set<number>>, options?: Object): void;
|
|
176
228
|
/**
|
|
177
229
|
* Method to return the maven command to use.
|
|
178
230
|
*
|
|
179
231
|
* Project-local wrapper scripts (`mvnw`) are attacker-controlled files in the
|
|
180
|
-
* scanned project, so they are only used when
|
|
181
|
-
* (
|
|
232
|
+
* scanned project, so they are only used when the project's own tooling may
|
|
233
|
+
* run (see isProjectToolingAllowed); otherwise the installed Maven is used.
|
|
182
234
|
*
|
|
183
235
|
* @param {string} srcPath Path to look for maven wrapper
|
|
184
236
|
* @param {string} rootPath Root directory to look for maven wrapper
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradleutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/gradleutils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gradleutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/gradleutils.js"],"names":[],"mappings":"AAyBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAwBpE,OAAO,EAAE,uBAAuB,EAAE,CAAC;AAEnC;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAJ7B,MAI6B,EAAE,QAAQ,EAHvC,MAAM,GAAC,IAGgC,EAAE,OAAO,AAFxD,CACF,EADU,MAEqD,UAiG/D;AA6DD;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,eAAe,EARN,MAAM,EAQA,EACf,iBAAiB,EARR,MAAM,EAQE,EACjB,yBAAyB,EARhB,MAAM,EAQU,EACzB,mBAAmB,EARV,GAQU,GANR,MAAM,EAAE,CA4CpB;AAqCD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAJ1C,MAI0C,EAAE,aAAa,E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;;;;;;;GAaG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAPD,MAOC,EACV,SAAS,EAPA,MAOA,EACT,QAAQ,GAPC,OAOM,EAAE,qCAAqC;AACtD,gBAAgB,GAPP,OAOe,GANb,OAAO,CAAC,MAAM,CAAC,CAgC3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAH3B,MAG2B,EAAE,OAAO,AAF5C,CACF,EADU,MAEyC,UAiBnD;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAJhC,MAIgC,EAAE,OAAO,EAHzC,MAGyC,GAFvC,MAAM,GAAC,IAAI,CA4BvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAJ7B,MAI6B,GAH3B,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CA2DpC;AAqBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EANC,MAMD,EACR,aAAa,AANZ,CAEA,EAFQ,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAMP,EACzB,OAAO,AALN,CACF,EADU,MAKG,QAoBb;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAJ5B,MAI4B,EAAE,QAAQ,EAHtC,MAGsC,EAAE,OAAO,AAFvD,CACF,EADU,MAEoD,UAmK9D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAH1C,MAG0C,GAFxC,MAAM,EAAE,CAoEpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsEvidence.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/jsEvidence.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jsEvidence.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/jsEvidence.js"],"names":[],"mappings":"AAyLA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EARE,KAAK,CAAC,MAAM,CAQd,EACP,UAAU,EARD,MAQC,EACV,UAAU,EARD,MAQC,EACV,IAAI,EARK,OAQL,GANO,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CA+KlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kosi.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/kosi.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kosi.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/kosi.js"],"names":[],"mappings":"AAqCA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,eAAe,EAH3C,MAAM,GAAC,SAGoC,GAFzC,MAAM,GAAC,SAAS,CAwB5B;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,KAAA,WAE5C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,QAQ3B;AA6DD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAJ3B,MAI2B,EAAE,OAAO,GAHpC,MAGyC,GAFvC,MAAM,GAAC,SAAS,CAkE5B;AA0BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,KAAA,EAAE,SAAS,KAAA,OA4B/C;AAusBD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,KAAK,EAAE,WAAW,KAAK,MAsEpE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,GAJvC,MAI4C,EAAE,WAAW,GAHzD,MAG8D,GAF5D,MAAM,CAoFlB;AAiCD,wBAAgB,mBAAmB,CAAC,UAAU,KAAK,EAAE,UAAU,QAAK;;;;;;;EA2DnE"}
|
|
@@ -97,6 +97,21 @@ export declare function collectNpmManifestSources(node: object): {
|
|
|
97
97
|
type: string;
|
|
98
98
|
value: string;
|
|
99
99
|
}[];
|
|
100
|
+
/**
|
|
101
|
+
* Resolve the license of an npm-style manifest, honouring the legacy plural
|
|
102
|
+
* `licenses` field that packages published before the SPDX convention still
|
|
103
|
+
* carry (issue 4466). A modern `license` value is returned unchanged. The
|
|
104
|
+
* legacy field may hold one entry or an array of them, each a string or a
|
|
105
|
+
* `{ type, url }` object; one entry is returned as it is. npm documents an
|
|
106
|
+
* array of several entries as a choice between them, so when every entry is an
|
|
107
|
+
* SPDX identifier the array becomes the equivalent `MIT OR Apache-2.0`
|
|
108
|
+
* expression, and otherwise stays a list for `getLicenses` to convert entry by
|
|
109
|
+
* entry.
|
|
110
|
+
*
|
|
111
|
+
* @param {object} pkgData Parsed package.json (or bower.json) manifest
|
|
112
|
+
* @returns {string|object|Array|undefined} The effective license value
|
|
113
|
+
*/
|
|
114
|
+
export declare function resolveNpmLicense(pkgData: object): string | object | any[] | undefined;
|
|
100
115
|
/**
|
|
101
116
|
* Hydrates sparse npm package metadata from the installed package.json in deep mode.
|
|
102
117
|
* Existing metadata on the Arborist node wins over on-disk values.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npmutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/npmutils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"npmutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/npmutils.js"],"names":[],"mappings":"AAkDA;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAHlC,MAGkC,GAFhC,IAAI,CAgBhB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAH/B,MAG+B,GAF7B,IAAI,CAIhB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAH3B,MAG2B,GAFzB,IAAI,CAIhB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAH/B,MAG+B,GAF7B,IAAI,CAIhB;AAED;;;;;;;;;;;;;;;;;;GAkBG;A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AW,EAAE,MAAM,CAAA;CAAC,GAAC,IAAI,CAsBtG;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,wBAAA,EAAE,SAAS,wBAAA,EAAE,WAAW,AAHjE,CACA,wBAEsE,0BAsExE"}
|
|
@@ -17,6 +17,110 @@
|
|
|
17
17
|
* @returns {Object} The same component
|
|
18
18
|
*/
|
|
19
19
|
export declare function applyNugetVersion(pkg: Object, version?: string): Object;
|
|
20
|
+
/**
|
|
21
|
+
* Compare two NuGet versions: up to four numeric release parts (missing parts
|
|
22
|
+
* read as 0), then the prerelease label, with a release sorting after its own
|
|
23
|
+
* prereleases. Build metadata after `+` is ignored, as NuGet ignores it.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} a Version
|
|
26
|
+
* @param {string} b Version
|
|
27
|
+
* @returns {number} Negative, zero or positive, like a sort comparator
|
|
28
|
+
*/
|
|
29
|
+
export declare function compareNugetVersions(a: string, b: string): number;
|
|
30
|
+
/**
|
|
31
|
+
* Whether a NuGet version range allows a version. A bare version is a minimum
|
|
32
|
+
* (`1.0` means at least 1.0); brackets are inclusive and parentheses exclusive
|
|
33
|
+
* (`[1.0]`, `[1.0,2.0)`, `(,2.0]`). An empty or unparseable range allows
|
|
34
|
+
* anything.
|
|
35
|
+
*
|
|
36
|
+
* @param {string} range Range as a nuspec or lock file states it
|
|
37
|
+
* @param {string} version Version to test
|
|
38
|
+
* @returns {boolean} True when the range allows the version
|
|
39
|
+
*/
|
|
40
|
+
export declare function nugetRangeAllows(range: string, version: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Choose the installed version a declared dependency resolves to: the lowest
|
|
43
|
+
* installed version the range allows, as NuGet picks the lowest applicable
|
|
44
|
+
* version; else the only installed version, which is what binding redirects
|
|
45
|
+
* unify a dependency onto. Undefined when nothing installed can be named.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} range Declared range
|
|
48
|
+
* @param {string[]} installedVersions Versions installed for the package
|
|
49
|
+
* @returns {string|undefined} The chosen version
|
|
50
|
+
*/
|
|
51
|
+
export declare function resolveInstalledNugetVersion(range: string, installedVersions?: string[]): string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* The project directory a .NET manifest belongs to. Restore output records its
|
|
54
|
+
* project file; otherwise project.assets.json sits in the project's `obj/`,
|
|
55
|
+
* and lock files, packages.config and project files sit in the project
|
|
56
|
+
* directory itself.
|
|
57
|
+
*
|
|
58
|
+
* @param {string} manifestFile Manifest path
|
|
59
|
+
* @param {string} [projectPath] Project file the manifest names, when it does
|
|
60
|
+
* @returns {string} Project directory
|
|
61
|
+
*/
|
|
62
|
+
export declare function dotnetManifestProjectDir(manifestFile: string, projectPath?: string): string;
|
|
63
|
+
/**
|
|
64
|
+
* The path, on this machine, of the project file a project.assets.json belongs to.
|
|
65
|
+
*
|
|
66
|
+
* Restore records the project file and the directory it wrote the assets file
|
|
67
|
+
* to (`outputPath`) as absolute paths on the machine that ran it, which can be
|
|
68
|
+
* a CI agent, a container, another operating system, or this tree reached
|
|
69
|
+
* through another path. Where the project file sits relative to that
|
|
70
|
+
* directory does not change when the tree moves, so the project file is that
|
|
71
|
+
* offset applied to the directory the assets file is in. An assets file that
|
|
72
|
+
* records no output path is taken to be in its project's `obj/`. The recorded
|
|
73
|
+
* path itself is used only when no offset can be worked out, as when restore
|
|
74
|
+
* wrote to another drive than the project's.
|
|
75
|
+
*
|
|
76
|
+
* Nothing is read from disk: the name is spelled as restore recorded it, which
|
|
77
|
+
* can differ in case from the file a case-insensitive file system holds.
|
|
78
|
+
*
|
|
79
|
+
* @param {string} assetsFile project.assets.json path
|
|
80
|
+
* @param {string} [projectPath] Project file restore recorded
|
|
81
|
+
* @param {string} [outputPath] Directory restore recorded writing the assets file to
|
|
82
|
+
* @returns {string|undefined} Project file path, or undefined when none can be named
|
|
83
|
+
*/
|
|
84
|
+
export declare function dotnetRestoredProjectFile(assetsFile: string, projectPath?: string, outputPath?: string): string | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Index the MSBuild properties that props files define, by the directory each
|
|
87
|
+
* file sits in and across the whole scan, so the candidates for every project
|
|
88
|
+
* come from one read of each file.
|
|
89
|
+
*
|
|
90
|
+
* @param {string[]} propsFiles Props files of the scan
|
|
91
|
+
* @returns {{byDir: Object, treeWide: Object}} Property values per directory and
|
|
92
|
+
* across the scan, each a map of property name to values
|
|
93
|
+
*/
|
|
94
|
+
export declare function indexPropsProperties(propsFiles?: string[]): {
|
|
95
|
+
byDir: Object;
|
|
96
|
+
treeWide: Object;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* The candidate values of MSBuild properties that can apply to a project file,
|
|
100
|
+
* from the props files beside it and above it: the nearest directory that
|
|
101
|
+
* defines a property wins, as the nearest Directory.Build.props is the one
|
|
102
|
+
* MSBuild imports. A property no such directory defines falls back to the
|
|
103
|
+
* values the whole scan's props files give it, which a caller only trusts when
|
|
104
|
+
* there is exactly one.
|
|
105
|
+
*
|
|
106
|
+
* @param {string} projFile Project file
|
|
107
|
+
* @param {{byDir: Object, treeWide: Object}} propsIndex Index built by {@link indexPropsProperties}
|
|
108
|
+
* @returns {Object} Map of property name to candidate values
|
|
109
|
+
*/
|
|
110
|
+
export declare function projectPropertyCandidates(projFile: string, propsIndex?: {
|
|
111
|
+
byDir: Object;
|
|
112
|
+
treeWide: Object;
|
|
113
|
+
}): Object;
|
|
114
|
+
/**
|
|
115
|
+
* The version of each package that every manifest of a scan agrees on, keyed by
|
|
116
|
+
* lowercased package id. A package that two manifests give different versions
|
|
117
|
+
* is left out: without knowing which project a declaration belongs to, picking
|
|
118
|
+
* one of them would be a guess.
|
|
119
|
+
*
|
|
120
|
+
* @param {Object[]} pkgList Components collected from the scan's manifests
|
|
121
|
+
* @returns {Object} Map of lowercased package id to version
|
|
122
|
+
*/
|
|
123
|
+
export declare function agreedNugetVersions(pkgList?: Object[]): Object;
|
|
20
124
|
/**
|
|
21
125
|
* Method to parse .nupkg files
|
|
22
126
|
*
|
|
@@ -78,20 +182,57 @@ export declare function getCentralPackageVersions(projFile: string, cache?: Obje
|
|
|
78
182
|
* @returns {Object} Containing text nodes from PropertyGroup elements and their values
|
|
79
183
|
*/
|
|
80
184
|
export declare function getPropertyGroupTextNodes(propsFiles: string): Object;
|
|
185
|
+
/**
|
|
186
|
+
* Look up a package version in a name - version map. NuGet package ids are
|
|
187
|
+
* case-insensitive, so a map may be keyed by the id as written or lowercased.
|
|
188
|
+
*
|
|
189
|
+
* @param {Object} versions Map of package id to version
|
|
190
|
+
* @param {string} name Package id
|
|
191
|
+
* @returns {string|undefined} The version, or undefined when the map has none
|
|
192
|
+
*/
|
|
193
|
+
export declare function lookupNugetVersion(versions: Object, name: string): string | undefined;
|
|
81
194
|
/**
|
|
82
195
|
* Method to parse .csproj like xml files
|
|
83
196
|
*
|
|
197
|
+
* A version the project file does not state is taken, in order, from the
|
|
198
|
+
* versions this project restored, from central package management, and last
|
|
199
|
+
* from a version the whole scan agrees on. Two projects of one tree routinely
|
|
200
|
+
* restore different versions of a package, so a version taken from another
|
|
201
|
+
* project would describe a package this project does not use.
|
|
202
|
+
*
|
|
84
203
|
* @param {String} csProjData Raw data
|
|
85
204
|
* @param {String} projFile File name
|
|
86
|
-
* @param {Object} pkgNameVersions
|
|
205
|
+
* @param {Object} pkgNameVersions Versions this project restored (its project.assets.json,
|
|
206
|
+
* packages.lock.json or packages.config), keyed by package id or lowercased id
|
|
87
207
|
* @param {Boolean} msbuildInstalled Whether msbuild is available to resolve properties
|
|
88
|
-
* @param {Object} pkgVersionLabelCandidates Candidate values for msbuild version properties
|
|
208
|
+
* @param {Object} pkgVersionLabelCandidates Candidate values for msbuild version properties,
|
|
209
|
+
* from the props files that can apply to this project
|
|
89
210
|
* @param {Object} centralVersions Versions declared centrally in Directory.Packages.props,
|
|
90
211
|
* keyed by lowercased package id. See {@link getCentralPackageVersions}.
|
|
212
|
+
* @param {Object} fallbackVersions Versions every project of the scan agrees on, keyed by
|
|
213
|
+
* lowercased package id, used only when nothing closer states one
|
|
214
|
+
* @param {Object} restoredNames Package ids as this project's restore output spells them,
|
|
215
|
+
* keyed by lowercased id. NuGet ids are case-insensitive, so a reference spelled
|
|
216
|
+
* differently names the same package and takes the restored spelling.
|
|
217
|
+
* @param {{name: string, version: (string|undefined)}} [projectIdentity] Package id and
|
|
218
|
+
* version this project's project.assets.json records for the project. They name the
|
|
219
|
+
* project in place of what the project file states.
|
|
91
220
|
*
|
|
92
|
-
* @returns {Object} Containing parent component, package, and
|
|
221
|
+
* @returns {Object} Containing parent component, package, dependencies, and the
|
|
222
|
+
* `$(Name)` version labels left unresolved without msbuild
|
|
93
223
|
*/
|
|
94
|
-
export declare function parseCsProjData(csProjData: string, projFile: string, pkgNameVersions?: Object, msbuildInstalled?: boolean, pkgVersionLabelCandidates?: Object, centralVersions?: Object
|
|
224
|
+
export declare function parseCsProjData(csProjData: string, projFile: string, pkgNameVersions?: Object, msbuildInstalled?: boolean, pkgVersionLabelCandidates?: Object, centralVersions?: Object, fallbackVersions?: Object, restoredNames?: Object, projectIdentity?: {
|
|
225
|
+
name: string;
|
|
226
|
+
version: (string | undefined);
|
|
227
|
+
}): Object;
|
|
228
|
+
/**
|
|
229
|
+
* Whether a file of a NuGet package is an assembly a consuming project can
|
|
230
|
+
* reference: a .dll, .exe, or .so under lib/, ref/, or runtimes/.
|
|
231
|
+
*
|
|
232
|
+
* @param {string} packageFile Path of the file inside the package, as project.assets.json lists it
|
|
233
|
+
* @returns {boolean} true for a referenced assembly
|
|
234
|
+
*/
|
|
235
|
+
export declare function isReferencedDotnetPackageFile(packageFile: string): boolean;
|
|
95
236
|
/**
|
|
96
237
|
* Parse a .NET project.assets.json file and return the package list and dependency tree.
|
|
97
238
|
*
|
|
@@ -101,11 +242,20 @@ export declare function parseCsProjData(csProjData: string, projFile: string, pk
|
|
|
101
242
|
*
|
|
102
243
|
* @param {string} csProjData Raw JSON string of the project.assets.json file
|
|
103
244
|
* @param {string} assetsJsonFile Path to the project.assets.json file, used for evidence properties
|
|
104
|
-
* @returns {{ pkgList: Object[], dependenciesList: Object[] }}
|
|
245
|
+
* @returns {{ pkgList: Object[], dependenciesList: Object[], projectPath: (string|undefined), outputPath: (string|undefined), projectIdentity: ({name: string, version: (string|undefined)}|undefined) }}
|
|
246
|
+
* `projectPath` is the project file the restore output belongs to and `outputPath` the
|
|
247
|
+
* directory restore wrote it to, both as restore recorded them. `projectIdentity` is the
|
|
248
|
+
* package id and version restore evaluated for the project, which root the dependency tree.
|
|
105
249
|
*/
|
|
106
250
|
export declare function parseCsProjAssetsData(csProjData: string, assetsJsonFile: string): {
|
|
107
251
|
pkgList: Object[];
|
|
108
252
|
dependenciesList: Object[];
|
|
253
|
+
projectPath: (string | undefined);
|
|
254
|
+
outputPath: (string | undefined);
|
|
255
|
+
projectIdentity: ({
|
|
256
|
+
name: string;
|
|
257
|
+
version: (string | undefined);
|
|
258
|
+
} | undefined);
|
|
109
259
|
};
|
|
110
260
|
/**
|
|
111
261
|
* Parse a .NET packages.lock.json file and return the package list, dependency tree,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers-dotnet.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-dotnet.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsers-dotnet.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-dotnet.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAL1B,MAK0B,EAAE,OAAO,AAJ3C,CAEA,QAE2C,GAFjC,MAAM,CAUlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAJ3B,MAI2B,EAAE,CAAC,EAH9B,MAG8B,GAF5B,MAAM,CAwDlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAJ3B,MAI2B,EAAE,OAAO,EAHpC,MAGoC,GAFlC,OAAO,CAmCn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,MAAM,GAAC,SAAS,CAAC,CAAA;KAAC,GAAC,SAAS,CAAC,CAAA;CAAE,CA4OxM;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAJlC,MAIkC,EAAE,WAAW,EAH/C,MAG+C,GAF7C;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAkIjF;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAJrC,MAIqC,EAAE,WAAW,EAHlD,MAGkD,GAFhD;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAAE,CAyH7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers-elm.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-elm.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsers-elm.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-elm.js"],"names":[],"mappings":"AA8DA;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,WAAW,EALhC,MAKgC,EAAE,WAAW,AAJrD,CAEA,EAFQ,MAI6C,GAF3C;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAoGxG;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,kBAAkB,EAJ7C,MAI6C,EAAE,aAAa,AAHpE,CACA,EADQ,MAG4D,GAF1D;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAyFxG;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAH9B,MAG8B,GAF5B,OAAO,CAKnB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,AAJhD,CAEA,EAFQ,MAIwC,GAFtC;IAAE,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,GAAC,IAAI,CAAC;IAAC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAAE,CAAA;CAAE,CA6FtH;AAmRD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAH7B,MAG6B,GAF3B,OAAO,CAKnB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAJjC,MAAM,EAI2B,EAAE,YAAY,AAHvD,CACA,EADQ,MAAM,EAGyC,GAF7C,OAAO,CAAC,MAAM,EAAE,CAAC,CA8E7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers-gleam.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-gleam.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsers-gleam.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-gleam.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAJpC,MAIoC,EAAE,gBAAgB,AAH9D,CACA,EADQ,MAGsD,GAFpD;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CAiGlF"}
|
|
@@ -1,3 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The licence notices of a module that is already on this machine, from the
|
|
3
|
+
* directory `go list` reported, from the project's `vendor/` tree, or from the
|
|
4
|
+
* module cache. Reading them costs no network round trip, so they answer
|
|
5
|
+
* before pkg.go.dev is asked. Every notice of the first directory holding
|
|
6
|
+
* one is returned, as pkg.go.dev reads every notice of a module.
|
|
7
|
+
*
|
|
8
|
+
* The directory `go list` reported is always read. The vendor tree and the
|
|
9
|
+
* module cache stand in for pkg.go.dev, so they are read only when licences
|
|
10
|
+
* are being fetched. Their directories are built from a module path and
|
|
11
|
+
* version read from modules.txt or go.sum, so a path or version the Go
|
|
12
|
+
* toolchain would reject, such as one with a `..` element, is not looked up:
|
|
13
|
+
* Go never writes such a directory, and joining it could leave the tree.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} name Full module path
|
|
16
|
+
* @param {string} [version] Module version, for the module cache layout
|
|
17
|
+
* @param {Object} [options] Options
|
|
18
|
+
* @param {string} [options.dir] The module's directory, as `go list` reports it
|
|
19
|
+
* @param {string} [options.projectRoot] Project root holding a `vendor/` tree
|
|
20
|
+
* @param {string} [options.vendorPath] The path the module is vendored under,
|
|
21
|
+
* when it differs from `name`: Go vendors a replaced module under the path
|
|
22
|
+
* it replaces
|
|
23
|
+
* @returns {{fileName: string, text: string}[]} The notices, in file name
|
|
24
|
+
* order; empty when none is held locally
|
|
25
|
+
*/
|
|
26
|
+
export declare function readLocalGoLicenses(name: string, version?: string, options?: {
|
|
27
|
+
dir?: string;
|
|
28
|
+
projectRoot?: string;
|
|
29
|
+
vendorPath?: string;
|
|
30
|
+
}): {
|
|
31
|
+
fileName: string;
|
|
32
|
+
text: string;
|
|
33
|
+
}[];
|
|
34
|
+
/**
|
|
35
|
+
* The text of the first licence notice {@link readLocalGoLicenses} finds.
|
|
36
|
+
*
|
|
37
|
+
* @param {string} name Full module path
|
|
38
|
+
* @param {string} [version] Module version, for the module cache layout
|
|
39
|
+
* @param {Object} [options] The options {@link readLocalGoLicenses} takes
|
|
40
|
+
* @returns {string|undefined} The notice text, or undefined when none is held
|
|
41
|
+
* locally
|
|
42
|
+
*/
|
|
43
|
+
export declare function readLocalGoLicense(name: string, version?: string, options?: Object): string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Order two Go module versions by semantic version precedence, as Go's semver
|
|
46
|
+
* package does: a pre-release, pseudo-versions included, sorts before its
|
|
47
|
+
* release, and build metadata such as `+incompatible` does not count.
|
|
48
|
+
*
|
|
49
|
+
* @param {string} a A module version
|
|
50
|
+
* @param {string} b Another module version
|
|
51
|
+
* @returns {number} Negative, zero or positive as `a` sorts before, with or
|
|
52
|
+
* after `b`
|
|
53
|
+
*/
|
|
54
|
+
export declare function compareGoVersions(a: string, b: string): number;
|
|
1
55
|
/**
|
|
2
56
|
* Builds a Go package component object containing purl, bom-ref, integrity hash,
|
|
3
57
|
* and optionally license and VCS external reference information.
|
|
@@ -6,16 +60,32 @@
|
|
|
6
60
|
* @param {string} name Package name (full module path when group is empty)
|
|
7
61
|
* @param {string} version Package version string
|
|
8
62
|
* @param {string} hash Integrity hash (e.g. "sha256-…"), used as _integrity
|
|
63
|
+
* @param {Object} [options] Options
|
|
64
|
+
* @param {boolean} [options.skipRegistryLookups] Leave the licence and VCS
|
|
65
|
+
* URL unset instead of asking pkg.go.dev. Used for the main module, which
|
|
66
|
+
* no registry holds.
|
|
67
|
+
* @param {string} [options.dir] The module's directory, as `go list` reports
|
|
68
|
+
* it, where a local licence notice is read first
|
|
69
|
+
* @param {string} [options.projectRoot] Project root holding a `vendor/` tree
|
|
70
|
+
* the module may be vendored in
|
|
71
|
+
* @param {string} [options.vendorPath] The path the module is vendored under,
|
|
72
|
+
* when it differs from `name`
|
|
9
73
|
* @returns {Promise<Object>} Component object ready for inclusion in a BOM package list
|
|
10
74
|
*/
|
|
11
|
-
export declare function getGoPkgComponent(group: string, name: string, version: string, hash: string
|
|
75
|
+
export declare function getGoPkgComponent(group: string, name: string, version: string, hash: string, options?: {
|
|
76
|
+
skipRegistryLookups?: boolean;
|
|
77
|
+
dir?: string;
|
|
78
|
+
projectRoot?: string;
|
|
79
|
+
vendorPath?: string;
|
|
80
|
+
}): Promise<Object>;
|
|
12
81
|
/**
|
|
13
82
|
* Method to parse go.mod files
|
|
14
83
|
*
|
|
15
84
|
* @param {String} goModData Contents of go.mod file
|
|
16
85
|
* @param {Object} gosumMap Data from go.sum files
|
|
17
86
|
*
|
|
18
|
-
* @returns {Object} Object containing parent component, rootList
|
|
87
|
+
* @returns {Object} Object containing parent component, rootList, packages
|
|
88
|
+
* list, and the replace directives as `replacements`
|
|
19
89
|
*/
|
|
20
90
|
export declare function parseGoModData(goModData: string, gosumMap: Object): Object;
|
|
21
91
|
/**
|
|
@@ -23,6 +93,12 @@ export declare function parseGoModData(goModData: string, gosumMap: Object): Obj
|
|
|
23
93
|
* Go package components. Cross-references the go.sum map for integrity hashes and
|
|
24
94
|
* sets scope and confidence based on hash availability.
|
|
25
95
|
*
|
|
96
|
+
* Only the modules the vendor tree holds become components: a module line
|
|
97
|
+
* followed by its `##` annotations or its packages. `go mod vendor` also
|
|
98
|
+
* records every replace directive of go.mod at the end of the file, as a
|
|
99
|
+
* module line with nothing after it, so the consumer can tell that the
|
|
100
|
+
* replacement had no effect; those lines name no vendored module.
|
|
101
|
+
*
|
|
26
102
|
* @param {string} txtFile Path to the modules.txt file
|
|
27
103
|
* @param {Object} gosumMap Map of "module@version" keys to sha256 hash values from go.sum
|
|
28
104
|
* @returns {Promise<Object[]>} List of Go package component objects with evidence
|
|
@@ -31,17 +107,40 @@ export declare function parseGoModulesTxt(txtFile: string, gosumMap: Object): Pr
|
|
|
31
107
|
/**
|
|
32
108
|
* Parse go list output
|
|
33
109
|
*
|
|
110
|
+
* Each row is printed by the template in createGoBom:
|
|
111
|
+
* `Path|Version|Indirect|GoMod|GoVersion|Main|Time|Deprecated|GoModSum|Dir|Sum|
|
|
112
|
+
* Replace.Path|Replace.Version|Replace.Sum`. Rows from older templates end
|
|
113
|
+
* after `Dir`.
|
|
114
|
+
*
|
|
115
|
+
* A replaced module is reported as the module Go builds (see
|
|
116
|
+
* {@link goReplacement}), with the checksum of the replacement. A go.work
|
|
117
|
+
* workspace makes every member a main module, so the parent is the main
|
|
118
|
+
* module in `options.mainModuleDir`, and the other members are returned as
|
|
119
|
+
* `workspaceModules`.
|
|
120
|
+
*
|
|
34
121
|
* @param {string} rawOutput Output from go list invocation
|
|
35
122
|
* @param {Object} gosumMap go.sum data
|
|
36
|
-
* @
|
|
123
|
+
* @param {Object} [options] Options
|
|
124
|
+
* @param {string} [options.mainModuleDir] Directory `go list` ran in, whose
|
|
125
|
+
* main module is the parent component
|
|
126
|
+
* @returns Object with parent component, list of packages, and the other main
|
|
127
|
+
* modules of a workspace
|
|
37
128
|
*/
|
|
38
|
-
export declare function parseGoListDep(rawOutput: string, gosumMap: Object
|
|
129
|
+
export declare function parseGoListDep(rawOutput: string, gosumMap: Object, options?: {
|
|
130
|
+
mainModuleDir?: string;
|
|
131
|
+
}): Promise<{
|
|
39
132
|
parentComponent: {};
|
|
40
133
|
pkgList: Object[];
|
|
134
|
+
workspaceModules: Object[];
|
|
41
135
|
}>;
|
|
42
136
|
/**
|
|
43
137
|
* Parse go mod graph
|
|
44
138
|
*
|
|
139
|
+
* `go mod graph` names every module by the path and version its requirement
|
|
140
|
+
* names, whatever replaces it. A replaced module is mapped to the module Go
|
|
141
|
+
* builds: from the components `go list` reported, which record what they
|
|
142
|
+
* replace, or else from the replace directives of go.mod.
|
|
143
|
+
*
|
|
45
144
|
* @param {string} rawOutput Output from go mod graph invocation
|
|
46
145
|
* @param {string} goModFile go.mod file
|
|
47
146
|
* @param {Object} gosumMap Hashes from gosum for lookups
|
|
@@ -76,12 +175,21 @@ export declare function parseGoModWhy(rawOutput: string): string | undefined;
|
|
|
76
175
|
* @returns {boolean} True when go reports the module as not needed
|
|
77
176
|
*/
|
|
78
177
|
export declare function isGoModWhyNotNeeded(rawOutput: string): boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Read the `module@version` to hash map out of go.sum contents, without
|
|
180
|
+
* building components or touching the network.
|
|
181
|
+
*
|
|
182
|
+
* @param {string} gosumData Content of go.sum
|
|
183
|
+
* @returns {Object} Map of `module@version` keys to the `sha256-…` checksum of
|
|
184
|
+
* the module content, for every version go.sum holds one for
|
|
185
|
+
*/
|
|
186
|
+
export declare function parseGosumHashes(gosumData: string): Object;
|
|
79
187
|
/**
|
|
80
188
|
* Parse go sum data
|
|
81
189
|
* @param {string} gosumData Content of go.sum
|
|
82
190
|
* @returns package list
|
|
83
191
|
*/
|
|
84
|
-
export declare function parseGosumData(gosumData: string): Promise<
|
|
192
|
+
export declare function parseGosumData(gosumData: string): Promise<Object[]>;
|
|
85
193
|
/**
|
|
86
194
|
* Parses the contents of a Gopkg.lock or Gopkg.toml file (dep tool format) and
|
|
87
195
|
* returns a list of Go package components. Optionally fetches license information
|
|
@@ -95,6 +203,12 @@ export declare function parseGopkgData(gopkgData: string): Promise<Object[]>;
|
|
|
95
203
|
* Parses the output of `go version -m` (build info) and returns a list of Go
|
|
96
204
|
* package components for each "dep" line, including name, version, and integrity hash.
|
|
97
205
|
*
|
|
206
|
+
* A dependency that a replace directive swapped out is printed as its `dep`
|
|
207
|
+
* line followed by a `=>` line naming the replacement (runtime/debug
|
|
208
|
+
* BuildInfo.String). The replacement is what the binary holds, so it is
|
|
209
|
+
* reported as {@link goReplacement} describes, with the replacement's
|
|
210
|
+
* checksum.
|
|
211
|
+
*
|
|
98
212
|
* @param {string} buildInfoData Raw string output from `go version -m`
|
|
99
213
|
* @returns {Promise<Object[]>} List of Go package component objects
|
|
100
214
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers-go.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-go.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsers-go.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-go.js"],"names":[],"mappings":"AAyPA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAX7B,MAW6B,EAAE,OAAO,AAV9C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0E7B;AAyBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,cAAc,CAAC,SAAS,EARnC,MAQmC,EAAE,QAAQ,EAP7C,MAO6C,EAAE,OAAO,AAN9D,CAGA,EAFA;IAAyB,aAAa,AAAtC,CAEA,EAFQ,MAAM,CAEd;CAGmE;;;;GA2HrE;AAsED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,eAAe,CACnC,SAAS,EATA,MASA,EACT,SAAS,EATA,MASA,EACT,QAAQ,EATC,MASD,EACR,QAAQ,QAAK,EACb,eAAe,GATN,MASW;;;;;;;;GAuTrB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAH5B,MAG4B,GAF1B,MAAM,GAAC,SAAS,CAc5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAHlC,MAGkC,GAFhC,OAAO,CASnB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAJ/B,MAI+B,GAH7B,MAAM,CAWlB;AAyCD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,SAAS,EAHnC,MAGmC,qBAY7C;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,SAAS,EAHnC,MAGmC,GAFjC,OAAO,CAAC,MAAM,EAAE,CAAC,CAmD7B;AAoBD;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CAAC,aAAa,EAH3C,MAG2C,GAFzC,OAAO,CAAC,MAAM,EAAE,CAAC,CAqD7B"}
|
|
@@ -7,10 +7,15 @@ import { Buffer } from "node:buffer";
|
|
|
7
7
|
* identity evidence and skip npm registry metadata fetching.
|
|
8
8
|
* @param {boolean} [securityProps=false] When true, append npm security-relevant
|
|
9
9
|
* properties such as lifecycle scripts, binaries, native addons, and deprecation notices.
|
|
10
|
+
* @param {Object} [options] Options
|
|
11
|
+
* @param {boolean} [options.fetchMetadata=true] When false, skip the npm
|
|
12
|
+
* registry round so that a caller can make one round for many manifests.
|
|
10
13
|
* @returns {Promise<Array<object>>} Parsed component list, enriched with npm
|
|
11
14
|
* registry metadata when available and not in simple mode.
|
|
12
15
|
*/
|
|
13
|
-
export declare function parsePkgJson(pkgJsonFile: string, simple?: boolean, securityProps?: boolean
|
|
16
|
+
export declare function parsePkgJson(pkgJsonFile: string, simple?: boolean, securityProps?: boolean, options?: {
|
|
17
|
+
fetchMetadata?: boolean;
|
|
18
|
+
}): Promise<Array<object>>;
|
|
14
19
|
/**
|
|
15
20
|
* Hash a root `.npm-extension` file exactly as npm does: ssri sha512 over
|
|
16
21
|
* `npm-extension:v1:<format>\n` followed by the raw file bytes. Mirrors
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers-js.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-js.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"parsers-js.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-js.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAgbrC;;;;;;;;;;;;;GAaG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAZF,MAYE,EACX,MAAM,AAZL,CAEA,EAFQ,OAYK,EACd,aAAa,AAXZ,CAEA,EAFQ,OAWY,EACrB,OAAO,AAVN,CAGA,EAFA;IAA0B,aAAa,AAAvC,CAEA,EAFQ,OAAO,CAEf;CAOW,GAPD,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAwPlC;AA0CD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAJhC,MAIgC,EAAE,KAAK,EAHvC,MAGuC,GAFrC,MAAM,CASlB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAHpC,MAGoC,GAFlC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EA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,mBAAmB,CAAC,OAAO,EALhC,MAKgC,EAAE,WAAW,EAJ7C,MAI6C,EAAE,OAAO,EAHtD,MAGsD,GAFpD,MAAM,GAAC,IAAI,CA4DvB;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,OAAO,OAAA,EAAE,YAAY,EAH7C,MAG6C,SAsFvD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,QAAA,GAH1B,MAAM,GAAC,SAAS,CAkC5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAVC,MAUD,EACR,eAAe,GAVN,MAUa,EACtB,iBAAiB,MAAK,EACtB,iBAAiB,GAVR,MAUa,EACtB,kBAAkB,GAVT,MAUc,EACvB,oBAAoB,GAVX,MAUgB,EACzB,iBAAiB,GAVR,MAUa,EACtB,WAAW,GAVF,MAUc;;;;;;;;;;;;;;;;;;GA6+BxB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,aAAa,EAFvC,MAEuC,kBA6CjD;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,SAAS,EAF/B,MAE+B,kBA2FzC;AAGD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAH9B,MAAM,GAAC,MAGuB,GAF5B;IAAE,KAAK,EAAE,MAAM,GAAC,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,GAAC,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,GAAC,IAAI,CAAA;CAAE,CAoBvG;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,QAAA,GAFjC,KAAK,QAAQ,CA4CzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers-julia.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-julia.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsers-julia.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-julia.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,AAJ9C,CACA,EADQ,MAIsC,EAAE,gBAAgB,AAHhE,CACA,EADQ,MAGwD,GAFtD;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CA+FzG;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAHhC,MAGgC,GAF9B,OAAO,CAUnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAHjC,MAGiC,GAF/B,OAAO,CASnB"}
|