@doswiftly/storefront-operations 22.0.0 → 22.2.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.
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +46 -0
- package/llms-full.txt +1 -1
- package/operations.json +1 -1
- package/package.json +2 -1
package/AGENTS.md
CHANGED
|
@@ -27,7 +27,7 @@ consumer's `codegen.ts` references this package's `.graphql` files as
|
|
|
27
27
|
live in the consumer's repo.
|
|
28
28
|
|
|
29
29
|
<!-- AUTOGEN:STATS:BEGIN — auto-regenerated, do not edit by hand -->
|
|
30
|
-
- **Schema version**: 22.
|
|
30
|
+
- **Schema version**: 22.2.0
|
|
31
31
|
- **Queries**: 52
|
|
32
32
|
- **Mutations**: 44
|
|
33
33
|
- **Fragments**: 105
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 22.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 27934d1: Server `getStorefrontClient`: forwarded-IP signing is now **opt-in** via `getBuyerIp`.
|
|
8
|
+
|
|
9
|
+
Previously the server client auto-read the buyer IP through `next/headers` on every
|
|
10
|
+
request. That is a dynamic API and is illegal in statically-generated / ISR routes —
|
|
11
|
+
it crashed such pages with "Page changed from static to dynamic at runtime".
|
|
12
|
+
|
|
13
|
+
Forwarded-IP is now wired only when you pass `getBuyerIp`, which you should do **only
|
|
14
|
+
on routes that are already dynamic** (per-request rendered). Without it the client is
|
|
15
|
+
a fully static-safe, inert pass-through.
|
|
16
|
+
|
|
17
|
+
Migration — to keep forwarding the buyer IP, pass `getBuyerIp` on your dynamic routes:
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { headers } from "next/headers";
|
|
21
|
+
|
|
22
|
+
getStorefrontClient({
|
|
23
|
+
apiUrl,
|
|
24
|
+
shopSlug,
|
|
25
|
+
getBuyerIp: async () => (await headers()).get("cf-connecting-ip"),
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 22.1.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
- 32ee745: Forward the real buyer IP from server-rendered storefronts (per-buyer rate limiting)
|
|
34
|
+
|
|
35
|
+
A server-rendered (BFF) storefront fetches from its own server, so the API sees one
|
|
36
|
+
source IP for every buyer and per-IP rate limits collapse onto that single address.
|
|
37
|
+
The server client now forwards the real buyer IP to the API so rate limiting applies
|
|
38
|
+
per buyer again.
|
|
39
|
+
|
|
40
|
+
**Automatic on the server — no wiring, fully backward-compatible.** Call
|
|
41
|
+
`getStorefrontClient({ apiUrl, shopSlug })` as before; forwarding configures itself
|
|
42
|
+
and stays inert when it cannot apply, so existing setups are unaffected. Server-only.
|
|
43
|
+
|
|
44
|
+
Non-Next server runtimes can supply the buyer IP explicitly via `getBuyerIp` (and
|
|
45
|
+
`getForwardedIpSecret`). The lower-level `forwardedIpMiddleware` is also exported.
|
|
46
|
+
|
|
47
|
+
(`@doswiftly/storefront-operations` is a version-sync bump — no code change.)
|
|
48
|
+
|
|
3
49
|
## 22.0.0
|
|
4
50
|
|
|
5
51
|
### Major Changes
|
package/llms-full.txt
CHANGED
package/operations.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doswiftly/storefront-operations",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.2.0",
|
|
4
4
|
"description": "GraphQL operations for DoSwiftly Storefront - SSOT from backend",
|
|
5
5
|
"homepage": "https://doswiftly.pl",
|
|
6
6
|
"publishConfig": {
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"scripts": {
|
|
42
42
|
"sync": "node scripts/sync-operations.js",
|
|
43
43
|
"validate": "node scripts/validate-operations.js",
|
|
44
|
+
"check:breaking": "node scripts/schema-breaking-gate.js",
|
|
44
45
|
"build": "npm run sync",
|
|
45
46
|
"test": "node --test scripts/__tests__/*.test.js",
|
|
46
47
|
"yalc:push": "yalc publish --push"
|