@lzear/repo-lint 4.2.2 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -17
- package/dist/bin.js +284 -104
- package/dist/index.d.ts +27 -1
- package/dist/index.js +578 -96
- package/package.json +26 -17
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,32 @@ declare const LOCAL_CHECKS: LocalCheck[];
|
|
|
22
22
|
declare const REMOTE_CHECKS: RemoteCheck[];
|
|
23
23
|
declare const CHECKS: Check[];
|
|
24
24
|
|
|
25
|
+
type PackageManagerName = 'npm' | 'yarn' | 'pnpm' | 'bun';
|
|
26
|
+
interface PackageManager {
|
|
27
|
+
name: PackageManagerName;
|
|
28
|
+
version?: string;
|
|
29
|
+
source: 'packageManager' | 'lockfile' | 'default';
|
|
30
|
+
}
|
|
31
|
+
interface UpdateResult {
|
|
32
|
+
id: string;
|
|
33
|
+
desc: string;
|
|
34
|
+
pass: boolean;
|
|
35
|
+
changed: boolean;
|
|
36
|
+
detail?: string;
|
|
37
|
+
}
|
|
38
|
+
interface UpdateReport {
|
|
39
|
+
dir: string;
|
|
40
|
+
packageManager: PackageManager;
|
|
41
|
+
results: UpdateResult[];
|
|
42
|
+
}
|
|
43
|
+
interface UpdateOptions {
|
|
44
|
+
dir?: string;
|
|
45
|
+
dry?: boolean;
|
|
46
|
+
install?: boolean;
|
|
47
|
+
}
|
|
48
|
+
declare const detectPackageManager: (dir: string) => PackageManager;
|
|
49
|
+
declare const runUpdate: (options?: UpdateOptions) => Promise<UpdateReport>;
|
|
50
|
+
|
|
25
51
|
interface CheckResult {
|
|
26
52
|
id: string;
|
|
27
53
|
desc: string;
|
|
@@ -45,4 +71,4 @@ interface CheckLocalOptions {
|
|
|
45
71
|
declare const checkLocal: (options?: CheckLocalOptions) => Promise<RepoReport>;
|
|
46
72
|
declare const checkRepo: (repo: string, options?: CheckRepoOptions) => Promise<RepoReport>;
|
|
47
73
|
|
|
48
|
-
export { CHECKS, type Check, type CheckDetail, type CheckLocalOptions, type CheckRepoOptions, type CheckResult, LOCAL_CHECKS, type LocalCheck, REMOTE_CHECKS, type RemoteCheck, type RepoReport, checkLocal, checkRepo };
|
|
74
|
+
export { CHECKS, type Check, type CheckDetail, type CheckLocalOptions, type CheckRepoOptions, type CheckResult, LOCAL_CHECKS, type LocalCheck, type PackageManager, type PackageManagerName, REMOTE_CHECKS, type RemoteCheck, type RepoReport, type UpdateOptions, type UpdateReport, type UpdateResult, checkLocal, checkRepo, detectPackageManager, runUpdate };
|