openvibers/openvibe.contracts Commits

Contracts 0.163.0: sources.source@1 extract (facts a feed's items state in prose) (#120)

OP OpenVibers committed 30 days ago · tag v0.163 · 0 files, +0 −0

Plan T9: OpenVibe.Coupons has no codes. DealNews, an enabled source under checked terms, publishes real ones in its items' text ("Apply coupon code \"UXBMXG9V\" … Deal ends October 20. Buy Now at Amazon").

**`sources.source@1` gains `extract` on an rss/atom endpoint.**
- `kind`, `require`, and `fields` (`from` title|summary, `pattern` with one group, optional `as: date`).
- An item that yields every required field is stored as that kind with those fields. Any other item is skipped.
- Sources#45 implements it, with the `dealnews-coupon-codes` seed.

Additive. Fixtures: valid `rss-extract`; invalid `extract-from-body`, `extract-no-require`. CHANGELOG 0.163.0; `generated/` regenerated.

**Checks:** `node test/run.js`: 19,656 checks pass. `scripts/compat.js v0.162.0`: no breaking changes.

This commit has no diff to show.