@burdenoff/microfe-security 2026.1013.3 → 2026.1029.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.
@@ -46,7 +46,7 @@ var u = ({ mode: o, routes: s, footerLabel: u, ...d }) => {
46
46
  }),
47
47
  children: /* @__PURE__ */ l(s, {
48
48
  workspaceId: n ?? null,
49
- gateway: "workspace",
49
+ gateway: "global",
50
50
  defaultEnabled: r === "user",
51
51
  children: /* @__PURE__ */ l(u, { ...t })
52
52
  })
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityRootBase.js","names":[],"sources":["../../src/security/SecurityRootBase.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useFeatureFlag } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { SecurityProvider } from './providers/SecurityProvider';\nimport { useTr } from './hooks/useTr';\nimport type { NavItem, SecurityRootProps, SecurityMode } from './types';\nimport { SECURITY_FEATURE_FLAGS } from './constants/featureFlags';\nimport { getNavigationConfig } from './config/navigation';\n\ninterface SecurityRootBaseProps extends SecurityRootProps {\n mode: SecurityMode;\n routes: ReactNode;\n footerLabel: string;\n}\n\n/**\n * Inner component — runs *inside* `<FeatureFlagProvider>` so `useFeatureFlag`\n * always has a parent provider to read from. Prior to the split, the hook was\n * called above the provider, which threw in dev/test entry paths that didn't\n * have a shell-level feature-flag provider mounted above the MFE.\n */\nconst SecurityRootBaseWithFeatureFlags: FC<SecurityRootBaseProps> = ({\n mode,\n routes,\n footerLabel,\n ...props\n}) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const providersEnabled = useFeatureFlag(SECURITY_FEATURE_FLAGS.PROVIDERS_EXPERIMENTAL, false);\n const tr = useTr();\n\n // Strip the Providers child when the flag is off — otherwise admins see a\n // clickable nav link that silently redirects to the security home.\n const filteredNavItem = useMemo(() => {\n const navItem = getNavigationConfig(basePath, mode, tr);\n if (providersEnabled || !navItem.children) return navItem;\n const filterProviders = (items: NavItem[]): NavItem[] =>\n items.filter((c) => c.id !== 'security-providers');\n return { ...navItem, children: filterProviders(navItem.children) };\n }, [basePath, mode, providersEnabled, tr]);\n\n useEffect(() => {\n if (!registerNavItems) return;\n const cleanup = registerNavItems(filteredNavItem);\n return cleanup;\n }, [registerNavItems, filteredNavItem]);\n\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'security-status',\n label: footerLabel,\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, footerLabel]);\n\n return <SecurityProvider {...props}>{routes}</SecurityProvider>;\n};\n\n/**\n * Shared base for all Security root components.\n * Handles provider setup, nav/footer registration, and error boundary wrapping.\n *\n * Split into outer (ErrorBoundary + FeatureFlagProvider) and inner\n * (SecurityRootBaseWithFeatureFlags consumes useFeatureFlag) so the hook\n * always runs inside a provider — see comment on the inner component.\n */\nexport const SecurityRootBase: FC<SecurityRootBaseProps> = (props) => {\n const { workspaceId, mode } = props;\n const tr = useTr();\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {tr(\n 'security.errorBoundary.message',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <FeatureFlagProvider\n workspaceId={workspaceId ?? null}\n gateway=\"workspace\"\n defaultEnabled={mode === 'user'}\n >\n <SecurityRootBaseWithFeatureFlags {...props} />\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;AAuBA,IAAM,KAA+D,EACnE,SACA,WACA,gBACA,GAAG,QACC;CACJ,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,IAAmB,EAAe,EAAuB,wBAAwB,GAAM,EACvF,IAAK,GAAO,EAIZ,IAAkB,QAAc;EACpC,IAAM,IAAU,EAAoB,GAAU,GAAM,EAAG;AACvD,MAAI,KAAoB,CAAC,EAAQ,SAAU,QAAO;EAClD,IAAM,KAAmB,MACvB,EAAM,QAAQ,MAAM,EAAE,OAAO,qBAAqB;AACpD,SAAO;GAAE,GAAG;GAAS,UAAU,EAAgB,EAAQ,SAAS;GAAE;IACjE;EAAC;EAAU;EAAM;EAAkB;EAAG,CAAC;AAyB1C,QAvBA,QAAgB;AACT,QAEL,QADgB,EAAiB,EAAgB;IAEhD,CAAC,GAAkB,EAAgB,CAAC,EAEvC,QAAgB;AACT,QAaL,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,GAAqB,EAAY,CAAC,EAE/B,kBAAC,GAAD;EAAkB,GAAI;YAAQ;EAA0B,CAAA;GAWpD,KAA+C,MAAU;CACpE,IAAM,EAAE,gBAAa,YAAS;AAE9B,QACE,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;aAJV,GAAO,CAMR,kCACA,qEACD;GACG,CAAA;YAGR,kBAAC,GAAD;GACE,aAAa,KAAe;GAC5B,SAAQ;GACR,gBAAgB,MAAS;aAEzB,kBAAC,GAAD,EAAkC,GAAI,GAAS,CAAA;GAC3B,CAAA;EACR,CAAA"}
1
+ {"version":3,"file":"SecurityRootBase.js","names":[],"sources":["../../src/security/SecurityRootBase.tsx"],"sourcesContent":["import type { FC, ReactNode } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useFeatureFlag } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { SecurityProvider } from './providers/SecurityProvider';\nimport { useTr } from './hooks/useTr';\nimport type { NavItem, SecurityRootProps, SecurityMode } from './types';\nimport { SECURITY_FEATURE_FLAGS } from './constants/featureFlags';\nimport { getNavigationConfig } from './config/navigation';\n\ninterface SecurityRootBaseProps extends SecurityRootProps {\n mode: SecurityMode;\n routes: ReactNode;\n footerLabel: string;\n}\n\n/**\n * Inner component — runs *inside* `<FeatureFlagProvider>` so `useFeatureFlag`\n * always has a parent provider to read from. Prior to the split, the hook was\n * called above the provider, which threw in dev/test entry paths that didn't\n * have a shell-level feature-flag provider mounted above the MFE.\n */\nconst SecurityRootBaseWithFeatureFlags: FC<SecurityRootBaseProps> = ({\n mode,\n routes,\n footerLabel,\n ...props\n}) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const providersEnabled = useFeatureFlag(SECURITY_FEATURE_FLAGS.PROVIDERS_EXPERIMENTAL, false);\n const tr = useTr();\n\n // Strip the Providers child when the flag is off — otherwise admins see a\n // clickable nav link that silently redirects to the security home.\n const filteredNavItem = useMemo(() => {\n const navItem = getNavigationConfig(basePath, mode, tr);\n if (providersEnabled || !navItem.children) return navItem;\n const filterProviders = (items: NavItem[]): NavItem[] =>\n items.filter((c) => c.id !== 'security-providers');\n return { ...navItem, children: filterProviders(navItem.children) };\n }, [basePath, mode, providersEnabled, tr]);\n\n useEffect(() => {\n if (!registerNavItems) return;\n const cleanup = registerNavItems(filteredNavItem);\n return cleanup;\n }, [registerNavItems, filteredNavItem]);\n\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'security-status',\n label: footerLabel,\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, footerLabel]);\n\n return <SecurityProvider {...props}>{routes}</SecurityProvider>;\n};\n\n/**\n * Shared base for all Security root components.\n * Handles provider setup, nav/footer registration, and error boundary wrapping.\n *\n * Split into outer (ErrorBoundary + FeatureFlagProvider) and inner\n * (SecurityRootBaseWithFeatureFlags consumes useFeatureFlag) so the hook\n * always runs inside a provider — see comment on the inner component.\n */\nexport const SecurityRootBase: FC<SecurityRootBaseProps> = (props) => {\n const { workspaceId, mode } = props;\n const tr = useTr();\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {tr(\n 'security.errorBoundary.message',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <FeatureFlagProvider\n workspaceId={workspaceId ?? null}\n gateway=\"global\"\n defaultEnabled={mode === 'user'}\n >\n <SecurityRootBaseWithFeatureFlags {...props} />\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;AAuBA,IAAM,KAA+D,EACnE,SACA,WACA,gBACA,GAAG,QACC;CACJ,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,IAAmB,EAAe,EAAuB,wBAAwB,GAAM,EACvF,IAAK,GAAO,EAIZ,IAAkB,QAAc;EACpC,IAAM,IAAU,EAAoB,GAAU,GAAM,EAAG;AACvD,MAAI,KAAoB,CAAC,EAAQ,SAAU,QAAO;EAClD,IAAM,KAAmB,MACvB,EAAM,QAAQ,MAAM,EAAE,OAAO,qBAAqB;AACpD,SAAO;GAAE,GAAG;GAAS,UAAU,EAAgB,EAAQ,SAAS;GAAE;IACjE;EAAC;EAAU;EAAM;EAAkB;EAAG,CAAC;AAyB1C,QAvBA,QAAgB;AACT,QAEL,QADgB,EAAiB,EAAgB;IAEhD,CAAC,GAAkB,EAAgB,CAAC,EAEvC,QAAgB;AACT,QAaL,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,GAAqB,EAAY,CAAC,EAE/B,kBAAC,GAAD;EAAkB,GAAI;YAAQ;EAA0B,CAAA;GAWpD,KAA+C,MAAU;CACpE,IAAM,EAAE,gBAAa,YAAS;AAE9B,QACE,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;aAJV,GAAO,CAMR,kCACA,qEACD;GACG,CAAA;YAGR,kBAAC,GAAD;GACE,aAAa,KAAe;GAC5B,SAAQ;GACR,gBAAgB,MAAS;aAEzB,kBAAC,GAAD,EAAkC,GAAI,GAAS,CAAA;GAC3B,CAAA;EACR,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-security",
3
- "version": "2026.1013.3",
3
+ "version": "2026.1029.1",
4
4
  "description": "Security vault management microfrontend",
5
5
  "type": "module",
6
6
  "files": [