fix: drop tool-web subpath exports, align with tool-bash single-entry shape

The web tool package exposed ./search and ./fetch as standalone subpath
plugins, but nothing consumed them, the RFC never called for them, and the
sibling dsh-tool-bash (also a multi-tool consumer) ships a single entry and
selects tools via config. The extra entries also tripped the workspace
constraints gate, whose expected `files` list covers single-entry and bin
packages but not a non-bin multi-entry one.

Collapse to a single `.` entry: drop the ./search|./fetch exports and their
lib/*.js from package.json files, delete the per-package tsdown override (the
root config's lib/types/index.js entry now suffices), and remove the
plugin-shaped name/inject exports from search.ts/fetch.ts (renaming each
apply to its applyWeb{Search,Fetch}Tool helper, still composed by the root
plugin and re-exported from the index). Selective enablement stays via the
existing { search?, fetch? } config. Docs updated to match.
This commit is contained in:
Dudu-0223
2026-06-28 17:02:06 +08:00
parent f843ea7701
commit 70a8b57738
6 changed files with 4 additions and 56 deletions
-10
View File
@@ -11,21 +11,11 @@
"types": "./lib/types/index.d.ts",
"default": "./lib/index.js"
},
"./search": {
"types": "./lib/types/search.d.ts",
"default": "./lib/search.js"
},
"./fetch": {
"types": "./lib/types/fetch.d.ts",
"default": "./lib/fetch.js"
},
"./src/*": "./src/*",
"./package.json": "./package.json"
},
"files": [
"lib/index.js",
"lib/search.js",
"lib/fetch.js",
"lib/types/**/*.d.ts",
"lib/types/**/*.d.ts.map",
"src"