webforai 1.2.2 → 1.3.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.
- package/LICENSE +21 -0
- package/README.md +74 -74
- package/dist/cjs/extract-hast/index.js +35 -3
- package/dist/cjs/extract-hast/readability.js +57 -29
- package/dist/cjs/extract-hast/strongly.js +6 -3
- package/dist/cjs/extract-hast/utils.js +8 -4
- package/dist/cjs/html-to-markdown.js +4 -3
- package/dist/cjs/html-to-mdast.js +8 -21
- package/dist/cjs/index.js +18 -9
- package/dist/cjs/link-replacer.js +2 -1
- package/dist/cjs/loaders/playwright.js +8 -16
- package/dist/cjs/md-splitter.js +5 -3
- package/dist/cjs/mdast-handlers/custom-a-handler.js +2 -1
- package/dist/cjs/mdast-handlers/custom-code-handler.js +43 -0
- package/dist/cjs/mdast-handlers/custom-div-handler.js +15 -9
- package/dist/cjs/mdast-handlers/custom-img-handler.js +2 -1
- package/dist/cjs/mdast-handlers/empty-handler.js +29 -0
- package/dist/cjs/mdast-to-markdown.js +10 -5
- package/dist/cjs/utils/mdast-utils.js +6 -3
- package/dist/extract-hast/index.js +28 -1
- package/dist/extract-hast/readability.js +62 -34
- package/dist/extract-hast/strongly.js +6 -3
- package/dist/extract-hast/utils.js +8 -4
- package/dist/html-to-markdown.js +4 -3
- package/dist/html-to-mdast.js +9 -22
- package/dist/index.js +10 -4
- package/dist/link-replacer.js +2 -1
- package/dist/loaders/playwright.js +8 -6
- package/dist/md-splitter.js +5 -3
- package/dist/mdast-handlers/custom-a-handler.js +4 -3
- package/dist/mdast-handlers/custom-code-handler.js +20 -0
- package/dist/mdast-handlers/custom-div-handler.js +17 -11
- package/dist/mdast-handlers/custom-img-handler.js +2 -1
- package/dist/mdast-handlers/empty-handler.js +6 -0
- package/dist/mdast-to-markdown.js +9 -5
- package/dist/types/extract-hast/index.d.ts +10 -1
- package/dist/types/extract-hast/index.js.map +1 -1
- package/dist/types/extract-hast/readability.js.map +1 -1
- package/dist/types/extract-hast/strongly.js.map +1 -1
- package/dist/types/extract-hast/utils.js.map +1 -1
- package/dist/types/html-to-markdown.d.ts +25 -3
- package/dist/types/html-to-markdown.js.map +1 -1
- package/dist/types/html-to-mdast.d.ts +27 -4
- package/dist/types/html-to-mdast.js.map +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.js.map +1 -1
- package/dist/types/link-replacer.js.map +1 -1
- package/dist/types/loaders/playwright.d.ts +2 -2
- package/dist/types/loaders/playwright.js.map +1 -1
- package/dist/types/md-splitter.d.ts +1 -1
- package/dist/types/md-splitter.js.map +1 -1
- package/dist/types/mdast-handlers/custom-a-handler.js.map +1 -1
- package/dist/types/mdast-handlers/custom-code-handler.d.ts +2 -0
- package/dist/types/mdast-handlers/custom-code-handler.js.map +1 -0
- package/dist/types/mdast-handlers/custom-div-handler.js.map +1 -1
- package/dist/types/mdast-handlers/custom-img-handler.js.map +1 -1
- package/dist/types/mdast-handlers/empty-handler.d.ts +1 -0
- package/dist/types/mdast-handlers/empty-handler.js.map +1 -0
- package/dist/types/mdast-to-markdown.d.ts +42 -3
- package/dist/types/mdast-to-markdown.js.map +1 -1
- package/dist/types/utils/mdast-utils.js.map +1 -1
- package/dist/utils/mdast-utils.js +6 -3
- package/package.json +118 -118
package/package.json
CHANGED
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "webforai",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "A library that provides a web interface for AI",
|
|
5
|
-
"author": "inaridiy",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"web",
|
|
9
|
-
"ai",
|
|
10
|
-
"html",
|
|
11
|
-
"html2md",
|
|
12
|
-
"markdown",
|
|
13
|
-
"mdast",
|
|
14
|
-
"hast"
|
|
15
|
-
],
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "https://github.com/inaridiy/webforai.git"
|
|
19
|
-
},
|
|
20
|
-
"homepage": "https://github.com/inaridiy/webforai.git",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "webforai",
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "A library that provides a web interface for AI",
|
|
5
|
+
"author": "inaridiy",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"web",
|
|
9
|
+
"ai",
|
|
10
|
+
"html",
|
|
11
|
+
"html2md",
|
|
12
|
+
"markdown",
|
|
13
|
+
"mdast",
|
|
14
|
+
"hast"
|
|
15
|
+
],
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/inaridiy/webforai.git"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/inaridiy/webforai.git",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"!dist/types/**/*.js"
|
|
24
|
+
],
|
|
25
|
+
"main": "dist/cjs/index.js",
|
|
26
|
+
"type": "module",
|
|
27
|
+
"module": "dist/index.js",
|
|
28
|
+
"types": "dist/types/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/types/index.d.ts",
|
|
32
|
+
"import": "./dist/index.js",
|
|
33
|
+
"require": "./dist/cjs/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./types": {
|
|
36
|
+
"types": "./dist/types/index.d.ts",
|
|
37
|
+
"import": "./dist/index.js",
|
|
38
|
+
"require": "./dist/cjs/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./loaders/playwright": {
|
|
41
|
+
"types": "./dist/types/loaders/playwright.d.ts",
|
|
42
|
+
"import": "./dist/loaders/playwright.js",
|
|
43
|
+
"require": "./dist/cjs/loaders/playwright.js"
|
|
44
|
+
},
|
|
45
|
+
"./loaders/cf-puppeteer": {
|
|
46
|
+
"types": "./dist/types/loaders/cf-puppeteer.d.ts",
|
|
47
|
+
"import": "./dist/loaders/cf-puppeteer.js",
|
|
48
|
+
"require": "./dist/cjs/loaders/cf-puppeteer.js"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"typesVersions": {
|
|
52
|
+
"*": {
|
|
53
|
+
"types": [
|
|
54
|
+
"./dist/types/index.d.ts"
|
|
55
|
+
],
|
|
56
|
+
"loaders/playwright": [
|
|
57
|
+
"./dist/types/loaders/playwright.d.ts"
|
|
58
|
+
],
|
|
59
|
+
"loaders/cf-puppeteer": [
|
|
60
|
+
"./dist/types/loaders/cf-puppeteer.d.ts"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"@cloudflare/puppeteer": "^0.0.6",
|
|
66
|
+
"playwright": "^1.0.0"
|
|
67
|
+
},
|
|
68
|
+
"peerDependenciesMeta": {
|
|
69
|
+
"playwright": {
|
|
70
|
+
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"@cloudflare/puppeteer": {
|
|
73
|
+
"optional": true
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"hast-util-from-html": "^2.0.1",
|
|
78
|
+
"hast-util-select": "^6.0.1",
|
|
79
|
+
"hast-util-to-html": "^9.0.0",
|
|
80
|
+
"hast-util-to-mdast": "^10.1.0",
|
|
81
|
+
"hast-util-to-string": "^3.0.0",
|
|
82
|
+
"hast-util-to-text": "^4.0.0",
|
|
83
|
+
"mathml-to-latex": "^1.3.0",
|
|
84
|
+
"mdast-util-gfm": "^3.0.0",
|
|
85
|
+
"mdast-util-math": "^3.0.0",
|
|
86
|
+
"mdast-util-to-markdown": "^2.1.0",
|
|
87
|
+
"trim-trailing-lines": "^2.1.0",
|
|
88
|
+
"unist-util-filter": "^5.0.1",
|
|
89
|
+
"unist-util-parents": "^3.0.0",
|
|
90
|
+
"unist-util-remove": "^4.0.0",
|
|
91
|
+
"unist-util-visit": "^5.0.0",
|
|
92
|
+
"unist-util-visit-parents": "^6.0.1"
|
|
93
|
+
},
|
|
94
|
+
"devDependencies": {
|
|
95
|
+
"@cloudflare/puppeteer": "^0.0.6",
|
|
96
|
+
"@tsconfig/recommended": "^1.0.3",
|
|
97
|
+
"@types/hast": "^3.0.2",
|
|
98
|
+
"@types/mdast": "^4.0.2",
|
|
99
|
+
"@types/node": "^20.11.0",
|
|
100
|
+
"arg": "^5.0.2",
|
|
101
|
+
"esbuild": "^0.19.11",
|
|
102
|
+
"glob": "^10.3.10",
|
|
103
|
+
"ncp": "^2.0.0",
|
|
104
|
+
"np": "^9.2.0",
|
|
105
|
+
"playwright": "^1.40.1",
|
|
106
|
+
"rimraf": "^5.0.5",
|
|
107
|
+
"tsx": "^4.7.0",
|
|
108
|
+
"typescript": "^5.4.5"
|
|
109
|
+
},
|
|
110
|
+
"scripts": {
|
|
111
|
+
"copy:package.cjs.json": "pnpm ncp ./package.cjs.json ./dist/cjs/package.json && pnpm ncp ./package.cjs.json ./dist/types/package.json ",
|
|
112
|
+
"clean": "rimraf dist",
|
|
113
|
+
"build": "pnpm clean && tsx ./build.ts && pnpm copy:package.cjs.json",
|
|
114
|
+
"test": "echo \"Error: no test specified\"",
|
|
115
|
+
"prerelease": "pnpm build",
|
|
116
|
+
"release": "np"
|
|
117
|
+
}
|
|
118
|
+
}
|