@doswiftly/storefront-operations 22.6.0 → 22.8.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 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.6.0
30
+ - **Schema version**: 22.8.0
31
31
  - **Queries**: 52
32
32
  - **Mutations**: 44
33
33
  - **Fragments**: 105
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 22.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9039ba1: Add `getAssetPrefix()` for serving your build's static assets from a CDN domain.
8
+
9
+ **Why**: A build's JavaScript, CSS, and font files (`/_next/static/*`) are content-hashed and immutable. Serving them from a CDN domain — rather than your app origin — makes them cache-friendly and keeps them off your storefront server's request path.
10
+
11
+ **Additive (backward-compatible)**: a new export from `@doswiftly/storefront-sdk/next`. Nothing changes until you opt in.
12
+
13
+ **Usage** — add two lines to `next.config`:
14
+
15
+ ```ts
16
+ // next.config.ts
17
+ import { getAssetPrefix } from "@doswiftly/storefront-sdk/next";
18
+
19
+ const nextConfig = {
20
+ assetPrefix: getAssetPrefix(),
21
+ crossOrigin: "anonymous",
22
+ // ...your existing config
23
+ };
24
+ export default nextConfig;
25
+ ```
26
+
27
+ `getAssetPrefix()` returns the CDN base injected by the deploy pipeline (namespaced to your shop), or `undefined` in development and on deploys without a CDN configured — so `next dev` and un-provisioned deploys keep serving assets from the app origin. Pair it with `crossOrigin: 'anonymous'`: the assets then load cross-origin and the CDN sends the matching CORS header (required for fonts).
28
+
29
+ **Migration checklist for existing storefronts**:
30
+ - [ ] Add `assetPrefix: getAssetPrefix()` and `crossOrigin: 'anonymous'` to `next.config`.
31
+ - [ ] Redeploy — the next build's static assets are served from the CDN.
32
+
33
+ (`@doswiftly/storefront-operations` is version-synced with the SDK; no operation changes in this release.)
34
+
3
35
  ## 22.6.0
4
36
 
5
37
  ### Minor Changes
package/llms-full.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # DoSwiftly Storefront Operations — Full Reference
2
2
 
3
- > Schema version: **22.6.0**
3
+ > Schema version: **22.8.0**
4
4
  > 52 queries · 44 mutations · 105 fragments
5
5
 
6
6
  Auto-generated from `.graphql` source files. Do not edit by hand — this file is
package/operations.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "22.6.0",
2
+ "schemaVersion": "22.8.0",
3
3
  "queries": [
4
4
  {
5
5
  "name": "Shop",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doswiftly/storefront-operations",
3
- "version": "22.6.0",
3
+ "version": "22.8.0",
4
4
  "description": "GraphQL operations for DoSwiftly Storefront - SSOT from backend",
5
5
  "homepage": "https://doswiftly.pl",
6
6
  "publishConfig": {