@underpostnet/cyberia 3.2.80
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/.dockerignore +14 -0
- package/.env.example +144 -0
- package/.github/workflows/cyberia-client.cd.yml +40 -0
- package/.github/workflows/cyberia-server.cd.yml +40 -0
- package/.github/workflows/docker-image.cyberia-client.ci.yml +71 -0
- package/.github/workflows/docker-image.cyberia-client.dev.ci.yml +70 -0
- package/.github/workflows/docker-image.cyberia-server.ci.yml +71 -0
- package/.github/workflows/docker-image.cyberia-server.dev.ci.yml +71 -0
- package/.github/workflows/docker-image.engine-cyberia.ci.yml +53 -0
- package/.github/workflows/docker-image.engine-cyberia.dev.ci.yml +53 -0
- package/.github/workflows/engine-cyberia.cd.yml +157 -0
- package/.github/workflows/engine-cyberia.ci.yml +125 -0
- package/.github/workflows/ghpkg.ci.yml +160 -0
- package/.github/workflows/gitlab.ci.yml +20 -0
- package/.github/workflows/hardhat.ci.yml +82 -0
- package/.github/workflows/npmpkg.ci.yml +126 -0
- package/.github/workflows/publish.ci.yml +87 -0
- package/.github/workflows/publish.cyberia.ci.yml +79 -0
- package/.github/workflows/pwa-microservices-template-page.cd.yml +65 -0
- package/.github/workflows/pwa-microservices-template-test.ci.yml +33 -0
- package/.github/workflows/release.cd.yml +46 -0
- package/.nycrc +9 -0
- package/.prettierignore +12 -0
- package/.prettierrc +9 -0
- package/.vscode/extensions.json +10 -0
- package/.vscode/settings.json +26 -0
- package/CHANGELOG.md +2516 -0
- package/CLI-HELP.md +1099 -0
- package/Dockerfile +161 -0
- package/Dockerfile.dev +161 -0
- package/Dockerfile.test +165 -0
- package/LICENSE +21 -0
- package/README.md +259 -0
- package/baremetal/commission-workflows.json +211 -0
- package/baremetal/packer-workflows.json +24 -0
- package/bin/build.js +261 -0
- package/bin/build.template.js +33 -0
- package/bin/cyberia.js +5627 -0
- package/bin/deploy.js +1547 -0
- package/bin/index.js +5627 -0
- package/bump.config.js +27 -0
- package/compose.env +144 -0
- package/conf.js +952 -0
- package/deployment.yaml +418 -0
- package/docker-compose.yml +434 -0
- package/examples/static-page/README.md +150 -0
- package/examples/static-page/ssr-components/CustomPage.js +554 -0
- package/examples/static-page/static-config-example.json +57 -0
- package/hardhat/.env.example +31 -0
- package/hardhat/contracts/ObjectLayerToken.sol +391 -0
- package/hardhat/deployments/.gitkeep +0 -0
- package/hardhat/deployments/hardhat-ObjectLayerToken.json +11 -0
- package/hardhat/hardhat.config.js +136 -0
- package/hardhat/ignition/modules/.gitkeep +0 -0
- package/hardhat/ignition/modules/ObjectLayerToken.js +21 -0
- package/hardhat/networks/besu-object-layer.network.json +138 -0
- package/hardhat/package-lock.json +2871 -0
- package/hardhat/package.json +43 -0
- package/hardhat/scripts/deployObjectLayerToken.js +98 -0
- package/hardhat/test/ObjectLayerToken.js +696 -0
- package/hardhat/types/ethers-contracts/ObjectLayerToken.ts +690 -0
- package/hardhat/types/ethers-contracts/common.ts +92 -0
- package/hardhat/types/ethers-contracts/factories/ObjectLayerToken__factory.ts +1055 -0
- package/hardhat/types/ethers-contracts/factories/index.ts +4 -0
- package/hardhat/types/ethers-contracts/hardhat.d.ts +47 -0
- package/hardhat/types/ethers-contracts/index.ts +6 -0
- package/ipfs/configure-ipfs.sh +13 -0
- package/jsconfig.json +9 -0
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +48 -0
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +48 -0
- package/manifests/deployment/adminer/deployment.yaml +32 -0
- package/manifests/deployment/adminer/kustomization.yaml +7 -0
- package/manifests/deployment/adminer/service.yaml +13 -0
- package/manifests/deployment/dd-cyberia-development/deployment.yaml +418 -0
- package/manifests/deployment/dd-cyberia-development/grpc-service.yaml +17 -0
- package/manifests/deployment/dd-cyberia-development/proxy.yaml +189 -0
- package/manifests/deployment/dd-cyberia-development/pv-pvc.yaml +164 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +163 -0
- package/manifests/deployment/dd-default-development/proxy.yaml +46 -0
- package/manifests/deployment/fastapi/backend-deployment.yml +120 -0
- package/manifests/deployment/fastapi/backend-service.yml +19 -0
- package/manifests/deployment/fastapi/frontend-deployment.yml +54 -0
- package/manifests/deployment/fastapi/frontend-service.yml +15 -0
- package/manifests/deployment/fastapi/initial_data.sh +8 -0
- package/manifests/deployment/kafka/deployment.yaml +67 -0
- package/manifests/deployment/mongo-express/deployment.yaml +62 -0
- package/manifests/deployment/phpmyadmin/deployment.yaml +54 -0
- package/manifests/deployment/playwright/deployment.yaml +52 -0
- package/manifests/deployment/spark/spark-pi-py.yaml +20 -0
- package/manifests/deployment/tensorflow/tf-gpu-test.yaml +63 -0
- package/manifests/envoy-service-nodeport.yaml +22 -0
- package/manifests/grafana/deployment.yaml +64 -0
- package/manifests/grafana/kustomization.yaml +7 -0
- package/manifests/grafana/pvc.yaml +12 -0
- package/manifests/grafana/service.yaml +14 -0
- package/manifests/grafana/storage-class.yaml +9 -0
- package/manifests/ipfs/configmap.yaml +64 -0
- package/manifests/ipfs/headless-service.yaml +35 -0
- package/manifests/ipfs/kustomization.yaml +8 -0
- package/manifests/ipfs/statefulset.yaml +149 -0
- package/manifests/ipfs/storage-class.yaml +9 -0
- package/manifests/kind-config-dev.yaml +20 -0
- package/manifests/kind-config.yaml +12 -0
- package/manifests/kubeadm-calico-config.yaml +14 -0
- package/manifests/letsencrypt-prod.yaml +14 -0
- package/manifests/lxd/lxd-admin-profile.yaml +26 -0
- package/manifests/lxd/lxd-preseed.yaml +30 -0
- package/manifests/mariadb/kustomization.yaml +9 -0
- package/manifests/mariadb/pv.yaml +12 -0
- package/manifests/mariadb/pvc.yaml +10 -0
- package/manifests/mariadb/service.yaml +10 -0
- package/manifests/mariadb/statefulset.yaml +56 -0
- package/manifests/mariadb/storage-class.yaml +10 -0
- package/manifests/mongodb/headless-service.yaml +10 -0
- package/manifests/mongodb/kustomization.yaml +11 -0
- package/manifests/mongodb/pv-pvc.yaml +59 -0
- package/manifests/mongodb/statefulset.yaml +113 -0
- package/manifests/mongodb/storage-class.yaml +9 -0
- package/manifests/mongodb-4.4/headless-service.yaml +10 -0
- package/manifests/mongodb-4.4/kustomization.yaml +9 -0
- package/manifests/mongodb-4.4/mongodb-nodeport.yaml +17 -0
- package/manifests/mongodb-4.4/pv-pvc.yaml +19 -0
- package/manifests/mongodb-4.4/service-deployment.yaml +61 -0
- package/manifests/mongodb-4.4/statefulset.yaml +79 -0
- package/manifests/mongodb-4.4/storage-class.yaml +9 -0
- package/manifests/mysql/kustomization.yaml +7 -0
- package/manifests/mysql/pv-pvc.yaml +27 -0
- package/manifests/mysql/statefulset.yaml +55 -0
- package/manifests/postgresql/configmap.yaml +9 -0
- package/manifests/postgresql/kustomization.yaml +10 -0
- package/manifests/postgresql/pv.yaml +15 -0
- package/manifests/postgresql/pvc.yaml +13 -0
- package/manifests/postgresql/service.yaml +10 -0
- package/manifests/postgresql/statefulset.yaml +37 -0
- package/manifests/prometheus/deployment.yaml +82 -0
- package/manifests/pv-pvc-dd.yaml +34 -0
- package/manifests/valkey/kustomization.yaml +7 -0
- package/manifests/valkey/service.yaml +10 -0
- package/manifests/valkey/statefulset.yaml +37 -0
- package/manifests/valkey/valkey-nodeport.yaml +17 -0
- package/mongodb/entrypoint.sh +76 -0
- package/nginx.conf +128 -0
- package/nodemon.json +6 -0
- package/package.json +101 -0
- package/packer/images/Rocky9Amd64/Makefile +62 -0
- package/packer/images/Rocky9Amd64/QUICKSTART.md +113 -0
- package/packer/images/Rocky9Amd64/README.md +122 -0
- package/packer/images/Rocky9Amd64/http/rocky9.ks.pkrtpl.hcl +114 -0
- package/packer/images/Rocky9Amd64/rocky9.pkr.hcl +164 -0
- package/packer/images/Rocky9Arm64/Makefile +69 -0
- package/packer/images/Rocky9Arm64/README.md +122 -0
- package/packer/images/Rocky9Arm64/http/rocky9.ks.pkrtpl.hcl +114 -0
- package/packer/images/Rocky9Arm64/rocky9.pkr.hcl +171 -0
- package/packer/scripts/fuse-nbd +64 -0
- package/packer/scripts/fuse-tar-root +63 -0
- package/proxy.yaml +189 -0
- package/pv-pvc.yaml +164 -0
- package/scripts/device-scan.sh +65 -0
- package/scripts/disk-clean.sh +182 -0
- package/scripts/disk-devices.sh +13 -0
- package/scripts/gen-fqdns.sh +14 -0
- package/scripts/gpu-diag.sh +19 -0
- package/scripts/ip-info.sh +118 -0
- package/scripts/ipxe-setup.sh +200 -0
- package/scripts/k3s-node-setup.sh +124 -0
- package/scripts/kubeadm-node-setup.sh +317 -0
- package/scripts/link-local-underpost-cli.sh +6 -0
- package/scripts/lxd-vm-setup.sh +208 -0
- package/scripts/maas-nat-firewalld.sh +145 -0
- package/scripts/maas-setup.sh +135 -0
- package/scripts/maas-upload-boot-resource.sh +183 -0
- package/scripts/nat-iptables.sh +111 -0
- package/scripts/nvim.sh +91 -0
- package/scripts/packer-init-vars-file.sh +40 -0
- package/scripts/packer-setup.sh +289 -0
- package/scripts/ports-ls.sh +33 -0
- package/scripts/quick-tftp.sh +19 -0
- package/scripts/rhel-grpc-setup.sh +56 -0
- package/scripts/rocky-kickstart.sh +986 -0
- package/scripts/rocky-pwa.sh +200 -0
- package/scripts/rocky-setup.sh +106 -0
- package/scripts/rpmfusion-ffmpeg-setup.sh +32 -0
- package/scripts/ssl.sh +170 -0
- package/scripts/test-monitor.sh +248 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.controller.js +30 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.model.js +155 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.router.js +39 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +382 -0
- package/src/api/core/core.controller.js +8 -0
- package/src/api/core/core.model.js +11 -0
- package/src/api/core/core.router.js +23 -0
- package/src/api/core/core.service.js +30 -0
- package/src/api/crypto/crypto.controller.js +10 -0
- package/src/api/crypto/crypto.model.js +23 -0
- package/src/api/crypto/crypto.router.js +23 -0
- package/src/api/crypto/crypto.service.js +64 -0
- package/src/api/cyberia-action/cyberia-action.controller.js +8 -0
- package/src/api/cyberia-action/cyberia-action.model.js +79 -0
- package/src/api/cyberia-action/cyberia-action.router.js +21 -0
- package/src/api/cyberia-action/cyberia-action.service.js +58 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.controller.js +27 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.model.js +100 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.router.js +70 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.service.js +152 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.controller.js +8 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.model.js +36 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.router.js +20 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.service.js +57 -0
- package/src/api/cyberia-entity/cyberia-entity.controller.js +6 -0
- package/src/api/cyberia-entity/cyberia-entity.model.js +25 -0
- package/src/api/cyberia-entity/cyberia-entity.router.js +17 -0
- package/src/api/cyberia-entity/cyberia-entity.service.js +42 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.controller.js +6 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.model.js +67 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.router.js +17 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.service.js +46 -0
- package/src/api/cyberia-instance/cyberia-fallback-world.js +337 -0
- package/src/api/cyberia-instance/cyberia-instance-boot.service.js +57 -0
- package/src/api/cyberia-instance/cyberia-instance-map.service.js +583 -0
- package/src/api/cyberia-instance/cyberia-instance.controller.js +42 -0
- package/src/api/cyberia-instance/cyberia-instance.model.js +117 -0
- package/src/api/cyberia-instance/cyberia-instance.router.js +75 -0
- package/src/api/cyberia-instance/cyberia-instance.service.js +190 -0
- package/src/api/cyberia-instance/cyberia-portal-connector.js +260 -0
- package/src/api/cyberia-instance/cyberia-world-generator.js +618 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.controller.js +6 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +200 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.router.js +17 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.service.js +46 -0
- package/src/api/cyberia-map/cyberia-map.controller.js +6 -0
- package/src/api/cyberia-map/cyberia-map.model.js +33 -0
- package/src/api/cyberia-map/cyberia-map.router.js +19 -0
- package/src/api/cyberia-map/cyberia-map.service.js +76 -0
- package/src/api/cyberia-quest/cyberia-quest.controller.js +9 -0
- package/src/api/cyberia-quest/cyberia-quest.model.js +67 -0
- package/src/api/cyberia-quest/cyberia-quest.router.js +26 -0
- package/src/api/cyberia-quest/cyberia-quest.service.js +97 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.controller.js +6 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.model.js +49 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.router.js +21 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.service.js +42 -0
- package/src/api/cyberia-saga/cyberia-saga.controller.js +6 -0
- package/src/api/cyberia-saga/cyberia-saga.model.js +59 -0
- package/src/api/cyberia-saga/cyberia-saga.router.js +17 -0
- package/src/api/cyberia-saga/cyberia-saga.service.js +42 -0
- package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +1076 -0
- package/src/api/cyberia-skill/cyberia-skill.controller.js +6 -0
- package/src/api/cyberia-skill/cyberia-skill.model.js +50 -0
- package/src/api/cyberia-skill/cyberia-skill.router.js +17 -0
- package/src/api/cyberia-skill/cyberia-skill.service.js +42 -0
- package/src/api/default/default.controller.js +6 -0
- package/src/api/default/default.model.js +20 -0
- package/src/api/default/default.router.js +21 -0
- package/src/api/default/default.service.js +42 -0
- package/src/api/document/document.controller.js +9 -0
- package/src/api/document/document.model.js +95 -0
- package/src/api/document/document.router.js +32 -0
- package/src/api/document/document.service.js +633 -0
- package/src/api/file/file.controller.js +15 -0
- package/src/api/file/file.model.js +127 -0
- package/src/api/file/file.ref.json +39 -0
- package/src/api/file/file.router.js +36 -0
- package/src/api/file/file.service.js +499 -0
- package/src/api/instance/instance.controller.js +8 -0
- package/src/api/instance/instance.model.js +34 -0
- package/src/api/instance/instance.router.js +27 -0
- package/src/api/instance/instance.service.js +75 -0
- package/src/api/ipfs/ipfs.controller.js +8 -0
- package/src/api/ipfs/ipfs.model.js +77 -0
- package/src/api/ipfs/ipfs.router.js +26 -0
- package/src/api/ipfs/ipfs.service.js +145 -0
- package/src/api/object-layer/object-layer.controller.js +18 -0
- package/src/api/object-layer/object-layer.model.js +200 -0
- package/src/api/object-layer/object-layer.router.js +729 -0
- package/src/api/object-layer/object-layer.service.js +894 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.controller.js +6 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.model.js +93 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.router.js +17 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.service.js +46 -0
- package/src/api/test/test.controller.js +14 -0
- package/src/api/test/test.model.js +14 -0
- package/src/api/test/test.router.js +23 -0
- package/src/api/test/test.service.js +35 -0
- package/src/api/types.js +24 -0
- package/src/api/user/guest.service.js +100 -0
- package/src/api/user/postman_collection.json +216 -0
- package/src/api/user/user.build.js +16 -0
- package/src/api/user/user.controller.js +35 -0
- package/src/api/user/user.model.js +142 -0
- package/src/api/user/user.router.js +367 -0
- package/src/api/user/user.service.js +582 -0
- package/src/api.js +23 -0
- package/src/cli/baremetal.js +3947 -0
- package/src/cli/cloud-init.js +673 -0
- package/src/cli/cluster.js +1395 -0
- package/src/cli/db.js +1533 -0
- package/src/cli/deploy.js +1542 -0
- package/src/cli/docker-compose.js +802 -0
- package/src/cli/env.js +177 -0
- package/src/cli/fs.js +380 -0
- package/src/cli/image.js +389 -0
- package/src/cli/index.js +1059 -0
- package/src/cli/ipfs.js +182 -0
- package/src/cli/kickstart.js +271 -0
- package/src/cli/kubectl.js +214 -0
- package/src/cli/lxd.js +1232 -0
- package/src/cli/monitor.js +659 -0
- package/src/cli/release.js +595 -0
- package/src/cli/repository.js +1969 -0
- package/src/cli/run.js +3326 -0
- package/src/cli/secrets.js +151 -0
- package/src/cli/ssh.js +975 -0
- package/src/cli/static.js +653 -0
- package/src/cli/system.js +332 -0
- package/src/cli/test.js +176 -0
- package/src/client/Cryptokoyn.index.js +30 -0
- package/src/client/CyberiaPortal.index.js +31 -0
- package/src/client/Default.index.js +77 -0
- package/src/client/Itemledger.index.js +35 -0
- package/src/client/Underpost.index.js +31 -0
- package/src/client/components/core/404.js +20 -0
- package/src/client/components/core/500.js +20 -0
- package/src/client/components/core/Account.js +630 -0
- package/src/client/components/core/AgGrid.js +238 -0
- package/src/client/components/core/Alert.js +76 -0
- package/src/client/components/core/AppStore.js +69 -0
- package/src/client/components/core/Auth.js +353 -0
- package/src/client/components/core/Badge.js +26 -0
- package/src/client/components/core/Blockchain.js +41 -0
- package/src/client/components/core/Blog.js +9 -0
- package/src/client/components/core/BtnIcon.js +109 -0
- package/src/client/components/core/CalendarCore.js +437 -0
- package/src/client/components/core/Chat.js +62 -0
- package/src/client/components/core/ClientEvents.js +163 -0
- package/src/client/components/core/ColorPaletteElement.js +309 -0
- package/src/client/components/core/CommonJs.js +1014 -0
- package/src/client/components/core/Content.js +349 -0
- package/src/client/components/core/Css.js +1134 -0
- package/src/client/components/core/CssCore.js +881 -0
- package/src/client/components/core/D3Chart.js +44 -0
- package/src/client/components/core/Docs.js +478 -0
- package/src/client/components/core/DropDown.js +321 -0
- package/src/client/components/core/EventBus.js +96 -0
- package/src/client/components/core/EventsUI.js +130 -0
- package/src/client/components/core/FileExplorer.js +1406 -0
- package/src/client/components/core/FullScreen.js +201 -0
- package/src/client/components/core/Input.js +537 -0
- package/src/client/components/core/Keyboard.js +80 -0
- package/src/client/components/core/KeyboardAvoidance.js +145 -0
- package/src/client/components/core/LoadingAnimation.js +152 -0
- package/src/client/components/core/LogIn.js +212 -0
- package/src/client/components/core/LogOut.js +72 -0
- package/src/client/components/core/Logger.js +22 -0
- package/src/client/components/core/Modal.js +2956 -0
- package/src/client/components/core/NotificationManager.js +80 -0
- package/src/client/components/core/Pagination.js +252 -0
- package/src/client/components/core/Panel.js +1308 -0
- package/src/client/components/core/PanelForm.js +915 -0
- package/src/client/components/core/Polyhedron.js +947 -0
- package/src/client/components/core/PublicProfile.js +895 -0
- package/src/client/components/core/Recover.js +211 -0
- package/src/client/components/core/Responsive.js +146 -0
- package/src/client/components/core/RichText.js +33 -0
- package/src/client/components/core/Router.js +523 -0
- package/src/client/components/core/Scroll.js +76 -0
- package/src/client/components/core/SearchBox.js +1007 -0
- package/src/client/components/core/SignUp.js +153 -0
- package/src/client/components/core/SocketIo.js +163 -0
- package/src/client/components/core/SocketIoHandler.js +75 -0
- package/src/client/components/core/Stream.js +161 -0
- package/src/client/components/core/ToggleSwitch.js +89 -0
- package/src/client/components/core/ToolTip.js +78 -0
- package/src/client/components/core/Translate.js +694 -0
- package/src/client/components/core/Validator.js +140 -0
- package/src/client/components/core/VanillaJs.js +485 -0
- package/src/client/components/core/Wallet.js +95 -0
- package/src/client/components/core/WebComponent.js +44 -0
- package/src/client/components/core/Webhook.js +58 -0
- package/src/client/components/core/Worker.js +313 -0
- package/src/client/components/core/windowGetDimensions.js +269 -0
- package/src/client/components/cryptokoyn/AppShellCryptokoyn.js +352 -0
- package/src/client/components/cryptokoyn/AppStoreCryptokoyn.js +5 -0
- package/src/client/components/cryptokoyn/CssCryptokoyn.js +212 -0
- package/src/client/components/cryptokoyn/LogInCryptokoyn.js +16 -0
- package/src/client/components/cryptokoyn/LogOutCryptokoyn.js +12 -0
- package/src/client/components/cryptokoyn/RouterCryptokoyn.js +37 -0
- package/src/client/components/cryptokoyn/SettingsCryptokoyn.js +16 -0
- package/src/client/components/cryptokoyn/SignUpCryptokoyn.js +11 -0
- package/src/client/components/cryptokoyn/SocketIoCryptokoyn.js +6 -0
- package/src/client/components/cyberia/ActionEngineCyberia.js +1867 -0
- package/src/client/components/cyberia/EntityEngineCyberia.js +585 -0
- package/src/client/components/cyberia/InstanceEngineCyberia.js +1088 -0
- package/src/client/components/cyberia/InstanceSelectionView.js +900 -0
- package/src/client/components/cyberia/MapEngineCyberia.js +1976 -0
- package/src/client/components/cyberia/ObjectLayerEngine.js +1540 -0
- package/src/client/components/cyberia/ObjectLayerEngineModal.js +2420 -0
- package/src/client/components/cyberia/ObjectLayerEngineViewer.js +1522 -0
- package/src/client/components/cyberia/SharedDefaultsCyberia.js +528 -0
- package/src/client/components/cyberia-portal/AppShellCyberiaPortal.js +772 -0
- package/src/client/components/cyberia-portal/AppStoreCyberiaPortal.js +5 -0
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +254 -0
- package/src/client/components/cyberia-portal/LogInCyberiaPortal.js +21 -0
- package/src/client/components/cyberia-portal/LogOutCyberiaPortal.js +16 -0
- package/src/client/components/cyberia-portal/MainBodyCyberiaPortal.js +518 -0
- package/src/client/components/cyberia-portal/RouterCyberiaPortal.js +72 -0
- package/src/client/components/cyberia-portal/SettingsCyberiaPortal.js +16 -0
- package/src/client/components/cyberia-portal/SignUpCyberiaPortal.js +13 -0
- package/src/client/components/cyberia-portal/SocketIoCyberiaPortal.js +6 -0
- package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +48 -0
- package/src/client/components/default/AppShellDefault.js +765 -0
- package/src/client/components/default/AppStoreDefault.js +5 -0
- package/src/client/components/default/CommonDefault.js +29 -0
- package/src/client/components/default/CssDefault.js +27 -0
- package/src/client/components/default/LogInDefault.js +16 -0
- package/src/client/components/default/LogOutDefault.js +12 -0
- package/src/client/components/default/RouterDefault.js +47 -0
- package/src/client/components/default/SettingsDefault.js +16 -0
- package/src/client/components/default/SignUpDefault.js +11 -0
- package/src/client/components/default/SocketIoDefault.js +6 -0
- package/src/client/components/default/TranslateDefault.js +7 -0
- package/src/client/components/itemledger/AppShellItemledger.js +353 -0
- package/src/client/components/itemledger/AppStoreItemledger.js +5 -0
- package/src/client/components/itemledger/CssItemledger.js +212 -0
- package/src/client/components/itemledger/LogInItemledger.js +17 -0
- package/src/client/components/itemledger/LogOutItemledger.js +12 -0
- package/src/client/components/itemledger/RouterItemledger.js +38 -0
- package/src/client/components/itemledger/SettingsItemledger.js +16 -0
- package/src/client/components/itemledger/SignUpItemledger.js +11 -0
- package/src/client/components/itemledger/SocketIoItemledger.js +6 -0
- package/src/client/components/itemledger/TranslateItemledger.js +7 -0
- package/src/client/components/underpost/AppShellUnderpost.js +691 -0
- package/src/client/components/underpost/AppStoreUnderpost.js +5 -0
- package/src/client/components/underpost/CssUnderpost.js +281 -0
- package/src/client/components/underpost/CyberpunkBloggerUnderpost.js +879 -0
- package/src/client/components/underpost/DocumentSearchProvider.js +448 -0
- package/src/client/components/underpost/LabGalleryUnderpost.js +79 -0
- package/src/client/components/underpost/LogInUnderpost.js +25 -0
- package/src/client/components/underpost/LogOutUnderpost.js +17 -0
- package/src/client/components/underpost/RouterUnderpost.js +45 -0
- package/src/client/components/underpost/SettingsUnderpost.js +16 -0
- package/src/client/components/underpost/SignUpUnderpost.js +11 -0
- package/src/client/components/underpost/SocketIoUnderpost.js +6 -0
- package/src/client/components/underpost/TranslateUnderpost.js +10 -0
- package/src/client/public/cryptokoyn/assets/banner/koyn-social.png +0 -0
- package/src/client/public/cryptokoyn/assets/logo/base-icon.png +0 -0
- package/src/client/public/cryptokoyn/assets/logo/cryptokoyn.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-144x144.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-192x192.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-256x256.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-36x36.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-48x48.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-72x72.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-96x96.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-114x114-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-120x120-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-144x144-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-152x152-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-180x180-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-57x57-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-60x60-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-72x72-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-76x76-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/favicon-16x16.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/favicon-32x32.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-144x144.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-150x150.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-310x150.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-310x310.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-70x70.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/safari-pinned-tab.svg +42 -0
- package/src/client/public/cryptokoyn/browserconfig.xml +12 -0
- package/src/client/public/cryptokoyn/favicon.ico +0 -0
- package/src/client/public/cryptokoyn/microdata.json +85 -0
- package/src/client/public/cryptokoyn/site.webmanifest +57 -0
- package/src/client/public/cryptokoyn/sitemap +148 -0
- package/src/client/public/cyberia-docs/ACTION-SYSTEM.md +307 -0
- package/src/client/public/cyberia-docs/ARCHITECTURE.md +309 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLI.md +204 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLIENT.md +341 -0
- package/src/client/public/cyberia-docs/CYBERIA-LORE.md +84 -0
- package/src/client/public/cyberia-docs/CYBERIA-SAGA.md +394 -0
- package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +294 -0
- package/src/client/public/cyberia-docs/CYBERIA.md +259 -0
- package/src/client/public/cyberia-docs/ENTITY-PROFILE.md +242 -0
- package/src/client/public/cyberia-docs/HARDHAT-MODULE.md +300 -0
- package/src/client/public/cyberia-docs/OFF-CHAIN-ECONOMY.md +309 -0
- package/src/client/public/cyberia-docs/QUEST-SYSTEM.md +228 -0
- package/src/client/public/cyberia-docs/ROADMAP.md +240 -0
- package/src/client/public/cyberia-docs/UNDERPOST-PLATFORM.md +106 -0
- package/src/client/public/cyberia-docs/WHITE-PAPER.md +740 -0
- package/src/client/public/default/android-chrome-144x144.png +0 -0
- package/src/client/public/default/android-chrome-192x192.png +0 -0
- package/src/client/public/default/android-chrome-256x256.png +0 -0
- package/src/client/public/default/android-chrome-36x36.png +0 -0
- package/src/client/public/default/android-chrome-384x384.png +0 -0
- package/src/client/public/default/android-chrome-48x48.png +0 -0
- package/src/client/public/default/android-chrome-512x512.png +0 -0
- package/src/client/public/default/android-chrome-72x72.png +0 -0
- package/src/client/public/default/android-chrome-96x96.png +0 -0
- package/src/client/public/default/apple-touch-icon-1024x1024.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/default/apple-touch-icon-167x167.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/default/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1125x2436.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1136x640.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1170x2532.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1179x2556.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1242x2208.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1242x2688.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1284x2778.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1290x2796.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1334x750.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1488x2266.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1536x2048.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1620x2160.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1640x2160.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1668x2224.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1668x2388.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1792x828.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2048x1536.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2048x2732.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2160x1620.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2160x1640.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2208x1242.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2224x1668.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2266x1488.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2388x1668.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2436x1125.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2532x1170.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2556x1179.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2688x1242.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2732x2048.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2778x1284.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2796x1290.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-640x1136.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-750x1334.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-828x1792.png +0 -0
- package/src/client/public/default/assets/background/dark.jpg +0 -0
- package/src/client/public/default/assets/background/dark.svg +557 -0
- package/src/client/public/default/assets/background/white.jpg +0 -0
- package/src/client/public/default/assets/background/white0-min.jpg +0 -0
- package/src/client/public/default/assets/background/white0.jpg +0 -0
- package/src/client/public/default/assets/logo/base-icon.png +0 -0
- package/src/client/public/default/assets/logo/underpost.gif +0 -0
- package/src/client/public/default/assets/mailer/api-user-check.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-default-avatar.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-invalid-token.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-recover.png +0 -0
- package/src/client/public/default/browserconfig.xml +12 -0
- package/src/client/public/default/favicon-16x16.png +0 -0
- package/src/client/public/default/favicon-32x32.png +0 -0
- package/src/client/public/default/favicon-48x48.png +0 -0
- package/src/client/public/default/favicon.ico +0 -0
- package/src/client/public/default/manifest.webmanifest +69 -0
- package/src/client/public/default/mstile-144x144.png +0 -0
- package/src/client/public/default/mstile-150x150.png +0 -0
- package/src/client/public/default/mstile-310x150.png +0 -0
- package/src/client/public/default/mstile-310x310.png +0 -0
- package/src/client/public/default/mstile-70x70.png +0 -0
- package/src/client/public/default/safari-pinned-tab.svg +24 -0
- package/src/client/public/default/site.webmanifest +69 -0
- package/src/client/public/default/sitemap +148 -0
- package/src/client/public/default/yandex-browser-50x50.png +0 -0
- package/src/client/public/default/yandex-browser-manifest.json +9 -0
- package/src/client/public/doc/favicon.ico +0 -0
- package/src/client/public/doc/sitemap +148 -0
- package/src/client/public/itemledger/android-chrome-144x144.png +0 -0
- package/src/client/public/itemledger/android-chrome-192x192.png +0 -0
- package/src/client/public/itemledger/android-chrome-256x256.png +0 -0
- package/src/client/public/itemledger/android-chrome-36x36.png +0 -0
- package/src/client/public/itemledger/android-chrome-384x384.png +0 -0
- package/src/client/public/itemledger/android-chrome-48x48.png +0 -0
- package/src/client/public/itemledger/android-chrome-512x512.png +0 -0
- package/src/client/public/itemledger/android-chrome-72x72.png +0 -0
- package/src/client/public/itemledger/android-chrome-96x96.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-1024x1024.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-167x167.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1125x2436.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1136x640.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1170x2532.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1179x2556.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1242x2208.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1242x2688.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1284x2778.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1290x2796.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1334x750.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1488x2266.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1536x2048.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1620x2160.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1640x2160.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1668x2224.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1668x2388.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1792x828.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2048x1536.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2048x2732.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2160x1620.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2160x1640.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2208x1242.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2224x1668.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2266x1488.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2388x1668.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2436x1125.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2532x1170.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2556x1179.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2688x1242.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2732x2048.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2778x1284.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2796x1290.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-640x1136.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-750x1334.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-828x1792.png +0 -0
- package/src/client/public/itemledger/assets/logo/base-icon.png +0 -0
- package/src/client/public/itemledger/browserconfig.xml +12 -0
- package/src/client/public/itemledger/favicon-16x16.png +0 -0
- package/src/client/public/itemledger/favicon-32x32.png +0 -0
- package/src/client/public/itemledger/favicon-48x48.png +0 -0
- package/src/client/public/itemledger/favicon.ico +0 -0
- package/src/client/public/itemledger/manifest.webmanifest +69 -0
- package/src/client/public/itemledger/microdata.json +71 -0
- package/src/client/public/itemledger/mstile-144x144.png +0 -0
- package/src/client/public/itemledger/mstile-150x150.png +0 -0
- package/src/client/public/itemledger/mstile-310x150.png +0 -0
- package/src/client/public/itemledger/mstile-310x310.png +0 -0
- package/src/client/public/itemledger/mstile-70x70.png +0 -0
- package/src/client/public/itemledger/sitemap +148 -0
- package/src/client/public/itemledger/yandex-browser-50x50.png +0 -0
- package/src/client/public/itemledger/yandex-browser-manifest.json +9 -0
- package/src/client/public/test/favicon.ico +0 -0
- package/src/client/public/test/sitemap +148 -0
- package/src/client/services/atlas-sprite-sheet/atlas-sprite-sheet.service.js +137 -0
- package/src/client/services/core/core.service.js +309 -0
- package/src/client/services/crypto/crypto.service.js +68 -0
- package/src/client/services/cyberia-action/cyberia-action.service.js +99 -0
- package/src/client/services/cyberia-client-hints/cyberia-client-hints.service.js +99 -0
- package/src/client/services/cyberia-dialogue/cyberia-dialogue.service.js +99 -0
- package/src/client/services/cyberia-entity/cyberia-entity.management.js +57 -0
- package/src/client/services/cyberia-entity/cyberia-entity.service.js +99 -0
- package/src/client/services/cyberia-entity-type-default/cyberia-entity-type-default.service.js +99 -0
- package/src/client/services/cyberia-instance/cyberia-instance.management.js +194 -0
- package/src/client/services/cyberia-instance/cyberia-instance.service.js +137 -0
- package/src/client/services/cyberia-instance-conf/cyberia-instance-conf.service.js +99 -0
- package/src/client/services/cyberia-map/cyberia-map.management.js +193 -0
- package/src/client/services/cyberia-map/cyberia-map.service.js +120 -0
- package/src/client/services/cyberia-quest/cyberia-quest.service.js +99 -0
- package/src/client/services/cyberia-quest-progress/cyberia-quest-progress.service.js +99 -0
- package/src/client/services/cyberia-saga/cyberia-saga.service.js +99 -0
- package/src/client/services/cyberia-skill/cyberia-skill.service.js +99 -0
- package/src/client/services/default/default.management.js +1015 -0
- package/src/client/services/default/default.service.js +99 -0
- package/src/client/services/document/document.service.js +134 -0
- package/src/client/services/file/file.service.js +94 -0
- package/src/client/services/instance/instance.management.js +78 -0
- package/src/client/services/instance/instance.service.js +107 -0
- package/src/client/services/ipfs/ipfs.service.js +118 -0
- package/src/client/services/object-layer/object-layer.management.js +414 -0
- package/src/client/services/object-layer/object-layer.service.js +208 -0
- package/src/client/services/object-layer-render-frames/object-layer-render-frames.service.js +99 -0
- package/src/client/services/test/test.service.js +68 -0
- package/src/client/services/user/guest.service.js +86 -0
- package/src/client/services/user/user.management.js +51 -0
- package/src/client/services/user/user.service.js +106 -0
- package/src/client/ssr/RootDocument.js +237 -0
- package/src/client/ssr/body/404.js +77 -0
- package/src/client/ssr/body/500.js +76 -0
- package/src/client/ssr/body/CacheControl.js +117 -0
- package/src/client/ssr/body/CyberiaDefaultSplashScreen.js +97 -0
- package/src/client/ssr/body/DefaultSplashScreen.js +97 -0
- package/src/client/ssr/body/SwaggerDarkMode.js +285 -0
- package/src/client/ssr/body/UnderpostDefaultSplashScreen.js +90 -0
- package/src/client/ssr/head/CryptokoynScripts.js +4 -0
- package/src/client/ssr/head/Css.js +241 -0
- package/src/client/ssr/head/CyberiaPortalScripts.js +6 -0
- package/src/client/ssr/head/DefaultScripts.js +6 -0
- package/src/client/ssr/head/ItemledgerScripts.js +4 -0
- package/src/client/ssr/head/Microdata.js +11 -0
- package/src/client/ssr/head/Production.js +1 -0
- package/src/client/ssr/head/Pwa.js +146 -0
- package/src/client/ssr/head/PwaItemledger.js +197 -0
- package/src/client/ssr/head/Seo.js +15 -0
- package/src/client/ssr/head/UnderpostScripts.js +6 -0
- package/src/client/ssr/mailer/DefaultRecoverEmail.js +20 -0
- package/src/client/ssr/mailer/DefaultVerifyEmail.js +16 -0
- package/src/client/ssr/views/Cyberia404.js +328 -0
- package/src/client/ssr/views/CyberiaServerMetrics.js +1070 -0
- package/src/client/ssr/views/Maintenance.js +64 -0
- package/src/client/ssr/views/NoNetworkConnection.js +68 -0
- package/src/client/ssr/views/Test.js +199 -0
- package/src/client/sw/core.sw.js +274 -0
- package/src/client-builder/client-build-docs.js +493 -0
- package/src/client-builder/client-build-live.js +100 -0
- package/src/client-builder/client-build.js +1092 -0
- package/src/client-builder/client-dev-server.js +88 -0
- package/src/client-builder/client-formatted.js +170 -0
- package/src/client-builder/client-icons.js +108 -0
- package/src/client-builder/ssr.js +124 -0
- package/src/client.build.js +17 -0
- package/src/client.dev.js +21 -0
- package/src/db/DataBaseProvider.js +213 -0
- package/src/db/mariadb/MariaDB.js +72 -0
- package/src/db/mongo/MongoBootstrap.js +657 -0
- package/src/db/mongo/MongooseDB.js +199 -0
- package/src/grpc/cyberia/grpc-server.js +162 -0
- package/src/index.js +357 -0
- package/src/mailer/EmailRender.js +116 -0
- package/src/mailer/MailerProvider.js +213 -0
- package/src/projects/cyberia/atlas-sprite-sheet-generator.js +413 -0
- package/src/projects/cyberia/besu-genesis-generator.js +1630 -0
- package/src/projects/cyberia/catalog-cyberia.js +90 -0
- package/src/projects/cyberia/gemini-client.js +175 -0
- package/src/projects/cyberia/generate-saga.js +2137 -0
- package/src/projects/cyberia/hot-reload-trigger.js +163 -0
- package/src/projects/cyberia/instance-data.js +719 -0
- package/src/projects/cyberia/ipfs-client.js +599 -0
- package/src/projects/cyberia/map-preview-generator.js +304 -0
- package/src/projects/cyberia/object-layer.js +978 -0
- package/src/projects/cyberia/semantic-layer-generator-floor.js +319 -0
- package/src/projects/cyberia/semantic-layer-generator-resource.js +259 -0
- package/src/projects/cyberia/semantic-layer-generator-skin.js +1164 -0
- package/src/projects/cyberia/semantic-layer-generator.js +753 -0
- package/src/projects/cyberia/shape-generator.js +1060 -0
- package/src/projects/underpost/catalog-underpost.js +60 -0
- package/src/proxy.js +19 -0
- package/src/runtime/cyberia-client/Dockerfile +49 -0
- package/src/runtime/cyberia-client/Dockerfile.dev +75 -0
- package/src/runtime/cyberia-server/Dockerfile +43 -0
- package/src/runtime/cyberia-server/Dockerfile.dev +56 -0
- package/src/runtime/engine-cyberia/Dockerfile +161 -0
- package/src/runtime/engine-cyberia/Dockerfile.dev +161 -0
- package/src/runtime/engine-cyberia/Dockerfile.test +165 -0
- package/src/runtime/engine-cyberia/compose.env +144 -0
- package/src/runtime/engine-cyberia/docker-compose.yml +434 -0
- package/src/runtime/engine-cyberia/ipfs/configure-ipfs.sh +13 -0
- package/src/runtime/engine-cyberia/mongodb/entrypoint.sh +76 -0
- package/src/runtime/engine-cyberia/nginx.conf +128 -0
- package/src/runtime/express/Dockerfile +45 -0
- package/src/runtime/express/Express.js +285 -0
- package/src/runtime/lampp/Dockerfile +62 -0
- package/src/runtime/lampp/Lampp.js +359 -0
- package/src/runtime/nginx/Nginx.js +250 -0
- package/src/runtime/wp/Dockerfile +62 -0
- package/src/runtime/wp/Wp.js +642 -0
- package/src/server/auth.js +713 -0
- package/src/server/backup.js +102 -0
- package/src/server/catalog.js +72 -0
- package/src/server/conf.js +2316 -0
- package/src/server/cron.js +476 -0
- package/src/server/crypto.js +210 -0
- package/src/server/data-query.js +461 -0
- package/src/server/dns.js +553 -0
- package/src/server/downloader.js +73 -0
- package/src/server/logger.js +229 -0
- package/src/server/middlewares.js +152 -0
- package/src/server/peer.js +75 -0
- package/src/server/process.js +299 -0
- package/src/server/proxy.js +139 -0
- package/src/server/runtime-status.js +252 -0
- package/src/server/runtime.js +183 -0
- package/src/server/start.js +272 -0
- package/src/server/tls.js +254 -0
- package/src/server/valkey.js +201 -0
- package/src/server.js +25 -0
- package/src/ws/IoInterface.js +129 -0
- package/src/ws/IoServer.js +68 -0
- package/src/ws/core/channels/core.ws.chat.js +68 -0
- package/src/ws/core/channels/core.ws.mailer.js +116 -0
- package/src/ws/core/channels/core.ws.stream.js +90 -0
- package/src/ws/core/core.ws.connection.js +41 -0
- package/src/ws/core/core.ws.emit.js +37 -0
- package/src/ws/core/core.ws.server.js +44 -0
- package/src/ws/default/channels/default.ws.main.js +57 -0
- package/src/ws/default/default.ws.connection.js +35 -0
- package/src/ws/default/default.ws.emit.js +14 -0
- package/src/ws/default/default.ws.server.js +39 -0
- package/test/api.test.js +53 -0
- package/test/crypto.test.js +117 -0
- package/test/cyberia-instance-conf-defaults.test.js +140 -0
- package/test/deploy-monitor.test.js +267 -0
- package/test/shape-generator.test.js +463 -0
- package/tsconfig.docs.json +15 -0
- package/typedoc.dd-cyberia.json +31 -0
- package/typedoc.json +31 -0
|
@@ -0,0 +1,1088 @@
|
|
|
1
|
+
import { BtnIcon } from '../core/BtnIcon.js';
|
|
2
|
+
import { Input, InputFile, getFileFromBlobEndpoint } from '../core/Input.js';
|
|
3
|
+
import { htmls, s } from '../core/VanillaJs.js';
|
|
4
|
+
import { commonModeratorGuard } from '../core/CommonJs.js';
|
|
5
|
+
import { NotificationManager } from '../core/NotificationManager.js';
|
|
6
|
+
import { Translate } from '../core/Translate.js';
|
|
7
|
+
import { dynamicCol, darkTheme, ThemeEvents } from '../core/Css.js';
|
|
8
|
+
import { DropDown } from '../core/DropDown.js';
|
|
9
|
+
import { CyberiaInstanceManagement } from '../../services/cyberia-instance/cyberia-instance.management.js';
|
|
10
|
+
import { CyberiaInstanceService } from '../../services/cyberia-instance/cyberia-instance.service.js';
|
|
11
|
+
import { CyberiaInstanceConfService } from '../../services/cyberia-instance-conf/cyberia-instance-conf.service.js';
|
|
12
|
+
import { CyberiaMapService } from '../../services/cyberia-map/cyberia-map.service.js';
|
|
13
|
+
import { FileService } from '../../services/file/file.service.js';
|
|
14
|
+
import { DefaultManagement } from '../../services/default/default.management.js';
|
|
15
|
+
import { getApiBaseUrl } from '../../services/core/core.service.js';
|
|
16
|
+
import { ObjectLayerService } from '../../services/object-layer/object-layer.service.js';
|
|
17
|
+
|
|
18
|
+
const dropdownValueKey = (value = '') => String(value).trim().replaceAll(' ', '-');
|
|
19
|
+
const createDropdownOption = (value, onClick = () => {}, display = value, data = value) => ({
|
|
20
|
+
value,
|
|
21
|
+
display,
|
|
22
|
+
data,
|
|
23
|
+
onClick,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
class InstanceEngineCyberia {
|
|
27
|
+
static currentInstanceId = null;
|
|
28
|
+
static currentThumbnailId = null;
|
|
29
|
+
static thumbnailDirty = false;
|
|
30
|
+
static portals = [];
|
|
31
|
+
static itemIdsDropdownId = 'instance-engine-item-ids-dropdown';
|
|
32
|
+
static itemInventoryListId = 'instance-engine-item-inventory-list';
|
|
33
|
+
// itemId → defaultPlayerInventory flag for the currently selected item ids.
|
|
34
|
+
static itemInventoryFlags = {};
|
|
35
|
+
|
|
36
|
+
// Current selection, read from the dropdown's `oncheckvalues` (always live —
|
|
37
|
+
// it is updated before `_renderSelectedBadges` runs, unlike `.value` which
|
|
38
|
+
// lags by one in the option-click path).
|
|
39
|
+
static getSelectedItemIds() {
|
|
40
|
+
const token = DropDown.Tokens[InstanceEngineCyberia.itemIdsDropdownId];
|
|
41
|
+
if (!token) return [];
|
|
42
|
+
const fromChecks = Object.values(token.oncheckvalues || {})
|
|
43
|
+
.map((v) => v.data)
|
|
44
|
+
.filter(Boolean);
|
|
45
|
+
if (fromChecks.length > 0) return fromChecks;
|
|
46
|
+
return Array.isArray(token.value) ? token.value.filter(Boolean) : [];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Render the per-item "Default Player Inventory" toggles for every selected
|
|
50
|
+
// item id. Kept in sync with the dropdown via a MutationObserver on its badge
|
|
51
|
+
// container (see render()).
|
|
52
|
+
static renderItemInventoryList(containerId = InstanceEngineCyberia.itemInventoryListId) {
|
|
53
|
+
const container = s(`.${containerId}`);
|
|
54
|
+
if (!container) return;
|
|
55
|
+
|
|
56
|
+
const selected = InstanceEngineCyberia.getSelectedItemIds();
|
|
57
|
+
|
|
58
|
+
// Drop flags for items no longer selected so the payload never carries them.
|
|
59
|
+
for (const key of Object.keys(InstanceEngineCyberia.itemInventoryFlags)) {
|
|
60
|
+
if (!selected.includes(key)) delete InstanceEngineCyberia.itemInventoryFlags[key];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (selected.length === 0) {
|
|
64
|
+
htmls(`.${containerId}`, html`<div style="color:#888;font-size:12px;">No item IDs selected.</div>`);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
let listHtml = '';
|
|
69
|
+
for (const itemId of selected) {
|
|
70
|
+
const checked = InstanceEngineCyberia.itemInventoryFlags[itemId] ? 'checked' : '';
|
|
71
|
+
listHtml += html`<div class="fl" style="border-bottom:1px solid #444;padding:4px 0;align-items:center;">
|
|
72
|
+
<div class="in fll" style="flex:1;font-size:12px;font-family:monospace;">${itemId}</div>
|
|
73
|
+
<div class="in fll" style="display:flex;align-items:center;justify-content:flex-end;">
|
|
74
|
+
<label style="font-size:11px;cursor:pointer;display:flex;align-items:center;gap:5px;">
|
|
75
|
+
<input
|
|
76
|
+
type="checkbox"
|
|
77
|
+
class="instance-engine-item-inv-checkbox"
|
|
78
|
+
data-item-id="${itemId}"
|
|
79
|
+
${checked}
|
|
80
|
+
style="cursor:pointer;"
|
|
81
|
+
/>
|
|
82
|
+
Default Player Inventory
|
|
83
|
+
</label>
|
|
84
|
+
</div>
|
|
85
|
+
</div>`;
|
|
86
|
+
}
|
|
87
|
+
htmls(`.${containerId}`, listHtml);
|
|
88
|
+
|
|
89
|
+
container.querySelectorAll('.instance-engine-item-inv-checkbox').forEach((cb) => {
|
|
90
|
+
cb.onchange = () => {
|
|
91
|
+
InstanceEngineCyberia.itemInventoryFlags[cb.dataset.itemId] = cb.checked;
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
static syncItemIdsDropdownSelection(itemIds = []) {
|
|
97
|
+
const dropdownId = InstanceEngineCyberia.itemIdsDropdownId;
|
|
98
|
+
if (!DropDown.Tokens[dropdownId]) return;
|
|
99
|
+
|
|
100
|
+
// Accept both the new [{ id, defaultPlayerInventory }] shape and the legacy
|
|
101
|
+
// string[] shape so older instance docs keep loading.
|
|
102
|
+
const normalized = (itemIds || [])
|
|
103
|
+
.map((entry) => (typeof entry === 'string' ? { id: entry, defaultPlayerInventory: false } : entry))
|
|
104
|
+
.filter((entry) => entry && entry.id);
|
|
105
|
+
|
|
106
|
+
DropDown.Tokens[dropdownId].value = [];
|
|
107
|
+
if (s(`.${dropdownId}`)) s(`.${dropdownId}`).value = [];
|
|
108
|
+
DropDown.Tokens[dropdownId].oncheckvalues = {};
|
|
109
|
+
htmls(`.dropdown-current-${dropdownId}`, '');
|
|
110
|
+
htmls(`.${dropdownId}-render-container`, '');
|
|
111
|
+
|
|
112
|
+
InstanceEngineCyberia.itemInventoryFlags = {};
|
|
113
|
+
const ids = [];
|
|
114
|
+
for (const entry of normalized) {
|
|
115
|
+
const key = dropdownValueKey(entry.id);
|
|
116
|
+
DropDown.Tokens[dropdownId].oncheckvalues[key] = {
|
|
117
|
+
data: entry.id,
|
|
118
|
+
display: entry.id,
|
|
119
|
+
value: entry.id,
|
|
120
|
+
};
|
|
121
|
+
InstanceEngineCyberia.itemInventoryFlags[entry.id] = !!entry.defaultPlayerInventory;
|
|
122
|
+
ids.push(entry.id);
|
|
123
|
+
}
|
|
124
|
+
DropDown.Tokens[dropdownId].value = [...ids];
|
|
125
|
+
if (s(`.${dropdownId}`)) s(`.${dropdownId}`).value = [...ids];
|
|
126
|
+
DropDown.Tokens[dropdownId]._renderSelectedBadges?.();
|
|
127
|
+
InstanceEngineCyberia.renderItemInventoryList();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
static async buildItemIdsDropdown() {
|
|
131
|
+
return await DropDown.instance({
|
|
132
|
+
id: InstanceEngineCyberia.itemIdsDropdownId,
|
|
133
|
+
label: html`Object Layer Item IDs`,
|
|
134
|
+
data: [],
|
|
135
|
+
type: 'checkbox',
|
|
136
|
+
containerClass: 'inl',
|
|
137
|
+
excludeSelected: true,
|
|
138
|
+
serviceProvider: async (q) => {
|
|
139
|
+
const result = await ObjectLayerService.searchItemIds({ q });
|
|
140
|
+
if (result.status === 'success' && result.data?.itemIds) {
|
|
141
|
+
return result.data.itemIds.map((itemId) => createDropdownOption(itemId));
|
|
142
|
+
}
|
|
143
|
+
return [];
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
static renderPortalList(containerId) {
|
|
149
|
+
const container = s(`.${containerId}`);
|
|
150
|
+
if (!container) return;
|
|
151
|
+
|
|
152
|
+
const filterSource = s('.instance-engine-filter-source')?.value?.trim().toLowerCase() || '';
|
|
153
|
+
const filterTarget = s('.instance-engine-filter-target')?.value?.trim().toLowerCase() || '';
|
|
154
|
+
|
|
155
|
+
const filtered = [];
|
|
156
|
+
InstanceEngineCyberia.portals.forEach((portal, i) => {
|
|
157
|
+
if (filterSource && !(portal.sourceMapCode || '').toLowerCase().includes(filterSource)) return;
|
|
158
|
+
if (filterTarget && !(portal.targetMapCode || '').toLowerCase().includes(filterTarget)) return;
|
|
159
|
+
filtered.push({ portal, i });
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
let listHtml = '';
|
|
163
|
+
filtered.forEach(({ portal, i }) => {
|
|
164
|
+
listHtml += html`<div class="fl" style="border-bottom:1px solid #444; padding:4px 0; align-items:center;">
|
|
165
|
+
<div class="in fll" style="flex:1;font-size:12px;font-family:monospace;">
|
|
166
|
+
<span style="color:${darkTheme ? '#8cf' : '#246'};">${portal.sourceMapCode}</span>
|
|
167
|
+
(${portal.sourceCellX}, ${portal.sourceCellY})
|
|
168
|
+
<span style="margin:0 4px;">→</span>
|
|
169
|
+
<span style="color:${darkTheme ? '#fc8' : '#842'};">${portal.targetMapCode}</span>
|
|
170
|
+
${portal.targetCellX < 0 || portal.targetCellY < 0
|
|
171
|
+
? '<span style="color:#aaa;">(random)</span>'
|
|
172
|
+
: `(${portal.targetCellX}, ${portal.targetCellY})`}
|
|
173
|
+
<span style="color:${darkTheme ? '#9e9' : '#383'};margin-left:4px;font-size:11px;"
|
|
174
|
+
>[${portal.portalMode || 'inter-portal'}]</span
|
|
175
|
+
>
|
|
176
|
+
</div>
|
|
177
|
+
<div class="in fll" style="display:flex;gap:3px;">
|
|
178
|
+
<button
|
|
179
|
+
class="btn-instance-engine-load-portal"
|
|
180
|
+
data-index="${i}"
|
|
181
|
+
style="cursor:pointer;background:#36a;color:#fff;border:none;padding:2px 8px;font-size:12px;"
|
|
182
|
+
>
|
|
183
|
+
<i class="fa-solid fa-clone"></i>
|
|
184
|
+
</button>
|
|
185
|
+
<button
|
|
186
|
+
class="btn-instance-engine-remove-portal"
|
|
187
|
+
data-index="${i}"
|
|
188
|
+
style="cursor:pointer;background:#a00;color:#fff;border:none;padding:2px 8px;font-size:12px;"
|
|
189
|
+
>
|
|
190
|
+
<i class="fa-solid fa-trash"></i>
|
|
191
|
+
</button>
|
|
192
|
+
</div>
|
|
193
|
+
</div>`;
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
if (!listHtml)
|
|
197
|
+
listHtml = `<div style="color:#888;font-size:13px;">${
|
|
198
|
+
InstanceEngineCyberia.portals.length > 0 ? 'No matching portals.' : 'No portals added yet.'
|
|
199
|
+
}</div>`;
|
|
200
|
+
|
|
201
|
+
htmls(`.${containerId}`, listHtml);
|
|
202
|
+
|
|
203
|
+
container.querySelectorAll('.btn-instance-engine-remove-portal').forEach((btn) => {
|
|
204
|
+
btn.onclick = () => {
|
|
205
|
+
const idx = parseInt(btn.dataset.index);
|
|
206
|
+
InstanceEngineCyberia.portals.splice(idx, 1);
|
|
207
|
+
InstanceEngineCyberia.renderPortalList(containerId);
|
|
208
|
+
};
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
container.querySelectorAll('.btn-instance-engine-load-portal').forEach((btn) => {
|
|
212
|
+
btn.onclick = () => {
|
|
213
|
+
const idx = parseInt(btn.dataset.index);
|
|
214
|
+
const portal = InstanceEngineCyberia.portals[idx];
|
|
215
|
+
if (!portal) return;
|
|
216
|
+
if (s('.instance-engine-source-map-code'))
|
|
217
|
+
s('.instance-engine-source-map-code').value = portal.sourceMapCode || '';
|
|
218
|
+
if (s('.instance-engine-source-cell-x')) s('.instance-engine-source-cell-x').value = portal.sourceCellX || 0;
|
|
219
|
+
if (s('.instance-engine-source-cell-y')) s('.instance-engine-source-cell-y').value = portal.sourceCellY || 0;
|
|
220
|
+
if (s('.instance-engine-target-map-code'))
|
|
221
|
+
s('.instance-engine-target-map-code').value = portal.targetMapCode || '';
|
|
222
|
+
if (s('.instance-engine-target-cell-x')) s('.instance-engine-target-cell-x').value = portal.targetCellX || 0;
|
|
223
|
+
if (s('.instance-engine-target-cell-y')) s('.instance-engine-target-cell-y').value = portal.targetCellY || 0;
|
|
224
|
+
};
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
static async render(options = {}) {
|
|
229
|
+
const { appStore } = options;
|
|
230
|
+
const role = appStore?.Data?.user?.main?.model?.user?.role || 'guest';
|
|
231
|
+
const canMutate = commonModeratorGuard(role);
|
|
232
|
+
const idCode = 'instance-engine-input-code';
|
|
233
|
+
const idName = 'instance-engine-input-name';
|
|
234
|
+
const idDescription = 'instance-engine-input-description';
|
|
235
|
+
const idTags = 'instance-engine-input-tags';
|
|
236
|
+
const idStatus = 'instance-engine-input-status';
|
|
237
|
+
const idHotReloadUrl = 'instance-engine-input-hot-reload-url';
|
|
238
|
+
const idThumbnail = 'instance-engine-input-thumbnail';
|
|
239
|
+
const idMapCodesDropdown = 'instance-engine-map-codes-dropdown';
|
|
240
|
+
const idItemIdsDropdown = InstanceEngineCyberia.itemIdsDropdownId;
|
|
241
|
+
const managementId = 'modal-cyberia-instance-engine';
|
|
242
|
+
const portalListId = 'instance-engine-portal-list';
|
|
243
|
+
const idSourceMapCode = 'instance-engine-source-map-code';
|
|
244
|
+
const idSourceCellX = 'instance-engine-source-cell-x';
|
|
245
|
+
const idSourceCellY = 'instance-engine-source-cell-y';
|
|
246
|
+
const idTargetMapCode = 'instance-engine-target-map-code';
|
|
247
|
+
const idTargetCellX = 'instance-engine-target-cell-x';
|
|
248
|
+
const idTargetCellY = 'instance-engine-target-cell-y';
|
|
249
|
+
const idFilterSource = 'instance-engine-filter-source';
|
|
250
|
+
const idFilterTarget = 'instance-engine-filter-target';
|
|
251
|
+
const idSpawnMapCode = 'instance-engine-spawn-map-code';
|
|
252
|
+
const idSpawnCellX = 'instance-engine-spawn-cell-x';
|
|
253
|
+
const idSpawnCellY = 'instance-engine-spawn-cell-y';
|
|
254
|
+
const idSpawnRandom = 'instance-engine-spawn-random';
|
|
255
|
+
const idAoiRadius = 'instance-engine-aoi-radius';
|
|
256
|
+
|
|
257
|
+
InstanceEngineCyberia.currentInstanceId = null;
|
|
258
|
+
InstanceEngineCyberia.currentThumbnailId = null;
|
|
259
|
+
InstanceEngineCyberia.thumbnailDirty = false;
|
|
260
|
+
InstanceEngineCyberia.portals = [];
|
|
261
|
+
|
|
262
|
+
const getInstancePayload = () => {
|
|
263
|
+
const tagsRaw = s(`.${idTags}`)?.value || '';
|
|
264
|
+
const tags = tagsRaw
|
|
265
|
+
.split(',')
|
|
266
|
+
.map((t) => t.trim())
|
|
267
|
+
.filter((t) => t);
|
|
268
|
+
const cyberiaMapCodes = DropDown.Tokens[idMapCodesDropdown]?.value
|
|
269
|
+
? [...DropDown.Tokens[idMapCodesDropdown].value]
|
|
270
|
+
: [];
|
|
271
|
+
const itemIds = InstanceEngineCyberia.getSelectedItemIds().map((id) => ({
|
|
272
|
+
id,
|
|
273
|
+
defaultPlayerInventory: !!InstanceEngineCyberia.itemInventoryFlags[id],
|
|
274
|
+
}));
|
|
275
|
+
const payload = {
|
|
276
|
+
code: s(`.${idCode}`)?.value || '',
|
|
277
|
+
name: s(`.${idName}`)?.value || '',
|
|
278
|
+
description: s(`.${idDescription}`)?.value || '',
|
|
279
|
+
tags,
|
|
280
|
+
status: DropDown.Tokens[idStatus]?.value || 'unlisted',
|
|
281
|
+
cyberiaMapCodes,
|
|
282
|
+
itemIds,
|
|
283
|
+
portals: InstanceEngineCyberia.portals,
|
|
284
|
+
playerSpawn: {
|
|
285
|
+
sourceMapCode: s(`.${idSpawnMapCode}`)?.value?.trim() || '',
|
|
286
|
+
sourceCellX: parseInt(s(`.${idSpawnCellX}`)?.value) || 0,
|
|
287
|
+
sourceCellY: parseInt(s(`.${idSpawnCellY}`)?.value) || 0,
|
|
288
|
+
random: !!s(`.${idSpawnRandom}`)?.checked,
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
if (InstanceEngineCyberia.currentThumbnailId) payload.thumbnail = InstanceEngineCyberia.currentThumbnailId;
|
|
292
|
+
return payload;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
// AOI radius lives on the linked CyberiaInstanceConf (auto-upserted on
|
|
296
|
+
// instance save). Fetch / update it by instanceCode so the engine can edit
|
|
297
|
+
// it alongside instance identity without touching the rest of the conf.
|
|
298
|
+
const fetchConfByCode = async (instanceCode) => {
|
|
299
|
+
if (!instanceCode) return null;
|
|
300
|
+
const res = await CyberiaInstanceConfService.get({
|
|
301
|
+
filterModel: { instanceCode: { filterType: 'text', type: 'equals', filter: instanceCode } },
|
|
302
|
+
});
|
|
303
|
+
return res?.data?.data?.[0] || null;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
const persistAoiRadius = async (instanceCode) => {
|
|
307
|
+
const raw = s(`.${idAoiRadius}`)?.value;
|
|
308
|
+
if (raw === undefined || raw === '') return;
|
|
309
|
+
const aoiRadius = parseFloat(raw);
|
|
310
|
+
if (!Number.isFinite(aoiRadius)) return;
|
|
311
|
+
const conf = await fetchConfByCode(instanceCode);
|
|
312
|
+
if (conf?._id) await CyberiaInstanceConfService.put({ id: conf._id, body: { aoiRadius } });
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
const persistInstance = async ({ notify = true } = {}) => {
|
|
316
|
+
// Upload thumbnail file only if user selected a new one
|
|
317
|
+
const thumbnailInput = s(`.${idThumbnail}`);
|
|
318
|
+
if (
|
|
319
|
+
InstanceEngineCyberia.thumbnailDirty &&
|
|
320
|
+
thumbnailInput &&
|
|
321
|
+
thumbnailInput.files &&
|
|
322
|
+
thumbnailInput.files.length > 0
|
|
323
|
+
) {
|
|
324
|
+
const formData = new FormData();
|
|
325
|
+
formData.append('file', thumbnailInput.files[0]);
|
|
326
|
+
const uploadResult = await FileService.post({ body: formData });
|
|
327
|
+
if (uploadResult.status === 'success' && uploadResult.data && uploadResult.data.length > 0) {
|
|
328
|
+
InstanceEngineCyberia.currentThumbnailId = uploadResult.data[0]._id;
|
|
329
|
+
} else {
|
|
330
|
+
if (notify) {
|
|
331
|
+
NotificationManager.Push({
|
|
332
|
+
html: uploadResult.message || 'Failed to upload thumbnail',
|
|
333
|
+
status: 'error',
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
return uploadResult;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
const body = getInstancePayload();
|
|
341
|
+
const isUpdate = !!InstanceEngineCyberia.currentInstanceId;
|
|
342
|
+
let result;
|
|
343
|
+
if (isUpdate) {
|
|
344
|
+
result = await CyberiaInstanceService.put({ id: InstanceEngineCyberia.currentInstanceId, body });
|
|
345
|
+
} else {
|
|
346
|
+
result = await CyberiaInstanceService.post({ body });
|
|
347
|
+
}
|
|
348
|
+
if (notify) {
|
|
349
|
+
NotificationManager.Push({
|
|
350
|
+
html:
|
|
351
|
+
result.status === 'error'
|
|
352
|
+
? result.message
|
|
353
|
+
: isUpdate
|
|
354
|
+
? Translate.instance('success-update-item')
|
|
355
|
+
: Translate.instance('success-create-item'),
|
|
356
|
+
status: result.status,
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
if (result.status === 'success') {
|
|
360
|
+
if (result.data?._id) InstanceEngineCyberia.currentInstanceId = result.data._id;
|
|
361
|
+
// The conf is auto-upserted on instance save; persist the AOI radius onto
|
|
362
|
+
// it now that we know the instance code resolves to a conf document.
|
|
363
|
+
await persistAoiRadius(body.code);
|
|
364
|
+
await DefaultManagement.loadTable(managementId, { force: true, reload: true });
|
|
365
|
+
}
|
|
366
|
+
return result;
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
const saveInstance = async () => {
|
|
370
|
+
await persistInstance({ notify: true });
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
const loadInstance = async (instanceData) => {
|
|
374
|
+
InstanceEngineCyberia.currentInstanceId = instanceData._id || null;
|
|
375
|
+
if (s(`.${idCode}`)) s(`.${idCode}`).value = instanceData.code || '';
|
|
376
|
+
if (s(`.${idName}`)) s(`.${idName}`).value = instanceData.name || '';
|
|
377
|
+
if (s(`.${idDescription}`)) s(`.${idDescription}`).value = instanceData.description || '';
|
|
378
|
+
if (s(`.${idTags}`)) s(`.${idTags}`).value = (instanceData.tags || []).join(', ');
|
|
379
|
+
const statusValue = instanceData.status || 'unlisted';
|
|
380
|
+
if (DropDown.Tokens[idStatus]) {
|
|
381
|
+
const statusIndex = statusOptions.findIndex((opt) => opt.value === statusValue);
|
|
382
|
+
if (statusIndex > -1) s(`.dropdown-option-${idStatus}-${statusIndex}`).click();
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// Thumbnail
|
|
386
|
+
InstanceEngineCyberia.currentThumbnailId = instanceData.thumbnail || null;
|
|
387
|
+
const thumbnailPreview = s(`.instance-engine-thumbnail-preview`);
|
|
388
|
+
if (InstanceEngineCyberia.currentThumbnailId) {
|
|
389
|
+
const thumbId =
|
|
390
|
+
typeof InstanceEngineCyberia.currentThumbnailId === 'object'
|
|
391
|
+
? InstanceEngineCyberia.currentThumbnailId._id
|
|
392
|
+
: InstanceEngineCyberia.currentThumbnailId;
|
|
393
|
+
|
|
394
|
+
// Set preview image
|
|
395
|
+
if (thumbnailPreview) {
|
|
396
|
+
thumbnailPreview.innerHTML = html`<img
|
|
397
|
+
src="${getApiBaseUrl({ id: thumbId, endpoint: 'file/blob' })}"
|
|
398
|
+
style="max-width:120px;max-height:120px;border:1px solid #555;"
|
|
399
|
+
onerror="this.style.display='none';"
|
|
400
|
+
/>`;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
// Populate InputFile with the actual file from server
|
|
404
|
+
if (s(`.${idThumbnail}`)) {
|
|
405
|
+
const fileData = await getFileFromBlobEndpoint({ _id: thumbId, mimetype: 'image/png' });
|
|
406
|
+
if (fileData) {
|
|
407
|
+
const dataTransfer = new DataTransfer();
|
|
408
|
+
dataTransfer.items.add(fileData);
|
|
409
|
+
s(`.${idThumbnail}`).files = dataTransfer.files;
|
|
410
|
+
s(`.${idThumbnail}`).onchange({ target: s(`.${idThumbnail}`) });
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
InstanceEngineCyberia.thumbnailDirty = false;
|
|
414
|
+
} else {
|
|
415
|
+
if (thumbnailPreview) thumbnailPreview.innerHTML = '';
|
|
416
|
+
if (s(`.${idThumbnail}`)) {
|
|
417
|
+
s(`.${idThumbnail}`).value = '';
|
|
418
|
+
s(`.${idThumbnail}`).onchange({ target: s(`.${idThumbnail}`) });
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// Creator display
|
|
423
|
+
const creatorDisplay = s(`.instance-engine-creator-display`);
|
|
424
|
+
if (creatorDisplay) {
|
|
425
|
+
if (instanceData.creator) {
|
|
426
|
+
const creatorUsername =
|
|
427
|
+
typeof instanceData.creator === 'object'
|
|
428
|
+
? instanceData.creator.username || instanceData.creator._id
|
|
429
|
+
: instanceData.creator;
|
|
430
|
+
creatorDisplay.innerHTML = html`<span style="font-family:monospace;font-size:12px;"
|
|
431
|
+
>${creatorUsername}</span
|
|
432
|
+
>`;
|
|
433
|
+
} else {
|
|
434
|
+
creatorDisplay.innerHTML = html`<span style="color:#888;font-size:12px;">—</span>`;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// Load cyberiaMapCodes into the dropdown
|
|
439
|
+
if (DropDown.Tokens[idMapCodesDropdown]) {
|
|
440
|
+
DropDown.Tokens[idMapCodesDropdown].oncheckvalues = {};
|
|
441
|
+
const mapCodes = instanceData.cyberiaMapCodes || [];
|
|
442
|
+
for (const code of mapCodes) {
|
|
443
|
+
const key = code.trim().replaceAll(' ', '-');
|
|
444
|
+
DropDown.Tokens[idMapCodesDropdown].oncheckvalues[key] = { data: code, display: code, value: code };
|
|
445
|
+
}
|
|
446
|
+
DropDown.Tokens[idMapCodesDropdown].value = mapCodes;
|
|
447
|
+
if (s(`.${idMapCodesDropdown}`)) s(`.${idMapCodesDropdown}`).value = mapCodes;
|
|
448
|
+
if (s(`.dropdown-current-${idMapCodesDropdown}`)) {
|
|
449
|
+
DropDown.Tokens[idMapCodesDropdown]._renderSelectedBadges?.();
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
InstanceEngineCyberia.syncItemIdsDropdownSelection(instanceData.itemIds || instanceData.itemsId || []);
|
|
454
|
+
|
|
455
|
+
// Load portals
|
|
456
|
+
InstanceEngineCyberia.portals = (instanceData.portals || []).map((p) => ({
|
|
457
|
+
sourceMapCode: p.sourceMapCode || '',
|
|
458
|
+
sourceCellX: p.sourceCellX || 0,
|
|
459
|
+
sourceCellY: p.sourceCellY || 0,
|
|
460
|
+
targetMapCode: p.targetMapCode || '',
|
|
461
|
+
targetCellX: p.targetCellX || 0,
|
|
462
|
+
targetCellY: p.targetCellY || 0,
|
|
463
|
+
portalMode: p.portalMode || 'inter-portal',
|
|
464
|
+
}));
|
|
465
|
+
InstanceEngineCyberia.renderPortalList(portalListId);
|
|
466
|
+
|
|
467
|
+
// Player spawn (instance-level).
|
|
468
|
+
const spawn = instanceData.playerSpawn || {};
|
|
469
|
+
if (s(`.${idSpawnMapCode}`)) s(`.${idSpawnMapCode}`).value = spawn.sourceMapCode || '';
|
|
470
|
+
if (s(`.${idSpawnCellX}`)) s(`.${idSpawnCellX}`).value = spawn.sourceCellX ?? 0;
|
|
471
|
+
if (s(`.${idSpawnCellY}`)) s(`.${idSpawnCellY}`).value = spawn.sourceCellY ?? 0;
|
|
472
|
+
if (s(`.${idSpawnRandom}`)) s(`.${idSpawnRandom}`).checked = !!spawn.random;
|
|
473
|
+
|
|
474
|
+
// AOI radius (lives on the linked conf, fetched by instance code).
|
|
475
|
+
const conf = await fetchConfByCode(instanceData.code);
|
|
476
|
+
if (s(`.${idAoiRadius}`)) s(`.${idAoiRadius}`).value = conf?.aoiRadius ?? '';
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
const resetForm = () => {
|
|
480
|
+
InstanceEngineCyberia.currentInstanceId = null;
|
|
481
|
+
InstanceEngineCyberia.currentThumbnailId = null;
|
|
482
|
+
InstanceEngineCyberia.thumbnailDirty = false;
|
|
483
|
+
if (s(`.${idCode}`)) s(`.${idCode}`).value = '';
|
|
484
|
+
if (s(`.${idName}`)) s(`.${idName}`).value = '';
|
|
485
|
+
if (s(`.${idDescription}`)) s(`.${idDescription}`).value = '';
|
|
486
|
+
if (s(`.${idTags}`)) s(`.${idTags}`).value = '';
|
|
487
|
+
if (DropDown.Tokens[idStatus]) {
|
|
488
|
+
const resetIndex = statusOptions.findIndex((opt) => opt.value === 'unlisted');
|
|
489
|
+
if (resetIndex > -1) s(`.dropdown-option-${idStatus}-${resetIndex}`).click();
|
|
490
|
+
}
|
|
491
|
+
const thumbnailPreview = s(`.instance-engine-thumbnail-preview`);
|
|
492
|
+
if (thumbnailPreview) thumbnailPreview.innerHTML = '';
|
|
493
|
+
if (s(`.${idThumbnail}`)) {
|
|
494
|
+
s(`.${idThumbnail}`).value = '';
|
|
495
|
+
s(`.${idThumbnail}`).onchange({ target: s(`.${idThumbnail}`) });
|
|
496
|
+
}
|
|
497
|
+
const creatorDisplay = s(`.instance-engine-creator-display`);
|
|
498
|
+
if (creatorDisplay) creatorDisplay.innerHTML = '<span style="color:#888;font-size:12px;">—</span>';
|
|
499
|
+
if (DropDown.Tokens[idMapCodesDropdown]) {
|
|
500
|
+
DropDown.Tokens[idMapCodesDropdown].oncheckvalues = {};
|
|
501
|
+
DropDown.Tokens[idMapCodesDropdown].value = [];
|
|
502
|
+
htmls(`.dropdown-current-${idMapCodesDropdown}`, '');
|
|
503
|
+
htmls(`.${idMapCodesDropdown}-render-container`, '');
|
|
504
|
+
}
|
|
505
|
+
if (DropDown.Tokens[idItemIdsDropdown]) {
|
|
506
|
+
DropDown.Tokens[idItemIdsDropdown].oncheckvalues = {};
|
|
507
|
+
DropDown.Tokens[idItemIdsDropdown].value = [];
|
|
508
|
+
htmls(`.dropdown-current-${idItemIdsDropdown}`, '');
|
|
509
|
+
htmls(`.${idItemIdsDropdown}-render-container`, '');
|
|
510
|
+
}
|
|
511
|
+
InstanceEngineCyberia.itemInventoryFlags = {};
|
|
512
|
+
InstanceEngineCyberia.renderItemInventoryList();
|
|
513
|
+
InstanceEngineCyberia.portals = [];
|
|
514
|
+
InstanceEngineCyberia.renderPortalList(portalListId);
|
|
515
|
+
if (s(`.${idSpawnMapCode}`)) s(`.${idSpawnMapCode}`).value = '';
|
|
516
|
+
if (s(`.${idSpawnCellX}`)) s(`.${idSpawnCellX}`).value = 0;
|
|
517
|
+
if (s(`.${idSpawnCellY}`)) s(`.${idSpawnCellY}`).value = 0;
|
|
518
|
+
if (s(`.${idSpawnRandom}`)) s(`.${idSpawnRandom}`).checked = false;
|
|
519
|
+
if (s(`.${idAoiRadius}`)) s(`.${idAoiRadius}`).value = '';
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
setTimeout(() => {
|
|
523
|
+
if (s(`.btn-instance-engine-save`)) s(`.btn-instance-engine-save`).onclick = () => saveInstance();
|
|
524
|
+
if (s(`.btn-instance-engine-new`)) s(`.btn-instance-engine-new`).onclick = () => resetForm();
|
|
525
|
+
|
|
526
|
+
if (s(`.btn-instance-engine-toggle-thumbnail`))
|
|
527
|
+
s(`.btn-instance-engine-toggle-thumbnail`).onclick = () => {
|
|
528
|
+
const body = s(`.instance-engine-thumbnail-body`);
|
|
529
|
+
const caret = s(`.instance-engine-thumbnail-caret`);
|
|
530
|
+
if (body) body.classList.toggle('hide');
|
|
531
|
+
if (caret) {
|
|
532
|
+
caret.classList.toggle('fa-caret-right');
|
|
533
|
+
caret.classList.toggle('fa-caret-down');
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
// Hot reload — trigger a world rebuild on a running cyberia-server.
|
|
538
|
+
if (s(`.btn-instance-engine-toggle-hot-reload`))
|
|
539
|
+
s(`.btn-instance-engine-toggle-hot-reload`).onclick = () => {
|
|
540
|
+
const body = s(`.instance-engine-hot-reload-body`);
|
|
541
|
+
const caret = s(`.instance-engine-hot-reload-caret`);
|
|
542
|
+
if (body) body.classList.toggle('hide');
|
|
543
|
+
if (caret) {
|
|
544
|
+
caret.classList.toggle('fa-caret-right');
|
|
545
|
+
caret.classList.toggle('fa-caret-down');
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
const triggerHotReload = async (mode) => {
|
|
550
|
+
const buttons = [s(`.btn-instance-engine-hot-reload`), s(`.btn-instance-engine-hot-reload-incremental`)];
|
|
551
|
+
const statusSelector = `.instance-engine-hot-reload-status`;
|
|
552
|
+
const serverUrl = s(`.${idHotReloadUrl}`)?.value?.trim();
|
|
553
|
+
if (!serverUrl) {
|
|
554
|
+
NotificationManager.Push({ html: 'Set the cyberia-server URL first.', status: 'warning' });
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
// The server rejects a trigger aimed at a different instance, so the
|
|
558
|
+
// instance must exist before it can be named.
|
|
559
|
+
const persistResult = await persistInstance({ notify: false });
|
|
560
|
+
if (!persistResult || persistResult.status !== 'success' || !InstanceEngineCyberia.currentInstanceId) {
|
|
561
|
+
NotificationManager.Push({
|
|
562
|
+
html: persistResult?.message || Translate.instance('save-instance-first') || 'Save the instance first.',
|
|
563
|
+
status: persistResult?.status === 'error' ? 'error' : 'warning',
|
|
564
|
+
});
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
for (const btn of buttons) if (btn) btn.disabled = true;
|
|
569
|
+
if (s(statusSelector))
|
|
570
|
+
htmls(statusSelector, html`<span style="color:#888;">Triggering ${mode} hot reload…</span>`);
|
|
571
|
+
try {
|
|
572
|
+
const result = await CyberiaInstanceService.hotReload({
|
|
573
|
+
id: InstanceEngineCyberia.currentInstanceId,
|
|
574
|
+
body: { serverUrl, mode },
|
|
575
|
+
});
|
|
576
|
+
if (result.status === 'error') {
|
|
577
|
+
NotificationManager.Push({ html: result.message, status: 'error' });
|
|
578
|
+
if (s(statusSelector)) htmls(statusSelector, html`<span style="color:#d66;">${result.message}</span>`);
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
const { transport, durationMs, message, grpcError } = result.data || {};
|
|
582
|
+
NotificationManager.Push({ html: `Hot reload via ${transport}: ${message}`, status: 'success' });
|
|
583
|
+
if (s(statusSelector))
|
|
584
|
+
htmls(
|
|
585
|
+
statusSelector,
|
|
586
|
+
html`<span style="color:#6b6;">via <b>${transport}</b> · ${durationMs}ms · ${message}</span>${grpcError
|
|
587
|
+
? html`<div style="color:#a80;">gRPC unavailable: ${grpcError}</div>`
|
|
588
|
+
: ''}`,
|
|
589
|
+
);
|
|
590
|
+
} catch (error) {
|
|
591
|
+
NotificationManager.Push({ html: error.message, status: 'error' });
|
|
592
|
+
if (s(statusSelector)) htmls(statusSelector, html`<span style="color:#d66;">${error.message}</span>`);
|
|
593
|
+
} finally {
|
|
594
|
+
for (const btn of buttons) if (btn) btn.disabled = false;
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
if (s(`.btn-instance-engine-hot-reload`))
|
|
599
|
+
s(`.btn-instance-engine-hot-reload`).onclick = () => triggerHotReload('full');
|
|
600
|
+
if (s(`.btn-instance-engine-hot-reload-incremental`))
|
|
601
|
+
s(`.btn-instance-engine-hot-reload-incremental`).onclick = () => triggerHotReload('incremental');
|
|
602
|
+
|
|
603
|
+
// Portal management
|
|
604
|
+
if (s(`.btn-instance-engine-portal-connect`))
|
|
605
|
+
s(`.btn-instance-engine-portal-connect`).onclick = async () => {
|
|
606
|
+
const btn = s(`.btn-instance-engine-portal-connect`);
|
|
607
|
+
if (btn) btn.disabled = true;
|
|
608
|
+
try {
|
|
609
|
+
const persistResult = await persistInstance({ notify: false });
|
|
610
|
+
if (!persistResult || persistResult.status !== 'success' || !InstanceEngineCyberia.currentInstanceId) {
|
|
611
|
+
NotificationManager.Push({
|
|
612
|
+
html: persistResult?.message || Translate.instance('save-instance-first') || 'Save the instance first.',
|
|
613
|
+
status: persistResult?.status === 'error' ? 'error' : 'warning',
|
|
614
|
+
});
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
const result = await CyberiaInstanceService.portalConnect({ id: InstanceEngineCyberia.currentInstanceId });
|
|
618
|
+
if (result.status === 'error') {
|
|
619
|
+
NotificationManager.Push({ html: result.message, status: 'error' });
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
const { portals: generated, topology, message } = result.data || {};
|
|
623
|
+
if (!generated || generated.length === 0) {
|
|
624
|
+
NotificationManager.Push({
|
|
625
|
+
html: message || 'No portals could be generated.',
|
|
626
|
+
status: 'warning',
|
|
627
|
+
});
|
|
628
|
+
return;
|
|
629
|
+
}
|
|
630
|
+
// Replace all portals with the centralized topology output
|
|
631
|
+
// (ring + random behavior for remaining unassigned portals)
|
|
632
|
+
InstanceEngineCyberia.portals = generated.map((p) => ({
|
|
633
|
+
sourceMapCode: p.sourceMapCode || '',
|
|
634
|
+
sourceCellX: p.sourceCellX || 0,
|
|
635
|
+
sourceCellY: p.sourceCellY || 0,
|
|
636
|
+
targetMapCode: p.targetMapCode || '',
|
|
637
|
+
targetCellX: p.targetCellX || 0,
|
|
638
|
+
targetCellY: p.targetCellY || 0,
|
|
639
|
+
portalMode: p.portalMode || 'inter-portal',
|
|
640
|
+
}));
|
|
641
|
+
InstanceEngineCyberia.renderPortalList(portalListId);
|
|
642
|
+
NotificationManager.Push({
|
|
643
|
+
html: `${topology} — ${generated.length} portal(s) generated.`,
|
|
644
|
+
status: 'success',
|
|
645
|
+
});
|
|
646
|
+
} catch (e) {
|
|
647
|
+
NotificationManager.Push({ html: e.message, status: 'error' });
|
|
648
|
+
} finally {
|
|
649
|
+
if (btn) btn.disabled = false;
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
if (s(`.btn-instance-engine-add-portal`))
|
|
654
|
+
s(`.btn-instance-engine-add-portal`).onclick = () => {
|
|
655
|
+
const portal = {
|
|
656
|
+
sourceMapCode: s(`.${idSourceMapCode}`)?.value || '',
|
|
657
|
+
sourceCellX: parseInt(s(`.${idSourceCellX}`)?.value) || 0,
|
|
658
|
+
sourceCellY: parseInt(s(`.${idSourceCellY}`)?.value) || 0,
|
|
659
|
+
targetMapCode: s(`.${idTargetMapCode}`)?.value || '',
|
|
660
|
+
targetCellX: parseInt(s(`.${idTargetCellX}`)?.value) || 0,
|
|
661
|
+
targetCellY: parseInt(s(`.${idTargetCellY}`)?.value) || 0,
|
|
662
|
+
portalMode: 'inter-portal',
|
|
663
|
+
};
|
|
664
|
+
InstanceEngineCyberia.portals.push(portal);
|
|
665
|
+
InstanceEngineCyberia.renderPortalList(portalListId);
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
if (s('.btn-instance-engine-toggle-portal-filter'))
|
|
669
|
+
s('.btn-instance-engine-toggle-portal-filter').onclick = () => {
|
|
670
|
+
const body = s('.instance-engine-portal-filter-body');
|
|
671
|
+
const caret = s('.instance-engine-portal-filter-caret');
|
|
672
|
+
if (body) body.classList.toggle('hide');
|
|
673
|
+
if (caret) {
|
|
674
|
+
caret.classList.toggle('fa-caret-right');
|
|
675
|
+
caret.classList.toggle('fa-caret-down');
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
let portalFilterTimeout = null;
|
|
680
|
+
const applyPortalFilter = () => {
|
|
681
|
+
clearTimeout(portalFilterTimeout);
|
|
682
|
+
portalFilterTimeout = setTimeout(() => {
|
|
683
|
+
InstanceEngineCyberia.renderPortalList(portalListId);
|
|
684
|
+
}, 300);
|
|
685
|
+
};
|
|
686
|
+
[idFilterSource, idFilterTarget].forEach((cls) => {
|
|
687
|
+
if (s(`.${cls}`)) s(`.${cls}`).addEventListener('input', applyPortalFilter);
|
|
688
|
+
});
|
|
689
|
+
|
|
690
|
+
if (s('.btn-instance-engine-clear-portal-filter'))
|
|
691
|
+
s('.btn-instance-engine-clear-portal-filter').onclick = () => {
|
|
692
|
+
[idFilterSource, idFilterTarget].forEach((cls) => {
|
|
693
|
+
if (s(`.${cls}`)) s(`.${cls}`).value = '';
|
|
694
|
+
});
|
|
695
|
+
InstanceEngineCyberia.renderPortalList(portalListId);
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
// Keep the per-item "Default Player Inventory" toggles in sync with the
|
|
699
|
+
// item-ids dropdown. Every add/remove/clear re-renders the dropdown badge
|
|
700
|
+
// container, so observing it is a reliable change hook (the dropdown
|
|
701
|
+
// exposes no onChange callback).
|
|
702
|
+
const itemBadgeContainer = s(`.dropdown-current-${idItemIdsDropdown}`);
|
|
703
|
+
if (itemBadgeContainer) {
|
|
704
|
+
const itemInventoryObserver = new MutationObserver(() => {
|
|
705
|
+
InstanceEngineCyberia.renderItemInventoryList();
|
|
706
|
+
});
|
|
707
|
+
itemInventoryObserver.observe(itemBadgeContainer, { childList: true, subtree: true });
|
|
708
|
+
}
|
|
709
|
+
InstanceEngineCyberia.renderItemInventoryList();
|
|
710
|
+
|
|
711
|
+
ThemeEvents['instance-engine-theme'] = () => {
|
|
712
|
+
InstanceEngineCyberia.renderPortalList(portalListId);
|
|
713
|
+
};
|
|
714
|
+
});
|
|
715
|
+
|
|
716
|
+
const statusOptions = [
|
|
717
|
+
{ value: 'unlisted', display: 'unlisted', data: 'unlisted', onClick: () => {} },
|
|
718
|
+
{ value: 'draft', display: 'draft', data: 'draft', onClick: () => {} },
|
|
719
|
+
{ value: 'published', display: 'published', data: 'published', onClick: () => {} },
|
|
720
|
+
{ value: 'archived', display: 'archived', data: 'archived', onClick: () => {} },
|
|
721
|
+
];
|
|
722
|
+
|
|
723
|
+
const managementTableHtml = await CyberiaInstanceManagement.instance({
|
|
724
|
+
idModal: managementId,
|
|
725
|
+
loadInstanceCallback: loadInstance,
|
|
726
|
+
appStore,
|
|
727
|
+
readyRowDataEvent: {
|
|
728
|
+
'instance-engine-check-deleted': (rowData) => {
|
|
729
|
+
if (InstanceEngineCyberia.currentInstanceId) {
|
|
730
|
+
const stillExists = rowData.some((row) => row._id === InstanceEngineCyberia.currentInstanceId);
|
|
731
|
+
if (!stillExists) InstanceEngineCyberia.currentInstanceId = null;
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
},
|
|
735
|
+
});
|
|
736
|
+
|
|
737
|
+
const dcFields = 'instance-engine-dc-fields';
|
|
738
|
+
const dcMetaFields = 'instance-engine-dc-meta';
|
|
739
|
+
const dcSaveNew = 'instance-engine-dc-save-new';
|
|
740
|
+
const dcPortalSource = 'instance-engine-dc-portal-source';
|
|
741
|
+
const dcPortalTarget = 'instance-engine-dc-portal-target';
|
|
742
|
+
const dcPortalFilter = 'instance-engine-dc-portal-filter';
|
|
743
|
+
const dcSpawn = 'instance-engine-dc-spawn';
|
|
744
|
+
|
|
745
|
+
return html`<div class="in section-mp instance-engine-container">
|
|
746
|
+
${dynamicCol({ containerSelector: 'instance-engine-container', id: dcFields, type: 'search-inputs' })}
|
|
747
|
+
<div class="fl">
|
|
748
|
+
<div class="in fll ${dcFields}-col-a">
|
|
749
|
+
${await Input.instance({
|
|
750
|
+
id: idCode,
|
|
751
|
+
label: html`Code`,
|
|
752
|
+
containerClass: 'inl',
|
|
753
|
+
type: 'text',
|
|
754
|
+
})}
|
|
755
|
+
</div>
|
|
756
|
+
<div class="in fll ${dcFields}-col-b">
|
|
757
|
+
${await Input.instance({
|
|
758
|
+
id: idName,
|
|
759
|
+
label: html`Name`,
|
|
760
|
+
containerClass: 'inl',
|
|
761
|
+
type: 'text',
|
|
762
|
+
})}
|
|
763
|
+
</div>
|
|
764
|
+
<div class="in fll ${dcFields}-col-c">
|
|
765
|
+
${await Input.instance({
|
|
766
|
+
id: idDescription,
|
|
767
|
+
label: html`Description`,
|
|
768
|
+
containerClass: 'inl',
|
|
769
|
+
type: 'text',
|
|
770
|
+
})}
|
|
771
|
+
</div>
|
|
772
|
+
</div>
|
|
773
|
+
${dynamicCol({ containerSelector: 'instance-engine-container', id: dcMetaFields, type: 'search-inputs' })}
|
|
774
|
+
<div class="fl">
|
|
775
|
+
<div class="in fll ${dcMetaFields}-col-a">
|
|
776
|
+
${await Input.instance({
|
|
777
|
+
id: idTags,
|
|
778
|
+
label: html`Tags (comma separated)`,
|
|
779
|
+
containerClass: 'inl',
|
|
780
|
+
type: 'text',
|
|
781
|
+
})}
|
|
782
|
+
</div>
|
|
783
|
+
<div class="in fll ${dcMetaFields}-col-b">
|
|
784
|
+
${await DropDown.instance({
|
|
785
|
+
id: idStatus,
|
|
786
|
+
label: html`Status`,
|
|
787
|
+
data: statusOptions.map((opt) => ({ ...opt })),
|
|
788
|
+
value: 'unlisted',
|
|
789
|
+
containerClass: 'inl',
|
|
790
|
+
})}
|
|
791
|
+
</div>
|
|
792
|
+
<div class="in fll ${dcMetaFields}-col-c">
|
|
793
|
+
<div class="inl">
|
|
794
|
+
<div class="in input-label">Creator</div>
|
|
795
|
+
<div class="in instance-engine-creator-display">
|
|
796
|
+
<span style="color:#888;font-size:12px;">—</span>
|
|
797
|
+
</div>
|
|
798
|
+
</div>
|
|
799
|
+
</div>
|
|
800
|
+
</div>
|
|
801
|
+
<div class="in section-mp" style="margin-top: 5px;">
|
|
802
|
+
<div class="in instance-engine-thumbnail-preview" style="margin-bottom: 5px;"></div>
|
|
803
|
+
${await BtnIcon.instance({
|
|
804
|
+
class: 'wfa btn-instance-engine-toggle-thumbnail',
|
|
805
|
+
label: html`<i class="fa-solid fa-caret-right instance-engine-thumbnail-caret"></i> Thumbnail`,
|
|
806
|
+
})}
|
|
807
|
+
<div class="in instance-engine-thumbnail-body hide">
|
|
808
|
+
${await InputFile.instance(
|
|
809
|
+
{
|
|
810
|
+
id: idThumbnail,
|
|
811
|
+
multiple: false,
|
|
812
|
+
extensionsAccept: ['image/png', 'image/jpeg'],
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
change: (e) => {
|
|
816
|
+
const file = e.target.files[0];
|
|
817
|
+
if (file) {
|
|
818
|
+
InstanceEngineCyberia.thumbnailDirty = true;
|
|
819
|
+
const url = URL.createObjectURL(file);
|
|
820
|
+
const preview = s('.instance-engine-thumbnail-preview');
|
|
821
|
+
if (preview)
|
|
822
|
+
preview.innerHTML = html`<img
|
|
823
|
+
src="${url}"
|
|
824
|
+
class="in"
|
|
825
|
+
style="max-width:300px;height:auto;border:1px solid #555;margin:auto"
|
|
826
|
+
/>`;
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
clear: () => {
|
|
830
|
+
InstanceEngineCyberia.thumbnailDirty = true;
|
|
831
|
+
InstanceEngineCyberia.currentThumbnailId = null;
|
|
832
|
+
const preview = s('.instance-engine-thumbnail-preview');
|
|
833
|
+
if (preview) preview.innerHTML = '';
|
|
834
|
+
},
|
|
835
|
+
},
|
|
836
|
+
)}
|
|
837
|
+
</div>
|
|
838
|
+
</div>
|
|
839
|
+
<div class="in section-mp" style="margin-top: 10px;">
|
|
840
|
+
${await DropDown.instance({
|
|
841
|
+
id: idMapCodesDropdown,
|
|
842
|
+
label: html`Cyberia Map Codes`,
|
|
843
|
+
data: [],
|
|
844
|
+
type: 'checkbox',
|
|
845
|
+
containerClass: 'inl',
|
|
846
|
+
excludeSelected: true,
|
|
847
|
+
serviceProvider: async (q) => {
|
|
848
|
+
const result = await CyberiaMapService.searchCodes({ q });
|
|
849
|
+
if (result.status === 'success' && result.data?.codes) {
|
|
850
|
+
return result.data.codes.map((code) => ({
|
|
851
|
+
value: code,
|
|
852
|
+
display: code,
|
|
853
|
+
data: code,
|
|
854
|
+
onClick: () => {},
|
|
855
|
+
}));
|
|
856
|
+
}
|
|
857
|
+
return [];
|
|
858
|
+
},
|
|
859
|
+
})}
|
|
860
|
+
</div>
|
|
861
|
+
<div class="in section-mp" style="margin-top: 10px;">${await InstanceEngineCyberia.buildItemIdsDropdown()}</div>
|
|
862
|
+
<div class="in section-mp" style="margin-top: 5px;">
|
|
863
|
+
<div class="in input-label" style="font-size:13px;margin-bottom:5px;">Default Player Inventory</div>
|
|
864
|
+
<div class="in ${InstanceEngineCyberia.itemInventoryListId}" style="max-height:200px;overflow-y:auto;"></div>
|
|
865
|
+
</div>
|
|
866
|
+
<div class="in section-mp" style="margin-top: 10px;">
|
|
867
|
+
<div class="in input-label" style="font-size:14px;margin-bottom:5px;">Portals</div>
|
|
868
|
+
${dynamicCol({ containerSelector: 'instance-engine-container', id: dcPortalSource, type: 'search-inputs' })}
|
|
869
|
+
<div class="fl">
|
|
870
|
+
<div class="in fll ${dcPortalSource}-col-a">
|
|
871
|
+
${await Input.instance({
|
|
872
|
+
id: idSourceMapCode,
|
|
873
|
+
label: html`Source Map Code`,
|
|
874
|
+
containerClass: 'inl',
|
|
875
|
+
type: 'text',
|
|
876
|
+
})}
|
|
877
|
+
</div>
|
|
878
|
+
<div class="in fll ${dcPortalSource}-col-b">
|
|
879
|
+
${await Input.instance({
|
|
880
|
+
id: idSourceCellX,
|
|
881
|
+
label: html`Source Cell X`,
|
|
882
|
+
containerClass: 'inl',
|
|
883
|
+
type: 'number',
|
|
884
|
+
min: 0,
|
|
885
|
+
value: 0,
|
|
886
|
+
})}
|
|
887
|
+
</div>
|
|
888
|
+
<div class="in fll ${dcPortalSource}-col-c">
|
|
889
|
+
${await Input.instance({
|
|
890
|
+
id: idSourceCellY,
|
|
891
|
+
label: html`Source Cell Y`,
|
|
892
|
+
containerClass: 'inl',
|
|
893
|
+
type: 'number',
|
|
894
|
+
min: 0,
|
|
895
|
+
value: 0,
|
|
896
|
+
})}
|
|
897
|
+
</div>
|
|
898
|
+
</div>
|
|
899
|
+
${dynamicCol({ containerSelector: 'instance-engine-container', id: dcPortalTarget, type: 'search-inputs' })}
|
|
900
|
+
<div class="fl">
|
|
901
|
+
<div class="in fll ${dcPortalTarget}-col-a">
|
|
902
|
+
${await Input.instance({
|
|
903
|
+
id: idTargetMapCode,
|
|
904
|
+
label: html`Target Map Code`,
|
|
905
|
+
containerClass: 'inl',
|
|
906
|
+
type: 'text',
|
|
907
|
+
})}
|
|
908
|
+
</div>
|
|
909
|
+
<div class="in fll ${dcPortalTarget}-col-b">
|
|
910
|
+
${await Input.instance({
|
|
911
|
+
id: idTargetCellX,
|
|
912
|
+
label: html`Target Cell X`,
|
|
913
|
+
containerClass: 'inl',
|
|
914
|
+
type: 'number',
|
|
915
|
+
min: 0,
|
|
916
|
+
value: 0,
|
|
917
|
+
})}
|
|
918
|
+
</div>
|
|
919
|
+
<div class="in fll ${dcPortalTarget}-col-c">
|
|
920
|
+
${await Input.instance({
|
|
921
|
+
id: idTargetCellY,
|
|
922
|
+
label: html`Target Cell Y`,
|
|
923
|
+
containerClass: 'inl',
|
|
924
|
+
type: 'number',
|
|
925
|
+
min: 0,
|
|
926
|
+
value: 0,
|
|
927
|
+
})}
|
|
928
|
+
</div>
|
|
929
|
+
</div>
|
|
930
|
+
<div class="in" style="display:flex;gap:5px;flex-wrap:wrap;">
|
|
931
|
+
${await BtnIcon.instance({
|
|
932
|
+
class: 'wfa btn-instance-engine-add-portal',
|
|
933
|
+
label: html`<i class="fa-solid fa-plus"></i> Add Portal`,
|
|
934
|
+
})}
|
|
935
|
+
${await BtnIcon.instance({
|
|
936
|
+
class: 'wfa btn-instance-engine-portal-connect',
|
|
937
|
+
label: html`<i class="fa-solid fa-circle-nodes"></i> Portal Connector`,
|
|
938
|
+
})}
|
|
939
|
+
</div>
|
|
940
|
+
<div class="in" style="margin-top: 10px;">
|
|
941
|
+
${await BtnIcon.instance({
|
|
942
|
+
class: 'wfa btn-instance-engine-toggle-portal-filter',
|
|
943
|
+
label: html`<i class="fa-solid fa-caret-right instance-engine-portal-filter-caret"></i> Filters`,
|
|
944
|
+
})}
|
|
945
|
+
<div class="in instance-engine-portal-filter-body hide">
|
|
946
|
+
${dynamicCol({ containerSelector: 'instance-engine-container', id: dcPortalFilter, type: 'a-50-b-50' })}
|
|
947
|
+
<div class="fl">
|
|
948
|
+
<div class="in fll ${dcPortalFilter}-col-a">
|
|
949
|
+
${await Input.instance({
|
|
950
|
+
id: idFilterSource,
|
|
951
|
+
label: html`Source Map Code`,
|
|
952
|
+
containerClass: 'inl',
|
|
953
|
+
type: 'text',
|
|
954
|
+
placeholder: true,
|
|
955
|
+
})}
|
|
956
|
+
</div>
|
|
957
|
+
<div class="in fll ${dcPortalFilter}-col-b">
|
|
958
|
+
${await Input.instance({
|
|
959
|
+
id: idFilterTarget,
|
|
960
|
+
label: html`Target Map Code`,
|
|
961
|
+
containerClass: 'inl',
|
|
962
|
+
type: 'text',
|
|
963
|
+
placeholder: true,
|
|
964
|
+
})}
|
|
965
|
+
</div>
|
|
966
|
+
</div>
|
|
967
|
+
<div class="in" style="margin-top:5px;">
|
|
968
|
+
${await BtnIcon.instance({
|
|
969
|
+
class: 'wfa btn-instance-engine-clear-portal-filter',
|
|
970
|
+
label: html`<i class="fa-solid fa-broom"></i> Clear Filters`,
|
|
971
|
+
})}
|
|
972
|
+
</div>
|
|
973
|
+
</div>
|
|
974
|
+
</div>
|
|
975
|
+
<div class="in ${portalListId}" style="margin-top: 10px; max-height: 200px; overflow-y: auto;"></div>
|
|
976
|
+
</div>
|
|
977
|
+
<div class="in section-mp" style="margin-top: 10px;">
|
|
978
|
+
<div class="in input-label" style="font-size:14px;margin-bottom:5px;">Player Spawn & World</div>
|
|
979
|
+
<div class="in" style="font-size:12px;color:#888;margin-bottom:6px;">
|
|
980
|
+
Fixed spawn places every new player at the cell below. Enable Random (or leave the map code blank) to spawn at
|
|
981
|
+
a random walkable cell on a random map.
|
|
982
|
+
</div>
|
|
983
|
+
${dynamicCol({ containerSelector: 'instance-engine-container', id: dcSpawn, type: 'search-inputs' })}
|
|
984
|
+
<div class="fl">
|
|
985
|
+
<div class="in fll ${dcSpawn}-col-a">
|
|
986
|
+
${await Input.instance({
|
|
987
|
+
id: idSpawnMapCode,
|
|
988
|
+
label: html`Spawn Map Code`,
|
|
989
|
+
containerClass: 'inl',
|
|
990
|
+
type: 'text',
|
|
991
|
+
})}
|
|
992
|
+
</div>
|
|
993
|
+
<div class="in fll ${dcSpawn}-col-b">
|
|
994
|
+
${await Input.instance({
|
|
995
|
+
id: idSpawnCellX,
|
|
996
|
+
label: html`Spawn Cell X`,
|
|
997
|
+
containerClass: 'inl',
|
|
998
|
+
type: 'number',
|
|
999
|
+
min: 0,
|
|
1000
|
+
value: 0,
|
|
1001
|
+
})}
|
|
1002
|
+
</div>
|
|
1003
|
+
<div class="in fll ${dcSpawn}-col-c">
|
|
1004
|
+
${await Input.instance({
|
|
1005
|
+
id: idSpawnCellY,
|
|
1006
|
+
label: html`Spawn Cell Y`,
|
|
1007
|
+
containerClass: 'inl',
|
|
1008
|
+
type: 'number',
|
|
1009
|
+
min: 0,
|
|
1010
|
+
value: 0,
|
|
1011
|
+
})}
|
|
1012
|
+
</div>
|
|
1013
|
+
</div>
|
|
1014
|
+
<div class="in" style="margin-top:6px;">
|
|
1015
|
+
<label style="font-size:13px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;">
|
|
1016
|
+
<input class="${idSpawnRandom}" type="checkbox" style="cursor:pointer;" /> Random spawn (ignore the fixed
|
|
1017
|
+
cell)
|
|
1018
|
+
</label>
|
|
1019
|
+
</div>
|
|
1020
|
+
<div class="in" style="margin-top:10px;">
|
|
1021
|
+
${await Input.instance({
|
|
1022
|
+
id: idAoiRadius,
|
|
1023
|
+
label: html`AOI Radius (cells)`,
|
|
1024
|
+
containerClass: 'inl',
|
|
1025
|
+
type: 'number',
|
|
1026
|
+
min: 1,
|
|
1027
|
+
})}
|
|
1028
|
+
</div>
|
|
1029
|
+
</div>
|
|
1030
|
+
${canMutate
|
|
1031
|
+
? html`<div class="in section-mp" style="margin-top: 10px;">
|
|
1032
|
+
${await BtnIcon.instance({
|
|
1033
|
+
class: 'wfa btn-instance-engine-toggle-hot-reload',
|
|
1034
|
+
label: html`<i class="fa-solid fa-caret-right instance-engine-hot-reload-caret"></i> Hot Reload`,
|
|
1035
|
+
})}
|
|
1036
|
+
<div class="in instance-engine-hot-reload-body hide">
|
|
1037
|
+
<div class="in" style="color:#888;font-size:12px;margin:5px 0;">
|
|
1038
|
+
Rebuilds the world of a running cyberia-server for this instance now, instead of waiting for its polling
|
|
1039
|
+
interval. Tries the gRPC control service first and falls back to the REST endpoint. For a multi-instance
|
|
1040
|
+
deployment, append the variant sub-path so the trigger reaches the right world (e.g.
|
|
1041
|
+
<code>https://server.cyberiaonline.com/FOREST</code>); the default world uses the bare origin.
|
|
1042
|
+
</div>
|
|
1043
|
+
${await Input.instance({
|
|
1044
|
+
id: idHotReloadUrl,
|
|
1045
|
+
label: html`<i class="fa-solid fa-server"></i> Cyberia Server URL`,
|
|
1046
|
+
containerClass: 'in',
|
|
1047
|
+
placeholder: 'https://server.cyberiaonline.com/FOREST',
|
|
1048
|
+
type: 'text',
|
|
1049
|
+
})}
|
|
1050
|
+
<div class="in" style="display:flex;gap:5px;flex-wrap:wrap;margin-top:5px;">
|
|
1051
|
+
${await BtnIcon.instance({
|
|
1052
|
+
class: 'wfa btn-instance-engine-hot-reload',
|
|
1053
|
+
label: html`<i class="fa-solid fa-rotate"></i> Trigger Hot Reload`,
|
|
1054
|
+
})}
|
|
1055
|
+
${await BtnIcon.instance({
|
|
1056
|
+
class: 'wfa btn-instance-engine-hot-reload-incremental',
|
|
1057
|
+
label: html`<i class="fa-solid fa-layer-group"></i> Incremental (assets only)`,
|
|
1058
|
+
})}
|
|
1059
|
+
</div>
|
|
1060
|
+
<div class="in instance-engine-hot-reload-status" style="margin-top:5px;font-size:12px;"></div>
|
|
1061
|
+
</div>
|
|
1062
|
+
</div>`
|
|
1063
|
+
: ''}
|
|
1064
|
+
<div class="in section-mp" style="margin-top: 10px;">
|
|
1065
|
+
${dynamicCol({ containerSelector: 'instance-engine-container', id: dcSaveNew, type: 'a-50-b-50' })}
|
|
1066
|
+
<div class="fl">
|
|
1067
|
+
${canMutate
|
|
1068
|
+
? html`<div class="in fll ${dcSaveNew}-col-a" style="padding: 5px;">
|
|
1069
|
+
${await BtnIcon.instance({
|
|
1070
|
+
class: 'wfa btn-instance-engine-save',
|
|
1071
|
+
label: html`<i class="fa-solid fa-floppy-disk"></i> Save Instance`,
|
|
1072
|
+
})}
|
|
1073
|
+
</div>`
|
|
1074
|
+
: ''}
|
|
1075
|
+
<div class="in fll ${dcSaveNew}-col-b" style="padding: 5px;">
|
|
1076
|
+
${await BtnIcon.instance({
|
|
1077
|
+
class: 'wfa btn-instance-engine-new',
|
|
1078
|
+
label: html`<i class="fa-solid fa-file"></i> New Instance`,
|
|
1079
|
+
})}
|
|
1080
|
+
</div>
|
|
1081
|
+
</div>
|
|
1082
|
+
<div class="in" style="margin-top: 10px;">${managementTableHtml}</div>
|
|
1083
|
+
</div>
|
|
1084
|
+
</div>`;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
export { InstanceEngineCyberia };
|