@irfanshadikrishad/anilist 1.0.0-forbidden.2 → 1.0.0-forbidden.3

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/bin/index.js CHANGED
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  import { Command } from "commander";
12
12
  import process from "process";
13
- import { Auth } from "./helpers/auth.js";
13
+ import { Auth, Social } from "./helpers/auth.js";
14
14
  import { AniList } from "./helpers/lists.js";
15
15
  import { getCurrentPackageVersion } from "./helpers/workers.js";
16
16
  const cli = new Command();
@@ -217,4 +217,28 @@ cli
217
217
  yield Auth.AutoLike();
218
218
  }
219
219
  }));
220
+ cli
221
+ .command("social")
222
+ .alias("sol")
223
+ .description("Automate your process")
224
+ .option("-f, --follow", "Follow the user whos following you.", false)
225
+ .option("-u, --unfollow", "Unfollow the user whos not following you.", false)
226
+ .action((_a) => __awaiter(void 0, [_a], void 0, function* ({ follow, unfollow }) {
227
+ if (!follow && !unfollow) {
228
+ console.error(`\nMust select an option, either --follow or --unfollow`);
229
+ }
230
+ else {
231
+ if (yield Auth.isLoggedIn()) {
232
+ if (follow) {
233
+ yield Social.follow();
234
+ }
235
+ else if (unfollow) {
236
+ yield Social.unfollow();
237
+ }
238
+ }
239
+ else {
240
+ console.error(`\nPlease login to use this feature.`);
241
+ }
242
+ }
243
+ }));
220
244
  cli.parse(process.argv);
package/package.json CHANGED
@@ -1,81 +1,84 @@
1
- {
2
- "name": "@irfanshadikrishad/anilist",
3
- "description": "Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts",
4
- "author": "Irfan Shadik Rishad",
5
- "version": "1.0.0-forbidden.2",
6
- "main": "./bin/index.js",
7
- "type": "module",
8
- "types": "./bin/index.d.ts",
9
- "bin": {
10
- "anilist": "./bin/index.js"
11
- },
12
- "publishConfig": {
13
- "access": "public"
14
- },
15
- "scripts": {
16
- "build": "rm -rf ./bin && tsc",
17
- "buildw": "rm -rf ./bin && tsc -w",
18
- "format": "prettier . --write",
19
- "format:check": "prettier . --check",
20
- "lint": "eslint ./dist",
21
- "lint:fix": "eslint ./dist --fix",
22
- "all": "npm run build && npm run lint && npm run lint:fix && npm run format && npm test",
23
- "test": "jest ./tests"
24
- },
25
- "keywords": [
26
- "anilist",
27
- "CLI",
28
- "anime",
29
- "manga",
30
- "anime list",
31
- "manga list",
32
- "anime tracker",
33
- "manga tracker",
34
- "anilist API",
35
- "anime progress",
36
- "manga progress",
37
- "media list",
38
- "export anime",
39
- "import anime",
40
- "export manga",
41
- "import manga",
42
- "status tracker",
43
- "watchlist",
44
- "reading list",
45
- "graphql"
46
- ],
47
- "repository": {
48
- "type": "git",
49
- "url": "https://github.com/irfanshadikrishad/anilist"
50
- },
51
- "homepage": "https://github.com/irfanshadikrishad/anilist",
52
- "bugs": {
53
- "url": "https://github.com/irfanshadikrishad/anilist/issues"
54
- },
55
- "license": "MPL-2.0",
56
- "devDependencies": {
57
- "@babel/preset-env": "^7.26.0",
58
- "@eslint/js": "^9.18.0",
59
- "@types/jest": "^29.5.14",
60
- "@types/json2csv": "^5.0.7",
61
- "@types/node": "^22.10.7",
62
- "@typescript-eslint/eslint-plugin": "^8.20.0",
63
- "eslint": "^9.18.0",
64
- "globals": "^15.14.0",
65
- "jest": "^29.7.0",
66
- "prettier": "^3.4.2",
67
- "prettier-plugin-organize-imports": "^4.1.0",
68
- "ts-jest": "^29.2.5",
69
- "ts-node": "^10.9.2",
70
- "typescript": "^5.7.3"
71
- },
72
- "dependencies": {
73
- "commander": "^13.0.0",
74
- "fast-xml-parser": "^4.5.1",
75
- "inquirer": "^12.3.2",
76
- "json2csv": "^6.0.0-alpha.2",
77
- "jsonrepair": "^3.11.2",
78
- "node-fetch": "^3.3.2",
79
- "open": "^10.1.0"
80
- }
81
- }
1
+ {
2
+ "name": "@irfanshadikrishad/anilist",
3
+ "description": "Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts",
4
+ "author": "Irfan Shadik Rishad",
5
+ "version": "1.0.0-forbidden.3",
6
+ "main": "./bin/index.js",
7
+ "type": "module",
8
+ "types": "./bin/index.d.ts",
9
+ "bin": {
10
+ "anilist": "./bin/index.js"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "scripts": {
16
+ "build": "rm -rf ./bin && tsc",
17
+ "buildw": "rm -rf ./bin && tsc -w",
18
+ "format": "prettier . --write",
19
+ "format:check": "prettier . --check",
20
+ "lint": "eslint ./dist",
21
+ "lint:fix": "eslint ./dist --fix",
22
+ "all": "npm run build && npm run lint && npm run lint:fix && npm run format && npm test",
23
+ "test": "jest ./tests"
24
+ },
25
+ "keywords": [
26
+ "anilist",
27
+ "CLI",
28
+ "anime",
29
+ "manga",
30
+ "anime list",
31
+ "manga list",
32
+ "anime tracker",
33
+ "manga tracker",
34
+ "anilist API",
35
+ "anime progress",
36
+ "manga progress",
37
+ "media list",
38
+ "export anime",
39
+ "import anime",
40
+ "export manga",
41
+ "import manga",
42
+ "status tracker",
43
+ "watchlist",
44
+ "reading list",
45
+ "graphql"
46
+ ],
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "https://github.com/irfanshadikrishad/anilist"
50
+ },
51
+ "homepage": "https://github.com/irfanshadikrishad/anilist",
52
+ "bugs": {
53
+ "url": "https://github.com/irfanshadikrishad/anilist/issues"
54
+ },
55
+ "license": "MPL-2.0",
56
+ "devDependencies": {
57
+ "@babel/preset-env": "^7.26.7",
58
+ "@eslint/js": "^9.19.0",
59
+ "@types/jest": "^29.5.14",
60
+ "@types/node": "^22.12.0",
61
+ "@types/papaparse": "^5.3.15",
62
+ "@types/xml2js": "^0.4.14",
63
+ "@typescript-eslint/eslint-plugin": "^8.22.0",
64
+ "eslint": "^9.19.0",
65
+ "globals": "^15.14.0",
66
+ "jest": "^29.7.0",
67
+ "prettier": "^3.4.2",
68
+ "prettier-plugin-organize-imports": "^4.1.0",
69
+ "ts-jest": "^29.2.5",
70
+ "ts-node": "^10.9.2",
71
+ "typescript": "^5.7.3"
72
+ },
73
+ "dependencies": {
74
+ "commander": "^13.1.0",
75
+ "fast-xml-parser": "^4.5.1",
76
+ "inquirer": "^12.3.3",
77
+ "jsonrepair": "^3.11.2",
78
+ "node-fetch": "^3.3.2",
79
+ "open": "^10.1.0",
80
+ "papaparse": "^5.5.2",
81
+ "tiny-spinner": "^2.0.5",
82
+ "xml2js": "^0.6.2"
83
+ }
84
+ }