@git.zone/tsdisk 1.2.1 → 1.3.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/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/index.d.ts +4 -1
- package/dist_ts/index.js +4 -2
- package/dist_ts/tsdisk.cli.d.ts +13 -1
- package/dist_ts/tsdisk.cli.js +89 -47
- package/dist_ts/tsdisk.progress.d.ts +31 -0
- package/dist_ts/tsdisk.progress.js +64 -0
- package/dist_ts/tsdisk.scan.d.ts +3 -0
- package/dist_ts/tsdisk.scan.js +48 -19
- package/dist_ts/tsdisk.usage.d.ts +50 -0
- package/dist_ts/tsdisk.usage.js +194 -0
- package/package.json +1 -1
- package/readme.md +10 -4
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/index.ts +4 -0
- package/ts/tsdisk.cli.ts +81 -50
- package/ts/tsdisk.progress.ts +78 -0
- package/ts/tsdisk.scan.ts +45 -18
- package/ts/tsdisk.usage.ts +199 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@git.zone/tsdisk',
|
|
6
|
-
version: '1.
|
|
6
|
+
version: '1.3.0',
|
|
7
7
|
description: 'A disk usage diagnostic CLI for finding large files, caches, logs, and Docker storage.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxrQkFBa0I7SUFDeEIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHdGQUF3RjtDQUN0RyxDQUFBIn0=
|
package/dist_ts/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { commitinfo } from './00_commitinfo_data.js';
|
|
2
|
-
export { formatBytes, collectDiskReport, collectProjectToolCacheReport, main, parseDuOutput, runCli, } from './tsdisk.cli.js';
|
|
2
|
+
export { formatBytes, collectDiskReport, collectProjectToolCacheReport, diagnosticCommandComplete, main, parseDuOutput, runCli, } from './tsdisk.cli.js';
|
|
3
3
|
export * from './tsdisk.toolcaches.js';
|
|
4
4
|
export * from './tsdisk.scan.js';
|
|
5
5
|
export * from './tsdisk.cleanup.js';
|
|
6
|
+
export * from './tsdisk.usage.js';
|
|
7
|
+
export { DiskProgressReporter, estimateReclaimableSpace } from './tsdisk.progress.js';
|
|
8
|
+
export type { IDiskProgress, IReclaimEstimate } from './tsdisk.progress.js';
|
|
6
9
|
export type { IRuntimeContext, IDiagnosticSection } from './tsdisk.cli.js';
|
package/dist_ts/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { commitinfo } from './00_commitinfo_data.js';
|
|
2
|
-
export { formatBytes, collectDiskReport, collectProjectToolCacheReport, main, parseDuOutput, runCli, } from './tsdisk.cli.js';
|
|
2
|
+
export { formatBytes, collectDiskReport, collectProjectToolCacheReport, diagnosticCommandComplete, main, parseDuOutput, runCli, } from './tsdisk.cli.js';
|
|
3
3
|
export * from './tsdisk.toolcaches.js';
|
|
4
4
|
export * from './tsdisk.scan.js';
|
|
5
5
|
export * from './tsdisk.cleanup.js';
|
|
6
|
-
|
|
6
|
+
export * from './tsdisk.usage.js';
|
|
7
|
+
export { DiskProgressReporter, estimateReclaimableSpace } from './tsdisk.progress.js';
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDckQsT0FBTyxFQUNMLFdBQVcsRUFDWCxpQkFBaUIsRUFDakIsNkJBQTZCLEVBQzdCLHlCQUF5QixFQUN6QixJQUFJLEVBQ0osYUFBYSxFQUNiLE1BQU0sR0FDUCxNQUFNLGlCQUFpQixDQUFDO0FBQ3pCLGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsT0FBTyxFQUFFLG9CQUFvQixFQUFFLHdCQUF3QixFQUFFLE1BQU0sc0JBQXNCLENBQUMifQ==
|
package/dist_ts/tsdisk.cli.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { type IWorkspaceScanOptions, type IScanIssue } from './tsdisk.scan.js';
|
|
2
|
+
import { type IUsageReport } from './tsdisk.usage.js';
|
|
3
|
+
import { type IDiskProgress } from './tsdisk.progress.js';
|
|
4
|
+
export { formatBytes } from './tsdisk.progress.js';
|
|
2
5
|
export type { IWorkspaceScanOptions } from './tsdisk.scan.js';
|
|
3
6
|
import { type IToolCacheFinding } from './tsdisk.toolcaches.js';
|
|
4
7
|
interface ICommandResult {
|
|
@@ -8,6 +11,7 @@ interface ICommandResult {
|
|
|
8
11
|
truncated?: boolean;
|
|
9
12
|
}
|
|
10
13
|
export interface IRuntimeContext {
|
|
14
|
+
onProgress?: (progress: Partial<IDiskProgress>) => void;
|
|
11
15
|
runningAsRoot: boolean;
|
|
12
16
|
sudoAvailable: boolean;
|
|
13
17
|
sudoChecked: boolean;
|
|
@@ -23,30 +27,38 @@ interface IDuEntry {
|
|
|
23
27
|
bytes: number;
|
|
24
28
|
path: string;
|
|
25
29
|
}
|
|
26
|
-
export declare function formatBytes(bytes: number): string;
|
|
27
30
|
export declare function parseDuOutput(output: string): IDuEntry[];
|
|
28
31
|
export declare function collectToolCachePathsFromRoot(root: string, options: IWorkspaceScanOptions): Promise<IToolCacheFinding[]>;
|
|
29
32
|
export declare function collectProjectToolCacheReport(ctx: IRuntimeContext, roots?: string[]): Promise<{
|
|
30
33
|
roots: string[];
|
|
31
34
|
toolCaches: IToolCacheFinding[];
|
|
35
|
+
usagePriorityPaths: string[];
|
|
32
36
|
issues: IScanIssue[];
|
|
37
|
+
issueCounts: Partial<Record<"timeout" | "read-error" | "invalid-marker" | "depth-limit" | "entry-limit" | "mount-boundary" | "symlink" | "size-unavailable", number>>;
|
|
33
38
|
complete: boolean;
|
|
34
39
|
}>;
|
|
35
40
|
export declare function collectProjectToolCacheDiagnostics(ctx: IRuntimeContext): Promise<IToolCacheFinding[]>;
|
|
36
41
|
export declare function main(): Promise<void>;
|
|
37
42
|
export interface IDiagnosticSection {
|
|
38
43
|
name: string;
|
|
44
|
+
kind?: 'command' | 'derived';
|
|
45
|
+
derivedFrom?: 'usage.entries';
|
|
39
46
|
command: string;
|
|
40
47
|
args: string[];
|
|
41
48
|
result: ICommandResult;
|
|
42
49
|
complete: boolean;
|
|
43
50
|
}
|
|
51
|
+
export declare function diagnosticCommandComplete(command: string, result: ICommandResult): boolean;
|
|
44
52
|
export declare function collectDiskReport(ctx: IRuntimeContext, roots?: string[]): Promise<{
|
|
53
|
+
usage: IUsageReport;
|
|
54
|
+
reclaim: import("./tsdisk.progress.js").IReclaimEstimate;
|
|
45
55
|
sections: IDiagnosticSection[];
|
|
46
56
|
complete: boolean;
|
|
47
57
|
roots: string[];
|
|
48
58
|
toolCaches: IToolCacheFinding[];
|
|
59
|
+
usagePriorityPaths: string[];
|
|
49
60
|
issues: IScanIssue[];
|
|
61
|
+
issueCounts: Partial<Record<"timeout" | "read-error" | "invalid-marker" | "depth-limit" | "entry-limit" | "mount-boundary" | "symlink" | "size-unavailable", number>>;
|
|
50
62
|
schemaVersion: number;
|
|
51
63
|
generatedAt: string;
|
|
52
64
|
}>;
|