Files
plugins/packages/search1api/tests
wang2 e0369f59ba search1api 0.1.3: Search1API as a web search API in Settings (#1219)
search1api 0.1.3 adds Search1API to magpie's Settings as a web search API. A search goes out as the Search1API account magpie picked (OAuth or API key, renewed before each search). The option key or SEARCH1API_API_KEY is used only when the host gives no account. A refusal (401, 402, 429) keeps its status and Retry-After, so magpie rests that account for search only. Results map title, url, snippet and date.

Thanks @fatwang2.

Run at the reviewed head d4bcb9da (mote, HOME=$(mktemp -d)):
- node --test tests/*.test.mjs: 27 pass.
- bun test: 27 pass.
- bun scripts/check.mjs search1api: ok.

Broken by hand: b54f3636c's src/index.ts with this head's tests fails the account-over-option-key test (3 pass, 1 fail). An earlier round with the main code made websearch.test fail 4 of 4.

Not run: tests/host.integration.mjs, or a real Search1API account.
2026-11-16 19:37:34 +08:00
..