devkill 0.12.2
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/LICENSE +21 -0
- package/README.es.md +253 -0
- package/README.id.md +238 -0
- package/README.md +377 -0
- package/README.pt.md +241 -0
- package/README.tr.md +242 -0
- package/lib/cli/cli.controller.d.ts +81 -0
- package/lib/cli/cli.controller.js +760 -0
- package/lib/cli/cli.controller.js.map +1 -0
- package/lib/cli/interfaces/cli-options.interface.d.ts +5 -0
- package/lib/cli/interfaces/cli-options.interface.js +2 -0
- package/lib/cli/interfaces/cli-options.interface.js.map +1 -0
- package/lib/cli/interfaces/command-keys.interface.d.ts +17 -0
- package/lib/cli/interfaces/command-keys.interface.js +2 -0
- package/lib/cli/interfaces/command-keys.interface.js.map +1 -0
- package/lib/cli/interfaces/config.interface.d.ts +17 -0
- package/lib/cli/interfaces/config.interface.js +2 -0
- package/lib/cli/interfaces/config.interface.js.map +1 -0
- package/lib/cli/interfaces/index.d.ts +11 -0
- package/lib/cli/interfaces/index.js +12 -0
- package/lib/cli/interfaces/index.js.map +1 -0
- package/lib/cli/interfaces/json-output.interface.d.ts +30 -0
- package/lib/cli/interfaces/json-output.interface.js +2 -0
- package/lib/cli/interfaces/json-output.interface.js.map +1 -0
- package/lib/cli/interfaces/key-press.interface.d.ts +7 -0
- package/lib/cli/interfaces/key-press.interface.js +2 -0
- package/lib/cli/interfaces/key-press.interface.js.map +1 -0
- package/lib/cli/interfaces/node-version.interface.d.ts +5 -0
- package/lib/cli/interfaces/node-version.interface.js +2 -0
- package/lib/cli/interfaces/node-version.interface.js.map +1 -0
- package/lib/cli/interfaces/stats.interface.d.ts +15 -0
- package/lib/cli/interfaces/stats.interface.js +2 -0
- package/lib/cli/interfaces/stats.interface.js.map +1 -0
- package/lib/cli/interfaces/ui-positions.interface.d.ts +5 -0
- package/lib/cli/interfaces/ui-positions.interface.js +2 -0
- package/lib/cli/interfaces/ui-positions.interface.js.map +1 -0
- package/lib/cli/interfaces/version.interface.d.ts +5 -0
- package/lib/cli/interfaces/version.interface.js +2 -0
- package/lib/cli/interfaces/version.interface.js.map +1 -0
- package/lib/cli/models/start-parameters.model.d.ts +7 -0
- package/lib/cli/models/start-parameters.model.js +25 -0
- package/lib/cli/models/start-parameters.model.js.map +1 -0
- package/lib/cli/services/console.service.d.ts +23 -0
- package/lib/cli/services/console.service.js +87 -0
- package/lib/cli/services/console.service.js.map +1 -0
- package/lib/cli/services/https.service.d.ts +4 -0
- package/lib/cli/services/https.service.js +32 -0
- package/lib/cli/services/https.service.js.map +1 -0
- package/lib/cli/services/index.d.ts +7 -0
- package/lib/cli/services/index.js +8 -0
- package/lib/cli/services/index.js.map +1 -0
- package/lib/cli/services/json-output.service.d.ts +20 -0
- package/lib/cli/services/json-output.service.js +101 -0
- package/lib/cli/services/json-output.service.js.map +1 -0
- package/lib/cli/services/results.service.d.ts +13 -0
- package/lib/cli/services/results.service.js +61 -0
- package/lib/cli/services/results.service.js.map +1 -0
- package/lib/cli/services/scan.service.d.ts +13 -0
- package/lib/cli/services/scan.service.js +79 -0
- package/lib/cli/services/scan.service.js.map +1 -0
- package/lib/cli/services/spinner.service.d.ts +9 -0
- package/lib/cli/services/spinner.service.js +27 -0
- package/lib/cli/services/spinner.service.js.map +1 -0
- package/lib/cli/services/ui.service.d.ts +17 -0
- package/lib/cli/services/ui.service.js +59 -0
- package/lib/cli/services/ui.service.js.map +1 -0
- package/lib/cli/services/update.service.d.ts +15 -0
- package/lib/cli/services/update.service.js +37 -0
- package/lib/cli/services/update.service.js.map +1 -0
- package/lib/cli/ui/base.ui.d.ts +28 -0
- package/lib/cli/ui/base.ui.js +49 -0
- package/lib/cli/ui/base.ui.js.map +1 -0
- package/lib/cli/ui/components/general.ui.d.ts +7 -0
- package/lib/cli/ui/components/general.ui.js +13 -0
- package/lib/cli/ui/components/general.ui.js.map +1 -0
- package/lib/cli/ui/components/header/header-ui.constants.d.ts +7 -0
- package/lib/cli/ui/components/header/header-ui.constants.js +7 -0
- package/lib/cli/ui/components/header/header-ui.constants.js.map +1 -0
- package/lib/cli/ui/components/header/header.ui.d.ts +18 -0
- package/lib/cli/ui/components/header/header.ui.js +96 -0
- package/lib/cli/ui/components/header/header.ui.js.map +1 -0
- package/lib/cli/ui/components/header/stats.ui.d.ts +25 -0
- package/lib/cli/ui/components/header/stats.ui.js +198 -0
- package/lib/cli/ui/components/header/stats.ui.js.map +1 -0
- package/lib/cli/ui/components/header/status.ui.d.ts +33 -0
- package/lib/cli/ui/components/header/status.ui.js +188 -0
- package/lib/cli/ui/components/header/status.ui.js.map +1 -0
- package/lib/cli/ui/components/help/help-command.ui.d.ts +9 -0
- package/lib/cli/ui/components/help/help-command.ui.js +61 -0
- package/lib/cli/ui/components/help/help-command.ui.js.map +1 -0
- package/lib/cli/ui/components/help/help.constants.d.ts +8 -0
- package/lib/cli/ui/components/help/help.constants.js +270 -0
- package/lib/cli/ui/components/help/help.constants.js.map +1 -0
- package/lib/cli/ui/components/help/help.ui.d.ts +30 -0
- package/lib/cli/ui/components/help/help.ui.js +176 -0
- package/lib/cli/ui/components/help/help.ui.js.map +1 -0
- package/lib/cli/ui/components/logs.ui.d.ts +24 -0
- package/lib/cli/ui/components/logs.ui.js +132 -0
- package/lib/cli/ui/components/logs.ui.js.map +1 -0
- package/lib/cli/ui/components/options.ui.d.ts +29 -0
- package/lib/cli/ui/components/options.ui.js +327 -0
- package/lib/cli/ui/components/options.ui.js.map +1 -0
- package/lib/cli/ui/components/profile-picker.ui.d.ts +25 -0
- package/lib/cli/ui/components/profile-picker.ui.js +117 -0
- package/lib/cli/ui/components/profile-picker.ui.js.map +1 -0
- package/lib/cli/ui/components/result-details.ui.d.ts +23 -0
- package/lib/cli/ui/components/result-details.ui.js +182 -0
- package/lib/cli/ui/components/result-details.ui.js.map +1 -0
- package/lib/cli/ui/components/results.ui.d.ts +86 -0
- package/lib/cli/ui/components/results.ui.js +620 -0
- package/lib/cli/ui/components/results.ui.js.map +1 -0
- package/lib/cli/ui/components/warning.ui.d.ts +12 -0
- package/lib/cli/ui/components/warning.ui.js +30 -0
- package/lib/cli/ui/components/warning.ui.js.map +1 -0
- package/lib/cli/ui/heavy.ui.d.ts +18 -0
- package/lib/cli/ui/heavy.ui.js +37 -0
- package/lib/cli/ui/heavy.ui.js.map +1 -0
- package/lib/cli/ui/index.d.ts +14 -0
- package/lib/cli/ui/index.js +15 -0
- package/lib/cli/ui/index.js.map +1 -0
- package/lib/constants/cli.constants.d.ts +14 -0
- package/lib/constants/cli.constants.js +138 -0
- package/lib/constants/cli.constants.js.map +1 -0
- package/lib/constants/index.d.ts +8 -0
- package/lib/constants/index.js +9 -0
- package/lib/constants/index.js.map +1 -0
- package/lib/constants/main.constants.d.ts +96 -0
- package/lib/constants/main.constants.js +79 -0
- package/lib/constants/main.constants.js.map +1 -0
- package/lib/constants/messages.constants.d.ts +31 -0
- package/lib/constants/messages.constants.js +37 -0
- package/lib/constants/messages.constants.js.map +1 -0
- package/lib/constants/options.constants.d.ts +6 -0
- package/lib/constants/options.constants.js +8 -0
- package/lib/constants/options.constants.js.map +1 -0
- package/lib/constants/os-service-map.constants.d.ts +10 -0
- package/lib/constants/os-service-map.constants.js +11 -0
- package/lib/constants/os-service-map.constants.js.map +1 -0
- package/lib/constants/result-descriptions.constants.d.ts +142 -0
- package/lib/constants/result-descriptions.constants.js +203 -0
- package/lib/constants/result-descriptions.constants.js.map +1 -0
- package/lib/constants/sort.result.d.ts +6 -0
- package/lib/constants/sort.result.js +22 -0
- package/lib/constants/sort.result.js.map +1 -0
- package/lib/constants/spinner.constants.d.ts +5 -0
- package/lib/constants/spinner.constants.js +88 -0
- package/lib/constants/spinner.constants.js.map +1 -0
- package/lib/constants/status.constants.d.ts +7 -0
- package/lib/constants/status.constants.js +9 -0
- package/lib/constants/status.constants.js.map +1 -0
- package/lib/constants/update.constants.d.ts +2 -0
- package/lib/constants/update.constants.js +3 -0
- package/lib/constants/update.constants.js.map +1 -0
- package/lib/constants/workers.constants.d.ts +14 -0
- package/lib/constants/workers.constants.js +16 -0
- package/lib/constants/workers.constants.js.map +1 -0
- package/lib/core/constants/global-ignored.constants.d.ts +1 -0
- package/lib/core/constants/global-ignored.constants.js +44 -0
- package/lib/core/constants/global-ignored.constants.js.map +1 -0
- package/lib/core/constants/index.d.ts +1 -0
- package/lib/core/constants/index.js +2 -0
- package/lib/core/constants/index.js.map +1 -0
- package/lib/core/constants/profiles.constants.d.ts +8 -0
- package/lib/core/constants/profiles.constants.js +138 -0
- package/lib/core/constants/profiles.constants.js.map +1 -0
- package/lib/core/devkill.d.ts +25 -0
- package/lib/core/devkill.js +129 -0
- package/lib/core/devkill.js.map +1 -0
- package/lib/core/index.d.ts +4 -0
- package/lib/core/index.js +5 -0
- package/lib/core/index.js.map +1 -0
- package/lib/core/interfaces/devkill.interface.d.ts +78 -0
- package/lib/core/interfaces/devkill.interface.js +2 -0
- package/lib/core/interfaces/devkill.interface.js.map +1 -0
- package/lib/core/interfaces/devkillrc-config.interface.d.ts +87 -0
- package/lib/core/interfaces/devkillrc-config.interface.js +12 -0
- package/lib/core/interfaces/devkillrc-config.interface.js.map +1 -0
- package/lib/core/interfaces/file-service.interface.d.ts +76 -0
- package/lib/core/interfaces/file-service.interface.js +2 -0
- package/lib/core/interfaces/file-service.interface.js.map +1 -0
- package/lib/core/interfaces/folder.interface.d.ts +89 -0
- package/lib/core/interfaces/folder.interface.js +2 -0
- package/lib/core/interfaces/folder.interface.js.map +1 -0
- package/lib/core/interfaces/index.d.ts +6 -0
- package/lib/core/interfaces/index.js +7 -0
- package/lib/core/interfaces/index.js.map +1 -0
- package/lib/core/interfaces/logger-service.interface.d.ts +59 -0
- package/lib/core/interfaces/logger-service.interface.js +2 -0
- package/lib/core/interfaces/logger-service.interface.js.map +1 -0
- package/lib/core/interfaces/npkill.interface.d.ts +78 -0
- package/lib/core/interfaces/npkill.interface.js +2 -0
- package/lib/core/interfaces/npkill.interface.js.map +1 -0
- package/lib/core/interfaces/npkillrc-config.interface.d.ts +87 -0
- package/lib/core/interfaces/npkillrc-config.interface.js +12 -0
- package/lib/core/interfaces/npkillrc-config.interface.js.map +1 -0
- package/lib/core/interfaces/profile.interface.d.ts +9 -0
- package/lib/core/interfaces/profile.interface.js +2 -0
- package/lib/core/interfaces/profile.interface.js.map +1 -0
- package/lib/core/interfaces/search-status.model.d.ts +35 -0
- package/lib/core/interfaces/search-status.model.js +48 -0
- package/lib/core/interfaces/search-status.model.js.map +1 -0
- package/lib/core/interfaces/services.interface.d.ts +26 -0
- package/lib/core/interfaces/services.interface.js +2 -0
- package/lib/core/interfaces/services.interface.js.map +1 -0
- package/lib/core/npkill.d.ts +25 -0
- package/lib/core/npkill.js +129 -0
- package/lib/core/npkill.js.map +1 -0
- package/lib/core/services/config/config-merger.d.ts +17 -0
- package/lib/core/services/config/config-merger.js +57 -0
- package/lib/core/services/config/config-merger.js.map +1 -0
- package/lib/core/services/config/config-validator.d.ts +3 -0
- package/lib/core/services/config/config-validator.js +43 -0
- package/lib/core/services/config/config-validator.js.map +1 -0
- package/lib/core/services/config/index.d.ts +4 -0
- package/lib/core/services/config/index.js +5 -0
- package/lib/core/services/config/index.js.map +1 -0
- package/lib/core/services/config/profile-validator.d.ts +6 -0
- package/lib/core/services/config/profile-validator.js +68 -0
- package/lib/core/services/config/profile-validator.js.map +1 -0
- package/lib/core/services/config/property-validators.d.ts +33 -0
- package/lib/core/services/config/property-validators.js +125 -0
- package/lib/core/services/config/property-validators.js.map +1 -0
- package/lib/core/services/config.service.d.ts +37 -0
- package/lib/core/services/config.service.js +100 -0
- package/lib/core/services/config.service.js.map +1 -0
- package/lib/core/services/files/files.service.d.ts +28 -0
- package/lib/core/services/files/files.service.js +207 -0
- package/lib/core/services/files/files.service.js.map +1 -0
- package/lib/core/services/files/files.worker.d.ts +1 -0
- package/lib/core/services/files/files.worker.js +286 -0
- package/lib/core/services/files/files.worker.js.map +1 -0
- package/lib/core/services/files/files.worker.service.d.ts +90 -0
- package/lib/core/services/files/files.worker.service.js +216 -0
- package/lib/core/services/files/files.worker.service.js.map +1 -0
- package/lib/core/services/files/index.d.ts +4 -0
- package/lib/core/services/files/index.js +5 -0
- package/lib/core/services/files/index.js.map +1 -0
- package/lib/core/services/files/unix-files.service.d.ts +9 -0
- package/lib/core/services/files/unix-files.service.js +28 -0
- package/lib/core/services/files/unix-files.service.js.map +1 -0
- package/lib/core/services/files/windows-files.service.d.ts +9 -0
- package/lib/core/services/files/windows-files.service.js +16 -0
- package/lib/core/services/files/windows-files.service.js.map +1 -0
- package/lib/core/services/index.d.ts +5 -0
- package/lib/core/services/index.js +6 -0
- package/lib/core/services/index.js.map +1 -0
- package/lib/core/services/logger.service.d.ts +22 -0
- package/lib/core/services/logger.service.js +84 -0
- package/lib/core/services/logger.service.js.map +1 -0
- package/lib/core/services/profiles.service.d.ts +54 -0
- package/lib/core/services/profiles.service.js +86 -0
- package/lib/core/services/profiles.service.js.map +1 -0
- package/lib/core/services/stream.service.d.ts +12 -0
- package/lib/core/services/stream.service.js +39 -0
- package/lib/core/services/stream.service.js.map +1 -0
- package/lib/dirname.d.ts +2 -0
- package/lib/dirname.js +6 -0
- package/lib/dirname.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -0
- package/lib/main.d.ts +2 -0
- package/lib/main.js +19 -0
- package/lib/main.js.map +1 -0
- package/lib/utils/get-file-content.d.ts +1 -0
- package/lib/utils/get-file-content.js +6 -0
- package/lib/utils/get-file-content.js.map +1 -0
- package/lib/utils/is-safe-to-delete.d.ts +1 -0
- package/lib/utils/is-safe-to-delete.js +9 -0
- package/lib/utils/is-safe-to-delete.js.map +1 -0
- package/lib/utils/unit-conversions.d.ts +11 -0
- package/lib/utils/unit-conversions.js +54 -0
- package/lib/utils/unit-conversions.js.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { DEFAULT_PROFILES } from '../constants/profiles.constants.js';
|
|
2
|
+
/**
|
|
3
|
+
* Service responsible for managing profiles.
|
|
4
|
+
* Handles profile registration, retrieval, and target resolution.
|
|
5
|
+
*/
|
|
6
|
+
export class ProfilesService {
|
|
7
|
+
userDefinedProfiles = {};
|
|
8
|
+
/**
|
|
9
|
+
* Sets user-defined profiles loaded from .npkillrc configuration.
|
|
10
|
+
* @param profiles Record of user-defined profile configurations
|
|
11
|
+
*/
|
|
12
|
+
setUserDefinedProfiles(profiles) {
|
|
13
|
+
this.userDefinedProfiles = profiles;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Gets profiles based on the specified filter type.
|
|
17
|
+
* @param filterType Type of profiles to retrieve:
|
|
18
|
+
* - 'base': Only built-in profiles
|
|
19
|
+
* - 'user': Only user-defined profiles from .npkillrc
|
|
20
|
+
* - 'all': Both base and user-defined (user profiles override base)
|
|
21
|
+
* @returns Record of profiles matching the filter
|
|
22
|
+
*/
|
|
23
|
+
getProfiles(filterType = 'all') {
|
|
24
|
+
switch (filterType) {
|
|
25
|
+
case 'base':
|
|
26
|
+
return DEFAULT_PROFILES;
|
|
27
|
+
case 'user':
|
|
28
|
+
return this.userDefinedProfiles;
|
|
29
|
+
case 'all':
|
|
30
|
+
return { ...DEFAULT_PROFILES, ...this.userDefinedProfiles };
|
|
31
|
+
default:
|
|
32
|
+
return DEFAULT_PROFILES;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Gets a specific profile by name.
|
|
37
|
+
* Searches user-defined profiles first, then base profiles.
|
|
38
|
+
* @param name Name of the profile to retrieve
|
|
39
|
+
* @returns The profile if found, undefined otherwise
|
|
40
|
+
*/
|
|
41
|
+
getProfileByName(name) {
|
|
42
|
+
return this.userDefinedProfiles[name] || DEFAULT_PROFILES[name];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Checks if a profile with the given name exists.
|
|
46
|
+
* @param name Name of the profile to check
|
|
47
|
+
* @returns true if the profile exists, false otherwise
|
|
48
|
+
*/
|
|
49
|
+
hasProfile(name) {
|
|
50
|
+
return this.getProfileByName(name) !== undefined;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Gets the targets from multiple profiles by their names.
|
|
54
|
+
* Combines targets from all specified profiles, removing duplicates.
|
|
55
|
+
* @param profileNames Array of profile names to get targets from
|
|
56
|
+
* @returns Array of unique target directory names
|
|
57
|
+
*/
|
|
58
|
+
getTargetsFromProfiles(profileNames) {
|
|
59
|
+
const targets = new Set();
|
|
60
|
+
for (const name of profileNames) {
|
|
61
|
+
const profile = this.getProfileByName(name);
|
|
62
|
+
if (profile) {
|
|
63
|
+
for (const target of profile.targets) {
|
|
64
|
+
targets.add(target);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return Array.from(targets);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Validates an array of profile names.
|
|
72
|
+
* @param profileNames Array of profile names to validate
|
|
73
|
+
* @returns Array of invalid profile names (profiles that don't exist)
|
|
74
|
+
*/
|
|
75
|
+
getInvalidProfileNames(profileNames) {
|
|
76
|
+
return profileNames.filter((name) => !this.hasProfile(name));
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Gets the default profile name.
|
|
80
|
+
* @returns Name of the default profile
|
|
81
|
+
*/
|
|
82
|
+
getDefaultProfileName() {
|
|
83
|
+
return 'node';
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=profiles.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.service.js","sourceRoot":"","sources":["../../../src/core/services/profiles.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAKtE;;;GAGG;AACH,MAAM,OAAO,eAAe;IAClB,mBAAmB,GAA4B,EAAE,CAAC;IAE1D;;;OAGG;IACH,sBAAsB,CAAC,QAAiC;QACtD,IAAI,CAA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I,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED;;;OAGG;IACH,qBAAqB;QACnB,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ChildProcessWithoutNullStreams } from 'node:child_process';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Service for converting child process streams into RxJS observables.
|
|
5
|
+
* Handles the conversion of stdout/stderr streams to reactive streams
|
|
6
|
+
* for better integration with the application's reactive architecture.
|
|
7
|
+
*/
|
|
8
|
+
export declare class StreamService {
|
|
9
|
+
streamToObservable<T>(stream: ChildProcessWithoutNullStreams): Observable<T>;
|
|
10
|
+
getStream<T>(child: ChildProcessWithoutNullStreams): Observable<T>;
|
|
11
|
+
private setEncoding;
|
|
12
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { STREAM_ENCODING } from '../../constants/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Service for converting child process streams into RxJS observables.
|
|
5
|
+
* Handles the conversion of stdout/stderr streams to reactive streams
|
|
6
|
+
* for better integration with the application's reactive architecture.
|
|
7
|
+
*/
|
|
8
|
+
export class StreamService {
|
|
9
|
+
streamToObservable(stream) {
|
|
10
|
+
const { stdout, stderr } = stream;
|
|
11
|
+
return new Observable((observer) => {
|
|
12
|
+
const dataHandler = (data) => observer.next(data);
|
|
13
|
+
const bashErrorHandler = (error) => observer.error({ ...error, bash: true });
|
|
14
|
+
const errorHandler = (error) => observer.error(error);
|
|
15
|
+
const endHandler = () => observer.complete();
|
|
16
|
+
stdout.addListener('data', dataHandler);
|
|
17
|
+
stdout.addListener('error', errorHandler);
|
|
18
|
+
stdout.addListener('end', endHandler);
|
|
19
|
+
stderr.addListener('data', bashErrorHandler);
|
|
20
|
+
stderr.addListener('error', errorHandler);
|
|
21
|
+
return () => {
|
|
22
|
+
stdout.removeListener('data', dataHandler);
|
|
23
|
+
stdout.removeListener('error', errorHandler);
|
|
24
|
+
stdout.removeListener('end', endHandler);
|
|
25
|
+
stderr.removeListener('data', bashErrorHandler);
|
|
26
|
+
stderr.removeListener('error', errorHandler);
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
getStream(child) {
|
|
31
|
+
this.setEncoding(child, STREAM_ENCODING);
|
|
32
|
+
return this.streamToObservable(child);
|
|
33
|
+
}
|
|
34
|
+
setEncoding(child, encoding) {
|
|
35
|
+
child.stdout.setEncoding(encoding);
|
|
36
|
+
child.stderr.setEncoding(encoding);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=stream.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.service.js","sourceRoot":"","sources":["../../../src/core/services/stream.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D;;;;GAIG;AACH,MAAM,OAAO,aAAa;IACxB,kBAAkB,CAAI,MAAsC;QAC1D,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAElC,OAAO,IAAI,UAAU,CAAI,CAAC,QAAQ,EAAE,EAAE;YACpC,MAAM,WAAW,GAAG,CAAC,IAAI,EAAQ,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACxD,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAQ,EAAE,CACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YAC3C,MAAM,YAAY,GAAG,CAAC,KAAK,EAAQ,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC5D,MAAM,UAAU,GAAG,GAAS,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAA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pC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACjD,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAEpC,eAAe,QAAQ,CAAC"}
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
3
|
+
import main from './main.js';
|
|
4
|
+
// Check if npkill is called directly from the command line. If so, start the
|
|
5
|
+
// cli. If not, the module is being imported by another module, so don't start.
|
|
6
|
+
const shouldStartCli = process.argv[1] === fileURLToPath(import.meta.url);
|
|
7
|
+
if (shouldStartCli) {
|
|
8
|
+
main();
|
|
9
|
+
}
|
|
10
|
+
export * from './core/index.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,6EAA6E;AAC7E,+EAA+E;AAC/E,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1E,IAAI,cAAc,EAAE,CAAC;IACnB,IAAI,EAAE,CAAC;AACT,CAAC;AAED,cAAc,iBAAiB,CAAC"}
|
package/lib/main.d.ts
ADDED
package/lib/main.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ConsoleService, HttpsService, JsonOutputService, ResultsService, SpinnerService, UpdateService, } from './cli/services/index.js';
|
|
2
|
+
import { CliController } from './cli/cli.controller.js';
|
|
3
|
+
import { ScanService } from './cli/services/scan.service.js';
|
|
4
|
+
import { UiService } from './cli/services/ui.service.js';
|
|
5
|
+
import { ConfigService, LoggerService, ProfilesService } from './core/index.js';
|
|
6
|
+
import { Devkill } from './core/index.js';
|
|
7
|
+
import { ScanStatus } from './core/interfaces/search-status.model.js';
|
|
8
|
+
export default () => {
|
|
9
|
+
const logger = new LoggerService();
|
|
10
|
+
const searchStatus = new ScanStatus();
|
|
11
|
+
const resultsService = new ResultsService();
|
|
12
|
+
const configService = new ConfigService();
|
|
13
|
+
const npkill = new Devkill({ logger, searchStatus, resultsService });
|
|
14
|
+
const stdOut = process.stdout;
|
|
15
|
+
const jsonOutputService = new JsonOutputService(stdOut, process.stderr);
|
|
16
|
+
const cli = new CliController(stdOut, npkill, logger, searchStatus, resultsService, new SpinnerService(), new ConsoleService(), new UpdateService(new HttpsService()), new UiService(), new ScanService(npkill), jsonOutputService, new ProfilesService(), configService);
|
|
17
|
+
cli.init();
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=main.js.map
|
package/lib/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,aAAa,GACd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEtE,eAAe,GAAS,EAAE;IACxB,MAAM,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;IACnC,MAAM,YAAY,GAAG,IAAI,UAAU,EAAE,CAAC;IACtC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;IAC5C,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;IAE1C,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAExE,MAAM,GAAG,GAAG,IAAI,aAAa,CAC3B,MAAM,EACN,MAAM,EACN,MAAM,EACN,YAAY,EACZ,cAAc,EACd,IAAI,cAAc,EAAE,EACpB,IAAI,cAAc,EAAE,EACpB,IAAI,aAAa,CAAC,IAAI,YAAY,EAAE,CAAC,EACrC,IAAI,SAAS,EAAE,EACf,IAAI,WAAW,CAAC,MAAM,CAAC,EACvB,iBAAiB,EACjB,IAAI,eAAe,EAAE,EACrB,aAAa,CACd,CAAC;IAEF,GAAG,CAAC,IAAI,EAAE,CAAC;AACb,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getFileContent(path: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-file-content.js","sourceRoot":"","sources":["../../src/utils/get-file-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,MAAM,QAAQ,GAAG,MAAM,CAAC;IACxB,OAAO,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isSafeToDelete(filePath: string, targets: string[]): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as path from 'node:path';
|
|
2
|
+
export function isSafeToDelete(filePath, targets) {
|
|
3
|
+
const lastPath = path.basename(filePath);
|
|
4
|
+
if (!lastPath) {
|
|
5
|
+
return false;
|
|
6
|
+
}
|
|
7
|
+
return targets.some((target) => target === lastPath);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=is-safe-to-delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-safe-to-delete.js","sourceRoot":"","sources":["../../src/utils/is-safe-to-delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,MAAM,UAAU,cAAc,CAAC,QAAgB,EAAE,OAAiB;IAChE,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function convertBytesToKB(bytes: number): number;
|
|
2
|
+
export declare function convertBytesToGb(bytes: number): number;
|
|
3
|
+
export declare function convertGBToMB(gb: number): number;
|
|
4
|
+
export declare function convertGbToKb(gb: number): number;
|
|
5
|
+
export declare function convertGbToBytes(gb: number): number;
|
|
6
|
+
export interface FormattedSize {
|
|
7
|
+
value: number;
|
|
8
|
+
unit: 'MB' | 'GB';
|
|
9
|
+
text: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function formatSize(sizeInGB: number, sizeUnit: 'auto' | 'mb' | 'gb', decimals?: number): FormattedSize;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export function convertBytesToKB(bytes) {
|
|
2
|
+
const factorBytestoKB = 1024;
|
|
3
|
+
return bytes / factorBytestoKB;
|
|
4
|
+
}
|
|
5
|
+
export function convertBytesToGb(bytes) {
|
|
6
|
+
return bytes / 1024 ** 3;
|
|
7
|
+
}
|
|
8
|
+
export function convertGBToMB(gb) {
|
|
9
|
+
const factorGBtoMB = 1024;
|
|
10
|
+
return gb * factorGBtoMB;
|
|
11
|
+
}
|
|
12
|
+
export function convertGbToKb(gb) {
|
|
13
|
+
const factorGBtoKB = 1024 * 1024;
|
|
14
|
+
return gb * factorGBtoKB;
|
|
15
|
+
}
|
|
16
|
+
export function convertGbToBytes(gb) {
|
|
17
|
+
return gb * 1024 ** 3;
|
|
18
|
+
}
|
|
19
|
+
export function formatSize(sizeInGB, sizeUnit, decimals = 2) {
|
|
20
|
+
let value;
|
|
21
|
+
let unit;
|
|
22
|
+
if (sizeUnit === 'gb') {
|
|
23
|
+
value = sizeInGB;
|
|
24
|
+
unit = 'GB';
|
|
25
|
+
}
|
|
26
|
+
else if (sizeUnit === 'mb') {
|
|
27
|
+
value = convertGBToMB(sizeInGB);
|
|
28
|
+
unit = 'MB';
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
// auto
|
|
32
|
+
const sizeInMB = convertGBToMB(sizeInGB);
|
|
33
|
+
if (sizeInMB < 1024) {
|
|
34
|
+
value = sizeInMB;
|
|
35
|
+
unit = 'MB';
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
value = sizeInGB;
|
|
39
|
+
unit = 'GB';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// For MB, round to no use decimals.
|
|
43
|
+
// For GB, use specified decimals.
|
|
44
|
+
let formattedValue;
|
|
45
|
+
if (unit === 'MB') {
|
|
46
|
+
formattedValue = Math.round(value).toString();
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
formattedValue = value.toFixed(decimals);
|
|
50
|
+
}
|
|
51
|
+
const text = `${formattedValue} ${unit}`;
|
|
52
|
+
return { value, unit, text };
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=unit-conversions.js.map
|
|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IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,KAAK,GAAG,QAAQ,CAAC;YACjB,IAAI,GAAG,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,oCAAoC;IACpC,kCAAkC;IAClC,IAAI,cAAsB,CAAC;IAC3B,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC;IAChD,CAAC;SAAM,CAAC;QACN,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,IAAI,GAAG,GAAG,cAAc,IAAI,IAAI,EAAE,CAAC;IAEzC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC/B,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "devkill",
|
|
3
|
+
"version": "0.12.2",
|
|
4
|
+
"description": "Find and clean junk directories (node_modules, venv, build caches) across multiple languages. Interactive CLI to reclaim disk space.",
|
|
5
|
+
"exports": "./lib/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=18.18.0"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"bin": {
|
|
14
|
+
"devkill": "lib/index.js"
|
|
15
|
+
},
|
|
16
|
+
"author": "Nya Garcia & Juan Torres",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/zaldih/npkill.git"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"keywords": [
|
|
23
|
+
"cli",
|
|
24
|
+
"free up space",
|
|
25
|
+
"npm",
|
|
26
|
+
"node",
|
|
27
|
+
"modules",
|
|
28
|
+
"clean",
|
|
29
|
+
"tool",
|
|
30
|
+
"delete",
|
|
31
|
+
"find",
|
|
32
|
+
"interactive"
|
|
33
|
+
],
|
|
34
|
+
"files": [
|
|
35
|
+
"lib/**/*"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc",
|
|
39
|
+
"start": "tsx ./src/index.ts",
|
|
40
|
+
"test": "node --experimental-vm-modules --experimental-modules node_modules/jest/bin/jest.js",
|
|
41
|
+
"test:watch": "npm run test -- --watch",
|
|
42
|
+
"test:mutant": "stryker run",
|
|
43
|
+
"release": "npm run build && np",
|
|
44
|
+
"debug": "TS_NODE_FILES=true node --inspect -r ts-node/register ./src/index.ts",
|
|
45
|
+
"prepare": "husky install",
|
|
46
|
+
"format": "biome format --write .",
|
|
47
|
+
"lint": "biome lint .",
|
|
48
|
+
"check": "biome check --write ."
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"ansi-escapes": "7.1.1",
|
|
52
|
+
"open-file-explorer": "1.0.2",
|
|
53
|
+
"picocolors": "1.1.1"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@biomejs/biome": "1.9.4",
|
|
57
|
+
"@commitlint/config-conventional": "20.0.0",
|
|
58
|
+
"@jest/globals": "30.2.0",
|
|
59
|
+
"@stryker-mutator/core": "9.2.0",
|
|
60
|
+
"@stryker-mutator/jest-runner": "9.2.0",
|
|
61
|
+
"@types/jest": "30.0.0",
|
|
62
|
+
"@types/node": "18.18.0",
|
|
63
|
+
"commitlint": "20.1.0",
|
|
64
|
+
"del": "8.0.1",
|
|
65
|
+
"husky": "9.1.7",
|
|
66
|
+
"jest": "30.2.0",
|
|
67
|
+
"lint-staged": "15.5.2",
|
|
68
|
+
"np": "10.2.0",
|
|
69
|
+
"rimraf": "5.0.10",
|
|
70
|
+
"ts-jest": "29.4.5",
|
|
71
|
+
"ts-node": "10.9.2",
|
|
72
|
+
"tsconfig-paths": "^4.2.0",
|
|
73
|
+
"tsx": "^4.21.0",
|
|
74
|
+
"typescript": "5.8.3"
|
|
75
|
+
},
|
|
76
|
+
"peerDependencies": {
|
|
77
|
+
"rxjs": "^7.8.2"
|
|
78
|
+
},
|
|
79
|
+
"husky": {
|
|
80
|
+
"hooks": {
|
|
81
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
|
|
82
|
+
"pre-commit": "lint-staged"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"commitlint": {
|
|
86
|
+
"extends": [
|
|
87
|
+
"@commitlint/config-conventional"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"lint-staged": {
|
|
91
|
+
"*.{js,ts,css,json,md}": [
|
|
92
|
+
"biome check --write --no-errors-on-unmatched"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"ethereum": "0x7668e86c8bdb52034606db5aa0d2d4d73a0d4259"
|
|
96
|
+
}
|