bfg-common 1.3.9 → 1.3.10
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/assets/scss/common/icons/icons-2.scss +222 -222
- package/components/atoms/switch/Switch.vue +107 -107
- package/components/common/browse/blocks/Title.vue +66 -66
- package/components/common/graph/Graph.vue +1 -1
- package/components/common/graph/lib/utils/renderGraph.ts +1 -1
- package/components/common/monitor/advanced/Advanced.vue +1 -1
- package/components/common/monitor/advanced/GraphView.vue +2 -2
- package/components/common/monitor/advanced/tools/lib/utils/countCores.ts +1 -1
- package/components/common/monitor/lib/models/interfaces.ts +1 -1
- package/components/common/monitor/overview/Overview.vue +2 -2
- package/composables/useLocal.ts +38 -38
- package/minify.js +146 -146
- package/package.json +2 -2
- package/public/spice-console/application/codec.js +257 -257
- package/public/spice-console/lib/rasterEngine.js +907 -907
- package/public/spice-console/network/spicechannel.js +369 -369
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="title-block" :style="blockWidth">
|
|
3
|
-
<div class="title-block__container" :style="blockWidth">
|
|
4
|
-
<div class="title-block__title" :style="blockTitleWidth">
|
|
5
|
-
<b>{{ props.title }}</b>
|
|
6
|
-
</div>
|
|
7
|
-
<div class="title-block__body">
|
|
8
|
-
<slot name="content"></slot>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup lang="ts">
|
|
15
|
-
const props = defineProps<{
|
|
16
|
-
title: string
|
|
17
|
-
width: number
|
|
18
|
-
}>()
|
|
19
|
-
|
|
20
|
-
const blockWidth = computed(() => ({ width: `${props.width}px` }))
|
|
21
|
-
const blockTitleWidth = computed(() => ({ width: `${props.width - 2}px` }))
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<style scoped lang="scss">
|
|
25
|
-
.title-block {
|
|
26
|
-
width: 100%;
|
|
27
|
-
min-height: 400px;
|
|
28
|
-
position: relative;
|
|
29
|
-
|
|
30
|
-
&__container {
|
|
31
|
-
position: absolute;
|
|
32
|
-
top: 0;
|
|
33
|
-
height: 400px;
|
|
34
|
-
left: 0;
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
border-width: 1px;
|
|
38
|
-
border-style: solid;
|
|
39
|
-
border-color: rgb(204, 204, 204);
|
|
40
|
-
border-image: initial;
|
|
41
|
-
background: rgb(255, 255, 255);
|
|
42
|
-
}
|
|
43
|
-
&__title {
|
|
44
|
-
background-color: rgb(231, 235, 239);
|
|
45
|
-
flex: 0 0 auto;
|
|
46
|
-
padding: 8px;
|
|
47
|
-
border-bottom: 1px solid rgb(204, 204, 204);
|
|
48
|
-
display: inline-block;
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
overflow: hidden !important;
|
|
51
|
-
text-overflow: ellipsis;
|
|
52
|
-
|
|
53
|
-
b {
|
|
54
|
-
font-weight: bolder;
|
|
55
|
-
font-size: 13px;
|
|
56
|
-
letter-spacing: normal;
|
|
57
|
-
font-family: Metropolis, Avenir Next, Helvetica Neue, Arial, sans-serif;
|
|
58
|
-
color: #666;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
&__body {
|
|
62
|
-
flex: 1 1 auto;
|
|
63
|
-
overflow-y: auto;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="title-block" :style="blockWidth">
|
|
3
|
+
<div class="title-block__container" :style="blockWidth">
|
|
4
|
+
<div class="title-block__title" :style="blockTitleWidth">
|
|
5
|
+
<b>{{ props.title }}</b>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="title-block__body">
|
|
8
|
+
<slot name="content"></slot>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
const props = defineProps<{
|
|
16
|
+
title: string
|
|
17
|
+
width: number
|
|
18
|
+
}>()
|
|
19
|
+
|
|
20
|
+
const blockWidth = computed(() => ({ width: `${props.width}px` }))
|
|
21
|
+
const blockTitleWidth = computed(() => ({ width: `${props.width - 2}px` }))
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style scoped lang="scss">
|
|
25
|
+
.title-block {
|
|
26
|
+
width: 100%;
|
|
27
|
+
min-height: 400px;
|
|
28
|
+
position: relative;
|
|
29
|
+
|
|
30
|
+
&__container {
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0;
|
|
33
|
+
height: 400px;
|
|
34
|
+
left: 0;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
border-width: 1px;
|
|
38
|
+
border-style: solid;
|
|
39
|
+
border-color: rgb(204, 204, 204);
|
|
40
|
+
border-image: initial;
|
|
41
|
+
background: rgb(255, 255, 255);
|
|
42
|
+
}
|
|
43
|
+
&__title {
|
|
44
|
+
background-color: rgb(231, 235, 239);
|
|
45
|
+
flex: 0 0 auto;
|
|
46
|
+
padding: 8px;
|
|
47
|
+
border-bottom: 1px solid rgb(204, 204, 204);
|
|
48
|
+
display: inline-block;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
overflow: hidden !important;
|
|
51
|
+
text-overflow: ellipsis;
|
|
52
|
+
|
|
53
|
+
b {
|
|
54
|
+
font-weight: bolder;
|
|
55
|
+
font-size: 13px;
|
|
56
|
+
letter-spacing: normal;
|
|
57
|
+
font-family: Metropolis, Avenir Next, Helvetica Neue, Arial, sans-serif;
|
|
58
|
+
color: #666;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
&__body {
|
|
62
|
+
flex: 1 1 auto;
|
|
63
|
+
overflow-y: auto;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
<script setup lang="ts">
|
|
92
92
|
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
93
93
|
import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/lib/models/types'
|
|
94
|
-
import { I_SeriesLine } from 'bfg-nuxt-3-graph/graph/models/interfaces'
|
|
94
|
+
import { I_SeriesLine } from 'bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
95
95
|
import { UI_I_MonitorGraphPayload } from '~/components/common/monitor/lib/models/interfaces'
|
|
96
96
|
import { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
|
|
97
97
|
import {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
import { useDebounceFn, useElementSize } from '@vueuse/core'
|
|
21
21
|
import { format } from 'date-fns'
|
|
22
22
|
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
23
|
-
import { graphDataFunc } from 'bfg-nuxt-3-graph/graph/utils/renderGraph'
|
|
23
|
+
import { graphDataFunc } from 'bfg-nuxt-3-graph/graph/lib/utils/renderGraph'
|
|
24
24
|
import {
|
|
25
25
|
I_LineGraph,
|
|
26
26
|
I_SeriesLine,
|
|
27
|
-
} from 'bfg-nuxt-3-graph/graph/models/interfaces'
|
|
27
|
+
} from 'bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
28
28
|
|
|
29
29
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
30
30
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I_SeriesLine } from 'bfg-nuxt-3-graph/graph/models/interfaces'
|
|
1
|
+
import { I_SeriesLine } from 'bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
2
2
|
import { UI_T_OverviewRequestType } from '~/components/common/monitor/overview/filters/lib/models/types'
|
|
3
3
|
|
|
4
4
|
export interface UI_I_GraphDataSettingItem {
|
|
@@ -95,11 +95,11 @@ import {
|
|
|
95
95
|
I_LineGraph,
|
|
96
96
|
I_SeriesColumn,
|
|
97
97
|
I_SeriesLine,
|
|
98
|
-
} from 'bfg-nuxt-3-graph/graph/models/interfaces'
|
|
98
|
+
} from 'bfg-nuxt-3-graph/graph/lib/models/interfaces'
|
|
99
99
|
import {
|
|
100
100
|
columnGraphDataFunc,
|
|
101
101
|
graphDataFunc,
|
|
102
|
-
} from 'bfg-nuxt-3-graph/graph/utils/renderGraph'
|
|
102
|
+
} from 'bfg-nuxt-3-graph/graph/lib/utils/renderGraph'
|
|
103
103
|
|
|
104
104
|
const props = defineProps<{
|
|
105
105
|
oneChart?: UI_I_GraphDataSettingItem | null
|
package/composables/useLocal.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import localRu from '~/assets/localization/local_ru.json'
|
|
2
|
-
import localEn from '~/assets/localization/local_en.json'
|
|
3
|
-
import localHy from '~/assets/localization/local_hy.json'
|
|
4
|
-
import localZh from '~/assets/localization/local_zh.json'
|
|
5
|
-
import localKk from '~/assets/localization/local_kk.json'
|
|
6
|
-
import localBe from '~/assets/localization/local_be.json'
|
|
7
|
-
const locals = {
|
|
8
|
-
localRu,
|
|
9
|
-
localEn,
|
|
10
|
-
localHy,
|
|
11
|
-
localZh,
|
|
12
|
-
localKk,
|
|
13
|
-
localBe,
|
|
14
|
-
}
|
|
15
|
-
export const useLocal = () => {
|
|
16
|
-
const config = useRuntimeConfig()
|
|
17
|
-
|
|
18
|
-
const code: string = config?.public?.LOCALIZATION_CODE?.toLowerCase() || 'ru'
|
|
19
|
-
|
|
20
|
-
document.getElementsByTagName('html')[0].setAttribute('lang', code)
|
|
21
|
-
|
|
22
|
-
switch (code) {
|
|
23
|
-
case 'ru':
|
|
24
|
-
return locals.localRu
|
|
25
|
-
case 'en':
|
|
26
|
-
return locals.localEn
|
|
27
|
-
case 'hy':
|
|
28
|
-
return locals.localHy
|
|
29
|
-
case 'zh':
|
|
30
|
-
return locals.localZh
|
|
31
|
-
case 'kk':
|
|
32
|
-
return locals.localKk
|
|
33
|
-
case 'be':
|
|
34
|
-
return locals.localBe
|
|
35
|
-
default:
|
|
36
|
-
return locals.localRu
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
import localRu from '~/assets/localization/local_ru.json'
|
|
2
|
+
import localEn from '~/assets/localization/local_en.json'
|
|
3
|
+
import localHy from '~/assets/localization/local_hy.json'
|
|
4
|
+
import localZh from '~/assets/localization/local_zh.json'
|
|
5
|
+
import localKk from '~/assets/localization/local_kk.json'
|
|
6
|
+
import localBe from '~/assets/localization/local_be.json'
|
|
7
|
+
const locals = {
|
|
8
|
+
localRu,
|
|
9
|
+
localEn,
|
|
10
|
+
localHy,
|
|
11
|
+
localZh,
|
|
12
|
+
localKk,
|
|
13
|
+
localBe,
|
|
14
|
+
}
|
|
15
|
+
export const useLocal = () => {
|
|
16
|
+
const config = useRuntimeConfig()
|
|
17
|
+
|
|
18
|
+
const code: string = config?.public?.LOCALIZATION_CODE?.toLowerCase() || 'ru'
|
|
19
|
+
|
|
20
|
+
document.getElementsByTagName('html')[0].setAttribute('lang', code)
|
|
21
|
+
|
|
22
|
+
switch (code) {
|
|
23
|
+
case 'ru':
|
|
24
|
+
return locals.localRu
|
|
25
|
+
case 'en':
|
|
26
|
+
return locals.localEn
|
|
27
|
+
case 'hy':
|
|
28
|
+
return locals.localHy
|
|
29
|
+
case 'zh':
|
|
30
|
+
return locals.localZh
|
|
31
|
+
case 'kk':
|
|
32
|
+
return locals.localKk
|
|
33
|
+
case 'be':
|
|
34
|
+
return locals.localBe
|
|
35
|
+
default:
|
|
36
|
+
return locals.localRu
|
|
37
|
+
}
|
|
38
|
+
}
|
package/minify.js
CHANGED
|
@@ -1,146 +1,146 @@
|
|
|
1
|
-
const fs = require('fs')
|
|
2
|
-
const terser = require('terser')
|
|
3
|
-
|
|
4
|
-
// Файлы которые нужно минимизировать
|
|
5
|
-
const filesByOrder = [
|
|
6
|
-
'public/spice-console/lib/decoder/jmuxer.js',
|
|
7
|
-
'public/spice-console/lib/decoder/dixie.js',
|
|
8
|
-
'public/spice-console/lib/jquery-2.0.3.js',
|
|
9
|
-
'public/spice-console/lib/utils.js',
|
|
10
|
-
'public/spice-console/lib/modernizr.js',
|
|
11
|
-
'public/spice-console/lib/jquery-mousewheel.js',
|
|
12
|
-
'public/spice-console/lib/jquery-visibility.min.js',
|
|
13
|
-
'public/spice-console/lib/lodash.4.0.0.min.js',
|
|
14
|
-
'public/spice-console/lib/jgestures.min.js',
|
|
15
|
-
'public/spice-console/lib/pixastic.js',
|
|
16
|
-
'public/spice-console/lib/base64.js',
|
|
17
|
-
'public/spice-console/lib/biginteger.js',
|
|
18
|
-
'public/spice-console/lib/virtualjoystick.js',
|
|
19
|
-
'public/spice-console/lib/prettyprint.js',
|
|
20
|
-
'public/spice-console/lib/jsbn.js',
|
|
21
|
-
'public/spice-console/lib/jsbn2.js',
|
|
22
|
-
'public/spice-console/lib/prng4.js',
|
|
23
|
-
'public/spice-console/lib/rng.js',
|
|
24
|
-
'public/spice-console/lib/sha1.js',
|
|
25
|
-
'public/spice-console/lib/encrypt.js',
|
|
26
|
-
'public/spice-console/swcanvas/swcanvas.js',
|
|
27
|
-
'public/spice-console/lib/bowser.js',
|
|
28
|
-
'public/spice-console/lib/flipper.js',
|
|
29
|
-
'public/spice-console/lib/CollisionDetector.js',
|
|
30
|
-
'public/spice-console/lib/GlobalPool.js',
|
|
31
|
-
'public/spice-console/lib/GenericObjectPool.js',
|
|
32
|
-
'public/spice-console/lib/AsyncConsumer.js',
|
|
33
|
-
'public/spice-console/lib/AsyncWorker.js',
|
|
34
|
-
'public/spice-console/lib/PacketWorkerIdentifier.js',
|
|
35
|
-
'public/spice-console/spiceobjects/spiceobjects.js',
|
|
36
|
-
'public/spice-console/spiceobjects/generated/protocol.js',
|
|
37
|
-
'public/spice-console/lib/graphicdebug.js',
|
|
38
|
-
'public/spice-console/lib/images/lz.js',
|
|
39
|
-
'public/spice-console/lib/images/bitmap.js',
|
|
40
|
-
'public/spice-console/lib/images/png.js',
|
|
41
|
-
'public/spice-console/lib/runqueue.js',
|
|
42
|
-
'public/spice-console/lib/graphic.js',
|
|
43
|
-
'public/spice-console/lib/queue.js',
|
|
44
|
-
'public/spice-console/lib/ImageUncompressor.js',
|
|
45
|
-
'public/spice-console/lib/SyncAsyncHandler.js',
|
|
46
|
-
'public/spice-console/lib/IntegrationBenchmark.js',
|
|
47
|
-
'public/spice-console/lib/stuckkeyshandler.js',
|
|
48
|
-
'public/spice-console/lib/timelapsedetector.js',
|
|
49
|
-
'public/spice-console/lib/displayRouter.js',
|
|
50
|
-
'public/spice-console/lib/rasterEngine.js',
|
|
51
|
-
'public/spice-console/lib/DataLogger.js',
|
|
52
|
-
'public/spice-console/network/socket.js',
|
|
53
|
-
'public/spice-console/network/clusternodechooser.js',
|
|
54
|
-
'public/spice-console/network/socketqueue.js',
|
|
55
|
-
'public/spice-console/network/packetcontroller.js',
|
|
56
|
-
'public/spice-console/network/packetextractor.js',
|
|
57
|
-
'public/spice-console/network/packetreassembler.js',
|
|
58
|
-
'public/spice-console/network/reassemblerfactory.js',
|
|
59
|
-
'public/spice-console/network/sizedefiner.js',
|
|
60
|
-
'public/spice-console/network/packetlinkfactory.js',
|
|
61
|
-
'public/spice-console/network/spicechannel.js',
|
|
62
|
-
'public/spice-console/network/busconnection.js',
|
|
63
|
-
'public/spice-console/network/websocketwrapper.js',
|
|
64
|
-
'public/spice-console/network/connectioncontrol.js',
|
|
65
|
-
'public/spice-console/application/checkActivity.js',
|
|
66
|
-
'public/spice-console/application/agent.js',
|
|
67
|
-
'public/spice-console/application/codec.js',
|
|
68
|
-
'public/spice-console/application/clipboard.js',
|
|
69
|
-
'public/spice-console/application/clipboard/clipboarddataparser.js',
|
|
70
|
-
'public/spice-console/application/clipboard/local/localClipboard.js',
|
|
71
|
-
'public/spice-console/application/spiceconnection.js',
|
|
72
|
-
'public/spice-console/application/clientgui.js',
|
|
73
|
-
'public/spice-console/application/packetprocess.js',
|
|
74
|
-
'public/spice-console/application/packetfilter.js',
|
|
75
|
-
'public/spice-console/application/packetfactory.js',
|
|
76
|
-
'public/spice-console/application/application.js',
|
|
77
|
-
'public/spice-console/application/virtualmouse.js',
|
|
78
|
-
'public/spice-console/application/imagecache.js',
|
|
79
|
-
'public/spice-console/application/rasteroperation.js',
|
|
80
|
-
'public/spice-console/application/stream.js',
|
|
81
|
-
'public/spice-console/application/inputmanager.js',
|
|
82
|
-
'public/spice-console/process/busprocess.js',
|
|
83
|
-
'public/spice-console/process/displayprocess.js',
|
|
84
|
-
'public/spice-console/process/displaypreprocess.js',
|
|
85
|
-
'public/spice-console/process/inputprocess.js',
|
|
86
|
-
'public/spice-console/process/cursorprocess.js',
|
|
87
|
-
'public/spice-console/process/playbackprocess.js',
|
|
88
|
-
'public/spice-console/process/mainprocess.js',
|
|
89
|
-
'public/spice-console/keymaps/keyevent.js',
|
|
90
|
-
'public/spice-console/keymaps/keymapes.js',
|
|
91
|
-
'public/spice-console/keymaps/scanCodeObjProvider.js',
|
|
92
|
-
'public/spice-console/keymaps/scanCodeObjModifier.js',
|
|
93
|
-
'public/spice-console/keymaps/keymapesObj.js',
|
|
94
|
-
'public/spice-console/keymaps/keymapus.js',
|
|
95
|
-
'public/spice-console/keymaps/keymap.js',
|
|
96
|
-
'public/spice-console/run.js',
|
|
97
|
-
]
|
|
98
|
-
|
|
99
|
-
// Папка и файл в которую вы хотите сохранить минифицированные файлы
|
|
100
|
-
const outputFolder = 'public/spice-console-minify'
|
|
101
|
-
const outputFile = `${outputFolder}/run.min.js`
|
|
102
|
-
|
|
103
|
-
// Создайте папку назначения, если она не существует
|
|
104
|
-
if (!fs.existsSync(outputFolder)) {
|
|
105
|
-
fs.mkdirSync(outputFolder, { recursive: true })
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
let index = 0
|
|
109
|
-
let runMinJsContent = ''
|
|
110
|
-
filesByOrder.forEach((filePath) => {
|
|
111
|
-
// Минифицируем
|
|
112
|
-
const fileContent = fs.readFileSync(filePath, 'utf8')
|
|
113
|
-
terser.minify(fileContent).then((minified) => {
|
|
114
|
-
if (minified.error) {
|
|
115
|
-
console.error(
|
|
116
|
-
`Ошибка при минификации файла ${filePath}: ${minified.error.message}`
|
|
117
|
-
)
|
|
118
|
-
} else {
|
|
119
|
-
runMinJsContent += minified.code.replaceAll(
|
|
120
|
-
'spice-console/application/WorkerProcess.js',
|
|
121
|
-
'spice-console-minify/WorkerProcess.min.js'
|
|
122
|
-
)
|
|
123
|
-
index++
|
|
124
|
-
|
|
125
|
-
// Если последний файл то все помещаем в run.min.js
|
|
126
|
-
if (filesByOrder.length === index)
|
|
127
|
-
fs.writeFileSync(outputFile, runMinJsContent)
|
|
128
|
-
}
|
|
129
|
-
})
|
|
130
|
-
})
|
|
131
|
-
|
|
132
|
-
// Обрабатываем Worker
|
|
133
|
-
const workerJs = 'public/spice-console/application/WorkerProcess.js'
|
|
134
|
-
const outputWorkerFile = `${outputFolder}/WorkerProcess.min.js`
|
|
135
|
-
|
|
136
|
-
// Минифицируем
|
|
137
|
-
const fileContent = fs.readFileSync(workerJs, 'utf8')
|
|
138
|
-
terser.minify(fileContent).then((minified) => {
|
|
139
|
-
if (minified.error) {
|
|
140
|
-
console.error(
|
|
141
|
-
`Ошибка при минификации файла ${workerJs}: ${minified.error.message}`
|
|
142
|
-
)
|
|
143
|
-
} else {
|
|
144
|
-
fs.writeFileSync(outputWorkerFile, minified.code)
|
|
145
|
-
}
|
|
146
|
-
})
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
const terser = require('terser')
|
|
3
|
+
|
|
4
|
+
// Файлы которые нужно минимизировать
|
|
5
|
+
const filesByOrder = [
|
|
6
|
+
'public/spice-console/lib/decoder/jmuxer.js',
|
|
7
|
+
'public/spice-console/lib/decoder/dixie.js',
|
|
8
|
+
'public/spice-console/lib/jquery-2.0.3.js',
|
|
9
|
+
'public/spice-console/lib/utils.js',
|
|
10
|
+
'public/spice-console/lib/modernizr.js',
|
|
11
|
+
'public/spice-console/lib/jquery-mousewheel.js',
|
|
12
|
+
'public/spice-console/lib/jquery-visibility.min.js',
|
|
13
|
+
'public/spice-console/lib/lodash.4.0.0.min.js',
|
|
14
|
+
'public/spice-console/lib/jgestures.min.js',
|
|
15
|
+
'public/spice-console/lib/pixastic.js',
|
|
16
|
+
'public/spice-console/lib/base64.js',
|
|
17
|
+
'public/spice-console/lib/biginteger.js',
|
|
18
|
+
'public/spice-console/lib/virtualjoystick.js',
|
|
19
|
+
'public/spice-console/lib/prettyprint.js',
|
|
20
|
+
'public/spice-console/lib/jsbn.js',
|
|
21
|
+
'public/spice-console/lib/jsbn2.js',
|
|
22
|
+
'public/spice-console/lib/prng4.js',
|
|
23
|
+
'public/spice-console/lib/rng.js',
|
|
24
|
+
'public/spice-console/lib/sha1.js',
|
|
25
|
+
'public/spice-console/lib/encrypt.js',
|
|
26
|
+
'public/spice-console/swcanvas/swcanvas.js',
|
|
27
|
+
'public/spice-console/lib/bowser.js',
|
|
28
|
+
'public/spice-console/lib/flipper.js',
|
|
29
|
+
'public/spice-console/lib/CollisionDetector.js',
|
|
30
|
+
'public/spice-console/lib/GlobalPool.js',
|
|
31
|
+
'public/spice-console/lib/GenericObjectPool.js',
|
|
32
|
+
'public/spice-console/lib/AsyncConsumer.js',
|
|
33
|
+
'public/spice-console/lib/AsyncWorker.js',
|
|
34
|
+
'public/spice-console/lib/PacketWorkerIdentifier.js',
|
|
35
|
+
'public/spice-console/spiceobjects/spiceobjects.js',
|
|
36
|
+
'public/spice-console/spiceobjects/generated/protocol.js',
|
|
37
|
+
'public/spice-console/lib/graphicdebug.js',
|
|
38
|
+
'public/spice-console/lib/images/lz.js',
|
|
39
|
+
'public/spice-console/lib/images/bitmap.js',
|
|
40
|
+
'public/spice-console/lib/images/png.js',
|
|
41
|
+
'public/spice-console/lib/runqueue.js',
|
|
42
|
+
'public/spice-console/lib/graphic.js',
|
|
43
|
+
'public/spice-console/lib/queue.js',
|
|
44
|
+
'public/spice-console/lib/ImageUncompressor.js',
|
|
45
|
+
'public/spice-console/lib/SyncAsyncHandler.js',
|
|
46
|
+
'public/spice-console/lib/IntegrationBenchmark.js',
|
|
47
|
+
'public/spice-console/lib/stuckkeyshandler.js',
|
|
48
|
+
'public/spice-console/lib/timelapsedetector.js',
|
|
49
|
+
'public/spice-console/lib/displayRouter.js',
|
|
50
|
+
'public/spice-console/lib/rasterEngine.js',
|
|
51
|
+
'public/spice-console/lib/DataLogger.js',
|
|
52
|
+
'public/spice-console/network/socket.js',
|
|
53
|
+
'public/spice-console/network/clusternodechooser.js',
|
|
54
|
+
'public/spice-console/network/socketqueue.js',
|
|
55
|
+
'public/spice-console/network/packetcontroller.js',
|
|
56
|
+
'public/spice-console/network/packetextractor.js',
|
|
57
|
+
'public/spice-console/network/packetreassembler.js',
|
|
58
|
+
'public/spice-console/network/reassemblerfactory.js',
|
|
59
|
+
'public/spice-console/network/sizedefiner.js',
|
|
60
|
+
'public/spice-console/network/packetlinkfactory.js',
|
|
61
|
+
'public/spice-console/network/spicechannel.js',
|
|
62
|
+
'public/spice-console/network/busconnection.js',
|
|
63
|
+
'public/spice-console/network/websocketwrapper.js',
|
|
64
|
+
'public/spice-console/network/connectioncontrol.js',
|
|
65
|
+
'public/spice-console/application/checkActivity.js',
|
|
66
|
+
'public/spice-console/application/agent.js',
|
|
67
|
+
'public/spice-console/application/codec.js',
|
|
68
|
+
'public/spice-console/application/clipboard.js',
|
|
69
|
+
'public/spice-console/application/clipboard/clipboarddataparser.js',
|
|
70
|
+
'public/spice-console/application/clipboard/local/localClipboard.js',
|
|
71
|
+
'public/spice-console/application/spiceconnection.js',
|
|
72
|
+
'public/spice-console/application/clientgui.js',
|
|
73
|
+
'public/spice-console/application/packetprocess.js',
|
|
74
|
+
'public/spice-console/application/packetfilter.js',
|
|
75
|
+
'public/spice-console/application/packetfactory.js',
|
|
76
|
+
'public/spice-console/application/application.js',
|
|
77
|
+
'public/spice-console/application/virtualmouse.js',
|
|
78
|
+
'public/spice-console/application/imagecache.js',
|
|
79
|
+
'public/spice-console/application/rasteroperation.js',
|
|
80
|
+
'public/spice-console/application/stream.js',
|
|
81
|
+
'public/spice-console/application/inputmanager.js',
|
|
82
|
+
'public/spice-console/process/busprocess.js',
|
|
83
|
+
'public/spice-console/process/displayprocess.js',
|
|
84
|
+
'public/spice-console/process/displaypreprocess.js',
|
|
85
|
+
'public/spice-console/process/inputprocess.js',
|
|
86
|
+
'public/spice-console/process/cursorprocess.js',
|
|
87
|
+
'public/spice-console/process/playbackprocess.js',
|
|
88
|
+
'public/spice-console/process/mainprocess.js',
|
|
89
|
+
'public/spice-console/keymaps/keyevent.js',
|
|
90
|
+
'public/spice-console/keymaps/keymapes.js',
|
|
91
|
+
'public/spice-console/keymaps/scanCodeObjProvider.js',
|
|
92
|
+
'public/spice-console/keymaps/scanCodeObjModifier.js',
|
|
93
|
+
'public/spice-console/keymaps/keymapesObj.js',
|
|
94
|
+
'public/spice-console/keymaps/keymapus.js',
|
|
95
|
+
'public/spice-console/keymaps/keymap.js',
|
|
96
|
+
'public/spice-console/run.js',
|
|
97
|
+
]
|
|
98
|
+
|
|
99
|
+
// Папка и файл в которую вы хотите сохранить минифицированные файлы
|
|
100
|
+
const outputFolder = 'public/spice-console-minify'
|
|
101
|
+
const outputFile = `${outputFolder}/run.min.js`
|
|
102
|
+
|
|
103
|
+
// Создайте папку назначения, если она не существует
|
|
104
|
+
if (!fs.existsSync(outputFolder)) {
|
|
105
|
+
fs.mkdirSync(outputFolder, { recursive: true })
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
let index = 0
|
|
109
|
+
let runMinJsContent = ''
|
|
110
|
+
filesByOrder.forEach((filePath) => {
|
|
111
|
+
// Минифицируем
|
|
112
|
+
const fileContent = fs.readFileSync(filePath, 'utf8')
|
|
113
|
+
terser.minify(fileContent).then((minified) => {
|
|
114
|
+
if (minified.error) {
|
|
115
|
+
console.error(
|
|
116
|
+
`Ошибка при минификации файла ${filePath}: ${minified.error.message}`
|
|
117
|
+
)
|
|
118
|
+
} else {
|
|
119
|
+
runMinJsContent += minified.code.replaceAll(
|
|
120
|
+
'spice-console/application/WorkerProcess.js',
|
|
121
|
+
'spice-console-minify/WorkerProcess.min.js'
|
|
122
|
+
)
|
|
123
|
+
index++
|
|
124
|
+
|
|
125
|
+
// Если последний файл то все помещаем в run.min.js
|
|
126
|
+
if (filesByOrder.length === index)
|
|
127
|
+
fs.writeFileSync(outputFile, runMinJsContent)
|
|
128
|
+
}
|
|
129
|
+
})
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
// Обрабатываем Worker
|
|
133
|
+
const workerJs = 'public/spice-console/application/WorkerProcess.js'
|
|
134
|
+
const outputWorkerFile = `${outputFolder}/WorkerProcess.min.js`
|
|
135
|
+
|
|
136
|
+
// Минифицируем
|
|
137
|
+
const fileContent = fs.readFileSync(workerJs, 'utf8')
|
|
138
|
+
terser.minify(fileContent).then((minified) => {
|
|
139
|
+
if (minified.error) {
|
|
140
|
+
console.error(
|
|
141
|
+
`Ошибка при минификации файла ${workerJs}: ${minified.error.message}`
|
|
142
|
+
)
|
|
143
|
+
} else {
|
|
144
|
+
fs.writeFileSync(outputWorkerFile, minified.code)
|
|
145
|
+
}
|
|
146
|
+
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.10",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@nuxtjs/eslint-config-typescript": "^12.0.0",
|
|
35
35
|
"@vueuse/components": "^10.1.2",
|
|
36
36
|
"date-fns": "^2.29.3",
|
|
37
|
-
"bfg-nuxt-3-graph": "^1.0.
|
|
37
|
+
"bfg-nuxt-3-graph": "^1.0.13",
|
|
38
38
|
"html2canvas": "^1.4.1",
|
|
39
39
|
"prettier-eslint": "^15.0.1"
|
|
40
40
|
}
|