@withpica/mcp-sdk 3.23.0 → 3.23.1
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/CHANGELOG.md +13 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -23
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [3.23.1] - 2026-10-07
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- `imports.getTemplate()` and `catalogStats()` go through the shared request
|
|
19
|
+
path. Both were bare `fetch()` calls without the
|
|
20
|
+
`x-vercel-protection-bypass` header, so on a protected Vercel preview they
|
|
21
|
+
never reached PICA: `getTemplate` returned Vercel's login page as the CSV
|
|
22
|
+
(or failed when that hop answered 500). They also skipped the timeout,
|
|
23
|
+
retry and typed errors.
|
|
24
|
+
- `requestText()` refuses a `text/html` body instead of returning it as the
|
|
25
|
+
file.
|
|
26
|
+
|
|
14
27
|
## [3.23.0] - 2026-10-04
|
|
15
28
|
|
|
16
29
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -943,13 +943,20 @@ declare class BaseResource {
|
|
|
943
943
|
* for routes that stream a generated file (e.g. `text/csv`) rather than
|
|
944
944
|
* `{success, data}`. `request()` unconditionally calls `response.json()`,
|
|
945
945
|
* which throws a SyntaxError parsing CSV text; every such route needs this
|
|
946
|
-
* method instead (
|
|
947
|
-
* precedent this generalises).
|
|
946
|
+
* method instead (`ImportResource.getTemplate()`, `ExportResource.catalogCsv()`).
|
|
948
947
|
*
|
|
949
948
|
* `fetchWithRetry` already throws `ApiError` for non-2xx responses (reading
|
|
950
949
|
* the body as text), so reaching here means `response.ok`. Still guard
|
|
951
950
|
* against a 2xx JSON error envelope (`{success:false}`) via content-type,
|
|
952
951
|
* since a route can commit to status 200 before a later validation step.
|
|
952
|
+
*
|
|
953
|
+
* An HTML page is refused. Neither route that uses this
|
|
954
|
+
* (`/admin/import/template`, `/admin/works/export` CSV formats) answers
|
|
955
|
+
* `text/html`, so one means something in front of PICA answered (on a
|
|
956
|
+
* protected Vercel preview, a missing bypass header ends on Vercel's
|
|
957
|
+
* login page with status 200). Returning that page as the file read as a
|
|
958
|
+
* success (2026-10-06, pica_import_template). Locked by
|
|
959
|
+
* `mcp-server/src/__tests__/sdk-request-text-and-bare-fetch.test.ts`.
|
|
953
960
|
*/
|
|
954
961
|
protected requestText(method: string, path: string): Promise<string>;
|
|
955
962
|
/**
|