@fe-free/core 2.8.7 → 2.8.9

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 2.8.9
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: update
8
+ - @fe-free/tool@2.8.9
9
+
10
+ ## 2.8.8
11
+
12
+ ### Patch Changes
13
+
14
+ - fix: style
15
+ - @fe-free/tool@2.8.8
16
+
3
17
  ## 2.8.7
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "2.8.7",
3
+ "version": "2.8.9",
4
4
  "description": "",
5
5
  "main": "./src/index.ts",
6
6
  "author": "",
@@ -42,7 +42,7 @@
42
42
  "safe-stable-stringify": "^2.5.0",
43
43
  "vanilla-jsoneditor": "^0.23.1",
44
44
  "zustand": "^4.5.4",
45
- "@fe-free/tool": "2.8.7"
45
+ "@fe-free/tool": "2.8.9"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@ant-design/pro-components": "2.8.9",
@@ -17,13 +17,14 @@ function CheckUpdate({ basename }: { basename: string }) {
17
17
  return;
18
18
  }
19
19
 
20
- async function getMainScriptSrc() {
20
+ async function getMainScriptPathname() {
21
21
  const res = await fetch(`${basename}?r=${Date.now()}`);
22
22
  const html = await res.text();
23
23
  const parser = new DOMParser();
24
24
  const doc = parser.parseFromString(html, 'text/html');
25
25
  const nextMainScript = doc.querySelector('[data-name="mainScript"]');
26
- return nextMainScript?.getAttribute('src');
26
+ const src = nextMainScript?.getAttribute('src');
27
+ return src ? new URL(src).pathname : null;
27
28
  }
28
29
 
29
30
  let ing = false;
@@ -49,13 +50,19 @@ function CheckUpdate({ basename }: { basename: string }) {
49
50
  }
50
51
 
51
52
  const src = mainScript.getAttribute('src');
53
+ const pathname = src ? new URL(src).pathname : null;
54
+
55
+ const checkUpdateInterval = parseInt(
56
+ localStorage.getItem('__free-checkUpdateInterval') || '60000',
57
+ 10,
58
+ );
52
59
  const timer = setInterval(async () => {
53
- const nextSrc = await getMainScriptSrc();
54
- if (nextSrc !== src) {
60
+ const nextPathname = await getMainScriptPathname();
61
+ if (nextPathname !== pathname) {
55
62
  confirm();
56
63
  return;
57
64
  }
58
- }, 1000 * 60);
65
+ }, checkUpdateInterval);
59
66
 
60
67
  return () => {
61
68
  clearInterval(timer);
package/src/style.scss CHANGED
@@ -2,6 +2,11 @@
2
2
  /* stylelint-disable-next-line at-rule-no-unknown */
3
3
  // @tailwind base;
4
4
 
5
+ // base
6
+ * {
7
+ border: 0 solid;
8
+ }
9
+
5
10
  /* stylelint-disable-next-line at-rule-no-unknown */
6
11
  @tailwind components;
7
12