@cdxgen/cdxgen 13.1.0 → 13.3.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 +32 -15
- package/bin/cdxgen.js +243 -122
- package/bin/evinse.js +7 -0
- package/bin/sign.js +88 -14
- package/bin/tracebom.js +64 -4
- package/bin/validate.js +29 -7
- package/bin/verify.js +79 -39
- package/data/crypto-oid.json +88 -12
- package/data/remediations.json +47 -0
- package/data/rules/ai-bom.yaml +78 -0
- package/data/rules/cargo-rust.yaml +132 -0
- package/data/rules/mcp-servers.yaml +122 -0
- package/lib/audit/targets.js +6 -1
- package/lib/cli/bomAssembly.js +117 -15
- package/lib/cli/cliOptions.js +93 -1
- package/lib/cli/index.js +235 -5
- package/lib/cli/jsBom.js +108 -26
- package/lib/cli/jvmBom.js +68 -12
- package/lib/cli/managedBom.js +264 -41
- package/lib/cli/nativeBom.js +923 -15
- package/lib/core/activity.js +120 -2
- package/lib/core/env.js +44 -7
- package/lib/core/fs.js +174 -6
- package/lib/core/metadataProperties.js +97 -0
- package/lib/core/projectConfig.js +31 -4
- package/lib/core/userAgent.js +151 -0
- package/lib/ecosystems/bunutils.js +269 -101
- package/lib/ecosystems/cargoCache.js +364 -0
- package/lib/ecosystems/caxa.js +447 -7
- package/lib/ecosystems/cmakeResolver.js +66 -0
- package/lib/ecosystems/cppEvidence.js +104 -33
- package/lib/ecosystems/ecosystems.js +260 -99
- package/lib/ecosystems/golem.js +11 -1
- package/lib/ecosystems/gradleutils.js +185 -9
- package/lib/ecosystems/jsEvidence.js +19 -20
- package/lib/ecosystems/kosi.js +1263 -0
- package/lib/ecosystems/npmutils.js +110 -9
- package/lib/ecosystems/parsers-crystal.js +179 -0
- package/lib/ecosystems/parsers-dotnet.js +120 -49
- package/lib/ecosystems/parsers-elm.js +816 -0
- package/lib/ecosystems/parsers-gleam.js +1 -1
- package/lib/ecosystems/parsers-go.js +47 -9
- package/lib/ecosystems/parsers-js.js +171 -50
- package/lib/ecosystems/parsers-julia.js +268 -0
- package/lib/ecosystems/parsers-lua.js +218 -0
- package/lib/ecosystems/parsers-misc.js +919 -161
- package/lib/ecosystems/parsers-nim.js +221 -0
- package/lib/ecosystems/parsers-opam.js +180 -0
- package/lib/ecosystems/parsers-perl.js +277 -0
- package/lib/ecosystems/parsers-python.js +27 -15
- package/lib/ecosystems/parsers-r.js +148 -0
- package/lib/ecosystems/parsers-rebar.js +411 -0
- package/lib/ecosystems/parsers-rust.js +954 -33
- package/lib/ecosystems/parsers-spack.js +204 -0
- package/lib/ecosystems/parsers-stack.js +264 -0
- package/lib/ecosystems/parsers-terraform.js +194 -0
- package/lib/ecosystems/rubyutils.js +1426 -166
- package/lib/ecosystems/rusi.js +158 -7
- package/lib/evinser/evinser.js +547 -129
- package/lib/evinser/swiftsem.js +1914 -302
- package/lib/helpers/agenticToolutils.js +925 -0
- package/lib/helpers/bomSigner.js +652 -221
- package/lib/inventory/agentFormulationParser.js +57 -4
- package/lib/inventory/aiCollector.js +504 -10
- package/lib/inventory/aiInventory.js +12 -0
- package/lib/inventory/analyzer.js +488 -30
- package/lib/inventory/astWorker.js +6 -0
- package/lib/inventory/atomUtils.js +568 -31
- package/lib/inventory/auditCategories.js +8 -0
- package/lib/inventory/cbomutils.js +30 -0
- package/lib/inventory/cdxrs.js +110 -14
- package/lib/inventory/communityAiConfigParser.js +215 -2
- package/lib/inventory/depsUtils.js +183 -11
- package/lib/inventory/display.js +4 -5
- package/lib/inventory/dosai.js +627 -13
- package/lib/inventory/dynamic.js +39 -1
- package/lib/inventory/envcontext.js +9 -6
- package/lib/inventory/evidenceUtils.js +26 -5
- package/lib/inventory/fetchBatch.js +190 -19
- package/lib/inventory/fetchRate.js +74 -11
- package/lib/inventory/forgeEnricher.js +3 -2
- package/lib/inventory/jvmToolEnv.js +6 -5
- package/lib/inventory/mcpConfigParser.js +166 -2
- package/lib/inventory/mcpDiscovery.js +11 -0
- package/lib/inventory/mcpServerManifest.js +389 -0
- package/lib/inventory/mcpbBundle.js +419 -0
- package/lib/inventory/plugins.js +3 -0
- package/lib/inventory/protobom.js +62 -89
- package/lib/inventory/protobomLoader.js +4 -0
- package/lib/inventory/purl.js +152 -3
- package/lib/inventory/rustFormulationParser.js +1 -1
- package/lib/inventory/sbomDocument.js +2 -70
- package/lib/inventory/source.js +47 -23
- package/lib/inventory/stylePackageRefs.js +41 -0
- package/lib/inventory/svelteUtils.js +524 -0
- package/lib/inventory/traceRunner.js +210 -21
- package/lib/managers/binary.js +115 -24
- package/lib/managers/docker.js +440 -20
- package/lib/managers/oci.js +39 -1
- package/lib/parsers/cmakeLists.js +452 -0
- package/lib/parsers/huggingfaceUtils.js +15 -7
- package/lib/parsers/largeJson.js +454 -0
- package/lib/parsers/npmrc.js +19 -1
- package/lib/parsers/onnx.js +294 -0
- package/lib/parsers/safetensors.js +114 -0
- package/lib/stages/postgen/introspection/markers.js +29 -6
- package/lib/stages/postgen/postgen.js +237 -16
- package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +462 -0
- package/lib/validator/bomValidator.js +6 -16
- package/lib/validator/index.js +48 -10
- package/lib/validator/reporters/console.js +3 -0
- package/lib/validator/reporters/json.js +1 -0
- package/lib/validator/reporters/sarif.js +7 -0
- package/package.json +27 -27
- package/types/lib/audit/targets.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 +2 -2
- package/types/lib/cli/index.d.ts.map +1 -1
- package/types/lib/cli/jsBom.d.ts +23 -0
- package/types/lib/cli/jsBom.d.ts.map +1 -1
- package/types/lib/cli/jvmBom.d.ts.map +1 -1
- package/types/lib/cli/managedBom.d.ts +33 -0
- package/types/lib/cli/managedBom.d.ts.map +1 -1
- package/types/lib/cli/nativeBom.d.ts +88 -8
- 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 +21 -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/metadataProperties.d.ts +39 -0
- package/types/lib/core/metadataProperties.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/userAgent.d.ts +56 -0
- package/types/lib/core/userAgent.d.ts.map +1 -0
- 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 +75 -0
- package/types/lib/ecosystems/cargoCache.d.ts.map +1 -0
- 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 +23 -0
- package/types/lib/ecosystems/cmakeResolver.d.ts.map +1 -1
- package/types/lib/ecosystems/cppEvidence.d.ts +2 -2
- package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
- package/types/lib/ecosystems/ecosystems.d.ts +15 -1
- 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 +40 -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 +86 -0
- package/types/lib/ecosystems/kosi.d.ts.map +1 -0
- package/types/lib/ecosystems/npmutils.d.ts +42 -0
- package/types/lib/ecosystems/npmutils.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-crystal.d.ts +27 -0
- package/types/lib/ecosystems/parsers-crystal.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-dotnet.d.ts +19 -0
- package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-elm.d.ts +79 -0
- package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-go.d.ts +10 -0
- package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-js.d.ts +10 -4
- package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-julia.d.ts +57 -0
- package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-lua.d.ts +50 -0
- package/types/lib/ecosystems/parsers-lua.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-misc.d.ts +90 -3
- package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-nim.d.ts +43 -0
- package/types/lib/ecosystems/parsers-nim.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-opam.d.ts +31 -0
- package/types/lib/ecosystems/parsers-opam.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-perl.d.ts +36 -0
- package/types/lib/ecosystems/parsers-perl.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-r.d.ts +35 -0
- package/types/lib/ecosystems/parsers-r.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-rebar.d.ts +42 -0
- package/types/lib/ecosystems/parsers-rebar.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-rust.d.ts +199 -0
- package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
- package/types/lib/ecosystems/parsers-spack.d.ts +33 -0
- package/types/lib/ecosystems/parsers-spack.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-stack.d.ts +35 -0
- package/types/lib/ecosystems/parsers-stack.d.ts.map +1 -0
- package/types/lib/ecosystems/parsers-terraform.d.ts +34 -0
- package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -0
- package/types/lib/ecosystems/pythonutils.d.ts +1 -1
- package/types/lib/ecosystems/rubyutils.d.ts +143 -2
- 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/evinser/evinser.d.ts +81 -2
- 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/agenticToolutils.d.ts +87 -0
- package/types/lib/helpers/agenticToolutils.d.ts.map +1 -0
- package/types/lib/helpers/bomSigner.d.ts +106 -13
- package/types/lib/helpers/bomSigner.d.ts.map +1 -1
- package/types/lib/inventory/agentFormulationParser.d.ts.map +1 -1
- package/types/lib/inventory/aiCollector.d.ts.map +1 -1
- package/types/lib/inventory/aiInventory.d.ts.map +1 -1
- package/types/lib/inventory/analyzer.d.ts.map +1 -1
- package/types/lib/inventory/atomUtils.d.ts +145 -3
- package/types/lib/inventory/atomUtils.d.ts.map +1 -1
- package/types/lib/inventory/auditCategories.d.ts +4 -0
- package/types/lib/inventory/auditCategories.d.ts.map +1 -1
- package/types/lib/inventory/cbomutils.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/communityAiConfigParser.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 +87 -1
- package/types/lib/inventory/dosai.d.ts.map +1 -1
- package/types/lib/inventory/dynamic.d.ts.map +1 -1
- package/types/lib/inventory/envcontext.d.ts.map +1 -1
- package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
- package/types/lib/inventory/fetchBatch.d.ts +34 -0
- package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
- package/types/lib/inventory/fetchRate.d.ts +9 -6
- package/types/lib/inventory/fetchRate.d.ts.map +1 -1
- package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
- package/types/lib/inventory/jvmToolEnv.d.ts +5 -4
- package/types/lib/inventory/jvmToolEnv.d.ts.map +1 -1
- package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/mcpDiscovery.d.ts.map +1 -1
- package/types/lib/inventory/mcpServerManifest.d.ts +19 -0
- package/types/lib/inventory/mcpServerManifest.d.ts.map +1 -0
- package/types/lib/inventory/mcpbBundle.d.ts +19 -0
- package/types/lib/inventory/mcpbBundle.d.ts.map +1 -0
- package/types/lib/inventory/plugins.d.ts.map +1 -1
- package/types/lib/inventory/protobom.d.ts +18 -13
- package/types/lib/inventory/protobom.d.ts.map +1 -1
- package/types/lib/inventory/protobomLoader.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/sbomDocument.d.ts.map +1 -1
- package/types/lib/inventory/source.d.ts.map +1 -1
- package/types/lib/inventory/stylePackageRefs.d.ts +17 -0
- package/types/lib/inventory/stylePackageRefs.d.ts.map +1 -0
- package/types/lib/inventory/svelteUtils.d.ts +124 -0
- package/types/lib/inventory/svelteUtils.d.ts.map +1 -0
- package/types/lib/inventory/traceRunner.d.ts +47 -1
- package/types/lib/inventory/traceRunner.d.ts.map +1 -1
- 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 +14 -0
- package/types/lib/managers/oci.d.ts.map +1 -1
- package/types/lib/parsers/cmakeLists.d.ts +76 -0
- package/types/lib/parsers/cmakeLists.d.ts.map +1 -0
- package/types/lib/parsers/huggingfaceUtils.d.ts +8 -1
- package/types/lib/parsers/huggingfaceUtils.d.ts.map +1 -1
- 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/onnx.d.ts +28 -0
- package/types/lib/parsers/onnx.d.ts.map +1 -0
- package/types/lib/parsers/safetensors.d.ts +22 -0
- package/types/lib/parsers/safetensors.d.ts.map +1 -0
- package/types/lib/stages/postgen/introspection/markers.d.ts +3 -2
- package/types/lib/stages/postgen/introspection/markers.d.ts.map +1 -1
- package/types/lib/stages/postgen/postgen.d.ts +33 -0
- package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
- package/types/lib/validator/bomValidator.d.ts.map +1 -1
- package/types/lib/validator/index.d.ts +10 -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
|
@@ -19,6 +19,48 @@ export declare function setNpmOptionalProperty(pkg: object): void;
|
|
|
19
19
|
* @returns {void}
|
|
20
20
|
*/
|
|
21
21
|
export declare function setNpmPeerProperty(pkg: object): void;
|
|
22
|
+
/**
|
|
23
|
+
* Marks an npm component as imported only for its TypeScript types.
|
|
24
|
+
*
|
|
25
|
+
* @param {object} pkg Component object to annotate
|
|
26
|
+
* @returns {void}
|
|
27
|
+
*/
|
|
28
|
+
export declare function setNpmTypeOnlyProperty(pkg: object): void;
|
|
29
|
+
/**
|
|
30
|
+
* Clean an npm version the way `npm publish` does before it records a release.
|
|
31
|
+
*
|
|
32
|
+
* Publishing a directory runs the manifest through `npm pkg fix`
|
|
33
|
+
* (`fixVersionField` in `@npmcli/package-json`, which calls `semver.clean` in
|
|
34
|
+
* loose mode) and then through libnpmpublish, which calls `semver.clean` again
|
|
35
|
+
* in strict mode and records the result as the packument version, the
|
|
36
|
+
* dist-tag, the `_id` and the tarball file name. Semver build metadata
|
|
37
|
+
* (`1.0.0+build.5`), a leading `v` or `=`, surrounding whitespace and leading
|
|
38
|
+
* zeros are dropped; a prerelease is kept.
|
|
39
|
+
*
|
|
40
|
+
* The `package.json` inside the published tarball keeps the original string,
|
|
41
|
+
* and so do the lockfiles npm, pnpm, yarn and bun write for a project, a
|
|
42
|
+
* workspace member or a git, file or link dependency. The cleaned form is the
|
|
43
|
+
* version the npm registry knows the package by.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} version Version as a manifest or lockfile records it
|
|
46
|
+
* @returns {string|null} The cleaned version, or null when npm would reject `version` as invalid semver
|
|
47
|
+
*/
|
|
48
|
+
export declare function cleanNpmVersion(version: string): string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Record the version npm would publish when it differs from the recorded one.
|
|
51
|
+
*
|
|
52
|
+
* Sets `cdx:npm:cleanedVersion` on an npm component whose version is valid
|
|
53
|
+
* semver but not in the form {@link cleanNpmVersion} produces, for example
|
|
54
|
+
* `1.0.0+build.5` (published as `1.0.0`). The component's `version` and `purl`
|
|
55
|
+
* keep the recorded string: that is what the manifest and lockfile say. A
|
|
56
|
+
* component whose version is already clean, or not semver at all (a git
|
|
57
|
+
* commit, a `file:` path), is left without the property, and a stale value from
|
|
58
|
+
* an earlier pass is replaced.
|
|
59
|
+
*
|
|
60
|
+
* @param {object} component Component or package object with `version` and `purl`
|
|
61
|
+
* @returns {object} The same component, for chaining
|
|
62
|
+
*/
|
|
63
|
+
export declare function setNpmCleanedVersionProperty(component: object): object;
|
|
22
64
|
/**
|
|
23
65
|
* Helper function to create a properly encoded workspace PURL
|
|
24
66
|
*
|
|
@@ -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":"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EAAE,MAAM,CAAA;CAAC,CAAC,GAAC,SAAS,CA8BxD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAJhC,MAIgC,GAH9B;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAC,GAAC,IAAI,CAsBtG;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,wBAAA,EAAE,SAAS,wBAAA,EAAE,WAAW,AAHjE,CACA,wBAEsE,0BAsExE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Crystal parser for `shard.yml` and `shard.lock`.
|
|
3
|
+
*
|
|
4
|
+
* Shards resolves dependencies declared in `shard.yml` and records the
|
|
5
|
+
* resolved set in `shard.lock`, which pins each dependency's version and
|
|
6
|
+
* source repository. Both files are YAML and are read with the standard
|
|
7
|
+
* parser.
|
|
8
|
+
*
|
|
9
|
+
* No `crystal` purl type is registered, so shards are identified as generic
|
|
10
|
+
* packages carrying a `cdx:purl:proposedType=crystal` property, following
|
|
11
|
+
* the convention used for nix and zig. This keeps the BOM valid today and
|
|
12
|
+
* allows a mechanical migration if a type is registered upstream.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Parse a Crystal project from `shard.yml` and optional `shard.lock`.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} shardYmlFile Path to `shard.yml`
|
|
18
|
+
* @param {string} [shardLockFile] Path to `shard.lock`, if present
|
|
19
|
+
* @returns {{ pkgList: object[], dependencies: object[], parentComponent: object, rootInputs?: string[] }}
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseShardsProject(shardYmlFile: string, shardLockFile?: string): {
|
|
22
|
+
pkgList: object[];
|
|
23
|
+
dependencies: object[];
|
|
24
|
+
parentComponent: object;
|
|
25
|
+
rootInputs?: string[];
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=parsers-crystal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers-crystal.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-crystal.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;GAYG;AAEH;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAJpC,MAIoC,EAAE,aAAa,AAH3D,CACA,EADQ,MAGmD,GAFjD;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,CA6FzG"}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apply a version to a NuGet component so that the `version` field and the purl
|
|
3
|
+
* always agree.
|
|
4
|
+
*
|
|
5
|
+
* A .NET manifest can state a version that is not a version: an MSBuild property
|
|
6
|
+
* such as `$(JsonVersion)`, a range such as `[3.13.3,4.0)`, a wildcard such as
|
|
7
|
+
* `2.0.*`, or nothing at all. Such a declaration cannot go into a purl, so a
|
|
8
|
+
* component that kept it in `version` while its purl carried none described one
|
|
9
|
+
* package two ways. A scanner range matching on the versionless purl then reports
|
|
10
|
+
* every advisory published against the package name.
|
|
11
|
+
*
|
|
12
|
+
* The declaration is not lost: callers record it as `cdx:nuget:declared_version_range`.
|
|
13
|
+
*
|
|
14
|
+
* @param {Object} pkg Component to update in place. `name` must already be set.
|
|
15
|
+
* @param {String} [version] Version as stated or resolved, concrete or not
|
|
16
|
+
*
|
|
17
|
+
* @returns {Object} The same component
|
|
18
|
+
*/
|
|
19
|
+
export declare function applyNugetVersion(pkg: Object, version?: string): Object;
|
|
1
20
|
/**
|
|
2
21
|
* Method to parse .nupkg files
|
|
3
22
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers-dotnet.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-dotnet.js"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,SAAS,QAAA,GAF7B,MAAM,CAWlB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,QAAA,EAAE,UAAU,QAAA,GAFxC,MAAM,
|
|
1
|
+
{"version":3,"file":"parsers-dotnet.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-dotnet.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAL1B,MAK0B,EAAE,OAAO,AAJ3C,CAEA,QAE2C,GAFjC,MAAM,CAUlB;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,SAAS,QAAA,GAF7B,MAAM,CAWlB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,QAAA,EAAE,UAAU,QAAA,GAFxC,MAAM,CAwKlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAP3B,MAO2B,EAAE,OAAO,EANpC,MAMoC,EAAE,eAAe,GALrD,MAK0D,GAFxD,MAAM,EAAE,CAiFpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,QAAA,GAHxC,MAAM,CA+ClB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,QAAA,EAAE,KAAK,GAN9C,MAMmD,GAHjD,MAAM,CAsBlB;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,QAAA,GAFvC,MAAM,CA2ClB;AAiBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,UAAU,QAAA,EACV,QAAQ,QAAA,EACR,eAAe,GAXN,MAWW,EACpB,gBAAgB,UAAQ,EACxB,yBAAyB,GAXhB,MAWqB,EAC9B,eAAe,GAXN,MAWW,GART,MAAM,CAiflB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAJrC,MAIqC,EAAE,cAAc,EAHrD,MAGqD,GAFnD;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAAE,CAuP7D;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,CAkHjF;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"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse an Elm project from its 0.19 `elm.json`.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} elmJsonFile Path to `elm.json`
|
|
5
|
+
* @param {object} [cacheReader] Reader returned by {@link createElmCacheReader};
|
|
6
|
+
* when omitted, one is derived from the manifest's pinned compiler version
|
|
7
|
+
* @returns {{ pkgList: object[], dependencies: object[], parentComponent: object, rootInputs: string[] }}
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseElmProject(elmJsonFile: string, cacheReader?: object): {
|
|
10
|
+
pkgList: object[];
|
|
11
|
+
dependencies: object[];
|
|
12
|
+
parentComponent: object;
|
|
13
|
+
rootInputs: string[];
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Parse a legacy 0.18 Elm project from `elm-package.json` and its optional
|
|
17
|
+
* `elm-stuff/exact-dependencies.json` lock file.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} elmPackageJsonFile Path to `elm-package.json`
|
|
20
|
+
* @param {string} [exactDepsFile] Path to the lock file, if present
|
|
21
|
+
* @returns {{ pkgList: object[], dependencies: object[], parentComponent: object, rootInputs: string[] }}
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseLegacyElmProject(elmPackageJsonFile: string, exactDepsFile?: string): {
|
|
24
|
+
pkgList: object[];
|
|
25
|
+
dependencies: object[];
|
|
26
|
+
parentComponent: object;
|
|
27
|
+
rootInputs: string[];
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Tell whether a candidate `elm.json` really is an Elm manifest. The file
|
|
31
|
+
* name is distinctive but lives in every Elm project, so detection only
|
|
32
|
+
* needs a cheap content check before dispatching.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} filePath Path to the candidate `elm.json`
|
|
35
|
+
* @returns {boolean} true when the file declares an Elm project
|
|
36
|
+
*/
|
|
37
|
+
export declare function isElmProjectFile(filePath: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Create a reader for the local Elm package cache. Reads are memoised and
|
|
40
|
+
* silently disabled when the cache directory does not exist.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} [elmVersionHint] Exact compiler version directory to try
|
|
43
|
+
* first, when the project pins one
|
|
44
|
+
* @returns {{ readMetadata: (name: string, version: string) => object|null, listVersions: (name: string) => string[] }}
|
|
45
|
+
*/
|
|
46
|
+
export declare function createElmCacheReader(elmVersionHint?: string): {
|
|
47
|
+
readMetadata: (name: string, version: string) => object | null;
|
|
48
|
+
listVersions: (name: string) => string[];
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Whether the registry's `robots.txt` permits fetching a package's documents.
|
|
52
|
+
*
|
|
53
|
+
* @param {string} name Package name, `author/project`
|
|
54
|
+
* @returns {boolean} true when no `Disallow` rule covers the package
|
|
55
|
+
*/
|
|
56
|
+
export declare function isRegistryCrawlable(name: string): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Enrich Elm components from the package registry.
|
|
59
|
+
*
|
|
60
|
+
* Only the gaps left by the local cache are fetched, and only for packages
|
|
61
|
+
* with a resolved version that `robots.txt` permits. Two documents are read
|
|
62
|
+
* per package, both of which the compiler itself reads when it installs one:
|
|
63
|
+
*
|
|
64
|
+
* - `elm.json` — the published manifest, carrying the summary, the license
|
|
65
|
+
* and the package's own dependencies, which close the gaps in the
|
|
66
|
+
* dependency graph that an unpopulated cache leaves behind.
|
|
67
|
+
* - `endpoint.json` — the source archive URL and the SHA-1 of its bytes,
|
|
68
|
+
* which the compiler verifies after downloading. It becomes the
|
|
69
|
+
* component's distribution reference and hash.
|
|
70
|
+
*
|
|
71
|
+
* Requests carry cdxgen's contact user-agent and pass through the shared
|
|
72
|
+
* per-host rate policy for `package.elm-lang.org` (see `fetchRate.js`).
|
|
73
|
+
*
|
|
74
|
+
* @param {object[]} pkgList Components to enrich, mutated in place
|
|
75
|
+
* @param {object[]} [dependencies] Dependency edges to complete in place
|
|
76
|
+
* @returns {Promise<object[]>} The same package list
|
|
77
|
+
*/
|
|
78
|
+
export declare function getElmMetadata(pkgList: object[], dependencies?: object[]): Promise<object[]>;
|
|
79
|
+
//# sourceMappingURL=parsers-elm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers-elm.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-elm.js"],"names":[],"mappings":"AAiEA;;;;;;;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,CAyD7B"}
|
|
@@ -66,6 +66,16 @@ export declare function parseGoModGraph(rawOutput: string, goModFile: string, go
|
|
|
66
66
|
* @returns {string|undefined} package name or none
|
|
67
67
|
*/
|
|
68
68
|
export declare function parseGoModWhy(rawOutput: string): string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Reports whether `go mod why -m` output says the main module does not need
|
|
71
|
+
* the module. go prints `(main module does not need module X)`, or
|
|
72
|
+
* `(main module does not need to vendor module X)` with `-vendor`, and exits
|
|
73
|
+
* with status 0 either way.
|
|
74
|
+
*
|
|
75
|
+
* @param {string} rawOutput Output from go mod why
|
|
76
|
+
* @returns {boolean} True when go reports the module as not needed
|
|
77
|
+
*/
|
|
78
|
+
export declare function isGoModWhyNotNeeded(rawOutput: string): boolean;
|
|
69
79
|
/**
|
|
70
80
|
* Parse go sum data
|
|
71
81
|
* @param {string} gosumData Content of go.sum
|
|
@@ -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":"AAgCA;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EANlC,MAMkC,EAAE,IAAI,EALxC,MAKwC,EAAE,OAAO,EAJjD,MAIiD,EAAE,IAAI,EAHvD,MAGuD,GAFrD,OAAO,CAAC,MAAM,CAAC,CAqD3B;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,SAAS,QAAA,EAAE,QAAQ,EAJ7C,MAI6C,GAF3C,MAAM,CA2ClB;AAkHD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAJpC,MAIoC,EAAE,QAAQ,EAH9C,MAG8C,GAF5C,OAAO,CAAC,MAAM,EAAE,CAAC,CA6B7B;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,SAAS,EAJnC,MAImC,EAAE,QAAQ,EAH7C,MAG6C;;;GAuHvD;AA6CD;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,SAAS,EATA,MASA,EACT,SAAS,EATA,MASA,EACT,QAAQ,EATC,MASD,EACR,QAAQ,QAAK,EACb,eAAe,GATN,MASW;;;;;;;;GAwMrB;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;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,SAAS,EAHnC,MAGmC,kBA6B7C;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,SAAS,EAHnC,MAGmC,GAFjC,OAAO,CAAC,MAAM,EAAE,CAAC,CAiD7B;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,aAAa,EAH3C,MAG2C,GAFzC,OAAO,CAAC,MAAM,EAAE,CAAC,CAkC7B"}
|
|
@@ -62,12 +62,15 @@ export declare function yarnLockToIdentMap(lockData: string): {};
|
|
|
62
62
|
* @param {Object} parentComponent parent component
|
|
63
63
|
* @param {Array[String]} workspacePackages Workspace packages
|
|
64
64
|
* @param {Object} workspaceSrcFiles Workspace package.json files
|
|
65
|
-
* @param {Object}
|
|
65
|
+
* @param {Object} workspaceDirectDeps Declared dependencies (name to range) of each workspace package
|
|
66
66
|
* @param {Object} depsWorkspaceRefs Workspace references for each dependency
|
|
67
67
|
*/
|
|
68
|
-
export declare function parseYarnLock(yarnLockFile: string, parentComponent?: Object, workspacePackages?: any, workspaceSrcFiles?: Object,
|
|
68
|
+
export declare function parseYarnLock(yarnLockFile: string, parentComponent?: Object, workspacePackages?: any, workspaceSrcFiles?: Object, workspaceDirectDeps?: Object, depsWorkspaceRefs?: Object): Promise<{
|
|
69
69
|
pkgList: any[];
|
|
70
|
-
dependenciesList:
|
|
70
|
+
dependenciesList: {
|
|
71
|
+
ref: string;
|
|
72
|
+
dependsOn: any[];
|
|
73
|
+
}[];
|
|
71
74
|
}>;
|
|
72
75
|
/**
|
|
73
76
|
* Parse nodejs shrinkwrap deps file
|
|
@@ -103,7 +106,10 @@ export declare function stripPnpmPeerSuffix(version: string): string;
|
|
|
103
106
|
* {@link stripPnpmPeerSuffix}.
|
|
104
107
|
*
|
|
105
108
|
* @param {string|object} depPkg Dependency version string or package object.
|
|
106
|
-
* @param {string} relativePath Base path for resolving link/file references
|
|
109
|
+
* @param {string} relativePath Base path for resolving link/file references:
|
|
110
|
+
* the directory of the importer that declares the dependency. Without it the
|
|
111
|
+
* path is tried against the working directory, which only works when cdxgen
|
|
112
|
+
* runs from the lock file's directory.
|
|
107
113
|
* @returns {Promise<string|undefined>} The resolved published version.
|
|
108
114
|
*/
|
|
109
115
|
export declare function getVersionNumPnpm(depPkg: string | object, relativePath: string): Promise<string | undefined>;
|
|
@@ -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;AA0arC;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,WAAW,EATF,MASE,EACX,MAAM,AATL,CAEA,EAFQ,OASK,EACd,aAAa,AARZ,CAEA,EAFQ,OAQY,GANV,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CA+OlC;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,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAC,GAAC,IAAI,CA6BjF;AA+ED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,WAAW,EAHnC,MAGmC,EAAE,OAAO,GAF5C,MAEiD;;;
|
|
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;AA0arC;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,WAAW,EATF,MASE,EACX,MAAM,AATL,CAEA,EAFQ,OASK,EACd,aAAa,AARZ,CAEA,EAFQ,OA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AAU,EAAE,MAAM,GAAC,IAAI,CAAA;CAAE,CAoBvG;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,QAAA,GAFjC,KAAK,QAAQ,CA4CzB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Julia project parser.
|
|
3
|
+
*
|
|
4
|
+
* Two files are consulted:
|
|
5
|
+
* - `Project.toml` — the manifest holding the project name, UUID, version,
|
|
6
|
+
* the names (and UUIDs) of its direct dependencies, and version
|
|
7
|
+
* compatibility constraints.
|
|
8
|
+
* - `Manifest.toml` — the lock file written by Pkg on resolve, pinning every
|
|
9
|
+
* package in the environment with its UUID, version, content hash, and the
|
|
10
|
+
* names of the packages it depends on.
|
|
11
|
+
*
|
|
12
|
+
* Packages are identified with the registered `julia` purl type, which carries
|
|
13
|
+
* the package UUID as a required qualifier (`pkg:julia/JSON@0.21.4?uuid=…`).
|
|
14
|
+
* The UUID is what Julia itself uses to identify packages, so keeping it in
|
|
15
|
+
* the purl lets consumers match components across differently named mirrors.
|
|
16
|
+
*
|
|
17
|
+
* Julia standard libraries ship with the language itself and carry no version
|
|
18
|
+
* in the manifest; they are emitted without a version and marked as standard
|
|
19
|
+
* libraries so they can be told apart from registry packages.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Parse a Julia environment from its `Project.toml` and optional
|
|
23
|
+
* `Manifest.toml`.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} [projectTomlFile] Path to `Project.toml`, if present
|
|
26
|
+
* @param {string} [manifestTomlFile] Path to `Manifest.toml`, if present
|
|
27
|
+
* @returns {{ pkgList: object[], dependencies: object[], parentComponent: object, rootInputs?: string[] }}
|
|
28
|
+
*/
|
|
29
|
+
export declare function parseJuliaProject(projectTomlFile?: string, manifestTomlFile?: string): {
|
|
30
|
+
pkgList: object[];
|
|
31
|
+
dependencies: object[];
|
|
32
|
+
parentComponent: object;
|
|
33
|
+
rootInputs?: string[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Tell whether a `Project.toml` declares a Julia environment.
|
|
37
|
+
*
|
|
38
|
+
* Cloud Native Buildpacks and Gleam use the same file names, so the caller
|
|
39
|
+
* needs a content check before dispatching. A Julia project always carries a
|
|
40
|
+
* package `uuid`, a `[deps]` table, or a `[compat]` table.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} filePath Path to the candidate `Project.toml`
|
|
43
|
+
* @returns {boolean} true when the file is a Julia project
|
|
44
|
+
*/
|
|
45
|
+
export declare function isJuliaProjectFile(filePath: string): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Tell whether a `Manifest.toml` is a Julia lock file.
|
|
48
|
+
*
|
|
49
|
+
* Gleam writes a lowercase `manifest.toml` that case-insensitive filesystems
|
|
50
|
+
* surface under the same glob; a Julia manifest is recognised by its
|
|
51
|
+
* `manifest_format` marker or its `[[deps.<Name>]]` tables.
|
|
52
|
+
*
|
|
53
|
+
* @param {string} filePath Path to the candidate `Manifest.toml`
|
|
54
|
+
* @returns {boolean} true when the file is a Julia manifest
|
|
55
|
+
*/
|
|
56
|
+
export declare function isJuliaManifestFile(filePath: string): boolean;
|
|
57
|
+
//# sourceMappingURL=parsers-julia.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers-julia.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-julia.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;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"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lua parser for rockspecs and `luarocks.lock`.
|
|
3
|
+
*
|
|
4
|
+
* A rockspec is a Lua source file whose top level is a sequence of
|
|
5
|
+
* assignments describing one package: its name, version, source, and a
|
|
6
|
+
* `dependencies` table of constraint strings (`"lua >= 5.1"`). LuaRocks 3
|
|
7
|
+
* can also persist the resolved set to `luarocks.lock`. Both are read with a
|
|
8
|
+
* small line scanner over the shapes these files actually use, rather than a
|
|
9
|
+
* Lua interpreter.
|
|
10
|
+
*
|
|
11
|
+
* Rocks are identified with the registered `luarocks` purl type
|
|
12
|
+
* (`pkg:luarocks/<name>@<version>`). Lua versions carry a rock revision
|
|
13
|
+
* suffix (`5.4.6-1`); the full rock version is kept verbatim because the
|
|
14
|
+
* revision distinguishes distinct builds.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Parse a rockspec manifest.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} rockspecFile Path to the `.rockspec` file
|
|
20
|
+
* @returns {{ pkgList: object[], parentComponent: object }}
|
|
21
|
+
*/
|
|
22
|
+
export declare function parseRockspecFile(rockspecFile: string): {
|
|
23
|
+
pkgList: object[];
|
|
24
|
+
parentComponent: object;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Parse a `luarocks.lock` file.
|
|
28
|
+
*
|
|
29
|
+
* @param {string} lockFile Path to `luarocks.lock`
|
|
30
|
+
* @param {string} [rockspecFile] Path to the rockspec, to mark direct deps
|
|
31
|
+
* @returns {{ pkgList: object[], parentComponent: object }}
|
|
32
|
+
*/
|
|
33
|
+
export declare function parseLuaRocksLock(lockFile: string, rockspecFile?: string): {
|
|
34
|
+
pkgList: object[];
|
|
35
|
+
parentComponent: object;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Read the top-level assignments of a Lua configuration file.
|
|
39
|
+
*
|
|
40
|
+
* The files cdxgen consumes use a constrained surface: `key = value` lines
|
|
41
|
+
* where the value is a quoted string, a table of strings or
|
|
42
|
+
* `["key"] = "value"` entries, or a short list expression. Values are
|
|
43
|
+
* normalised to strings, arrays of `{name, constraint}` records, or arrays
|
|
44
|
+
* of `{key, value}` records for mixed tables.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} filePath File to read
|
|
47
|
+
* @returns {Map<string, *>} Parsed top-level fields
|
|
48
|
+
*/
|
|
49
|
+
export declare function readLuaAssignments(filePath: string): Map<string, any>;
|
|
50
|
+
//# sourceMappingURL=parsers-lua.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers-lua.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-lua.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAHnC,MAGmC,GAFjC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CA4B1D;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAJ/B,MAI+B,EAAE,YAAY,AAHrD,CACA,EADQ,MAG6C,GAF3C;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CA8B1D;AAuCD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAHhC,MAGgC,GAF9B,GAAG,CAAC,MAAM,EAAE,GAAC,CAAC,CA4D1B"}
|
|
@@ -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
|
|
@@ -447,4 +511,27 @@ export declare function resetCocoaPodspecPrefetch(): void;
|
|
|
447
511
|
* @returns {Promise<void>}
|
|
448
512
|
*/
|
|
449
513
|
export declare function prefetchCocoaPodspecs(dependencies: Array<Object>): Promise<void>;
|
|
514
|
+
/**
|
|
515
|
+
* Parse an xmake `xmake-requires.lock` file.
|
|
516
|
+
*
|
|
517
|
+
* The lock is a Lua table, written when the `package.requires_lock` policy is
|
|
518
|
+
* enabled. Its top level holds a `__meta__` entry plus one section per build
|
|
519
|
+
* configuration, keyed `platform|arch`; each section maps a requirement key
|
|
520
|
+
* (`"zlib#31fecfc4"`, or `"sol2 v3.2.1#72267bd5"` when the requirement
|
|
521
|
+
* carries a version) to a table with the resolved `version` and the
|
|
522
|
+
* `repo` revision the package definition came from.
|
|
523
|
+
*
|
|
524
|
+
* The same package appears once per configuration, so entries are collapsed
|
|
525
|
+
* by name and version, and the configurations a package was resolved for are
|
|
526
|
+
* kept as a property. A requirement key without a `version` field names a
|
|
527
|
+
* system package xmake did not resolve; it is inventoried without a version.
|
|
528
|
+
*
|
|
529
|
+
* No `xmake` purl type is registered, so packages are identified as generic
|
|
530
|
+
* carrying a `cdx:purl:proposedType=xmake` property, following the
|
|
531
|
+
* convention used for nix and zig.
|
|
532
|
+
*
|
|
533
|
+
* @param {string} lockFile Path to `xmake-requires.lock`
|
|
534
|
+
* @returns {Object[]} Package records for the pinned requirements
|
|
535
|
+
*/
|
|
536
|
+
export declare function parseXmakeRequiresLock(lockFile: string): Object[];
|
|
450
537
|
//# sourceMappingURL=parsers-misc.d.ts.map
|
|
@@ -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":"AA6DA;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,KAAA,EAAE,QAAQ,KAAA,GAF/C,MAAM,CAuElB;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,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;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,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;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CAAC,YAAY,EAJ7C,KAAK,CAAC,MAAM,CAIiC,GAF3C,OAAO,CAAC,IAAI,CAAC,CA4CzB;AAqUD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAHpC,MAGoC,GAFlC,MAAM,EAAE,CAoHpB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nim parser for `.nimble` manifests and `nimble.lock`.
|
|
3
|
+
*
|
|
4
|
+
* A `.nimble` file is a Nim script whose practical surface is a set of
|
|
5
|
+
* `key = "value"` assignments plus `requires "dep >= 1.0"` lines; it is read
|
|
6
|
+
* with a line scanner over those shapes rather than a Nim interpreter.
|
|
7
|
+
* Nimble persists the resolved dependency set to `nimble.lock` (JSON), which
|
|
8
|
+
* is the source of truth for versions.
|
|
9
|
+
*
|
|
10
|
+
* No `nim` purl type is registered, so packages are identified as generic
|
|
11
|
+
* carrying a `cdx:purl:proposedType=nim` property, following the convention
|
|
12
|
+
* used for nix and zig.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Parse a Nim project from a `.nimble` manifest and optional `nimble.lock`.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} nimbleFile Path to the `.nimble` file
|
|
18
|
+
* @param {string} [nimbleLockFile] Path to `nimble.lock`, if present
|
|
19
|
+
* @returns {{ pkgList: object[], dependencies: object[], parentComponent: object, rootInputs?: string[] }}
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseNimProject(nimbleFile: string, nimbleLockFile?: string): {
|
|
22
|
+
pkgList: object[];
|
|
23
|
+
dependencies: object[];
|
|
24
|
+
parentComponent: object;
|
|
25
|
+
rootInputs?: string[];
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Read the assignments and requirements of a `.nimble` file.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} filePath File to read
|
|
31
|
+
* @returns {{name?: string, version?: string, description?: string, license?: string, requires: Array<{name: string, constraint?: string}>}}
|
|
32
|
+
*/
|
|
33
|
+
export declare function readNimbleFile(filePath: string): {
|
|
34
|
+
name?: string;
|
|
35
|
+
version?: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
license?: string;
|
|
38
|
+
requires: Array<{
|
|
39
|
+
name: string;
|
|
40
|
+
constraint?: string;
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=parsers-nim.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers-nim.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-nim.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AAEH;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAJ/B,MAI+B,EAAE,cAAc,AAHvD,CACA,EADQ,MAG+C,GAF7C;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,CAqGzG;AA2CD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAH5B,MAG4B,GAF1B;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;CAAC,CAgD3I"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OCaml opam parser for `.opam.locked` files.
|
|
3
|
+
*
|
|
4
|
+
* `opam lock` writes a `<name>.opam.locked` file that pins the full resolved
|
|
5
|
+
* dependency set of a project: a `depends:` field listing every package with
|
|
6
|
+
* an equality constraint on its version, and a `pin-depends:` field for
|
|
7
|
+
* packages pinned to a URL. The file is opam's own syntax, a small
|
|
8
|
+
* line-oriented field language, which is read here with a line scanner rather
|
|
9
|
+
* than a monolithic expression.
|
|
10
|
+
*
|
|
11
|
+
* A locked file holds the closure only: it does not record which packages are
|
|
12
|
+
* direct dependencies of the project, so every entry is reported with the
|
|
13
|
+
* same standing and the project root links to all of them.
|
|
14
|
+
*
|
|
15
|
+
* Packages are identified with the registered `opam` purl type
|
|
16
|
+
* (`pkg:opam/<name>@<version>`).
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Parse an `.opam.locked` (or plain `.opam`) file.
|
|
20
|
+
*
|
|
21
|
+
* @param {string} opamLockedFile Path to the opam file
|
|
22
|
+
* @returns {{ pkgList: object[], pins: Array<{name: string, url: string}> }}
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseOpamLockedFile(opamLockedFile: string): {
|
|
25
|
+
pkgList: object[];
|
|
26
|
+
pins: Array<{
|
|
27
|
+
name: string;
|
|
28
|
+
url: string;
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=parsers-opam.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers-opam.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-opam.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAHvC,MAGuC,GAFrC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;CAAE,CAoD3E"}
|