@pradip1995/framework-runtime 0.2.7 → 0.2.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pradip1995/framework-runtime",
3
- "version": "0.2.7",
3
+ "version": "0.2.10",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -16,7 +16,8 @@
16
16
  "dependencies": {
17
17
  "@pradip1995/framework-core": "^0.2.1",
18
18
  "@pradip1995/plugin-sdk": "^0.2.2",
19
- "@pradip1995/medusa-connector": "^0.2.3"
19
+ "@pradip1995/medusa-connector": "^0.2.4",
20
+ "@pradip1995/segment-analytics": "^0.2.0"
20
21
  },
21
22
  "peerDependencies": {
22
23
  "next": ">=15",
@@ -1,4 +1,5 @@
1
1
  import { buildRouteContext } from "@pradip1995/framework-core"
2
+ import { PageAnalytics } from "@pradip1995/segment-analytics"
2
3
  import { resolveServices } from "./register-services"
3
4
  import {
4
5
  applyChromeSegmentData,
@@ -89,7 +90,18 @@ export async function renderConfiguredPage(input: RenderConfiguredPageInput): Pr
89
90
  return <Segment key={pkg} {...props} />
90
91
  })
91
92
 
92
- return <Layout data={data}>{segmentElements}</Layout>
93
+ const pathname = input.slug.length ? `/${input.slug.join("/")}` : "/"
94
+
95
+ return (
96
+ <Layout data={data}>
97
+ <PageAnalytics
98
+ pathname={pathname}
99
+ searchParams={input.searchParams}
100
+ data={data}
101
+ />
102
+ {segmentElements}
103
+ </Layout>
104
+ )
93
105
  } catch (error) {
94
106
  console.error("[storefront] renderConfiguredPage error:", error)
95
107
  const message = error instanceof Error ? error.message : "Unknown error"
@@ -140,6 +140,13 @@ function applyStorefrontDefaults(
140
140
  }
141
141
  }
142
142
 
143
+ if (next.wishlistProductIds === undefined) {
144
+ const ids = workflowData.wishlistProductIds
145
+ if (Array.isArray(ids)) {
146
+ next.wishlistProductIds = ids
147
+ }
148
+ }
149
+
143
150
  return next
144
151
  }
145
152