-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
32 lines (28 loc) · 1.12 KB
/
types.ts
File metadata and controls
32 lines (28 loc) · 1.12 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
/**
* @file Shared types for JRE resolution. Returned by `resolveJre()` to describe
* a discovered JRE:
*
* - `javaPath` — absolute path to the `java` executable
* - `javaHome` — absolute path to the JRE root (parent of `bin/`)
* - `source` — which resolver tier found this JRE Major-version detection is
* intentionally left out of the resolved shape; callers that need it spawn
* `java -version` lazily. Most external-tools callsites (Bazel, SBT) don't
* need it — they assume the JRE is compatible with their launcher.
*/
import type { ResolvedToolIntegrity } from '../from-download'
import type { AdoptiumAssetQuery } from './asset-names'
export type JreSource = 'download' | 'java-home' | 'path' | 'vfs'
/**
* A resolved JRE installation. Either embedded in the smol binary's VFS,
* pointed to by `JAVA_HOME`, or present on PATH.
*/
export interface ResolvedJre {
readonly javaPath: string
readonly javaHome: string
readonly source: JreSource
/**
* See {@link ResolvedToolIntegrity}.
*/
readonly integrity?: ResolvedToolIntegrity | undefined
}
export type { AdoptiumAssetQuery }