bfg-common 1.3.239 → 1.3.240
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/components/atoms/switch/Switch.vue +111 -111
- package/components/atoms/table/compact/Compact.vue +526 -526
- package/components/common/BadBrowser.vue +16 -12
- package/components/common/accordion/Accordion.vue +1 -0
- package/components/common/accordion/Recursion.vue +2 -0
- package/components/common/accordion/lib/models/interfaces.ts +1 -0
- package/components/common/adapterManager/AddAdapterModal.vue +8 -5
- package/components/common/adapterManager/AddAdapterWarningModal.vue +1 -0
- package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +2 -0
- package/components/common/adapterManager/ui/actions/MoveDownAdapterButton.vue +2 -0
- package/components/common/adapterManager/ui/actions/MoveUpAdapterButton.vue +2 -0
- package/components/common/adapterManager/ui/actions/RemoveAdapterButton.vue +2 -0
- package/components/common/adapterManager/ui/table/Adapters.vue +14 -13
- package/components/common/adapterManager/ui/table/Header.vue +6 -4
- package/components/common/adapterManager/ui/table/Table.vue +13 -4
- package/components/common/browse/Browse.vue +5 -1
- package/components/common/browse/blocks/Container.vue +3 -0
- package/components/common/browse/blocks/contents/Files.vue +1 -0
- package/components/common/context/ContextRecursion.vue +6 -1
- package/components/common/details/DetailsItem.vue +3 -0
- package/components/common/diagramMain/Header.vue +4 -0
- package/components/common/diagramMain/adapter/AdapterItem.vue +2 -0
- package/components/common/diagramMain/adapter/Contents.vue +2 -0
- package/components/common/diagramMain/lib/models/interfaces.ts +1 -0
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +1 -0
- package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +13 -27
- package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +1 -0
- package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +3 -0
- package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +8 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +6 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +2 -0
- package/components/common/diagramMain/modals/lib/config/networkModal.ts +4 -0
- package/components/common/diagramMain/modals/lib/config/portModal.ts +7 -2
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +19 -13
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +5 -0
- package/components/common/diagramMain/modals/viewSettings/ViewSettings.vue +11 -7
- package/components/common/diagramMain/network/Contents.vue +5 -4
- package/components/common/diagramMain/port/Port.vue +1 -0
- package/components/common/feedback/Buttons.vue +2 -0
- package/components/common/feedback/Feedback.vue +9 -2
- package/components/common/feedback/Message.vue +9 -0
- package/components/common/feedback/VisitPortal.vue +11 -2
- package/components/common/help/navbar/left/Left.vue +1 -0
- package/components/common/help/navbar/right/Right.vue +12 -2
- package/components/common/help/navbar/right/lib/models/interfaces.ts +1 -0
- package/components/common/home/alertsTable/AlertsTable.vue +1 -0
- package/components/common/modals/Confirmation.vue +10 -2
- package/components/common/modals/Rename.vue +1 -0
- package/components/common/monitor/advanced/tools/Tools.vue +10 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/Actions.vue +7 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/saveOptionsModal/SaveOptionsModal.vue +6 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +14 -1
- package/components/common/monitor/overview/filters/Filters.vue +12 -5
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +4 -0
- package/components/common/pages/Tasks.vue +120 -120
- package/components/common/perPage/PerPage.vue +1 -0
- package/components/common/recursionTree/RecursionTree.vue +205 -203
- package/components/common/recursionTree/lib/models/interfaces.ts +4 -2
- package/components/common/select/button/ButtonDropdown.vue +2 -0
- package/components/common/select/button/lib/models/interfaces.ts +1 -0
- package/components/common/select/input/Input.vue +1 -0
- package/components/common/select/radio/RadioGroup.vue +2 -0
- package/components/common/select/radio/lib/models/interfaces.ts +1 -0
- package/components/common/shortcuts/Block.vue +2 -0
- package/components/common/shortcuts/Category.vue +1 -0
- package/components/common/shortcuts/lib/models/interfaces.ts +1 -0
- package/components/common/spiceConsole/Drawer.vue +4 -0
- package/components/common/spiceConsole/keyboard/Keyboard.vue +1 -0
- package/components/common/spiceConsole/keyboard/lib/config/keyboardRows.ts +81 -6
- package/components/common/spiceConsole/keyboard/lib/models/interfaces.ts +1 -0
- package/components/common/split/horizontal/Horizontal.vue +1 -0
- package/components/common/vm/actions/add/Add.vue +576 -575
- package/components/common/vm/actions/clone/Clone.vue +518 -518
- package/components/common/vm/actions/clone/select/options/Options.vue +9 -3
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +269 -269
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +693 -693
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +5 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +7 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CoresPerSocket.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuHotPlug.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuModel.vue +225 -220
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Iommu.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Pc.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Sa.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +5 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/Tooltip.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +59 -59
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryHotPlug.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/Location.vue +6 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +5 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/cache/Cache.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/limitIops/LimitIops.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/mode/Mode.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/provisioning/Provisioning.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/sharing/Sharing.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/Location.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +295 -294
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/adapterType/AdapterType.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +12 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +165 -165
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +5 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelection.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/Reservation.vue +3 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/Graphics.vue +6 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/TotalVideoMemory.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/Model.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/Menu.vue +6 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/Secure.vue +6 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +5 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +5 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/lib/models/interfaces.ts +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +4 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/FileTransfer.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/FolderSharing.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/PlaybackCompression.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/PowerControl.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/imgCompression/ImgCompression.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/jpegCompression/JpegCompression.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/mouseMode/MouseMode.vue +6 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +7 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/sharePolicy/SharePolicy.vue +5 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/type/Type.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/zlibCompression/ZlibCompression.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +6 -1
- package/components/common/vm/actions/common/select/compatibility/Compatibility.vue +31 -27
- package/components/common/vm/actions/common/select/name/Name.vue +7 -1
- package/components/common/vm/actions/common/select/os/os.vue +7 -1
- package/components/common/vm/actions/common/select/storage/lib/config/config.ts +166 -166
- package/components/common/vm/actions/editSettings/EditSettings.vue +313 -313
- package/components/common/weekSelect/WeekSelect.vue +143 -112
- package/components/common/weekSelect/lib/config/options.ts +10 -10
- package/components/common/weekSelect/lib/models/interfaces.ts +1 -0
- package/components/common/wizards/datastore/add/local/createName/CreateName.vue +1 -0
- package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +8 -7
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +9 -1
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/DeletePopover.vue +6 -3
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +1 -0
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/lib/config/radioOptions.ts +3 -0
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +2 -0
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +2 -0
- package/components/common/wizards/datastore/add/types/Types.vue +1 -0
- package/components/common/wizards/network/add/modals/SelectNetwork.vue +16 -3
- package/components/common/wizards/network/add/modals/SelectStandardSwitch.vue +10 -2
- package/components/common/wizards/network/add/modals/SelectSwitch.vue +10 -2
- package/components/common/wizards/network/add/steps/ConnectionSettings.vue +5 -1
- package/components/common/wizards/network/add/steps/IpFourSettings.vue +12 -2
- package/components/common/wizards/network/add/steps/PortProperties.vue +16 -3
- package/components/common/wizards/network/add/steps/SelectConnectionType.vue +6 -3
- package/components/common/wizards/network/add/steps/SelectedTargetDevice.vue +11 -0
- package/components/common/wizards/vm/common/tooltip/Tooltip.vue +2 -0
- package/components/common/wizards/vm/migrate/select/network/Network.vue +1 -0
- package/components/common/wizards/vm/migrate/select/network/table/network/Network.vue +1 -0
- package/components/common/wizards/vm/migrate/select/storage/Storage.vue +5 -1
- package/components/common/wizards/vm/migrate/select/storage/configure/disk/Disk.vue +1 -0
- package/components/common/wizards/vm/migrate/select/storage/diskFormat/DiskFormat.vue +1 -0
- package/components/common/wizards/vm/migrate/select/storage/policy/Policy.vue +1 -0
- package/components/common/wizards/vm/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue +1 -0
- package/components/common/wizards/vm/migrate/select/targetServer/new/New.vue +9 -1
- package/composables/useAppVersion.ts +21 -21
- package/composables/useEnvLanguage.ts +20 -20
- package/lib/utils/sendTask.ts +72 -72
- package/minify.js +146 -146
- package/package.json +1 -1
- 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
- package/store/main/lib/interfaces.ts +9 -9
- package/store/tasks/actions.ts +133 -133
- package/store/tasks/getters.ts +25 -25
- package/store/tasks/lib/models/interfaces.ts +18 -18
- package/store/tasks/mutations.ts +58 -58
- package/store/tasks/state.ts +16 -16
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
|
+
})
|