@@ -50,7 +50,7 @@ const binByAgent = new Map<Agent, string>([
50
50
51
51
export type Agent = ( typeof AGENTS ) [ number ]
52
52
53
- type EnvBase = {
53
+ export type EnvBase = {
54
54
agent : Agent
55
55
agentExecPath : string
56
56
agentSupported : boolean
@@ -85,6 +85,17 @@ export type EnvDetails = Readonly<
85
85
>
86
86
>
87
87
88
+ export type DetectAndValidateOptions = {
89
+ cmdName ?: string | undefined
90
+ logger ?: Logger | undefined
91
+ prod ?: boolean | undefined
92
+ }
93
+
94
+ export type DetectOptions = {
95
+ cwd ?: string | undefined
96
+ onUnknown ?: ( pkgManager : string | undefined ) => void
97
+ }
98
+
88
99
export type PartialEnvDetails = Readonly <
89
100
Remap <
90
101
EnvBase & {
@@ -98,12 +109,7 @@ export type PartialEnvDetails = Readonly<
98
109
>
99
110
>
100
111
101
- export type DetectOptions = {
102
- cwd ?: string | undefined
103
- onUnknown ?: ( pkgManager : string | undefined ) => void
104
- }
105
-
106
- type ReadLockFile =
112
+ export type ReadLockFile =
107
113
| ( ( lockPath : string ) => Promise < string | undefined > )
108
114
| ( ( lockPath : string , agentExecPath : string ) => Promise < string | undefined > )
109
115
| ( (
@@ -112,12 +118,6 @@ type ReadLockFile =
112
118
cwd : string ,
113
119
) => Promise < string | undefined > )
114
120
115
- export type DetectAndValidateOptions = {
116
- cmdName ?: string | undefined
117
- logger ?: Logger | undefined
118
- prod ?: boolean | undefined
119
- }
120
-
121
121
const readLockFileByAgent : Map < Agent , ReadLockFile > = ( ( ) => {
122
122
function wrapReader < T extends ( ...args : any [ ] ) => Promise < any > > (
123
123
reader : T ,
0 commit comments