@nocobase/app 1.6.0-alpha.3 → 1.6.0-alpha.30

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.
Files changed (38) hide show
  1. package/client/.umirc.ts +9 -6
  2. package/client/public/browser-checker.js +10 -0
  3. package/client/src/.umi-production/core/helmet.ts +1 -1
  4. package/client/src/.umi-production/core/history.ts +1 -1
  5. package/client/src/.umi-production/core/historyIntelli.ts +1 -1
  6. package/client/src/.umi-production/core/polyfill.ts +233 -233
  7. package/client/src/.umi-production/exports.ts +3 -3
  8. package/client/src/.umi-production/testBrowser.tsx +1 -1
  9. package/client/src/.umi-production/tsconfig.json +1 -1
  10. package/client/src/.umi-production/umi.ts +2 -2
  11. package/dist/client/4750.667c5051.async.js +69 -0
  12. package/dist/client/browser-checker.js +10 -0
  13. package/dist/client/index.html +4 -4
  14. package/dist/client/index.html.tpl +4 -4
  15. package/dist/client/npm._at_ant-design.5ba41bf5.async.js +139 -0
  16. package/dist/client/{npm._at_formily.16deb97f.async.js → npm._at_formily.07fa921d.async.js} +2 -2
  17. package/dist/client/npm._at_formulajs.0bdd8ac2.async.js +1 -0
  18. package/dist/client/npm._at_umijs.7f6c4722.async.js +7 -0
  19. package/dist/client/{npm.antd.aedb4432.async.js → npm.antd.483a9a61.async.js} +96 -96
  20. package/dist/client/{npm.highlight.js.8a8320c8.async.js → npm.highlight.js.83fe0142.async.js} +1 -1
  21. package/dist/client/{npm.lodash-es.c06b3dd5.async.js → npm.lodash-es.99877438.async.js} +1 -1
  22. package/dist/client/{npm.rc-picker.ef8a3e8b.async.js → npm.rc-picker.9e629062.async.js} +1 -1
  23. package/dist/client/npm.react-router-dom.2109af81.async.js +1 -0
  24. package/dist/client/p__index.314b4524.async.js +1557 -0
  25. package/dist/client/p__index.b415ed71.chunk.css +1 -0
  26. package/dist/client/{umi.4bb47824.js → umi.cb577ad1.js} +11 -11
  27. package/lib/config/cache.d.ts +1 -0
  28. package/lib/config/index.d.ts +1 -0
  29. package/lib/index.js +1 -4
  30. package/package.json +6 -6
  31. package/src/index.ts +1 -4
  32. package/dist/client/5415.e54e63e7.async.js +0 -73
  33. package/dist/client/npm._at_ant-design.736bcf26.async.js +0 -109
  34. package/dist/client/npm._at_formulajs.ff63776b.async.js +0 -1
  35. package/dist/client/npm._at_remix-run.9a0418a9.async.js +0 -2
  36. package/dist/client/npm.react-router-dom.832efba3.async.js +0 -1
  37. package/dist/client/p__index.9a8aaa6c.chunk.css +0 -1
  38. package/dist/client/p__index.c2222913.async.js +0 -1575
package/client/.umirc.ts CHANGED
@@ -16,16 +16,16 @@ generatePlugins();
16
16
  export default defineConfig({
17
17
  title: 'Loading...',
18
18
  devtool: process.env.NODE_ENV === 'development' ? 'source-map' : false,
19
- favicons: [`${appPublicPath}favicon/favicon.ico`],
20
- metas: [{ name: 'viewport', content: 'initial-scale=0.1' }],
19
+ favicons: [`${appPublicPath}favicon_no_exist.ico`], // 设置一个不存在的 favicon,防止显示 Umi 默认的 favicon
20
+ metas: [{ name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' }],
21
21
  links: [{ rel: 'stylesheet', href: `${appPublicPath}global.css` }],
22
22
  headScripts: [
23
- {
24
- src: `${appPublicPath}browser-checker.js`,
25
- },
26
23
  {
27
24
  content: isDevCmd
28
- ? ''
25
+ ? `
26
+ window['__nocobase_public_path__'] = "${process.env.APP_PUBLIC_PATH || '/'}";
27
+ window['__nocobase_dev_public_path__'] = "/";
28
+ `
29
29
  : `
30
30
  window['__webpack_public_path__'] = '{{env.APP_PUBLIC_PATH}}';
31
31
  window['__nocobase_public_path__'] = '{{env.APP_PUBLIC_PATH}}';
@@ -36,6 +36,9 @@ export default defineConfig({
36
36
  window['__nocobase_ws_path__'] = '{{env.WS_PATH}}';
37
37
  `,
38
38
  },
39
+ {
40
+ src: `${appPublicPath}browser-checker.js?v=1`,
41
+ },
39
42
  ],
40
43
  cacheDirectoryPath: process.env.APP_CLIENT_CACHE_DIR || `node_modules/.cache`,
41
44
  outputPath: path.resolve(__dirname, '../dist/client'),
@@ -1,3 +1,13 @@
1
+ const basename = window['__nocobase_public_path__'] || '/';
2
+ let currentPath = window.location.pathname;
3
+ if (currentPath === basename.slice(0, -1)) {
4
+ const newUrl = `${window.location.origin}${basename}${window.location.search}${window.location.hash}`;
5
+ window.location.replace(newUrl);
6
+ } else if (!currentPath.startsWith(basename)) {
7
+ let newPath = basename + (currentPath.startsWith('/') ? currentPath.slice(1) : currentPath);
8
+ let newUrl = window.location.origin + newPath + window.location.search + window.location.hash;
9
+ window.location.replace(newUrl);
10
+ }
1
11
  showLog = true;
2
12
  function log(m) {
3
13
  if (window.console && showLog) {
@@ -2,7 +2,7 @@
2
2
  // This file is generated by Umi automatically
3
3
  // DO NOT CHANGE IT MANUALLY!
4
4
  import React from 'react';
5
- import { HelmetProvider } from '/__w/nocobase/nocobase/node_modules/@umijs/renderer-react';
5
+ import { HelmetProvider } from '/home/runner/work/nocobase/nocobase/node_modules/@umijs/renderer-react';
6
6
  import { context } from './helmetContext';
7
7
 
8
8
  export const innerProvider = (container) => {
@@ -1,7 +1,7 @@
1
1
  // @ts-nocheck
2
2
  // This file is generated by Umi automatically
3
3
  // DO NOT CHANGE IT MANUALLY!
4
- import { createHashHistory, createMemoryHistory, createBrowserHistory } from '/__w/nocobase/nocobase/node_modules/@umijs/renderer-react';
4
+ import { createHashHistory, createMemoryHistory, createBrowserHistory } from '/home/runner/work/nocobase/nocobase/node_modules/@umijs/renderer-react';
5
5
  import type { UmiHistory } from './historyIntelli';
6
6
 
7
7
  let history: UmiHistory;
@@ -2,7 +2,7 @@
2
2
  // This file is generated by Umi automatically
3
3
  // DO NOT CHANGE IT MANUALLY!
4
4
  import { getRoutes } from './route'
5
- import type { History } from '/__w/nocobase/nocobase/node_modules/@umijs/renderer-react'
5
+ import type { History } from '/home/runner/work/nocobase/nocobase/node_modules/@umijs/renderer-react'
6
6
 
7
7
  type Routes = Awaited<ReturnType<typeof getRoutes>>['routes']
8
8
  type AllRoute = Routes[keyof Routes]