-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [EXT-3599] Bundle contentful-management with app-sdk. (Fixing p…
…revious PR) (#1556) * feat: add node-resolve Rollup plugin * feat: add external deps to bundle * Revert "revert: expose cma in the sdk [EXT-3599] (#1548)" This reverts commit 9b8684f. * feat: bundle contentful-management in separate file * feat: add jsdelivr config * fix: package version * fix: dependencies * chore: remove global var for non-browser bundle * chore: base package-lock off of canary file
- Loading branch information
Showing
8 changed files
with
294 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { createClient } from 'contentful-management' | ||
import { createAdapter } from './cmaAdapter' | ||
import { CMAClient } from './types/cmaClient.types' | ||
import type { IdsAPI } from './types/api.types' | ||
import type { Channel } from './channel' | ||
|
||
export function createCMAClient(ids: IdsAPI, channel: Channel): CMAClient { | ||
return createClient( | ||
{ apiAdapter: createAdapter(channel) }, | ||
{ | ||
type: 'plain', | ||
defaults: { | ||
environmentId: ids.environmentAlias ?? ids.environment, | ||
spaceId: ids.space, | ||
organizationId: ids.organization, | ||
}, | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.