@contentful/experiences-client 0.1.1 → 0.1.3
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/CHANGELOG.md +20 -0
- package/README.md +4 -4
- package/dist/fetch-experience.d.ts +1 -1
- package/dist/fetch-experience.js +1 -1
- package/dist/fetch-experience.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## 0.1.3 (2026-07-21)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- render missing-component fallback as element in RSC [AIS-316] ([#79](https://github.com/contentful/experiences/pull/79))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated core to 0.5.3
|
|
10
|
+
|
|
11
|
+
## 0.1.2 (2026-07-20)
|
|
12
|
+
|
|
13
|
+
### 🩹 Fixes
|
|
14
|
+
|
|
15
|
+
- rename experiences-core to experiences-sdk-core [AIS-305] ([#76](https://github.com/contentful/experiences/pull/76))
|
|
16
|
+
|
|
17
|
+
### 🧱 Updated Dependencies
|
|
18
|
+
|
|
19
|
+
- Updated core to 0.5.2
|
|
20
|
+
|
|
1
21
|
## 0.1.1 (2026-07-17)
|
|
2
22
|
|
|
3
23
|
### 🧱 Updated Dependencies
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @contentful/experiences-client
|
|
2
2
|
|
|
3
|
-
> **Internal package.** Published to npm so framework adapters can resolve it at install time, but not
|
|
3
|
+
> **Internal package.** Published to npm so framework adapters can resolve it at install time, but you're not meant to import it directly. It comes in transitively via the framework adapter (`@contentful/experiences-react`, `@contentful/experiences-svelte`, etc.).
|
|
4
4
|
|
|
5
|
-
Isolates `@contentful/experience-delivery` — the generated experience delivery client — so that `@contentful/experiences-core` stays zero-dep and framework adapters that don't need network access don't pull it in transitively.
|
|
5
|
+
Isolates `@contentful/experience-delivery` — the generated experience delivery client — so that `@contentful/experiences-sdk-core` stays zero-dep and framework adapters that don't need network access don't pull it in transitively.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -97,7 +97,7 @@ const client = new ContentfulViewDeliveryClient({
|
|
|
97
97
|
|
|
98
98
|
## Why a separate package?
|
|
99
99
|
|
|
100
|
-
`@contentful/experiences-core` is intentionally zero-dep and runtime-neutral — it must stay importable without pulling in any network or platform code. The experience delivery client is large (~3,000 generated files) and only needed when doing server-side fetching. Isolating it here means:
|
|
100
|
+
`@contentful/experiences-sdk-core` is intentionally zero-dep and runtime-neutral — it must stay importable without pulling in any network or platform code. The experience delivery client is large (~3,000 generated files) and only needed when doing server-side fetching. Isolating it here means:
|
|
101
101
|
|
|
102
102
|
- Core stays lean and usable in any environment (edge, SSR, test fixtures).
|
|
103
103
|
- Future adapters that render from local fixtures or a custom fetch path don't pay the delivery client's weight.
|
|
@@ -108,7 +108,7 @@ const client = new ContentfulViewDeliveryClient({
|
|
|
108
108
|
## Package conventions
|
|
109
109
|
|
|
110
110
|
- Do not import `@contentful/experience-delivery` from anywhere except this package.
|
|
111
|
-
- Re-export only what framework adapters need to surface to
|
|
111
|
+
- Re-export only what framework adapters need to surface to their users.
|
|
112
112
|
- Keep `fetchExperience` thin — fetch + cast + resolve. Business logic belongs in `packages/core`.
|
|
113
113
|
- Name mappings between SDK options and delivery-client options live in `create-client.ts` — one place to change.
|
|
114
114
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContentfulViewDeliveryClient } from '@contentful/experience-delivery';
|
|
2
|
-
import { ResolverConfig, ResolveExperienceOptions, PortableRenderPlan } from '@contentful/experiences-core';
|
|
2
|
+
import { ResolverConfig, ResolveExperienceOptions, PortableRenderPlan } from '@contentful/experiences-sdk-core';
|
|
3
3
|
|
|
4
4
|
type ExperienceOptions = {
|
|
5
5
|
spaceId: string;
|
package/dist/fetch-experience.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveExperience } from "@contentful/experiences-core";
|
|
1
|
+
import { resolveExperience } from "@contentful/experiences-sdk-core";
|
|
2
2
|
import { createClient } from "./create-client.js";
|
|
3
3
|
async function fetchExperience(experienceOptions, clientOptions, resolveOptions) {
|
|
4
4
|
const { spaceId, environmentId, experienceId, locale } = experienceOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/fetch-experience.ts"],"sourcesContent":["import type { ContentfulViewDeliveryClient } from '@contentful/experience-delivery';\nimport { resolveExperience } from '@contentful/experiences-core';\nimport type {\n ExperiencePayload,\n PortableRenderPlan,\n ResolveExperienceOptions,\n ResolverConfig,\n} from '@contentful/experiences-core';\nimport { createClient } from './create-client.js';\n\nexport type ExperienceOptions = {\n spaceId: string;\n environmentId: string;\n experienceId: string;\n locale?: string;\n};\n\nexport type ClientOptions =\n | { accessToken: string; host?: string }\n | { client: ContentfulViewDeliveryClient };\n\nexport type ResolveOptions = {\n config: ResolverConfig;\n context?: ResolveExperienceOptions['experience'];\n};\n\nexport async function fetchExperience(\n experienceOptions: ExperienceOptions,\n clientOptions: ClientOptions,\n resolveOptions: ResolveOptions\n): Promise<PortableRenderPlan> {\n const { spaceId, environmentId, experienceId, locale } = experienceOptions;\n const { config, context } = resolveOptions;\n\n const client =\n 'client' in clientOptions\n ? clientOptions.client\n : createClient({ accessToken: clientOptions.accessToken, host: clientOptions.host });\n\n // Response from the experience delivery client is structurally compatible with ExperiencePayload (superset)\n const payload = (await client.view.getExperience(spaceId, environmentId, experienceId, {\n locale,\n })) as unknown as ExperiencePayload;\n\n return resolveExperience(payload, config, { experience: context });\n}\n"],"mappings":"AACA,SAAS,yBAAyB;AAOlC,SAAS,oBAAoB;AAkB7B,eAAsB,gBACpB,mBACA,eACA,gBAC6B;AAC7B,QAAM,EAAE,SAAS,eAAe,cAAc,OAAO,IAAI;AACzD,QAAM,EAAE,QAAQ,QAAQ,IAAI;AAE5B,QAAM,SACJ,YAAY,gBACR,cAAc,SACd,aAAa,EAAE,aAAa,cAAc,aAAa,MAAM,cAAc,KAAK,CAAC;AAGvF,QAAM,UAAW,MAAM,OAAO,KAAK,cAAc,SAAS,eAAe,cAAc;AAAA,IACrF;AAAA,EACF,CAAC;AAED,SAAO,kBAAkB,SAAS,QAAQ,EAAE,YAAY,QAAQ,CAAC;AACnE;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/fetch-experience.ts"],"sourcesContent":["import type { ContentfulViewDeliveryClient } from '@contentful/experience-delivery';\nimport { resolveExperience } from '@contentful/experiences-sdk-core';\nimport type {\n ExperiencePayload,\n PortableRenderPlan,\n ResolveExperienceOptions,\n ResolverConfig,\n} from '@contentful/experiences-sdk-core';\nimport { createClient } from './create-client.js';\n\nexport type ExperienceOptions = {\n spaceId: string;\n environmentId: string;\n experienceId: string;\n locale?: string;\n};\n\nexport type ClientOptions =\n | { accessToken: string; host?: string }\n | { client: ContentfulViewDeliveryClient };\n\nexport type ResolveOptions = {\n config: ResolverConfig;\n context?: ResolveExperienceOptions['experience'];\n};\n\nexport async function fetchExperience(\n experienceOptions: ExperienceOptions,\n clientOptions: ClientOptions,\n resolveOptions: ResolveOptions\n): Promise<PortableRenderPlan> {\n const { spaceId, environmentId, experienceId, locale } = experienceOptions;\n const { config, context } = resolveOptions;\n\n const client =\n 'client' in clientOptions\n ? clientOptions.client\n : createClient({ accessToken: clientOptions.accessToken, host: clientOptions.host });\n\n // Response from the experience delivery client is structurally compatible with ExperiencePayload (superset)\n const payload = (await client.view.getExperience(spaceId, environmentId, experienceId, {\n locale,\n })) as unknown as ExperiencePayload;\n\n return resolveExperience(payload, config, { experience: context });\n}\n"],"mappings":"AACA,SAAS,yBAAyB;AAOlC,SAAS,oBAAoB;AAkB7B,eAAsB,gBACpB,mBACA,eACA,gBAC6B;AAC7B,QAAM,EAAE,SAAS,eAAe,cAAc,OAAO,IAAI;AACzD,QAAM,EAAE,QAAQ,QAAQ,IAAI;AAE5B,QAAM,SACJ,YAAY,gBACR,cAAc,SACd,aAAa,EAAE,aAAa,cAAc,aAAa,MAAM,cAAc,KAAK,CAAC;AAGvF,QAAM,UAAW,MAAM,OAAO,KAAK,cAAc,SAAS,eAAe,cAAc;AAAA,IACrF;AAAA,EACF,CAAC;AAED,SAAO,kBAAkB,SAAS,QAAQ,EAAE,YAAY,QAAQ,CAAC;AACnE;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ContentfulViewDelivery } from '@contentful/experience-delivery';
|
|
|
2
2
|
export { ContentfulViewDelivery, ContentfulViewDeliveryClient } from '@contentful/experience-delivery';
|
|
3
3
|
export { CreateClientOptions, createClient } from './create-client.js';
|
|
4
4
|
export { ClientOptions, ExperienceOptions, ResolveOptions, fetchExperience } from './fetch-experience.js';
|
|
5
|
-
import '@contentful/experiences-core';
|
|
5
|
+
import '@contentful/experiences-sdk-core';
|
|
6
6
|
|
|
7
7
|
declare const NotFoundError: typeof ContentfulViewDelivery.NotFoundError;
|
|
8
8
|
type NotFoundError = InstanceType<typeof ContentfulViewDelivery.NotFoundError>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experiences-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Delivery client + fetchExperience for Contentful Experiences",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@contentful/experience-delivery": "1.0.0-dev.3",
|
|
34
|
-
"@contentful/experiences-core": "0.5.
|
|
34
|
+
"@contentful/experiences-sdk-core": "0.5.3"
|
|
35
35
|
}
|
|
36
36
|
}
|