@burdenoff/microfe-devportal 2026.601.1 → 2026.608.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.
@@ -1 +1 @@
1
- {"version":3,"file":"DevportalProvider.js","names":[],"sources":["../../../src/devportal/providers/DevportalProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { createContext, useContext, useMemo } from \"react\";\nimport { BrowserRouter } from \"react-router-dom\";\nimport { MutationCache, QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\nimport { PermissionProvider } from \"@burdenoff/fe-libs/shared/providers/shell\";\nimport type { DevportalRootProps } from \"../types\";\n\n/**\n * Context value for Developer Portal microfrontend\n */\ntype DevportalContextValue = DevportalRootProps;\n\nconst DevportalContext = createContext<DevportalContextValue | null>(null);\n\n/**\n * Hook to access Developer Portal context\n */\nexport const useDevportal = () => {\n const context = useContext(DevportalContext);\n if (!context) {\n throw new Error(\"useDevportal must be used within DevportalProvider\");\n }\n return context;\n};\n\n/**\n * Provider component for Developer Portal microfrontend\n * Sets up routing, context, and React Query client\n */\nexport const DevportalProvider: FC<PropsWithChildren<DevportalRootProps>> = ({\n children,\n basePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n registerNavItems,\n registerFooterItems,\n onApplicationSelect,\n onOrganizationSelect,\n}) => {\n const contextValue: DevportalContextValue = {\n basePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n registerNavItems,\n registerFooterItems,\n onApplicationSelect,\n onOrganizationSelect,\n };\n\n // Create QueryClient instance (memoized to avoid recreation on re-renders)\n const queryClient = useMemo(\n () => {\n const client = new QueryClient({\n mutationCache: new MutationCache({\n onSuccess: () => {\n void client.invalidateQueries();\n },\n }),\n defaultOptions: {\n queries: {\n retry: 1,\n refetchOnWindowFocus: false,\n staleTime: 5 * 60 * 1000, // 5 minutes\n },\n },\n });\n return client;\n },\n [],\n );\n\n // PermissionProvider requires the shell's AuthProvider — only mount it in integrated mode.\n // In standalone/dev mode (MemoryRouter path), there's no AuthProvider, so we skip it\n // and pages will use a fallback that allows access (dev-only behaviour).\n const isIntegrated = !!basePath;\n\n // Wrap content with QueryClientProvider\n const content = (\n <QueryClientProvider client={queryClient}>\n <DevportalContext.Provider value={contextValue}>\n {isIntegrated ? (\n <PermissionProvider scopeId={tenantId ?? null} gateway=\"global\">\n {children}\n </PermissionProvider>\n ) : (\n children\n )}\n </DevportalContext.Provider>\n </QueryClientProvider>\n );\n\n // When integrated into a shell (basePath provided), the shell already has a router\n // so we don't create another one. When standalone (no basePath), use BrowserRouter.\n if (isIntegrated) {\n return content;\n }\n\n // Standalone mode: create BrowserRouter for independent operation\n return <BrowserRouter>{content}</BrowserRouter>;\n};\n"],"mappings":";;;;;;AAYA,IAAM,IAAmB,EAA4C,KAAK,EAK7D,UAAqB;CAChC,IAAM,IAAU,EAAW,EAAiB;AAC5C,KAAI,CAAC,EACH,OAAU,MAAM,qDAAqD;AAEvE,QAAO;GAOI,KAAgE,EAC3E,aACA,aACA,aACA,gBACA,aACA,gBACA,kBACA,cACA,qBACA,wBACA,wBACA,8BACI;CACJ,IAAM,IAAsC;EAC1C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,EAGK,IAAc,QACZ;EACJ,IAAM,IAAS,IAAI,EAAY;GAC7B,eAAe,IAAI,EAAc,EAC/B,iBAAiB;AACV,MAAO,mBAAmB;MAElC,CAAC;GACF,gBAAgB,EACd,SAAS;IACP,OAAO;IACP,sBAAsB;IACtB,WAAW,MAAS;IACrB,EACF;GACF,CAAC;AACF,SAAO;IAET,EAAE,CACH,EAKK,IAAe,CAAC,CAAC,GAGjB,IACJ,kBAAC,GAAD;EAAqB,QAAQ;YAC3B,kBAAC,EAAiB,UAAlB;GAA2B,OAAO;aAC/B,IACC,kBAAC,GAAD;IAAoB,SAAS,KAAY;IAAM,SAAQ;IACpD;IACkB,CAAA,GAErB;GAEwB,CAAA;EACR,CAAA;AAUxB,QALI,IACK,IAIF,kBAAC,GAAD,EAAA,UAAgB,GAAwB,CAAA"}
1
+ {"version":3,"file":"DevportalProvider.js","names":[],"sources":["../../../src/devportal/providers/DevportalProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { createContext, useContext, useMemo } from \"react\";\nimport { BrowserRouter } from \"react-router-dom\";\nimport {\n MutationCache,\n QueryClient,\n QueryClientProvider,\n} from \"@tanstack/react-query\";\nimport { PermissionProvider } from \"@burdenoff/fe-libs/shared/providers/shell\";\nimport type { DevportalRootProps } from \"../types\";\n\n/**\n * Context value for Developer Portal microfrontend\n */\ntype DevportalContextValue = DevportalRootProps;\n\nconst DevportalContext = createContext<DevportalContextValue | null>(null);\n\n/**\n * Hook to access Developer Portal context\n */\nexport const useDevportal = () => {\n const context = useContext(DevportalContext);\n if (!context) {\n throw new Error(\"useDevportal must be used within DevportalProvider\");\n }\n return context;\n};\n\n/**\n * Provider component for Developer Portal microfrontend\n * Sets up routing, context, and React Query client\n */\nexport const DevportalProvider: FC<PropsWithChildren<DevportalRootProps>> = ({\n children,\n basePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n registerNavItems,\n registerFooterItems,\n onApplicationSelect,\n onOrganizationSelect,\n}) => {\n const contextValue: DevportalContextValue = {\n basePath,\n navigate,\n currentUser,\n tenantId,\n workspaceId,\n apiGatewayUrl,\n authToken,\n registerNavItems,\n registerFooterItems,\n onApplicationSelect,\n onOrganizationSelect,\n };\n\n // Create QueryClient instance (memoized to avoid recreation on re-renders)\n const queryClient = useMemo(() => {\n const client = new QueryClient({\n mutationCache: new MutationCache({\n onSuccess: () => {\n void client.invalidateQueries();\n },\n }),\n defaultOptions: {\n queries: {\n retry: 1,\n refetchOnWindowFocus: false,\n staleTime: 5 * 60 * 1000, // 5 minutes\n },\n },\n });\n return client;\n }, []);\n\n // PermissionProvider requires the shell's AuthProvider — only mount it in integrated mode.\n // In standalone/dev mode (MemoryRouter path), there's no AuthProvider, so we skip it\n // and pages will use a fallback that allows access (dev-only behaviour).\n const isIntegrated = !!basePath;\n\n // Wrap content with QueryClientProvider\n const content = (\n <QueryClientProvider client={queryClient}>\n <DevportalContext.Provider value={contextValue}>\n {isIntegrated ? (\n <PermissionProvider scopeId={tenantId ?? null} gateway=\"global\">\n {children}\n </PermissionProvider>\n ) : (\n children\n )}\n </DevportalContext.Provider>\n </QueryClientProvider>\n );\n\n // When integrated into a shell (basePath provided), the shell already has a router\n // so we don't create another one. When standalone (no basePath), use BrowserRouter.\n if (isIntegrated) {\n return content;\n }\n\n // Standalone mode: create BrowserRouter for independent operation\n return <BrowserRouter>{content}</BrowserRouter>;\n};\n"],"mappings":";;;;;;AAgBA,IAAM,IAAmB,EAA4C,KAAK,EAK7D,UAAqB;CAChC,IAAM,IAAU,EAAW,EAAiB;AAC5C,KAAI,CAAC,EACH,OAAU,MAAM,qDAAqD;AAEvE,QAAO;GAOI,KAAgE,EAC3E,aACA,aACA,aACA,gBACA,aACA,gBACA,kBACA,cACA,qBACA,wBACA,wBACA,8BACI;CACJ,IAAM,IAAsC;EAC1C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,EAGK,IAAc,QAAc;EAChC,IAAM,IAAS,IAAI,EAAY;GAC7B,eAAe,IAAI,EAAc,EAC/B,iBAAiB;AACV,MAAO,mBAAmB;MAElC,CAAC;GACF,gBAAgB,EACd,SAAS;IACP,OAAO;IACP,sBAAsB;IACtB,WAAW,MAAS;IACrB,EACF;GACF,CAAC;AACF,SAAO;IACN,EAAE,CAAC,EAKA,IAAe,CAAC,CAAC,GAGjB,IACJ,kBAAC,GAAD;EAAqB,QAAQ;YAC3B,kBAAC,EAAiB,UAAlB;GAA2B,OAAO;aAC/B,IACC,kBAAC,GAAD;IAAoB,SAAS,KAAY;IAAM,SAAQ;IACpD;IACkB,CAAA,GAErB;GAEwB,CAAA;EACR,CAAA;AAUxB,QALI,IACK,IAIF,kBAAC,GAAD,EAAA,UAAgB,GAAwB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-devportal",
3
- "version": "2026.601.1",
3
+ "version": "2026.608.1",
4
4
  "description": "Burdenoff Developer Portal Microfrontend - Complete developer operations interface",
5
5
  "type": "module",
6
6
  "files": [