Skip to content

Commit 4f09fe0

Browse files
committed
refactor: colocate 19 unused exports + drop FinalizeTier1ScanOptions (20 files)
19 colocations + 1 entirely-dead type deletion.
1 parent 3a3575e commit 4f09fe0

20 files changed

Lines changed: 19 additions & 24 deletions

packages/cli/src/commands/scan/finalize-tier1-scan.mts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ import { sendApiRequest } from '../../util/socket/api.mjs'
22

33
import type { CResult } from '../../types.mts'
44

5-
export type FinalizeTier1ScanOptions = {
6-
tier1_reachability_scan_id: string
7-
report_run_id: string
8-
}
9-
105
/**
116
* Finalize a tier1 reachability scan. - Associates the tier1 reachability scan
127
* metadata with the full scan. - Sets the tier1 reachability scan to

packages/cli/src/commands/scan/handle-scan-reach.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { checkCommandInput } from '../../util/validation/check-input.mts'
1515
import type { ReachabilityOptions } from './perform-reachability-analysis.mts'
1616
import type { OutputKind } from '../../types.mts'
1717

18-
export type HandleScanReachConfig = {
18+
type HandleScanReachConfig = {
1919
cwd: string
2020
interactive: boolean
2121
orgSlug: string

packages/cli/src/commands/scan/handle-scan-report.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { outputScanReport } from './output-scan-report.mts'
44
import type { FOLD_SETTING, REPORT_LEVEL } from './types.mts'
55
import type { OutputKind } from '../../types.mts'
66

7-
export type HandleScanReportConfig = {
7+
type HandleScanReportConfig = {
88
orgSlug: string
99
scanId: string
1010
includeLicensePolicy: boolean

packages/cli/src/commands/scan/output-create-new-scan.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type { SpinnerInstance } from '@socketsecurity/lib-stable/spinner/types'
1414
import type { SocketSdkSuccessResult } from '@socketsecurity/sdk-stable'
1515
const logger = getDefaultLogger()
1616

17-
export type CreateNewScanOptions = {
17+
type CreateNewScanOptions = {
1818
interactive?: boolean | undefined
1919
outputKind?: OutputKind | undefined
2020
spinner?: SpinnerInstance | undefined

packages/cli/src/commands/scan/output-scan-report.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import type { SocketArtifact } from '../../util/alert/artifact.mts'
2424
import type { SocketSdkSuccessResult } from '@socketsecurity/sdk-stable'
2525
const logger = getDefaultLogger()
2626

27-
export type OutputScanReportConfig = {
27+
type OutputScanReportConfig = {
2828
orgSlug: string
2929
scanId: string
3030
includeLicensePolicy: boolean

packages/cli/src/commands/scan/perform-reachability-analysis.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export type ReachabilityOptions = {
4141
reachVersion: string | undefined
4242
}
4343

44-
export type ReachabilityAnalysisOptions = {
44+
type ReachabilityAnalysisOptions = {
4545
branchName?: string | undefined
4646
cwd?: string | undefined
4747
orgSlug?: string | undefined

packages/cli/src/commands/scan/stream-scan.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { SetupSdkOptions } from '../../util/socket/sdk.mjs'
77

88
const logger = getDefaultLogger()
99

10-
export type StreamScanOptions = {
10+
type StreamScanOptions = {
1111
commandPath?: string | undefined
1212
file?: string | undefined
1313
sdkOpts?: SetupSdkOptions | undefined

packages/cli/src/commands/scan/validate-reachability-target.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { existsSync, promises as fs } from 'node:fs'
22
import path from 'node:path'
33

4-
export type ReachabilityTargetValidation = {
4+
type ReachabilityTargetValidation = {
55
isDirectory: boolean
66
isInsideCwd: boolean
77
isValid: boolean

packages/cli/src/commands/uninstall/teardown-tab-completion.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99

1010
import type { CResult } from '../../types.mts'
1111

12-
export function findRemainingCompletionSetups(bashrc: string): string[] {
12+
function findRemainingCompletionSetups(bashrc: string): string[] {
1313
return bashrc
1414
.split('\n')
1515
.map(s => s.trim())

packages/cli/src/commands/wrapper/postinstall-wrapper.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Do you want to install the Socket npm wrapper (this will create an alias to the
6363
}
6464
}
6565

66-
export async function setupSocketWrapper(query: string): Promise<void> {
66+
async function setupSocketWrapper(query: string): Promise<void> {
6767
logger.log(`
6868
_____ _ _
6969
| __|___ ___| |_ ___| |_

0 commit comments

Comments
 (0)