-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
34 lines (30 loc) · 904 Bytes
/
index.d.ts
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
32
33
34
import { IgnoredPackages } from './src/utils'
export type SdcCheckMetric =
| 'dangerous-shell-commands'
| 'package-is-too-new'
| 'lockfile-is-not-safe'
| 'obfuscated-code'
| 'released-after-long-period-of-inactivity'
| 'too-many-decision-makers'
| 'unmaintained-package'
| 'install-scripts'
| 'no-source-code'
| 'has-os-scripts'
export type Config = {
limitOfDecisionMakers: number
monthsOfInactivityAllowed: number
daysBeforeUpgradeToNewVersion: number
errors: Array<SdcCheckMetric>
}
export type Report = {
type: 'success' | 'error' | 'none'
errors: { metric: SdcCheckMetric; package: string; message: string }[]
warnings: { metric: SdcCheckMetric; package: string; message: string }[]
}
export declare function check(options: {
rootDir?: string
packageName?: string
version?: string
config?: Config
ignoredPackages?: IgnoredPackages
}): Promise<Report>