@amboras-dev/storefront-core 2026.11.0 → 2026.11.1
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/CHANGELOG.md +10 -0
- package/core-manifest.json +1 -1
- package/dist/shell/client-plugin-slot.d.ts +1 -1
- package/dist/shell/client-plugin-slot.d.ts.map +1 -1
- package/dist/shell/client-plugin-slot.js +9 -1
- package/dist/shell/client-plugin-slot.js.map +1 -1
- package/dist/shell/plugin-slot.d.ts +1 -1
- package/dist/shell/plugin-slot.d.ts.map +1 -1
- package/dist/shell/plugin-slot.js +9 -1
- package/dist/shell/plugin-slot.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 2026.11.1
|
|
6
|
+
|
|
7
|
+
- **A broken plugin no longer takes the page down.** Each plugin in `PluginSlot` and
|
|
8
|
+
`ClientPluginSlot` now sits in `<Suspense>` inside its error boundary with an invisible
|
|
9
|
+
fallback. A plugin that throws while rendering on the server used to fail the whole page with
|
|
10
|
+
HTTP 500, and after recovery it painted the "Something went wrong" panel. Now it renders
|
|
11
|
+
nothing, and the other plugins render as normal.
|
|
12
|
+
- **`amboras-check` survives CI publishing.** The `bin` path no longer starts with `./`. npm 11
|
|
13
|
+
dropped the old path during the tag-driven release.
|
|
14
|
+
|
|
5
15
|
## 2026.11.0
|
|
6
16
|
|
|
7
17
|
First release: the template's Locked logic moves into core with unchanged export names.
|
package/core-manifest.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import type { SlotName, SlotContext } from '../types/plugins.js';
|
|
3
3
|
export interface ClientPluginSlotProps<N extends SlotName = SlotName> {
|
|
4
4
|
/** Same installer contract as PluginSlot — see components/PluginSlot.tsx. Never narrow. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-plugin-slot.d.ts","sourceRoot":"","sources":["../../src/shell/client-plugin-slot.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"client-plugin-slot.d.ts","sourceRoot":"","sources":["../../src/shell/client-plugin-slot.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAiC,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAmB/F,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ;IAClE,2FAA2F;IAC3F,IAAI,EAAE,CAAC,CAAA;IACP,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;IACxB;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,QAAQ,EAAE,EACnD,IAAI,EACJ,OAA8B,EAC9B,QAAQ,GACT,EAAE,qBAAqB,CAAC,CAAC,CAAC,kDA+C1B"}
|
|
@@ -4,6 +4,7 @@ import { useQuery } from '@tanstack/react-query';
|
|
|
4
4
|
import { usePluginRegistry } from './registry-context.js';
|
|
5
5
|
import { ErrorBoundary } from './error-boundary.js';
|
|
6
6
|
import { medusaBackendUrl, storeHeaders } from '../lib/store-api.js';
|
|
7
|
+
import { Suspense } from 'react';
|
|
7
8
|
async function fetchPluginConfigs() {
|
|
8
9
|
try {
|
|
9
10
|
const res = await fetch(`${medusaBackendUrl()}/store/integrations/active`, {
|
|
@@ -55,7 +56,14 @@ export function ClientPluginSlot({ name, context = {}, children, }) {
|
|
|
55
56
|
const ctx = context;
|
|
56
57
|
const ctxProps = Object.fromEntries(propsFromContext.map((k) => [k, ctx[k]]));
|
|
57
58
|
const cfgProps = Object.fromEntries(Object.entries(propsFromConfig).map(([prop, key]) => [prop, configs[id]?.[key]]));
|
|
58
|
-
return (
|
|
59
|
+
return (
|
|
60
|
+
// `fallback` must be a truthy node: ErrorBoundary treats null (and an
|
|
61
|
+
// empty fragment, which crosses the server/client boundary as null)
|
|
62
|
+
// as "no fallback" and paints its "Something went wrong" panel.
|
|
63
|
+
// Suspense makes a render error during SSR client-render this plugin
|
|
64
|
+
// only, instead of failing the whole page with a 500 (an error
|
|
65
|
+
// boundary cannot catch during server rendering).
|
|
66
|
+
_jsx(ErrorBoundary, { fallback: _jsx("span", { hidden: true }), children: _jsx(Suspense, { fallback: null, children: _jsx(Component, { ...ctxProps, ...cfgProps }) }) }, id));
|
|
59
67
|
}) }));
|
|
60
68
|
}
|
|
61
69
|
//# sourceMappingURL=client-plugin-slot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-plugin-slot.js","sourceRoot":"","sources":["../../src/shell/client-plugin-slot.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"client-plugin-slot.js","sourceRoot":"","sources":["../../src/shell/client-plugin-slot.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAGhD,KAAK,UAAU,kBAAk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","sourceRoot":"","sources":["../../src/shell/plugin-slot.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAkB,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAiBhG,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ;IAC5D;;;;;;;OAOG;IACH,IAAI,EAAE,CAAC,CAAA;IACP,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;IACxB;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,cAAc,IACjB,CAAC,SAAS,QAAQ,EAAE,OAAO,eAAe,CAAC,CAAC,CAAC,6DAGpF;AAED;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,CAAC,SAAS,QAAQ,EAAE,EACnD,IAAI,EACJ,OAA8B,EAC9B,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG;IAAE,QAAQ,EAAE,cAAc,CAAA;CAAE,2DAqCnD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getPluginConfigs } from '../lib/plugin-config.js';
|
|
3
3
|
import { ErrorBoundary } from './error-boundary.js';
|
|
4
|
+
import { Suspense } from 'react';
|
|
4
5
|
/**
|
|
5
6
|
* Slots the registry map is ALREADY rendering elsewhere, so a slot tag naming one
|
|
6
7
|
* must render nothing:
|
|
@@ -54,7 +55,14 @@ export async function PluginSlot({ name, context = {}, children, registry, }) {
|
|
|
54
55
|
const ctx = context;
|
|
55
56
|
const ctxProps = Object.fromEntries(propsFromContext.map((k) => [k, ctx[k]]));
|
|
56
57
|
const cfgProps = Object.fromEntries(Object.entries(propsFromConfig).map(([prop, key]) => [prop, configs[id]?.[key]]));
|
|
57
|
-
return (
|
|
58
|
+
return (
|
|
59
|
+
// `fallback` must be a truthy node: ErrorBoundary treats null (and an
|
|
60
|
+
// empty fragment, which crosses the server/client boundary as null)
|
|
61
|
+
// as "no fallback" and paints its "Something went wrong" panel.
|
|
62
|
+
// Suspense makes a render error during SSR client-render this plugin
|
|
63
|
+
// only, instead of failing the whole page with a 500 (an error
|
|
64
|
+
// boundary cannot catch during server rendering).
|
|
65
|
+
_jsx(ErrorBoundary, { fallback: _jsx("span", { hidden: true }), children: _jsx(Suspense, { fallback: null, children: _jsx(Component, { ...ctxProps, ...cfgProps }) }) }, id));
|
|
58
66
|
}) }));
|
|
59
67
|
}
|
|
60
68
|
//# sourceMappingURL=plugin-slot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-slot.js","sourceRoot":"","sources":["../../src/shell/plugin-slot.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"plugin-slot.js","sourceRoot":"","sources":["../../src/shell/plugin-slot.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAGhD;;;;;;;;;;;;GAYG;AACH,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAS,CAAC,MAAM,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC,CAAA;AA0BnF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAwB;IACvD,OAAO,KAAK,UAAU,eAAe,CAAqB,KAAyB;QACjF,OAAO,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,QAAQ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oE;YACpE,gEAAgE;YAChE,qEAAqE;YACrE,+DAA+D;YAC/D,kDAAkD;YAClD,KAAC,aAAa,IAAU,QAAQ,EAAE,eAAM,MAAM,SAAG,YAC/C,KAAC,QAAQ,IAAC,QAAQ,EAAE,IAAI,YACtB,KAAC,SAAS,OAAK,QAAQ,KAAM,QAAQ,GAAI,GAChC,IAHO,EAAE,CAIN,CACjB,CAAA;QACH,CAAC,CAAC,GACD,CACJ,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amboras-dev/storefront-core",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.1",
|
|
4
4
|
"description": "The platform half of every Amboras storefront: cart, checkout, payments, auth, orders, subscriptions, catalogue data, analytics, consent, plugin slots, edge proxy and the Next config. Stores keep only design; they import this. ESM, React 19, Next 16.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"./presets/*": "./presets/*"
|
|
68
68
|
},
|
|
69
69
|
"bin": {
|
|
70
|
-
"amboras-check": "
|
|
70
|
+
"amboras-check": "bin/amboras-check.mjs"
|
|
71
71
|
},
|
|
72
72
|
"files": [
|
|
73
73
|
"dist",
|