@20syldev/api 4.5.0 → 4.6.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 (71) hide show
  1. package/README.md +9 -4
  2. package/eslint.config.js +4 -0
  3. package/package.json +3 -2
  4. package/src/app.ts +7 -6
  5. package/src/config/env.ts +1 -0
  6. package/src/config/versions.ts +7 -4
  7. package/src/middleware/error.ts +2 -1
  8. package/src/middleware/json.ts +1 -1
  9. package/src/middleware/logger.ts +2 -1
  10. package/src/middleware/ratelimit.ts +4 -3
  11. package/src/middleware/version.ts +2 -1
  12. package/src/modules/v3.js +1 -1
  13. package/src/modules/v4/agent.ts +104 -0
  14. package/src/modules/v4/algorithms.ts +79 -0
  15. package/src/modules/v4/captcha.ts +8 -0
  16. package/src/modules/v4/chat.ts +10 -2
  17. package/src/modules/v4/color.ts +8 -1
  18. package/src/modules/v4/convert.ts +9 -0
  19. package/src/modules/v4/dice.ts +7 -0
  20. package/src/modules/v4/domain.ts +6 -1
  21. package/src/modules/v4/encode.ts +71 -0
  22. package/src/modules/v4/geo.ts +10 -0
  23. package/src/modules/v4/hash.ts +10 -1
  24. package/src/modules/v4/hyperplanning.ts +10 -1
  25. package/src/modules/v4/ip.ts +134 -0
  26. package/src/modules/v4/levenshtein.ts +8 -0
  27. package/src/modules/v4/palette.ts +9 -1
  28. package/src/modules/v4/personal.ts +5 -0
  29. package/src/modules/v4/placeholder.ts +8 -0
  30. package/src/modules/v4/qrcode.ts +9 -1
  31. package/src/modules/v4/statistics.ts +7 -0
  32. package/src/modules/v4/text.ts +30 -0
  33. package/src/modules/v4/tic_tac_toe.ts +11 -2
  34. package/src/modules/v4/time.ts +11 -0
  35. package/src/modules/v4/token.ts +10 -1
  36. package/src/modules/v4/username.ts +5 -0
  37. package/src/modules/v4/validate.ts +21 -0
  38. package/src/modules/v4.ts +3 -1
  39. package/src/routes/delete.ts +2 -1
  40. package/src/routes/get.ts +57 -7
  41. package/src/routes/index.ts +4 -3
  42. package/src/routes/patch.ts +2 -1
  43. package/src/routes/post.ts +5 -4
  44. package/src/storage/index.ts +1 -1
  45. package/src/utils/response.ts +1 -0
  46. package/tests/integration/api.test.ts +87 -2
  47. package/tests/unit/agent.test.ts +113 -0
  48. package/tests/unit/algorithms.test.ts +2 -1
  49. package/tests/unit/captcha.test.ts +2 -1
  50. package/tests/unit/chat.test.ts +2 -1
  51. package/tests/unit/color.test.ts +2 -1
  52. package/tests/unit/convert.test.ts +2 -1
  53. package/tests/unit/dice.test.ts +2 -1
  54. package/tests/unit/domain.test.ts +2 -1
  55. package/tests/unit/encode.test.ts +8 -7
  56. package/tests/unit/geo.test.ts +2 -1
  57. package/tests/unit/hash.test.ts +2 -1
  58. package/tests/unit/hyperplanning.test.ts +2 -1
  59. package/tests/unit/ip.test.ts +140 -0
  60. package/tests/unit/levenshtein.test.ts +2 -1
  61. package/tests/unit/palette.test.ts +2 -1
  62. package/tests/unit/personal.test.ts +2 -1
  63. package/tests/unit/placeholder.test.ts +2 -1
  64. package/tests/unit/qrcode.test.ts +2 -1
  65. package/tests/unit/statistics.test.ts +2 -1
  66. package/tests/unit/text.test.ts +3 -2
  67. package/tests/unit/tic_tac_toe.test.ts +2 -1
  68. package/tests/unit/time.test.ts +2 -1
  69. package/tests/unit/token.test.ts +2 -1
  70. package/tests/unit/username.test.ts +2 -1
  71. package/tests/unit/validate.test.ts +3 -2
@@ -1,5 +1,6 @@
1
- import { test, describe } from 'node:test';
2
1
  import { strict as assert } from 'node:assert';
2
+ import { describe, test } from 'node:test';
3
+
3
4
  import tic_tac_toe from '../../src/modules/v4/tic_tac_toe.js';
4
5
  import type { TicTacToeStorage } from '../../src/types/storage.js';
5
6
 
@@ -1,5 +1,6 @@
1
- import { test, describe } from 'node:test';
2
1
  import { strict as assert } from 'node:assert';
2
+ import { describe, test } from 'node:test';
3
+
3
4
  import time from '../../src/modules/v4/time.js';
4
5
 
5
6
  describe('time', () => {
@@ -1,5 +1,6 @@
1
- import { test, describe } from 'node:test';
2
1
  import { strict as assert } from 'node:assert';
2
+ import { describe, test } from 'node:test';
3
+
3
4
  import token from '../../src/modules/v4/token.js';
4
5
 
5
6
  describe('token', () => {
@@ -1,5 +1,6 @@
1
- import { test, describe } from 'node:test';
2
1
  import { strict as assert } from 'node:assert';
2
+ import { describe, test } from 'node:test';
3
+
3
4
  import username from '../../src/modules/v4/username.js';
4
5
 
5
6
  describe('username', () => {
@@ -1,6 +1,7 @@
1
- import { test, describe } from 'node:test';
2
1
  import { strict as assert } from 'node:assert';
3
- import { luhn, iban, email } from '../../src/modules/v4/validate.js';
2
+ import { describe, test } from 'node:test';
3
+
4
+ import { email, iban, luhn } from '../../src/modules/v4/validate.js';
4
5
 
5
6
  describe('validate', () => {
6
7
  describe('luhn', () => {