@customerio/cdp-analytics-browser 0.3.3 → 0.3.4

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.
@@ -195,9 +195,9 @@ async function registerPlugins(
195
195
  const schemaFilter = opts.plan?.track
196
196
  ? await import(
197
197
  /* webpackChunkName: "schemaFilter" */ '../plugins/schema-filter'
198
- ).then((mod) => {
199
- return mod.schemaFilter(opts.plan?.track, legacySettings)
200
- })
198
+ ).then((mod) => {
199
+ return mod.schemaFilter(opts.plan?.track, legacySettings)
200
+ })
201
201
  : undefined
202
202
 
203
203
  const mergedSettings = mergedOptions(legacySettings, options)
@@ -209,12 +209,22 @@ async function registerPlugins(
209
209
  tsubMiddleware
210
210
  ).catch(() => [])
211
211
 
212
- const inAppPlugin = options.integrations?.['Customer.io In-App Plugin'] as InAppPluginSettings
212
+ const inAppPluginName = 'Customer.io In-App Plugin'
213
+ let inAppPluginSettings = mergedSettings[
214
+ inAppPluginName
215
+ ] as InAppPluginSettings
216
+ if (!inAppPluginSettings) {
217
+ inAppPluginSettings = options.integrations?.[
218
+ inAppPluginName
219
+ ] as InAppPluginSettings
220
+ }
221
+
222
+ const inAppPlugin = inAppPluginSettings
213
223
  ? await import(
214
224
  /* webpackChunkName: "inAppPlugin" */ '../plugins/in-app-plugin'
215
- ).then((mod) => {
216
- return mod.InAppPlugin(options.integrations?.['Customer.io In-App Plugin'] as InAppPluginSettings)
217
- })
225
+ ).then((mod) => {
226
+ return mod.InAppPlugin(inAppPluginSettings)
227
+ })
218
228
  : undefined
219
229
 
220
230
  const toRegister = [
@@ -1,2 +1,2 @@
1
1
  // This file is generated.
2
- export const version = '0.3.3'
2
+ export const version = '0.3.4'
@@ -2,7 +2,7 @@ export enum InAppEvents {
2
2
  MessageOpened = 'in-app:message-opened',
3
3
  MessageDismissed = 'in-app:message-dismissed',
4
4
  MessageError = 'in-app:message-error',
5
- MessageAction = 'in-app:message-action'
5
+ MessageAction = 'in-app:message-action',
6
6
  }
7
7
 
8
8
  export const allEvents:string[] = Object.values(InAppEvents);
@@ -35,4 +35,4 @@ export function gistToCIO(gistEvent:string): string {
35
35
  default:
36
36
  return "";
37
37
  }
38
- }
38
+ }