@nocobase/app 3.0.0-alpha.6 → 3.0.0-alpha.8
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/__tests__/browserChecker.test.ts +2 -2
- package/client/public/browser-checker.js +11 -4
- package/dist/client/assets/{index-63950411.js → index-7f60f907.js} +351 -350
- package/dist/client/browser-checker.js +11 -4
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.tpl +1 -1
- package/dist/client/settings/assets/{7245-1058e96e.js → 9343-196a2ff7.js} +5 -5
- package/dist/client/settings/assets/{index-4c8c6c43.js → index-0aa018f1.js} +132 -131
- package/dist/client/settings/index.html +1 -1
- package/dist/client/v/assets/{index-97731b94.js → index-1566ea16.js} +145 -144
- package/dist/client/v/assets/{vendor-antd-155a4c9b.js → vendor-antd-e1ec510b.js} +3 -3
- package/dist/client/v/index.html +1 -1
- package/package.json +7 -7
- /package/dist/client/assets/{index-63950411.js.LICENSE.txt → index-7f60f907.js.LICENSE.txt} +0 -0
- /package/dist/client/settings/assets/{7245-1058e96e.js.LICENSE.txt → 9343-196a2ff7.js.LICENSE.txt} +0 -0
- /package/dist/client/settings/assets/{7245-db3cd5c2.css → 9343-db3cd5c2.css} +0 -0
- /package/dist/client/settings/assets/{index-4c8c6c43.js.LICENSE.txt → index-0aa018f1.js.LICENSE.txt} +0 -0
- /package/dist/client/v/assets/{index-97731b94.js.LICENSE.txt → index-1566ea16.js.LICENSE.txt} +0 -0
|
@@ -75,7 +75,7 @@ function runBrowserChecker(options: RunBrowserCheckerOptions) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
describe('v2 browser checker', () => {
|
|
78
|
-
it.each([undefined, 'modern-default', 'modern-only'] as const)(
|
|
78
|
+
it.each([undefined, 'modern-default', 'modern-only', 'settings-default'] as const)(
|
|
79
79
|
'lets the modern client handle its root for entry mode %s',
|
|
80
80
|
(appClientEntryMode) => {
|
|
81
81
|
expect(
|
|
@@ -87,7 +87,7 @@ describe('v2 browser checker', () => {
|
|
|
87
87
|
},
|
|
88
88
|
);
|
|
89
89
|
|
|
90
|
-
it.each([undefined, 'modern-default', 'modern-only'] as const)(
|
|
90
|
+
it.each([undefined, 'modern-default', 'modern-only', 'settings-default'] as const)(
|
|
91
91
|
'lets scoped modern clients handle their roots for entry mode %s',
|
|
92
92
|
(appClientEntryMode) => {
|
|
93
93
|
expect(
|
|
@@ -54,7 +54,7 @@ if (basename !== '/' && currentPath === basenameWithoutTrailingSlash) {
|
|
|
54
54
|
// This client-side redirect is still needed because legacy `index.html` is
|
|
55
55
|
// not always served through the node gateway. In nginx/static delivery paths
|
|
56
56
|
// the browser may already be running the legacy shell by the time entry-mode
|
|
57
|
-
// logic is evaluated, so the last hop into the
|
|
57
|
+
// logic is evaluated, so the last hop into the configured default entry has to be
|
|
58
58
|
// recoverable in the browser as well.
|
|
59
59
|
const normalizedPath = normalizePathname(currentPath);
|
|
60
60
|
const relativePath =
|
|
@@ -66,15 +66,22 @@ if (basename !== '/' && currentPath === basenameWithoutTrailingSlash) {
|
|
|
66
66
|
? normalizePathname(normalizedPath.slice(basename.length - 1))
|
|
67
67
|
: null;
|
|
68
68
|
const modernBase = `${trimTrailingSlash(basename)}/${modernClientPrefix}/`.replace(/\/{2,}/g, '/');
|
|
69
|
+
const settingsBase = `${basename}settings/`;
|
|
69
70
|
const isModernDefault = appClientEntryMode === 'modern-default';
|
|
70
71
|
const isModernOnly = appClientEntryMode === 'modern-only';
|
|
72
|
+
const isSettingsDefault = appClientEntryMode === 'settings-default';
|
|
73
|
+
const targetBase = isSettingsDefault ? settingsBase : modernBase;
|
|
71
74
|
if (
|
|
72
75
|
relativePath &&
|
|
73
76
|
isClientDocumentEntryPath(relativePath) &&
|
|
74
|
-
(isModernDefault || isModernOnly) &&
|
|
75
|
-
!normalizedPath.startsWith(
|
|
77
|
+
(isModernDefault || isModernOnly || isSettingsDefault) &&
|
|
78
|
+
!normalizedPath.startsWith(targetBase)
|
|
76
79
|
) {
|
|
77
|
-
const targetPath =
|
|
80
|
+
const targetPath = isSettingsDefault
|
|
81
|
+
? relativePath === '/' || relativePath === '/index.html'
|
|
82
|
+
? settingsBase
|
|
83
|
+
: null
|
|
84
|
+
: isModernDefault
|
|
78
85
|
? relativePath === '/' || relativePath === '/index.html'
|
|
79
86
|
? relativePath === '/index.html'
|
|
80
87
|
? `${modernBase}index.html`
|