anilink-api-wrapper 1.0.0

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.
Files changed (104) hide show
  1. package/.eslintignore +1 -0
  2. package/.github/workflows/code_quality.yml +32 -0
  3. package/.github/workflows/codeql.yml +33 -0
  4. package/.github/workflows/test.yml +30 -0
  5. package/LICENSE +21 -0
  6. package/README.md +1 -0
  7. package/__tests__/anilist.test.ts +268 -0
  8. package/babel.config.js +6 -0
  9. package/dist/AniLink.js +40 -0
  10. package/dist/apis/anilist/interfaces/ActivityHistory.js +2 -0
  11. package/dist/apis/anilist/interfaces/CoverImage.js +2 -0
  12. package/dist/apis/anilist/interfaces/Distribution.js +2 -0
  13. package/dist/apis/anilist/interfaces/ExternalLink.js +2 -0
  14. package/dist/apis/anilist/interfaces/Favoured.js +2 -0
  15. package/dist/apis/anilist/interfaces/FuzzyDate.js +2 -0
  16. package/dist/apis/anilist/interfaces/Image.js +2 -0
  17. package/dist/apis/anilist/interfaces/ListScores.js +2 -0
  18. package/dist/apis/anilist/interfaces/Media.js +2 -0
  19. package/dist/apis/anilist/interfaces/MediaListEntry.js +2 -0
  20. package/dist/apis/anilist/interfaces/MediaStatistics.js +2 -0
  21. package/dist/apis/anilist/interfaces/MediaStats.js +2 -0
  22. package/dist/apis/anilist/interfaces/Name.js +2 -0
  23. package/dist/apis/anilist/interfaces/NextAiringEpisode.js +2 -0
  24. package/dist/apis/anilist/interfaces/Ranking.js +2 -0
  25. package/dist/apis/anilist/interfaces/ScoreDistribution.js +2 -0
  26. package/dist/apis/anilist/interfaces/Staff.js +2 -0
  27. package/dist/apis/anilist/interfaces/Stat.js +2 -0
  28. package/dist/apis/anilist/interfaces/Statistics.js +2 -0
  29. package/dist/apis/anilist/interfaces/Stats.js +2 -0
  30. package/dist/apis/anilist/interfaces/StatusDistribution.js +2 -0
  31. package/dist/apis/anilist/interfaces/StreamingEpisode.js +2 -0
  32. package/dist/apis/anilist/interfaces/Studio.js +2 -0
  33. package/dist/apis/anilist/interfaces/Tag.js +2 -0
  34. package/dist/apis/anilist/interfaces/Title.js +2 -0
  35. package/dist/apis/anilist/interfaces/Trailer.js +2 -0
  36. package/dist/apis/anilist/interfaces/UserStats.js +2 -0
  37. package/dist/apis/anilist/interfaces/responses/AiringSchedule.js +2 -0
  38. package/dist/apis/anilist/interfaces/responses/Character.js +2 -0
  39. package/dist/apis/anilist/interfaces/responses/Media.js +2 -0
  40. package/dist/apis/anilist/interfaces/responses/MediaList.js +2 -0
  41. package/dist/apis/anilist/interfaces/responses/MediaListCollectionResponse.js +2 -0
  42. package/dist/apis/anilist/interfaces/responses/MediaTrend.js +2 -0
  43. package/dist/apis/anilist/interfaces/responses/Staff.js +2 -0
  44. package/dist/apis/anilist/interfaces/responses/User.js +2 -0
  45. package/dist/apis/anilist/mutation/UpdateUser.js +82 -0
  46. package/dist/apis/anilist/query/AiringSchedule.js +147 -0
  47. package/dist/apis/anilist/query/Character.js +69 -0
  48. package/dist/apis/anilist/query/Media.js +232 -0
  49. package/dist/apis/anilist/query/MediaList.js +170 -0
  50. package/dist/apis/anilist/query/MediaListCollection.js +650 -0
  51. package/dist/apis/anilist/query/MediaTrend.js +149 -0
  52. package/dist/apis/anilist/query/Staff.js +108 -0
  53. package/dist/apis/anilist/query/User.js +573 -0
  54. package/dist/base/APIWrapper.js +9 -0
  55. package/dist/base/RequestHandler.js +33 -0
  56. package/jest.config.js +11 -0
  57. package/package.json +31 -0
  58. package/src/AniLink.ts +80 -0
  59. package/src/apis/anilist/interfaces/ActivityHistory.ts +5 -0
  60. package/src/apis/anilist/interfaces/CoverImage.ts +6 -0
  61. package/src/apis/anilist/interfaces/Distribution.ts +4 -0
  62. package/src/apis/anilist/interfaces/ExternalLink.ts +5 -0
  63. package/src/apis/anilist/interfaces/Favoured.ts +15 -0
  64. package/src/apis/anilist/interfaces/FuzzyDate.ts +5 -0
  65. package/src/apis/anilist/interfaces/Image.ts +4 -0
  66. package/src/apis/anilist/interfaces/ListScores.ts +4 -0
  67. package/src/apis/anilist/interfaces/Media.ts +59 -0
  68. package/src/apis/anilist/interfaces/MediaListEntry.ts +4 -0
  69. package/src/apis/anilist/interfaces/MediaStatistics.ts +23 -0
  70. package/src/apis/anilist/interfaces/MediaStats.ts +7 -0
  71. package/src/apis/anilist/interfaces/Name.ts +8 -0
  72. package/src/apis/anilist/interfaces/NextAiringEpisode.ts +5 -0
  73. package/src/apis/anilist/interfaces/Ranking.ts +10 -0
  74. package/src/apis/anilist/interfaces/ScoreDistribution.ts +4 -0
  75. package/src/apis/anilist/interfaces/Staff.ts +6 -0
  76. package/src/apis/anilist/interfaces/Stat.ts +24 -0
  77. package/src/apis/anilist/interfaces/Statistics.ts +6 -0
  78. package/src/apis/anilist/interfaces/StatusDistribution.ts +4 -0
  79. package/src/apis/anilist/interfaces/StreamingEpisode.ts +6 -0
  80. package/src/apis/anilist/interfaces/Studio.ts +4 -0
  81. package/src/apis/anilist/interfaces/Tag.ts +10 -0
  82. package/src/apis/anilist/interfaces/Title.ts +6 -0
  83. package/src/apis/anilist/interfaces/Trailer.ts +5 -0
  84. package/src/apis/anilist/interfaces/UserStats.ts +25 -0
  85. package/src/apis/anilist/interfaces/responses/AiringSchedule.ts +10 -0
  86. package/src/apis/anilist/interfaces/responses/Character.ts +26 -0
  87. package/src/apis/anilist/interfaces/responses/Media.ts +118 -0
  88. package/src/apis/anilist/interfaces/responses/MediaList.ts +24 -0
  89. package/src/apis/anilist/interfaces/responses/MediaListCollectionResponse.ts +37 -0
  90. package/src/apis/anilist/interfaces/responses/MediaTrend.ts +13 -0
  91. package/src/apis/anilist/interfaces/responses/Staff.ts +53 -0
  92. package/src/apis/anilist/interfaces/responses/User.ts +72 -0
  93. package/src/apis/anilist/mutation/UpdateUser.ts +162 -0
  94. package/src/apis/anilist/query/AiringSchedule.ts +160 -0
  95. package/src/apis/anilist/query/Character.ts +75 -0
  96. package/src/apis/anilist/query/Media.ts +295 -0
  97. package/src/apis/anilist/query/MediaList.ts +192 -0
  98. package/src/apis/anilist/query/MediaListCollection.ts +673 -0
  99. package/src/apis/anilist/query/MediaTrend.ts +169 -0
  100. package/src/apis/anilist/query/Staff.ts +122 -0
  101. package/src/apis/anilist/query/User.ts +567 -0
  102. package/src/base/APIWrapper.ts +7 -0
  103. package/src/base/RequestHandler.ts +21 -0
  104. package/tsconfig.json +15 -0
@@ -0,0 +1,573 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.UserQuery = void 0;
24
+ const APIWrapper_1 = require("../../../base/APIWrapper");
25
+ const RequestHandler_1 = require("../../../base/RequestHandler");
26
+ class UserQuery extends APIWrapper_1.APIWrapper {
27
+ constructor(authToken) {
28
+ super('https://graphql.anilist.co');
29
+ this.authToken = authToken;
30
+ }
31
+ user(variables) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ // If isHTML is not provided in variables, default it to true
34
+ const _a = variables != null ? variables : {}, { isHTML = true } = _a, rest = __rest(_a, ["isHTML"]);
35
+ const query = `
36
+ query ($id: Int, $name: String, $isModerator: Boolean, $search: String, $sort: [UserSort], $isHTML: Boolean, $animeStatLimit: Int, $mangaStatLimit: Int, $animeStatSort: [UserStatisticsSort], $mangaStatSort: [UserStatisticsSort]) {
37
+ User (id: $id, name: $name, isModerator: $isModerator, search: $search, sort: $sort) {
38
+ id
39
+ name
40
+ about(asHtml: $isHTML)
41
+ avatar {
42
+ large
43
+ medium
44
+ }
45
+ bannerImage
46
+ isFollowing
47
+ isFollower
48
+ isBlocked
49
+ bans
50
+ options {
51
+ titleLanguage
52
+ displayAdultContent
53
+ airingNotifications
54
+ profileColor
55
+ notificationOptions {
56
+ type
57
+ enabled
58
+ }
59
+ timezone
60
+ activityMergeTime
61
+ staffNameLanguage
62
+ restrictMessagesToFollowing
63
+ disabledListActivity {
64
+ disabled
65
+ type
66
+ }
67
+ }
68
+ mediaListOptions {
69
+ scoreFormat
70
+ rowOrder
71
+ animeList {
72
+ sectionOrder
73
+ splitCompletedSectionByFormat
74
+ customLists
75
+ advancedScoring
76
+ advancedScoringEnabled
77
+ }
78
+ mangaList {
79
+ sectionOrder
80
+ splitCompletedSectionByFormat
81
+ customLists
82
+ advancedScoring
83
+ advancedScoringEnabled
84
+ }
85
+ }
86
+ favourites {
87
+ anime (perPage: 50) {
88
+ edges {
89
+ node {
90
+ id
91
+ title {
92
+ romaji
93
+ english
94
+ native
95
+ userPreferred
96
+ }
97
+ }
98
+ }
99
+ nodes {
100
+ id
101
+ title {
102
+ romaji
103
+ english
104
+ native
105
+ userPreferred
106
+ }
107
+ }
108
+ }
109
+ manga (perPage: 50) {
110
+ edges {
111
+ node {
112
+ id
113
+ title {
114
+ romaji
115
+ english
116
+ native
117
+ userPreferred
118
+ }
119
+ }
120
+ }
121
+ nodes {
122
+ id
123
+ title {
124
+ romaji
125
+ english
126
+ native
127
+ userPreferred
128
+ }
129
+ }
130
+ }
131
+ characters (perPage: 50) {
132
+ edges {
133
+ id
134
+ role
135
+ name
136
+ voiceActors {
137
+ id
138
+ name {
139
+ first
140
+ last
141
+ full
142
+ native
143
+ }
144
+ image {
145
+ large
146
+ }
147
+ }
148
+ media {
149
+ id
150
+ title {
151
+ romaji
152
+ english
153
+ native
154
+ userPreferred
155
+ }
156
+ coverImage {
157
+ extraLarge
158
+ large
159
+ medium
160
+ color
161
+ }
162
+ }
163
+ favouriteOrder
164
+ node {
165
+ id
166
+ name {
167
+ first
168
+ last
169
+ full
170
+ native
171
+ }
172
+ image {
173
+ large
174
+ }
175
+ }
176
+ }
177
+ }
178
+ staff (perPage: 50) {
179
+ edges {
180
+ id
181
+ role
182
+ favouriteOrder
183
+ node {
184
+ id
185
+ name {
186
+ first
187
+ last
188
+ full
189
+ native
190
+ }
191
+ image {
192
+ large
193
+ }
194
+ }
195
+ }
196
+ }
197
+ studios (perPage: 50) {
198
+ edges {
199
+ id
200
+ isMain
201
+ favouriteOrder
202
+ node {
203
+ id
204
+ name
205
+ isAnimationStudio
206
+ siteUrl
207
+ }
208
+ }
209
+ }
210
+ }
211
+ statistics {
212
+ anime {
213
+ count
214
+ meanScore
215
+ standardDeviation
216
+ minutesWatched
217
+ episodesWatched
218
+ formats (limit: $animeStatLimit, sort: $animeStatSort) {
219
+ count
220
+ meanScore
221
+ minutesWatched
222
+ mediaIds
223
+ format
224
+ }
225
+ statuses (limit: $animeStatLimit, sort: $animeStatSort) {
226
+ count
227
+ meanScore
228
+ minutesWatched
229
+ mediaIds
230
+ status
231
+ }
232
+ scores (limit: $animeStatLimit, sort: $animeStatSort) {
233
+ count
234
+ meanScore
235
+ minutesWatched
236
+ mediaIds
237
+ score
238
+ }
239
+ lengths (limit: $animeStatLimit, sort: $animeStatSort) {
240
+ count
241
+ meanScore
242
+ minutesWatched
243
+ mediaIds
244
+ length
245
+ }
246
+ releaseYears (limit: $animeStatLimit, sort: $animeStatSort) {
247
+ count
248
+ meanScore
249
+ minutesWatched
250
+ mediaIds
251
+ releaseYear
252
+ }
253
+ startYears (limit: $animeStatLimit, sort: $animeStatSort) {
254
+ count
255
+ meanScore
256
+ minutesWatched
257
+ mediaIds
258
+ startYear
259
+ }
260
+ genres (limit: $animeStatLimit, sort: $animeStatSort) {
261
+ count
262
+ meanScore
263
+ minutesWatched
264
+ mediaIds
265
+ genre
266
+ }
267
+ tags (limit: $animeStatLimit, sort: $animeStatSort) {
268
+ count
269
+ meanScore
270
+ minutesWatched
271
+ mediaIds
272
+ tag {
273
+ id
274
+ name
275
+ description
276
+ category
277
+ rank
278
+ isGeneralSpoiler
279
+ isMediaSpoiler
280
+ isAdult
281
+ }
282
+ }
283
+ countries (limit: $animeStatLimit, sort: $animeStatSort) {
284
+ count
285
+ meanScore
286
+ minutesWatched
287
+ mediaIds
288
+ country
289
+ }
290
+ voiceActors (limit: $animeStatLimit, sort: $animeStatSort) {
291
+ count
292
+ meanScore
293
+ minutesWatched
294
+ mediaIds
295
+ voiceActor {
296
+ id
297
+ name {
298
+ first
299
+ last
300
+ full
301
+ native
302
+ alternative
303
+ userPreferred
304
+ }
305
+ }
306
+ characterIds
307
+ }
308
+ staff (limit: $animeStatLimit, sort: $animeStatSort) {
309
+ count
310
+ meanScore
311
+ minutesWatched
312
+ mediaIds
313
+ staff {
314
+ id
315
+ name {
316
+ first
317
+ last
318
+ full
319
+ native
320
+ alternative
321
+ userPreferred
322
+ }
323
+ }
324
+ }
325
+ studios (limit: $animeStatLimit, sort: $animeStatSort) {
326
+ count
327
+ meanScore
328
+ minutesWatched
329
+ mediaIds
330
+ studio {
331
+ id
332
+ name
333
+ }
334
+ }
335
+ }
336
+ manga {
337
+ count
338
+ meanScore
339
+ standardDeviation
340
+ chaptersRead
341
+ volumesRead
342
+ formats (limit: $mangaStatLimit, sort: $mangaStatSort) {
343
+ count
344
+ meanScore
345
+ chaptersRead
346
+ mediaIds
347
+ format
348
+ }
349
+ statuses (limit: $mangaStatLimit, sort: $mangaStatSort) {
350
+ count
351
+ meanScore
352
+ chaptersRead
353
+ mediaIds
354
+ status
355
+ }
356
+ scores (limit: $mangaStatLimit, sort: $mangaStatSort) {
357
+ count
358
+ meanScore
359
+ chaptersRead
360
+ mediaIds
361
+ score
362
+ }
363
+ lengths (limit: $mangaStatLimit, sort: $mangaStatSort) {
364
+ count
365
+ meanScore
366
+ chaptersRead
367
+ mediaIds
368
+ length
369
+ }
370
+ releaseYears (limit: $mangaStatLimit, sort: $mangaStatSort) {
371
+ count
372
+ meanScore
373
+ chaptersRead
374
+ mediaIds
375
+ releaseYear
376
+ }
377
+ startYears (limit: $mangaStatLimit, sort: $mangaStatSort) {
378
+ count
379
+ meanScore
380
+ chaptersRead
381
+ mediaIds
382
+ startYear
383
+ }
384
+ genres (limit: $mangaStatLimit, sort: $mangaStatSort) {
385
+ count
386
+ meanScore
387
+ chaptersRead
388
+ mediaIds
389
+ genre
390
+ }
391
+ tags (limit: $mangaStatLimit, sort: $mangaStatSort) {
392
+ count
393
+ meanScore
394
+ chaptersRead
395
+ mediaIds
396
+ tag {
397
+ id
398
+ name
399
+ description
400
+ category
401
+ rank
402
+ isGeneralSpoiler
403
+ isMediaSpoiler
404
+ isAdult
405
+ }
406
+ }
407
+ countries (limit: $mangaStatLimit, sort: $mangaStatSort) {
408
+ count
409
+ meanScore
410
+ chaptersRead
411
+ mediaIds
412
+ country
413
+ }
414
+ staff (limit: $mangaStatLimit, sort: $mangaStatSort) {
415
+ count
416
+ meanScore
417
+ chaptersRead
418
+ mediaIds
419
+ staff {
420
+ id
421
+ name {
422
+ first
423
+ last
424
+ full
425
+ native
426
+ alternative
427
+ userPreferred
428
+ }
429
+ }
430
+ }
431
+ studios (limit: $mangaStatLimit, sort: $mangaStatSort) {
432
+ count
433
+ meanScore
434
+ chaptersRead
435
+ mediaIds
436
+ studio {
437
+ id
438
+ name
439
+ }
440
+ }
441
+ }
442
+ }
443
+ stats {
444
+ watchedTime
445
+ chaptersRead
446
+ activityHistory {
447
+ date
448
+ amount
449
+ level
450
+ }
451
+ animeStatusDistribution {
452
+ status
453
+ amount
454
+ }
455
+ mangaStatusDistribution {
456
+ status
457
+ amount
458
+ }
459
+ animeScoreDistribution {
460
+ score
461
+ amount
462
+ }
463
+ mangaScoreDistribution {
464
+ score
465
+ amount
466
+ }
467
+ animeListScores {
468
+ meanScore
469
+ standardDeviation
470
+ }
471
+ mangaListScores {
472
+ meanScore
473
+ standardDeviation
474
+ }
475
+ favouredGenresOverview {
476
+ genre
477
+ amount
478
+ meanScore
479
+ timeWatched
480
+ }
481
+ favouredGenres {
482
+ genre
483
+ amount
484
+ meanScore
485
+ timeWatched
486
+ }
487
+ favouredTags {
488
+ tag {
489
+ id
490
+ name
491
+ description
492
+ category
493
+ rank
494
+ isGeneralSpoiler
495
+ isMediaSpoiler
496
+ isAdult
497
+ }
498
+ amount
499
+ meanScore
500
+ timeWatched
501
+ }
502
+ favouredActors {
503
+ staff {
504
+ id
505
+ name {
506
+ first
507
+ last
508
+ full
509
+ native
510
+ alternative
511
+ userPreferred
512
+ }
513
+ }
514
+ amount
515
+ meanScore
516
+ timeWatched
517
+ }
518
+ favouredStaff {
519
+ staff {
520
+ id
521
+ name {
522
+ first
523
+ last
524
+ full
525
+ native
526
+ alternative
527
+ userPreferred
528
+ }
529
+ }
530
+ amount
531
+ meanScore
532
+ timeWatched
533
+ }
534
+ favouredStudios {
535
+ studio {
536
+ id
537
+ name
538
+ }
539
+ amount
540
+ meanScore
541
+ timeWatched
542
+ }
543
+ favouredYears {
544
+ year
545
+ amount
546
+ meanScore
547
+ }
548
+ favouredFormats {
549
+ format
550
+ amount
551
+ }
552
+ }
553
+ unreadNotificationCount
554
+ siteUrl
555
+ donatorTier
556
+ donatorBadge
557
+ moderatorRoles
558
+ createdAt
559
+ updatedAt
560
+ previousNames {
561
+ name
562
+ createdAt
563
+ updatedAt
564
+ }
565
+ }
566
+ }
567
+ `;
568
+ const data = { query, variables: Object.assign({ isHTML }, rest) };
569
+ return yield (0, RequestHandler_1.sendRequest)(this.baseURL, 'POST', data, this.authToken);
570
+ });
571
+ }
572
+ }
573
+ exports.UserQuery = UserQuery;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APIWrapper = void 0;
4
+ class APIWrapper {
5
+ constructor(baseURL) {
6
+ this.baseURL = baseURL;
7
+ }
8
+ }
9
+ exports.APIWrapper = APIWrapper;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.sendRequest = void 0;
16
+ const axios_1 = __importDefault(require("axios"));
17
+ const sendRequest = (url, method, data, token) => __awaiter(void 0, void 0, void 0, function* () {
18
+ const headers = {
19
+ 'Content-Type': 'application/json',
20
+ Accept: 'application/json'
21
+ };
22
+ if (token !== null && token !== undefined && token !== '') {
23
+ headers.Authorization = `Bearer ${token}`;
24
+ }
25
+ const response = yield (0, axios_1.default)({
26
+ url,
27
+ method,
28
+ data,
29
+ headers
30
+ });
31
+ return response.data;
32
+ });
33
+ exports.sendRequest = sendRequest;
package/jest.config.js ADDED
@@ -0,0 +1,11 @@
1
+ module.exports = {
2
+ roots: ['<rootDir>/src', '<rootDir>/__tests__'],
3
+ testMatch: [
4
+ '**/__tests__/**/*.+(ts|tsx|js)',
5
+ '**/?(*.)+(spec|test).+(ts|tsx|js)'
6
+ ],
7
+ transform: {
8
+ '^.+\\.(ts|tsx)$': 'ts-jest'
9
+ },
10
+ testTimeout: 90000
11
+ }
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "anilink-api-wrapper",
3
+ "version": "1.0.0",
4
+ "description": "Anilist API Wrapper",
5
+ "main": "dist/AniLink.js",
6
+ "scripts": {
7
+ "test": "jest",
8
+ "build": "tsc"
9
+ },
10
+ "keywords": [
11
+ "anilist",
12
+ "api",
13
+ "wrapper"
14
+ ],
15
+ "author": "RLAlpha49",
16
+ "license": "MIT",
17
+ "devDependencies": {
18
+ "@babel/preset-typescript": "^7.24.1",
19
+ "@types/jest": "^29.5.12",
20
+ "babel-jest": "^29.7.0",
21
+ "dotenv": "^16.4.5",
22
+ "jest": "^29.7.0",
23
+ "standard": "^17.1.0",
24
+ "ts-jest": "^29.1.2",
25
+ "ts-standard": "^12.0.2",
26
+ "typescript": "^5.4.5"
27
+ },
28
+ "dependencies": {
29
+ "axios": "^1.6.8"
30
+ }
31
+ }