yowtf 0.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.
package/dist/index.js ADDED
@@ -0,0 +1,286 @@
1
+ import {
2
+ APP_FULL_NAME,
3
+ APP_NAME,
4
+ APP_TAGLINE,
5
+ APP_VERSION,
6
+ BASE_SEVERITY_PENALTIES,
7
+ CANONICAL_DIAGNOSTIC_CATEGORIES,
8
+ CliError,
9
+ CliUsageError,
10
+ CommandExecutionError,
11
+ DIAGNOSTIC_CATEGORIES,
12
+ DefaultRuleRegistry,
13
+ DefaultScoreCalculator,
14
+ DetectionEngine,
15
+ DetectionService,
16
+ EXIT_APPLICATION_ERROR,
17
+ EXIT_SUCCESS,
18
+ EXIT_USAGE_ERROR,
19
+ FINDING_CONFIDENCES,
20
+ FINDING_SEVERITIES,
21
+ FINDING_STATUSES,
22
+ JsonReporter,
23
+ LinuxPlatformAdapter,
24
+ MacOSPlatformAdapter,
25
+ ProjectCollectionService,
26
+ ProjectCollector,
27
+ ProjectDiscovery,
28
+ SCORE_BANDS,
29
+ SEVERITY_PENALTIES,
30
+ SUPPORTED_PLATFORMS,
31
+ ScanOrchestratorService,
32
+ SystemCollectionService,
33
+ SystemCollector,
34
+ TerminalReporter,
35
+ UnsupportedPlatformAdapter,
36
+ WARN_PENALTY_MULTIPLIER,
37
+ WindowsPlatformAdapter,
38
+ allV1Rules,
39
+ cache001StorageLarge,
40
+ cache002BuildArtifactLarge,
41
+ cacheRules,
42
+ calculateScore,
43
+ cfg001EnvFileMissing,
44
+ cfg002RequiredValueMissing,
45
+ configRules,
46
+ createDefaultRuleRegistry,
47
+ createFinding,
48
+ createProgram,
49
+ createReportModel,
50
+ dep001LockfileMissing,
51
+ dep002LockfileMismatch,
52
+ dep003PackageManagerMismatch,
53
+ dep004DirectoryInconsistent,
54
+ dependencyRules,
55
+ detectPlatform,
56
+ disk001SpaceLow,
57
+ disk002DeveloperStoragePressure,
58
+ disk003ProjectLocationUnavailable,
59
+ disk004FilesystemReadonly,
60
+ diskRules,
61
+ dispatchCommand,
62
+ env001EmptyPathEntry,
63
+ env002SecretExposure,
64
+ env003DuplicatePath,
65
+ env004ShellPathMismatch,
66
+ environmentRules,
67
+ executeCommand,
68
+ executeSafeCommand,
69
+ formatCliError,
70
+ getScoreBand,
71
+ git001RepositoryMissing,
72
+ git002WorkingTreeDirty,
73
+ git003UntrackedFiles,
74
+ git004BranchDivergence,
75
+ gitRules,
76
+ isDiagnosticCategory,
77
+ isFindingConfidence,
78
+ isFindingSeverity,
79
+ isFindingStatus,
80
+ isSupportedPlatform,
81
+ isValidRuleId,
82
+ net001InterfaceUnavailable,
83
+ net002DnsMissing,
84
+ net003ProxySuspicious,
85
+ net004RouteUnavailable,
86
+ networkRules,
87
+ parseRuleId,
88
+ path001ExecutableMissing,
89
+ path002ExecutableMultiple,
90
+ path003EntryInvalid,
91
+ path004OrderShadowing,
92
+ pathRules,
93
+ port001DevConflict,
94
+ port002DuplicateListener,
95
+ port003UnexpectedExposure,
96
+ port004ProcessUnavailable,
97
+ portRules,
98
+ proc001ResourceHog,
99
+ proc002MemoryHog,
100
+ proc003Zombie,
101
+ proc004Duplicate,
102
+ processRules,
103
+ proj001ManifestMissing,
104
+ proj002LockfileMissing,
105
+ proj003RuntimePolicyMissing,
106
+ proj004RootAmbiguous,
107
+ projectRules,
108
+ registerGlobalOptions,
109
+ resolveAndValidatePath,
110
+ resolvePlatformAdapter,
111
+ run001NodeUnavailable,
112
+ run002NodeUnpinned,
113
+ run003PythonUnavailable,
114
+ run004PythonUnpinned,
115
+ run005JavaUnavailable,
116
+ run006VersionMismatch,
117
+ runCli,
118
+ runtimeRules,
119
+ sys001MemoryPressure,
120
+ sys002CpuPressure,
121
+ sys003UptimeShort,
122
+ sys004ArchitectureMismatch,
123
+ sys005PlatformSupported,
124
+ systemRules,
125
+ tool001GitUnavailable,
126
+ tool002PackageManagerMismatch,
127
+ tool003PackageManagerMissing,
128
+ tool004DockerUnavailable,
129
+ tool005ExecutableShadowing,
130
+ toolRules,
131
+ ver001RuntimeConflict,
132
+ ver002ToolConflict,
133
+ ver003ProjectRuntimeUnsatisfied,
134
+ ver004ToolOutdated,
135
+ versionRules
136
+ } from "./chunk-2PCP3AKH.js";
137
+
138
+ // src/domain/evidence.ts
139
+ var EVIDENCE_AVAILABILITIES = [
140
+ "AVAILABLE",
141
+ "UNAVAILABLE",
142
+ "FAILED",
143
+ "NOT_APPLICABLE"
144
+ ];
145
+ function isEvidenceAvailability(value) {
146
+ return typeof value === "string" && EVIDENCE_AVAILABILITIES.includes(value);
147
+ }
148
+ export {
149
+ APP_FULL_NAME,
150
+ APP_NAME,
151
+ APP_TAGLINE,
152
+ APP_VERSION,
153
+ BASE_SEVERITY_PENALTIES,
154
+ CANONICAL_DIAGNOSTIC_CATEGORIES,
155
+ CliError,
156
+ CliUsageError,
157
+ CommandExecutionError,
158
+ DIAGNOSTIC_CATEGORIES,
159
+ DefaultRuleRegistry,
160
+ DefaultScoreCalculator,
161
+ DetectionEngine,
162
+ DetectionService,
163
+ EVIDENCE_AVAILABILITIES,
164
+ EXIT_APPLICATION_ERROR,
165
+ EXIT_SUCCESS,
166
+ EXIT_USAGE_ERROR,
167
+ FINDING_CONFIDENCES,
168
+ FINDING_SEVERITIES,
169
+ FINDING_STATUSES,
170
+ JsonReporter,
171
+ LinuxPlatformAdapter,
172
+ MacOSPlatformAdapter,
173
+ ProjectCollectionService,
174
+ ProjectCollector,
175
+ ProjectDiscovery,
176
+ SCORE_BANDS,
177
+ SEVERITY_PENALTIES,
178
+ SUPPORTED_PLATFORMS,
179
+ ScanOrchestratorService,
180
+ SystemCollectionService,
181
+ SystemCollector,
182
+ TerminalReporter,
183
+ UnsupportedPlatformAdapter,
184
+ WARN_PENALTY_MULTIPLIER,
185
+ WindowsPlatformAdapter,
186
+ allV1Rules,
187
+ cache001StorageLarge,
188
+ cache002BuildArtifactLarge,
189
+ cacheRules,
190
+ calculateScore,
191
+ cfg001EnvFileMissing,
192
+ cfg002RequiredValueMissing,
193
+ configRules,
194
+ createDefaultRuleRegistry,
195
+ createFinding,
196
+ createProgram,
197
+ createReportModel,
198
+ dep001LockfileMissing,
199
+ dep002LockfileMismatch,
200
+ dep003PackageManagerMismatch,
201
+ dep004DirectoryInconsistent,
202
+ dependencyRules,
203
+ detectPlatform,
204
+ disk001SpaceLow,
205
+ disk002DeveloperStoragePressure,
206
+ disk003ProjectLocationUnavailable,
207
+ disk004FilesystemReadonly,
208
+ diskRules,
209
+ dispatchCommand,
210
+ env001EmptyPathEntry,
211
+ env002SecretExposure,
212
+ env003DuplicatePath,
213
+ env004ShellPathMismatch,
214
+ environmentRules,
215
+ executeCommand,
216
+ executeSafeCommand,
217
+ formatCliError,
218
+ getScoreBand,
219
+ git001RepositoryMissing,
220
+ git002WorkingTreeDirty,
221
+ git003UntrackedFiles,
222
+ git004BranchDivergence,
223
+ gitRules,
224
+ isDiagnosticCategory,
225
+ isEvidenceAvailability,
226
+ isFindingConfidence,
227
+ isFindingSeverity,
228
+ isFindingStatus,
229
+ isSupportedPlatform,
230
+ isValidRuleId,
231
+ net001InterfaceUnavailable,
232
+ net002DnsMissing,
233
+ net003ProxySuspicious,
234
+ net004RouteUnavailable,
235
+ networkRules,
236
+ parseRuleId,
237
+ path001ExecutableMissing,
238
+ path002ExecutableMultiple,
239
+ path003EntryInvalid,
240
+ path004OrderShadowing,
241
+ pathRules,
242
+ port001DevConflict,
243
+ port002DuplicateListener,
244
+ port003UnexpectedExposure,
245
+ port004ProcessUnavailable,
246
+ portRules,
247
+ proc001ResourceHog,
248
+ proc002MemoryHog,
249
+ proc003Zombie,
250
+ proc004Duplicate,
251
+ processRules,
252
+ proj001ManifestMissing,
253
+ proj002LockfileMissing,
254
+ proj003RuntimePolicyMissing,
255
+ proj004RootAmbiguous,
256
+ projectRules,
257
+ registerGlobalOptions,
258
+ resolveAndValidatePath,
259
+ resolvePlatformAdapter,
260
+ run001NodeUnavailable,
261
+ run002NodeUnpinned,
262
+ run003PythonUnavailable,
263
+ run004PythonUnpinned,
264
+ run005JavaUnavailable,
265
+ run006VersionMismatch,
266
+ runCli,
267
+ runtimeRules,
268
+ sys001MemoryPressure,
269
+ sys002CpuPressure,
270
+ sys003UptimeShort,
271
+ sys004ArchitectureMismatch,
272
+ sys005PlatformSupported,
273
+ systemRules,
274
+ tool001GitUnavailable,
275
+ tool002PackageManagerMismatch,
276
+ tool003PackageManagerMissing,
277
+ tool004DockerUnavailable,
278
+ tool005ExecutableShadowing,
279
+ toolRules,
280
+ ver001RuntimeConflict,
281
+ ver002ToolConflict,
282
+ ver003ProjectRuntimeUnsatisfied,
283
+ ver004ToolOutdated,
284
+ versionRules
285
+ };
286
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/domain/evidence.ts"],"sourcesContent":["import type { DiagnosticCategory } from './category.js';\n\n/**\n * Authoritative evidence availability states.\n * Adheres to docs/DETECTION-ENGINE.md Section 7.\n */\nexport const EVIDENCE_AVAILABILITIES = [\n 'AVAILABLE',\n 'UNAVAILABLE',\n 'FAILED',\n 'NOT_APPLICABLE',\n] as const;\n\nexport type EvidenceAvailability = (typeof EVIDENCE_AVAILABILITIES)[number];\n\nexport function isEvidenceAvailability(value: unknown): value is EvidenceAvailability {\n return (\n typeof value === 'string' && (EVIDENCE_AVAILABILITIES as readonly string[]).includes(value)\n );\n}\n\n/**\n * Primitive metadata value types safe for evidence representation without secret exposure.\n */\nexport type EvidenceMetadataValue = string | number | boolean;\n\n/**\n * Represents a single normalized piece of collected diagnostic evidence.\n * Adheres to docs/DETECTION-ENGINE.md Section 8-9.\n */\nexport interface EvidenceItem<T = unknown> {\n readonly key: string;\n readonly source: string;\n readonly type?: string;\n readonly availability: EvidenceAvailability;\n readonly value?: T;\n readonly unit?: string;\n readonly metadata?: Readonly<Record<string, EvidenceMetadataValue>>;\n}\n\n/**\n * Structured evidence attached to a diagnostic finding explaining why the rule produced its result.\n * Adheres to docs/DETECTION-ENGINE.md Section 28.\n */\nexport interface FindingEvidence {\n readonly items: readonly EvidenceItem[];\n readonly details?: Readonly<Record<string, EvidenceMetadataValue | readonly string[]>>;\n}\n\n/**\n * Collection of evidence items grouped by category or collector scope.\n * Adheres to docs/DETECTION-ENGINE.md Section 5.\n */\nexport interface EvidenceSet {\n readonly category?: DiagnosticCategory;\n readonly items: readonly EvidenceItem[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIO,SAAS,uBAAuB,OAA+C;AACpF,SACE,OAAO,UAAU,YAAa,wBAA8C,SAAS,KAAK;AAE9F;","names":[]}
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "yowtf",
3
+ "version": "0.1.0",
4
+ "description": "Your Operating Workstation Trouble Finder",
5
+ "keywords": [
6
+ "cli",
7
+ "developer-tools",
8
+ "diagnostics",
9
+ "troubleshooting",
10
+ "workstation-health",
11
+ "doctor"
12
+ ],
13
+ "author": "YOWTF Contributors",
14
+ "license": "MIT",
15
+ "type": "module",
16
+ "bin": {
17
+ "yowtf": "dist/cli.js"
18
+ },
19
+ "main": "./dist/index.js",
20
+ "types": "./dist/index.d.ts",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/isthatpratham/yowtf.git"
24
+ },
25
+ "bugs": {
26
+ "url": "https://github.com/isthatpratham/yowtf/issues"
27
+ },
28
+ "homepage": "https://github.com/isthatpratham/yowtf#readme",
29
+ "files": [
30
+ "dist",
31
+ "README.md",
32
+ "LICENSE"
33
+ ],
34
+ "engines": {
35
+ "node": ">=20.0.0"
36
+ },
37
+ "scripts": {
38
+ "build": "tsup",
39
+ "dev": "tsup --watch",
40
+ "test": "vitest run",
41
+ "test:watch": "vitest",
42
+ "typecheck": "tsc --noEmit",
43
+ "lint": "eslint .",
44
+ "lint:fix": "eslint . --fix",
45
+ "format": "prettier --write .",
46
+ "format:check": "prettier --check ."
47
+ },
48
+ "dependencies": {
49
+ "boxen": "^8.0.1",
50
+ "chalk": "^5.4.1",
51
+ "cli-table3": "^0.6.5",
52
+ "commander": "^13.1.0",
53
+ "ora": "^8.2.0"
54
+ },
55
+ "devDependencies": {
56
+ "@eslint/js": "^9.21.0",
57
+ "@types/node": "^20.17.19",
58
+ "eslint": "^9.21.0",
59
+ "prettier": "^3.5.2",
60
+ "tsup": "^8.4.0",
61
+ "typescript": "^5.7.3",
62
+ "typescript-eslint": "^8.25.0",
63
+ "vitest": "^3.0.7"
64
+ }
65
+ }