@sns-parse/core 0.3.0-alpha.1 → 0.4.0-alpha.2

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 (43) hide show
  1. package/lib/config.d.ts +5 -0
  2. package/lib/config.js +28 -0
  3. package/lib/engine/config-io.d.ts +44 -0
  4. package/lib/engine/config-io.js +155 -0
  5. package/lib/engine/fetcher.d.ts +21 -0
  6. package/lib/engine/fetcher.js +228 -0
  7. package/lib/engine/gateway.d.ts +21 -0
  8. package/lib/engine/gateway.js +19 -0
  9. package/lib/engine/parser.d.ts +2 -0
  10. package/lib/engine/parser.js +162 -0
  11. package/lib/engine/platform-config.d.ts +24 -0
  12. package/lib/engine/platform-config.js +76 -0
  13. package/lib/engine/runtime.d.ts +49 -0
  14. package/lib/engine/runtime.js +90 -0
  15. package/lib/engine/translate.d.ts +15 -0
  16. package/lib/engine/translate.js +107 -0
  17. package/lib/engine/twitter.d.ts +26 -0
  18. package/lib/engine/twitter.js +398 -0
  19. package/lib/index.d.ts +19 -0
  20. package/lib/index.js +19 -0
  21. package/lib/registry.d.ts +20 -0
  22. package/lib/registry.js +77 -0
  23. package/lib/utils/cache.d.ts +9 -0
  24. package/lib/utils/cache.js +34 -0
  25. package/lib/utils/common.d.ts +7 -0
  26. package/lib/utils/common.js +58 -0
  27. package/lib/utils/concurrency.d.ts +8 -0
  28. package/lib/utils/concurrency.js +29 -0
  29. package/lib/utils/field-mapping.d.ts +2 -0
  30. package/lib/utils/field-mapping.js +29 -0
  31. package/lib/utils/format.d.ts +4 -0
  32. package/lib/utils/format.js +79 -0
  33. package/lib/utils/gif.d.ts +10 -0
  34. package/lib/utils/gif.js +104 -0
  35. package/lib/utils/image-size.d.ts +10 -0
  36. package/lib/utils/image-size.js +69 -0
  37. package/lib/utils/merge.d.ts +61 -0
  38. package/lib/utils/merge.js +388 -0
  39. package/lib/utils/tls-client.d.ts +30 -0
  40. package/lib/utils/tls-client.js +120 -0
  41. package/lib/utils/url.d.ts +10 -0
  42. package/lib/utils/url.js +89 -0
  43. package/package.json +16 -4
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sns-parse/core",
3
- "version": "0.3.0-alpha.1+upstream.1.6.7",
4
- "description": "sns-parse 核心契约与宿主抽象:类型、可注入日志、Host、发送层契约、平台定义",
3
+ "version": "0.4.0-alpha.2+upstream.1.6.7",
4
+ "description": "sns-parse 核心:契约、宿主抽象、配置 DSL 与解析引擎(fetcher/parser/翻译/X 原生解析/合并/GIF/TLS 指纹客户端)",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
7
  "files": [
@@ -11,7 +11,8 @@
11
11
  "scripts": {
12
12
  "build": "tsc",
13
13
  "clean": "rimraf lib",
14
- "prepublishOnly": "npm run build"
14
+ "test": "tsx test/engine.test.ts",
15
+ "prepublishOnly": "tsc"
15
16
  },
16
17
  "keywords": [
17
18
  "sns-parse",
@@ -21,10 +22,20 @@
21
22
  "koishi"
22
23
  ],
23
24
  "devDependencies": {
25
+ "@char46/tlsget-rs": "^1.0.0",
24
26
  "@types/node": "^20.11.0",
25
27
  "rimraf": "^5.0.5",
28
+ "tsx": "^4.23.15",
26
29
  "typescript": "^5.3.3"
27
30
  },
31
+ "dependencies": {
32
+ "axios": "^1.16.1",
33
+ "https-proxy-agent": "^5.0.1"
34
+ },
35
+ "optionalDependencies": {
36
+ "@char46/tlsget-rs": "^1.0.0",
37
+ "ffmpeg-static": "^5.2.0"
38
+ },
28
39
  "publishConfig": {
29
40
  "access": "public",
30
41
  "registry": "https://registry.npmjs.org"
@@ -35,5 +46,6 @@
35
46
  },
36
47
  "engines": {
37
48
  "node": ">=16.0.0"
38
- }
49
+ },
50
+ "packageManager": "pnpm@12.3.4"
39
51
  }