@rebuy/rebuy 2.33.0-rc.8 → 2.33.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"composeOffer.d.ts","sourceRoot":"","sources":["../../src/server/composeOffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAMH,KAAK,UAAU,EASlB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA6ErD;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,cAAc,EAAE,OAAO,aAAa,KAAG,UAAU,GAAG,SAwF3F,CAAC"}
1
+ {"version":3,"file":"composeOffer.d.ts","sourceRoot":"","sources":["../../src/server/composeOffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAMH,KAAK,UAAU,EASlB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA8ErD;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,cAAc,EAAE,OAAO,aAAa,KAAG,UAAU,GAAG,SA8F3F,CAAC"}
@@ -3761,9 +3761,15 @@ var composeOfferCard = (offer, input) => {
3761
3761
  sectionType: SectionType.layout
3762
3762
  },
3763
3763
  /**
3764
- * Ad-unit Privacy Policy footer (compliance); a valid href is required for the Tiptap link mark.
3765
- * Its own end-aligned layout packs a fit-content paragraph right; the paragraph's own
3766
- * `textAlign: end` covers the full-width case together they right-align on every host.
3764
+ * Ad-unit Privacy Policy footer (compliance). Its own end-aligned layout packs a fit-content
3765
+ * paragraph right; the paragraph's own `textAlign: end` covers the full-width case — together
3766
+ * they right-align on every host. The link mark rides ONLY an {@link isValidHref}-safe href:
3767
+ * `privacyPolicyUrl` is merchant-typed and only length-checked at the request boundary, an
3768
+ * unsafe href must cost the LINK, never the card (the same URL feeds every offer, so a schema
3769
+ * rejection here would silently drop the whole batch), and `isValidHref` also blocks the
3770
+ * `javascript:`-style schemes that `z.url()` alone would let through. It accepts strictly less
3771
+ * than the TiptapText href union (same token/root-relative regexes + a scheme allowlist), so a
3772
+ * gated href can never fail the parse.
3767
3773
  */
3768
3774
  ...input.privacyPolicyUrl ? [
3769
3775
  {
@@ -3773,7 +3779,7 @@ var composeOfferCard = (offer, input) => {
3773
3779
  align: "end",
3774
3780
  color: TextColorName.subdued,
3775
3781
  fontSize: "extraSmall",
3776
- href: input.privacyPolicyUrl
3782
+ ...isValidHref(input.privacyPolicyUrl) && { href: input.privacyPolicyUrl }
3777
3783
  })
3778
3784
  ],
3779
3785
  sectionType: SectionType.layout