Skip to content

Commit 05c63be

Browse files
committed
Expose package-environment types
1 parent f970248 commit 05c63be

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/utils/package-environment.mts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const binByAgent = new Map<Agent, string>([
5050

5151
export type Agent = (typeof AGENTS)[number]
5252

53-
type EnvBase = {
53+
export type EnvBase = {
5454
agent: Agent
5555
agentExecPath: string
5656
agentSupported: boolean
@@ -85,6 +85,17 @@ export type EnvDetails = Readonly<
8585
>
8686
>
8787

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+
8899
export type PartialEnvDetails = Readonly<
89100
Remap<
90101
EnvBase & {
@@ -98,12 +109,7 @@ export type PartialEnvDetails = Readonly<
98109
>
99110
>
100111

101-
export type DetectOptions = {
102-
cwd?: string | undefined
103-
onUnknown?: (pkgManager: string | undefined) => void
104-
}
105-
106-
type ReadLockFile =
112+
export type ReadLockFile =
107113
| ((lockPath: string) => Promise<string | undefined>)
108114
| ((lockPath: string, agentExecPath: string) => Promise<string | undefined>)
109115
| ((
@@ -112,12 +118,6 @@ type ReadLockFile =
112118
cwd: string,
113119
) => Promise<string | undefined>)
114120

115-
export type DetectAndValidateOptions = {
116-
cmdName?: string | undefined
117-
logger?: Logger | undefined
118-
prod?: boolean | undefined
119-
}
120-
121121
const readLockFileByAgent: Map<Agent, ReadLockFile> = (() => {
122122
function wrapReader<T extends (...args: any[]) => Promise<any>>(
123123
reader: T,

0 commit comments

Comments
 (0)