@cdxgen/cdxgen 13.1.0 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -7
- package/bin/cdxgen.js +16 -3
- package/bin/evinse.js +2 -0
- package/data/crypto-oid.json +88 -12
- package/data/remediations.json +23 -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 +12 -0
- package/lib/cli/index.js +192 -1
- package/lib/cli/jsBom.js +59 -2
- package/lib/cli/jvmBom.js +22 -0
- package/lib/cli/managedBom.js +152 -0
- package/lib/cli/nativeBom.js +798 -1
- package/lib/core/activity.js +120 -2
- package/lib/core/env.js +39 -1
- package/lib/core/userAgent.js +151 -0
- package/lib/ecosystems/cargoCache.js +364 -0
- package/lib/ecosystems/caxa.js +13 -5
- package/lib/ecosystems/cppEvidence.js +40 -2
- package/lib/ecosystems/ecosystems.js +241 -91
- package/lib/ecosystems/golem.js +11 -1
- package/lib/ecosystems/gradleutils.js +143 -2
- package/lib/ecosystems/kosi.js +1256 -0
- package/lib/ecosystems/parsers-crystal.js +179 -0
- package/lib/ecosystems/parsers-dotnet.js +69 -39
- package/lib/ecosystems/parsers-elm.js +816 -0
- package/lib/ecosystems/parsers-gleam.js +1 -1
- package/lib/ecosystems/parsers-julia.js +268 -0
- package/lib/ecosystems/parsers-lua.js +218 -0
- package/lib/ecosystems/parsers-misc.js +172 -0
- 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 +1 -1
- package/lib/ecosystems/parsers-r.js +148 -0
- package/lib/ecosystems/parsers-rebar.js +411 -0
- package/lib/ecosystems/parsers-rust.js +932 -17
- 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/rusi.js +126 -6
- package/lib/evinser/evinser.js +111 -1
- package/lib/helpers/agenticToolutils.js +925 -0
- 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/auditCategories.js +8 -0
- package/lib/inventory/cbomutils.js +30 -0
- package/lib/inventory/cdxrs.js +7 -2
- package/lib/inventory/communityAiConfigParser.js +215 -2
- package/lib/inventory/dosai.js +77 -0
- package/lib/inventory/envcontext.js +9 -6
- package/lib/inventory/evidenceUtils.js +13 -0
- package/lib/inventory/fetchBatch.js +74 -2
- 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 +54 -88
- package/lib/inventory/protobomLoader.js +4 -0
- package/lib/inventory/rustFormulationParser.js +1 -1
- package/lib/inventory/source.js +10 -4
- package/lib/inventory/stylePackageRefs.js +41 -0
- package/lib/inventory/svelteUtils.js +524 -0
- package/lib/parsers/huggingfaceUtils.js +15 -7
- 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 +169 -1
- package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +462 -0
- package/package.json +25 -25
- package/types/lib/audit/targets.d.ts.map +1 -1
- package/types/lib/cli/bomAssembly.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/userAgent.d.ts +56 -0
- package/types/lib/core/userAgent.d.ts.map +1 -0
- 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.map +1 -1
- package/types/lib/ecosystems/cppEvidence.d.ts +1 -1
- 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/gradleutils.d.ts +20 -0
- package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
- package/types/lib/ecosystems/kosi.d.ts +73 -0
- package/types/lib/ecosystems/kosi.d.ts.map +1 -0
- 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-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 +23 -0
- 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-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/rusi.d.ts.map +1 -1
- package/types/lib/evinser/evinser.d.ts +29 -0
- package/types/lib/evinser/evinser.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/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/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/communityAiConfigParser.d.ts.map +1 -1
- package/types/lib/inventory/dosai.d.ts +23 -0
- package/types/lib/inventory/dosai.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/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/parsers/huggingfaceUtils.d.ts +8 -1
- package/types/lib/parsers/huggingfaceUtils.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envcontext.d.ts","sourceRoot":"","sources":["../../../lib/inventory/envcontext.js"],"names":[],"mappings":"AAkDA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAFd,MAE4D,CAAC;AAuCvE;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"envcontext.d.ts","sourceRoot":"","sources":["../../../lib/inventory/envcontext.js"],"names":[],"mappings":"AAkDA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAFd,MAE4D,CAAC;AAuCvE;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,wBAapC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAL3B,MAK2B,EAAE,GAAG,EAJhC,MAIgC,sBAE1C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAJrB,MAIqB,sBAE/B;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,GAAG,EAJ9B,MAI8B,sBAExC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAJtB,MAIsB,MAkBhC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAJlB,MAIkB,SA4B5B;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EALvB,MAKuB,EAAE,IAAI,OAAA,sBAiBvC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EALtB,MAKsB,EAAE,QAAQ,GAJhC,MAIqC,GAFnC,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC,CA+BhD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EALvB,MAKuB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AHxC,MAG6C,GAF3C,KAAK,CAAC,MAAM,CAAC,CA+BzB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAFxB,MAAM,CA4GlB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,WAUpC;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,IAF9B,MAAM,GAAC,SAAS,CAc5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidenceUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/evidenceUtils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evidenceUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/evidenceUtils.js"],"names":[],"mappings":"AA6BA;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAJtC,MAIsC,EAAE,OAAO,AAHvD,CACA,EADQ,MAGoD,GAFlD,MAAM,GAAC,SAAS,CAgB5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAJ7C,MAI6C,EAAE,OAAO,AAH9D,CACA,EADQ,MAG2D,GAFzD,MAAM,GAAC,SAAS,CA8B5B;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAHxC,MAGwC,GAFtC,MAAM,CAalB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAJ1B,MAAM,EAAE,GAAC,MAIiB,EAAE,SAAS,UAAA,GAFnC,MAAM,EAAE,CAmDpB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAJjC,MAAM,GAAC,MAAM,EAIoB,EAAE,QAAQ,EAH3C,MAAM,EAGqC,GAFzC,MAAM,GAAC,MAAM,EAAE,CAwB3B;AAsCD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAJjC,MAAM,EAI2B,EAAE,UAAU,EAH7C,MAG6C,GAF3C,MAAM,EAAE,CAkOpB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EANJ,MAMI,EACb,QAAQ,EANC,MAMD,EACR,OAAO,OAAA,EACP,OAAO,UAAQ,EACf,gBAAgB,YAAY;;;;;;;;;IA6H7B"}
|
|
@@ -95,6 +95,21 @@ export declare function prefetchJson(requests: Array<{
|
|
|
95
95
|
}>, options?: {
|
|
96
96
|
timeoutMs?: number;
|
|
97
97
|
}): Promise<Map<string, BatchEntry>>;
|
|
98
|
+
/**
|
|
99
|
+
* Whether a hostname belongs to crates.io, including its index and CDN hosts.
|
|
100
|
+
*
|
|
101
|
+
* @param {string|null} host Hostname, or null when the URL did not parse.
|
|
102
|
+
* @returns {boolean}
|
|
103
|
+
*/
|
|
104
|
+
export declare function isCratesHost(host: string | null): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Whether a host's rate policy lives in the JS table alone and therefore needs
|
|
107
|
+
* every request to pass through the one gate the JS pool holds.
|
|
108
|
+
*
|
|
109
|
+
* @param {string|null} host Hostname, or null when the URL did not parse.
|
|
110
|
+
* @returns {boolean}
|
|
111
|
+
*/
|
|
112
|
+
export declare function isSingleGateHost(host: string | null): boolean;
|
|
98
113
|
/**
|
|
99
114
|
* Record the run-level policy or connectivity condition carried by a caught
|
|
100
115
|
* fetch error, if it names one. Shared by the batch retry loop and by the
|
|
@@ -104,6 +119,25 @@ export declare function prefetchJson(requests: Array<{
|
|
|
104
119
|
* @returns {void}
|
|
105
120
|
*/
|
|
106
121
|
export declare function recordPolicyDegradationFromError(err: Error): void;
|
|
122
|
+
/**
|
|
123
|
+
* Run a caller's own request under the same per-host gate the batch pool uses.
|
|
124
|
+
*
|
|
125
|
+
* Not every registry lookup goes through the pool: a caller that misses the
|
|
126
|
+
* prefetch, or runs with prefetching disabled, issues `cdxgenAgent.get`
|
|
127
|
+
* directly. Those requests reach the same host and count against the same
|
|
128
|
+
* published budget, so they have to queue behind the same limiter rather than
|
|
129
|
+
* a second one — crates.io's one-request-per-second policy is not honoured by
|
|
130
|
+
* two independent gates that each allow one per second.
|
|
131
|
+
*
|
|
132
|
+
* The per-host semaphore and limiter are module state, so this shares one gate
|
|
133
|
+
* per host for the life of the process.
|
|
134
|
+
*
|
|
135
|
+
* @template T
|
|
136
|
+
* @param {string} url The URL about to be requested.
|
|
137
|
+
* @param {() => Promise<T>} issue Issues the request and resolves its result.
|
|
138
|
+
* @returns {Promise<T>} Whatever `issue` resolves to.
|
|
139
|
+
*/
|
|
140
|
+
export declare function withHostRateLimit<T>(url: string, issue: () => Promise<T>): Promise<T>;
|
|
107
141
|
/**
|
|
108
142
|
* Read a prefetched response, or signal that the caller should fetch it itself.
|
|
109
143
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchBatch.d.ts","sourceRoot":"","sources":["../../../lib/inventory/fetchBatch.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AA8EH;;;GAGG;AACH,wBAAgB,cAAc,IAHjB,MAAM,GAAC,IAAI,CAKvB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,IAFtB,OAAO,CASnB;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,SAO1C;AAKE,YAAkB,UAAU,GAC5B;;;;IAAoB,EAAE,EAAX,OAAO,CAClB;;;;IAAe,IAAI,AAAnB,CACA,EADW,GAAC,CACZ;;;;IAAoB,MAAM,AAA1B,CACA,EADW,MAAM,CACjB;;;;;IAAqB,QAAQ,AAA7B,CAEF,EAFa,OAAO,CAEpB;CAAA,CAAA;AAoCD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EARhC,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,CAAC,MAAM,GAAC,MAAM,GAAC,QAAQ,CAAC,CAAC;IAA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B,MAAM,GAAC,IAGe,GAFpB,OAAO,CAQnB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAH1B,MAAM,GAAC,IAGmB,GAFxB,OAAO,CAOnB;AAqTD;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAAC,GAAG,EAHzC,KAGyC,GAFvC,IAAI,CAuBhB;AAqGD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,iBAAiB,CAL1B,CAAC,EAK0B,GAAG,EAJhC,MAIgC,EAAE,KAAK,EAHvC,MAAM,OAAO,CAAC,CAAC,CAGwB,GAFrC,OAAO,CAAC,CAAC,CAAC,CAiBtB;AAyFD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EARlC,GAAG,CAAC,MAAM,EAAE,UAAU,CAQY,EAAE,GAAG,EAPvC,MAOuC,GANrC;IAAC,IAAI,EAAE,GAAC,CAAA;CAAC,GAAC,SAAS,CAoB/B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,IAFlB,OAAO,CAOnB"}
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
* Per-host rate policy for batched registry fetches.
|
|
3
3
|
*
|
|
4
4
|
* This is the single source of truth for the JS transport's concurrency and
|
|
5
|
-
* minimum-interval decisions.
|
|
5
|
+
* minimum-interval decisions. Every number is shared with the Rust transport
|
|
6
6
|
* (`cdxgen-plugins-bin/thirdparty/cdxrs/src/fetch/rate.rs`); a change to one
|
|
7
7
|
* side must be reflected in the other, and `fetchRate.poku.js` pins them so a
|
|
8
|
-
* drift is visible.
|
|
8
|
+
* drift is visible. crates.io and package.elm-lang.org are routed so that their
|
|
9
|
+
* requests never reach the Rust transport, which makes this table the one that
|
|
10
|
+
* governs them in practice — their rows are mirrored there regardless, because
|
|
11
|
+
* two tables that disagree are a bug waiting for the routing to change.
|
|
9
12
|
*
|
|
10
13
|
* Why a per-host table rather than a single global interval: a single-registry
|
|
11
14
|
* project — which is to say, almost every npm project — has exactly one host,
|
|
12
15
|
* so a conservative per-host cap *is* the global cap. Applying crates.io's
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
16
|
+
* one-per-second policy to every host would cap an npm run at one request a
|
|
17
|
+
* second, orders of magnitude slower than that registry asks for. Hosts that
|
|
18
|
+
* publish a limit get an interval; hosts that do not are bounded by the
|
|
19
|
+
* per-host concurrency cap alone, and by whatever `Retry-After` they send.
|
|
17
20
|
*/
|
|
18
21
|
export type Credentials = ("anonymous" | "authenticated");
|
|
19
22
|
export type HostPolicy = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchRate.d.ts","sourceRoot":"","sources":["../../../lib/inventory/fetchRate.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fetchRate.d.ts","sourceRoot":"","sources":["../../../lib/inventory/fetchRate.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAYA,YAAyC,WAAW,GAA1C,CAAC,WAAW,GAAC,eAAe,CAAC,CAAa;AAOpD,YAAkB,UAAU,GAC5B;;;;IAAmB,WAAW,EAAnB,MAAM,CACjB;;;;IAAmB,cAAc,EAAtB,MAAM,CACnB;CAAA,CAAA;AAkHD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAHxB,MAGwB,GAFtB,WAAW,CAYvB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EALnB,MAKmB,EAAE,WAAW,AAJxC,CAEA,EAFQ,WAIgC,GAF9B,UAAU,CAuBtB;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;GAEjC,CAAC;AAEJ;;;;;;GAMG;AACH,qBAAa,WAAW;IAKf,YAAY;IACZ,cAAc;IACd,eAAe;IANtB;;OAEG;IACH,YAAY,WAAW,EAFZ,MAEY,EAItB;IAED;;;;;;OAMG;IACG,IAAI,IAFG,OAAO,CAAC,IAAI,CAAC,CAYzB;IAED;;;;;;OAMG;IACH,aAAa,CAAC,OAAO,EAFV,MAEU,QAMpB;IAED,wEAAwE;IACxE,IAAI,kBAAkB,IADR,MAAM,CAGnB;CACF;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAJxB,MAIwB,GAHtB;IAAC,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,IAAI,CAAC,CAAA;CAAC,CAwBhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeEnricher.d.ts","sourceRoot":"","sources":["../../../lib/inventory/forgeEnricher.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"forgeEnricher.d.ts","sourceRoot":"","sources":["../../../lib/inventory/forgeEnricher.js"],"names":[],"mappings":"AAkDA;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAHvB,MAGuB,GAFrB;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAC,IAAI,CAa9C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAHvB,MAGuB,GAFrB,MAAM,GAAC,IAAI,CAWvB;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAL9B,MAK8B,EAAE,SAAS,EAJzC,KAAK,CAAC,MAAM,CAI6B,EAAE,OAAO,GAHlD,MAGuD,GAFrD,OAAO,CAAC,MAAM,CAAC,CA4M3B"}
|
|
@@ -8,10 +8,11 @@ import { compareVersions, extractJavaMajor, isPrereleaseVersion } from "./toolRe
|
|
|
8
8
|
export { compareVersions as compareSdkmanVersions, extractJavaMajor, isPrereleaseVersion, };
|
|
9
9
|
/**
|
|
10
10
|
* Anchored validator for sdkman version identifiers such as `3.9.9`,
|
|
11
|
-
* `4.0.0-rc-5`, `8.14`,
|
|
12
|
-
* shell command by the sdkman installer, so every
|
|
13
|
-
* safe token: it must start with a digit and may
|
|
14
|
-
* letters, dots, and
|
|
11
|
+
* `4.0.0-rc-5`, `8.14`, `21.0.7-tem`, or `26.0.2+1.1-tem`. Versions are
|
|
12
|
+
* interpolated into a shell command by the sdkman installer, so every
|
|
13
|
+
* identifier must be a single safe token: it must start with a digit and may
|
|
14
|
+
* only contain digits, ascii letters, dots, hyphens, and plus signs (`+` has
|
|
15
|
+
* no shell meaning and sdkman uses it in Temurin respin identifiers).
|
|
15
16
|
*
|
|
16
17
|
* Every separator must be followed by at least one alphanumeric character, and
|
|
17
18
|
* a single repeated group covers both the dotted numeric part and the vendor
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jvmToolEnv.d.ts","sourceRoot":"","sources":["../../../lib/inventory/jvmToolEnv.js"],"names":[],"mappings":"AAMA,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,OAAO,EACL,eAAe,IAAI,qBAAqB,EACxC,gBAAgB,EAChB,mBAAmB,GACpB,CAAC;AAuBF
|
|
1
|
+
{"version":3,"file":"jvmToolEnv.d.ts","sourceRoot":"","sources":["../../../lib/inventory/jvmToolEnv.js"],"names":[],"mappings":"AAMA,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,OAAO,EACL,eAAe,IAAI,qBAAqB,EACxC,gBAAgB,EAChB,mBAAmB,GACpB,CAAC;AAuBF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAHjC,MAGiC,GAF/B,OAAO,CASnB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EALxC,MAKwC,GAJtC,MAAM,GAAC,SAAS,CAmB5B;AAED;;;;;;;;;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,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,wBAKtC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAHjC,MAGiC,GAF/B,MAAM,GAAC,SAAS,CAS5B;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAHhC,MAGgC,GAF9B,MAAM,GAAC,SAAS,CAS5B;AASD;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAHvC,MAGuC,GAFrC,MAAM,GAAC,SAAS,CAuB5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpConfigParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpConfigParser.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcpConfigParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpConfigParser.js"],"names":[],"mappings":"AAoxBA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAFlB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAiD9H,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpDiscovery.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpDiscovery.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcpDiscovery.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpDiscovery.js"],"names":[],"mappings":"AA6BA;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAH9B,MAG8B,GAF5B,MAAM,CAiBlB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAHzB,MAGyB,GAFvB,OAAO,CA8BnB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAH9B,MAG8B,GAF5B,MAAM,EAAE,CAUpB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAHrC,MAGqC,GAFnC,MAAM,EAAE,CAUpB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser for MCP Registry server manifests (`server.json`).
|
|
3
|
+
*
|
|
4
|
+
* Converts each declared distributable package into a CycloneDX component
|
|
5
|
+
* (with a purl when the registry type maps to a supported ecosystem) and each
|
|
6
|
+
* remotely hosted endpoint into a service, alongside a file component that
|
|
7
|
+
* summarizes the manifest.
|
|
8
|
+
*
|
|
9
|
+
* @type {{id: string, patterns: string[], parse(files: string[], options?: Object): {components: Object[], services: Object[]}}}
|
|
10
|
+
*/
|
|
11
|
+
export declare const mcpServerManifestParser: {
|
|
12
|
+
id: string;
|
|
13
|
+
patterns: string[];
|
|
14
|
+
parse(files: string[], options?: Object): {
|
|
15
|
+
components: Object[];
|
|
16
|
+
services: Object[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=mcpServerManifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpServerManifest.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpServerManifest.js"],"names":[],"mappings":"AAsTA;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,EAF1B;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAsE9H,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser for MCPB / DXT desktop-extension bundles.
|
|
3
|
+
*
|
|
4
|
+
* A bundle is a zip archive carrying a local MCP server, its dependencies, and
|
|
5
|
+
* a `manifest.json`. This parser reads only the manifest to describe the
|
|
6
|
+
* bundled server, the tools/prompts it exposes, the number of precompiled
|
|
7
|
+
* platform binaries, and whether it injects secret-typed configuration values
|
|
8
|
+
* as environment variables.
|
|
9
|
+
*
|
|
10
|
+
* @type {{id: string, patterns: string[], parse(files: string[], options?: Object): {components: Object[]}}}
|
|
11
|
+
*/
|
|
12
|
+
export declare const mcpbBundleParser: {
|
|
13
|
+
id: string;
|
|
14
|
+
patterns: string[];
|
|
15
|
+
parse(files: string[], options?: Object): {
|
|
16
|
+
components: Object[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=mcpbBundle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpbBundle.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpbBundle.js"],"names":[],"mappings":"AAgYA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAFnB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAyB1G,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../lib/inventory/plugins.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../lib/inventory/plugins.js"],"names":[],"mappings":"AAiDA;;;;GAIG;AACH,wBAAgB,mBAAmB,IAFtB;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAC,CAgCpF;AA8DD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,IAXvB;IACR,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,GAAC,SAAS,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,MAAM,GAAC,SAAS,CAAC;IACrC,aAAa,EAAE,MAAM,GAAC,SAAS,CAAC;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAqMH;AAYD;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAF1B,UAAU,CAAC,OAAO,oBAAoB,CAAC,CASnD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,AAH5C,CACA,EADQ,UAAU,CAAC,OAAO,oBAAoB,CAGU,GAF9C,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAWnD;AAwDD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAJjC,MAIiC,EAAE,aAAa,AAHxD,CACA,EADQ,UAAU,CAAC,OAAO,oBAAoB,CAGsB,GAF1D,MAAM,GAAC,SAAS,CAS5B"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { isProtoBomFile } from "@cdxgen/cdx-proto/node";
|
|
2
|
+
export { isProtoBomFile };
|
|
1
3
|
/**
|
|
2
4
|
* Determine whether a spec version is supported for protobuf serialization.
|
|
3
5
|
*
|
|
6
|
+
* Delegates to cdx-proto's `isSupportedSpecVersion`, which accepts the
|
|
7
|
+
* spellings seen in the wild (`v1.6`, `1.6`, `1.6.0`) in addition to the
|
|
8
|
+
* canonical strings.
|
|
9
|
+
*
|
|
4
10
|
* @param {string|undefined} specVersion CycloneDX spec version string
|
|
5
11
|
* @returns {boolean} `true` when supported by `@cdxgen/cdx-proto`, or when no spec version is provided
|
|
6
12
|
*/
|
|
@@ -16,13 +22,6 @@ export declare const isProtoSupportedSpecVersion: (specVersion: string | undefin
|
|
|
16
22
|
* @param {string} [operation="protobuf operations"] Operation label used in the error message
|
|
17
23
|
*/
|
|
18
24
|
export declare const assertProtoSupportedSpecVersion: (specVersion: string | undefined, operation?: string) => void;
|
|
19
|
-
/**
|
|
20
|
-
* Determine whether a path looks like a CycloneDX protobuf file.
|
|
21
|
-
*
|
|
22
|
-
* @param {string} filePath File path
|
|
23
|
-
* @returns {boolean} true when the path looks like a protobuf BOM file
|
|
24
|
-
*/
|
|
25
|
-
export declare const isProtoBomFile: (filePath: string) => boolean;
|
|
26
25
|
/**
|
|
27
26
|
* Method to convert the given bom json to proto binary
|
|
28
27
|
*
|
|
@@ -51,13 +50,19 @@ export declare const getBomStats: (bomJson: string | Object, specVersion?: strin
|
|
|
51
50
|
* Method to cross-convert a BOM between CycloneDX specification versions using
|
|
52
51
|
* the protobuf schemas.
|
|
53
52
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* cdx-proto's conversion is cardinality-safe: fields that change shape between
|
|
54
|
+
* versions (`metadata.licenses` and `evidence.identity`, singular in 1.5 and an
|
|
55
|
+
* array since 1.6) are reshaped automatically — wrapped on upgrade, collapsed
|
|
56
|
+
* to their first entry on downgrade — including `evidence.identity` on nested
|
|
57
|
+
* components, `metadata.component`, `metadata.tools.components[]`, and
|
|
58
|
+
* `formulation[].components[]`. Downgrades are otherwise lossy: fields the
|
|
59
|
+
* target version does not define are dropped and reported in `warnings` as
|
|
60
|
+
* field paths, alongside collapsed list siblings.
|
|
56
61
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* `applySpecVersionCompatibility` from the postgen stage
|
|
62
|
+
* Only the protobuf-supported versions (1.5–1.7) can be targeted here. For the
|
|
63
|
+
* full JSON-level normalization across every version cdxgen emits (component
|
|
64
|
+
* types, license attributes, 1.4/2.0 reshaping), prefer
|
|
65
|
+
* `applySpecVersionCompatibility` from the postgen stage.
|
|
61
66
|
*
|
|
62
67
|
* @param {string | Object} bomJson BOM Json, BOM Json string, or proto message
|
|
63
68
|
* @param {string | number} targetSpecVersion Target CycloneDX spec version
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protobom.d.ts","sourceRoot":"","sources":["../../../lib/inventory/protobom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"protobom.d.ts","sourceRoot":"","sources":["../../../lib/inventory/protobom.js"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIxD,OAAO,EAAE,cAAc,EAAE,CAAC;AAsB1B;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B,gBAH7B,MAAM,GAAC,SAAS,KACd,OAGgE,CAAC;AAE9E;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B,gBAHjC,MAAM,GAAC,SAAS,cAChB,MAAM,SAYhB,CAAC;AAgCF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,YAJb,MAAM,GAAG,MAAM,WACf,MAAM,gBACN,MAAM,GAAG,MAAM,SAezB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,YAJZ,MAAM,UACN,OAAO,gBACP,MAAM,GAAG,MAAM,4FAiBzB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,YAJb,MAAM,GAAG,MAAM,gBACf,MAAM,GAAG,MAAM,KACb,MAKV,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qBAAqB,YALvB,MAAM,GAAG,MAAM,qBACf,MAAM,GAAG,MAAM,gBACf,MAAM,GAAG,MAAM,KACb;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAahD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protobomLoader.d.ts","sourceRoot":"","sources":["../../../lib/inventory/protobomLoader.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"protobomLoader.d.ts","sourceRoot":"","sources":["../../../lib/inventory/protobomLoader.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAH5B,MAG4B,GAF1B,OAAO,CAOnB;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,AALV,CACA,EADQ,MAKa,EACtB,kBAAkB,AALjB,CACA,EADQ,MAK8B,GAJ5B,OAAO,CAAC,MAAM,CAAC,CAqB3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../lib/inventory/source.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../lib/inventory/source.js"],"names":[],"mappings":"AAoCA,6FAA6F;AAC7F,eAAO,MAAM,4BAA4B,wIAC8F,CAAC;AAExI,6DAA6D;AAC7D,eAAO,MAAM,2BAA2B,UAWvC,CAAC;AAuBF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAH7B,MAAM,GAAC,SAGsB,GAF3B,OAAO,CAUnB;AAiBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAL5B,MAAM,EAKsB,EAAE,OAAO,GAH7C;IAAkC,GAAG,EAA7B,MAAM,GAAC,SAAS,CACxB;CAEkD,GAFxC,MAAM,CAuClB;AA+ED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAJtC,MAAM,GAAC,SAI+B,EAAE,OAAO,GAH/C,MAGoD,GAFlD,MAAM,GAAC,SAAS,CA6I5B;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAFtB,MAAM,CASlB;AAkBD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAH3B,MAG2B,GAFzB,OAAO,CAWnB;A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B,CAAC,WAAW,EAJ5C,KAAK,CAAC,MAAM,CAIgC,GAF1C,OAAO,CAAC,IAAI,CAAC,CA6BzB;AA8DD;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CAAC,UAAU,EAJ3C,MAI2C,EAAE,OAAO,AAH5D,CACA,EADQ,MAGyD,GAFvD,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAAC,CA4MlI;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAF5B,MAE4B,QAkCtC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Patterns matching a package reference inside CSS/SCSS/Less/Stylus content.
|
|
3
|
+
* Capture group 1 holds the reference (for example `bulma/sass/utilities`).
|
|
4
|
+
*
|
|
5
|
+
* @type {RegExp[]}
|
|
6
|
+
*/
|
|
7
|
+
export declare const STYLE_PACKAGE_REFERENCE_PATTERNS: RegExp[];
|
|
8
|
+
/**
|
|
9
|
+
* True when a `url()` reference points at a package rather than a local file.
|
|
10
|
+
* Only the `~package/...` and `node_modules/...` spellings qualify; plain
|
|
11
|
+
* relative URLs stay local.
|
|
12
|
+
*
|
|
13
|
+
* @param {string} reference Value captured from a `url()` rule.
|
|
14
|
+
* @returns {boolean}
|
|
15
|
+
*/
|
|
16
|
+
export declare const isPackageStyleUrlReference: (reference: string) => boolean;
|
|
17
|
+
//# sourceMappingURL=stylePackageRefs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stylePackageRefs.d.ts","sourceRoot":"","sources":["../../../lib/inventory/stylePackageRefs.js"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,EAFnC,MAAM,EAKf,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,cAH5B,MAAM,KACJ,OAUZ,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build a same-length masked buffer of a `.svelte` source where every byte
|
|
3
|
+
* outside the `<script>` / `<script module>` / `<script context="module">`
|
|
4
|
+
* bodies is replaced by a space (newlines preserved). Because nothing moves,
|
|
5
|
+
* the Babel parse of the buffer yields statement offsets and `loc.line`
|
|
6
|
+
* values that are true to the original file.
|
|
7
|
+
*
|
|
8
|
+
* Handles multiple script blocks, arbitrary attribute order, self-closing and
|
|
9
|
+
* unterminated tags, CRLF input, and a script block appearing after the
|
|
10
|
+
* markup.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} source `.svelte` file content.
|
|
13
|
+
* @returns {string} Same-length buffer containing only the script bodies.
|
|
14
|
+
*/
|
|
15
|
+
export declare const maskSvelteScripts: (source: string) => string;
|
|
16
|
+
/**
|
|
17
|
+
* The `lang` attribute values of the `<script>` blocks, lowercased.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} source `.svelte` file content.
|
|
20
|
+
* @returns {string[]}
|
|
21
|
+
*/
|
|
22
|
+
export declare const extractSvelteScriptLanguages: (source: string) => string[];
|
|
23
|
+
/**
|
|
24
|
+
* Collect `<style>` block facts: the block's `lang` and the package
|
|
25
|
+
* references found in its `@use` / `@import` / `@forward` / `url()` rules.
|
|
26
|
+
* Reference offsets are absolute indices into the original source so callers
|
|
27
|
+
* can derive line numbers.
|
|
28
|
+
*
|
|
29
|
+
* @param {string} source `.svelte` file content.
|
|
30
|
+
* @returns {Array<{lang: string|undefined, start: number, references: Array<{reference: string, index: number}>}>}
|
|
31
|
+
*/
|
|
32
|
+
export declare const extractSvelteStyleReferences: (source: string) => Array<{
|
|
33
|
+
lang: string | undefined;
|
|
34
|
+
start: number;
|
|
35
|
+
references: Array<{
|
|
36
|
+
reference: string;
|
|
37
|
+
index: number;
|
|
38
|
+
}>;
|
|
39
|
+
}>;
|
|
40
|
+
/** Rune names that imply the `svelte` package even without an import. */
|
|
41
|
+
export declare const SVELTE_RUNE_NAMES: string[];
|
|
42
|
+
/**
|
|
43
|
+
* Find Svelte 5 rune usages (`$state`, `$derived`, `$effect`, ...). A
|
|
44
|
+
* rune-only component may never `import` from `svelte`, yet it cannot compile
|
|
45
|
+
* without the compiler, so rune usage is `svelte` evidence.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} source `.svelte` content (script blocks scanned) or the
|
|
48
|
+
* full text of a `.svelte.js` / `.svelte.ts` module (pass
|
|
49
|
+
* `scriptBlocksOnly = false`).
|
|
50
|
+
* @param {boolean} [scriptBlocksOnly=true] Scan only `<script>` block bodies.
|
|
51
|
+
* @returns {Array<{rune: string, index: number}>} Absolute rune offsets.
|
|
52
|
+
*/
|
|
53
|
+
export declare const findSvelteRunes: (source: string, scriptBlocksOnly?: boolean) => Array<{
|
|
54
|
+
rune: string;
|
|
55
|
+
index: number;
|
|
56
|
+
}>;
|
|
57
|
+
/** SvelteKit virtual module prefixes that resolve inside `@sveltejs/kit`. */
|
|
58
|
+
export declare const SVELTE_KIT_VIRTUAL_MODULE_PREFIXES: string[];
|
|
59
|
+
/**
|
|
60
|
+
* True for import specifiers provided by SvelteKit itself (`$app/stores`,
|
|
61
|
+
* `$env/static/public`, `$service-worker`, ...).
|
|
62
|
+
*
|
|
63
|
+
* @param {string} specifier Import specifier.
|
|
64
|
+
* @returns {boolean}
|
|
65
|
+
*/
|
|
66
|
+
export declare const isSvelteKitVirtualModuleSpecifier: (specifier: string) => boolean;
|
|
67
|
+
/** The default SvelteKit `$lib` alias target. */
|
|
68
|
+
export declare const SVELTE_DEFAULT_LIB_ALIAS = "src/lib";
|
|
69
|
+
/**
|
|
70
|
+
* Extract framework facts from a `svelte.config.*` source: the adapter named
|
|
71
|
+
* in string form (`adapter: "netlify"`), the `kit.alias` entries, and the
|
|
72
|
+
* `extensions` list. Adapter and preprocessor *imports* are collected by the
|
|
73
|
+
* regular config-file parse once `svelte.config.*` stops being ignored; the
|
|
74
|
+
* string adapter form has no import to recover, so it is extracted here.
|
|
75
|
+
*
|
|
76
|
+
* @param {string} source `svelte.config.*` file content.
|
|
77
|
+
* @returns {{adapterName: string|undefined, aliases: Object<string, string>, extensions: string[]}}
|
|
78
|
+
*/
|
|
79
|
+
export declare const parseSvelteConfigSource: (source: string) => {
|
|
80
|
+
adapterName: string | undefined;
|
|
81
|
+
aliases: Record<string, string>;
|
|
82
|
+
extensions: string[];
|
|
83
|
+
};
|
|
84
|
+
/** `<style lang>` values that require a CSS preprocessor package. */
|
|
85
|
+
export declare const SVELTE_STYLE_LANG_PACKAGES: {
|
|
86
|
+
less: string;
|
|
87
|
+
postcss: string;
|
|
88
|
+
sass: string;
|
|
89
|
+
scss: string;
|
|
90
|
+
stylus: string;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Executable names appearing in Svelte project npm scripts and the npm
|
|
94
|
+
* packages that provide them. Used by the shared script-evidence walk so a
|
|
95
|
+
* `svelte-kit sync` script marks `@sveltejs/kit` required on its own
|
|
96
|
+
* evidence.
|
|
97
|
+
*/
|
|
98
|
+
export declare const SVELTE_SCRIPT_EXECUTABLE_PACKAGE_MAP: {
|
|
99
|
+
"svelte-kit": string;
|
|
100
|
+
"svelte-check": string;
|
|
101
|
+
"svelte-package": string;
|
|
102
|
+
vite: string;
|
|
103
|
+
vitest: string;
|
|
104
|
+
playwright: string;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Prime the module-scoped template-parser handle with a dynamic import,
|
|
108
|
+
* which works on every supported runtime. Called before the parse fan-out so
|
|
109
|
+
* the inline (small-project) path can use tier 2 on the main thread. Any
|
|
110
|
+
* failure is silent at default verbosity: the optional package is absent
|
|
111
|
+
* from the plain cdxgen binaries, and tier 1 already recovers all scope
|
|
112
|
+
* evidence.
|
|
113
|
+
*
|
|
114
|
+
* @returns {Promise<Object|null>} The module namespace, or null when unavailable.
|
|
115
|
+
*/
|
|
116
|
+
export declare const primeSvelteParser: () => Promise<Object | null>;
|
|
117
|
+
/**
|
|
118
|
+
* Synchronous accessor for the parse path: returns the primed handle, lazily
|
|
119
|
+
* resolving it once when called before `primeSvelteParser`.
|
|
120
|
+
*
|
|
121
|
+
* @returns {Object|null} The module namespace, or null when unavailable.
|
|
122
|
+
*/
|
|
123
|
+
export declare const getSvelteTemplateParser: () => Object | null;
|
|
124
|
+
//# sourceMappingURL=svelteUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svelteUtils.d.ts","sourceRoot":"","sources":["../../../lib/inventory/svelteUtils.js"],"names":[],"mappings":"AAgNA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,WAHnB,MAAM,KACJ,MAkBZ,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,WAH9B,MAAM,KACJ,MAAM,EAMmB,CAAC;AAevC;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,WAH9B,MAAM,KACJ,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,KAAK,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;CAAC,CAoChH,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,UAQ7B,CAAC;AASF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,WANjB,MAAM,qBAGN,OAAO,KACL,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAqB/C,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,kCAAkC,UAI9C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,cAHnC,MAAM,KACJ,OAKV,CAAC;AAEJ,iDAAiD;AACjD,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAElD;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,WAHzB,MAAM,KACJ;IAAC,WAAW,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,OAAO,yBAAyB;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CA+BjG,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,0BAA0B;IACrC,IAAI;IACJ,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,MAAM;CACP,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC;IAC/C,YAAY;IACZ,cAAc;IACd,gBAAgB;IAChB,IAAI;IACJ,MAAM;IACN,UAAU;CACX,CAAC;AAqCF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,QAFjB,OAAO,CAAC,MAAM,GAAC,IAAI,CAoB/B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QAFvB,MAAM,GAAC,IAOnB,CAAC"}
|
|
@@ -84,9 +84,16 @@ export declare function toHuggingFacePurl(repoId: string, version?: string, repo
|
|
|
84
84
|
* Normalize a direct Hugging Face URL or purl into a repo reference.
|
|
85
85
|
*
|
|
86
86
|
* @param {string} value direct URL, API URL, or purl
|
|
87
|
+
* @param {object} [parseOptions] parsing options
|
|
88
|
+
* @param {boolean} [parseOptions.explicitOnly=false] resolve only unambiguous
|
|
89
|
+
* references (`pkg:huggingface/...` purls and huggingface.co URLs) so that
|
|
90
|
+
* ambiguous `owner/repo`-shaped values keep their filesystem-path meaning
|
|
91
|
+
* until an AI inventory type is explicitly selected
|
|
87
92
|
* @returns {{ assetType: string, repoId: string, version?: string }|undefined} normalized reference
|
|
88
93
|
*/
|
|
89
|
-
export declare function normalizeHuggingFaceReference(value: string
|
|
94
|
+
export declare function normalizeHuggingFaceReference(value: string, parseOptions?: {
|
|
95
|
+
explicitOnly?: boolean;
|
|
96
|
+
}): {
|
|
90
97
|
assetType: string;
|
|
91
98
|
repoId: string;
|
|
92
99
|
version?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huggingfaceUtils.d.ts","sourceRoot":"","sources":["../../../lib/parsers/huggingfaceUtils.js"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAFd,MAEyC,CAAC;AACpD;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,EAFlC,GAAG,CAAC,MAAM,CAYlB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,EAFtC,MAEkE,CAAC;AAC7E;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,EAFpC,MAE8D,CAAC;AAEzE;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAAC,SAAS,EAJnD,MAImD,GAHjD,MAAM,GAAC,SAAS,CAW5B;AAED;;;;;;;GAOG;AACH,wBAAgB,qCAAqC,CAAC,aAAa,EAJxD,MAIwD,GAHtD,MAAM,GAAC,SAAS,CAiB5B;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAHrC,MAGqC,GAFnC,MAAM,GAAC,SAAS,CAoC5B;AAYD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAHxC,MAGwC,GAFtC,MAAM,CAQlB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAJrC,MAIqC,EAAE,MAAM,EAH7C,MAG6C,GAF3C,MAAM,GAAC,SAAS,CAgB5B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAJpC,MAIoC,EAAE,MAAM,EAH5C,MAG4C,GAF1C,MAAM,GAAC,SAAS,CAK5B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAL7B,MAK6B,EAAE,OAAO,AAJ9C,CACA,EADQ,MAIsC,EAAE,aAAa,AAH7D,CACA,EADQ,MAGqD,GAFnD,MAAM,G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AAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAyBlE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,kBAAkB,EAHnD,MAAM,GAAC,MAG4C,GAFjD,MAAM,GAAC,SAAS,CAoB5B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read the identifying header fields of an ONNX model file.
|
|
3
|
+
*
|
|
4
|
+
* Only `ir_version`, `producer_name`, `producer_version`, `model_version`,
|
|
5
|
+
* and the `opset_import` entries are extracted. The graph and every other
|
|
6
|
+
* payload are skipped by offset without being read, so no tensor data is
|
|
7
|
+
* ever loaded and no model code is executed.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} filePath Path to the `.onnx` file
|
|
10
|
+
* @returns {{
|
|
11
|
+
* irVersion: number,
|
|
12
|
+
* producerName: string,
|
|
13
|
+
* producerVersion: string,
|
|
14
|
+
* modelVersion: number,
|
|
15
|
+
* opsets: Array<{domain: string, version: number}>,
|
|
16
|
+
* } | undefined} Header summary, or undefined when it cannot be read
|
|
17
|
+
*/
|
|
18
|
+
export declare function readOnnxHeader(filePath: string): {
|
|
19
|
+
irVersion: number;
|
|
20
|
+
producerName: string;
|
|
21
|
+
producerVersion: string;
|
|
22
|
+
modelVersion: number;
|
|
23
|
+
opsets: Array<{
|
|
24
|
+
domain: string;
|
|
25
|
+
version: number;
|
|
26
|
+
}>;
|
|
27
|
+
} | undefined;
|
|
28
|
+
//# sourceMappingURL=onnx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onnx.d.ts","sourceRoot":"","sources":["../../../lib/parsers/onnx.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAT5B,MAS4B,GAR1B;IACR,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;CAClD,GAAG,SAAS,CAwGf"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read and parse the JSON header of a safetensors model file.
|
|
3
|
+
*
|
|
4
|
+
* Only the leading header is read; tensor payloads are ignored. The returned
|
|
5
|
+
* object separates the optional `__metadata__` map from the per-tensor
|
|
6
|
+
* descriptors.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} filePath Path to a `.safetensors` file
|
|
9
|
+
* @returns {{
|
|
10
|
+
* metadata: Object,
|
|
11
|
+
* tensorCount: number,
|
|
12
|
+
* dtypes: string[],
|
|
13
|
+
* totalParameters: number,
|
|
14
|
+
* } | undefined} Parsed header summary, or undefined when it cannot be read
|
|
15
|
+
*/
|
|
16
|
+
export declare function readSafetensorsHeader(filePath: string): {
|
|
17
|
+
metadata: Object;
|
|
18
|
+
tensorCount: number;
|
|
19
|
+
dtypes: string[];
|
|
20
|
+
totalParameters: number;
|
|
21
|
+
} | undefined;
|
|
22
|
+
//# sourceMappingURL=safetensors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safetensors.d.ts","sourceRoot":"","sources":["../../../lib/parsers/safetensors.js"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EARnC,MAQmC,GAPjC;IACR,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,SAAS,CAuCf"}
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
* Marker table: ecosystem → manifest and lockfile names that indicate the
|
|
20
20
|
* ecosystem is part of the project. Entries are either exact file names or
|
|
21
21
|
* `{ suffix }` matchers for extension-driven ecosystems. Ecosystems cdxgen
|
|
22
|
-
* cannot parse (
|
|
23
|
-
* can report them as coverage gaps instead of silently
|
|
22
|
+
* cannot parse (currently only dub, the D package manager) are included so
|
|
23
|
+
* the reflection can report them as coverage gaps instead of silently
|
|
24
|
+
* ignoring them.
|
|
24
25
|
*
|
|
25
26
|
* @type {Readonly<Record<string, {names: string[], suffixes: string[]}>>}
|
|
26
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markers.d.ts","sourceRoot":"","sources":["../../../../../lib/stages/postgen/introspection/markers.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAUH
|
|
1
|
+
{"version":3,"file":"markers.d.ts","sourceRoot":"","sources":["../../../../../lib/stages/postgen/introspection/markers.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAUH;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAFpB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAC,CAAC,CA0GtE,CAAC;AAEH;;;gCAGgC;AAChC,eAAO,MAAM,eAAe,eAAY,CAAC;AAyDzC;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EALvC,MAKuC,EAAE,KAAK,AAJtD,CAEA,EADA;IAA0E,OAAO,AAAjF,CACA,EADQ,CAAC,OAAO,EAAE,MAAM,KAAK;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAC,EAAE,CACjE;CAE2D,GAFjD;IAAC,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAC,CAoCnF"}
|
|
@@ -26,6 +26,39 @@ export declare function applyMetadata(bomJson: Object, options: Object): Object;
|
|
|
26
26
|
* @returns {Object} Filtered BOM JSON
|
|
27
27
|
*/
|
|
28
28
|
export declare function applyStandards(bomJson: Object, options: Object): Object;
|
|
29
|
+
/**
|
|
30
|
+
* Move the build-time-only components out of `components[]`, which describes
|
|
31
|
+
* the delivered assembly, and hand them to the formulation section, which is
|
|
32
|
+
* where CycloneDX describes how the assembly was produced.
|
|
33
|
+
*
|
|
34
|
+
* Their bom-refs stay valid because the formulation components live in the same
|
|
35
|
+
* document, so the dependency graph is left intact. `formulation` exists from
|
|
36
|
+
* CycloneDX 1.5, so an older document keeps them in `components[]` with their
|
|
37
|
+
* `cdx:cargo:hostOnly` marker rather than losing them.
|
|
38
|
+
*
|
|
39
|
+
* @param {Object} bomJson BOM JSON object
|
|
40
|
+
* @param {Object} options CLI options
|
|
41
|
+
*
|
|
42
|
+
* @returns {Object[]} The components removed from `components[]`
|
|
43
|
+
*/
|
|
44
|
+
export declare function extractBuildOnlyComponents(bomJson: Object, options: Object): Object[];
|
|
45
|
+
/**
|
|
46
|
+
* Re-apply the `--required-only` filter once the evidence stage has attached
|
|
47
|
+
* occurrence and callstack data.
|
|
48
|
+
*
|
|
49
|
+
* A manifest can only say that a dependency is optional; the evidence says
|
|
50
|
+
* whether it is reached. A component the analyzers observed in the sources is
|
|
51
|
+
* promoted to `required` so it survives the filter, while an optional component
|
|
52
|
+
* with no observed usage is dropped as before. A component scoped `excluded` -
|
|
53
|
+
* a dev or test dependency - keeps that scope: an occurrence inside the test
|
|
54
|
+
* sources is not evidence that it ships.
|
|
55
|
+
*
|
|
56
|
+
* @param {Object} bomJson BOM JSON object carrying evidence
|
|
57
|
+
* @param {Object} options CLI options
|
|
58
|
+
*
|
|
59
|
+
* @returns {Object} Filtered BOM JSON
|
|
60
|
+
*/
|
|
61
|
+
export declare function applyEvidenceBasedFilter(bomJson: Object, options: Object): Object;
|
|
29
62
|
/**
|
|
30
63
|
* Filter BOM based on options
|
|
31
64
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgen.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/postgen.js"],"names":[],"mappings":"AAgiBA;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,SAAS,EANhC,MAMgC,EAAE,OAAO,EALzC,MAKyC,EAAE,QAAQ,AAJ3D,CAEA,EAFQ,MAImD,GAFjD,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"postgen.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/postgen.js"],"names":[],"mappings":"AAgiBA;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,SAAS,EANhC,MAMgC,EAAE,OAAO,EALzC,MAKyC,EAAE,QAAQ,AAJ3D,CAEA,EAFQ,MAImD,GAFjD,OAAO,CAAC,MAAM,CAAC,CAsE3B;AAgHD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAL1B,MAK0B,EAAE,OAAO,EAJnC,MAImC,GAFjC,MAAM,CA8HlB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAL3B,MAK2B,EAAE,OAAO,EAJpC,MAIoC,GAFlC,MAAM,CAqClB;AAqHD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EALvC,MAKuC,EAAE,OAAO,EAJhD,MAIgD,GAF9C,MAAM,EAAE,CAmBpB;AAgBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EALrC,MAKqC,EAAE,OAAO,EAJ9C,MAI8C,GAF5C,MAAM,CAiClB;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,EALtB,MAKsB,EAAE,OAAO,EAJ/B,MAI+B,GAF7B,MAAM,CAoNlB;AAUD;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,KAAA,QAUlC;AAED;;;;;;GAMG;AACH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