Skip to content

Commit 8896eb6

Browse files
committed
Update auth client and versioning
1 parent e59ebd5 commit 8896eb6

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

src/Umbraco.Forms.Integrations.Crm.Hubspot/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.Integrations.Integrations.Crm.HubSpot",
33
"name": "Umbraco Integrations Integrations: CRM - HubSpot",
4-
"version": "",
4+
"version": "7.0.0",
55
"extensions": [
66
{
77
"name": "Umbraco EntryPoint",

src/Umbraco.Forms.Integrations.Crm.Hubspot/Client/src/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { manifest as hubspotPropertyEditor } from "./property-editor/manifest.js
55
import { manifests as localizationManifests } from "./lang/manifests.js";
66

77
import { client } from "@umbraco-integrations/hubspot/generated";
8+
import { umbHttpClient } from "@umbraco-cms/backoffice/http-client";
89

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

1617
host.consumeContext(UMB_AUTH_CONTEXT, async (auth) => {
17-
const config = auth?.getOpenApiConfiguration();
18+
if (!auth) return;
1819

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

src/Umbraco.Forms.Integrations.Crm.Hubspot/Umbraco.Forms.Integrations.Crm.Hubspot.csproj

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
88
<EnableDefaultContentItems>false</EnableDefaultContentItems>
99
<StaticWebAssetBasePath>/App_Plugins/HubSpot</StaticWebAssetBasePath>
10+
<CompressionEnabled>false</CompressionEnabled>
1011
</PropertyGroup>
1112

1213
<PropertyGroup>
@@ -62,17 +63,6 @@
6263
<ShouldRunClientAssetsBuild>true</ShouldRunClientAssetsBuild>
6364
</PropertyGroup>
6465
<Target Name="ClientAssetsBuildOutputPath" BeforeTargets="ClientAssetsBuild">
65-
<WriteLinesToFile File="Client\config.outputPath.js" Lines="export const outputPath = '$(Configuration)' !== 'Release' ? '../wwwroot' : '../$(IntermediateOutputPath.Replace('\', '/'))clientassets';" Overwrite="true" />
66-
</Target>
67-
<ItemGroup>
68-
<ClientAssetsInputs Remove="Client\config.outputPath.js" />
69-
</ItemGroup>
70-
71-
<!-- Update umbraco-package.json files with current build version after client assets build -->
72-
<Target Name="UpdatePackageManifestVersion" DependsOnTargets="ClientAssetsBuild" AfterTargets="GetBuildVersion;GetUmbracoBuildVersion">
73-
<ItemGroup>
74-
<_PackageManifestFiles Include="$(IntermediateOutputPath)clientassets\**\umbraco-package.json" />
75-
</ItemGroup>
76-
<JsonPathUpdateValue JsonFile="%(_PackageManifestFiles.FullPath)" Path="$.version" Value="&quot;$(PackageVersion)&quot;" />
66+
<WriteLinesToFile File="Client\config.outputPath.js" Lines="export const outputPath = '../$(IntermediateOutputPath.Replace('\', '/'))clientassets';" Overwrite="true" />
7767
</Target>
7868
</Project>

0 commit comments

Comments
 (0)