-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
36 lines (33 loc) · 1.27 KB
/
types.ts
File metadata and controls
36 lines (33 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* @file Shared types for cdxgen resolution. cdxgen ships per-platform SEA
* binaries starting in v12.0.x — that's the single install path. The legacy
* `@cyclonedx/cdxgen` npm package is NOT used as a fallback: every fleet
* platform-arch has a SEA build, and routing through npm for any target would
* silently use a different distribution (different bundle composition,
* different startup cost). One install path; one cached binary. The future
* migration target is socket's `sdxgen` fork once that lands GA — the helper
* API stays `resolveCdxgen()` for backward compatibility either way.
*/
import type { ResolvedToolIntegrity } from '../from-download'
export type CdxgenSource = 'download' | 'path' | 'vfs'
/**
* A resolved cdxgen installation.
*/
export interface ResolvedCdxgen {
/**
* Absolute path to the `cdxgen` executable.
*
* - `source === 'download'`: the SEA binary copied into the dlx cache.
* - `source === 'path'`: whatever `which cdxgen` returned.
* - `source === 'vfs'`: the smol binary's extracted bundle.
*/
readonly path: string
/**
* Which resolver tier found this.
*/
readonly source: CdxgenSource
/**
* See {@link ResolvedToolIntegrity}.
*/
readonly integrity?: ResolvedToolIntegrity | undefined
}