svelte-log-view 4.2.18 → 4.2.20
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/package.json +12 -12
- package/src/LogView.svelte +16 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-log-view",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.20",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -24,29 +24,29 @@
|
|
|
24
24
|
"prepare": "vite build",
|
|
25
25
|
"start": "vite",
|
|
26
26
|
"test": "npm run test:cafe",
|
|
27
|
-
"test:cafe": "testcafe $BROWSER:headless tests/cafe
|
|
28
|
-
"docs": "documentation readme --section=API ./src/**/*.mjs
|
|
27
|
+
"test:cafe": "testcafe --experimental-esm $BROWSER:headless tests/cafe/*.*js -s build/test --page-request-timeout 5000 --app-init-delay 8000 --app vite",
|
|
28
|
+
"docs": "documentation readme --section=API ./src/**/*.mjs",
|
|
29
29
|
"lint": "npm run lint:docs",
|
|
30
|
-
"lint:docs": "documentation lint ./src/**/*.mjs
|
|
30
|
+
"lint:docs": "documentation lint ./src/**/*.mjs",
|
|
31
31
|
"preview": "vite preview"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
35
35
|
"@semantic-release/exec": "^6.0.3",
|
|
36
36
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
37
|
-
"@sveltejs/vite-plugin-svelte": "^2.0.
|
|
37
|
+
"@sveltejs/vite-plugin-svelte": "^2.0.3",
|
|
38
38
|
"documentation": "^14.0.1",
|
|
39
|
-
"mf-styling": "^1.7.
|
|
40
|
-
"npm-pkgbuild": "^11.
|
|
39
|
+
"mf-styling": "^1.7.49",
|
|
40
|
+
"npm-pkgbuild": "^11.5.18",
|
|
41
41
|
"reader-line-iterator": "^1.1.5",
|
|
42
|
-
"semantic-release": "^
|
|
43
|
-
"svelte": "^3.
|
|
44
|
-
"testcafe": "^2.
|
|
45
|
-
"vite": "^4.
|
|
42
|
+
"semantic-release": "^21.0.0",
|
|
43
|
+
"svelte": "^3.57.0",
|
|
44
|
+
"testcafe": "^2.4.0",
|
|
45
|
+
"vite": "^4.2.1"
|
|
46
46
|
},
|
|
47
47
|
"optionalDependencies": {
|
|
48
48
|
"mf-hosting-cloudflare": "^1.0.5",
|
|
49
|
-
"mf-hosting-frontend": "^1.7.
|
|
49
|
+
"mf-hosting-frontend": "^1.7.1"
|
|
50
50
|
},
|
|
51
51
|
"repository": {
|
|
52
52
|
"type": "git",
|
package/src/LogView.svelte
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
export let visible = entries;
|
|
8
8
|
export let follow = true;
|
|
9
9
|
export let selected = 0;
|
|
10
|
-
export let start = 0;
|
|
10
|
+
export let start = 0; // first visible entry
|
|
11
11
|
|
|
12
12
|
let content;
|
|
13
13
|
let rows;
|
|
@@ -25,21 +25,25 @@
|
|
|
25
25
|
current = entries[entries.length - 1];
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
do {
|
|
29
|
+
for await (const entry of source.fetch(current)) {
|
|
30
|
+
entries.push(entry);
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
if (entries.length <= visibleRows) {
|
|
33
|
+
visible = entries;
|
|
34
|
+
} else {
|
|
35
|
+
if (!follow) {
|
|
36
|
+
visible = entries.slice(start, visibleRows);
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
|
-
}
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
if (follow) {
|
|
41
|
+
setSelected(entries.length - 1);
|
|
42
|
+
|
|
43
|
+
current = entries[entries.length - 1];
|
|
44
|
+
}
|
|
41
45
|
}
|
|
42
|
-
}
|
|
46
|
+
} while (follow);
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
async function setSelected(toBeSelected) {
|