@decocms/apps-magento 7.64.2 → 7.65.0
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 +4 -4
- package/src/README.md +2 -2
- package/src/__tests__/graphql.test.ts +3 -3
- package/src/client.ts +1 -1
- package/src/middleware.ts +2 -2
- package/src/utils/client/types.ts +1 -1
- package/src/utils/transform.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/apps-magento",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.65.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Deco commerce app: Magento integration",
|
|
6
6
|
"repository": {
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"lint:unused": "knip"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@decocms/blocks": "7.
|
|
30
|
-
"@decocms/apps-commerce": "7.
|
|
31
|
-
"@decocms/tanstack": "7.
|
|
29
|
+
"@decocms/blocks": "7.65.0",
|
|
30
|
+
"@decocms/apps-commerce": "7.65.0",
|
|
31
|
+
"@decocms/tanstack": "7.65.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^19.0.0",
|
package/src/README.md
CHANGED
|
@@ -13,7 +13,7 @@ the original deco-cx/apps repo and need adaptation passes (Deno → Node,
|
|
|
13
13
|
ctx-based to client-based state access, cookie helpers from
|
|
14
14
|
`@decocms/start/sdk/cookie`).
|
|
15
15
|
|
|
16
|
-
A real-world consumer (
|
|
16
|
+
A real-world consumer (a production Magento storefront) is wiring magento
|
|
17
17
|
in-site today using a thin adapter that wraps the legacy `magento/mod.ts`
|
|
18
18
|
shape. Their adapter is the migration target — once this package covers
|
|
19
19
|
the surface area they need, the in-site copy goes away.
|
|
@@ -54,7 +54,7 @@ above is a hard requirement of this port.
|
|
|
54
54
|
|
|
55
55
|
## Why a stub now
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
A production Magento storefront's migration hit a HIGH parity finding:
|
|
58
58
|
|
|
59
59
|
```
|
|
60
60
|
invoke(magento/loaders/features) failed: handler not found
|
|
@@ -148,15 +148,15 @@ describe("transformFilterGraphQL — merge order", () => {
|
|
|
148
148
|
|
|
149
149
|
describe("formatUrlSuffix", () => {
|
|
150
150
|
it("strips a single leading slash", () => {
|
|
151
|
-
expect(formatUrlSuffix("/
|
|
151
|
+
expect(formatUrlSuffix("/acme/")).toBe("acme/");
|
|
152
152
|
});
|
|
153
153
|
|
|
154
154
|
it("appends trailing slash when missing", () => {
|
|
155
|
-
expect(formatUrlSuffix("
|
|
155
|
+
expect(formatUrlSuffix("acme")).toBe("acme/");
|
|
156
156
|
});
|
|
157
157
|
|
|
158
158
|
it("leaves trailing slash alone", () => {
|
|
159
|
-
expect(formatUrlSuffix("
|
|
159
|
+
expect(formatUrlSuffix("acme/")).toBe("acme/");
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
|
package/src/client.ts
CHANGED
|
@@ -58,7 +58,7 @@ export interface MagentoCartConfigs {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export interface MagentoConfig {
|
|
61
|
-
/** Magento storefront base URL, e.g. `https://loja.
|
|
61
|
+
/** Magento storefront base URL, e.g. `https://loja.acme.com.br/` */
|
|
62
62
|
baseUrl: string;
|
|
63
63
|
/** Bearer token for `Authorization` header on admin REST calls */
|
|
64
64
|
apiKey: string;
|
package/src/middleware.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* after checkout (`changeCardIdAfterCheckout`) and seeded the
|
|
6
6
|
* `form_key` for anonymous sessions. Both flows touched response
|
|
7
7
|
* headers and `customer/section/load` endpoints — non-trivial port,
|
|
8
|
-
* deferred to a follow-up PR. Today
|
|
9
|
-
*
|
|
8
|
+
* deferred to a follow-up PR. Today a production Magento storefront
|
|
9
|
+
* handles cart reconciliation on the client.
|
|
10
10
|
*
|
|
11
11
|
* Shape matches `@decocms/apps-commerce/app-types` so it can be
|
|
12
12
|
* plugged into the autoconfig pipeline once magento is registered
|
|
@@ -24,7 +24,7 @@ export interface Customer {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* `carbono-customer` slice.
|
|
27
|
+
* `carbono-customer` slice. A storefront-specific overlay that mirrors the
|
|
28
28
|
* `customer` slice plus a website/store id pair and a normalized email.
|
|
29
29
|
* Other magento sites that don't run the Carbono module will get this
|
|
30
30
|
* absent; loaders/user.ts checks for it before mapping to a Person.
|
package/src/utils/transform.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* Subset of `deco-cx/apps/magento/utils/transform.ts` — only the
|
|
7
7
|
* functions the PDP loader needs (toProduct, toOffer, toImages, toURL,
|
|
8
8
|
* toBreadcrumbList, toSeo). The GraphQL-side helpers (toProductGraphQL,
|
|
9
|
-
* toAggOfferGraphQL, toProductListingPageGraphQL, …) and the
|
|
10
|
-
* specific helpers (toReviewAmasty, toLiveloPoints) are intentionally
|
|
9
|
+
* toAggOfferGraphQL, toProductListingPageGraphQL, …) and the
|
|
10
|
+
* storefront-specific helpers (toReviewAmasty, toLiveloPoints) are intentionally
|
|
11
11
|
* excluded — they land in separate follow-up PRs alongside the loaders
|
|
12
12
|
* that consume them.
|
|
13
13
|
*
|