-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
35 lines (32 loc) · 1.13 KB
/
types.ts
File metadata and controls
35 lines (32 loc) · 1.13 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
/**
* @file Shared types for SBT resolution. SBT (Scala Build Tool) is JVM-based. A
* "resolved SBT" is a launcher — either the `sbt` shell script on the user's
* PATH, or the `sbt-launch.jar` extracted from the smol binary's VFS. In the
* VFS case, the caller is responsible for invoking the launcher with `java
* -jar <launcherPath>` using the JRE resolved via `resolveJre()`.
*/
import type { ResolvedToolIntegrity } from '../from-download'
export type SbtSource = 'download' | 'path' | 'vfs'
/**
* A resolved SBT launcher.
*/
export interface ResolvedSbt {
/**
* Absolute path to the launcher.
*
* - `source === 'path'`: the user's `sbt` script (invoke directly)
* - `source === 'vfs'`: the bundled `sbt-launch.jar` (invoke as `java -jar
* <path>` via the resolved JRE)
*/
readonly path: string
/**
* `true` if `path` is a Java archive (`*.jar`) that must be invoked via `java
* -jar`; `false` if it's a direct-executable script.
*/
readonly isJar: boolean
readonly source: SbtSource
/**
* See {@link ResolvedToolIntegrity}.
*/
readonly integrity?: ResolvedToolIntegrity | undefined
}