@squide/firefly 4.0.2 → 5.0.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/CHANGELOG.md +18 -0
- package/dist/AppRouter.js +1 -1
- package/dist/{chunk-M533VVCI.js → chunk-7LQUNM5I.js} +3 -6
- package/dist/defineConfig.d.ts +4 -4
- package/dist/defineConfig.js +8 -8
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/package.json +5 -5
- package/dist/NoMatchRouteFallback.d.ts +0 -6
- package/dist/NoMatchRouteFallback.js +0 -1
- package/dist/chunk-MCU5TIOP.js +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @squide/firefly
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#140](https://github.com/gsoft-inc/wl-squide/pull/140) [`6eaf4ac3`](https://github.com/gsoft-inc/wl-squide/commit/6eaf4ac3f6ac88b62045ce280562a5887589026b) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Internal changes
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`6eaf4ac3`](https://github.com/gsoft-inc/wl-squide/commit/6eaf4ac3f6ac88b62045ce280562a5887589026b)]:
|
|
10
|
+
- @squide/webpack-configs@1.2.0
|
|
11
|
+
|
|
12
|
+
## 4.0.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#137](https://github.com/gsoft-inc/wl-squide/pull/137) [`2f5946f9`](https://github.com/gsoft-inc/wl-squide/commit/2f5946f9c51740dc0d207d53085b143d9f1e407c) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Improved the no custom 404 route handling.
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`2f5946f9`](https://github.com/gsoft-inc/wl-squide/commit/2f5946f9c51740dc0d207d53085b143d9f1e407c)]:
|
|
19
|
+
- @squide/react-router@4.0.3
|
|
20
|
+
|
|
3
21
|
## 4.0.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/AppRouter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AppRouter, BootstrappingRoute } from './chunk-
|
|
1
|
+
export { AppRouter, BootstrappingRoute } from './chunk-7LQUNM5I.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useLogOnceLogger, isNil } from '@squide/core';
|
|
2
2
|
import { useIsMswStarted } from '@squide/msw';
|
|
3
|
-
import { useRouteMatch, useIsRouteProtected, useRoutes } from '@squide/react-router';
|
|
3
|
+
import { useRouteMatch, useIsRouteProtected, useRoutes, findRouteByPath } from '@squide/react-router';
|
|
4
4
|
import { useAreModulesRegistered, useAreModulesReady } from '@squide/webpack-module-federation';
|
|
5
5
|
import { useEffect, useCallback, cloneElement, useMemo } from 'react';
|
|
6
6
|
import { ErrorBoundary, useErrorBoundary } from 'react-error-boundary';
|
|
@@ -132,11 +132,8 @@ function AppRouter(props) {
|
|
|
132
132
|
});
|
|
133
133
|
}, [errorElement]);
|
|
134
134
|
return useMemo(() => {
|
|
135
|
-
if (!routes
|
|
136
|
-
|
|
137
|
-
path: "*",
|
|
138
|
-
lazy: () => import('./NoMatchRouteFallback.js')
|
|
139
|
-
});
|
|
135
|
+
if (areModulesRegistered && !findRouteByPath(routes, "*")) {
|
|
136
|
+
throw new Error("For the AppRouter component to work properly, the application must be a define a custom no match router. For additional information, refer to: https://reactrouter.com/en/main/start/tutorial#handling-not-found-errors.");
|
|
140
137
|
}
|
|
141
138
|
return renderRouterProvider([
|
|
142
139
|
{
|
package/dist/defineConfig.d.ts
CHANGED
|
@@ -7,18 +7,18 @@ type FireflyFeatures = Omit<Features, "router" | "msw">;
|
|
|
7
7
|
interface FireflyDefineDevHostConfigOptions extends DefineDevHostConfigOptions {
|
|
8
8
|
features?: FireflyFeatures;
|
|
9
9
|
}
|
|
10
|
-
declare function defineDevHostConfig(swcConfig: SwcConfig, applicationName: string, port: number, { features, ...
|
|
10
|
+
declare function defineDevHostConfig(swcConfig: SwcConfig, applicationName: string, port: number, { features, ...options }?: FireflyDefineDevHostConfigOptions): webpack.Configuration;
|
|
11
11
|
interface FireflyDefineBuildHostConfigOptions extends DefineBuildHostConfigOptions {
|
|
12
12
|
features?: FireflyFeatures;
|
|
13
13
|
}
|
|
14
|
-
declare function defineBuildHostConfig(swcConfig: SwcConfig, applicationName: string, { features, ...
|
|
14
|
+
declare function defineBuildHostConfig(swcConfig: SwcConfig, applicationName: string, { features, ...options }?: FireflyDefineBuildHostConfigOptions): webpack.Configuration;
|
|
15
15
|
interface FireflyDefineDevRemoteModuleConfigOptions extends DefineDevRemoteModuleConfigOptions {
|
|
16
16
|
features?: FireflyFeatures;
|
|
17
17
|
}
|
|
18
|
-
declare function defineDevRemoteModuleConfig(swcConfig: SwcConfig, applicationName: string, port: number, { features, ...
|
|
18
|
+
declare function defineDevRemoteModuleConfig(swcConfig: SwcConfig, applicationName: string, port: number, { features, ...options }?: FireflyDefineDevRemoteModuleConfigOptions): webpack.Configuration;
|
|
19
19
|
interface FireflyDefineBuildRemoteModuleConfigOptions extends DefineBuildRemoteModuleConfigOptions {
|
|
20
20
|
features?: FireflyFeatures;
|
|
21
21
|
}
|
|
22
|
-
declare function defineBuildRemoteModuleConfig(swcConfig: SwcConfig, applicationName: string, { features, ...
|
|
22
|
+
declare function defineBuildRemoteModuleConfig(swcConfig: SwcConfig, applicationName: string, { features, ...options }?: FireflyDefineBuildRemoteModuleConfigOptions): webpack.Configuration;
|
|
23
23
|
|
|
24
24
|
export { type FireflyDefineBuildHostConfigOptions, type FireflyDefineBuildRemoteModuleConfigOptions, type FireflyDefineDevHostConfigOptions, type FireflyDefineDevRemoteModuleConfigOptions, type FireflyFeatures, defineBuildHostConfig, defineBuildRemoteModuleConfig, defineDevHostConfig, defineDevRemoteModuleConfig };
|
package/dist/defineConfig.js
CHANGED
|
@@ -2,9 +2,9 @@ import { defineDevHostConfig as defineDevHostConfig$1, defineBuildHostConfig as
|
|
|
2
2
|
export { defineRemoteModuleFederationPluginOptions } from '@squide/webpack-configs';
|
|
3
3
|
|
|
4
4
|
// src/defineConfig.ts
|
|
5
|
-
function defineDevHostConfig(swcConfig, applicationName, port, { features, ...
|
|
5
|
+
function defineDevHostConfig(swcConfig, applicationName, port, { features, ...options } = {}) {
|
|
6
6
|
return defineDevHostConfig$1(swcConfig, applicationName, port, {
|
|
7
|
-
...
|
|
7
|
+
...options,
|
|
8
8
|
features: {
|
|
9
9
|
router: "react-router",
|
|
10
10
|
msw: true,
|
|
@@ -12,9 +12,9 @@ function defineDevHostConfig(swcConfig, applicationName, port, { features, ...ot
|
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
function defineBuildHostConfig(swcConfig, applicationName, { features, ...
|
|
15
|
+
function defineBuildHostConfig(swcConfig, applicationName, { features, ...options } = {}) {
|
|
16
16
|
return defineBuildHostConfig$1(swcConfig, applicationName, {
|
|
17
|
-
...
|
|
17
|
+
...options,
|
|
18
18
|
features: {
|
|
19
19
|
router: "react-router",
|
|
20
20
|
msw: true,
|
|
@@ -22,9 +22,9 @@ function defineBuildHostConfig(swcConfig, applicationName, { features, ...otherO
|
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function defineDevRemoteModuleConfig(swcConfig, applicationName, port, { features, ...
|
|
25
|
+
function defineDevRemoteModuleConfig(swcConfig, applicationName, port, { features, ...options } = {}) {
|
|
26
26
|
return defineDevRemoteModuleConfig$1(swcConfig, applicationName, port, {
|
|
27
|
-
...
|
|
27
|
+
...options,
|
|
28
28
|
features: {
|
|
29
29
|
router: "react-router",
|
|
30
30
|
msw: true,
|
|
@@ -32,9 +32,9 @@ function defineDevRemoteModuleConfig(swcConfig, applicationName, port, { feature
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
function defineBuildRemoteModuleConfig(swcConfig, applicationName, { features, ...
|
|
35
|
+
function defineBuildRemoteModuleConfig(swcConfig, applicationName, { features, ...options } = {}) {
|
|
36
36
|
return defineBuildRemoteModuleConfig$1(swcConfig, applicationName, {
|
|
37
|
-
...
|
|
37
|
+
...options,
|
|
38
38
|
features: {
|
|
39
39
|
router: "react-router",
|
|
40
40
|
msw: true,
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from '@squide/msw';
|
|
|
3
3
|
export * from '@squide/react-router';
|
|
4
4
|
export * from '@squide/webpack-module-federation';
|
|
5
5
|
export { AppRouter, AppRouterProps, BootstrappingRoute, OnCompleteRegistrationsFunction, OnLoadProtectedDataFunction, OnLoadPublicDataFunction, RenderRouterProviderFunction } from './AppRouter.js';
|
|
6
|
-
export { Component, NoMatchRouteFallback } from './NoMatchRouteFallback.js';
|
|
7
6
|
export { FireflyRuntime } from './fireflyRuntime.js';
|
|
8
7
|
import 'react';
|
|
9
8
|
import 'react/jsx-runtime';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { AppRouter, BootstrappingRoute } from './chunk-
|
|
2
|
-
export { Component, NoMatchRouteFallback } from './chunk-MCU5TIOP.js';
|
|
1
|
+
export { AppRouter, BootstrappingRoute } from './chunk-7LQUNM5I.js';
|
|
3
2
|
export { FireflyRuntime } from './chunk-6R4K3V6F.js';
|
|
4
3
|
export * from '@squide/core';
|
|
5
4
|
export * from '@squide/msw';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squide/firefly",
|
|
3
3
|
"author": "Workleap",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"description": "Helpers to facilitate the creation of a shell package with Squide firefly technology stack.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -88,13 +88,13 @@
|
|
|
88
88
|
"tsup": "8.0.1",
|
|
89
89
|
"typescript": "5.2.2",
|
|
90
90
|
"webpack": "5.89.0",
|
|
91
|
-
"@squide/webpack-configs": "1.
|
|
91
|
+
"@squide/webpack-configs": "1.2.0"
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
94
|
"@squide/core": "3.2.1",
|
|
95
|
-
"@squide/
|
|
96
|
-
"@squide/
|
|
97
|
-
"@squide/
|
|
95
|
+
"@squide/msw": "2.0.9",
|
|
96
|
+
"@squide/react-router": "4.0.3",
|
|
97
|
+
"@squide/webpack-module-federation": "3.0.4"
|
|
98
98
|
},
|
|
99
99
|
"sideEffects": false,
|
|
100
100
|
"engines": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Component, NoMatchRouteFallback } from './chunk-MCU5TIOP.js';
|
package/dist/chunk-MCU5TIOP.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
// src/NoMatchRouteFallback.tsx
|
|
4
|
-
function NoMatchRouteFallback() {
|
|
5
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
6
|
-
/* @__PURE__ */ jsx("h1", { children: "404 not found" }),
|
|
7
|
-
/* @__PURE__ */ jsxs("p", { children: [
|
|
8
|
-
"This page has been dynamically added by Squide to fix an issue with the ",
|
|
9
|
-
/* @__PURE__ */ jsx("code", { children: "AppRouter" }),
|
|
10
|
-
" component. ",
|
|
11
|
-
/* @__PURE__ */ jsxs("strong", { children: [
|
|
12
|
-
"Please replace this page in your application by a ",
|
|
13
|
-
/* @__PURE__ */ jsx("a", { href: "https://reactrouter.com/en/main/start/tutorial#handling-not-found-errors", children: "custom match page" }),
|
|
14
|
-
"."
|
|
15
|
-
] })
|
|
16
|
-
] }),
|
|
17
|
-
/* @__PURE__ */ jsx("p", { children: "The code should be like the following:" }),
|
|
18
|
-
/* @__PURE__ */ jsx("pre", { style: { backgroundColor: "rgb(243, 245, 249)", color: "rgb(21, 25, 40)", padding: "4px 10px", border: "1px solid rgb(225, 229, 239)" }, children: `runtime.registerRoute({
|
|
19
|
-
$visibility: "public",
|
|
20
|
-
path: "*",
|
|
21
|
-
lazy: import("./NoMatchPage.tsx")
|
|
22
|
-
});` })
|
|
23
|
-
] });
|
|
24
|
-
}
|
|
25
|
-
var Component = NoMatchRouteFallback;
|
|
26
|
-
|
|
27
|
-
export { Component, NoMatchRouteFallback };
|