@squide/firefly 9.3.1 → 9.3.2
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 +7 -0
- package/dist/AppRouter.d.ts +8 -12
- package/dist/AppRouter.js +66 -8
- package/dist/AppRouterContext.d.ts +5 -9
- package/dist/AppRouterContext.js +28 -1
- package/dist/AppRouterReducer.d.ts +23 -26
- package/dist/AppRouterReducer.js +337 -4
- package/dist/FireflyRuntime.d.ts +5 -8
- package/dist/FireflyRuntime.js +64 -5
- package/dist/GlobalDataQueriesError.d.ts +2 -4
- package/dist/GlobalDataQueriesError.js +17 -1
- package/dist/RootRoute.d.ts +1 -5
- package/dist/RootRoute.js +46 -3
- package/dist/boostrap.d.ts +8 -13
- package/dist/boostrap.js +52 -1
- package/dist/index.d.ts +23 -28
- package/dist/index.js +49 -25
- package/dist/useCanFetchProtectedData.d.ts +1 -3
- package/dist/useCanFetchProtectedData.js +15 -2
- package/dist/useCanFetchPublicData.d.ts +1 -3
- package/dist/useCanFetchPublicData.js +15 -2
- package/dist/useCanRegisterDeferredRegistrations.d.ts +1 -3
- package/dist/useCanRegisterDeferredRegistrations.js +12 -2
- package/dist/useCanUpdateDeferredRegistrations.d.ts +1 -3
- package/dist/useCanUpdateDeferredRegistrations.js +14 -2
- package/dist/useDeferredRegistrations.d.ts +5 -8
- package/dist/useDeferredRegistrations.js +72 -6
- package/dist/useExecuteOnce.d.ts +1 -3
- package/dist/useExecuteOnce.js +27 -1
- package/dist/useIsActiveRouteProtected.d.ts +1 -3
- package/dist/useIsActiveRouteProtected.js +21 -1
- package/dist/useIsBootstrapping.d.ts +3 -7
- package/dist/useIsBootstrapping.js +20 -2
- package/dist/useNavigationItems.d.ts +3 -7
- package/dist/useNavigationItems.js +24 -2
- package/dist/useProtectedDataQueries.d.ts +6 -8
- package/dist/useProtectedDataQueries.js +124 -5
- package/dist/usePublicDataQueries.d.ts +5 -7
- package/dist/usePublicDataQueries.js +109 -5
- package/dist/useRegisterDeferredRegistrations.d.ts +4 -9
- package/dist/useRegisterDeferredRegistrations.js +17 -1
- package/dist/useStrictRegistrationMode.d.ts +1 -3
- package/dist/useStrictRegistrationMode.js +38 -1
- package/dist/useUpdateDeferredRegistrations.d.ts +4 -9
- package/dist/useUpdateDeferredRegistrations.js +28 -2
- package/package.json +25 -22
- package/dist/chunk-4RUCDAUT.js +0 -18
- package/dist/chunk-BFHHJOJT.js +0 -41
- package/dist/chunk-CTLPFYLM.js +0 -65
- package/dist/chunk-G32YX2KR.js +0 -22
- package/dist/chunk-GXSW4CZS.js +0 -9
- package/dist/chunk-H2ILEMPE.js +0 -28
- package/dist/chunk-HE5HKFL3.js +0 -16
- package/dist/chunk-IOMSOUAL.js +0 -20
- package/dist/chunk-JFMSLZ74.js +0 -253
- package/dist/chunk-L44KFU57.js +0 -34
- package/dist/chunk-LC233OPR.js +0 -54
- package/dist/chunk-MKTGJHQR.js +0 -71
- package/dist/chunk-N2GOIQ5E.js +0 -14
- package/dist/chunk-PMVN3U47.js +0 -21
- package/dist/chunk-PP3MRMJJ.js +0 -11
- package/dist/chunk-ROE2YHN5.js +0 -44
- package/dist/chunk-TURKCH7J.js +0 -20
- package/dist/chunk-WOPD33CM.js +0 -25
- package/dist/chunk-WVRMJZV6.js +0 -18
- package/dist/chunk-XDWYPVAJ.js +0 -21
- package/dist/chunk-YRWFYWK4.js +0 -11
package/CHANGELOG.md
CHANGED
package/dist/AppRouter.d.ts
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
interface AppRouterRenderFunctionArgs {
|
|
1
|
+
import { type Route } from "@squide/react-router";
|
|
2
|
+
import { type ReactElement } from "react";
|
|
3
|
+
import type { RouterProviderProps } from "react-router-dom";
|
|
4
|
+
export interface AppRouterRenderFunctionArgs {
|
|
7
5
|
routes: Route[];
|
|
8
6
|
}
|
|
9
|
-
interface RenderRouterProviderFunctionArgs {
|
|
7
|
+
export interface RenderRouterProviderFunctionArgs {
|
|
10
8
|
rootRoute: ReactElement;
|
|
11
9
|
registeredRoutes: Route[];
|
|
12
10
|
routerProviderProps: Omit<RouterProviderProps, "router">;
|
|
13
11
|
}
|
|
14
|
-
type RenderRouterProviderFunction = (args: RenderRouterProviderFunctionArgs) => ReactElement;
|
|
15
|
-
interface AppRouterProps {
|
|
12
|
+
export type RenderRouterProviderFunction = (args: RenderRouterProviderFunctionArgs) => ReactElement;
|
|
13
|
+
export interface AppRouterProps {
|
|
16
14
|
waitForMsw: boolean;
|
|
17
15
|
waitForPublicData?: boolean;
|
|
18
16
|
waitForProtectedData?: boolean;
|
|
19
17
|
children: RenderRouterProviderFunction;
|
|
20
18
|
}
|
|
21
|
-
declare function AppRouter(props: AppRouterProps):
|
|
22
|
-
|
|
23
|
-
export { AppRouter, type AppRouterProps, type AppRouterRenderFunctionArgs, type RenderRouterProviderFunction, type RenderRouterProviderFunctionArgs };
|
|
19
|
+
export declare function AppRouter(props: AppRouterProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/AppRouter.js
CHANGED
|
@@ -1,8 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__squide_core__ from "@squide/core";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__squide_react_router__ from "@squide/react-router";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__AppRouterContext_js__ from "./AppRouterContext.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js__ from "./AppRouterReducer.js";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__RootRoute_js__ from "./RootRoute.js";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__useStrictRegistrationMode_js__ from "./useStrictRegistrationMode.js";
|
|
9
|
+
|
|
10
|
+
;// CONCATENATED MODULE: external "react/jsx-runtime"
|
|
11
|
+
|
|
12
|
+
;// CONCATENATED MODULE: external "@squide/core"
|
|
13
|
+
|
|
14
|
+
;// CONCATENATED MODULE: external "@squide/react-router"
|
|
15
|
+
|
|
16
|
+
;// CONCATENATED MODULE: external "react"
|
|
17
|
+
|
|
18
|
+
;// CONCATENATED MODULE: external "./AppRouterContext.js"
|
|
19
|
+
|
|
20
|
+
;// CONCATENATED MODULE: external "./AppRouterReducer.js"
|
|
21
|
+
|
|
22
|
+
;// CONCATENATED MODULE: external "./RootRoute.js"
|
|
23
|
+
|
|
24
|
+
;// CONCATENATED MODULE: external "./useStrictRegistrationMode.js"
|
|
25
|
+
|
|
26
|
+
;// CONCATENATED MODULE: ./src/AppRouter.tsx?__rslib_entry__
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
function AppRouter(props) {
|
|
36
|
+
const { waitForMsw, waitForPublicData = false, waitForProtectedData = false, children: renderRouterProvider } = props;
|
|
37
|
+
const [state, dispatch] = (0,__WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js__.useAppRouterReducer)(waitForMsw, waitForPublicData, waitForProtectedData);
|
|
38
|
+
const logger = (0,__WEBPACK_EXTERNAL_MODULE__squide_core__.useLogger)();
|
|
39
|
+
const routes = (0,__WEBPACK_EXTERNAL_MODULE__squide_react_router__.useRoutes)();
|
|
40
|
+
(0,__WEBPACK_EXTERNAL_MODULE__useStrictRegistrationMode_js__.useStrictRegistrationMode)();
|
|
41
|
+
(0,__WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
42
|
+
logger.debug("[squide] AppRouter state updated:", state);
|
|
43
|
+
}, [
|
|
44
|
+
state,
|
|
45
|
+
logger
|
|
46
|
+
]);
|
|
47
|
+
const routerProvider = (0,__WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
48
|
+
return renderRouterProvider({
|
|
49
|
+
rootRoute: /*#__PURE__*/ (0,__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__RootRoute_js__.RootRoute, {}),
|
|
50
|
+
registeredRoutes: routes,
|
|
51
|
+
routerProviderProps: {}
|
|
52
|
+
});
|
|
53
|
+
}, [
|
|
54
|
+
routes,
|
|
55
|
+
renderRouterProvider
|
|
56
|
+
]);
|
|
57
|
+
return /*#__PURE__*/ (0,__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__AppRouterContext_js__.AppRouterDispatcherContext.Provider, {
|
|
58
|
+
value: dispatch,
|
|
59
|
+
children: /*#__PURE__*/ (0,__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__AppRouterContext_js__.AppRouterStateContext.Provider, {
|
|
60
|
+
value: state,
|
|
61
|
+
children: routerProvider
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { AppRouter };
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const
|
|
5
|
-
declare function
|
|
6
|
-
declare const AppRouterDispatcherContext: react.Context<AppRouterDispatch | undefined>;
|
|
7
|
-
declare function useAppRouterDispatcher(): AppRouterDispatch;
|
|
8
|
-
|
|
9
|
-
export { AppRouterDispatcherContext, AppRouterStateContext, useAppRouterDispatcher, useAppRouterState };
|
|
1
|
+
import type { AppRouterDispatch, AppRouterState } from "./AppRouterReducer.ts";
|
|
2
|
+
export declare const AppRouterStateContext: import("react").Context<AppRouterState | undefined>;
|
|
3
|
+
export declare function useAppRouterState(): AppRouterState;
|
|
4
|
+
export declare const AppRouterDispatcherContext: import("react").Context<AppRouterDispatch | undefined>;
|
|
5
|
+
export declare function useAppRouterDispatcher(): AppRouterDispatch;
|
package/dist/AppRouterContext.js
CHANGED
|
@@ -1 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__squide_core__ from "@squide/core";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
|
|
4
|
+
;// CONCATENATED MODULE: external "@squide/core"
|
|
5
|
+
|
|
6
|
+
;// CONCATENATED MODULE: external "react"
|
|
7
|
+
|
|
8
|
+
;// CONCATENATED MODULE: ./src/AppRouterContext.ts?__rslib_entry__
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const AppRouterStateContext = (0,__WEBPACK_EXTERNAL_MODULE_react__.createContext)(undefined);
|
|
12
|
+
function useAppRouterState() {
|
|
13
|
+
const state = (0,__WEBPACK_EXTERNAL_MODULE_react__.useContext)(AppRouterStateContext);
|
|
14
|
+
if ((0,__WEBPACK_EXTERNAL_MODULE__squide_core__.isNil)(state)) {
|
|
15
|
+
throw new Error("[squide] The useAppRouterState hook must be called by a children of the AppRouter component.");
|
|
16
|
+
}
|
|
17
|
+
return state;
|
|
18
|
+
}
|
|
19
|
+
const AppRouterDispatcherContext = (0,__WEBPACK_EXTERNAL_MODULE_react__.createContext)(undefined);
|
|
20
|
+
function useAppRouterDispatcher() {
|
|
21
|
+
const dispatch = (0,__WEBPACK_EXTERNAL_MODULE_react__.useContext)(AppRouterDispatcherContext);
|
|
22
|
+
if ((0,__WEBPACK_EXTERNAL_MODULE__squide_core__.isNil)(dispatch)) {
|
|
23
|
+
throw new Error("[squide] The useAppRouterDispatcher hook must be called by a children of the AppRouter component.");
|
|
24
|
+
}
|
|
25
|
+
return dispatch;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { AppRouterDispatcherContext, AppRouterStateContext, useAppRouterDispatcher, useAppRouterState };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Dispatch } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
interface AppRouterState {
|
|
1
|
+
import { type Dispatch } from "react";
|
|
2
|
+
export type ActiveRouteVisiblity = "unknown" | "public" | "protected";
|
|
3
|
+
export interface AppRouterState {
|
|
5
4
|
waitForMsw: boolean;
|
|
6
5
|
waitForPublicData: boolean;
|
|
7
6
|
waitForProtectedData: boolean;
|
|
@@ -16,27 +15,25 @@ interface AppRouterState {
|
|
|
16
15
|
activeRouteVisibility: ActiveRouteVisiblity;
|
|
17
16
|
isUnauthorized: boolean;
|
|
18
17
|
}
|
|
19
|
-
type AppRouterActionType = "modules-registered" | "modules-ready" | "msw-ready" | "public-data-ready" | "protected-data-ready" | "public-data-updated" | "protected-data-updated" | "deferred-registrations-updated" | "active-route-is-public" | "active-route-is-protected" | "is-unauthorized";
|
|
20
|
-
declare const ModulesRegisteredEvent = "squide-modules-registered";
|
|
21
|
-
declare const ModulesReadyEvent = "squide-modules-ready";
|
|
22
|
-
declare const MswReadyEvent = "squide-msw-ready";
|
|
23
|
-
declare const PublicDataReadyEvent = "squide-public-data-ready";
|
|
24
|
-
declare const ProtectedDataReadyEvent = "squide-protected-data-ready";
|
|
25
|
-
declare const PublicDataUpdatedEvent = "squide-public-data-updated";
|
|
26
|
-
declare const ProtectedDataUpdatedEvent = "squide-protected-data-updated";
|
|
27
|
-
declare const DeferredRegistrationsUpdatedEvent = "squide-deferred-registrations-updated";
|
|
28
|
-
declare const ApplicationBoostrappedEvent = "squide-app-boostrapped";
|
|
29
|
-
interface AppRouterAction {
|
|
18
|
+
export type AppRouterActionType = "modules-registered" | "modules-ready" | "msw-ready" | "public-data-ready" | "protected-data-ready" | "public-data-updated" | "protected-data-updated" | "deferred-registrations-updated" | "active-route-is-public" | "active-route-is-protected" | "is-unauthorized";
|
|
19
|
+
export declare const ModulesRegisteredEvent = "squide-modules-registered";
|
|
20
|
+
export declare const ModulesReadyEvent = "squide-modules-ready";
|
|
21
|
+
export declare const MswReadyEvent = "squide-msw-ready";
|
|
22
|
+
export declare const PublicDataReadyEvent = "squide-public-data-ready";
|
|
23
|
+
export declare const ProtectedDataReadyEvent = "squide-protected-data-ready";
|
|
24
|
+
export declare const PublicDataUpdatedEvent = "squide-public-data-updated";
|
|
25
|
+
export declare const ProtectedDataUpdatedEvent = "squide-protected-data-updated";
|
|
26
|
+
export declare const DeferredRegistrationsUpdatedEvent = "squide-deferred-registrations-updated";
|
|
27
|
+
export declare const ApplicationBoostrappedEvent = "squide-app-boostrapped";
|
|
28
|
+
export interface AppRouterAction {
|
|
30
29
|
type: AppRouterActionType;
|
|
31
30
|
}
|
|
32
|
-
type AppRouterDispatch = Dispatch<AppRouterAction>;
|
|
33
|
-
declare function getAreModulesRegistered(): boolean;
|
|
34
|
-
declare function getAreModulesReady(): boolean;
|
|
35
|
-
declare function useModuleRegistrationStatusDispatcher(areModulesRegisteredValue: boolean, areModulesReadyValue: boolean, dispatch: AppRouterDispatch): void;
|
|
36
|
-
declare function useMswStatusDispatcher(isMswReadyValue: boolean, dispatch: AppRouterDispatch): void;
|
|
37
|
-
declare function useBootstrappingCompletedDispatcher(state: AppRouterState): void;
|
|
38
|
-
declare function __setAppReducerDispatchProxyFactory(factory: (reactDispatch: AppRouterDispatch) => AppRouterDispatch): void;
|
|
39
|
-
declare function __clearAppReducerDispatchProxy(): void;
|
|
40
|
-
declare function useAppRouterReducer(waitForMsw: boolean, waitForPublicData: boolean, waitForProtectedData: boolean): [AppRouterState, AppRouterDispatch];
|
|
41
|
-
|
|
42
|
-
export { type ActiveRouteVisiblity, type AppRouterAction, type AppRouterActionType, type AppRouterDispatch, type AppRouterState, ApplicationBoostrappedEvent, DeferredRegistrationsUpdatedEvent, ModulesReadyEvent, ModulesRegisteredEvent, MswReadyEvent, ProtectedDataReadyEvent, ProtectedDataUpdatedEvent, PublicDataReadyEvent, PublicDataUpdatedEvent, __clearAppReducerDispatchProxy, __setAppReducerDispatchProxyFactory, getAreModulesReady, getAreModulesRegistered, useAppRouterReducer, useBootstrappingCompletedDispatcher, useModuleRegistrationStatusDispatcher, useMswStatusDispatcher };
|
|
31
|
+
export type AppRouterDispatch = Dispatch<AppRouterAction>;
|
|
32
|
+
export declare function getAreModulesRegistered(): boolean;
|
|
33
|
+
export declare function getAreModulesReady(): boolean;
|
|
34
|
+
export declare function useModuleRegistrationStatusDispatcher(areModulesRegisteredValue: boolean, areModulesReadyValue: boolean, dispatch: AppRouterDispatch): void;
|
|
35
|
+
export declare function useMswStatusDispatcher(isMswReadyValue: boolean, dispatch: AppRouterDispatch): void;
|
|
36
|
+
export declare function useBootstrappingCompletedDispatcher(state: AppRouterState): void;
|
|
37
|
+
export declare function __setAppReducerDispatchProxyFactory(factory: (reactDispatch: AppRouterDispatch) => AppRouterDispatch): void;
|
|
38
|
+
export declare function __clearAppReducerDispatchProxy(): void;
|
|
39
|
+
export declare function useAppRouterReducer(waitForMsw: boolean, waitForPublicData: boolean, waitForProtectedData: boolean): [AppRouterState, AppRouterDispatch];
|
package/dist/AppRouterReducer.js
CHANGED
|
@@ -1,4 +1,337 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__squide_core__ from "@squide/core";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__squide_module_federation__ from "@squide/module-federation";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__squide_msw__ from "@squide/msw";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__useExecuteOnce_js__ from "./useExecuteOnce.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__useIsBootstrapping_js__ from "./useIsBootstrapping.js";
|
|
7
|
+
|
|
8
|
+
;// CONCATENATED MODULE: external "@squide/core"
|
|
9
|
+
|
|
10
|
+
;// CONCATENATED MODULE: external "@squide/module-federation"
|
|
11
|
+
|
|
12
|
+
;// CONCATENATED MODULE: external "@squide/msw"
|
|
13
|
+
|
|
14
|
+
;// CONCATENATED MODULE: external "react"
|
|
15
|
+
|
|
16
|
+
;// CONCATENATED MODULE: external "./useExecuteOnce.js"
|
|
17
|
+
|
|
18
|
+
;// CONCATENATED MODULE: external "./useIsBootstrapping.js"
|
|
19
|
+
|
|
20
|
+
;// CONCATENATED MODULE: ./src/AppRouterReducer.ts?__rslib_entry__
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// The followings event const are a concatenation of "squide-" with AppRouterActionType.
|
|
28
|
+
// They are dispatched by the useEnhancedReducerDispatch hook.
|
|
29
|
+
const ModulesRegisteredEvent = "squide-modules-registered";
|
|
30
|
+
const ModulesReadyEvent = "squide-modules-ready";
|
|
31
|
+
const MswReadyEvent = "squide-msw-ready";
|
|
32
|
+
const PublicDataReadyEvent = "squide-public-data-ready";
|
|
33
|
+
const ProtectedDataReadyEvent = "squide-protected-data-ready";
|
|
34
|
+
const PublicDataUpdatedEvent = "squide-public-data-updated";
|
|
35
|
+
const ProtectedDataUpdatedEvent = "squide-protected-data-updated";
|
|
36
|
+
const DeferredRegistrationsUpdatedEvent = "squide-deferred-registrations-updated";
|
|
37
|
+
const ApplicationBoostrappedEvent = "squide-app-boostrapped";
|
|
38
|
+
function reducer(state, action) {
|
|
39
|
+
let newState = state;
|
|
40
|
+
switch(action.type){
|
|
41
|
+
case "modules-registered":
|
|
42
|
+
{
|
|
43
|
+
newState = {
|
|
44
|
+
...newState,
|
|
45
|
+
areModulesRegistered: true
|
|
46
|
+
};
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
case "modules-ready":
|
|
50
|
+
{
|
|
51
|
+
newState = {
|
|
52
|
+
...newState,
|
|
53
|
+
areModulesReady: true,
|
|
54
|
+
// Will be set even if the app is not using deferred registrations.
|
|
55
|
+
deferredRegistrationsUpdatedAt: Date.now()
|
|
56
|
+
};
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case "msw-ready":
|
|
60
|
+
{
|
|
61
|
+
newState = {
|
|
62
|
+
...newState,
|
|
63
|
+
isMswReady: true
|
|
64
|
+
};
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
case "public-data-ready":
|
|
68
|
+
{
|
|
69
|
+
newState = {
|
|
70
|
+
...newState,
|
|
71
|
+
isPublicDataReady: true,
|
|
72
|
+
publicDataUpdatedAt: Date.now()
|
|
73
|
+
};
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
case "protected-data-ready":
|
|
77
|
+
{
|
|
78
|
+
newState = {
|
|
79
|
+
...newState,
|
|
80
|
+
isProtectedDataReady: true,
|
|
81
|
+
protectedDataUpdatedAt: Date.now()
|
|
82
|
+
};
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
case "public-data-updated":
|
|
86
|
+
{
|
|
87
|
+
newState = {
|
|
88
|
+
...newState,
|
|
89
|
+
publicDataUpdatedAt: Date.now()
|
|
90
|
+
};
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
case "protected-data-updated":
|
|
94
|
+
{
|
|
95
|
+
newState = {
|
|
96
|
+
...newState,
|
|
97
|
+
protectedDataUpdatedAt: Date.now()
|
|
98
|
+
};
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
case "deferred-registrations-updated":
|
|
102
|
+
{
|
|
103
|
+
newState = {
|
|
104
|
+
...newState,
|
|
105
|
+
deferredRegistrationsUpdatedAt: Date.now()
|
|
106
|
+
};
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
case "active-route-is-public":
|
|
110
|
+
{
|
|
111
|
+
newState = {
|
|
112
|
+
...newState,
|
|
113
|
+
activeRouteVisibility: "public"
|
|
114
|
+
};
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
case "active-route-is-protected":
|
|
118
|
+
{
|
|
119
|
+
newState = {
|
|
120
|
+
...newState,
|
|
121
|
+
activeRouteVisibility: "protected"
|
|
122
|
+
};
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
case "is-unauthorized":
|
|
126
|
+
{
|
|
127
|
+
newState = {
|
|
128
|
+
...newState,
|
|
129
|
+
isUnauthorized: true
|
|
130
|
+
};
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
default:
|
|
134
|
+
{
|
|
135
|
+
throw new Error(`[squide] The AppRouter component state reducer doesn't support action type "${action.type}".`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return newState;
|
|
139
|
+
}
|
|
140
|
+
function getAreModulesRegistered() {
|
|
141
|
+
const localModuleStatus = (0,__WEBPACK_EXTERNAL_MODULE__squide_core__.getLocalModuleRegistrationStatus)();
|
|
142
|
+
const remoteModuleStatus = (0,__WEBPACK_EXTERNAL_MODULE__squide_module_federation__.getRemoteModuleRegistrationStatus)();
|
|
143
|
+
return (0,__WEBPACK_EXTERNAL_MODULE__squide_module_federation__.areModulesRegistered)(localModuleStatus, remoteModuleStatus);
|
|
144
|
+
}
|
|
145
|
+
function getAreModulesReady() {
|
|
146
|
+
const localModuleStatus = (0,__WEBPACK_EXTERNAL_MODULE__squide_core__.getLocalModuleRegistrationStatus)();
|
|
147
|
+
const remoteModuleStatus = (0,__WEBPACK_EXTERNAL_MODULE__squide_module_federation__.getRemoteModuleRegistrationStatus)();
|
|
148
|
+
return (0,__WEBPACK_EXTERNAL_MODULE__squide_module_federation__.areModulesReady)(localModuleStatus, remoteModuleStatus);
|
|
149
|
+
}
|
|
150
|
+
function useModuleRegistrationStatusDispatcher(areModulesRegisteredValue, areModulesReadyValue, dispatch) {
|
|
151
|
+
const logger = (0,__WEBPACK_EXTERNAL_MODULE__squide_core__.useLogger)();
|
|
152
|
+
const dispatchModulesRegistered = (0,__WEBPACK_EXTERNAL_MODULE__useExecuteOnce_js__.useExecuteOnce)((0,__WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
153
|
+
if (getAreModulesRegistered()) {
|
|
154
|
+
dispatch({
|
|
155
|
+
type: "modules-registered"
|
|
156
|
+
});
|
|
157
|
+
logger.debug("[squide] %cModules are registered%c.", "color: white; background-color: green;", "");
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
return false;
|
|
161
|
+
}, [
|
|
162
|
+
dispatch,
|
|
163
|
+
logger
|
|
164
|
+
]));
|
|
165
|
+
const dispatchModulesReady = (0,__WEBPACK_EXTERNAL_MODULE__useExecuteOnce_js__.useExecuteOnce)((0,__WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
166
|
+
if (getAreModulesReady()) {
|
|
167
|
+
dispatch({
|
|
168
|
+
type: "modules-ready"
|
|
169
|
+
});
|
|
170
|
+
logger.debug("[squide] %cModules are ready%c.", "color: white; background-color: green;", "");
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
return false;
|
|
174
|
+
}, [
|
|
175
|
+
dispatch,
|
|
176
|
+
logger
|
|
177
|
+
]));
|
|
178
|
+
return (0,__WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
179
|
+
if (!areModulesRegisteredValue) {
|
|
180
|
+
(0,__WEBPACK_EXTERNAL_MODULE__squide_core__.addLocalModuleRegistrationStatusChangedListener)(dispatchModulesRegistered);
|
|
181
|
+
(0,__WEBPACK_EXTERNAL_MODULE__squide_module_federation__.addRemoteModuleRegistrationStatusChangedListener)(dispatchModulesRegistered);
|
|
182
|
+
}
|
|
183
|
+
if (!areModulesReadyValue) {
|
|
184
|
+
(0,__WEBPACK_EXTERNAL_MODULE__squide_core__.addLocalModuleRegistrationStatusChangedListener)(dispatchModulesReady);
|
|
185
|
+
(0,__WEBPACK_EXTERNAL_MODULE__squide_module_federation__.addRemoteModuleRegistrationStatusChangedListener)(dispatchModulesReady);
|
|
186
|
+
}
|
|
187
|
+
return ()=>{
|
|
188
|
+
(0,__WEBPACK_EXTERNAL_MODULE__squide_core__.removeLocalModuleRegistrationStatusChangedListener)(dispatchModulesRegistered);
|
|
189
|
+
(0,__WEBPACK_EXTERNAL_MODULE__squide_module_federation__.removeRemoteModuleRegistrationStatusChangedListener)(dispatchModulesRegistered);
|
|
190
|
+
(0,__WEBPACK_EXTERNAL_MODULE__squide_core__.removeLocalModuleRegistrationStatusChangedListener)(dispatchModulesReady);
|
|
191
|
+
(0,__WEBPACK_EXTERNAL_MODULE__squide_module_federation__.removeRemoteModuleRegistrationStatusChangedListener)(dispatchModulesReady);
|
|
192
|
+
};
|
|
193
|
+
}, [
|
|
194
|
+
areModulesRegisteredValue,
|
|
195
|
+
areModulesReadyValue,
|
|
196
|
+
dispatchModulesRegistered,
|
|
197
|
+
dispatchModulesReady
|
|
198
|
+
]);
|
|
199
|
+
}
|
|
200
|
+
function useMswStatusDispatcher(isMswReadyValue, dispatch) {
|
|
201
|
+
const logger = (0,__WEBPACK_EXTERNAL_MODULE__squide_core__.useLogger)();
|
|
202
|
+
const dispatchMswReady = (0,__WEBPACK_EXTERNAL_MODULE__useExecuteOnce_js__.useExecuteOnce)((0,__WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
203
|
+
if ((0,__WEBPACK_EXTERNAL_MODULE__squide_msw__.isMswReady)()) {
|
|
204
|
+
dispatch({
|
|
205
|
+
type: "msw-ready"
|
|
206
|
+
});
|
|
207
|
+
logger.debug("[squide] %cMSW is ready%c.", "color: white; background-color: green;", "");
|
|
208
|
+
return true;
|
|
209
|
+
}
|
|
210
|
+
return false;
|
|
211
|
+
}, [
|
|
212
|
+
dispatch,
|
|
213
|
+
logger
|
|
214
|
+
]));
|
|
215
|
+
(0,__WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
216
|
+
if (!isMswReadyValue) {
|
|
217
|
+
(0,__WEBPACK_EXTERNAL_MODULE__squide_msw__.addMswStateChangedListener)(dispatchMswReady);
|
|
218
|
+
}
|
|
219
|
+
return ()=>{
|
|
220
|
+
(0,__WEBPACK_EXTERNAL_MODULE__squide_msw__.removeMswStateChangedListener)(dispatchMswReady);
|
|
221
|
+
};
|
|
222
|
+
}, [
|
|
223
|
+
isMswReadyValue,
|
|
224
|
+
dispatchMswReady
|
|
225
|
+
]);
|
|
226
|
+
}
|
|
227
|
+
function useBootstrappingCompletedDispatcher(state) {
|
|
228
|
+
const eventBus = (0,__WEBPACK_EXTERNAL_MODULE__squide_core__.useEventBus)();
|
|
229
|
+
const areModulesRegisteredValue = state.areModulesRegistered;
|
|
230
|
+
const isBoostrapping = (0,__WEBPACK_EXTERNAL_MODULE__useIsBootstrapping_js__.isApplicationBootstrapping)(state);
|
|
231
|
+
(0,__WEBPACK_EXTERNAL_MODULE__useExecuteOnce_js__.useExecuteOnce)((0,__WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
232
|
+
if (areModulesRegisteredValue && !isBoostrapping) {
|
|
233
|
+
eventBus.dispatch(ApplicationBoostrappedEvent);
|
|
234
|
+
return true;
|
|
235
|
+
}
|
|
236
|
+
return false;
|
|
237
|
+
}, [
|
|
238
|
+
areModulesRegisteredValue,
|
|
239
|
+
isBoostrapping,
|
|
240
|
+
eventBus
|
|
241
|
+
]), true);
|
|
242
|
+
}
|
|
243
|
+
let dispatchProxyFactory;
|
|
244
|
+
// This function should only be used by tests.
|
|
245
|
+
function __setAppReducerDispatchProxyFactory(factory) {
|
|
246
|
+
dispatchProxyFactory = factory;
|
|
247
|
+
}
|
|
248
|
+
// This function should only be used by tests.
|
|
249
|
+
function __clearAppReducerDispatchProxy() {
|
|
250
|
+
dispatchProxyFactory = undefined;
|
|
251
|
+
}
|
|
252
|
+
function useReducerDispatchProxy(reactDispatch) {
|
|
253
|
+
return (0,__WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
254
|
+
return dispatchProxyFactory ? dispatchProxyFactory(reactDispatch) : reactDispatch;
|
|
255
|
+
}, [
|
|
256
|
+
reactDispatch
|
|
257
|
+
]);
|
|
258
|
+
}
|
|
259
|
+
function useEnhancedReducerDispatch(reducerDispatch) {
|
|
260
|
+
const logger = (0,__WEBPACK_EXTERNAL_MODULE__squide_core__.useLogger)();
|
|
261
|
+
const eventBus = (0,__WEBPACK_EXTERNAL_MODULE__squide_core__.useEventBus)();
|
|
262
|
+
return (0,__WEBPACK_EXTERNAL_MODULE_react__.useCallback)((action)=>{
|
|
263
|
+
logger.debug("[squide] The following action has been dispatched to the AppRouter reducer:", action);
|
|
264
|
+
eventBus.dispatch(`squide-${action.type}`);
|
|
265
|
+
reducerDispatch(action);
|
|
266
|
+
}, [
|
|
267
|
+
reducerDispatch,
|
|
268
|
+
logger,
|
|
269
|
+
eventBus
|
|
270
|
+
]);
|
|
271
|
+
}
|
|
272
|
+
function useAppRouterReducer(waitForMsw, waitForPublicData, waitForProtectedData) {
|
|
273
|
+
const areModulesInitiallyRegistered = getAreModulesRegistered();
|
|
274
|
+
const areModulesInitiallyReady = getAreModulesReady();
|
|
275
|
+
const isMswInitiallyReady = (0,__WEBPACK_EXTERNAL_MODULE__squide_msw__.isMswReady)();
|
|
276
|
+
const eventBus = (0,__WEBPACK_EXTERNAL_MODULE__squide_core__.useEventBus)();
|
|
277
|
+
// When modules are initially registered, the reducer action will never be dispatched, therefore the event would not be dispatched as well.
|
|
278
|
+
// To ensure the bootstrapping events sequencing, the event is manually dispatched when the modules are initially registered.
|
|
279
|
+
(0,__WEBPACK_EXTERNAL_MODULE__useExecuteOnce_js__.useExecuteOnce)((0,__WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
280
|
+
if (areModulesInitiallyRegistered) {
|
|
281
|
+
eventBus.dispatch(ModulesRegisteredEvent);
|
|
282
|
+
}
|
|
283
|
+
return true;
|
|
284
|
+
}, [
|
|
285
|
+
areModulesInitiallyRegistered,
|
|
286
|
+
eventBus
|
|
287
|
+
]), true);
|
|
288
|
+
// When modules are initially registered, the reducer action will never be dispatched, therefore the event would not be dispatched as well.
|
|
289
|
+
// To ensure the bootstrapping events sequencing, the event is manually dispatched when the modules are initially registered.
|
|
290
|
+
(0,__WEBPACK_EXTERNAL_MODULE__useExecuteOnce_js__.useExecuteOnce)((0,__WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
291
|
+
if (areModulesInitiallyReady) {
|
|
292
|
+
eventBus.dispatch(ModulesReadyEvent);
|
|
293
|
+
}
|
|
294
|
+
return true;
|
|
295
|
+
}, [
|
|
296
|
+
areModulesInitiallyReady,
|
|
297
|
+
eventBus
|
|
298
|
+
]), true);
|
|
299
|
+
// When modules are initially registered, the reducer action will never be dispatched, therefore the event would not be dispatched as well.
|
|
300
|
+
// To ensure the bootstrapping events sequencing, the event is manually dispatched when the modules are initially registered.
|
|
301
|
+
(0,__WEBPACK_EXTERNAL_MODULE__useExecuteOnce_js__.useExecuteOnce)((0,__WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
302
|
+
if (isMswInitiallyReady) {
|
|
303
|
+
eventBus.dispatch(MswReadyEvent);
|
|
304
|
+
}
|
|
305
|
+
return true;
|
|
306
|
+
}, [
|
|
307
|
+
isMswInitiallyReady,
|
|
308
|
+
eventBus
|
|
309
|
+
]), true);
|
|
310
|
+
const [state, reactDispatch] = (0,__WEBPACK_EXTERNAL_MODULE_react__.useReducer)(reducer, {
|
|
311
|
+
waitForMsw,
|
|
312
|
+
waitForPublicData,
|
|
313
|
+
waitForProtectedData,
|
|
314
|
+
// When the modules registration functions are awaited, the event listeners are registered after the modules are registered.
|
|
315
|
+
areModulesRegistered: areModulesInitiallyRegistered,
|
|
316
|
+
areModulesReady: areModulesInitiallyReady,
|
|
317
|
+
isMswReady: isMswInitiallyReady,
|
|
318
|
+
isPublicDataReady: false,
|
|
319
|
+
isProtectedDataReady: false,
|
|
320
|
+
activeRouteVisibility: "unknown",
|
|
321
|
+
isUnauthorized: false
|
|
322
|
+
});
|
|
323
|
+
const { areModulesRegistered: areModulesRegisteredValue, areModulesReady: areModulesReadyValue, isMswReady: isMswReadyValue } = state;
|
|
324
|
+
// The dispatch proxy is strictly an utility allowing tests to mock the useReducer dispatch function. It's easier
|
|
325
|
+
// than mocking the import from React.
|
|
326
|
+
const dispatchProxy = useReducerDispatchProxy(reactDispatch);
|
|
327
|
+
const dispatch = useEnhancedReducerDispatch(dispatchProxy);
|
|
328
|
+
useModuleRegistrationStatusDispatcher(areModulesRegisteredValue, areModulesReadyValue, dispatch);
|
|
329
|
+
useMswStatusDispatcher(isMswReadyValue, dispatch);
|
|
330
|
+
useBootstrappingCompletedDispatcher(state);
|
|
331
|
+
return [
|
|
332
|
+
state,
|
|
333
|
+
dispatch
|
|
334
|
+
];
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export { ApplicationBoostrappedEvent, DeferredRegistrationsUpdatedEvent, ModulesReadyEvent, ModulesRegisteredEvent, MswReadyEvent, ProtectedDataReadyEvent, ProtectedDataUpdatedEvent, PublicDataReadyEvent, PublicDataUpdatedEvent, __clearAppReducerDispatchProxy, __setAppReducerDispatchProxyFactory, getAreModulesReady, getAreModulesRegistered, useAppRouterReducer, useBootstrappingCompletedDispatcher, useModuleRegistrationStatusDispatcher, useMswStatusDispatcher };
|
package/dist/FireflyRuntime.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ReactRouterRuntime, Route } from
|
|
3
|
-
import { RequestHandler } from
|
|
4
|
-
|
|
5
|
-
interface FireflyRuntimeOptions extends RuntimeOptions {
|
|
1
|
+
import type { RegisterRouteOptions, RuntimeOptions } from "@squide/core";
|
|
2
|
+
import { ReactRouterRuntime, type Route } from "@squide/react-router";
|
|
3
|
+
import type { RequestHandler } from "msw";
|
|
4
|
+
export interface FireflyRuntimeOptions extends RuntimeOptions {
|
|
6
5
|
useMsw?: boolean;
|
|
7
6
|
}
|
|
8
|
-
declare class FireflyRuntime extends ReactRouterRuntime {
|
|
7
|
+
export declare class FireflyRuntime extends ReactRouterRuntime {
|
|
9
8
|
#private;
|
|
10
9
|
constructor({ plugins, useMsw, ...options }?: FireflyRuntimeOptions);
|
|
11
10
|
registerRequestHandlers(handlers: RequestHandler[]): void;
|
|
@@ -13,5 +12,3 @@ declare class FireflyRuntime extends ReactRouterRuntime {
|
|
|
13
12
|
registerRoute(route: Route, options?: RegisterRouteOptions): void;
|
|
14
13
|
get isMswEnabled(): boolean;
|
|
15
14
|
}
|
|
16
|
-
|
|
17
|
-
export { FireflyRuntime, type FireflyRuntimeOptions };
|
package/dist/FireflyRuntime.js
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__squide_msw__ from "@squide/msw";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__squide_react_router__ from "@squide/react-router";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js__ from "./AppRouterReducer.js";
|
|
4
|
+
|
|
5
|
+
;// CONCATENATED MODULE: external "@squide/msw"
|
|
6
|
+
|
|
7
|
+
;// CONCATENATED MODULE: external "@squide/react-router"
|
|
8
|
+
|
|
9
|
+
;// CONCATENATED MODULE: external "./AppRouterReducer.js"
|
|
10
|
+
|
|
11
|
+
;// CONCATENATED MODULE: ./src/FireflyRuntime.tsx?__rslib_entry__
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class FireflyRuntime extends __WEBPACK_EXTERNAL_MODULE__squide_react_router__.ReactRouterRuntime {
|
|
16
|
+
#useMsw;
|
|
17
|
+
constructor({ plugins, useMsw, ...options } = {}){
|
|
18
|
+
if (useMsw) {
|
|
19
|
+
super({
|
|
20
|
+
plugins: [
|
|
21
|
+
...plugins ?? [],
|
|
22
|
+
(runtime)=>new __WEBPACK_EXTERNAL_MODULE__squide_msw__.MswPlugin(runtime)
|
|
23
|
+
],
|
|
24
|
+
...options
|
|
25
|
+
});
|
|
26
|
+
this.#useMsw = true;
|
|
27
|
+
} else {
|
|
28
|
+
super({
|
|
29
|
+
plugins,
|
|
30
|
+
...options
|
|
31
|
+
});
|
|
32
|
+
this.#useMsw = false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
registerRequestHandlers(handlers) {
|
|
36
|
+
const mswPlugin = this.getPlugin(__WEBPACK_EXTERNAL_MODULE__squide_msw__.MswPluginName);
|
|
37
|
+
if (!mswPlugin) {
|
|
38
|
+
throw new Error("[squide] Cannot register the provided MSW request handlers because the runtime hasn't been initialized with MSW. Did you instanciate the FireflyRuntime with the \"useMsw\" option?");
|
|
39
|
+
}
|
|
40
|
+
if ((0,__WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js__.getAreModulesRegistered)()) {
|
|
41
|
+
throw new Error("[squide] Cannot register an MSW request handlers once the modules are registered. Are you trying to register an MSW request handler in a deferred registration function? Only navigation items can be registered in a deferred registration function.");
|
|
42
|
+
}
|
|
43
|
+
mswPlugin.registerRequestHandlers(handlers);
|
|
44
|
+
}
|
|
45
|
+
// Must define a return type otherwise we get an "error TS2742: The inferred type of 'requestHandlers' cannot be named" error.
|
|
46
|
+
get requestHandlers() {
|
|
47
|
+
const mswPlugin = this.getPlugin(__WEBPACK_EXTERNAL_MODULE__squide_msw__.MswPluginName);
|
|
48
|
+
if (!mswPlugin) {
|
|
49
|
+
throw new Error("[squide] Cannot retrieve MSW request handlers because the runtime hasn't been initialized with MSW. Did you instanciate the FireflyRuntime with the \"useMsw\" option?");
|
|
50
|
+
}
|
|
51
|
+
return mswPlugin.requestHandlers;
|
|
52
|
+
}
|
|
53
|
+
registerRoute(route, options = {}) {
|
|
54
|
+
if ((0,__WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js__.getAreModulesRegistered)()) {
|
|
55
|
+
throw new Error("[squide] Cannot register a route once the modules are registered. Are you trying to register a route in a deferred registration function? Only navigation items can be registered in a deferred registration function.");
|
|
56
|
+
}
|
|
57
|
+
super.registerRoute(route, options);
|
|
58
|
+
}
|
|
59
|
+
get isMswEnabled() {
|
|
60
|
+
return this.#useMsw;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { FireflyRuntime };
|