payload-live-preview 2.2.1 → 2.2.2

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.
Files changed (55) hide show
  1. package/README.md +3 -3
  2. package/dist/adapters/astro/index.d.ts +2 -2
  3. package/dist/adapters/astro/index.js +1 -1
  4. package/dist/adapters/astro/index.js.map +1 -1
  5. package/dist/adapters/astro/middleware-entry.js +1 -1
  6. package/dist/adapters/astro/middleware-entry.js.map +1 -1
  7. package/dist/adapters/nextjs/index.d.ts +1 -1
  8. package/dist/adapters/nextjs/index.js +1 -1
  9. package/dist/adapters/nextjs/index.js.map +1 -1
  10. package/dist/adapters/nuxt/index.d.ts +2 -2
  11. package/dist/adapters/nuxt/index.js +1 -1
  12. package/dist/adapters/nuxt/index.js.map +1 -1
  13. package/dist/adapters/sveltekit/index.d.ts +2 -2
  14. package/dist/adapters/sveltekit/index.js +1 -1
  15. package/dist/adapters/sveltekit/index.js.map +1 -1
  16. package/dist/client.cjs +1 -1
  17. package/dist/client.cjs.map +1 -1
  18. package/dist/client.js +1 -1
  19. package/dist/client.js.map +1 -1
  20. package/dist/core.cjs +1 -1
  21. package/dist/core.cjs.map +1 -1
  22. package/dist/core.d.cts +2 -2
  23. package/dist/core.d.ts +2 -2
  24. package/dist/core.js +1 -1
  25. package/dist/core.js.map +1 -1
  26. package/dist/{fragment-endpoint-DGGLIijM.d.ts → fragment-endpoint-CLRpNQ3n.d.ts} +4 -2
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +6 -4
  30. package/dist/index.d.ts +6 -4
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/lean.cjs +1 -1
  34. package/dist/lean.cjs.map +1 -1
  35. package/dist/lean.js +1 -1
  36. package/dist/lean.js.map +1 -1
  37. package/dist/lexical.cjs +1 -1
  38. package/dist/lexical.cjs.map +1 -1
  39. package/dist/lexical.js +1 -1
  40. package/dist/lexical.js.map +1 -1
  41. package/dist/plugins.cjs +1 -1
  42. package/dist/plugins.cjs.map +1 -1
  43. package/dist/plugins.js +1 -1
  44. package/dist/plugins.js.map +1 -1
  45. package/dist/server.cjs +1 -1
  46. package/dist/server.cjs.map +1 -1
  47. package/dist/server.d.cts +4 -2
  48. package/dist/server.d.ts +4 -2
  49. package/dist/server.js +1 -1
  50. package/dist/server.js.map +1 -1
  51. package/dist/structural.cjs +2 -2
  52. package/dist/structural.cjs.map +1 -1
  53. package/dist/structural.js +1 -1
  54. package/dist/structural.js.map +1 -1
  55. package/package.json +6 -4
@@ -4,7 +4,8 @@ import { e as PreviewAuthorizationRequest, f as AuthorizedPreviewScope, A as Aut
4
4
  * The `payload-session` strategy: forward exactly one named cookie to
5
5
  * `GET <serverURL>/api/<usersSlug>/me` and authorize when a user comes back.
6
6
  * A cookie-only request preserves working Payload 2 sessions. When `/me`
7
- * reports no user, one retry adds an `Origin` for Payload 3's CSRF check.
7
+ * reports no user, one retry adds an `Origin` for Payload 3's CSRF check, and
8
+ * an endpoint that needed it gets it on the first request from then on.
8
9
  */
9
10
 
10
11
  /** A `fetch`-compatible function, injectable for tests. */
@@ -27,7 +28,8 @@ interface PayloadSessionStrategy {
27
28
  /**
28
29
  * Send this listed origin with the cookie from the first request. Without
29
30
  * it, try the existing cookie-only request, then the origin of `serverURL`
30
- * once when `/me` reports a null user. Draft reads keep the accepted headers.
31
+ * once when `/me` reports a null user; an endpoint that needed the origin
32
+ * gets it first from then on. Draft reads keep the accepted headers.
31
33
  */
32
34
  readonly origin?: string;
33
35
  /** Upper bound for the `/me` round trip. Below 250 ms is raised to 250 ms; default 3000. */