fix(analytics): fix type of provider option (#12642)
This commit is contained in:
5
.changeset/brown-badgers-visit.md
Normal file
5
.changeset/brown-badgers-visit.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/analytics": patch
|
||||
---
|
||||
|
||||
fix(analytics): fix type of provider option
|
||||
@@ -7,7 +7,7 @@ export type AnalyticsModuleOptions = Partial<ModuleServiceInitializeOptions> & {
|
||||
/**
|
||||
* Providers to be registered
|
||||
*/
|
||||
provider?: {
|
||||
providers?: {
|
||||
/**
|
||||
* The module provider to be registered
|
||||
*/
|
||||
@@ -20,5 +20,5 @@ export type AnalyticsModuleOptions = Partial<ModuleServiceInitializeOptions> & {
|
||||
* key value pair of the configuration to be passed to the provider constructor
|
||||
*/
|
||||
options?: Record<string, unknown>
|
||||
}
|
||||
}[]
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -33,10 +33,12 @@ module.exports = defineConfig({
|
||||
{
|
||||
resolve: "@medusajs/medusa/analytics",
|
||||
options: {
|
||||
provider: {
|
||||
resolve: "@medusajs/analytics-local",
|
||||
id: "local",
|
||||
},
|
||||
providers: [
|
||||
{
|
||||
resolve: "@medusajs/analytics-local",
|
||||
id: "local",
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -50,14 +50,16 @@ module.exports = defineConfig({
|
||||
{
|
||||
resolve: "@medusajs/medusa/analytics",
|
||||
options: {
|
||||
provider: {
|
||||
resolve: "@medusajs/analytics-posthog",
|
||||
id: "posthog",
|
||||
options: {
|
||||
posthogEventsKey: process.env.POSTHOG_EVENTS_API_KEY,
|
||||
posthogHost: process.env.POSTHOG_HOST,
|
||||
},
|
||||
},
|
||||
providers: [
|
||||
{
|
||||
resolve: "@medusajs/analytics-posthog",
|
||||
id: "posthog",
|
||||
options: {
|
||||
posthogEventsKey: process.env.POSTHOG_EVENTS_API_KEY,
|
||||
posthogHost: process.env.POSTHOG_HOST,
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -6485,9 +6485,9 @@ export const generatedEditDates = {
|
||||
"app/commerce-modules/tax/tax-provider/page.mdx": "2025-05-20T07:51:40.711Z",
|
||||
"app/recipes/bundled-products/examples/standard/page.mdx": "2025-05-20T07:51:40.718Z",
|
||||
"app/recipes/bundled-products/page.mdx": "2025-05-20T07:51:40.718Z",
|
||||
"app/infrastructure-modules/analytics/local/page.mdx": "2025-05-21T14:09:53.772Z",
|
||||
"app/infrastructure-modules/analytics/local/page.mdx": "2025-05-29T07:08:55.749Z",
|
||||
"app/infrastructure-modules/analytics/page.mdx": "2025-05-26T14:48:25.803Z",
|
||||
"app/infrastructure-modules/analytics/posthog/page.mdx": "2025-05-21T14:09:59.162Z",
|
||||
"app/infrastructure-modules/analytics/posthog/page.mdx": "2025-05-29T07:08:23.727Z",
|
||||
"references/analytics/interfaces/analytics.IAnalyticsModuleService/page.mdx": "2025-05-21T14:21:59.325Z",
|
||||
"references/analytics_provider/classes/analytics_provider.AbstractAnalyticsProviderService/page.mdx": "2025-05-21T14:22:04.267Z",
|
||||
"references/modules/analytics/page.mdx": "2025-05-21T14:21:59.323Z",
|
||||
|
||||
Reference in New Issue
Block a user