@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
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -447,4 +447,27 @@ export declare function resetCocoaPodspecPrefetch(): void;
|
|
|
447
447
|
* @returns {Promise<void>}
|
|
448
448
|
*/
|
|
449
449
|
export declare function prefetchCocoaPodspecs(dependencies: Array<Object>): Promise<void>;
|
|
450
|
+
/**
|
|
451
|
+
* Parse an xmake `xmake-requires.lock` file.
|
|
452
|
+
*
|
|
453
|
+
* The lock is a Lua table, written when the `package.requires_lock` policy is
|
|
454
|
+
* enabled. Its top level holds a `__meta__` entry plus one section per build
|
|
455
|
+
* configuration, keyed `platform|arch`; each section maps a requirement key
|
|
456
|
+
* (`"zlib#31fecfc4"`, or `"sol2 v3.2.1#72267bd5"` when the requirement
|
|
457
|
+
* carries a version) to a table with the resolved `version` and the
|
|
458
|
+
* `repo` revision the package definition came from.
|
|
459
|
+
*
|
|
460
|
+
* The same package appears once per configuration, so entries are collapsed
|
|
461
|
+
* by name and version, and the configurations a package was resolved for are
|
|
462
|
+
* kept as a property. A requirement key without a `version` field names a
|
|
463
|
+
* system package xmake did not resolve; it is inventoried without a version.
|
|
464
|
+
*
|
|
465
|
+
* No `xmake` purl type is registered, so packages are identified as generic
|
|
466
|
+
* carrying a `cdx:purl:proposedType=xmake` property, following the
|
|
467
|
+
* convention used for nix and zig.
|
|
468
|
+
*
|
|
469
|
+
* @param {string} lockFile Path to `xmake-requires.lock`
|
|
470
|
+
* @returns {Object[]} Package records for the pinned requirements
|
|
471
|
+
*/
|
|
472
|
+
export declare function parseXmakeRequiresLock(lockFile: string): Object[];
|
|
450
473
|
//# 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":"AAiDA;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,KAAA,EAAE,QAAQ,KA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N,eAAe,eAAA,EACf,MAAM,AALL,CACF,QAImB,QA0BnB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,QAAA,EAAE,YAAY,AAH9D,CACA,EADQ,OAG6D,GAF3D,MAAM,CAYlB;AAED;;;;;;;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"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Perl parser for `cpanfile` and `cpanfile.snapshot`.
|
|
3
|
+
*
|
|
4
|
+
* Carton snapshots the resolved install set as a text document: one entry per
|
|
5
|
+
* distribution, each carrying the `pathname` it was fetched from (which
|
|
6
|
+
* encodes the PAUSE author id), the packages it provides, and the
|
|
7
|
+
* requirements it was resolved against. The declared `cpanfile` lists the
|
|
8
|
+
* project's own requirements.
|
|
9
|
+
*
|
|
10
|
+
* Distributions are identified with the registered `cpan` purl type, whose
|
|
11
|
+
* rules require the author id as the namespace
|
|
12
|
+
* (`pkg:cpan/<AUTHOR>/<Distribution>@<version>`).
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Parse a `cpanfile.snapshot` into distributions with a dependency graph.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} snapshotFile Path to `cpanfile.snapshot`
|
|
18
|
+
* @param {string} [cpanfileFile] Path to `cpanfile`, if present
|
|
19
|
+
* @returns {{ pkgList: object[], dependencies: object[] }}
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseCpanSnapshot(snapshotFile: string, cpanfileFile?: string): {
|
|
22
|
+
pkgList: object[];
|
|
23
|
+
dependencies: object[];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Collect the requirement names declared in a `cpanfile`.
|
|
27
|
+
*
|
|
28
|
+
* Only the `requires` keyword outside phase blocks is read; phases such as
|
|
29
|
+
* `on 'test'` are ignored so test-only modules do not become direct
|
|
30
|
+
* dependencies.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} cpanfileFile Path to `cpanfile`
|
|
33
|
+
* @returns {Set<string>} Declared requirement names
|
|
34
|
+
*/
|
|
35
|
+
export declare function directRequirementsFromCpanfile(cpanfileFile: string): Set<string>;
|
|
36
|
+
//# sourceMappingURL=parsers-perl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers-perl.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-perl.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAJnC,MAImC,EAAE,YAAY,AAHzD,CACA,EADQ,MAGiD,GAF/C;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAyHzD;AAkFD;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAAC,YAAY,EAHhD,MAGgD,GAF9C,GAAG,CAAC,MAAM,CAAC,CA0CvB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* R project parser for renv lock files.
|
|
3
|
+
*
|
|
4
|
+
* `renv.lock` records the R version, the repositories packages were resolved
|
|
5
|
+
* from, and every package in the project library with its exact version, an
|
|
6
|
+
* integrity hash, and the names of the packages it requires. The lock is a
|
|
7
|
+
* JSON document, which makes it a reliable offline source of both the
|
|
8
|
+
* resolved dependency set and the graph between packages.
|
|
9
|
+
*
|
|
10
|
+
* Packages are identified with the registered `cran` purl type
|
|
11
|
+
* (`pkg:cran/<Package>@<Version>`). Requirement strings may carry version
|
|
12
|
+
* constraints (`"R (>= 3.6)"`); only the leading package name is used, and
|
|
13
|
+
* the R runtime itself is recorded as the parent's version rather than an
|
|
14
|
+
* edge.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Parse an `renv.lock` file.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} renvLockFile Path to `renv.lock`
|
|
20
|
+
* @returns {{
|
|
21
|
+
* pkgList: object[],
|
|
22
|
+
* dependencies: object[],
|
|
23
|
+
* rootInputs: string[],
|
|
24
|
+
* parentComponent: object,
|
|
25
|
+
* rVersion: string|undefined
|
|
26
|
+
* }}
|
|
27
|
+
*/
|
|
28
|
+
export declare function parseRenvLock(renvLockFile: string): {
|
|
29
|
+
pkgList: object[];
|
|
30
|
+
dependencies: object[];
|
|
31
|
+
rootInputs: string[];
|
|
32
|
+
parentComponent: object;
|
|
33
|
+
rVersion: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=parsers-r.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers-r.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-r.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAT/B,MAS+B,GAR7B;IACR,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAC,SAAS,CAAA;CAC3B,CAsGH"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Erlang rebar3 parser for `rebar.lock`.
|
|
3
|
+
*
|
|
4
|
+
* A rebar lock holds one or two Erlang terms, each ended by a period:
|
|
5
|
+
*
|
|
6
|
+
* {"1.2.0", [{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.10.0">>},0}]}.
|
|
7
|
+
* [{pkg_hash, [{<<"cowboy">>, <<"3AFD...">>}]},
|
|
8
|
+
* {pkg_hash_ext, [...]}].
|
|
9
|
+
*
|
|
10
|
+
* The first term pairs the lock format version with the locked dependency
|
|
11
|
+
* list; the hashes live in a separate second term, which is absent from locks
|
|
12
|
+
* that hold no hex packages. Lock format 1.0.0 omitted the version and wrote
|
|
13
|
+
* the dependency list as the only term.
|
|
14
|
+
*
|
|
15
|
+
* Rather than a large regular expression over the surface syntax, a small
|
|
16
|
+
* recursive reader parses the terms into plain JavaScript values: tuples and
|
|
17
|
+
* lists become arrays, binaries and strings become strings, atoms become
|
|
18
|
+
* strings. Only the shapes rebar actually writes are understood; anything
|
|
19
|
+
* else is skipped.
|
|
20
|
+
*
|
|
21
|
+
* Hex dependencies are identified with the registered `hex` purl type, since
|
|
22
|
+
* rebar resolves Erlang packages through hex.pm. The `pkg_hash` values hex
|
|
23
|
+
* publishes are SHA-256 digests of the package tarball, so they are emitted
|
|
24
|
+
* into the CycloneDX `hashes` array where consumers expect content hashes.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Parse a `rebar.lock` file.
|
|
28
|
+
*
|
|
29
|
+
* @param {string} rebarLockFile Path to `rebar.lock`
|
|
30
|
+
* @returns {{ pkgList: object[] }} Locked packages
|
|
31
|
+
*/
|
|
32
|
+
export declare function parseRebarLock(rebarLockFile: string): {
|
|
33
|
+
pkgList: object[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Parse every period-terminated Erlang term in a source text.
|
|
37
|
+
*
|
|
38
|
+
* @param {string} text Source text
|
|
39
|
+
* @returns {Array} Parsed terms, in file order
|
|
40
|
+
*/
|
|
41
|
+
export declare function parseErlangTerms(text: string): any[];
|
|
42
|
+
//# sourceMappingURL=parsers-rebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsers-rebar.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-rebar.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,aAAa,EAHjC,MAGiC,GAF/B;IAAE,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAyDjC;AAuHD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAH1B,MAG0B,SA2BpC"}
|