omegga 0.1.85 → 1.0.2
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/README.md +142 -62
- package/bin/omegga +10 -4
- package/dist/brickadia/config.d.ts +3 -0
- package/dist/brickadia/config.d.ts.map +1 -0
- package/dist/brickadia/config.js +61 -0
- package/dist/brickadia/config.js.map +1 -0
- package/dist/brickadia/presets.d.ts +65 -0
- package/dist/brickadia/presets.js +3 -0
- package/dist/brickadia/presets.js.map +1 -0
- package/dist/brickadia/server.d.ts +20 -0
- package/dist/brickadia/server.d.ts.map +1 -0
- package/dist/brickadia/server.js +188 -0
- package/dist/brickadia/server.js.map +1 -0
- package/dist/brickadia/types.d.ts +45 -0
- package/dist/brickadia/types.d.ts.map +1 -0
- package/dist/brickadia/types.js +3 -0
- package/dist/brickadia/types.js.map +1 -0
- package/dist/cli/auth.d.ts +20 -0
- package/dist/cli/auth.d.ts.map +1 -0
- package/dist/cli/auth.js +115 -0
- package/dist/cli/auth.js.map +1 -0
- package/dist/cli/config.d.ts +10 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +72 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/index.d.ts +20 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +15 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/installer.d.ts +1 -0
- package/dist/cli/installer.d.ts.map +1 -0
- package/dist/cli/installer.js +55 -0
- package/dist/cli/installer.js.map +1 -0
- package/dist/cli/plugin.d.ts +11 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +598 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/terminal.d.ts +34 -0
- package/dist/cli/terminal.d.ts.map +1 -0
- package/dist/cli/terminal.js +395 -0
- package/dist/cli/terminal.js.map +1 -0
- package/dist/config/authorizer.d.ts +2 -0
- package/dist/config/authorizer.d.ts.map +1 -0
- package/dist/config/authorizer.js +38 -0
- package/dist/config/authorizer.js.map +1 -0
- package/dist/config/formats/format_js.d.ts +3 -0
- package/dist/config/formats/format_js.d.ts.map +1 -0
- package/dist/config/formats/format_js.js +10 -0
- package/dist/config/formats/format_js.js.map +1 -0
- package/dist/config/formats/format_yml.d.ts +3 -0
- package/dist/config/formats/format_yml.d.ts.map +1 -0
- package/dist/config/formats/format_yml.js +14 -0
- package/dist/config/formats/format_yml.js.map +1 -0
- package/dist/config/index.d.ts +18 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +86 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/reader.d.ts +3 -0
- package/dist/config/reader.d.ts.map +1 -0
- package/dist/config/reader.js +30 -0
- package/dist/config/reader.js.map +1 -0
- package/dist/config/types.d.ts +37 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +3 -0
- package/dist/config/types.js.map +1 -0
- package/dist/config/validator.d.ts +6 -0
- package/dist/config/validator.d.ts.map +1 -0
- package/dist/config/validator.js +26 -0
- package/dist/config/validator.js.map +1 -0
- package/dist/config/writer.d.ts +3 -0
- package/dist/config/writer.d.ts.map +1 -0
- package/dist/config/writer.js +25 -0
- package/dist/config/writer.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/info/default_commands.json +28 -0
- package/dist/lib.d.ts +21 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/lib.js +54 -0
- package/dist/lib.js.map +1 -0
- package/dist/logger.d.ts +41 -0
- package/dist/logger.js +67 -0
- package/dist/logger.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +284 -0
- package/dist/main.js.map +1 -0
- package/dist/omegga/auth.d.ts +6 -0
- package/dist/omegga/auth.d.ts.map +1 -0
- package/dist/omegga/auth.js +139 -0
- package/dist/omegga/auth.js.map +1 -0
- package/dist/omegga/commandInjector.d.ts +35 -0
- package/dist/omegga/commandInjector.d.ts.map +1 -0
- package/dist/omegga/commandInjector.js +234 -0
- package/dist/omegga/commandInjector.js.map +1 -0
- package/dist/omegga/index.d.ts +7 -0
- package/dist/omegga/index.d.ts.map +1 -0
- package/dist/omegga/index.js +43 -0
- package/dist/omegga/index.js.map +1 -0
- package/dist/omegga/logWrangler.d.ts +32 -0
- package/dist/omegga/logWrangler.d.ts.map +1 -0
- package/dist/omegga/logWrangler.js +279 -0
- package/dist/omegga/logWrangler.js.map +1 -0
- package/dist/omegga/matchers/auth.d.ts +9 -0
- package/dist/omegga/matchers/auth.d.ts.map +1 -0
- package/dist/omegga/matchers/auth.js +53 -0
- package/dist/omegga/matchers/auth.js.map +1 -0
- package/dist/omegga/matchers/chat.d.ts +9 -0
- package/dist/omegga/matchers/chat.d.ts.map +1 -0
- package/dist/omegga/matchers/chat.js +68 -0
- package/dist/omegga/matchers/chat.js.map +1 -0
- package/dist/omegga/matchers/command.d.ts +7 -0
- package/dist/omegga/matchers/command.d.ts.map +1 -0
- package/dist/omegga/matchers/command.js +39 -0
- package/dist/omegga/matchers/command.js.map +1 -0
- package/dist/omegga/matchers/exit.d.ts +3 -0
- package/dist/omegga/matchers/exit.d.ts.map +1 -0
- package/dist/omegga/matchers/exit.js +21 -0
- package/dist/omegga/matchers/exit.js.map +1 -0
- package/dist/omegga/matchers/index.d.ts +3 -0
- package/dist/omegga/matchers/index.d.ts.map +1 -0
- package/dist/omegga/matchers/index.js +39 -0
- package/dist/omegga/matchers/index.js.map +1 -0
- package/dist/omegga/matchers/init.d.ts +3 -0
- package/dist/omegga/matchers/init.d.ts.map +1 -0
- package/dist/omegga/matchers/init.js +26 -0
- package/dist/omegga/matchers/init.js.map +1 -0
- package/dist/omegga/matchers/interact.d.ts +4 -0
- package/dist/omegga/matchers/interact.js +39 -0
- package/dist/omegga/matchers/interact.js.map +1 -0
- package/dist/omegga/matchers/join.d.ts +4 -0
- package/dist/omegga/matchers/join.d.ts.map +1 -0
- package/dist/omegga/matchers/join.js +95 -0
- package/dist/omegga/matchers/join.js.map +1 -0
- package/dist/omegga/matchers/leave.d.ts +4 -0
- package/dist/omegga/matchers/leave.d.ts.map +1 -0
- package/dist/omegga/matchers/leave.js +59 -0
- package/dist/omegga/matchers/leave.js.map +1 -0
- package/dist/omegga/matchers/mapChange.d.ts +3 -0
- package/dist/omegga/matchers/mapChange.d.ts.map +1 -0
- package/dist/omegga/matchers/mapChange.js +38 -0
- package/dist/omegga/matchers/mapChange.js.map +1 -0
- package/dist/omegga/matchers/types.d.ts +5 -0
- package/dist/omegga/matchers/types.d.ts.map +1 -0
- package/dist/omegga/matchers/types.js +7 -0
- package/dist/omegga/matchers/types.js.map +1 -0
- package/dist/omegga/matchers/version.d.ts +3 -0
- package/dist/omegga/matchers/version.d.ts.map +1 -0
- package/dist/omegga/matchers/version.js +45 -0
- package/dist/omegga/matchers/version.js.map +1 -0
- package/dist/omegga/player.d.ts +71 -0
- package/dist/omegga/player.d.ts.map +1 -0
- package/dist/omegga/player.js +442 -0
- package/dist/omegga/player.js.map +1 -0
- package/dist/omegga/plugin/plugin_jsonrpc_stdio.d.ts +23 -0
- package/dist/omegga/plugin/plugin_jsonrpc_stdio.d.ts.map +1 -0
- package/dist/omegga/plugin/plugin_jsonrpc_stdio.js +441 -0
- package/dist/omegga/plugin/plugin_jsonrpc_stdio.js.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.d.ts +129 -0
- package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.d.ts.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.js +260 -0
- package/dist/omegga/plugin/plugin_node_safe/proxyOmegga.js.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe/worker.d.ts +1 -0
- package/dist/omegga/plugin/plugin_node_safe/worker.d.ts.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe/worker.js +289 -0
- package/dist/omegga/plugin/plugin_node_safe/worker.js.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe.d.ts +24 -0
- package/dist/omegga/plugin/plugin_node_safe.d.ts.map +1 -0
- package/dist/omegga/plugin/plugin_node_safe.js +397 -0
- package/dist/omegga/plugin/plugin_node_safe.js.map +1 -0
- package/dist/omegga/plugin/plugin_node_unsafe.d.ts +13 -0
- package/dist/omegga/plugin/plugin_node_unsafe.d.ts.map +1 -0
- package/dist/omegga/plugin/plugin_node_unsafe.js +178 -0
- package/dist/omegga/plugin/plugin_node_unsafe.js.map +1 -0
- package/dist/omegga/plugin.d.ts +86 -0
- package/dist/omegga/plugin.d.ts.map +1 -0
- package/dist/omegga/plugin.js +458 -0
- package/dist/omegga/plugin.js.map +1 -0
- package/dist/omegga/server.d.ts +149 -0
- package/dist/omegga/server.d.ts.map +1 -0
- package/dist/omegga/server.js +601 -0
- package/dist/omegga/server.js.map +1 -0
- package/dist/omegga/types.d.ts +48 -0
- package/dist/omegga/types.d.ts.map +1 -0
- package/dist/omegga/types.js +3 -0
- package/dist/omegga/types.js.map +1 -0
- package/dist/omegga/wrapper.d.ts +22 -0
- package/dist/omegga/wrapper.d.ts.map +1 -0
- package/dist/omegga/wrapper.js +75 -0
- package/dist/omegga/wrapper.js.map +1 -0
- package/dist/omeggaplugin.d.ts +1 -0
- package/dist/omeggaplugin.js +4 -0
- package/dist/omeggaplugin.js.map +1 -0
- package/dist/plugin.d.ts +781 -0
- package/dist/plugin.js +41 -0
- package/dist/plugin.js.map +1 -0
- package/dist/softconfig.d.ts +51 -0
- package/dist/softconfig.d.ts.map +1 -0
- package/dist/softconfig.js +82 -0
- package/dist/softconfig.js.map +1 -0
- package/dist/util/brick/checkBounds.d.ts +8 -0
- package/dist/util/brick/checkBounds.d.ts.map +1 -0
- package/dist/util/brick/checkBounds.js +22 -0
- package/dist/util/brick/checkBounds.js.map +1 -0
- package/dist/util/brick/constants.d.ts +18 -0
- package/dist/util/brick/constants.d.ts.map +1 -0
- package/dist/util/brick/constants.js +184 -0
- package/dist/util/brick/constants.js.map +1 -0
- package/dist/util/brick/getBounds.d.ts +4 -0
- package/dist/util/brick/getBounds.d.ts.map +1 -0
- package/dist/util/brick/getBounds.js +39 -0
- package/dist/util/brick/getBounds.js.map +1 -0
- package/dist/util/brick/getBrickSize.d.ts +3 -0
- package/dist/util/brick/getBrickSize.d.ts.map +1 -0
- package/dist/util/brick/getBrickSize.js +12 -0
- package/dist/util/brick/getBrickSize.js.map +1 -0
- package/dist/util/brick/getScaleAxis.d.ts +3 -0
- package/dist/util/brick/getScaleAxis.d.ts.map +1 -0
- package/dist/util/brick/getScaleAxis.js +38 -0
- package/dist/util/brick/getScaleAxis.js.map +1 -0
- package/dist/util/brick/index.d.ts +13 -0
- package/dist/util/brick/index.d.ts.map +1 -0
- package/dist/util/brick/index.js +29 -0
- package/dist/util/brick/index.js.map +1 -0
- package/dist/util/brick/rotate.d.ts +17 -0
- package/dist/util/brick/rotate.d.ts.map +1 -0
- package/dist/util/brick/rotate.js +38 -0
- package/dist/util/brick/rotate.js.map +1 -0
- package/dist/util/brick/setOwnership.d.ts +12 -0
- package/dist/util/brick/setOwnership.d.ts.map +1 -0
- package/dist/util/brick/setOwnership.js +21 -0
- package/dist/util/brick/setOwnership.js.map +1 -0
- package/dist/util/chat.d.ts +23 -0
- package/dist/util/chat.d.ts.map +1 -0
- package/dist/util/chat.js +50 -0
- package/dist/util/chat.js.map +1 -0
- package/dist/util/color.d.ts +13 -0
- package/dist/util/color.d.ts.map +1 -0
- package/dist/util/color.js +130 -0
- package/dist/util/color.js.map +1 -0
- package/dist/util/file.d.ts +5 -0
- package/dist/util/file.d.ts.map +1 -0
- package/dist/util/file.js +114 -0
- package/dist/util/file.js.map +1 -0
- package/dist/util/index.d.ts +162 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/index.js +92 -0
- package/dist/util/index.js.map +1 -0
- package/dist/util/map.d.ts +6 -0
- package/dist/util/map.d.ts.map +1 -0
- package/dist/util/map.js +26 -0
- package/dist/util/map.js.map +1 -0
- package/dist/util/pattern.d.ts +1 -0
- package/dist/util/pattern.d.ts.map +1 -0
- package/dist/util/pattern.js +11 -0
- package/dist/util/pattern.js.map +1 -0
- package/dist/util/time.d.ts +4 -0
- package/dist/util/time.d.ts.map +1 -0
- package/dist/util/time.js +41 -0
- package/dist/util/time.js.map +1 -0
- package/dist/util/uuid.d.ts +2 -0
- package/dist/util/uuid.d.ts.map +1 -0
- package/dist/util/uuid.js +8 -0
- package/dist/util/uuid.js.map +1 -0
- package/dist/util/wsl.d.ts +1 -0
- package/dist/util/wsl.d.ts.map +1 -0
- package/dist/util/wsl.js +14 -0
- package/dist/util/wsl.js.map +1 -0
- package/dist/webserver/backend/api.d.ts +3 -0
- package/dist/webserver/backend/api.d.ts.map +1 -0
- package/dist/webserver/backend/api.js +685 -0
- package/dist/webserver/backend/api.js.map +1 -0
- package/dist/webserver/backend/calendar.d.ts +5 -0
- package/dist/webserver/backend/calendar.d.ts.map +1 -0
- package/dist/webserver/backend/calendar.js +21 -0
- package/dist/webserver/backend/calendar.js.map +1 -0
- package/dist/webserver/backend/database.d.ts +149 -0
- package/dist/webserver/backend/database.d.ts.map +1 -0
- package/dist/webserver/backend/database.js +575 -0
- package/dist/webserver/backend/database.js.map +1 -0
- package/dist/webserver/backend/index.d.ts +31 -0
- package/dist/webserver/backend/index.d.ts.map +1 -0
- package/dist/webserver/backend/index.js +189 -0
- package/dist/webserver/backend/index.js.map +1 -0
- package/dist/webserver/backend/metrics.d.ts +3 -0
- package/dist/webserver/backend/metrics.d.ts.map +1 -0
- package/dist/webserver/backend/metrics.js +203 -0
- package/dist/webserver/backend/metrics.js.map +1 -0
- package/dist/webserver/backend/types.d.ts +115 -0
- package/dist/webserver/backend/types.d.ts.map +1 -0
- package/dist/webserver/backend/types.js +3 -0
- package/dist/webserver/backend/types.js.map +1 -0
- package/dist/webserver/backend/util.d.ts +2 -0
- package/dist/webserver/backend/util.d.ts.map +1 -0
- package/dist/webserver/backend/util.js +78 -0
- package/dist/webserver/backend/util.js.map +1 -0
- package/dist/webserver/index.d.ts +2 -0
- package/dist/webserver/index.d.ts.map +1 -0
- package/dist/webserver/index.js +9 -0
- package/dist/webserver/index.js.map +1 -0
- package/{src/webserver/frontend → frontend}/app.html +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/GlacialIndifferenceBold.ttf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/GlacialIndifferenceItalic.otf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/GlacialIndifferenceMedium.otf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/GlacialIndifferenceRegular.ttf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/RobotoBold.ttf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/RobotoItalic.ttf +0 -0
- package/{src/webserver/frontend → frontend}/assets/fonts/RobotoRegular.ttf +0 -0
- package/{src/webserver/frontend → frontend}/assets/img/auth_bg.webp +0 -0
- package/{src/webserver/frontend → frontend}/assets/img/dark_bg.webp +0 -0
- package/{src/webserver/frontend → frontend}/assets/img/turkey.webp +0 -0
- package/{src/webserver/frontend → frontend}/auth.html +0 -0
- package/index.js +10 -2
- package/package.json +44 -16
- package/public/app.bundle.js +537 -73
- package/public/app.bundle.js.map +1 -1
- package/public/app.css +727 -2
- package/public/app.css.map +1 -1
- package/public/auth.bundle.js +18 -18
- package/public/auth.bundle.js.map +1 -1
- package/public/auth.css +364 -2
- package/public/auth.css.map +1 -1
- package/templates/rpc/README.md +29 -0
- package/templates/rpc/doc.json +7 -0
- package/templates/rpc/omegga_plugin +0 -0
- package/templates/rpc/plugin.json +4 -0
- package/templates/rpc/setup.sh +3 -0
- package/templates/safe/README.md +29 -0
- package/templates/safe/access.json +1 -0
- package/templates/safe/doc.json +7 -0
- package/templates/safe/omegga.plugin.js +20 -0
- package/templates/safe/plugin.json +4 -0
- package/templates/safe/setup.sh +4 -0
- package/templates/safe-ts/.gitignore.rename +3 -0
- package/templates/safe-ts/README.md +29 -0
- package/templates/safe-ts/access.json +1 -0
- package/templates/safe-ts/doc.json +7 -0
- package/templates/safe-ts/omegga.d.ts +1311 -0
- package/templates/safe-ts/omegga.plugin.ts +29 -0
- package/templates/safe-ts/plugin.json +4 -0
- package/templates/safe-ts/setup.sh +4 -0
- package/templates/safe-ts/tsconfig.json +10 -0
- package/templates/unsafe/README.md +29 -0
- package/templates/unsafe/doc.json +7 -0
- package/templates/unsafe/omegga.main.js +15 -0
- package/templates/unsafe/plugin.json +4 -0
- package/templates/unsafe/setup.sh +4 -0
- package/.babelrc.json +0 -5
- package/.github/workflows/lint.yml +0 -26
- package/.prettierrc +0 -7
- package/.vscode/extensions.json +0 -5
- package/src/OMEGGA_LEGACY_INSTALL +0 -44
- package/src/brickadia/config.js +0 -42
- package/src/brickadia/server.js +0 -227
- package/src/cli/auth.js +0 -104
- package/src/cli/config.js +0 -77
- package/src/cli/index.js +0 -6
- package/src/cli/installer.js +0 -65
- package/src/cli/plugin.js +0 -575
- package/src/cli/terminal.js +0 -466
- package/src/config/authorizer.js +0 -37
- package/src/config/formats/format_js.js +0 -6
- package/src/config/formats/format_yml.js +0 -8
- package/src/config/index.js +0 -81
- package/src/config/reader.js +0 -27
- package/src/config/validator.js +0 -32
- package/src/config/writer.js +0 -20
- package/src/info/default_commands.json +0 -26
- package/src/lib.js +0 -23
- package/src/main.js +0 -332
- package/src/omegga/auth.js +0 -138
- package/src/omegga/commandInjector.js +0 -228
- package/src/omegga/index.js +0 -22
- package/src/omegga/logWrangler.js +0 -323
- package/src/omegga/matchers/auth.js +0 -49
- package/src/omegga/matchers/chat.js +0 -73
- package/src/omegga/matchers/command.js +0 -39
- package/src/omegga/matchers/exit.js +0 -19
- package/src/omegga/matchers/init.js +0 -23
- package/src/omegga/matchers/join.js +0 -115
- package/src/omegga/matchers/leave.js +0 -58
- package/src/omegga/matchers/mapChange.js +0 -37
- package/src/omegga/matchers/version.js +0 -45
- package/src/omegga/player.js +0 -585
- package/src/omegga/plugin/plugin_jsonrpc_stdio.js +0 -526
- package/src/omegga/plugin/plugin_node_safe/proxyOmegga.js +0 -117
- package/src/omegga/plugin/plugin_node_safe/worker.js +0 -238
- package/src/omegga/plugin/plugin_node_safe.js +0 -473
- package/src/omegga/plugin/plugin_node_unsafe.js +0 -177
- package/src/omegga/plugin.js +0 -565
- package/src/omegga/server.js +0 -658
- package/src/omegga/wrapper.js +0 -62
- package/src/softconfig.js +0 -64
- package/src/util/brick/checkBounds.js +0 -22
- package/src/util/brick/constants.js +0 -185
- package/src/util/brick/getBounds.js +0 -36
- package/src/util/brick/getBrickSize.js +0 -9
- package/src/util/brick/getScaleAxis.js +0 -31
- package/src/util/brick/index.js +0 -9
- package/src/util/brick/rotate.js +0 -43
- package/src/util/brick/setOwnership.js +0 -20
- package/src/util/chat.js +0 -28
- package/src/util/color.js +0 -143
- package/src/util/file.js +0 -119
- package/src/util/index.js +0 -28
- package/src/util/map.js +0 -28
- package/src/util/pattern.js +0 -14
- package/src/util/time.js +0 -46
- package/src/util/uuid.js +0 -8
- package/src/util/wsl.js +0 -9
- package/src/webserver/backend/api.js +0 -795
- package/src/webserver/backend/calendar.js +0 -15
- package/src/webserver/backend/database.js +0 -725
- package/src/webserver/backend/index.js +0 -206
- package/src/webserver/backend/metrics.js +0 -148
- package/src/webserver/backend/util.js +0 -75
- package/src/webserver/frontend/.eslintrc.yml +0 -26
- package/src/webserver/frontend/app.js +0 -78
- package/src/webserver/frontend/auth.js +0 -16
- package/src/webserver/frontend/components/Background.vue +0 -83
- package/src/webserver/frontend/components/Button.vue +0 -105
- package/src/webserver/frontend/components/ChatEntry.vue +0 -107
- package/src/webserver/frontend/components/ChatTime.vue +0 -40
- package/src/webserver/frontend/components/Dimmer.vue +0 -43
- package/src/webserver/frontend/components/Dropdown.vue +0 -145
- package/src/webserver/frontend/components/Footer.vue +0 -29
- package/src/webserver/frontend/components/Header.vue +0 -27
- package/src/webserver/frontend/components/InfiniteScroll.vue +0 -51
- package/src/webserver/frontend/components/Input.vue +0 -93
- package/src/webserver/frontend/components/ListInput.vue +0 -105
- package/src/webserver/frontend/components/Loader.vue +0 -98
- package/src/webserver/frontend/components/MainMenuButton.vue +0 -83
- package/src/webserver/frontend/components/Modal.vue +0 -44
- package/src/webserver/frontend/components/NavBar.vue +0 -24
- package/src/webserver/frontend/components/PlayerDropdown.vue +0 -210
- package/src/webserver/frontend/components/PopoutContent.vue +0 -32
- package/src/webserver/frontend/components/RoleDropdown.vue +0 -157
- package/src/webserver/frontend/components/Scroll.vue +0 -33
- package/src/webserver/frontend/components/Toggle.vue +0 -91
- package/src/webserver/frontend/components/index.js +0 -33
- package/src/webserver/frontend/css/font.scss +0 -53
- package/src/webserver/frontend/css/mixins.scss +0 -49
- package/src/webserver/frontend/css/style.scss +0 -166
- package/src/webserver/frontend/css/theme.scss +0 -64
- package/src/webserver/frontend/partials/NavHeader.vue +0 -55
- package/src/webserver/frontend/partials/Page.vue +0 -40
- package/src/webserver/frontend/partials/PageContent.vue +0 -31
- package/src/webserver/frontend/partials/SideNav.vue +0 -115
- package/src/webserver/frontend/partials/index.js +0 -4
- package/src/webserver/frontend/router.js +0 -83
- package/src/webserver/frontend/views/Auth.vue +0 -190
- package/src/webserver/frontend/views/History.vue +0 -462
- package/src/webserver/frontend/views/Home.vue +0 -251
- package/src/webserver/frontend/views/Main.vue +0 -69
- package/src/webserver/frontend/views/NotFound.vue +0 -10
- package/src/webserver/frontend/views/Players.vue +0 -425
- package/src/webserver/frontend/views/PlayersInspector.vue +0 -538
- package/src/webserver/frontend/views/Plugins.vue +0 -217
- package/src/webserver/frontend/views/PluginsInspector.vue +0 -418
- package/src/webserver/frontend/views/Server.vue +0 -167
- package/src/webserver/frontend/views/Users.vue +0 -538
- package/src/webserver/frontend/widgets/Chat.vue +0 -124
- package/src/webserver/frontend/widgets/Status.vue +0 -91
- package/src/webserver/frontend/widgets/index.js +0 -2
- package/src/webserver/frontend/widgets/tooltip.js +0 -108
- package/src/webserver/index.js +0 -4
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
7
|
+
const _util_1 = require("../util");
|
|
8
|
+
const logger_1 = __importDefault(require("../logger"));
|
|
9
|
+
const buildTableHeaderRegex = (header) => {
|
|
10
|
+
const columns = header.match(/[^|]+/g);
|
|
11
|
+
return new RegExp(columns // get all strings between the |'s'
|
|
12
|
+
.map((line, i) => [
|
|
13
|
+
line.slice(1, -1),
|
|
14
|
+
line.length - (i === columns.length - 1 ? 1 : 2),
|
|
15
|
+
]) // calculate the lengths (and remove the spaces)
|
|
16
|
+
.map(([name, len]) => ` (?<${name.trim().toLowerCase()}>.{${len}})( |$)`) // create a regex pattern to match strings of that length (and trim off whitespace at the end)
|
|
17
|
+
.join('\\|')); // join the regexes with the |
|
|
18
|
+
};
|
|
19
|
+
// A list of commands that can be injected to things with the log wrangler
|
|
20
|
+
/**
|
|
21
|
+
* List of injected commands
|
|
22
|
+
*/
|
|
23
|
+
const COMMANDS = {
|
|
24
|
+
/**
|
|
25
|
+
* Get a server status object containing bricks, time, players, player ping, player roles, etc
|
|
26
|
+
*/
|
|
27
|
+
async getServerStatus() {
|
|
28
|
+
const statusLines = await this.watchLogChunk('Server.Status', /^LogConsoleCommands: (.+)$/, {
|
|
29
|
+
first: match => match[1].startsWith('Server Name:'),
|
|
30
|
+
timeoutDelay: 1000,
|
|
31
|
+
});
|
|
32
|
+
// the table lines all start with '* '
|
|
33
|
+
// find all those lines, and remove the asterisk
|
|
34
|
+
const [tableHeader, ...tableLines] = statusLines
|
|
35
|
+
.filter(l => l[1].startsWith('* '))
|
|
36
|
+
.map(l => l[1].slice(1));
|
|
37
|
+
// use the size of each column to build a regex that matches each row
|
|
38
|
+
const columnRegExp = buildTableHeaderRegex(tableHeader);
|
|
39
|
+
const status = {
|
|
40
|
+
// easily extract certain values from the server status
|
|
41
|
+
serverName: statusLines[0][1].match(/^Server Name: (.*)$/)[1],
|
|
42
|
+
description: statusLines[1][1].match(/^Description: (.*)$/)[1],
|
|
43
|
+
bricks: Number(statusLines[2][1].match(/^Bricks: (\d+)$/)[1]),
|
|
44
|
+
components: Number(statusLines[3][1].match(/^Components: (\d+)$/)[1]),
|
|
45
|
+
time: _util_1.time.parseDuration(statusLines[4][1].match(/^Time: (.*)$/)[1]),
|
|
46
|
+
// extract players using the generated table regex
|
|
47
|
+
players: tableLines.map(l => {
|
|
48
|
+
// match the player row with the generated regex
|
|
49
|
+
const { groups: { name, ping, time: online, roles, address, id }, } = l.match(columnRegExp);
|
|
50
|
+
// trim and parse the matched data
|
|
51
|
+
return {
|
|
52
|
+
name: name.trim(),
|
|
53
|
+
ping: _util_1.time.parseDuration(ping.trim()),
|
|
54
|
+
time: _util_1.time.parseDuration(online.trim()),
|
|
55
|
+
roles: roles
|
|
56
|
+
.trim()
|
|
57
|
+
.split(', ')
|
|
58
|
+
.filter(r => r.length > 0),
|
|
59
|
+
address: address.replace('(Owner)', '').trim(),
|
|
60
|
+
id: id.trim(),
|
|
61
|
+
};
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
return status;
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* Get a list of minigames
|
|
68
|
+
* @return Minigame List
|
|
69
|
+
*/
|
|
70
|
+
async listMinigames() {
|
|
71
|
+
const minigameLines = await this.watchLogChunk('Server.Minigames.List', /^LogConsoleCommands: (.+)$/, {
|
|
72
|
+
first: match => match[1].startsWith('Minigame Count:'),
|
|
73
|
+
timeoutDelay: 1000,
|
|
74
|
+
});
|
|
75
|
+
// the table lines all start with '* '
|
|
76
|
+
// find all those lines, and remove the asterisk
|
|
77
|
+
const [tableHeader, ...tableLines] = minigameLines
|
|
78
|
+
.filter(l => l[1].startsWith('* '))
|
|
79
|
+
.map(l => l[1].slice(1));
|
|
80
|
+
// use the size of each column to build a regex that matches each row
|
|
81
|
+
const columnRegExp = buildTableHeaderRegex(tableHeader);
|
|
82
|
+
return tableLines.map(l => {
|
|
83
|
+
// match the player row with the generated regex
|
|
84
|
+
const { groups: { id, name, ownername, ownerid, member }, } = l.match(columnRegExp);
|
|
85
|
+
// trim and parse the matched data
|
|
86
|
+
return {
|
|
87
|
+
index: Number(id),
|
|
88
|
+
name: name.trim(),
|
|
89
|
+
numMembers: Number(member),
|
|
90
|
+
owner: { name: ownername.trim(), id: ownerid },
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
// async getAllPawnData<T extends PawnDataField<string, any>[]>(
|
|
95
|
+
// fields: T
|
|
96
|
+
// ): Promise<{
|
|
97
|
+
// controller: string;
|
|
98
|
+
// data: FromEntriesDataField<[PawnDataField<'pawn', string>, ...T]>;
|
|
99
|
+
// }> {
|
|
100
|
+
// const restFields: [PawnDataField<'pawn', string>, ...T] = [
|
|
101
|
+
// {
|
|
102
|
+
// command: 'GetAll BP_PlayerController_C Pawn',
|
|
103
|
+
// object: 'BP_PlayerController_C',
|
|
104
|
+
// objectMatcher: /(?<controller>BP_PlayerController_C_\d+)/,
|
|
105
|
+
// objectField: 'Pawn',
|
|
106
|
+
// valueMatcher:
|
|
107
|
+
// /(?:None|BP_FigureV2_C'.+?:PersistentLevel.(?<pawn>BP_FigureV2_C_\d+)')?$/,
|
|
108
|
+
// valueTransform: matches => matches.groups.pawn ?? null,
|
|
109
|
+
// field: 'pawn',
|
|
110
|
+
// } as PawnDataField<'pawn', string>,
|
|
111
|
+
// ...fields,
|
|
112
|
+
// ];
|
|
113
|
+
// return {
|
|
114
|
+
// controller: 'test',
|
|
115
|
+
// data: Object.fromEntries(
|
|
116
|
+
// restFields.map(f => [
|
|
117
|
+
// f.field,
|
|
118
|
+
// f.valueTransform({ groups: { pawn: 'foo' } } as any),
|
|
119
|
+
// ])
|
|
120
|
+
// ) as FromEntriesDataField<[PawnDataField<'pawn', string>, ...T]>,
|
|
121
|
+
// };
|
|
122
|
+
// },
|
|
123
|
+
/**
|
|
124
|
+
* get every player's position and alive states
|
|
125
|
+
*/
|
|
126
|
+
async getAllPlayerPositions() {
|
|
127
|
+
const pawnRegExp = /(?<index>\d+)\) BP_PlayerController_C .+?PersistentLevel\.(?<controller>BP_PlayerController_C_\d+)\.Pawn = (?:None|BP_FigureV2_C'.+?:PersistentLevel.(?<pawn>BP_FigureV2_C_\d+)')?$/;
|
|
128
|
+
const posRegExp = /(?<index>\d+)\) CapsuleComponent .+?PersistentLevel\.(?<pawn>BP_FigureV2_C_\d+)\.CollisionCylinder\.RelativeLocation = \(X=(?<x>[\d.-]+),Y=(?<y>[\d.-]+),Z=(?<z>[\d.-]+)\)$/;
|
|
129
|
+
const deadFigureRegExp = /(?<index>\d+)\) BP_FigureV2_C .+?PersistentLevel\.(?<pawn>BP_FigureV2_C_\d+)\.bIsDead = (?<dead>(True|False))$/;
|
|
130
|
+
// wait for the pawn and position watchers to return all the results
|
|
131
|
+
const [pawns, deadFigures, positions] = await Promise.all([
|
|
132
|
+
this.watchLogChunk('GetAll BP_PlayerController_C Pawn', pawnRegExp, {
|
|
133
|
+
first: 'index',
|
|
134
|
+
timeoutDelay: 250,
|
|
135
|
+
}),
|
|
136
|
+
this.watchLogChunk('GetAll BP_FigureV2_C bIsDead', deadFigureRegExp, {
|
|
137
|
+
first: 'index',
|
|
138
|
+
timeoutDelay: 250,
|
|
139
|
+
}),
|
|
140
|
+
this.watchLogChunk('GetAll SceneComponent RelativeLocation Name=CollisionCylinder', posRegExp, { first: 'index', timeoutDelay: 250 }),
|
|
141
|
+
]);
|
|
142
|
+
return (pawns
|
|
143
|
+
// iterate through the pawn+controllers
|
|
144
|
+
.map(pawn => ({
|
|
145
|
+
// find the player for the associated controller
|
|
146
|
+
player: this.getPlayer(pawn.groups.controller),
|
|
147
|
+
// find the position for the associated pawn
|
|
148
|
+
pos: positions.find(pos => pawn.groups.pawn === pos.groups.pawn),
|
|
149
|
+
isDead: deadFigures.find(dead => pawn.groups.pawn === dead.groups.pawn),
|
|
150
|
+
pawn,
|
|
151
|
+
}))
|
|
152
|
+
// filter by only those who have both player. previously we filtered by position but this breaks for players without a pawn, instead it's preferable to pass null
|
|
153
|
+
.filter(p => p.player)
|
|
154
|
+
// turn the position into a [x, y, z] number array (last 3 items in the array)
|
|
155
|
+
.map(p => ({
|
|
156
|
+
player: p.player,
|
|
157
|
+
pawn: p.pawn.groups.pawn || null,
|
|
158
|
+
pos: p.pos ? p.pos.slice(3).map(Number) : null,
|
|
159
|
+
isDead: p.isDead ? p.isDead.groups.dead === 'True' : true,
|
|
160
|
+
})));
|
|
161
|
+
},
|
|
162
|
+
/**
|
|
163
|
+
* get all minigames and their players (and the player's teams)
|
|
164
|
+
*/
|
|
165
|
+
async getMinigames() {
|
|
166
|
+
// patterns to match the console logs
|
|
167
|
+
const ruleNameRegExp = /^(?<index>\d+)\) BP_Ruleset_C (.+):PersistentLevel.(?<ruleset>BP_Ruleset_C_\d+)\.RulesetName = (?<name>.*)$/;
|
|
168
|
+
const ruleMembersRegExp = /^(?<index>\d+)\) BP_Ruleset_C (.+):PersistentLevel.(?<ruleset>BP_Ruleset_C_\d+)\.MemberStates =$/;
|
|
169
|
+
const teamNameRegExp = /^(?<index>\d+)\) BP_Team(_\w+)?_C (.+):PersistentLevel.(?<ruleset>BP_Ruleset_C_\d+)\.(?<team>BP_Team(_\w+)?_C_\d+)\.TeamName = (?<name>.*)$/;
|
|
170
|
+
const teamColorRegExp = /^(?<index>\d+)\) BP_Team(_\w+)?_C (.+):PersistentLevel.(?<ruleset>BP_Ruleset_C_\d+)\.(?<team>BP_Team(_\w+)?_C_\d+)\.TeamColor = \(B=(?<b>\d+),G=(?<g>\d+),R=(?<r>\d+),A=(?<a>\d+)\)$/;
|
|
171
|
+
const teamMembersRegExp = /^(?<index>\d+)\) BP_Team(_\w+)?_C (.+):PersistentLevel.(?<ruleset>BP_Ruleset_C_\d+)\.(?<team>BP_Team(_\w+)?_C_\d+)\.MemberStates =$/;
|
|
172
|
+
const playerStateRegExp = /^\t(?<index>\d+): BP_PlayerState_C'(.+):PersistentLevel\.(?<state>BP_PlayerState_C_\d+)'$/;
|
|
173
|
+
try {
|
|
174
|
+
// parse console output to get the minigame info
|
|
175
|
+
const [rulesets, ruleMembers, teamMembers, teamNames, teamColors] = await Promise.all([
|
|
176
|
+
this.watchLogChunk('GetAll BP_Ruleset_C RulesetName', ruleNameRegExp, {
|
|
177
|
+
first: 'index',
|
|
178
|
+
}),
|
|
179
|
+
this.watchLogArray('GetAll BP_Ruleset_C MemberStates', ruleMembersRegExp, playerStateRegExp),
|
|
180
|
+
this.watchLogArray('GetAll BP_Team_C MemberStates', teamMembersRegExp, playerStateRegExp),
|
|
181
|
+
this.watchLogChunk('GetAll BP_Team_C TeamName', teamNameRegExp, {
|
|
182
|
+
first: 'index',
|
|
183
|
+
}),
|
|
184
|
+
// team color in a5 is based on (B=255,G=255,R=255,A=255)
|
|
185
|
+
this.watchLogChunk('GetAll BP_Team_C TeamColor', teamColorRegExp, {
|
|
186
|
+
first: 'index',
|
|
187
|
+
}),
|
|
188
|
+
]);
|
|
189
|
+
// figure out what to do with the matched color results
|
|
190
|
+
const handleColor = (match) => {
|
|
191
|
+
// color index, return the colorset color
|
|
192
|
+
if ('color' in match)
|
|
193
|
+
return _util_1.color.DEFAULT_COLORSET[Number(match)].slice();
|
|
194
|
+
else
|
|
195
|
+
return [match.r, match.g, match.b, match.a].map(Number);
|
|
196
|
+
};
|
|
197
|
+
// join the data into a big object
|
|
198
|
+
return rulesets.map(r => ({
|
|
199
|
+
name: r.groups.name,
|
|
200
|
+
ruleset: r.groups.ruleset,
|
|
201
|
+
// get the players from the team members
|
|
202
|
+
members: ruleMembers
|
|
203
|
+
.find(m => m.item.ruleset === r.groups.ruleset)
|
|
204
|
+
.members // get the members from this ruleset
|
|
205
|
+
.map(m => this.getPlayer(m.state)),
|
|
206
|
+
// get the teams for this ruleset
|
|
207
|
+
teams: teamMembers
|
|
208
|
+
.filter(m => m.item.ruleset === r.groups.ruleset) // only get teams from this ruleset
|
|
209
|
+
.map(m => ({
|
|
210
|
+
// team name
|
|
211
|
+
name: lodash_1.default.get(teamNames.find(t => t.groups.team === m.item.team), 'groups.name'),
|
|
212
|
+
team: m.item.team,
|
|
213
|
+
// get the colors (different for a4 and a5)
|
|
214
|
+
color: handleColor(lodash_1.default.pick(teamColors.find(t => t.groups.team === m.item.team).groups, ['r', 'g', 'b', 'a'])),
|
|
215
|
+
// get the players from the team
|
|
216
|
+
members: m.members.map(m => this.getPlayer(m.state)),
|
|
217
|
+
})),
|
|
218
|
+
}));
|
|
219
|
+
}
|
|
220
|
+
catch (e) {
|
|
221
|
+
logger_1.default.error('error getting minigames', e);
|
|
222
|
+
return undefined;
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
// inject the commands into the object given a log wrangler
|
|
227
|
+
exports.default = (obj, logWrangler) => {
|
|
228
|
+
for (const cmd in COMMANDS) {
|
|
229
|
+
// disgusting type casting because we're injecting functions
|
|
230
|
+
obj[cmd] =
|
|
231
|
+
COMMANDS[cmd].bind(logWrangler);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
//# sourceMappingURL=commandInjector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandInjector.js","sourceRoot":"","sources":["../../src/omegga/commandInjector.ts"],"names":[],"mappings":";;;;;AAAA,oDAAuB;AACvB,mCAAoC;AASpC,uDAA8B;AAmD9B,MAAM,qBAAqB,GAAG,CAAC,MAAc,EAAE,EAAE;IAC/C,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvC,OAAO,IAAI,MAAM,CACf,OAAO,CAAC,mCAAmC;SACxC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QAChB,IAAI,CAAC,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,SAAS,CAAC;SAClB;IACH,CAAC;CACF,CAAC;AAEF,2DAA2D;AAC3D,kBAAe,CACb,GAAM,EACN,WAAwB,EACxB,EAAE;IACF,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE;QAC1B,4DAA4D;QAC3D,GAA2C,CAAC,GAAG,CAAC;YAC/C,QAAQ,CAAC,GAA4B,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KAC5D;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * as Plugin from './plugin';
|
|
2
|
+
export * as Player from './player';
|
|
3
|
+
export * as OmeggaWrapper from './wrapper';
|
|
4
|
+
export * as auth from './auth';
|
|
5
|
+
export * as LogWrangler from './logWrangler';
|
|
6
|
+
export * as commandInjector from './commandInjector';
|
|
7
|
+
export * from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/omegga/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAGnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAGnC,OAAO,KAAK,aAAa,MAAM,WAAW,CAAC;AAG3C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAG7C,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAErD,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.commandInjector = exports.LogWrangler = exports.auth = exports.OmeggaWrapper = exports.Player = exports.Plugin = void 0;
|
|
30
|
+
// Plugin loader format
|
|
31
|
+
exports.Plugin = __importStar(require("./plugin"));
|
|
32
|
+
// Player interface
|
|
33
|
+
exports.Player = __importStar(require("./player"));
|
|
34
|
+
// acts as the interface between server logs and matchers
|
|
35
|
+
exports.OmeggaWrapper = __importStar(require("./wrapper"));
|
|
36
|
+
// auth token generation helpers
|
|
37
|
+
exports.auth = __importStar(require("./auth"));
|
|
38
|
+
// tackles the problem of reading brickadia logs
|
|
39
|
+
exports.LogWrangler = __importStar(require("./logWrangler"));
|
|
40
|
+
// injects commands that only need a log wrangler to function
|
|
41
|
+
exports.commandInjector = __importStar(require("./commandInjector"));
|
|
42
|
+
__exportStar(require("./types"), exports);
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/omegga/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAuB;AACvB,mDAAmC;AAEnC,mBAAmB;AACnB,mDAAmC;AAEnC,yDAAyD;AACzD,2DAA2C;AAE3C,gCAAgC;AAChC,+CAA+B;AAE/B,gDAAgD;AAChD,6DAA6C;AAE7C,6DAA6D;AAC7D,qEAAqD;AAErD,0CAAwB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import Omegga from './server';
|
|
2
|
+
import { IMatcher, IWatcher, LogWrangling } from "../plugin";
|
|
3
|
+
declare class LogWrangler implements LogWrangling {
|
|
4
|
+
#private;
|
|
5
|
+
exec: (cmd: string) => void;
|
|
6
|
+
getPlayer: Omegga['getPlayer'];
|
|
7
|
+
getVersion: () => number;
|
|
8
|
+
omegga: Omegga;
|
|
9
|
+
callback: LogWrangler['handleLog'];
|
|
10
|
+
constructor(omegga: Omegga);
|
|
11
|
+
addMatcher<T>(pattern: IMatcher<T>['pattern'], callback: IMatcher<T>['callback']): () => void;
|
|
12
|
+
addWatcher<T = RegExpMatchArray>(pattern: IWatcher<T>['pattern'], { timeoutDelay, bundle, debounce, afterMatchDelay, last, exec, }?: {
|
|
13
|
+
timeoutDelay?: number;
|
|
14
|
+
bundle?: boolean;
|
|
15
|
+
debounce?: boolean;
|
|
16
|
+
afterMatchDelay?: number;
|
|
17
|
+
last?: IWatcher<T>['last'];
|
|
18
|
+
exec?: () => void;
|
|
19
|
+
}): Promise<IWatcher<T>['matches']>;
|
|
20
|
+
watchLogChunk<T = string>(cmd: string, pattern: IWatcher<T>['pattern'], { first, last, afterMatchDelay, timeoutDelay, }: {
|
|
21
|
+
first?: 'index' | ((match: T) => boolean);
|
|
22
|
+
last?: IWatcher<T>['last'];
|
|
23
|
+
afterMatchDelay?: number;
|
|
24
|
+
timeoutDelay?: number;
|
|
25
|
+
}): Promise<IWatcher<T>['matches']>;
|
|
26
|
+
watchLogArray<Item extends Record<string, string> = Record<string, string>, Member extends Record<string, string> = Record<string, string>>(cmd: string, itemPattern: RegExp, memberPattern: RegExp): Promise<{
|
|
27
|
+
item: Item;
|
|
28
|
+
members: Member[];
|
|
29
|
+
}[]>;
|
|
30
|
+
handleLog(line: string): void;
|
|
31
|
+
}
|
|
32
|
+
export default LogWrangler;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logWrangler.d.ts","sourceRoot":"","sources":["../../src/omegga/logWrangler.ts"],"names":[],"mappings":"AAIA,OAAO,MAAM,MAAM,UAAU,CAAC;AAK9B,oBAAY,cAAc,CAAC,CAAC,IAAI,CAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,gBAAgB,KACpB,CAAC,GAAG,gBAAgB,GAAG,uBAAuB,CAAC;AAEpD,oBAAY,QAAQ,CAAC,CAAC,IAClB;IACE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC;CAChD,GACD;IACE,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,KAAK,CAAC,CAAC;IACtD,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,CAAC,CAAC;CAC1C,CAAC;AAEN,oBAAY,QAAQ,CAAC,CAAC,IAAI;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;IAC5B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAClC,MAAM,EAAE,MAAM,IAAI,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AC,CAAC;IAwDlC,aAAa,CAAC,CAAC,GAAG,MAAM,EACtB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAC/B,EACE,KAAK,EACL,IAAI,EACJ,eAAoB,EACpB,YAAkB,GACnB,EAAE;QACD,KAAK,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GACA,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IA0F5B,aAAa,CACjB,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5D,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9D,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;cAelC,IAAI;iBAAW,MAAM,EAAE;;IAkB9C,SAAS,CAAC,IAAI,EAAE,MAAM;CAiFvB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
The wrapper combines the things looking at or waiting for logs with the actual server logs
|
|
4
|
+
*/
|
|
5
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
6
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
7
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
8
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
9
|
+
};
|
|
10
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
|
+
};
|
|
13
|
+
var _LogWrangler_matchers, _LogWrangler_watchers;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const logger_1 = __importDefault(require("../logger"));
|
|
16
|
+
const GENERIC_LINE_REGEX = /^(\[(?<date>\d{4}\.\d\d.\d\d-\d\d.\d\d.\d\d:\d{3})\]\[\s*(?<counter>\d+)\])?(?<generator>\w+): (?<data>.+)$/;
|
|
17
|
+
class LogWrangler {
|
|
18
|
+
constructor(omegga) {
|
|
19
|
+
// list of patterns and callbacks watching the brickadia logs in general
|
|
20
|
+
_LogWrangler_matchers.set(this, []);
|
|
21
|
+
// list of patterns and promises waiting for specific console logs
|
|
22
|
+
_LogWrangler_watchers.set(this, []);
|
|
23
|
+
// passthru functions
|
|
24
|
+
this.exec = cmd => omegga.writeln(cmd);
|
|
25
|
+
this.getPlayer = (arg) => omegga.getPlayer(arg);
|
|
26
|
+
this.getVersion = () => omegga.version;
|
|
27
|
+
// callback reads in new lines
|
|
28
|
+
this.callback = this.handleLog.bind(this);
|
|
29
|
+
this.addMatcher = this.addMatcher.bind(this);
|
|
30
|
+
this.addWatcher = this.addWatcher.bind(this);
|
|
31
|
+
this.watchLogArray = this.watchLogArray.bind(this);
|
|
32
|
+
this.watchLogChunk = this.watchLogChunk.bind(this);
|
|
33
|
+
this.omegga = omegga;
|
|
34
|
+
}
|
|
35
|
+
// add a new matcher to listen in on the logs
|
|
36
|
+
// pattern is regex or a function that returns a match
|
|
37
|
+
// callback is a function that receives the result of the pattern
|
|
38
|
+
// returns a deregister function
|
|
39
|
+
addMatcher(pattern, callback) {
|
|
40
|
+
if ((typeof pattern !== 'function' && !(pattern instanceof RegExp)) ||
|
|
41
|
+
typeof callback !== 'function')
|
|
42
|
+
return undefined;
|
|
43
|
+
// create the matcher from the callback and pattern, add it to the matchers
|
|
44
|
+
const matcher = { pattern, callback };
|
|
45
|
+
__classPrivateFieldGet(this, _LogWrangler_matchers, "f").push(matcher);
|
|
46
|
+
// return a function to remove this matcher from the list of matchers
|
|
47
|
+
return () => {
|
|
48
|
+
const index = __classPrivateFieldGet(this, _LogWrangler_matchers, "f").indexOf(matcher);
|
|
49
|
+
if (index > -1)
|
|
50
|
+
__classPrivateFieldGet(this, _LogWrangler_matchers, "f").splice(index, 0);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
// wait for stdout to match this regex or matcher fn, returns the match or times out
|
|
54
|
+
// pattern is regex or a function that returns a match
|
|
55
|
+
// if bundle is set to true, it returns all matches after the timeout ends rather than resolving (can't be used with delay 0)
|
|
56
|
+
// exec is a function run after adding the watcher
|
|
57
|
+
// debounce (used with bundle) waits extra time after each match before timing out
|
|
58
|
+
// afterMatchDelay (used with debounce) indicates to run a new timeout after the first match
|
|
59
|
+
// last (used with bundle) is a function run on the match. when it returns true, the watcher resolves early
|
|
60
|
+
// returns a promise, rejects after timeout ends
|
|
61
|
+
addWatcher(pattern, { timeoutDelay = 50, bundle = false, debounce = false, afterMatchDelay = 0, last, exec, } = {}) {
|
|
62
|
+
if (typeof pattern !== 'function' && !(pattern instanceof RegExp))
|
|
63
|
+
return undefined;
|
|
64
|
+
return new Promise((resolve, reject) => {
|
|
65
|
+
// create the watcher
|
|
66
|
+
const watcher = {
|
|
67
|
+
pattern,
|
|
68
|
+
bundle,
|
|
69
|
+
debounce,
|
|
70
|
+
timeoutDelay,
|
|
71
|
+
afterMatchDelay,
|
|
72
|
+
last,
|
|
73
|
+
matches: [],
|
|
74
|
+
};
|
|
75
|
+
(watcher.resolve = (...args) => {
|
|
76
|
+
clearTimeout(watcher.timeout);
|
|
77
|
+
resolve(args);
|
|
78
|
+
}),
|
|
79
|
+
// remove helper
|
|
80
|
+
(watcher.remove = () => {
|
|
81
|
+
const index = __classPrivateFieldGet(this, _LogWrangler_watchers, "f").indexOf(watcher);
|
|
82
|
+
if (index > -1) {
|
|
83
|
+
__classPrivateFieldGet(this, _LogWrangler_watchers, "f").splice(index, 1);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
// what the watcher dones when it completes
|
|
87
|
+
watcher.done = () => {
|
|
88
|
+
// remove the watcher if it exists
|
|
89
|
+
watcher.remove();
|
|
90
|
+
// if the bundle option is set to true, resolve on timeout end
|
|
91
|
+
if (bundle) {
|
|
92
|
+
resolve(watcher.matches);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
// reject the promise
|
|
96
|
+
reject('timed out');
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
// if the delay is non 0, kill the promise after some time
|
|
100
|
+
if (timeoutDelay !== 0) {
|
|
101
|
+
watcher.timeout = setTimeout(watcher.done, timeoutDelay);
|
|
102
|
+
}
|
|
103
|
+
__classPrivateFieldGet(this, _LogWrangler_watchers, "f").push(watcher);
|
|
104
|
+
exec && exec();
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
// match a group of console logs that have the same counter (ran on the same thread)
|
|
108
|
+
// first is a function or 'index' for the index capture group that determines if this is match is the first log
|
|
109
|
+
// last is a function that determines if this match is the last log (and can terminate early)
|
|
110
|
+
// aftermatch delay is borrowed from addWatcher
|
|
111
|
+
watchLogChunk(cmd, pattern, { first, last, afterMatchDelay = 10, timeoutDelay = 100, }) {
|
|
112
|
+
// we're focused on the counter part of this, the rest will be passed to the pattern matcher
|
|
113
|
+
const logLineRegExp = /\[(?<date>\d{4}\.\d\d.\d\d-\d\d.\d\d.\d\d:\d{3})\]\[\s*(?<counter>\d+)\](?<rest>.*)$/;
|
|
114
|
+
// keep track of the current log line
|
|
115
|
+
let currentCounter = -1;
|
|
116
|
+
// create the
|
|
117
|
+
return this.addWatcher((line, _match) => {
|
|
118
|
+
const logLineMatch = line.match(logLineRegExp);
|
|
119
|
+
if (!logLineMatch)
|
|
120
|
+
return;
|
|
121
|
+
// get the counter and rest of line from the log line match
|
|
122
|
+
const { groups: { counter, rest }, } = logLineMatch;
|
|
123
|
+
// run the regular pattern matcher
|
|
124
|
+
const match = pattern instanceof RegExp
|
|
125
|
+
? rest.match(pattern)
|
|
126
|
+
: pattern(rest, rest.match(GENERIC_LINE_REGEX));
|
|
127
|
+
// end the watcher early if there is no match and the match has started (log chunks are uninterrupted)
|
|
128
|
+
// this usually means that two commands were run so quickly that the output occured on the same counter
|
|
129
|
+
if (!match && currentCounter !== -1) {
|
|
130
|
+
return '[OMEGGA_WATCHER_DONE]';
|
|
131
|
+
}
|
|
132
|
+
// ignore things that don't match
|
|
133
|
+
if (!match)
|
|
134
|
+
return;
|
|
135
|
+
// determine if this is the first log in the chunk
|
|
136
|
+
let isFirst = false;
|
|
137
|
+
// if there is a first parameter
|
|
138
|
+
if (first) {
|
|
139
|
+
// if it's a function, use that function to match
|
|
140
|
+
if (typeof first === 'function')
|
|
141
|
+
isFirst = first(match);
|
|
142
|
+
// if it's 'index', use the index capture group
|
|
143
|
+
else if (first === 'index' &&
|
|
144
|
+
typeof match === 'object' &&
|
|
145
|
+
'groups' in match)
|
|
146
|
+
isFirst = match.groups.index === '0';
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
// otherwise, it doesn't matter
|
|
150
|
+
isFirst = true;
|
|
151
|
+
}
|
|
152
|
+
// assign counter if it's not set and it's the first, or no first function is set
|
|
153
|
+
if (currentCounter === -1 && isFirst) {
|
|
154
|
+
currentCounter = counter;
|
|
155
|
+
}
|
|
156
|
+
if (currentCounter === -1 && !isFirst) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
// prematurely terminate the match if another log is found
|
|
160
|
+
if (counter !== currentCounter)
|
|
161
|
+
return '[OMEGGA_WATCHER_DONE]';
|
|
162
|
+
// add the match to the bundle
|
|
163
|
+
return match;
|
|
164
|
+
}, {
|
|
165
|
+
last,
|
|
166
|
+
exec: () => this.exec(cmd),
|
|
167
|
+
bundle: true,
|
|
168
|
+
debounce: true,
|
|
169
|
+
timeoutDelay,
|
|
170
|
+
afterMatchDelay,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
// get a chunked array from the log
|
|
174
|
+
// patterns are actually regex and must have capture groups
|
|
175
|
+
// the itemPattern must have an (?<index>) capture group
|
|
176
|
+
// the return is in the format of:
|
|
177
|
+
/*
|
|
178
|
+
[{
|
|
179
|
+
item: (itemPattern group),
|
|
180
|
+
members: [
|
|
181
|
+
...memberPattern groups,
|
|
182
|
+
],
|
|
183
|
+
}, ...]
|
|
184
|
+
*/
|
|
185
|
+
async watchLogArray(cmd, itemPattern, memberPattern) {
|
|
186
|
+
const results = (await this.watchLogChunk(cmd, (line) => {
|
|
187
|
+
// match on items
|
|
188
|
+
const itemMatch = line.match(itemPattern);
|
|
189
|
+
if (itemMatch)
|
|
190
|
+
return ['item', itemMatch];
|
|
191
|
+
// match on members
|
|
192
|
+
const memberMatch = line.match(memberPattern);
|
|
193
|
+
if (memberMatch)
|
|
194
|
+
return ['member', memberMatch];
|
|
195
|
+
}, { first: arr => arr[0] === 'item' && arr[1].groups.index === '0' }));
|
|
196
|
+
const array = [];
|
|
197
|
+
// insert the results into the array
|
|
198
|
+
for (const [type, { groups }] of results) {
|
|
199
|
+
// insert an item into the array
|
|
200
|
+
if (type === 'item') {
|
|
201
|
+
array.push({ item: groups, members: [] });
|
|
202
|
+
// insert a member into an item
|
|
203
|
+
}
|
|
204
|
+
else if (type === 'member' && array.length > 0) {
|
|
205
|
+
array[array.length - 1].members.push(groups);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return array;
|
|
209
|
+
}
|
|
210
|
+
// check all the matchers against this line
|
|
211
|
+
handleLog(line) {
|
|
212
|
+
// generic match the log
|
|
213
|
+
const logMatch = line.match(GENERIC_LINE_REGEX);
|
|
214
|
+
// pattern matcher handlers
|
|
215
|
+
const patternMatchers = [
|
|
216
|
+
{
|
|
217
|
+
array: __classPrivateFieldGet(this, _LogWrangler_matchers, "f"),
|
|
218
|
+
onMatch(match, matcher) {
|
|
219
|
+
var _a;
|
|
220
|
+
(_a = matcher.callback) === null || _a === void 0 ? void 0 : _a.call(matcher, match);
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
array: __classPrivateFieldGet(this, _LogWrangler_watchers, "f"),
|
|
225
|
+
onMatch(match, watcher) {
|
|
226
|
+
var _a;
|
|
227
|
+
// if the watcher is in bundle mode, add the match to its matches
|
|
228
|
+
if (watcher.bundle) {
|
|
229
|
+
// allow the watcher to terminate early
|
|
230
|
+
if (match === '[OMEGGA_WATCHER_DONE]') {
|
|
231
|
+
clearTimeout(watcher.timeout);
|
|
232
|
+
watcher.done();
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
watcher.matches = [...watcher.matches, match];
|
|
236
|
+
// check if this is the last line and terminate early
|
|
237
|
+
if ((_a = watcher === null || watcher === void 0 ? void 0 : watcher.last) === null || _a === void 0 ? void 0 : _a.call(watcher, match)) {
|
|
238
|
+
clearTimeout(watcher.timeout);
|
|
239
|
+
watcher.done();
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
// if the watcher is debounced, reset the timer
|
|
243
|
+
if (watcher.debounce) {
|
|
244
|
+
clearTimeout(watcher.timeout);
|
|
245
|
+
watcher.timeout = setTimeout(watcher.done, watcher.afterMatchDelay || watcher.timeoutDelay);
|
|
246
|
+
}
|
|
247
|
+
// otherwise resolve with the result and remove the watcher from the list
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
watcher.resolve(match);
|
|
251
|
+
watcher.remove();
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
];
|
|
256
|
+
// loop through matchers and run callbacks if they match
|
|
257
|
+
for (const { array, onMatch } of patternMatchers) {
|
|
258
|
+
// iterate in reverse because removing indices will not skip over any elements
|
|
259
|
+
for (let i = array.length - 1; i >= 0; i--) {
|
|
260
|
+
const matcher = array[i];
|
|
261
|
+
try {
|
|
262
|
+
// run the match on a pattern or test with a function
|
|
263
|
+
const match = matcher.pattern instanceof RegExp
|
|
264
|
+
? line.match(matcher.pattern)
|
|
265
|
+
: matcher.pattern(line, logMatch);
|
|
266
|
+
// if there's match, handle it for this type of matcher
|
|
267
|
+
if (match)
|
|
268
|
+
onMatch(match, matcher);
|
|
269
|
+
}
|
|
270
|
+
catch (e) {
|
|
271
|
+
logger_1.default.error('error in matcher', matcher.pattern, e);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
_LogWrangler_matchers = new WeakMap(), _LogWrangler_watchers = new WeakMap();
|
|
278
|
+
exports.default = LogWrangler;
|
|
279
|
+
//# sourceMappingURL=logWrangler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logWrangler.js","sourceRoot":"","sources":["../../src/omegga/logWrangler.ts"],"names":[],"mappings":";AAAA;;EAEE;;;;;;;;;;;AAKF,uDAA8B;AAE9B,MAAM,kBAAkB,GACtB,6GAA6G,CAAC;AAEhH,MAAM,WAAW;IAaf,YAAY,MAAc;QAZ1B,wEAAwE;QACxE,gCAAiC,EAAE,EAAC;QAEpC,kEAAkE;QAClE,gCAAiC,EAAE,EAAC;QASlC,qBAAqB;QACrB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACxD,IAAI,CAAC,UAAU,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;QAEvC,8BAA8B;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CA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