feat(rawir): ACF Options Pages in RawIR as acf_options - #42
Conversation
Each options page's slug, title, storage post_id and fields (the same secret-filtered default-language values its singleton holds, with ACF type and label) go to bridge/acf-options.json and RawIR acf_options, so Migrate's REST-path conversion sees site settings. prepare-migrate mirrors the field.
|
ONAY 20c0a67 (t9) Contract ( Secret filter: options fields go through the same Scope: Gates:
Note: the ai#333 prefix/counter rule ( |
What
ACF Options Pages reach RawIR as
acf_options(contract: Contentrain/ai#333,RawAcfOptionsPage[]). Until now an options page became Bridge's ownacf-options-<slug>singleton only, so it never reached Migrate's REST-path conversion. The "Site settings" fields were lost on both paths.Models::options_page()returns the page as RawIR holds it:{slug, title, post_id, fields}. The values are the same secret-filtered, default-language ones its singleton already holds.Source::acf_fields_for_options_page()adds each field's ACFtypeandlabel(optional inRawAcfValue), so the reader types apost_objectas a relation rather than an integer.bridge/acf-options.jsonwhen the site has options pages.Rawirandtools/prepare-migrate.mjsaddacf_optionsbesideoptions, so the two stay equal (BR-19 check incoverage-rawir.mjs).Dependency
Bridge writes JSON only and has no runtime dependency on the types release. The test pins (
@contentrain/types1.14.0,@contentrain/wp-import0.5.7) do not readacf_options, sotest:coverage,test:storeandtest:readerdo not depend on ai#333. This PR does not wait for the pin bump. Migrate reads the field only after ai#333 is released and bumped. Release: 0.6.0 (together with draft parity); #41 (0.5.0) stays unchanged.Checks
tests/run.sh: 384 PASS, including 5 new: all 4 pages in RawIR; title and post_id; value, field_key and type; the repeater's rows; each page carries only its own fields, and a custom post_id is keptnpm testgreen;test:coverage+test:store+test:reader207 PASS (BR-19:rawir.json= the RawIR prepare-migrate builds)Reviewer: t9