UNPKG

@cyclonedx/cdxgen

Version:

Creates CycloneDX Software Bill of Materials (SBOM) from source or container image

38 lines 1.72 kB
/** * Split a bun.lock package descriptor (eg `@babel/parser@7.29.7`, * `left-pad@1.3.0` or `foo@git+https://github.com/foo/bar#abcdef`) into its * group, name and version/specifier components. * * @param {string} descriptor The `name@specifier` descriptor string. * @returns {{group: string, name: string, version: string}} Parsed pieces. The * version is returned verbatim, so non-registry specifiers (git/tarball URLs) * are preserved for the caller to handle. */ export declare function parseBunDescriptor(descriptor: string): { group: string; name: string; version: string; }; /** * Parse a bun text lockfile (`bun.lock`, lockfileVersion 1). * * Bun's text lockfile is JSONC (JSON with trailing commas). It records the * workspace roots under `workspaces` and the fully resolved dependency tree * under `packages`, where each entry is an array of the form * `["name@version", "registry", { dependencies, optionalDependencies, bin, * os, cpu, ... }, "sha512-..."]`. Nested duplicate versions are keyed by their * dependency path (eg `"parent/child"`). * * The binary lockfile (`bun.lockb`) is intentionally not supported - callers * should ask users to regenerate it with `bun install --save-text-lockfile`. * * @param {string} bunLockFile Path to the bun.lock file. * @param {Object} [options] Parsing options (`parentComponent`). * @returns {Promise<{pkgList: Array, dependenciesList: Array}>} Parsed packages * and dependency graph, matching the shape of the other lockfile parsers. */ export declare function parseBunLock(bunLockFile: string, options?: Object): Promise<{ pkgList: any[]; dependenciesList: any[]; }>; //# sourceMappingURL=bunutils.d.ts.map