Reads and validates caller PublishOptions into a frozen copy —
the ONE implementation every publish entry uses, in messaging-plugin and
cloudflare-plugin alike, neither of which may import the other.
The caller's object is read exactly once (each member, each header value),
so a getter or Proxy cannot answer the check one value and the transport
another; only the returned copy is read afterwards. A refusal names the
field and the rule and never quotes the refused value.
Throws SYNCHRONOUSLY: a publish method calls it inside an async body, which
turns the throw into the rejected promise its contract requires.
Reads and validates caller
PublishOptionsinto a frozen copy — the ONE implementation every publish entry uses, inmessaging-pluginandcloudflare-pluginalike, neither of which may import the other.The caller's object is read exactly once (each member, each header value), so a getter or
Proxycannot answer the check one value and the transport another; only the returned copy is read afterwards. A refusal names the field and the rule and never quotes the refused value.Throws SYNCHRONOUSLY: a publish method calls it inside an
asyncbody, which turns the throw into the rejected promise its contract requires.