@irfanshadikrishad/anilist 1.0.3 → 1.0.6
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/CHANGELOG.md +10 -0
- package/CODE_OF_CONDUCT.md +43 -0
- package/CONTRIBUTING.md +75 -0
- package/README.md +56 -17
- package/bin/helpers/auth.js +6 -5
- package/bin/helpers/fetcher.js +2 -2
- package/bin/helpers/lists.js +36 -36
- package/bin/helpers/more.d.ts +6 -1
- package/bin/helpers/more.js +208 -18
- package/bin/helpers/mutations.d.ts +4 -1
- package/bin/helpers/mutations.js +19 -1
- package/bin/helpers/queries.d.ts +10 -10
- package/bin/helpers/queries.js +13 -26
- package/bin/helpers/workers.d.ts +15 -1
- package/bin/helpers/workers.js +178 -1
- package/bin/index.js +64 -10
- package/package.json +24 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#### Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
#### Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
#### Our Standards
|
|
8
|
+
|
|
9
|
+
Examples of behavior that contributes to creating a positive environment include:
|
|
10
|
+
|
|
11
|
+
- Using welcoming and inclusive language
|
|
12
|
+
- Being respectful of differing viewpoints and experiences
|
|
13
|
+
- Gracefully accepting constructive criticism
|
|
14
|
+
- Focusing on what is best for the community
|
|
15
|
+
- Showing empathy towards other community members
|
|
16
|
+
|
|
17
|
+
Examples of unacceptable behavior by participants include:
|
|
18
|
+
|
|
19
|
+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
|
20
|
+
- Trolling, insulting/derogatory comments, and personal or political attacks
|
|
21
|
+
- Public or private harassment
|
|
22
|
+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
|
23
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
24
|
+
|
|
25
|
+
#### Our Responsibilities
|
|
26
|
+
|
|
27
|
+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
|
28
|
+
|
|
29
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that do not align with this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project.
|
|
30
|
+
|
|
31
|
+
#### Scope
|
|
32
|
+
|
|
33
|
+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
34
|
+
|
|
35
|
+
#### Enforcement
|
|
36
|
+
|
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [discord](https://discordid.netlify.app/?id=1119275731021725707). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
|
|
38
|
+
|
|
39
|
+
The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
40
|
+
|
|
41
|
+
#### Attribution
|
|
42
|
+
|
|
43
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#### Contribution Guidelines
|
|
2
|
+
|
|
3
|
+
Thank you for considering contributing to **@irfanshadikrishad/anilist**! We welcome contributions from everyone and appreciate your interest in improving the project. Please follow the guidelines below to ensure a smooth contribution process.
|
|
4
|
+
|
|
5
|
+
#### How to Contribute?
|
|
6
|
+
|
|
7
|
+
#### 1. Fork the Repository
|
|
8
|
+
|
|
9
|
+
1. Click the "Fork" button in the top right corner of the repository page.
|
|
10
|
+
2. Clone your forked repository to your local machine:
|
|
11
|
+
```bash
|
|
12
|
+
git clone https://github.com/your-username/anilist.git
|
|
13
|
+
```
|
|
14
|
+
3. Navigate to the project directory:
|
|
15
|
+
```bash
|
|
16
|
+
cd anilist
|
|
17
|
+
```
|
|
18
|
+
4. Set Up the Development Environment
|
|
19
|
+
|
|
20
|
+
1. Install the required dependencies:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
5. Create a New Branch
|
|
27
|
+
Create a new branch for your feature or bug fix:
|
|
28
|
+
```bash
|
|
29
|
+
git checkout -b feature/my-new-feature
|
|
30
|
+
```
|
|
31
|
+
or
|
|
32
|
+
```bash
|
|
33
|
+
git checkout -b fix/my-bug-fix
|
|
34
|
+
```
|
|
35
|
+
6. Make Your Changes
|
|
36
|
+
Make your changes in the codebase. Ensure your code adheres to the project's coding standards and style guide.
|
|
37
|
+
7. Test Your Changes
|
|
38
|
+
Run the tests to ensure everything works as expected:
|
|
39
|
+
```bash
|
|
40
|
+
npm test
|
|
41
|
+
```
|
|
42
|
+
Add new tests if you’re introducing new functionality.
|
|
43
|
+
8. Commit Your Changes
|
|
44
|
+
Commit your changes with a clear and descriptive commit message:
|
|
45
|
+
```bash
|
|
46
|
+
git commit -m "Add new feature: [describe the feature]"
|
|
47
|
+
```
|
|
48
|
+
or for bug fixes:
|
|
49
|
+
```bash
|
|
50
|
+
git commit -m "Fix: [describe the bug fix]"
|
|
51
|
+
```
|
|
52
|
+
9. Push to Your Fork
|
|
53
|
+
Push your changes to your forked repository:
|
|
54
|
+
```bash
|
|
55
|
+
git push origin feature/my-new-feature
|
|
56
|
+
```
|
|
57
|
+
10. Create a Pull Request
|
|
58
|
+
1. Go to the original repository where you want to submit your changes.
|
|
59
|
+
2. Click on the "New Pull Request" button.
|
|
60
|
+
3. Select your branch from the dropdown and submit the pull request.
|
|
61
|
+
4. Provide a clear description of the changes you made and why they are needed.
|
|
62
|
+
|
|
63
|
+
#### Code of Conduct
|
|
64
|
+
|
|
65
|
+
By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md). We expect everyone to be respectful and considerate in their interactions.
|
|
66
|
+
|
|
67
|
+
#### Additional Notes
|
|
68
|
+
|
|
69
|
+
- Issues: If you encounter any issues or have feature requests, please open an issue in the repository.
|
|
70
|
+
- Documentation: Ensure to update the documentation for any new features or changes you introduce.
|
|
71
|
+
- Formatting: Use a linter (like ESLint) to maintain code quality. Run `npm run lint` to check your code.
|
|
72
|
+
|
|
73
|
+
#### Thank You!
|
|
74
|
+
|
|
75
|
+
Your contributions help make @irfanshadikrishad/anilist a better tool for everyone. We appreciate your time and effort in making this project great!
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
####
|
|
1
|
+
#### @irfanshadikrishad/anilist
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts.
|
|
4
4
|
|
|
5
5
|
#### How to install?
|
|
6
6
|
|
|
@@ -39,21 +39,24 @@ here `<client-id>` and `<client-secret>` should be replaced by the ones that you
|
|
|
39
39
|
|
|
40
40
|
#### CLI Commands Overview
|
|
41
41
|
|
|
42
|
-
| **Command**
|
|
43
|
-
|
|
|
44
|
-
| **`login`**
|
|
45
|
-
| **`logout`**
|
|
46
|
-
| **`me`**
|
|
47
|
-
| **`-V, --version`**
|
|
48
|
-
| **`-h, --help`**
|
|
49
|
-
| **`trending`** <br> _(alias: `tr`)_
|
|
50
|
-
| **`popular`** <br> _(alias: `plr`)_
|
|
51
|
-
| **`user`**
|
|
52
|
-
| **`lists`** <br> _(alias: `ls`)_
|
|
53
|
-
| **`delete`** <br> _(alias: `del`)_
|
|
54
|
-
| **`upcoming`** <br> _(alias:`up`)_
|
|
55
|
-
| **`anime`**
|
|
56
|
-
| **`search`** <br> _(alias:`srch`/`find`)_
|
|
42
|
+
| **Command** | **Options** | **Description** |
|
|
43
|
+
| ------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------ |
|
|
44
|
+
| **`login`** | `-i, --id` `-s, --secret` | Log in with your AniList credentials |
|
|
45
|
+
| **`logout`** | _None_ | Log out from your AniList account |
|
|
46
|
+
| **`me`** | _None_ | Display information about the logged-in user |
|
|
47
|
+
| **`-V, --version`** | _None_ | Display the current version of the CLI |
|
|
48
|
+
| **`-h, --help`** | _None_ | Display available commands and options |
|
|
49
|
+
| **`trending`** <br> _(alias: `tr`)_ | `-c (default: 10)` | Fetch trending anime (default count is 10) |
|
|
50
|
+
| **`popular`** <br> _(alias: `plr`)_ | `-c (default: 10)` | Fetch popular anime (default count is 10) |
|
|
51
|
+
| **`user`** | `<username>` | Get information about a specific AniList user |
|
|
52
|
+
| **`lists`** <br> _(alias: `ls`)_ | `-a, --anime` <br> `-m, --manga` | Fetch anime or manga lists of the logged-in user |
|
|
53
|
+
| **`delete`** <br> _(alias: `del`)_ | `-a, --anime` <br> `-m, --manga` <br> `-ac, --activity` | Delete collections of anime, manga or activities |
|
|
54
|
+
| **`upcoming`** <br> _(alias:`up`)_ | `-c (default: 10)` | Fetch upcoming anime (default count is 10) |
|
|
55
|
+
| **`anime`** | `<anime-id>` | Get anime details by Anime Id |
|
|
56
|
+
| **`search`** <br> _(alias:`srch`/`find`)_ | `<query>` <br> `-a, --anime` <br> `-m, --manga` <br> `-c (default: 10)` | Get anime/manga search results |
|
|
57
|
+
| **`status`** <br> _(alias: `write`/`post`)_ | `<status>` | Write a status... (text/markdown/html) |
|
|
58
|
+
| **`export`** <br> _(alias: `exp`)_ | `-a, --anime` <br> `-m, --manga` | Export anime or manga list |
|
|
59
|
+
| **`import`** <br> _(alias: `imp`)_ | `-a, --anime` <br> `-m, --manga` | Import anime or manga list |
|
|
57
60
|
|
|
58
61
|
#### Command Breakdown:
|
|
59
62
|
|
|
@@ -186,8 +189,44 @@ anilist search <query> -a -c 20
|
|
|
186
189
|
- `-c (count)`: Specify how many items to fetch (default: 10).
|
|
187
190
|
- **Description**: Get anime/manga search results
|
|
188
191
|
|
|
192
|
+
#### `status` _(alias: `write`/`post`)_:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
anilist write <status>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
- **Options**:
|
|
199
|
+
- `<status>` : This is what you want to write, It can be HTML, Markdown and/or Text. But wrap it with quotation mark (") else it might get cut-off.
|
|
200
|
+
- **Description**: Get anime/manga search results
|
|
201
|
+
|
|
202
|
+
#### `export` _(alias: `exp`)_:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
anilist export -a
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
- **Options**:
|
|
209
|
+
- `-a, --anime`: To export anime list.
|
|
210
|
+
- `-m, --manga`: To export manga list.
|
|
211
|
+
- **Description**: Export anime or manga list
|
|
212
|
+
|
|
213
|
+
#### `import` _(alias: `imp`)_:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
anilist import -m
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
- **Options**:
|
|
220
|
+
- `-a, --anime`: To import anime list.
|
|
221
|
+
- `-m, --manga`: To import manga list.
|
|
222
|
+
- **Description**: Import anime or manga list
|
|
223
|
+
|
|
189
224
|
#### Security
|
|
190
225
|
|
|
191
226
|
Since you are creating your own API client for login no else else can get your credentials and the generated access token will be stored in your own system. So, As long as you don't share your device (in case you do, just logout) you are safe.
|
|
192
227
|
|
|
228
|
+
#### Contribution
|
|
229
|
+
|
|
230
|
+
Want to contribute to the project? Check out complete guideline [here](CONTRIBUTING.md).
|
|
231
|
+
|
|
193
232
|
#### **_Thanks for visiting 💙_**
|
package/bin/helpers/auth.js
CHANGED
|
@@ -133,12 +133,12 @@ function currentUserInfo() {
|
|
|
133
133
|
return user;
|
|
134
134
|
}
|
|
135
135
|
else {
|
|
136
|
-
console.
|
|
136
|
+
console.error(`\nSomething went wrong. Please log in again. ${errors[0].message}`);
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
else {
|
|
141
|
-
console.
|
|
141
|
+
console.error(`\nPlease login first to use this feature.`);
|
|
142
142
|
return null;
|
|
143
143
|
}
|
|
144
144
|
});
|
|
@@ -158,15 +158,16 @@ function logoutUser() {
|
|
|
158
158
|
return __awaiter(this, void 0, void 0, function* () {
|
|
159
159
|
if (fs.existsSync(save_path)) {
|
|
160
160
|
try {
|
|
161
|
+
const username = yield currentUsersName();
|
|
161
162
|
fs.unlinkSync(save_path);
|
|
162
|
-
console.log(
|
|
163
|
+
console.log(`\nLogout successful. See you soon, ${username}.`);
|
|
163
164
|
}
|
|
164
165
|
catch (error) {
|
|
165
|
-
console.error("
|
|
166
|
+
console.error("\nError logging out:", error);
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
169
|
else {
|
|
169
|
-
console.
|
|
170
|
+
console.error("\nYou may already be logged out.");
|
|
170
171
|
}
|
|
171
172
|
});
|
|
172
173
|
}
|
package/bin/helpers/fetcher.js
CHANGED
|
@@ -41,12 +41,12 @@ function fetcher(query, variables) {
|
|
|
41
41
|
return response;
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
console.error(
|
|
44
|
+
console.error(`\n${request.status} ${(_a = response === null || response === void 0 ? void 0 : response.errors[0]) === null || _a === void 0 ? void 0 : _a.message}.`);
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
catch (error) {
|
|
49
|
-
console.error(
|
|
49
|
+
console.error(`\nSomething went wrong. ${error.message}.`);
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
});
|
package/bin/helpers/lists.js
CHANGED
|
@@ -75,7 +75,7 @@ function getTrending(count) {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
78
|
-
console.error(
|
|
78
|
+
console.error(`\nPlease log in first to use this feature.`);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
else {
|
|
@@ -83,11 +83,11 @@ function getTrending(count) {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
|
-
console.log(
|
|
86
|
+
console.log(`\nSomething went wrong. ${(_d = response === null || response === void 0 ? void 0 : response.errors[0]) === null || _d === void 0 ? void 0 : _d.message}`);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
catch (error) {
|
|
90
|
-
console.log(
|
|
90
|
+
console.log(`\nSomething went wrong. ${error.message}`);
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
}
|
|
@@ -151,19 +151,19 @@ function getPopular(count) {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
else {
|
|
154
|
-
console.error(
|
|
154
|
+
console.error(`\nPlease log in first to use this feature.`);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
else {
|
|
158
|
-
console.log(
|
|
158
|
+
console.log(`\nNo popular available at this moment.`);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
else {
|
|
162
|
-
console.log(
|
|
162
|
+
console.log(`\nSomething went wrong. ${(_d = response === null || response === void 0 ? void 0 : response.errors[0]) === null || _d === void 0 ? void 0 : _d.message}`);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
catch (error) {
|
|
166
|
-
console.log(
|
|
166
|
+
console.log(`\nSomething went wrong. ${error.message}`);
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
169
|
}
|
|
@@ -247,15 +247,15 @@ function loggedInUsersAnimeLists() {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
else {
|
|
250
|
-
console.error(
|
|
250
|
+
console.error(`\nPlease log in first to use this feature.`);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
else {
|
|
254
|
-
console.log(
|
|
254
|
+
console.log(`\nNot available at this moment.`);
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
else {
|
|
258
|
-
console.log("
|
|
258
|
+
console.log("\nNo entries found.");
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
else {
|
|
@@ -263,19 +263,19 @@ function loggedInUsersAnimeLists() {
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
else {
|
|
266
|
-
console.log(
|
|
266
|
+
console.log(`\nSomething went wrong. ${(_e = response === null || response === void 0 ? void 0 : response.errors[0]) === null || _e === void 0 ? void 0 : _e.message}`);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
else {
|
|
270
|
-
console.log(
|
|
270
|
+
console.log(`\nFailed getting current user Id.`);
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
else {
|
|
274
|
-
console.
|
|
274
|
+
console.error(`\nPlease log in first to access your lists.`);
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
catch (error) {
|
|
278
|
-
console.log(
|
|
278
|
+
console.log(`\nSomething went wrong. ${error.message}`);
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
281
|
}
|
|
@@ -365,15 +365,15 @@ function loggedInUsersMangaLists() {
|
|
|
365
365
|
console.log(`\nEntry ${saved.id}. Saved as ${saved.status}.`);
|
|
366
366
|
}
|
|
367
367
|
else {
|
|
368
|
-
console.error(
|
|
368
|
+
console.error(`\nFailed to save the manga. ${((_d = (_c = saveResponse === null || saveResponse === void 0 ? void 0 : saveResponse.errors) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.message) || "Unknown error"}`);
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
else {
|
|
372
|
-
console.error(
|
|
372
|
+
console.error(`\nPlease log in first to use this feature.`);
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
else {
|
|
376
|
-
console.log("
|
|
376
|
+
console.log("\nNo manga entries found in the selected list.");
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
else {
|
|
@@ -381,19 +381,19 @@ function loggedInUsersMangaLists() {
|
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
else {
|
|
384
|
-
console.error(
|
|
384
|
+
console.error(`\nFailed to fetch manga lists. ${((_f = (_e = response === null || response === void 0 ? void 0 : response.errors) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.message) || "Unknown error"}`);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
else {
|
|
388
|
-
console.error(
|
|
388
|
+
console.error(`\nFailed to get the current user ID.`);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
else {
|
|
392
|
-
console.error(
|
|
392
|
+
console.error(`\nPlease log in first to access your lists.`);
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
catch (error) {
|
|
396
|
-
console.error(
|
|
396
|
+
console.error(`\nSomething went wrong. ${error.message}`);
|
|
397
397
|
}
|
|
398
398
|
});
|
|
399
399
|
}
|
|
@@ -451,15 +451,15 @@ function deleteAnimeCollection() {
|
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
else {
|
|
454
|
-
console.log(
|
|
454
|
+
console.log(`\nSomething went wrong. ${(_d = response === null || response === void 0 ? void 0 : response.errors[0]) === null || _d === void 0 ? void 0 : _d.message}`);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
else {
|
|
458
|
-
console.log(
|
|
458
|
+
console.log(`\nFailed getting current user Id.`);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
else {
|
|
462
|
-
console.
|
|
462
|
+
console.error(`\nPlease log in first to delete your lists.`);
|
|
463
463
|
}
|
|
464
464
|
});
|
|
465
465
|
}
|
|
@@ -484,12 +484,12 @@ function deleteAnimeByAnimeId(id, title) {
|
|
|
484
484
|
console.log(`del ${title ? getTitle(title) : ""} ${deleted ? "✅" : "❌"}`);
|
|
485
485
|
}
|
|
486
486
|
else {
|
|
487
|
-
console.log(
|
|
487
|
+
console.log(`\nError deleting anime. ${(_c = response === null || response === void 0 ? void 0 : response.errors[0]) === null || _c === void 0 ? void 0 : _c.message}`);
|
|
488
488
|
console.log(response);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
catch (error) {
|
|
492
|
-
console.log(
|
|
492
|
+
console.log(`\nError deleting anime. ${id} ${error.message}`);
|
|
493
493
|
}
|
|
494
494
|
});
|
|
495
495
|
}
|
|
@@ -539,23 +539,23 @@ function deleteMangaCollection() {
|
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
541
|
else {
|
|
542
|
-
console.
|
|
542
|
+
console.error("\nNo entries found.");
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
else {
|
|
546
|
-
console.
|
|
546
|
+
console.error(`\nNo manga(s) found in any list.`);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
else {
|
|
550
|
-
console.
|
|
550
|
+
console.error(`\nSomething went wrong. ${(_d = response === null || response === void 0 ? void 0 : response.errors[0]) === null || _d === void 0 ? void 0 : _d.message}`);
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
else {
|
|
554
|
-
console.
|
|
554
|
+
console.error(`\nFailed getting current user Id.`);
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
else {
|
|
558
|
-
console.
|
|
558
|
+
console.error(`\nPlease log in first to delete your lists.`);
|
|
559
559
|
}
|
|
560
560
|
});
|
|
561
561
|
}
|
|
@@ -580,12 +580,12 @@ function deleteMangaByMangaId(id, title) {
|
|
|
580
580
|
console.log(`del ${title ? getTitle(title) : ""} ${deleted ? "✅" : "❌"}`);
|
|
581
581
|
}
|
|
582
582
|
else {
|
|
583
|
-
console.log(
|
|
583
|
+
console.log(`\nError deleting manga. ${(_c = response === null || response === void 0 ? void 0 : response.errors[0]) === null || _c === void 0 ? void 0 : _c.message}`);
|
|
584
584
|
console.log(response);
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
587
|
catch (error) {
|
|
588
|
-
console.log(
|
|
588
|
+
console.log(`\nError deleting manga. ${id} ${error.message}`);
|
|
589
589
|
}
|
|
590
590
|
});
|
|
591
591
|
}
|
|
@@ -651,15 +651,15 @@ function getUpcomingAnimes(count) {
|
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
else {
|
|
654
|
-
console.error(
|
|
654
|
+
console.error(`\nPlease log in first to use this feature.`);
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
657
|
else {
|
|
658
|
-
console.error(
|
|
658
|
+
console.error(`\nSomething went wrong. ${(_e = response === null || response === void 0 ? void 0 : response.errors[0]) === null || _e === void 0 ? void 0 : _e.message}`);
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
661
|
catch (error) {
|
|
662
|
-
console.error(
|
|
662
|
+
console.error(`\nError getting upcoming animes. ${error.message}`);
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
665
|
}
|
package/bin/helpers/more.d.ts
CHANGED
|
@@ -3,4 +3,9 @@ declare function getAnimeDetailsByID(anilistID: number): Promise<void>;
|
|
|
3
3
|
declare function getAnimeSearchResults(search: string, count: number): Promise<void>;
|
|
4
4
|
declare function getMangaSearchResults(search: string, count: number): Promise<void>;
|
|
5
5
|
declare function deleteUserActivities(): Promise<void>;
|
|
6
|
-
|
|
6
|
+
declare function writeTextActivity(status: string): Promise<void>;
|
|
7
|
+
declare function exportAnimeList(): Promise<void>;
|
|
8
|
+
declare function exportMangaList(): Promise<void>;
|
|
9
|
+
declare function importAnimeList(): Promise<void>;
|
|
10
|
+
declare function importMangaList(): Promise<void>;
|
|
11
|
+
export { getUserInfoByUsername, getAnimeDetailsByID, getAnimeSearchResults, getMangaSearchResults, deleteUserActivities, writeTextActivity, exportAnimeList, exportMangaList, importAnimeList, importMangaList, };
|