@contentful/app-sdk 4.0.0 → 4.0.1
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 +45 -3
- package/dist/cf-extension.css +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,54 @@
|
|
|
1
|
+
## [4.0.1](https://github.com/contentful/ui-extensions-sdk/compare/v4.0.0...v4.0.1) (2021-10-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* measure old css file usage ([#1010](https://github.com/contentful/ui-extensions-sdk/issues/1010)) ([7dcd079](https://github.com/contentful/ui-extensions-sdk/commit/7dcd079c5f17f0a4e01e48e8184f0285dd0e9e1b))
|
|
7
|
+
|
|
1
8
|
# [4.0.0](https://github.com/contentful/ui-extensions-sdk/compare/v3.42.0...v4.0.0) (2021-10-05)
|
|
2
9
|
|
|
10
|
+
This major release of the Contentful App SDK provides two great features to make app development for Contentful even easier.
|
|
11
|
+
|
|
12
|
+
## Contentful Management API Adapter
|
|
13
|
+
|
|
14
|
+
You can now use the [`contentful-management` library](https://github.com/contentful/contentful-management.js) within apps. This gives you access to a huge load of APIs that were previously not available. Also, you can reuse existing code utilising the `contentful-management` library which makes it easier to convert your custom Contentful scripts to convenient apps.
|
|
15
|
+
|
|
16
|
+
After installing the library, a new client can be created using the `cmaAdapter` which is exposed by the App SDK. There is no need to deal with authentication and tokens.
|
|
17
|
+
|
|
18
|
+
```javascript
|
|
19
|
+
import { createClient } from 'contentful-management'
|
|
20
|
+
|
|
21
|
+
const nestedClient = createClient({ apiAdapter: sdk.cmaAdapter })
|
|
22
|
+
|
|
23
|
+
const cma = createClient(
|
|
24
|
+
{ apiAdapter: sdk.cmaAdapter },
|
|
25
|
+
{
|
|
26
|
+
type: 'plain',
|
|
27
|
+
defaults: {
|
|
28
|
+
environmentId: sdk.ids.environment,
|
|
29
|
+
spaceId: sdk.ids.space,
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Please note that not all methods are available. You can only use methods that access entities within the app’s space environment.
|
|
36
|
+
|
|
37
|
+
## Deprecation of Space API
|
|
38
|
+
|
|
39
|
+
The Space API (`sdk.space`) is deprecated and will be removed in a future major update of the App SDK. We recommend using the new CMA Adapters to replace existing Space API functionality.
|
|
3
40
|
|
|
4
|
-
|
|
41
|
+
## Typings revamp
|
|
5
42
|
|
|
43
|
+
In the previous version of the App SDK app developers sometimes struggled with our provided types. For version 4 we took the opportunity to revamp and significantly improve the types of the whole library. These changes are likely to break existing TypeScript apps as we are more specific about each property and also changed the usage of generics on API methods.
|
|
44
|
+
The new types of the App SDK now align with the types of the `contentful-management` library.
|
|
45
|
+
To get the best development experience, you need to install `contentful-management` as a separate dependency.
|
|
6
46
|
|
|
7
|
-
|
|
47
|
+
```bash
|
|
48
|
+
npm install contentful-management
|
|
49
|
+
```
|
|
8
50
|
|
|
9
|
-
|
|
51
|
+
We do not include this dependency by default to keep your dependency tree clean and ensure small bundle sizes and short build times.
|
|
10
52
|
|
|
11
53
|
# [3.42.0](https://github.com/contentful/ui-extensions-sdk/compare/v3.41.0...v3.42.0) (2021-10-01)
|
|
12
54
|
|
package/dist/cf-extension.css
CHANGED