-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
31 lines (29 loc) · 1008 Bytes
/
types.ts
File metadata and controls
31 lines (29 loc) · 1008 Bytes
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
/**
* @fileoverview 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()`.
*/
export type SbtSource = 'vfs' | 'path'
/**
* 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
}