@kud/soap-cli 3.0.2 → 3.0.4
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 +12 -5
- package/package.json +1 -3
package/dist/index.js
CHANGED
|
@@ -238,7 +238,9 @@ var findAppFiles = async (appName, bundleId) => {
|
|
|
238
238
|
|
|
239
239
|
// index.ts
|
|
240
240
|
$2.verbose = process.env.SOAP_DEBUG === "1";
|
|
241
|
-
var
|
|
241
|
+
var rawArgs = process.argv.slice(2);
|
|
242
|
+
var param = rawArgs.find((a) => !a.startsWith("-"));
|
|
243
|
+
var yes = rawArgs.includes("--yes") || rawArgs.includes("-y");
|
|
242
244
|
var isFlag = param?.startsWith("-");
|
|
243
245
|
if (!param || param === "--help" || param === "-h" || param === "--version" || param === "-v" || isFlag && param !== "--help" && param !== "-h") {
|
|
244
246
|
if (param === "--version" || param === "-v") {
|
|
@@ -260,6 +262,7 @@ if (!param || param === "--help" || param === "-h" || param === "--version" || p
|
|
|
260
262
|
soap ${chalk.green("android-studio")} Uninstall Android Studio (cask)
|
|
261
263
|
soap ${chalk.green("/Applications/Slack.app")}
|
|
262
264
|
Uninstall Slack by path (no brew step)
|
|
265
|
+
soap ${chalk.green("spotify")} ${chalk.cyan("--yes")} Non-interactive: move all files + run brew uninstall
|
|
263
266
|
|
|
264
267
|
${chalk.bold("What it removes:")}
|
|
265
268
|
${chalk.dim("\xB7")} The .app bundle ${chalk.dim("(via brew uninstall --zap or manual selection)")}
|
|
@@ -269,6 +272,9 @@ if (!param || param === "--help" || param === "-h" || param === "--version" || p
|
|
|
269
272
|
${chalk.dim("\xB7")} Containers ${chalk.dim("~/Library/Containers/com.<vendor>.<app>")}
|
|
270
273
|
${chalk.dim("\xB7")} Launch agents, logs, crash reports, DMG files, and more
|
|
271
274
|
|
|
275
|
+
${chalk.bold("Flags:")}
|
|
276
|
+
${chalk.cyan("--yes")}, ${chalk.cyan("-y")} Skip all prompts (auto-select all files, auto-confirm brew uninstall)
|
|
277
|
+
|
|
272
278
|
${chalk.bold("Environment:")}
|
|
273
279
|
${chalk.yellow("SOAP_DEBUG=1")} Enable verbose shell output
|
|
274
280
|
`);
|
|
@@ -286,11 +292,12 @@ if (!param || param === "--help" || param === "-h" || param === "--version" || p
|
|
|
286
292
|
process.exit(1);
|
|
287
293
|
}
|
|
288
294
|
var isCask = !param.includes(".app");
|
|
289
|
-
|
|
290
|
-
|
|
295
|
+
if (!yes)
|
|
296
|
+
console.log(
|
|
297
|
+
`
|
|
291
298
|
Welcome to ${chalk.bold("soap")} \u{1F9FC}, ${chalk.italic("the app cleaner")}.
|
|
292
299
|
`
|
|
293
|
-
);
|
|
300
|
+
);
|
|
294
301
|
try {
|
|
295
302
|
const { appName, zapFiles } = isCask ? await spinner(chalk.dim("Fetching cask info\u2026"), () => getCaskInfo(param)) : { appName: appNameFromPath(param), zapFiles: [] };
|
|
296
303
|
if (!appName) {
|
|
@@ -321,7 +328,7 @@ try {
|
|
|
321
328
|
isCask ? `Mode: ${chalk.bold("cask")} (${param})` : `Mode: ${chalk.bold("path")} \u2014 no Homebrew uninstall will run`
|
|
322
329
|
);
|
|
323
330
|
console.log("");
|
|
324
|
-
const { deletedFilesWish, deletedCaskWish } = await inquirer.prompt([
|
|
331
|
+
const { deletedFilesWish, deletedCaskWish } = yes ? { deletedFilesWish: appFiles, deletedCaskWish: isCask } : await inquirer.prompt([
|
|
325
332
|
{
|
|
326
333
|
type: "checkbox",
|
|
327
334
|
name: "deletedFilesWish",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/soap-cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "An app cleaner cli for macOS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -40,9 +40,7 @@
|
|
|
40
40
|
"dist"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@kud/soap-cli": "1.0.0",
|
|
44
43
|
"chalk": "5.6.2",
|
|
45
|
-
"del": "8.0.1",
|
|
46
44
|
"inquirer": "13.3.2",
|
|
47
45
|
"signale": "1.4.0",
|
|
48
46
|
"trash": "10.1.1",
|