@git.zone/tsdisk 1.1.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.
@@ -0,0 +1,6 @@
1
+ import { spawn } from 'node:child_process';
2
+ import { createReadStream, type ReadStream } from 'node:fs';
3
+ import * as fs from 'node:fs/promises';
4
+ import * as path from 'node:path';
5
+ import { createInterface } from 'node:readline/promises';
6
+ export { createInterface, createReadStream, fs, path, spawn, type ReadStream, };
@@ -0,0 +1,8 @@
1
+ // node native
2
+ import { spawn } from 'node:child_process';
3
+ import { createReadStream } from 'node:fs';
4
+ import * as fs from 'node:fs/promises';
5
+ import * as path from 'node:path';
6
+ import { createInterface } from 'node:readline/promises';
7
+ export { createInterface, createReadStream, fs, path, spawn, };
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHNkaXNrLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90c2Rpc2sucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjO0FBQ2QsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQzNDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBbUIsTUFBTSxTQUFTLENBQUM7QUFDNUQsT0FBTyxLQUFLLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUN2QyxPQUFPLEtBQUssSUFBSSxNQUFNLFdBQVcsQ0FBQztBQUNsQyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFekQsT0FBTyxFQUNMLGVBQWUsRUFDZixnQkFBZ0IsRUFDaEIsRUFBRSxFQUNGLElBQUksRUFDSixLQUFLLEdBRU4sQ0FBQyJ9
@@ -0,0 +1,22 @@
1
+ export declare const toolCacheMarkerFile = ".gitzone-tool-cache.json";
2
+ export type TToolCacheRisk = 'safe-marked' | 'safe-heuristic' | 'review' | 'report-only';
3
+ export interface IToolCacheMarker {
4
+ owner: string;
5
+ kind: string;
6
+ safeToPrune: boolean;
7
+ createdAt: string;
8
+ schemaVersion: 1;
9
+ }
10
+ export interface IToolCacheClassification {
11
+ ownerGuess: string;
12
+ kind: string;
13
+ risk: TToolCacheRisk;
14
+ suggestedCleanupCommand: string;
15
+ marker?: IToolCacheMarker;
16
+ }
17
+ export interface IToolCacheFinding extends IToolCacheClassification {
18
+ path: string;
19
+ bytes?: number;
20
+ }
21
+ export declare function parseToolCacheMarker(rawArg: string): IToolCacheMarker | undefined;
22
+ export declare function classifyToolCachePath(pathArg: string, markerArg?: IToolCacheMarker): IToolCacheClassification | undefined;
@@ -0,0 +1,106 @@
1
+ import * as path from 'node:path';
2
+ export const toolCacheMarkerFile = '.gitzone-tool-cache.json';
3
+ export function parseToolCacheMarker(rawArg) {
4
+ try {
5
+ const marker = JSON.parse(rawArg);
6
+ if (typeof marker.owner === 'string' &&
7
+ typeof marker.kind === 'string' &&
8
+ marker.safeToPrune === true &&
9
+ typeof marker.createdAt === 'string' &&
10
+ marker.schemaVersion === 1) {
11
+ return marker;
12
+ }
13
+ }
14
+ catch {
15
+ return undefined;
16
+ }
17
+ return undefined;
18
+ }
19
+ function quotePath(pathArg) {
20
+ return `"${pathArg.replace(/(["\\$`])/g, '\\$1')}"`;
21
+ }
22
+ function normalizedPath(pathArg) {
23
+ return path.resolve(pathArg).replace(/\\/g, '/');
24
+ }
25
+ function workspaceRootFor(pathArg) {
26
+ const normalized = normalizedPath(pathArg);
27
+ const nogitIndex = normalized.indexOf('/.nogit/');
28
+ if (nogitIndex > 0) {
29
+ return normalized.slice(0, nogitIndex);
30
+ }
31
+ const rustTargetIndex = normalized.indexOf('/rust/target');
32
+ if (rustTargetIndex > 0) {
33
+ return normalized.slice(0, rustTargetIndex);
34
+ }
35
+ const tsRustTargetIndex = normalized.indexOf('/ts_rust/target');
36
+ if (tsRustTargetIndex > 0) {
37
+ return normalized.slice(0, tsRustTargetIndex);
38
+ }
39
+ const distIndex = normalized.indexOf('/dist/binaries/');
40
+ if (distIndex > 0) {
41
+ return normalized.slice(0, distIndex);
42
+ }
43
+ return path.dirname(pathArg);
44
+ }
45
+ export function classifyToolCachePath(pathArg, markerArg) {
46
+ const normalized = normalizedPath(pathArg);
47
+ if (markerArg) {
48
+ return {
49
+ ownerGuess: markerArg.owner,
50
+ kind: markerArg.kind,
51
+ risk: markerArg.safeToPrune ? 'safe-marked' : 'review',
52
+ suggestedCleanupCommand: `rm -rf ${quotePath(pathArg)}`,
53
+ marker: markerArg,
54
+ };
55
+ }
56
+ if (/\/dist\/binaries\/\.[^/]+\/[^/]+\/\.deno_compile_node_modules$/.test(normalized)) {
57
+ return {
58
+ ownerGuess: '@git.zone/tsdeno',
59
+ kind: 'deno-self-extracting-staging',
60
+ risk: 'report-only',
61
+ suggestedCleanupCommand: `report-only: verify ownership before removing ${quotePath(path.dirname(pathArg))}`,
62
+ };
63
+ }
64
+ if (/\/\.nogit\/release-binaries\/\.[^/]+\/[^/]+\/\.deno_compile_node_modules$/.test(normalized)) {
65
+ return {
66
+ ownerGuess: '@git.zone/tsdeno',
67
+ kind: 'deno-self-extracting-release-staging',
68
+ risk: 'report-only',
69
+ suggestedCleanupCommand: `report-only: verify ownership before removing ${quotePath(path.dirname(pathArg))}`,
70
+ };
71
+ }
72
+ if (normalized.endsWith('/.nogit/tsbundle-temp')) {
73
+ return {
74
+ ownerGuess: '@git.zone/tsbundle',
75
+ kind: 'bundle-temp-workspace',
76
+ risk: 'report-only',
77
+ suggestedCleanupCommand: `report-only: verify ownership before removing ${quotePath(pathArg)}`,
78
+ };
79
+ }
80
+ if (normalized.endsWith('/.nogit/docker-registry') || normalized.includes('/.nogit/docker-registry/')) {
81
+ return {
82
+ ownerGuess: '@git.zone/tsdocker',
83
+ kind: 'docker-registry-cache',
84
+ risk: 'report-only',
85
+ suggestedCleanupCommand: `report-only: run tsdocker prune dry-run from ${quotePath(workspaceRootFor(pathArg))} and verify markers before removal`,
86
+ };
87
+ }
88
+ if (normalized.endsWith('/rust/target') || normalized.endsWith('/ts_rust/target')) {
89
+ return {
90
+ ownerGuess: '@git.zone/tsrust/cargo',
91
+ kind: 'rust-target-cache',
92
+ risk: 'report-only',
93
+ suggestedCleanupCommand: `report-only: run tsrust prune dry-run from ${quotePath(workspaceRootFor(pathArg))} and verify managed markers before removal`,
94
+ };
95
+ }
96
+ if (normalized.endsWith('/.nogit/tsrust-target')) {
97
+ return {
98
+ ownerGuess: '@git.zone/tsrust',
99
+ kind: 'rust-target-cache',
100
+ risk: 'report-only',
101
+ suggestedCleanupCommand: `report-only: run tsrust prune dry-run from ${quotePath(workspaceRootFor(pathArg))} and verify managed markers before removal`,
102
+ };
103
+ }
104
+ return undefined;
105
+ }
106
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHNkaXNrLnRvb2xjYWNoZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy90c2Rpc2sudG9vbGNhY2hlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssSUFBSSxNQUFNLFdBQVcsQ0FBQztBQUVsQyxNQUFNLENBQUMsTUFBTSxtQkFBbUIsR0FBRywwQkFBMEIsQ0FBQztBQXlCOUQsTUFBTSxVQUFVLG9CQUFvQixDQUFDLE1BQWM7SUFDakQsSUFBSSxDQUFDO1FBQ0gsTUFBTSxNQUFNLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQThCLENBQUM7UUFDL0QsSUFDRSxPQUFPLE1BQU0sQ0FBQyxLQUFLLEtBQUssUUFBUTtZQUNoQyxPQUFPLE1BQU0sQ0FBQyxJQUFJLEtBQUssUUFBUTtZQUMvQixNQUFNLENBQUMsV0FBVyxLQUFLLElBQUk7WUFDM0IsT0FBTyxNQUFNLENBQUMsU0FBUyxLQUFLLFFBQVE7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nQixDQUFDLE9BQU8sQ0FBQyxDQUFDLG9DQUFvQztTQUNsSixDQUFDO0lBQ0osQ0FBQztJQUVELElBQUksVUFBVSxDQUFDLFFBQVEsQ0FBQyxjQUFjLENBQUMsSUFBSSxVQUFVLENBQUMsUUFBUSxDQUFDLGlCQUFpQixDQUFDLEVBQUUsQ0FBQztRQUNsRixPQUFPO1lBQ0wsVUFBVSxFQUFFLHdCQUF3QjtZQUNwQyxJQUFJLEVBQUUsbUJBQW1CO1lBQ3pCLElBQUksRUFBRSxhQUFhO1lBQ25CLHVCQUF1QixFQUFFLDhDQUE4QyxTQUFTLENBQUMsZ0JBQWdCLENBQUMsT0FBTyxDQUFDLENBQUMsNENBQTRDO1NBQ3hKLENBQUM7SUFDSixDQUFDO0lBRUQsSUFBSSxVQUFVLENBQUMsUUFBUSxDQUFDLHVCQUF1QixDQUFDLEVBQUUsQ0FBQztRQUNqRCxPQUFPO1lBQ0wsVUFBVSxFQUFFLGtCQUFrQjtZQUM5QixJQUFJLEVBQUUsbUJBQW1CO1lBQ3pCLElBQUksRUFBRSxhQUFhO1lBQ25CLHVCQUF1QixFQUFFLDhDQUE4QyxTQUFTLENBQUMsZ0JBQWdCLENBQUMsT0FBTyxDQUFDLENBQUMsNENBQTRDO1NBQ3hKLENBQUM7SUFDSixDQUFDO0lBRUQsT0FBTyxTQUFTLENBQUM7QUFDbkIsQ0FBQyJ9
package/license.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Task Venture Capital GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@git.zone/tsdisk",
3
+ "version": "1.1.0",
4
+ "private": false,
5
+ "description": "A disk usage diagnostic CLI for finding large files, caches, logs, and Docker storage.",
6
+ "main": "dist_ts/index.js",
7
+ "typings": "dist_ts/index.d.ts",
8
+ "type": "module",
9
+ "bin": {
10
+ "tsdisk": "./cli.js"
11
+ },
12
+ "author": "Task Venture Capital GmbH",
13
+ "license": "MIT",
14
+ "files": [
15
+ "ts/**/*",
16
+ "dist_ts/**/*",
17
+ "cli.js",
18
+ ".smartconfig.json",
19
+ "readme.md",
20
+ "license.md"
21
+ ],
22
+ "devDependencies": {
23
+ "@git.zone/tsbuild": "^4.4.2",
24
+ "@git.zone/tstest": "^3.6.6",
25
+ "@types/node": "^25.9.3"
26
+ },
27
+ "scripts": {
28
+ "test": "(pnpm run build && tstest test/ --verbose)",
29
+ "build": "(tsbuild)",
30
+ "buildDocs": "tsdoc"
31
+ }
32
+ }
package/readme.md ADDED
@@ -0,0 +1,100 @@
1
+ # @git.zone/tsdisk
2
+
3
+ `tsdisk` is a disk usage diagnostic CLI for finding large files, caches, logs, Docker storage, and deleted-but-open files on Linux hosts.
4
+
5
+ ## Issue Reporting and Security
6
+
7
+ For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ pnpm add --global @git.zone/tsdisk
13
+ ```
14
+
15
+ For one-off usage:
16
+
17
+ ```bash
18
+ pnpm dlx @git.zone/tsdisk
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```bash
24
+ tsdisk
25
+ ```
26
+
27
+ The tool prints a structured report covering filesystem usage, top-level `du` breakdowns, known user and system cache paths, project-local tool caches on mounted workspaces such as `/mnt/data`, systemd journal usage, deleted open files, and Docker context storage.
28
+
29
+ It asks for `sudo` because root-owned filesystem paths and deleted open files require elevated permissions. Cleanup commands are printed as suggestions only; `tsdisk` does not delete caches or prune Docker data.
30
+
31
+ ### Project Tool Cache Diagnostics
32
+
33
+ `tsdisk` reports common build/cache buildup from git.zone tooling without deleting anything:
34
+
35
+ - Deno self-extracting staging such as `dist/binaries/.*/.deno_compile_node_modules`
36
+ - Release binary staging under `.nogit/release-binaries/.*/.deno_compile_node_modules`
37
+ - tsbundle temp workspaces under `.nogit/tsbundle-temp`
38
+ - tsdocker local registry caches under `.nogit/docker-registry`
39
+ - Rust target caches under `rust/target`, `ts_rust/target`, and marked `.nogit/tsrust-target`
40
+ - Stopped `tsdocker-registry-*` containers and their bind mounts
41
+ - Docker buildx state volumes with zero container links, as report-only findings
42
+
43
+ Marked caches using `.gitzone-tool-cache.json` are classified as tool-owned. Unmarked legacy paths are report-only and do not receive destructive cleanup commands.
44
+
45
+ ## Environment
46
+
47
+ | Variable | Description | Default |
48
+ | --- | --- | --- |
49
+ | `DOCKER_TIMEOUT` | Docker command timeout in seconds | `60` |
50
+ | `DU_TIMEOUT` | `du` command timeout in seconds | `300` |
51
+ | `NCDU_TIMEOUT` | `ncdu` export timeout in seconds | `900` |
52
+ | `TSDISK_NCDU_EXPORT` | Path for the temporary `ncdu` export | `/tmp/tsdisk-ncdu-root-*.json` |
53
+ | `TSDISK_KEEP_NCDU_EXPORT` | Keep the `ncdu` export for later browsing | unset |
54
+ | `TSDISK_INSTALL_NCDU` | Install `ncdu` with `apt-get` if missing | prompt |
55
+
56
+ ## Commands
57
+
58
+ ```bash
59
+ tsdisk --json
60
+ tsdisk --help
61
+ tsdisk --version
62
+ ```
63
+
64
+ `tsdisk --json` prints the project tool-cache diagnostics as structured JSON:
65
+
66
+ ```json
67
+ {
68
+ "toolCaches": [
69
+ {
70
+ "path": "/mnt/data/project/.nogit/tsbundle-temp",
71
+ "ownerGuess": "@git.zone/tsbundle",
72
+ "kind": "bundle-temp-workspace",
73
+ "risk": "report-only",
74
+ "suggestedCleanupCommand": "report-only: verify ownership before removing \"/mnt/data/project/.nogit/tsbundle-temp\"",
75
+ "bytes": 123456
76
+ }
77
+ ]
78
+ }
79
+ ```
80
+
81
+ ## License and Legal Information
82
+
83
+ This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the repository license file.
84
+
85
+ **Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
86
+
87
+ ### Trademarks
88
+
89
+ This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
90
+
91
+ Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
92
+
93
+ ### Company Information
94
+
95
+ Task Venture Capital GmbH<br>
96
+ Registered at District Court Bremen HRB 35230 HB, Germany
97
+
98
+ For any legal inquiries or further information, please contact us via email at hello@task.vc.
99
+
100
+ By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * autocreated commitinfo by @push.rocks/commitinfo
3
+ */
4
+ export const commitinfo = {
5
+ name: '@git.zone/tsdisk',
6
+ version: '1.1.0',
7
+ description: 'A disk usage diagnostic CLI for finding large files, caches, logs, and Docker storage.'
8
+ }
package/ts/index.ts ADDED
@@ -0,0 +1,8 @@
1
+ export { commitinfo } from './00_commitinfo_data.js';
2
+ export {
3
+ formatBytes,
4
+ main,
5
+ parseDuOutput,
6
+ runCli,
7
+ } from './tsdisk.cli.js';
8
+ export * from './tsdisk.toolcaches.js';