@jayyuen66/dsh-scrapling 0.1.1 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayyuen66/dsh-scrapling",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Scrapling 网页抓取插件(dsh):静态/浏览器抓取 + CSS/XPath 结构化抽取 + 选择器自愈 + capture_xhr 与会话网络历史 + 登录态存取 + Spider 爬虫,由常驻 Python 进程驱动。",
5
5
  "keywords": [
6
6
  "dsh",
@@ -20,15 +20,28 @@
20
20
  "type": "git",
21
21
  "url": "git+https://github.com/JayYuen666/dsh-scrapling.git"
22
22
  },
23
+ "bin": {
24
+ "dsh-scrapling": "./bin/dsh-scrapling.mjs"
25
+ },
23
26
  "files": [
24
27
  "icon.svg",
28
+ "bin/dsh-scrapling.mjs",
25
29
  "host.js",
26
30
  "client.js",
27
31
  "cordis.patch.yml",
32
+ "runtime-manifest.json",
28
33
  "py/crawl.py",
29
34
  "py/bridge.py",
30
35
  "py/adapters.py",
31
36
  "py/guard.py",
37
+ "py/extraction.py",
38
+ "py/search.py",
39
+ "py/session_page.py",
40
+ "py/media.py",
41
+ "py/redact.py",
42
+ "py/redis_storage.py",
43
+ "py/runtime-requirements.txt",
44
+ "CHANGELOG.md",
32
45
  "THIRD_PARTY_NOTICES.md"
33
46
  ],
34
47
  "type": "module",
@@ -49,60 +62,63 @@
49
62
  "registry": "https://registry.npmjs.org"
50
63
  },
51
64
  "dependencies": {
65
+ "@modelcontextprotocol/sdk": "1.32.2",
52
66
  "ipaddr.js": "2.5.0"
53
67
  },
54
68
  "devDependencies": {
55
69
  "@deepseek-ai/cordis": "4.0.5",
56
70
  "@deepseek-ai/cordis-plugin-include": "1.0.10",
57
71
  "@deepseek-ai/cordis-plugin-loader": "1.0.6",
58
- "@deepseek-ai/dsh-api-remotes": "0.2.1-rc.2",
59
- "@deepseek-ai/dsh-client-locale": "0.2.1-rc.2",
60
- "@deepseek-ai/dsh-client-store": "0.2.1-rc.2",
61
- "@deepseek-ai/dsh-client-ui-chat": "0.2.1-rc.2",
62
- "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.2",
63
- "@deepseek-ai/dsh-client-ui-layout": "0.2.1-rc.2",
64
- "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.1-rc.2",
65
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.2",
66
- "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.2",
67
- "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.2",
68
- "@deepseek-ai/dsh-client-ui-tool": "0.2.1-rc.2",
69
- "@deepseek-ai/dsh-host-webserver": "0.2.1-rc.2",
70
- "@deepseek-ai/dsh-http-proxy": "0.2.1-rc.2",
71
- "@deepseek-ai/dsh-jobs": "0.2.1-rc.2",
72
- "@deepseek-ai/dsh-jobs-local": "0.2.1-rc.2",
73
- "@deepseek-ai/dsh-output-retention": "0.2.1-rc.2",
74
- "@deepseek-ai/dsh-package-manifest": "0.2.1-rc.2",
75
- "@deepseek-ai/dsh-ptc-runtime": "0.2.1-rc.2",
76
- "@deepseek-ai/dsh-sandbox": "0.2.1-rc.2",
77
- "@deepseek-ai/dsh-scope": "0.2.1-rc.2",
78
- "@deepseek-ai/dsh-session": "0.2.1-rc.2",
79
- "@deepseek-ai/dsh-settings": "0.2.1-rc.2",
80
- "@deepseek-ai/dsh-shell": "0.2.1-rc.2",
81
- "@deepseek-ai/dsh-subprocess": "0.2.1-rc.2",
82
- "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.2",
83
- "@deepseek-ai/dsh-tools": "0.2.1-rc.2",
84
- "@deepseek-ai/dsh-user-approval": "0.2.1-rc.2",
85
- "@deepseek-ai/dsh-web": "0.2.1-rc.2",
72
+ "@deepseek-ai/dsh-api-remotes": "0.2.1-rc.3",
73
+ "@deepseek-ai/dsh-client-locale": "0.2.1-rc.3",
74
+ "@deepseek-ai/dsh-client-store": "0.2.1-rc.3",
75
+ "@deepseek-ai/dsh-client-ui-chat": "0.2.1-rc.3",
76
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.3",
77
+ "@deepseek-ai/dsh-client-ui-layout": "0.2.1-rc.3",
78
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.1-rc.3",
79
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.3",
80
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.3",
81
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.3",
82
+ "@deepseek-ai/dsh-client-ui-tool": "0.2.1-rc.3",
83
+ "@deepseek-ai/dsh-host-webserver": "0.2.1-rc.3",
84
+ "@deepseek-ai/dsh-http-proxy": "0.2.1-rc.3",
85
+ "@deepseek-ai/dsh-jobs": "0.2.1-rc.3",
86
+ "@deepseek-ai/dsh-jobs-local": "0.2.1-rc.3",
87
+ "@deepseek-ai/dsh-output-retention": "0.2.1-rc.3",
88
+ "@deepseek-ai/dsh-package-manifest": "0.2.1-rc.3",
89
+ "@deepseek-ai/dsh-ptc-runtime": "0.2.1-rc.3",
90
+ "@deepseek-ai/dsh-sandbox": "0.2.1-rc.3",
91
+ "@deepseek-ai/dsh-scope": "0.2.1-rc.3",
92
+ "@deepseek-ai/dsh-session": "0.2.1-rc.3",
93
+ "@deepseek-ai/dsh-settings": "0.2.1-rc.3",
94
+ "@deepseek-ai/dsh-shell": "0.2.1-rc.3",
95
+ "@deepseek-ai/dsh-subprocess": "0.2.1-rc.3",
96
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.3",
97
+ "@deepseek-ai/dsh-tools": "0.2.1-rc.3",
98
+ "@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.3",
99
+ "@deepseek-ai/dsh-user-approval": "0.2.1-rc.3",
100
+ "@deepseek-ai/dsh-web": "0.2.1-rc.3",
86
101
  "@deepseek-ai/schemastery": "3.18.5",
87
- "@jayyuen66/dsh-plugin-shared": "^0.1.6",
102
+ "@jayyuen66/dsh-plugin-shared": "0.1.9",
88
103
  "@types/node": "26.6.5",
89
104
  "@types/react": "19.3.0",
90
105
  "@vitest/coverage-v8": "5.0.5",
91
106
  "eslint-plugin-sonarjs": "4.2.2",
92
- "oxfmt": "0.73.0",
93
- "oxlint": "1.88.0",
94
- "oxlint-tsgolint": "7.0.2004",
107
+ "oxfmt": "0.74.0",
108
+ "oxlint": "1.89.0",
109
+ "oxlint-tsgolint": "7.0.2005",
95
110
  "react": "^19.3.0",
96
- "rolldown": "1.2.14",
111
+ "rolldown": "1.2.15",
97
112
  "typescript": "7.0.2",
98
- "vite": "8.3.4",
113
+ "vite": "8.3.5",
99
114
  "vitest": "5.0.5"
100
115
  },
101
116
  "peerDependencies": {
102
- "@deepseek-ai/dsh": "^0.2.1-rc.2",
103
- "@deepseek-ai/dsh-output-retention": "0.2.1-rc.2",
104
- "@deepseek-ai/dsh-tools": "0.2.1-rc.2",
105
- "@deepseek-ai/dsh-web": "0.2.1-rc.2",
117
+ "@deepseek-ai/dsh": "^0.2.1-rc.3",
118
+ "@deepseek-ai/dsh-output-retention": "0.2.1-rc.3",
119
+ "@deepseek-ai/dsh-tools": "0.2.1-rc.3",
120
+ "@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.3",
121
+ "@deepseek-ai/dsh-web": "0.2.1-rc.3",
106
122
  "@deepseek-ai/schemastery": "3.18.5"
107
123
  },
108
124
  "peerDependenciesMeta": {
@@ -115,7 +131,7 @@
115
131
  },
116
132
  "icon": "icon.svg",
117
133
  "engines": {
118
- "dsh": "^0.2.1-rc.2",
134
+ "dsh": "^0.2.1-rc.3",
119
135
  "node": ">=22.12.0"
120
136
  },
121
137
  "dsh": {
@@ -130,23 +146,25 @@
130
146
  },
131
147
  "scripts": {
132
148
  "build:client": "node build-client.ts",
133
- "build": "node build-host.ts",
149
+ "build": "node build-host.ts && node build-cli.ts",
134
150
  "typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.client.json",
135
151
  "lint": "oxlint .",
136
152
  "test": "vitest run --coverage",
137
153
  "test:watch": "vitest",
138
154
  "check": "npm run --loglevel=warn typecheck && npm run --loglevel=warn lint && npm run --loglevel=warn build:client && npm run --loglevel=warn build && npm run --loglevel=warn test && npm run --loglevel=warn fmt:check && npm run --loglevel=warn check:py",
139
155
  "fmt:check": "oxfmt --check .",
140
- "py": "sh -c 'P=python3; test -x _env/.venv/bin/python && P=_env/.venv/bin/python; exec \"$P\" \"$@\"' --",
141
- "py:which": "sh -c 'test -x _env/.venv/bin/python && echo \"[py] 解释器:$PWD/_env/.venv/bin/python\" || echo \"[py] 解释器:PATH 上的 python3(本仓没有 _env/.venv,在伞根跑 pnpm py:setup)\"'",
142
- "face:py": "npm run --loglevel=warn py -- -c \"import pathlib,sys;MIN=6;fs=sorted(str(p) for p in pathlib.Path('py').rglob('*.py'));td=pathlib.Path('py/tests').is_dir();print('[face:py] bandit 与覆盖率量到的面:py/ 下 %d 份 *.py(下限 %d),py/tests/ 目录存在:%s' % (len(fs),MIN,td),flush=True);sys.exit('py/ 下只找到 %d 份 *.py,低于下限 %d:bandit 与 coverage 的分母已经空了,后面每一段都在量空气' % (len(fs),MIN) if len(fs)<MIN else 'py/tests/ 不是目录:coverage 的 --omit=py/tests/* 会连分母一起放宽,地板量的就成了虚高的那一面' if not td else 0)\"",
156
+ "py": "node py-launcher.mjs",
157
+ "py:which": "node py-launcher.mjs --which",
158
+ "face:py": "node face-py.mjs",
143
159
  "lint:py": "npm run --loglevel=warn py -- -m ruff check py/",
144
160
  "fmt:py": "npm run --loglevel=warn py -- -m ruff format --check py/",
145
161
  "typecheck:py": "npm run --loglevel=warn py -- -m mypy py/",
146
162
  "test:py": "npm run --loglevel=warn py -- py/tests/test_bridge.py",
147
- "bandit:py": "npm run --loglevel=warn py -- -m bandit -q -ll -r py/",
148
- "cov:py": "npm run --loglevel=warn py -- -m coverage erase && DSH_PY_COVERAGE=1 npm run --loglevel=warn py -- -m coverage run --parallel-mode py/tests/test_bridge.py && npm run --loglevel=warn py -- -m coverage combine && npm run --loglevel=warn py -- -m coverage report -m && npm run --loglevel=warn py -- -m coverage erase",
149
- "coverage:floor": "npm run --loglevel=warn py -- -m coverage erase && DSH_PY_COVERAGE=1 npm run --loglevel=warn py -- -m coverage run --parallel-mode py/tests/test_bridge.py && npm run --loglevel=warn py -- -m coverage combine && npm run --loglevel=warn py -- -m coverage report --omit=\"py/tests/*\" --fail-under=74 && npm run --loglevel=warn py -- -m coverage erase",
150
- "check:py": "npm run --loglevel=warn py:which && npm run --loglevel=warn face:py && npm run --loglevel=warn lint:py && npm run --loglevel=warn fmt:py && npm run --loglevel=warn typecheck:py && npm run --loglevel=warn test:py && npm run --loglevel=warn bandit:py && npm run --loglevel=warn coverage:floor"
163
+ "bandit:py": "npm run --loglevel=warn py -- -m bandit -q -r py/",
164
+ "cov:py": "node py-launcher.mjs -m coverage erase && node py-launcher.mjs --env=DSH_PY_COVERAGE=1 -m coverage run --parallel-mode py/tests/test_bridge.py && node py-launcher.mjs -m coverage combine && node py-launcher.mjs -m coverage report -m && node py-launcher.mjs -m coverage erase",
165
+ "coverage:floor": "node py-launcher.mjs -m coverage erase && node py-launcher.mjs --env=DSH_PY_COVERAGE=1 -m coverage run --parallel-mode py/tests/test_bridge.py && node py-launcher.mjs -m coverage combine && node py-launcher.mjs -m coverage report --omit=\"py/tests/*\" --fail-under=74 && node -e \"require('node:fs').mkdirSync('coverage',{recursive:true})\" && node py-launcher.mjs -m coverage json --omit=\"py/tests/*\" -o coverage/python-coverage.json && node coverage-floor.mjs && node py-launcher.mjs -m coverage erase",
166
+ "deps:py": "node deps-check.mjs",
167
+ "check:py": "npm run --loglevel=warn py:which && npm run --loglevel=warn face:py && npm run --loglevel=warn deps:py && npm run --loglevel=warn lint:py && npm run --loglevel=warn fmt:py && npm run --loglevel=warn typecheck:py && npm run --loglevel=warn test:py && npm run --loglevel=warn bandit:py && npm run --loglevel=warn coverage:floor",
168
+ "build:cli": "node build-cli.ts"
151
169
  }
152
170
  }