@camera.ui/server 0.0.50-internal.0 → 0.0.50-internal.1
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/dist/interface/index.html +44 -44
- package/dist/interface/js/{@primevue.OhxoO3MD.0.0.50-internal.0.js → @primevue.CiB2EGly.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{@tanstack.D1IL6eOv.0.0.50-internal.0.js → @tanstack.DxMw_rJn.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{@vee-validate.BGPyWWTh.0.0.50-internal.0.js → @vee-validate.RxZ3hn6V.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{@vueuse.BsKtqdiG.0.0.50-internal.0.js → @vueuse.C-k73ACm.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{Adminpanel.D93Kvbwp.0.0.50-internal.0.js → Adminpanel.DumNu6GD.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{Camera.DF2l3OMA.0.0.50-internal.0.js → Camera.BuosoqFl.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{Cameras.YzvZccdv.0.0.50-internal.0.js → Cameras.A7NJflGG.0.0.50-internal.1.js} +2 -2
- package/dist/interface/js/Cammesh.Dv3C0UiR.0.0.50-internal.1.js +1 -0
- package/dist/interface/js/{Camview.CB7_HnoQ.0.0.50-internal.0.js → Camview.GgjJp7JR.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{Config.BwflsWTm.0.0.50-internal.0.js → Config.BL3L-BFE.0.0.50-internal.1.js} +2 -2
- package/dist/interface/js/{Console.DZM8pN8Q.0.0.50-internal.0.js → Console.CxwRmUVF.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{CuiConsole.BXXU7Gth.0.0.50-internal.0.js → CuiConsole.D16kkT6R.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{CuiPluginCard.YFOrpbVD.0.0.50-internal.0.js → CuiPluginCard.Bkp__d8n.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{CuiTimeline.VV5KSJd5.0.0.50-internal.0.js → CuiTimeline.C9HKvo0G.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{FirstSteps.b-nvymgb.0.0.50-internal.0.js → FirstSteps.QuJjtAtF.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{Plugin.BOMpVEwM.0.0.50-internal.0.js → Plugin.BLUUbEej.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{Plugins.DdPwaUDA.0.0.50-internal.0.js → Plugins.DviCIk7w.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/Recordings.Dsp07cHs.0.0.50-internal.1.js +1 -0
- package/dist/interface/js/{Settings.D24ttaPu.0.0.50-internal.0.js → Settings.Clx4y9gP.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{SettingsAccount.ms3aqz4E.0.0.50-internal.0.js → SettingsAccount.cfY4-PYd.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/SettingsAppearance.CBGZAazb.0.0.50-internal.1.js +1 -0
- package/dist/interface/js/{SettingsAppearance.vue_vue_type_script_setup_true_lang.CBQ6lL3T.0.0.50-internal.0.js → SettingsAppearance.vue_vue_type_script_setup_true_lang.kxAPXcBy.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{SettingsBackup.BPEc4Rjg.0.0.50-internal.0.js → SettingsBackup.DOaJA4pp.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/SettingsRecordings.BGcwL6tk.0.0.50-internal.1.js +1 -0
- package/dist/interface/js/{SettingsRemote.BL5nXbUT.0.0.50-internal.0.js → SettingsRemote.BVU_w1Jm.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{SettingsSystem.D7T0AIpm.0.0.50-internal.0.js → SettingsSystem.P0vy90vA.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{SettingsUsers.1u0vCOVG.0.0.50-internal.0.js → SettingsUsers.DaP5m7eo.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{VersionsHandler.vue_vue_type_script_setup_true_lang.xDishkkS.0.0.50-internal.0.js → VersionsHandler.vue_vue_type_script_setup_true_lang.MmrWYW3K.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{ace-builds.D1nmvCwb.0.0.50-internal.0.js → ace-builds.C0aqA_3x.0.0.50-internal.1.js} +2 -2
- package/dist/interface/js/{ace.config.G96T2z54.0.0.50-internal.0.js → ace.config.C9wgzklI.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{backup.B_Gzxtp_.0.0.50-internal.0.js → backup.BeH6lJ5t.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{chart.js.CP_nMnnf.0.0.50-internal.0.js → chart.js.BQHSWV_g.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{close-circle.DYLuVIOg.0.0.50-internal.0.js → close-circle.DDKMxauw.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{dnd-core.T9OeW7mu.0.0.50-internal.0.js → dnd-core.dWz9rJqH.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{draggabilly.D3zGcBb3.0.0.50-internal.0.js → draggabilly.D-iZIS1n.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{engine.io-client.kITRnq-g.0.0.50-internal.0.js → engine.io-client.BwxOddB_.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{fast-deep-equal.Bpc9mIsj.0.0.50-internal.0.js → fast-deep-equal.Dz96RC_N.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{highlight.js.BlSXU-Wb.0.0.50-internal.0.js → highlight.js.CmcM8OM6.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{linkify-it.C3N1lWsJ.0.0.50-internal.0.js → linkify-it.BgLcBzlw.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{main.D0YR3Jat.0.0.50-internal.0.js → main.6bOgRV7D.0.0.50-internal.1.js} +3 -3
- package/dist/interface/js/{markdown-it.Dj0dt5s2.0.0.50-internal.0.js → markdown-it.CTgfs-3p.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{nprogress.BwQWDcGj.0.0.50-internal.0.js → nprogress.CMhnq8jS.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{pinia.DRh7plEC.0.0.50-internal.0.js → pinia.CuC5ZfNs.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{primevue.Cl58krXf.0.0.50-internal.0.js → primevue.DmwjJ4xV.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{qrcode.C1sDj6P8.0.0.50-internal.0.js → qrcode.DGZO3j1c.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{react-dnd-touch-backend.BA4WhUJo.0.0.50-internal.0.js → react-dnd-touch-backend.CEGHlD-T.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{refresh-rounded.D_SmhhUf.0.0.50-internal.0.js → refresh-rounded.D0keXzBc.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{rxjs.C-fTBwEO.0.0.50-internal.0.js → rxjs.CiDbFOB0.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{socket.io-client.DKrRxgjP.0.0.50-internal.0.js → socket.io-client.BPcXPAHG.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{socket.io-parser.EXj3YDH2.0.0.50-internal.0.js → socket.io-parser.DSGzrW_l.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{system.CY8rGd-Q.0.0.50-internal.0.js → system.BKlEObmx.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{trash-fill.CMnCN3Oy.0.0.50-internal.0.js → trash-fill.BDFILs86.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{unidragger.D0w6Tqtt.0.0.50-internal.0.js → unidragger.DcxsxHCS.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{vee-validate.BeiObIH8.0.0.50-internal.0.js → vee-validate.BGRg3oQ8.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{vue-chartjs.DtdZdiYw.0.0.50-internal.0.js → vue-chartjs.B9yk2de7.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{vue-i18n.BW2bx_6z.0.0.50-internal.0.js → vue-i18n.DXDZITpf.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{vue-inline-svg.BJkQGmKz.0.0.50-internal.0.js → vue-inline-svg.BDYaTfbi.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{vue-router.B2mOXHaC.0.0.50-internal.0.js → vue-router.CFEDA008.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{vue-zoomable.BKDyCJE7.0.0.50-internal.0.js → vue-zoomable.zqTafMgD.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{vue3-dnd.DRK24CBp.0.0.50-internal.0.js → vue3-dnd.BxM3dbYs.0.0.50-internal.1.js} +1 -1
- package/dist/interface/js/{zoom-out.DxvzgVEo.0.0.50-internal.0.js → zoom-out.B6SY9IIj.0.0.50-internal.1.js} +1 -1
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +1 -1
- package/package.json +1 -1
- package/.prettierignore +0 -12
- package/.prettierrc.json +0 -12
- package/artillery.yaml +0 -29
- package/bin/cameraui-server.ts +0 -11
- package/dist/interface/js/Cammesh.D-6dAROQ.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/Recordings.DhxjIW7e.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/SettingsAppearance.DsTjKXk1.0.0.50-internal.0.js +0 -1
- package/dist/interface/js/SettingsRecordings.DgW7M0jj.0.0.50-internal.0.js +0 -1
- package/eslint.config.js +0 -103
- package/localdeps.txt +0 -10
- package/mypy.ini +0 -30
- package/requirements.txt +0 -15
- package/ruff.toml +0 -90
- package/src/__init__.py +0 -0
- package/src/_camera_ui_tools/__init__.py +0 -0
- package/src/_camera_ui_tools/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/api/controllers/api.controller.ts +0 -19
- package/src/api/controllers/auth.controller.ts +0 -294
- package/src/api/controllers/backup.controller.ts +0 -72
- package/src/api/controllers/cameras.controller.ts +0 -1029
- package/src/api/controllers/config.controller.ts +0 -102
- package/src/api/controllers/files.controller.ts +0 -35
- package/src/api/controllers/frameWorkers.controller.ts +0 -109
- package/src/api/controllers/plugins.controller.ts +0 -1206
- package/src/api/controllers/system.controller.ts +0 -273
- package/src/api/controllers/users.controller.ts +0 -648
- package/src/api/database/checks.ts +0 -268
- package/src/api/database/constants.ts +0 -8
- package/src/api/database/index.ts +0 -262
- package/src/api/database/migration.ts +0 -62
- package/src/api/database/selfcheck.ts +0 -492
- package/src/api/database/types.ts +0 -104
- package/src/api/go2rtc/api/application.ts +0 -48
- package/src/api/go2rtc/api/config.ts +0 -61
- package/src/api/go2rtc/api/discover.ts +0 -197
- package/src/api/go2rtc/api/index.ts +0 -49
- package/src/api/go2rtc/api/snapshot.ts +0 -44
- package/src/api/go2rtc/api/streams.ts +0 -168
- package/src/api/go2rtc/index.ts +0 -43
- package/src/api/go2rtc/queue.ts +0 -50
- package/src/api/go2rtc/types.ts +0 -174
- package/src/api/index.ts +0 -286
- package/src/api/middlewares/authPermission.middleware.ts +0 -46
- package/src/api/middlewares/authValidation.middleware.ts +0 -160
- package/src/api/middlewares/pagination.middleware.ts +0 -67
- package/src/api/middlewares/socketAuth.middleware.ts +0 -136
- package/src/api/plugins/header.plugin.ts +0 -15
- package/src/api/plugins/logger.plugin.ts +0 -44
- package/src/api/plugins/proxy.plugin.ts +0 -255
- package/src/api/plugins/socket.plugin.ts +0 -28
- package/src/api/plugins/system.plugin.ts +0 -48
- package/src/api/plugins/useragent.plugin.ts +0 -19
- package/src/api/routes/api.routes.ts +0 -10
- package/src/api/routes/auth.routes.ts +0 -56
- package/src/api/routes/backup.routes.ts +0 -28
- package/src/api/routes/cameras.routes.ts +0 -281
- package/src/api/routes/config.routes.ts +0 -66
- package/src/api/routes/files.routes.ts +0 -15
- package/src/api/routes/frameWorkers.routes.ts +0 -39
- package/src/api/routes/index.ts +0 -37
- package/src/api/routes/plugins.routes.ts +0 -420
- package/src/api/routes/system.routes.ts +0 -101
- package/src/api/routes/users.routes.ts +0 -167
- package/src/api/schemas/backup.schema.ts +0 -112
- package/src/api/schemas/cameras.schema.ts +0 -479
- package/src/api/schemas/config.schema.ts +0 -38
- package/src/api/schemas/go2rtc.schema.ts +0 -189
- package/src/api/schemas/plugins.schema.ts +0 -126
- package/src/api/schemas/storage.schema.ts +0 -11
- package/src/api/schemas/system.schema.ts +0 -45
- package/src/api/schemas/users.schema.ts +0 -185
- package/src/api/services/auth.service.ts +0 -210
- package/src/api/services/backup.service.ts +0 -144
- package/src/api/services/cameras.service.ts +0 -671
- package/src/api/services/plugins.service.ts +0 -470
- package/src/api/services/system.service.ts +0 -85
- package/src/api/services/users.service.ts +0 -276
- package/src/api/types/index.ts +0 -675
- package/src/api/utils/cert.ts +0 -254
- package/src/api/utils/constants.ts +0 -17
- package/src/api/utils/fetch.ts +0 -21
- package/src/api/utils/moveFiles.ts +0 -45
- package/src/api/utils/parse.ts +0 -17
- package/src/api/websocket/index.ts +0 -110
- package/src/api/websocket/nsp/logs.ts +0 -240
- package/src/api/websocket/nsp/main.ts +0 -27
- package/src/api/websocket/nsp/metrics.ts +0 -301
- package/src/api/websocket/nsp/notifications.ts +0 -43
- package/src/api/websocket/nsp/plugins.ts +0 -37
- package/src/api/websocket/nsp/server.ts +0 -220
- package/src/api/websocket/nsp/status.ts +0 -77
- package/src/api/websocket/types.ts +0 -55
- package/src/api.ts +0 -163
- package/src/camera/classes.ts +0 -32
- package/src/camera/controller.ts +0 -579
- package/src/camera/device.ts +0 -422
- package/src/camera/frameWorker.ts +0 -403
- package/src/camera/index.ts +0 -679
- package/src/camera/interfaces.ts +0 -95
- package/src/camera/iou.ts +0 -153
- package/src/camera/polygon.ts +0 -226
- package/src/camera/python/__init__.py +0 -0
- package/src/camera/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/classes.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/delegate_controller.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/interfaces.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/iou.cpython-310.pyc +0 -0
- package/src/camera/python/__pycache__/iou.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/iou2.cpython-310.pyc +0 -0
- package/src/camera/python/__pycache__/polygon.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/camera/python/__pycache__/video_frame.cpython-311.pyc +0 -0
- package/src/camera/python/classes.py +0 -41
- package/src/camera/python/interfaces.py +0 -130
- package/src/camera/python/iou.py +0 -158
- package/src/camera/python/polygon.py +0 -230
- package/src/camera/python/test/__pycache__/polygon.cpython-310.pyc +0 -0
- package/src/camera/python/test/iou_test.py +0 -799
- package/src/camera/python/test/polygon.py +0 -238
- package/src/camera/python/test/polygon_test.py +0 -256
- package/src/camera/python/test/polygon_test2.py +0 -484
- package/src/camera/python/typings.py +0 -50
- package/src/camera/python/video_frame.py +0 -143
- package/src/camera/session.ts +0 -192
- package/src/camera/streaming/fmp4-session.ts +0 -390
- package/src/camera/streaming/peer-connection.ts +0 -273
- package/src/camera/streaming/rtsp-session.ts +0 -331
- package/src/camera/streaming/webrtc-connection.ts +0 -260
- package/src/camera/streaming/werift-session.ts +0 -317
- package/src/camera/test/iou_test.ts +0 -761
- package/src/camera/test/polygon.test.ts +0 -611
- package/src/camera/test/polygon_test.ts +0 -210
- package/src/camera/types.ts +0 -48
- package/src/camera/utils.ts +0 -489
- package/src/camera/videoFrame.ts +0 -123
- package/src/cloud/index.ts +0 -61
- package/src/cloud/remote/cloudflare.ts +0 -18
- package/src/cloud/remote/upnp.ts +0 -18
- package/src/cloud/remote/utils.ts +0 -24
- package/src/cloud/types.ts +0 -16
- package/src/decoder/child.ts +0 -883
- package/src/decoder/imageUtils.ts +0 -275
- package/src/decoder/manager.ts +0 -251
- package/src/decoder/python/__init__.py +0 -0
- package/src/decoder/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/image_utils.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/decoder/python/__pycache__/utils.cpython-311.pyc +0 -0
- package/src/decoder/python/child.py +0 -903
- package/src/decoder/python/image_utils.py +0 -196
- package/src/decoder/python/pool.py +0 -45
- package/src/decoder/python/test/group.py +0 -62
- package/src/decoder/python/test/motion.mp4 +0 -0
- package/src/decoder/python/test/motion2.mp4 +0 -0
- package/src/decoder/python/test/opencl.cl +0 -70
- package/src/decoder/python/test/opencl2.cl +0 -130
- package/src/decoder/python/test/test.py +0 -427
- package/src/decoder/python/test/test1.jpg +0 -0
- package/src/decoder/python/test/test1_resized.jpg +0 -0
- package/src/decoder/python/test/test2.jpg +0 -0
- package/src/decoder/python/test/test2.py +0 -451
- package/src/decoder/python/test/test2_resized.jpg +0 -0
- package/src/decoder/python/test/test3.jpg +0 -0
- package/src/decoder/python/test/utils.py +0 -50
- package/src/decoder/python/typings.py +0 -57
- package/src/decoder/python/utils.py +0 -70
- package/src/decoder/test/child.ts +0 -117
- package/src/decoder/test/ffmpeg.ts +0 -371
- package/src/decoder/test/test.ts +0 -182
- package/src/decoder/types.ts +0 -27
- package/src/decoder/utils.ts +0 -64
- package/src/decoder/wasm/asconfig.json +0 -28
- package/src/decoder/wasm/assembly/console.ts +0 -1
- package/src/decoder/wasm/assembly/index.ts +0 -890
- package/src/decoder/wasm/build/decoder.d.ts +0 -43
- package/src/decoder/wasm/build/decoder.js +0 -108
- package/src/decoder/wasm/build/decoder.wasm +0 -0
- package/src/decoder/wasm/tsconfig.json +0 -5
- package/src/decoder/worker.ts +0 -113
- package/src/go2rtc/index.ts +0 -324
- package/src/go2rtc/types.ts +0 -88
- package/src/main.ts +0 -267
- package/src/manager/coreManager.ts +0 -78
- package/src/manager/deviceManager.ts +0 -132
- package/src/manager/types.ts +0 -17
- package/src/plugins/index.ts +0 -443
- package/src/plugins/plugin.ts +0 -177
- package/src/plugins/runtime/base.ts +0 -282
- package/src/plugins/runtime/index.ts +0 -15
- package/src/plugins/runtime/node/child.ts +0 -193
- package/src/plugins/runtime/node/index.ts +0 -67
- package/src/plugins/runtime/node/plugin.ts +0 -122
- package/src/plugins/runtime/node/pluginApi.ts +0 -27
- package/src/plugins/runtime/node/proxy/cameraDevice.ts +0 -299
- package/src/plugins/runtime/node/proxy/coreManager.ts +0 -128
- package/src/plugins/runtime/node/proxy/deviceManager.ts +0 -187
- package/src/plugins/runtime/node/storage.ts +0 -312
- package/src/plugins/runtime/node/storageController.ts +0 -91
- package/src/plugins/runtime/python/__init__.py +0 -0
- package/src/plugins/runtime/python/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/camera_storage.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/config_service.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/constants.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/ipc.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/logger.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/message_queue.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/namespaces.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin_api.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/plugin_logger.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/proxy_utils.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/schema.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/storage.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/storage_controller.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/__pycache__/typings.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/child.py +0 -248
- package/src/plugins/runtime/python/index.ts +0 -73
- package/src/plugins/runtime/python/namespaces.py +0 -101
- package/src/plugins/runtime/python/plugin.py +0 -155
- package/src/plugins/runtime/python/plugin_api.py +0 -29
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/camera_device.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/constants.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/core_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/device_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/generate_keys.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/message_queue.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/plugins_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-310.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-311.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-38.pyc +0 -0
- package/src/plugins/runtime/python/proxy/__pycache__/system_manager.cpython-39.pyc +0 -0
- package/src/plugins/runtime/python/proxy/camera_device.py +0 -1732
- package/src/plugins/runtime/python/proxy/core_manager.py +0 -126
- package/src/plugins/runtime/python/proxy/device_manager.py +0 -197
- package/src/plugins/runtime/python/schema.py +0 -99
- package/src/plugins/runtime/python/storage.py +0 -353
- package/src/plugins/runtime/python/storage_controller.py +0 -102
- package/src/plugins/runtime/python/typings.py +0 -195
- package/src/plugins/schema.ts +0 -472
- package/src/plugins/types.ts +0 -60
- package/src/plugins/worker.ts +0 -250
- package/src/rpc/index.ts +0 -149
- package/src/rpc/namespaces.ts +0 -79
- package/src/rpc/server.ts +0 -422
- package/src/rpc/types.ts +0 -119
- package/src/rpc/utils.ts +0 -16
- package/src/services/config/constants.ts +0 -47
- package/src/services/config/defaults.ts +0 -57
- package/src/services/config/index.ts +0 -744
- package/src/services/config/types.ts +0 -211
- package/src/services/logger/index.ts +0 -96
- package/src/types.ts +0 -47
- package/src/utils/path.ts +0 -16
- package/src/utils/pythonInstaller.ts +0 -597
- package/tsconfig.json +0 -37
- package/updates.config.js +0 -3
- /package/dist/interface/assets/{@xterm.DYP7pi_n.0.0.50-internal.0.css → @xterm.DYP7pi_n.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{Adminpanel.BKek2EMH.0.0.50-internal.0.css → Adminpanel.BKek2EMH.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{Cameras.BDWZJqPN.0.0.50-internal.0.css → Cameras.BDWZJqPN.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{Camview.BFUFMoNX.0.0.50-internal.0.css → Camview.BFUFMoNX.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{CuiConsole.DCYyxdVg.0.0.50-internal.0.css → CuiConsole.DCYyxdVg.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{CuiPluginCard.yF8V0SZY.0.0.50-internal.0.css → CuiPluginCard.yF8V0SZY.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{CuiTimeline.BkIwlYtw.0.0.50-internal.0.css → CuiTimeline.BkIwlYtw.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{Plugin.DJElsAn5.0.0.50-internal.0.css → Plugin.DJElsAn5.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{Plugins.0h77qnmN.0.0.50-internal.0.css → Plugins.0h77qnmN.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{Settings.CkgfRkQr.0.0.50-internal.0.css → Settings.CkgfRkQr.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{SettingsAccount.DeFul3eQ.0.0.50-internal.0.css → SettingsAccount.DeFul3eQ.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{SettingsBackup.CX0rT0QJ.0.0.50-internal.0.css → SettingsBackup.CX0rT0QJ.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{highlight.Ch2EwETz.0.0.50-internal.0.css → highlight.Ch2EwETz.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{logo-256.BCQk9H1-.0.0.50-internal.0.png → logo-256.BCQk9H1-.0.0.50-internal.1.png} +0 -0
- /package/dist/interface/assets/{logo-512.DLKVOU2S.0.0.50-internal.0.png → logo-512.DLKVOU2S.0.0.50-internal.1.png} +0 -0
- /package/dist/interface/assets/{logo.DmEiRk0z.0.0.50-internal.0.png → logo.DmEiRk0z.0.0.50-internal.1.png} +0 -0
- /package/dist/interface/assets/{main.Cip9LkS3.0.0.50-internal.0.css → main.Cip9LkS3.0.0.50-internal.1.css} +0 -0
- /package/dist/interface/assets/{mode-json.Br7xisR1.0.0.50-internal.0.js → mode-json.Br7xisR1.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/assets/{mode-yaml.CIYL8U3d.0.0.50-internal.0.js → mode-yaml.CIYL8U3d.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/assets/{worker-base.jEXLGV2h.0.0.50-internal.0.js → worker-base.jEXLGV2h.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/assets/{worker-json.DgwNIOck.0.0.50-internal.0.js → worker-json.DgwNIOck.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/assets/{worker-yaml.B3uUYINB.0.0.50-internal.0.js → worker-yaml.B3uUYINB.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{@babel.l0sNRNKZ.0.0.50-internal.0.js → @babel.l0sNRNKZ.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{@intlify.BkGPX90O.0.0.50-internal.0.js → @intlify.BkGPX90O.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{@kurkle.D8fDXNIl.0.0.50-internal.0.js → @kurkle.D8fDXNIl.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{@primeuix.BFAY2Bk9.0.0.50-internal.0.js → @primeuix.BFAY2Bk9.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{@react-dnd.CcwRs9xb.0.0.50-internal.0.js → @react-dnd.CcwRs9xb.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{@socket.io.Dkula2eQ.0.0.50-internal.0.js → @socket.io.Dkula2eQ.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{@vue.B5vqhCp2.0.0.50-internal.0.js → @vue.B5vqhCp2.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{@xterm.CAa7rpjv.0.0.50-internal.0.js → @xterm.DIUBesyz.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{axios.DHr9lByg.0.0.50-internal.0.js → axios.DHr9lByg.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{birpc.l0sNRNKZ.0.0.50-internal.0.js → birpc.l0sNRNKZ.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{compare-versions.DqEOhma6.0.0.50-internal.0.js → compare-versions.DqEOhma6.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{dijkstrajs.C00ieaqj.0.0.50-internal.0.js → dijkstrajs.C00ieaqj.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{engine.io-parser.BiEtp6m2.0.0.50-internal.0.js → engine.io-parser.BiEtp6m2.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{entities.C20TfXL6.0.0.50-internal.0.js → entities.C20TfXL6.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{ev-emitter.X5f1qa-c.0.0.50-internal.0.js → ev-emitter.X5f1qa-c.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{get-size.D1dS-IaP.0.0.50-internal.0.js → get-size.D1dS-IaP.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{hookable.l0sNRNKZ.0.0.50-internal.0.js → hookable.l0sNRNKZ.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{mdurl.k9Sl0PQj.0.0.50-internal.0.js → mdurl.k9Sl0PQj.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{perfect-debounce.l0sNRNKZ.0.0.50-internal.0.js → perfect-debounce.l0sNRNKZ.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{primelocale.Bga3dOQu.0.0.50-internal.0.js → primelocale.Bga3dOQu.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{punycode.js.Dj65hjkv.0.0.50-internal.0.js → punycode.js.Dj65hjkv.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{react-dnd-html5-backend.1HQjlkwI.0.0.50-internal.0.js → react-dnd-html5-backend.1HQjlkwI.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{redux.BFxtlG_c.0.0.50-internal.0.js → redux.BFxtlG_c.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{tslib.9k7AwCpt.0.0.50-internal.0.js → tslib.9k7AwCpt.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{uc.micro.kMc2yuuw.0.0.50-internal.0.js → uc.micro.kMc2yuuw.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{uuid.C6aID195.0.0.50-internal.0.js → uuid.C6aID195.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{vue.l0sNRNKZ.0.0.50-internal.0.js → vue.l0sNRNKZ.0.0.50-internal.1.js} +0 -0
- /package/dist/interface/js/{zod.SKKegNRO.0.0.50-internal.0.js → zod.SKKegNRO.0.0.50-internal.1.js} +0 -0
package/src/rpc/server.ts
DELETED
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
import { IS_DEV, Logger, sleep } from '@camera.ui/common';
|
|
2
|
-
import { strip } from 'ansicolor';
|
|
3
|
-
import getPort from 'get-port';
|
|
4
|
-
import { spawn } from 'node:child_process';
|
|
5
|
-
import { mkdtempSync } from 'node:fs';
|
|
6
|
-
import { writeFile } from 'node:fs/promises';
|
|
7
|
-
import { join } from 'node:path';
|
|
8
|
-
import { createInterface } from 'node:readline';
|
|
9
|
-
import { container } from 'tsyringe';
|
|
10
|
-
|
|
11
|
-
import { RUNTIME_STATUS } from '../services/config/types.js';
|
|
12
|
-
|
|
13
|
-
import type { ChildProcess } from 'node:child_process';
|
|
14
|
-
import type { SocketService } from '../api/websocket/index.js';
|
|
15
|
-
import type { ServerRuntime } from '../api/websocket/types.js';
|
|
16
|
-
import type { ConfigService } from '../services/config/index.js';
|
|
17
|
-
import type { NatsConfig, NatsTLSConfig, ProxyAuth } from './types.js';
|
|
18
|
-
|
|
19
|
-
const SERVER_READY_MESSAGE = 'Server is ready';
|
|
20
|
-
const SERVER_ERROR_MESSAGE = 'Error listening on port';
|
|
21
|
-
|
|
22
|
-
export class NATS {
|
|
23
|
-
private readonly clusterAmount = 0;
|
|
24
|
-
private readonly auth: ProxyAuth;
|
|
25
|
-
|
|
26
|
-
private _serverPort!: number;
|
|
27
|
-
private _clusterPort!: number;
|
|
28
|
-
private _wsPort!: number;
|
|
29
|
-
private _endpoints: string[] = [];
|
|
30
|
-
|
|
31
|
-
private serverProcess?: ChildProcess;
|
|
32
|
-
private clusterProcesses: ChildProcess[] = [];
|
|
33
|
-
|
|
34
|
-
private logger: Logger;
|
|
35
|
-
private configService: ConfigService;
|
|
36
|
-
|
|
37
|
-
private tmpDir: string;
|
|
38
|
-
private config: NatsConfig;
|
|
39
|
-
|
|
40
|
-
private manuallyKilled = false;
|
|
41
|
-
private shuttingDown = false;
|
|
42
|
-
|
|
43
|
-
private _status: RUNTIME_STATUS = RUNTIME_STATUS.UNKNOWN;
|
|
44
|
-
|
|
45
|
-
get status(): RUNTIME_STATUS {
|
|
46
|
-
return this._status;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
get endpoints(): string[] {
|
|
50
|
-
return this._endpoints;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
get serverPort(): number {
|
|
54
|
-
return this._serverPort;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
get clusterPort(): number {
|
|
58
|
-
return this._clusterPort;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
get wsPort(): number {
|
|
62
|
-
return this._wsPort;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
constructor(auth: ProxyAuth) {
|
|
66
|
-
container.registerInstance('natsServer', this);
|
|
67
|
-
|
|
68
|
-
this.configService = container.resolve<ConfigService>('configService');
|
|
69
|
-
|
|
70
|
-
this.auth = auth;
|
|
71
|
-
this.logger = new Logger({ ...this.configService.loggerOptions, prefix: 'Nats', suffix: undefined });
|
|
72
|
-
this.tmpDir = mkdtempSync(join(this.configService.TMP_PATH, 'nats-'));
|
|
73
|
-
|
|
74
|
-
const tlsConfig: NatsTLSConfig = {
|
|
75
|
-
cert_file: this.configService.config.ssl.certFile,
|
|
76
|
-
key_file: this.configService.config.ssl.keyFile,
|
|
77
|
-
ca_file: this.configService.config.ssl.caFile,
|
|
78
|
-
timeout: 5,
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
this.config = {
|
|
82
|
-
host: '127.0.0.1',
|
|
83
|
-
port: 0,
|
|
84
|
-
server_name: 'camera.ui-server',
|
|
85
|
-
tls: tlsConfig,
|
|
86
|
-
cluster: {
|
|
87
|
-
name: 'camera.ui-cluster',
|
|
88
|
-
host: '127.0.0.1',
|
|
89
|
-
port: 0,
|
|
90
|
-
routes: [],
|
|
91
|
-
authorization: {
|
|
92
|
-
timeout: 5,
|
|
93
|
-
...this.auth.cluster,
|
|
94
|
-
},
|
|
95
|
-
tls: tlsConfig,
|
|
96
|
-
},
|
|
97
|
-
authorization: {
|
|
98
|
-
timeout: 5,
|
|
99
|
-
...this.auth.server,
|
|
100
|
-
},
|
|
101
|
-
// max_pending: 6 * 1024 * 1024, // 6MB
|
|
102
|
-
max_payload: 6 * 1024 * 1024, // 6MB
|
|
103
|
-
max_control_line: 1024 * 1024, // 1MB
|
|
104
|
-
// write_deadline: '5s',
|
|
105
|
-
disable_sublist_cache: true,
|
|
106
|
-
// no_fast_producer_stall: false,
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
public async start(): Promise<void> {
|
|
111
|
-
this.manuallyKilled = false;
|
|
112
|
-
this.shuttingDown = false;
|
|
113
|
-
|
|
114
|
-
this.setStatus(RUNTIME_STATUS.STARTING);
|
|
115
|
-
|
|
116
|
-
await this.configServer();
|
|
117
|
-
|
|
118
|
-
this.setStatus(RUNTIME_STATUS.STARTED);
|
|
119
|
-
|
|
120
|
-
await this.configClusters();
|
|
121
|
-
|
|
122
|
-
this.logger.debug('Nats server started and cluster formed!');
|
|
123
|
-
this.logger.log(`Nats server is running on port ${this._serverPort}`);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
private async configServer(): Promise<void> {
|
|
127
|
-
this._serverPort = await getPort({ host: '127.0.0.1', ipv6Only: false });
|
|
128
|
-
this._clusterPort = await getPort({ host: '127.0.0.1', ipv6Only: false });
|
|
129
|
-
this._wsPort = IS_DEV ? this.configService.WS_PORT : await getPort({ host: '127.0.0.1', ipv6Only: false });
|
|
130
|
-
|
|
131
|
-
this._endpoints.push(`nats://127.0.0.1:${this._serverPort}`);
|
|
132
|
-
|
|
133
|
-
const config: NatsConfig = {
|
|
134
|
-
...this.config,
|
|
135
|
-
port: this._serverPort,
|
|
136
|
-
http: IS_DEV ? 9999 : undefined,
|
|
137
|
-
cluster: {
|
|
138
|
-
...this.config.cluster,
|
|
139
|
-
port: this._clusterPort,
|
|
140
|
-
},
|
|
141
|
-
websocket: {
|
|
142
|
-
host: '127.0.0.1',
|
|
143
|
-
port: this.wsPort,
|
|
144
|
-
authorization: {
|
|
145
|
-
username: this.auth.server.user,
|
|
146
|
-
password: this.auth.server.password,
|
|
147
|
-
timeout: 5,
|
|
148
|
-
},
|
|
149
|
-
tls: {
|
|
150
|
-
cert_file: this.configService.config.ssl.certFile,
|
|
151
|
-
key_file: this.configService.config.ssl.keyFile,
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
const serverConfig = await this.writeConfigFile(config, 'server');
|
|
157
|
-
await this.startServer(serverConfig);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
private async configClusters(): Promise<void> {
|
|
161
|
-
for (let i = 0; i < this.clusterAmount; i++) {
|
|
162
|
-
const _clusterPort = await getPort({ host: '127.0.0.1', ipv6Only: false });
|
|
163
|
-
this._endpoints.push(`nats://127.0.0.1:${_clusterPort}`);
|
|
164
|
-
|
|
165
|
-
const config = {
|
|
166
|
-
...this.config,
|
|
167
|
-
server_name: `camera.ui-cluster-${i}`,
|
|
168
|
-
port: _clusterPort,
|
|
169
|
-
cluster: {
|
|
170
|
-
...this.config.cluster,
|
|
171
|
-
port: await getPort({ host: '127.0.0.1', ipv6Only: false }),
|
|
172
|
-
routes: [`nats://${this.config.cluster.authorization.user}:${this.config.cluster.authorization.password}@127.0.0.1:${this._clusterPort}`],
|
|
173
|
-
},
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
const clusterConfig = await this.writeConfigFile(config, `cluster-${i}`);
|
|
177
|
-
await new Promise<void>((resolve) => setTimeout(() => resolve(), 100)); // wait for port
|
|
178
|
-
await this.startClusterServer(clusterConfig);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
public async stop(): Promise<void> {
|
|
183
|
-
this.manuallyKilled = true;
|
|
184
|
-
|
|
185
|
-
this.logger.log('Stopping Nats server and cluster...');
|
|
186
|
-
|
|
187
|
-
const promises = this.clusterProcesses.map((process) => this.kill(process));
|
|
188
|
-
|
|
189
|
-
if (this.serverProcess) {
|
|
190
|
-
promises.push(this.kill(this.serverProcess));
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
await Promise.all(promises);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
public async restart(): Promise<void> {
|
|
197
|
-
this.setStatus(RUNTIME_STATUS.RESTARTING);
|
|
198
|
-
|
|
199
|
-
await this.stop();
|
|
200
|
-
await sleep(1000);
|
|
201
|
-
await this.start();
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
public getPID(): number {
|
|
205
|
-
return this.serverProcess?.pid ?? 0;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
private async startServer(configFile: string): Promise<void> {
|
|
209
|
-
const args = ['-config', configFile];
|
|
210
|
-
|
|
211
|
-
this.logger.debug(`Starting Nats server with following command: ${this.configService.NATS_BINARY} ${args.join(' ')}`);
|
|
212
|
-
|
|
213
|
-
await new Promise<void>((resolve, reject) => {
|
|
214
|
-
this.serverProcess = spawn(this.configService.NATS_BINARY, args);
|
|
215
|
-
this.setupProcess(this.serverProcess, args, configFile, 'server', resolve, reject);
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
private async startClusterServer(configFile: string): Promise<void> {
|
|
220
|
-
const args = ['-config', configFile];
|
|
221
|
-
|
|
222
|
-
this.logger.debug(`Starting Nats cluster server with following command: ${this.configService.NATS_BINARY} ${args.join(' ')}`);
|
|
223
|
-
|
|
224
|
-
await new Promise<void>((resolve, reject) => {
|
|
225
|
-
const clusterProcess = spawn(this.configService.NATS_BINARY, args);
|
|
226
|
-
this.setupProcess(clusterProcess, args, configFile, 'cluster', resolve, reject);
|
|
227
|
-
this.clusterProcesses.push(clusterProcess);
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
private setupProcess(natsProcess: ChildProcess, args: string[], configFile: string, name: string, resolve: () => void, reject: (error: Error) => void): void {
|
|
232
|
-
let natsPID: number | undefined = undefined;
|
|
233
|
-
|
|
234
|
-
natsProcess.once('spawn', () => {
|
|
235
|
-
this.logger.log(`Initializing process with PID: ${natsProcess.pid}`);
|
|
236
|
-
natsPID = natsProcess.pid;
|
|
237
|
-
|
|
238
|
-
if (natsPID) {
|
|
239
|
-
this.configService.addProcess({
|
|
240
|
-
pid: natsPID,
|
|
241
|
-
startTime: Date.now(),
|
|
242
|
-
command: this.configService.NATS_BINARY,
|
|
243
|
-
args,
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
natsProcess.once('error', (error: Error) => {
|
|
249
|
-
this.logger.error(`The Nats ${name} process failed to start/stop!`, error);
|
|
250
|
-
reject(error);
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
natsProcess.once('exit', () => {
|
|
254
|
-
if (name === 'server') {
|
|
255
|
-
this.setStatus(RUNTIME_STATUS.STOPPED);
|
|
256
|
-
this.configService.removeProcessByPID(natsPID);
|
|
257
|
-
|
|
258
|
-
setTimeout(() => {
|
|
259
|
-
this.handleClose();
|
|
260
|
-
resolve();
|
|
261
|
-
}, 100);
|
|
262
|
-
} else {
|
|
263
|
-
this.clusterProcesses = this.clusterProcesses.filter((p) => p !== natsProcess);
|
|
264
|
-
setTimeout(() => {
|
|
265
|
-
this.handleCloseCluster(configFile);
|
|
266
|
-
}, 100);
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
const closeInterface = () => {
|
|
271
|
-
if (name !== 'server') {
|
|
272
|
-
stdoutLine.close();
|
|
273
|
-
stderrLine.close();
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
const listen = (line: string) => {
|
|
278
|
-
if (name === 'server') {
|
|
279
|
-
this.processLogger(line);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
if (this.status === RUNTIME_STATUS.STARTING || this.status === RUNTIME_STATUS.STARTED) {
|
|
283
|
-
if (line.includes(SERVER_READY_MESSAGE)) {
|
|
284
|
-
resolve();
|
|
285
|
-
closeInterface();
|
|
286
|
-
} else if (line.includes(SERVER_ERROR_MESSAGE)) {
|
|
287
|
-
reject(new Error(`Error starting Nats ${name}!`));
|
|
288
|
-
closeInterface();
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
const stdoutLine = createInterface({
|
|
294
|
-
input: natsProcess.stdout!,
|
|
295
|
-
terminal: false,
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
const stderrLine = createInterface({
|
|
299
|
-
input: natsProcess.stderr!,
|
|
300
|
-
terminal: false,
|
|
301
|
-
});
|
|
302
|
-
|
|
303
|
-
stdoutLine.on('line', listen.bind(this));
|
|
304
|
-
stderrLine.on('line', listen.bind(this));
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
private async writeConfigFile(config: any, name: string): Promise<string> {
|
|
308
|
-
const configFile = join(this.tmpDir, `nats-server-${name}.conf`);
|
|
309
|
-
const configContent = this.stringifyConfig(config);
|
|
310
|
-
await writeFile(configFile, configContent);
|
|
311
|
-
return configFile;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
private stringifyConfig(config: any, pad = ''): string {
|
|
315
|
-
const lines: string[] = [];
|
|
316
|
-
for (const key in config) {
|
|
317
|
-
if (Object.prototype.hasOwnProperty.call(config, key)) {
|
|
318
|
-
const value = config[key];
|
|
319
|
-
if (Array.isArray(value)) {
|
|
320
|
-
lines.push(`${pad}${key} [`);
|
|
321
|
-
lines.push(this.stringifyConfig(value, pad + ' '));
|
|
322
|
-
lines.push(`${pad}]`);
|
|
323
|
-
} else if (typeof value === 'object') {
|
|
324
|
-
const keyName = Array.isArray(config) ? '' : key;
|
|
325
|
-
lines.push(`${pad}${keyName} {`);
|
|
326
|
-
lines.push(this.stringifyConfig(value, pad + ' '));
|
|
327
|
-
lines.push(`${pad}}`);
|
|
328
|
-
} else {
|
|
329
|
-
const escapedValue = typeof value === 'string' ? `"${value.replace(/"/g, '\\"')}"` : value;
|
|
330
|
-
if (!Array.isArray(config)) {
|
|
331
|
-
lines.push(`${pad}${key}: ${escapedValue}`);
|
|
332
|
-
} else {
|
|
333
|
-
lines.push(pad + escapedValue);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
return lines.join('\n');
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
private async kill(childProcess: ChildProcess): Promise<void> {
|
|
342
|
-
return new Promise((resolve) => {
|
|
343
|
-
const res = (): void => {
|
|
344
|
-
clearTimeout(killTimeout);
|
|
345
|
-
resolve();
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
childProcess.on('exit', () => {
|
|
349
|
-
res();
|
|
350
|
-
});
|
|
351
|
-
childProcess.kill('SIGKILL');
|
|
352
|
-
|
|
353
|
-
const killTimeout = setTimeout(() => res(), 3000);
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
private handleClose(): void {
|
|
358
|
-
if (!this.shuttingDown && !this.manuallyKilled) {
|
|
359
|
-
process.kill(process.pid, 'SIGINT');
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
private handleCloseCluster(configFile: string): void {
|
|
364
|
-
if (!this.shuttingDown && !this.manuallyKilled && this.status === RUNTIME_STATUS.STARTED) {
|
|
365
|
-
this.logger.log('Restarting Nats cluster in 3s...');
|
|
366
|
-
|
|
367
|
-
setTimeout(() => {
|
|
368
|
-
if (this.shuttingDown || this.manuallyKilled || this.status !== RUNTIME_STATUS.STARTED) {
|
|
369
|
-
this.logger.log('Cancelled restarting nats cluster!');
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
this.startClusterServer(configFile);
|
|
374
|
-
}, 3000);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
private setStatus(status: RUNTIME_STATUS): void {
|
|
379
|
-
this._status = status;
|
|
380
|
-
|
|
381
|
-
const socketService = container.resolve<SocketService>('socketService');
|
|
382
|
-
|
|
383
|
-
const runtimeInfo: ServerRuntime = {
|
|
384
|
-
nats: { name: 'nats', status: status },
|
|
385
|
-
};
|
|
386
|
-
|
|
387
|
-
socketService.io?.of('/status').emit('process-status', runtimeInfo);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
private processLogger(line: string): void {
|
|
391
|
-
const blankLine = strip(line.replace(/\[(\d+)\] (\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}\.\d{6}) /, ''));
|
|
392
|
-
|
|
393
|
-
if (this.isIgnorableString(blankLine)) {
|
|
394
|
-
return;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
if (blankLine.includes('WRN')) {
|
|
398
|
-
this.logger.warn(blankLine);
|
|
399
|
-
} else if (blankLine.includes('FTL') || blankLine.includes('ERR')) {
|
|
400
|
-
this.logger.error(blankLine);
|
|
401
|
-
} else {
|
|
402
|
-
this.logger.trace(blankLine);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
private isIgnorableString(line: string): boolean {
|
|
407
|
-
switch (true) {
|
|
408
|
-
case line.includes('Git:'):
|
|
409
|
-
case line.includes('Name:'):
|
|
410
|
-
case line.includes('ID:'):
|
|
411
|
-
case line.includes('Route connection created'):
|
|
412
|
-
case line.includes('Using configuration file'):
|
|
413
|
-
case line.includes('Listening for route connections'):
|
|
414
|
-
case line.includes('Cluster name is'):
|
|
415
|
-
case line.includes('Plaintext passwords detected'):
|
|
416
|
-
case line.includes('Maximum payloads over'):
|
|
417
|
-
return true;
|
|
418
|
-
default:
|
|
419
|
-
return false;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
}
|
package/src/rpc/types.ts
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import type { AuthConfig } from '@camera.ui/rpc-common';
|
|
2
|
-
import type { Camera, CameraDevice, CameraExtension, StateValues } from '@camera.ui/types';
|
|
3
|
-
import type { PluginCapabilities } from '../camera/types.js';
|
|
4
|
-
|
|
5
|
-
export interface ProxyAuth {
|
|
6
|
-
cluster: AuthConfig;
|
|
7
|
-
server: AuthConfig;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface NatsAuthConfig {
|
|
11
|
-
timeout: number;
|
|
12
|
-
user: string;
|
|
13
|
-
password: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface NatsTLSConfig {
|
|
17
|
-
cert_file: string;
|
|
18
|
-
key_file: string;
|
|
19
|
-
ca_file: string;
|
|
20
|
-
timeout: number;
|
|
21
|
-
verify?: boolean;
|
|
22
|
-
insecure?: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface NatsWsAuthConfig {
|
|
26
|
-
timeout: number;
|
|
27
|
-
username: string;
|
|
28
|
-
password: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface NatsWsTLSConfig {
|
|
32
|
-
cert_file: string;
|
|
33
|
-
key_file: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface NatsClusterConfig {
|
|
37
|
-
host: string;
|
|
38
|
-
port: number;
|
|
39
|
-
name: string;
|
|
40
|
-
routes: string[];
|
|
41
|
-
tls: NatsTLSConfig;
|
|
42
|
-
authorization: NatsAuthConfig;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface NatsWebsocketConfig {
|
|
46
|
-
host: string;
|
|
47
|
-
port: number;
|
|
48
|
-
authorization: NatsWsAuthConfig;
|
|
49
|
-
tls: NatsWsTLSConfig;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface NatsConfig {
|
|
53
|
-
host: string;
|
|
54
|
-
port: number;
|
|
55
|
-
http?: number;
|
|
56
|
-
server_name: string;
|
|
57
|
-
cluster: NatsClusterConfig;
|
|
58
|
-
authorization: NatsAuthConfig;
|
|
59
|
-
tls: NatsTLSConfig;
|
|
60
|
-
websocket?: NatsWebsocketConfig;
|
|
61
|
-
max_pending?: number;
|
|
62
|
-
max_payload?: number;
|
|
63
|
-
max_control_line?: number;
|
|
64
|
-
disable_sublist_cache?: boolean;
|
|
65
|
-
no_fast_producer_stall?: boolean;
|
|
66
|
-
write_deadline?: string;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface DeviceManagerListenerMessagePayload {
|
|
70
|
-
type: keyof DeviceManagerProxyEventCallbacks;
|
|
71
|
-
data: DeviceManagerProxyEvents[keyof DeviceManagerProxyEvents];
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface DeviceManagerProxyEvents {
|
|
75
|
-
cameraSelected: { camera: Camera; extension: CameraExtension };
|
|
76
|
-
cameraDeselected: { camera: Camera; extension: CameraExtension };
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface DeviceManagerProxyEventCallbacks {
|
|
80
|
-
cameraSelected: (camera: CameraDevice, extension: CameraExtension) => void;
|
|
81
|
-
cameraDeselected: (cameraId: string, extension: CameraExtension) => void;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface DeviceManagerProxyGenericEvent<K extends keyof DeviceManagerProxyEvents> {
|
|
85
|
-
type: K;
|
|
86
|
-
data: DeviceManagerProxyEvents[K];
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface CoreManagerListenerMessagePayload {
|
|
90
|
-
type: keyof CoreManagerProxyEventCallbacks;
|
|
91
|
-
data: CoreManagerProxyEvents[keyof CoreManagerProxyEvents];
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface CoreManagerProxyEvents {}
|
|
95
|
-
|
|
96
|
-
export interface CoreManagerProxyEventCallbacks {}
|
|
97
|
-
|
|
98
|
-
export interface CoreManagerProxyGenericEvent<K extends keyof CoreManagerProxyEvents> {
|
|
99
|
-
type: K;
|
|
100
|
-
data: CoreManagerProxyEvents[K];
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export interface CameraDeviceListenerStatePayload<K extends keyof StateValues> {
|
|
104
|
-
stateName: K;
|
|
105
|
-
data: { newEvent: StateValues[K]; oldEvent: StateValues[K] };
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface CameraDeviceListenerMessagePayload {
|
|
109
|
-
type: 'removed' | 'updated' | 'cameraState' | 'frameWorkerState' | 'capabilities';
|
|
110
|
-
data?: any;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export interface RefreshedStates {
|
|
114
|
-
camera: Camera;
|
|
115
|
-
states: StateValues;
|
|
116
|
-
cameraState: boolean;
|
|
117
|
-
frameWorkerState: boolean;
|
|
118
|
-
capabilities: PluginCapabilities[];
|
|
119
|
-
}
|
package/src/rpc/utils.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { randomBytes } from 'node:crypto';
|
|
2
|
-
|
|
3
|
-
import type { AuthConfig } from '@camera.ui/rpc-common';
|
|
4
|
-
|
|
5
|
-
export function generateCredentials(): AuthConfig {
|
|
6
|
-
const userBytes = randomBytes(8);
|
|
7
|
-
const passwordBytes = randomBytes(16);
|
|
8
|
-
|
|
9
|
-
const user = userBytes
|
|
10
|
-
.toString('base64')
|
|
11
|
-
.replace(/[+/=@:]/g, '')
|
|
12
|
-
.slice(0, 8);
|
|
13
|
-
const password = passwordBytes.toString('base64').replace(/[+/=@:]/g, '');
|
|
14
|
-
|
|
15
|
-
return { user, password };
|
|
16
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ffmpegPath, isFFmpegAvailable } from '@camera.ui/ffmpeg';
|
|
2
|
-
import { platform } from 'node:os';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
DEFAULT_CONFIG_LOGGER,
|
|
6
|
-
DEFAULT_CONFIG_PLUGINS,
|
|
7
|
-
DEFAULT_CONFIG_PORT,
|
|
8
|
-
DEFAULT_CONFIG_SSL,
|
|
9
|
-
DEFAULT_GO2RTC_CONFIG_API,
|
|
10
|
-
DEFAULT_GO2RTC_CONFIG_FFMPEG,
|
|
11
|
-
DEFAULT_GO2RTC_CONFIG_LOGGER,
|
|
12
|
-
DEFAULT_GO2RTC_CONFIG_RTMP,
|
|
13
|
-
DEFAULT_GO2RTC_CONFIG_RTSP,
|
|
14
|
-
DEFAULT_GO2RTC_CONFIG_SRTP,
|
|
15
|
-
DEFAULT_GO2RTC_CONFIG_WEBRTC,
|
|
16
|
-
} from './defaults.js';
|
|
17
|
-
|
|
18
|
-
import type { IceServer } from '@camera.ui/types';
|
|
19
|
-
import type { Go2RtcConfig, IConfig } from './types.js';
|
|
20
|
-
|
|
21
|
-
export const PROCESS_IDENTIFIER = '--id=camera.ui';
|
|
22
|
-
|
|
23
|
-
export const DEFAULT_ICE_SERVERS: IceServer[] = [
|
|
24
|
-
{
|
|
25
|
-
urls: ['stun:stun.l.google.com:19302'],
|
|
26
|
-
},
|
|
27
|
-
];
|
|
28
|
-
|
|
29
|
-
export const DEFAULT_CONFIG: IConfig = {
|
|
30
|
-
port: DEFAULT_CONFIG_PORT,
|
|
31
|
-
ssl: DEFAULT_CONFIG_SSL,
|
|
32
|
-
logger: DEFAULT_CONFIG_LOGGER,
|
|
33
|
-
plugins: DEFAULT_CONFIG_PLUGINS,
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const DEFAULT_GO2RTC_CONFIG: Go2RtcConfig = {
|
|
37
|
-
log: DEFAULT_GO2RTC_CONFIG_LOGGER,
|
|
38
|
-
api: DEFAULT_GO2RTC_CONFIG_API,
|
|
39
|
-
rtsp: DEFAULT_GO2RTC_CONFIG_RTSP,
|
|
40
|
-
srtp: DEFAULT_GO2RTC_CONFIG_SRTP,
|
|
41
|
-
rtmp: DEFAULT_GO2RTC_CONFIG_RTMP,
|
|
42
|
-
webrtc: DEFAULT_GO2RTC_CONFIG_WEBRTC,
|
|
43
|
-
ffmpeg: {
|
|
44
|
-
...DEFAULT_GO2RTC_CONFIG_FFMPEG,
|
|
45
|
-
bin: !isFFmpegAvailable() ? (platform() === 'win32' ? 'ffmpeg.exe' : 'ffmpeg') : ffmpegPath().replace('app.asar', 'app.asar.unpacked'),
|
|
46
|
-
},
|
|
47
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { API, Ffmpeg, IConfigSSL, Log, Logger, PluginsSettings, RTMP, RTSP, SRTP, Webrtc } from './types.js';
|
|
2
|
-
|
|
3
|
-
// server
|
|
4
|
-
export const DEFAULT_CONFIG_PORT = 3443;
|
|
5
|
-
export const DEFAULT_CONFIG_SSL: IConfigSSL = {
|
|
6
|
-
certFile: '',
|
|
7
|
-
keyFile: '',
|
|
8
|
-
caFile: '',
|
|
9
|
-
addresses: ['127.0.0.1'],
|
|
10
|
-
};
|
|
11
|
-
export const DEFAULT_CONFIG_LOGGER: Logger = {
|
|
12
|
-
level: 'trace',
|
|
13
|
-
disableTimestamps: false,
|
|
14
|
-
};
|
|
15
|
-
export const DEFAULT_CONFIG_PLUGINS: PluginsSettings = {
|
|
16
|
-
disabledPlugins: [],
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// go2rtc
|
|
20
|
-
export const DEFAULT_GO2RTC_CONFIG_LOGGER: Partial<Log> = {
|
|
21
|
-
level: 'debug',
|
|
22
|
-
format: 'text',
|
|
23
|
-
hass: 'info',
|
|
24
|
-
};
|
|
25
|
-
export const DEFAULT_GO2RTC_CONFIG_API: API = {
|
|
26
|
-
origin: '*',
|
|
27
|
-
listen: '',
|
|
28
|
-
tls_listen: '127.0.0.1:2000',
|
|
29
|
-
tls_cert: '',
|
|
30
|
-
tls_key: '',
|
|
31
|
-
tls_ca: '',
|
|
32
|
-
};
|
|
33
|
-
export const DEFAULT_GO2RTC_CONFIG_RTSP: RTSP = {
|
|
34
|
-
listen: ':2001',
|
|
35
|
-
default_query: 'video=all&audio=all',
|
|
36
|
-
username: 'admin',
|
|
37
|
-
password: 'admin',
|
|
38
|
-
};
|
|
39
|
-
export const DEFAULT_GO2RTC_CONFIG_SRTP: SRTP = {
|
|
40
|
-
listen: '127.0.0.1:2002',
|
|
41
|
-
};
|
|
42
|
-
export const DEFAULT_GO2RTC_CONFIG_RTMP: RTMP = {
|
|
43
|
-
listen: '127.0.0.1:2003',
|
|
44
|
-
};
|
|
45
|
-
export const DEFAULT_GO2RTC_CONFIG_WEBRTC: Webrtc = {
|
|
46
|
-
listen: ':2004/tcp',
|
|
47
|
-
candidates: ['stun:2004'],
|
|
48
|
-
};
|
|
49
|
-
export const DEFAULT_GO2RTC_CONFIG_FFMPEG: Ffmpeg = {
|
|
50
|
-
bin: 'ffmpeg',
|
|
51
|
-
global: '-hide_banner',
|
|
52
|
-
file: '-re -stream_loop -1 -i {input}',
|
|
53
|
-
http: '-fflags +discardcorrupt+nobuffer -flags low_delay -probesize 500000 -analyzeduration 0 -avioflags direct -i {input}',
|
|
54
|
-
// eslint-disable-next-line @stylistic/max-len
|
|
55
|
-
rtsp: '-fflags +discardcorrupt+nobuffer -flags low_delay -probesize 500000 -analyzeduration 0 -avioflags direct -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}',
|
|
56
|
-
output: '-user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}',
|
|
57
|
-
};
|