Skip to content

Commit 4163119

Browse files
committed
Update auth client config and versioning
1 parent 5caae88 commit 4163119

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/Umbraco.Cms.Integrations.Commerce.Shopify/Client/public/umbraco-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "Umbraco.Cms.Integrations.Commerce.Shopify",
33
"name": "Umbraco CMS Integrations: Commerce - Shopify",
4-
"version": "",
4+
"version": "4.0.0",
55
"extensions": [
66
{
77
"name": "Umbraco EntryPoint",

src/Umbraco.Cms.Integrations.Commerce.Shopify/Client/src/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { manifest as shopifyContext } from "./context/manifests";
44
import { manifests as picker } from "./property-editor/manifests.js";
55
import { manifest as shopifyModal } from "./modal/manifests.js";
66
import { client } from "@umbraco-integrations/shopify/generated";
7+
import { umbHttpClient } from "@umbraco-cms/backoffice/http-client";
78

89
export const onInit: UmbEntryPointOnInit = (host, extensionRegistry) => {
910
extensionRegistry.registerMany([
@@ -13,12 +14,8 @@ export const onInit: UmbEntryPointOnInit = (host, extensionRegistry) => {
1314
]);
1415

1516
host.consumeContext(UMB_AUTH_CONTEXT, async (auth) => {
16-
const config = auth?.getOpenApiConfiguration();
17+
if (!auth) return;
1718

18-
client.setConfig({
19-
auth: config?.token ?? undefined,
20-
baseUrl: config?.base ?? "",
21-
credentials: config?.credentials ?? "same-origin",
22-
});
19+
client.setConfig(umbHttpClient.getConfig());
2320
});
2421
};

src/Umbraco.Cms.Integrations.Commerce.Shopify/Umbraco.Cms.Integrations.Commerce.Shopify.csproj

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<PackageIconUrl></PackageIconUrl>
1717
<PackageProjectUrl>https://github.com/umbraco/Umbraco.Cms.Integrations/tree/main-v14/src/Umbraco.Cms.Integrations.Commerce.Shopify</PackageProjectUrl>
1818
<RepositoryUrl>https://github.com/umbraco/Umbraco.Cms.Integrations</RepositoryUrl>
19-
<Version>3.1.0</Version>
19+
<Version>4.0.0</Version>
2020
<Authors>Umbraco HQ</Authors>
2121
<Company>Umbraco</Company>
2222
<PackageIcon>shopify.png</PackageIcon>
@@ -28,10 +28,13 @@
2828
<SupportedPlatform Include="browser" />
2929
</ItemGroup>
3030

31+
<PropertyGroup>
32+
<UmbracoCmsPackageVersion>[16.0.0, 17)</UmbracoCmsPackageVersion>
33+
</PropertyGroup>
3134
<ItemGroup>
32-
<PackageReference Include="Umbraco.Cms.Api.Common" Version="[15.0.0, 16)" />
33-
<PackageReference Include="Umbraco.Cms.Api.Management" Version="[15.0.0, 16)" />
34-
<PackageReference Include="Umbraco.Cms.Web.Common" Version="[15.0.0, 16)" />
35+
<PackageReference Include="Umbraco.Cms.Api.Common" Version="$(UmbracoCmsPackageVersion)" />
36+
<PackageReference Include="Umbraco.Cms.Api.Management" Version="$(UmbracoCmsPackageVersion)" />
37+
<PackageReference Include="Umbraco.Cms.Web.Common" Version="$(UmbracoCmsPackageVersion)" />
3538
</ItemGroup>
3639

3740
<ItemGroup>

0 commit comments

Comments
 (0)