@ethisyscore/vite-plugin 1.111.0 → 1.112.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/dist/index.cjs +34 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -6
- package/dist/index.d.ts +14 -6
- package/dist/index.js +34 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -940,10 +940,42 @@ var PLATFORM_REACT_EXTERNALS = [
|
|
|
940
940
|
"date-fns",
|
|
941
941
|
"@ethisyscore/components-react",
|
|
942
942
|
"@ethisyscore/extension-runtime",
|
|
943
|
-
"@ethisyscore/extension-runtime/plugin"
|
|
943
|
+
"@ethisyscore/extension-runtime/plugin",
|
|
944
|
+
// Externalised, not bundled, and not merely to save weight: bundling it gave
|
|
945
|
+
// every page its OWN `QueryClient`, so a mutation on the detail page
|
|
946
|
+
// invalidated a cache the list page could not see and a deleted row survived
|
|
947
|
+
// until a browser reload. One host-realm module instance is one cache across
|
|
948
|
+
// every plugin surface.
|
|
949
|
+
//
|
|
950
|
+
// Requires a host whose `hostModuleRegistry` serves this specifier: an external
|
|
951
|
+
// the deployed host does NOT register is an unresolvable bare import, and the
|
|
952
|
+
// bundle fails to load before any plugin code runs. That is the whole reason
|
|
953
|
+
// the host ships first and plugins rebuild last. The SDK's fallback (see
|
|
954
|
+
// `useSurfaceQueryClient` in plugin-ui) covers the softer case — module served,
|
|
955
|
+
// no client in scope — and cannot cover this one.
|
|
956
|
+
//
|
|
957
|
+
// THE SECOND GATE, and it binds each plugin rather than the estate: one cache
|
|
958
|
+
// means one KEY SPACE, so two owners using the same key now read each other's
|
|
959
|
+
// entry. Measured across the estate before this change: `["currencies"]` is
|
|
960
|
+
// used verbatim by coreconnect-web, bf-hr and bf-legal, from a copied
|
|
961
|
+
// `useCurrencies.ts` — three owners, one key, previously harmless only because
|
|
962
|
+
// each bundle had a cache of its own.
|
|
963
|
+
//
|
|
964
|
+
// A plugin therefore joins the shared cache the moment it is REBUILT on this
|
|
965
|
+
// SDK, and must have owner-namespaced its keys first. That ordering is the
|
|
966
|
+
// enforcement point and it is per plugin: a plugin not yet rebuilt still has
|
|
967
|
+
// its own cache and is unaffected, so this can be rolled out one plugin at a
|
|
968
|
+
// time rather than estate-wide.
|
|
969
|
+
//
|
|
970
|
+
// The ORGANISATION axis needs nothing here, and that was checked rather than
|
|
971
|
+
// assumed: coreconnect-web's AuthContext calls `queryClient.clear()` on logout
|
|
972
|
+
// AND on a live org switch between two non-null tenants, then bumps the
|
|
973
|
+
// authority epoch to force a remount. Plugins sharing that client inherit both.
|
|
974
|
+
// Sharing is in fact stricter than the status quo, where a plugin's private
|
|
975
|
+
// cache is unreachable by the host's teardown.
|
|
976
|
+
"@tanstack/react-query"
|
|
944
977
|
];
|
|
945
978
|
var PLATFORM_REACT_DEDUPE = [
|
|
946
|
-
"@tanstack/react-query",
|
|
947
979
|
"react",
|
|
948
980
|
"react-dom",
|
|
949
981
|
"@ethisyscore/extension-runtime"
|