Skip to content

Commit 73dbcdf

Browse files
committed
refactor: colocate 14 type-only exports across 7 fetch/installer modules
Each *-{Config,Options} pair was exported but only used inside its declaring file. Touched modules: - agent-installer.mts - fetch-dependencies.mts - fetch-create-repo.mts, fetch-list-repos.mts, fetch-update-repo.mts - fetch-create-org-full-scan.mts, fetch-list-scans.mts
1 parent b6d0296 commit 73dbcdf

7 files changed

Lines changed: 14 additions & 14 deletions

File tree

packages/cli/src/commands/optimize/agent-installer.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ import type { SpinnerInstance } from '@socketsecurity/lib-stable/spinner/types'
2929

3030
type SpawnOption = Exclude<Parameters<typeof spawn>[2], undefined>
3131

32-
export interface AgentInstallOptions extends SpawnOption {
32+
interface AgentInstallOptions extends SpawnOption {
3333
args?: string[] | readonly string[] | undefined
3434
spinner?: SpinnerInstance | undefined
3535
}
3636

37-
export type AgentSpawnResult = ReturnType<typeof spawn>
37+
type AgentSpawnResult = ReturnType<typeof spawn>
3838

3939
/**
4040
* Execute package installation with the detected package manager agent. Handles

packages/cli/src/commands/organization/fetch-dependencies.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import type { CResult } from '../../types.mts'
55
import type { SetupSdkOptions } from '../../util/socket/sdk.mjs'
66
import type { SocketSdkSuccessResult } from '@socketsecurity/sdk-stable'
77

8-
export type FetchDependenciesConfig = {
8+
type FetchDependenciesConfig = {
99
limit: number
1010
offset: number
1111
}
1212

13-
export type FetchDependenciesOptions = {
13+
type FetchDependenciesOptions = {
1414
commandPath?: string | undefined
1515
sdkOpts?: SetupSdkOptions | undefined
1616
}

packages/cli/src/commands/repository/fetch-create-repo.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { CResult } from '../../types.mts'
55
import type { SetupSdkOptions } from '../../util/socket/sdk.mjs'
66
import type { SocketSdkSuccessResult } from '@socketsecurity/sdk-stable'
77

8-
export type FetchCreateRepoConfig = {
8+
type FetchCreateRepoConfig = {
99
defaultBranch: string
1010
description: string
1111
homepage: string
@@ -14,7 +14,7 @@ export type FetchCreateRepoConfig = {
1414
visibility: 'private' | 'public'
1515
}
1616

17-
export type FetchCreateRepoOptions = {
17+
type FetchCreateRepoOptions = {
1818
commandPath?: string | undefined
1919
sdkOpts?: SetupSdkOptions | undefined
2020
}

packages/cli/src/commands/repository/fetch-list-repos.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import type { CResult } from '../../types.mts'
55
import type { SetupSdkOptions } from '../../util/socket/sdk.mjs'
66
import type { SocketSdkSuccessResult } from '@socketsecurity/sdk-stable'
77

8-
export type FetchListReposConfig = {
8+
type FetchListReposConfig = {
99
direction: string
1010
orgSlug: string
1111
page: number
1212
perPage: number
1313
sort: string
1414
}
1515

16-
export type FetchListReposOptions = {
16+
type FetchListReposOptions = {
1717
commandPath?: string | undefined
1818
sdkOpts?: SetupSdkOptions | undefined
1919
}

packages/cli/src/commands/repository/fetch-update-repo.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { CResult } from '../../types.mts'
55
import type { SetupSdkOptions } from '../../util/socket/sdk.mjs'
66
import type { SocketSdkSuccessResult } from '@socketsecurity/sdk-stable'
77

8-
export type FetchUpdateRepoConfig = {
8+
type FetchUpdateRepoConfig = {
99
defaultBranch: string
1010
description: string
1111
homepage: string
@@ -14,7 +14,7 @@ export type FetchUpdateRepoConfig = {
1414
visibility: string
1515
}
1616

17-
export type FetchUpdateRepoOptions = {
17+
type FetchUpdateRepoOptions = {
1818
commandPath?: string | undefined
1919
sdkOpts?: SetupSdkOptions | undefined
2020
}

packages/cli/src/commands/scan/fetch-create-org-full-scan.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { SetupSdkOptions } from '../../util/socket/sdk.mjs'
66
import type { SpinnerInstance } from '@socketsecurity/lib-stable/spinner/types'
77
import type { SocketSdkSuccessResult } from '@socketsecurity/sdk-stable'
88

9-
export type FetchCreateOrgFullScanConfigs = {
9+
type FetchCreateOrgFullScanConfigs = {
1010
branchName: string
1111
commitHash: string
1212
commitMessage: string
@@ -17,7 +17,7 @@ export type FetchCreateOrgFullScanConfigs = {
1717
workspace?: string | undefined
1818
}
1919

20-
export type FetchCreateOrgFullScanOptions = {
20+
type FetchCreateOrgFullScanOptions = {
2121
commandPath?: string | undefined
2222
cwd?: string | undefined
2323
defaultBranch?: boolean | undefined

packages/cli/src/commands/scan/fetch-list-scans.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { CResult } from '../../types.mts'
55
import type { SetupSdkOptions } from '../../util/socket/sdk.mjs'
66
import type { SocketSdkSuccessResult } from '@socketsecurity/sdk-stable'
77

8-
export type FetchOrgFullScanListConfig = {
8+
type FetchOrgFullScanListConfig = {
99
branch: string
1010
direction: string
1111
from_time: string
@@ -16,7 +16,7 @@ export type FetchOrgFullScanListConfig = {
1616
sort: string
1717
}
1818

19-
export type FetchOrgFullScanListOptions = {
19+
type FetchOrgFullScanListOptions = {
2020
commandPath?: string | undefined
2121
sdkOpts?: SetupSdkOptions | undefined
2222
}

0 commit comments

Comments
 (0)