@irfanshadikrishad/anilist 1.7.0 → 2.0.0-forbidden

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
@@ -8,69 +8,69 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { Command } from "commander";
12
- import process from "process";
13
- import { Auth, Social } from "./helpers/auth.js";
14
- import { AniList, MoveTo } from "./helpers/lists.js";
15
- import { getCurrentPackageVersion } from "./helpers/workers.js";
11
+ import { Command } from 'commander';
12
+ import process from 'process';
13
+ import { Auth, Social } from './helpers/auth.js';
14
+ import { AniList } from './helpers/lists.js';
15
+ import { getCurrentPackageVersion } from './helpers/workers.js';
16
16
  const cli = new Command();
17
17
  cli
18
- .name("anilist")
19
- .description("Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts.")
18
+ .name('anilist')
19
+ .description('Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts.')
20
20
  .version(getCurrentPackageVersion());
21
21
  cli
22
- .command("login")
23
- .description("Login with AniList")
24
- .requiredOption("-i, --id <number>", null)
25
- .requiredOption("-s, --secret <string>", null)
22
+ .command('login')
23
+ .description('Login with AniList')
24
+ .requiredOption('-i, --id <number>', null)
25
+ .requiredOption('-s, --secret <string>', null)
26
26
  .action((_a) => __awaiter(void 0, [_a], void 0, function* ({ id, secret }) {
27
27
  if (id && secret) {
28
28
  yield Auth.Login(id, secret);
29
29
  }
30
30
  else {
31
- console.log("\nMust provide both ClientId and ClientSecret!");
31
+ console.log('\nMust provide both ClientId and ClientSecret!');
32
32
  }
33
33
  }));
34
34
  cli
35
- .command("whoami")
36
- .description("Get details of the logged in user")
35
+ .command('whoami')
36
+ .description('Get details of the logged in user')
37
37
  .action(() => __awaiter(void 0, void 0, void 0, function* () {
38
38
  yield Auth.Myself();
39
39
  }));
40
40
  cli
41
- .command("trending")
42
- .alias("tr")
43
- .description("Get the trending list from AniList")
44
- .option("-c, --count <number>", "Number of list items to get", "10")
41
+ .command('trending')
42
+ .alias('tr')
43
+ .description('Get the trending list from AniList')
44
+ .option('-c, --count <number>', 'Number of list items to get', '10')
45
45
  .action((_a) => __awaiter(void 0, [_a], void 0, function* ({ count }) {
46
46
  yield AniList.getTrendingAnime(Number(count));
47
47
  }));
48
48
  cli
49
- .command("popular")
50
- .alias("plr")
51
- .description("Get the popular list from AniList")
52
- .option("-c, --count <number>", "Number of list items to get", "10")
49
+ .command('popular')
50
+ .alias('plr')
51
+ .description('Get the popular list from AniList')
52
+ .option('-c, --count <number>', 'Number of list items to get', '10')
53
53
  .action((_a) => __awaiter(void 0, [_a], void 0, function* ({ count }) {
54
54
  yield AniList.getPopularAnime(Number(count));
55
55
  }));
56
56
  cli
57
- .command("user <username>")
58
- .description("Get user information")
57
+ .command('user <username>')
58
+ .description('Get user information')
59
59
  .action((username) => __awaiter(void 0, void 0, void 0, function* () {
60
60
  yield AniList.getUserByUsername(username);
61
61
  }));
62
62
  cli
63
- .command("logout")
64
- .description("Log out the current user.")
63
+ .command('logout')
64
+ .description('Log out the current user.')
65
65
  .action(() => __awaiter(void 0, void 0, void 0, function* () {
66
66
  yield Auth.Logout();
67
67
  }));
68
68
  cli
69
- .command("lists")
70
- .alias("ls")
71
- .description("Get anime or manga list of authenticated user.")
72
- .option("-a, --anime", "For anime list of authenticated user", false)
73
- .option("-m, --manga", "For manga list of authenticated user", false)
69
+ .command('lists')
70
+ .alias('ls')
71
+ .description('Get anime or manga list of authenticated user.')
72
+ .option('-a, --anime', 'For anime list of authenticated user', false)
73
+ .option('-m, --manga', 'For manga list of authenticated user', false)
74
74
  .action((_a) => __awaiter(void 0, [_a], void 0, function* ({ anime, manga }) {
75
75
  if ((!anime && !manga) || (anime && manga)) {
76
76
  console.error(`\nMust select an option, either --anime or --manga`);
@@ -83,12 +83,12 @@ cli
83
83
  }
84
84
  }));
85
85
  cli
86
- .command("delete")
87
- .alias("del")
88
- .description("Delete entire collections of anime or manga")
89
- .option("-a, --anime", "For anime list of authenticated user", false)
90
- .option("-m, --manga", "For manga list of authenticated user", false)
91
- .option("-s, --activity", "For activity of authenticated user", false)
86
+ .command('delete')
87
+ .alias('del')
88
+ .description('Delete entire collections of anime or manga')
89
+ .option('-a, --anime', 'For anime list of authenticated user', false)
90
+ .option('-m, --manga', 'For manga list of authenticated user', false)
91
+ .option('-s, --activity', 'For activity of authenticated user', false)
92
92
  .action((_a) => __awaiter(void 0, [_a], void 0, function* ({ anime, manga, activity }) {
93
93
  const selectedOptions = [anime, manga, activity].filter(Boolean).length;
94
94
  if (selectedOptions === 0) {
@@ -110,16 +110,16 @@ cli
110
110
  }
111
111
  }));
112
112
  cli
113
- .command("upcoming")
114
- .alias("up")
115
- .description("Anime that will be released in upcoming season")
116
- .option("-c, --count <number>", "Number of items to get", "10")
113
+ .command('upcoming')
114
+ .alias('up')
115
+ .description('Anime that will be released in upcoming season')
116
+ .option('-c, --count <number>', 'Number of items to get', '10')
117
117
  .action((_a) => __awaiter(void 0, [_a], void 0, function* ({ count }) {
118
118
  yield AniList.getUpcomingAnime(Number(count));
119
119
  }));
120
120
  cli
121
- .command("anime <id>")
122
- .description("Get anime details by their ID")
121
+ .command('anime <id>')
122
+ .description('Get anime details by their ID')
123
123
  .action((id) => __awaiter(void 0, void 0, void 0, function* () {
124
124
  if (id && !Number.isNaN(Number(id))) {
125
125
  yield AniList.getAnimeDetailsByID(Number(id));
@@ -129,20 +129,20 @@ cli
129
129
  }
130
130
  }));
131
131
  cli
132
- .command("manga <id>")
133
- .description("Get manga details by their ID")
134
- .option("-c, --count <number>", "Number of items to get", "10")
132
+ .command('manga <id>')
133
+ .description('Get manga details by their ID')
134
+ .option('-c, --count <number>', 'Number of items to get', '10')
135
135
  .action((id) => __awaiter(void 0, void 0, void 0, function* () {
136
136
  yield AniList.getMangaDetailsByID(id);
137
137
  }));
138
138
  cli
139
- .command("search <query>")
140
- .alias("srch")
141
- .alias("find")
142
- .description("Search anime or manga.")
143
- .option("-a, --anime", "To get the anime search results.", false)
144
- .option("-m, --manga", "To get the manga search results.", false)
145
- .option("-c, --count <number>", "Number of search results to show.", "10")
139
+ .command('search <query>')
140
+ .alias('srch')
141
+ .alias('find')
142
+ .description('Search anime or manga.')
143
+ .option('-a, --anime', 'To get the anime search results.', false)
144
+ .option('-m, --manga', 'To get the manga search results.', false)
145
+ .option('-c, --count <number>', 'Number of search results to show.', '10')
146
146
  .action((query_1, _a) => __awaiter(void 0, [query_1, _a], void 0, function* (query, { anime, manga, count }) {
147
147
  if ((!anime && !manga) || (anime && manga)) {
148
148
  console.error(`\nMust select an option, either --anime or --manga`);
@@ -160,19 +160,19 @@ cli
160
160
  }
161
161
  }));
162
162
  cli
163
- .command("status <status>")
164
- .alias("post")
165
- .alias("write")
166
- .description("Write a status...")
163
+ .command('status <status>')
164
+ .alias('post')
165
+ .alias('write')
166
+ .description('Write a status...')
167
167
  .action((status) => __awaiter(void 0, void 0, void 0, function* () {
168
168
  yield Auth.Write(status);
169
169
  }));
170
170
  cli
171
- .command("export")
172
- .alias("exp")
173
- .description("Export your anime or manga list.")
174
- .option("-a, --anime", "To get the anime search results.", false)
175
- .option("-m, --manga", "To get the manga search results.", false)
171
+ .command('export')
172
+ .alias('exp')
173
+ .description('Export your anime or manga list.')
174
+ .option('-a, --anime', 'To get the anime search results.', false)
175
+ .option('-m, --manga', 'To get the manga search results.', false)
176
176
  .action((_a) => __awaiter(void 0, [_a], void 0, function* ({ anime, manga }) {
177
177
  if ((!anime && !manga) || (anime && manga)) {
178
178
  console.error(`\nMust select an option, either --anime or --manga`);
@@ -187,11 +187,11 @@ cli
187
187
  }
188
188
  }));
189
189
  cli
190
- .command("import")
191
- .alias("imp")
192
- .description("Import your anime or manga from anilist or other sources.")
193
- .option("-a, --anime", "To get the anime search results.", false)
194
- .option("-m, --manga", "To get the manga search results.", false)
190
+ .command('import')
191
+ .alias('imp')
192
+ .description('Import your anime or manga from anilist or other sources.')
193
+ .option('-a, --anime', 'To get the anime search results.', false)
194
+ .option('-m, --manga', 'To get the manga search results.', false)
195
195
  .action((_a) => __awaiter(void 0, [_a], void 0, function* ({ anime, manga }) {
196
196
  if ((!anime && !manga) || (anime && manga)) {
197
197
  console.error(`\nMust select an option, either --anime or --manga`);
@@ -211,11 +211,18 @@ cli
211
211
  }
212
212
  }));
213
213
  cli
214
- .command("social")
215
- .alias("sol")
216
- .description("Automate your process")
217
- .option("-f, --follow", "Follow the user whos following you.", false)
218
- .option("-u, --unfollow", "Unfollow the user whos not following you.", false)
214
+ .command('autolike')
215
+ .alias('al')
216
+ .description('Autolike following or global activities.')
217
+ .action(() => __awaiter(void 0, void 0, void 0, function* () {
218
+ yield Auth.AutoLike();
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)
219
226
  .action((_a) => __awaiter(void 0, [_a], void 0, function* ({ follow, unfollow }) {
220
227
  if (!follow && !unfollow) {
221
228
  console.error(`\nMust select an option, either --follow or --unfollow`);
@@ -234,25 +241,4 @@ cli
234
241
  }
235
242
  }
236
243
  }));
237
- cli
238
- .command("move")
239
- .alias("mv")
240
- .description("Move anime or manga from one list to another")
241
- .option("-a, --anime", "To move anime lists.", false)
242
- .option("-m, --manga", "To move manga lists.", false)
243
- .action((_a) => __awaiter(void 0, [_a], void 0, function* ({ anime, manga }) {
244
- if (!(yield Auth.isLoggedIn())) {
245
- console.error(`\nPlease login to use this feature.`);
246
- process.exit(1);
247
- }
248
- if ((!anime && !manga) || (anime && manga)) {
249
- console.error(`\nMust select an option, either --anime or --manga`);
250
- }
251
- if (anime) {
252
- yield MoveTo.AnimeList();
253
- }
254
- else if (manga) {
255
- yield MoveTo.MangaList();
256
- }
257
- }));
258
244
  cli.parse(process.argv);
package/package.json CHANGED
@@ -1,86 +1,89 @@
1
1
  {
2
- "name": "@irfanshadikrishad/anilist",
3
- "description": "Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts",
4
- "author": "Irfan Shadik Rishad",
5
- "version": "1.7.0",
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
- "build:watch": "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.27.2",
58
- "@eslint/js": "^9.28.0",
59
- "@types/jest": "^29.5.14",
60
- "@types/node": "^24.0.0",
61
- "@types/papaparse": "^5.3.16",
62
- "@types/xml2js": "^0.4.14",
63
- "@typescript-eslint/eslint-plugin": "^8.34.0",
64
- "eslint": "^9.28.0",
65
- "globals": "^16.2.0",
66
- "jest": "^29.0.0",
67
- "prettier": "^3.5.3",
68
- "prettier-plugin-organize-imports": "^4.1.0",
69
- "ts-jest": "^29.3.4",
70
- "ts-node": "^10.9.2",
71
- "typescript": "^5.8.3"
72
- },
73
- "dependencies": {
74
- "@irfanshadikrishad/cipher": "^1.2.0",
75
- "cli-truncate": "^4.0.0",
76
- "commander": "^14.0.0",
77
- "fast-xml-parser": "^5.2.5",
78
- "inquirer": "^12.6.3",
79
- "jsonrepair": "^3.12.0",
80
- "node-fetch": "^3.3.2",
81
- "open": "^10.1.2",
82
- "papaparse": "^5.5.3",
83
- "tiny-spinner": "^2.0.5",
84
- "xml2js": "^0.6.2"
85
- }
2
+ "name": "@irfanshadikrishad/anilist",
3
+ "description": "Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts",
4
+ "author": "Irfan Shadik Rishad",
5
+ "version": "2.0.0-forbidden",
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
+ "build:watch": "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
+ "prettier": "@irfanshadikrishad/prettier",
57
+ "devDependencies": {
58
+ "@babel/preset-env": "^7.28.0",
59
+ "@eslint/js": "^9.31.0",
60
+ "@irfanshadikrishad/prettier": "^1.1.0",
61
+ "@types/jest": "^30.0.0",
62
+ "@types/node": "^24.0.14",
63
+ "@types/papaparse": "^5.3.16",
64
+ "@types/xml2js": "^0.4.14",
65
+ "@typescript-eslint/eslint-plugin": "^8.37.0",
66
+ "eslint": "^9.31.0",
67
+ "globals": "^16.3.0",
68
+ "jest": "^30.0.4",
69
+ "prettier": "^3.6.2",
70
+ "prettier-plugin-organize-imports": "^4.1.0",
71
+ "ts-jest": "^29.4.0",
72
+ "ts-node": "^10.9.2",
73
+ "typescript": "^5.8.3"
74
+ },
75
+ "dependencies": {
76
+ "@irfanshadikrishad/cipher": "^1.3.0",
77
+ "chalk": "^5.4.1",
78
+ "cli-truncate": "^4.0.0",
79
+ "commander": "^14.0.0",
80
+ "fast-xml-parser": "^5.2.5",
81
+ "inquirer": "^12.7.0",
82
+ "jsonrepair": "^3.13.0",
83
+ "node-fetch": "^3.3.2",
84
+ "open": "^10.2.0",
85
+ "papaparse": "^5.5.3",
86
+ "tiny-spinner": "^2.0.5",
87
+ "xml2js": "^0.6.2"
88
+ }
86
89
  }
package/CITATION.cff DELETED
@@ -1,8 +0,0 @@
1
- cff-version: 1.2.0
2
- message: "If you use this software, please cite it as below."
3
- title: "@irfanshadikrishad/anilist"
4
- authors:
5
- - name: "Irfan Shadik Rishad"
6
- orcid: "0009-0001-6745-5291"
7
- date-released: "2024-10-12"
8
- repository-code: "https://github.com/irfanshadikrishad/anilist"