svelte-log-view 4.2.13 → 4.2.15
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/LICENSE +1 -1
- package/package.json +56 -20
- package/src/LogView.svelte +6 -7
- package/src/log.css +1 -1
package/LICENSE
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-log-view",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"svelte": "./src/index.svelte",
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "svelte log viewer component",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"component",
|
|
11
11
|
"log",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"prepare": "vite build",
|
|
25
25
|
"start": "vite",
|
|
26
26
|
"test": "npm run test:cafe",
|
|
27
|
-
"test:cafe": "testcafe $BROWSER:headless tests/cafe/*.js -s build/test --page-request-timeout 3000 --app-init-delay 3000 --app vite",
|
|
27
|
+
"test:cafe": "testcafe $BROWSER:headless tests/cafe/*.js -s build/test --page-request-timeout 3000 --app-init-delay 3000 --app \"vite preview\"",
|
|
28
28
|
"docs": "documentation readme --section=API ./src/**/*.mjs && documentation readme --section=API {{javascript.source}}",
|
|
29
29
|
"lint": "npm run lint:docs",
|
|
30
30
|
"lint:docs": "documentation lint ./src/**/*.mjs && documentation lint {{javascript.source}}",
|
|
@@ -34,22 +34,23 @@
|
|
|
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": "^
|
|
38
|
-
"documentation": "^
|
|
39
|
-
"mf-styling": "^1.
|
|
40
|
-
"npm-pkgbuild": "^
|
|
41
|
-
"reader-line-iterator": "^1.1.
|
|
42
|
-
"semantic-release": "^
|
|
43
|
-
"svelte": "^3.
|
|
44
|
-
"testcafe": "^
|
|
45
|
-
"vite": "^
|
|
37
|
+
"@sveltejs/vite-plugin-svelte": "^2.0.2",
|
|
38
|
+
"documentation": "^14.0.1",
|
|
39
|
+
"mf-styling": "^1.7.42",
|
|
40
|
+
"npm-pkgbuild": "^11.1.11",
|
|
41
|
+
"reader-line-iterator": "^1.1.5",
|
|
42
|
+
"semantic-release": "^20.1.0",
|
|
43
|
+
"svelte": "^3.55.1",
|
|
44
|
+
"testcafe": "^2.2.0",
|
|
45
|
+
"vite": "^4.0.4"
|
|
46
46
|
},
|
|
47
47
|
"optionalDependencies": {
|
|
48
|
-
"mf-hosting": "^1.
|
|
48
|
+
"mf-hosting-cloudflare": "^1.0.5",
|
|
49
|
+
"mf-hosting-frontend": "^1.6.0"
|
|
49
50
|
},
|
|
50
51
|
"repository": {
|
|
51
52
|
"type": "git",
|
|
52
|
-
"url": "https://github.com/arlac77/svelte-log-view
|
|
53
|
+
"url": "https://github.com/arlac77/svelte-log-view"
|
|
53
54
|
},
|
|
54
55
|
"bugs": {
|
|
55
56
|
"url": "https://github.com/arlac77/svelte-log-view/issues"
|
|
@@ -57,10 +58,11 @@
|
|
|
57
58
|
"homepage": "https://github.com/arlac77/svelte-log-view#readme",
|
|
58
59
|
"pkgbuild": {
|
|
59
60
|
"content": {
|
|
60
|
-
"${install.dir}": "build/"
|
|
61
|
-
"${nginx.sites.dir}${name}.conf": "pkg/nginx.conf"
|
|
61
|
+
"${install.dir}": "build/"
|
|
62
62
|
},
|
|
63
|
-
"
|
|
63
|
+
"api": "${http.path}/api/log",
|
|
64
|
+
"example": true,
|
|
65
|
+
"frontend": true
|
|
64
66
|
},
|
|
65
67
|
"release": {
|
|
66
68
|
"plugins": [
|
|
@@ -70,10 +72,44 @@
|
|
|
70
72
|
[
|
|
71
73
|
"@semantic-release/exec",
|
|
72
74
|
{
|
|
73
|
-
"publishCmd": "npx npm-pkgbuild --available --continue --
|
|
75
|
+
"publishCmd": "npx npm-pkgbuild --available --continue --publish dist"
|
|
74
76
|
}
|
|
75
77
|
],
|
|
76
|
-
|
|
78
|
+
[
|
|
79
|
+
"@semantic-release/github",
|
|
80
|
+
{
|
|
81
|
+
"assets": [
|
|
82
|
+
{
|
|
83
|
+
"path": "dist/*.deb",
|
|
84
|
+
"label": "any Debian Package"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"path": "dist/*any.pkg.*",
|
|
88
|
+
"label": "any Arch Linux Package"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"path": "dist/*x86_64.pkg.*",
|
|
92
|
+
"label": "x86_64 Arch Linux Package"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"path": "dist/*aarch64.pkg.*",
|
|
96
|
+
"label": "arm64 Arch Linux Package"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"path": "dist/*noarch.rpm",
|
|
100
|
+
"label": "noarch RPM"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"path": "dist/*x86_64.rpm",
|
|
104
|
+
"label": "x86_64 RPM"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"path": "dist/*aarch64.rpm",
|
|
108
|
+
"label": "arm64 RPM"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
]
|
|
77
113
|
]
|
|
78
114
|
},
|
|
79
115
|
"template": {
|
|
@@ -81,7 +117,7 @@
|
|
|
81
117
|
"arlac77/template-arlac77-github",
|
|
82
118
|
"arlac77/template-cloudflare",
|
|
83
119
|
"arlac77/template-pacman",
|
|
84
|
-
"arlac77/template-svelte-component
|
|
120
|
+
"arlac77/template-svelte-component"
|
|
85
121
|
]
|
|
86
122
|
}
|
|
87
123
|
}
|
package/src/LogView.svelte
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
export let selected = 0;
|
|
10
10
|
export let start = 0; // first visible entry
|
|
11
11
|
|
|
12
|
-
let
|
|
12
|
+
let content;
|
|
13
13
|
let rows;
|
|
14
14
|
|
|
15
15
|
onDestroy(() => source.abort());
|
|
16
16
|
|
|
17
17
|
onMount(async () => {
|
|
18
|
-
rows =
|
|
18
|
+
rows = content.getElementsByTagName("log-row");
|
|
19
19
|
fetchFollow();
|
|
20
20
|
});
|
|
21
21
|
|
|
@@ -53,16 +53,15 @@
|
|
|
53
53
|
const cursor = entries[0];
|
|
54
54
|
|
|
55
55
|
let number = 5;
|
|
56
|
-
let i;
|
|
57
56
|
|
|
58
|
-
for (i = 0; i < number; i++) {
|
|
57
|
+
for (let i = 0; i < number; i++) {
|
|
59
58
|
entries.unshift();
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
selected += number;
|
|
63
62
|
start += number;
|
|
64
63
|
|
|
65
|
-
i = 0;
|
|
64
|
+
let i = 0;
|
|
66
65
|
for await (const entry of source.fetch(cursor, -number, number)) {
|
|
67
66
|
entries[i++] = entry;
|
|
68
67
|
if (i >= number) {
|
|
@@ -132,10 +131,10 @@
|
|
|
132
131
|
</script>
|
|
133
132
|
|
|
134
133
|
<svelte:window on:keydown={handleKeydown} />
|
|
135
|
-
<log-
|
|
134
|
+
<log-content bind:this={content}>
|
|
136
135
|
{#each visible as entry, i (i)}
|
|
137
136
|
<log-row>
|
|
138
137
|
<slot {entry} {selected} position={start + i} />
|
|
139
138
|
</log-row>
|
|
140
139
|
{/each}
|
|
141
|
-
</log-
|
|
140
|
+
</log-content>
|
package/src/log.css
CHANGED