@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,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transport Layer Security (TLS) / SSL utilities and HTTPS server creation and management.
|
|
3
|
+
* @module src/server/tls.js
|
|
4
|
+
* @namespace UnderpostTLS
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import fs from 'fs-extra';
|
|
8
|
+
import https from 'https';
|
|
9
|
+
import path from 'path';
|
|
10
|
+
import { loggerFactory } from './logger.js';
|
|
11
|
+
|
|
12
|
+
const logger = loggerFactory(import.meta);
|
|
13
|
+
|
|
14
|
+
const DEFAULT_HOST = 'localhost';
|
|
15
|
+
const SSL_BASE = (host = DEFAULT_HOST) => path.resolve(`./engine-private/ssl/${host}`);
|
|
16
|
+
|
|
17
|
+
// Common filename candidates for certs/keys produced by various tools (mkcert, certbot, openssl scripts).
|
|
18
|
+
const CERT_CANDIDATES = [
|
|
19
|
+
'fullchain.pem',
|
|
20
|
+
'cert.pem',
|
|
21
|
+
'ca_bundle.crt',
|
|
22
|
+
'crt.crt',
|
|
23
|
+
`${DEFAULT_HOST}.pem`,
|
|
24
|
+
`${DEFAULT_HOST}.crt`,
|
|
25
|
+
`${DEFAULT_HOST}-fullchain.pem`,
|
|
26
|
+
];
|
|
27
|
+
const KEY_CANDIDATES = [
|
|
28
|
+
'privkey.pem',
|
|
29
|
+
'key.key',
|
|
30
|
+
'private.key',
|
|
31
|
+
'key.pem',
|
|
32
|
+
`${DEFAULT_HOST}-key.pem`,
|
|
33
|
+
`${DEFAULT_HOST}.key`,
|
|
34
|
+
];
|
|
35
|
+
const ROOT_CANDIDATES = ['rootCA.pem', 'ca.pem', 'ca.crt', 'root.pem'];
|
|
36
|
+
|
|
37
|
+
class TLS {
|
|
38
|
+
/**
|
|
39
|
+
* Look for existing SSL files under engine-private/ssl/<host> and return canonical paths.
|
|
40
|
+
* It attempts to be permissive: accepts cert-only, cert+ca, or fullchain.
|
|
41
|
+
* @param {string} host
|
|
42
|
+
* @returns {{key?:string, cert?:string, fullchain?:string, ca?:string, dir:string}}
|
|
43
|
+
* @memberof UnderpostTLS
|
|
44
|
+
*/
|
|
45
|
+
static locateSslFiles(host = DEFAULT_HOST) {
|
|
46
|
+
const dir = SSL_BASE(host);
|
|
47
|
+
const result = { dir };
|
|
48
|
+
|
|
49
|
+
if (!fs.existsSync(dir)) {
|
|
50
|
+
logger.warn('SSL dir does not exist', { dir });
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// find key
|
|
55
|
+
for (const name of KEY_CANDIDATES) {
|
|
56
|
+
const p = path.join(dir, name);
|
|
57
|
+
if (fs.existsSync(p) && fs.statSync(p).isFile()) {
|
|
58
|
+
result.key = p;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// find fullchain first
|
|
64
|
+
for (const name of CERT_CANDIDATES) {
|
|
65
|
+
const p = path.join(dir, name);
|
|
66
|
+
if (fs.existsSync(p) && fs.statSync(p).isFile()) {
|
|
67
|
+
// treat fullchain.pem / ca_bundle.crt as fullchain if name indicates so
|
|
68
|
+
if (
|
|
69
|
+
['fullchain.pem', 'ca_bundle.crt', `${host}-fullchain.pem`].includes(name) ||
|
|
70
|
+
name.endsWith('fullchain.pem')
|
|
71
|
+
) {
|
|
72
|
+
result.fullchain = p;
|
|
73
|
+
result.cert = p; // fullchain will be used as cert when building context
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
// otherwise candidate may be leaf cert
|
|
77
|
+
if (!result.cert) result.cert = p;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// find root/ca if not using fullchain
|
|
82
|
+
if (!result.fullchain) {
|
|
83
|
+
// check for direct ca bundle (cert + ca combined) names
|
|
84
|
+
const caCandidates = ROOT_CANDIDATES.concat(['ca_bundle.crt']);
|
|
85
|
+
for (const name of caCandidates) {
|
|
86
|
+
const p = path.join(dir, name);
|
|
87
|
+
if (fs.existsSync(p) && fs.statSync(p).isFile()) {
|
|
88
|
+
result.ca = p;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// if no dedicated ca found but cert looks like leaf and there is separate ca under other known names,
|
|
93
|
+
// try to detect cert + ca in a single file (not trivial) — we prefer explicit ca
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Validate that a secure context can be built for host (key + cert or fullchain present)
|
|
101
|
+
* @param {string} host
|
|
102
|
+
* @returns {boolean}
|
|
103
|
+
* @memberof UnderpostTLS
|
|
104
|
+
*/
|
|
105
|
+
static validateSecureContext(host = DEFAULT_HOST) {
|
|
106
|
+
const files = TLS.locateSslFiles(host);
|
|
107
|
+
return Boolean((files.key && files.cert) || (files.key && files.fullchain));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Build a Node.js https.createServer options object (key, cert, ca) for the given host.
|
|
112
|
+
* If a fullchain is available it will be used for cert and ca will be omitted (fullchain already includes chain).
|
|
113
|
+
* If separate cert + ca are found, they will be used accordingly.
|
|
114
|
+
* @param {string} host
|
|
115
|
+
* @returns {{key:string, cert:string, ca?:string}} options
|
|
116
|
+
* @memberof UnderpostTLS
|
|
117
|
+
*/
|
|
118
|
+
static buildSecureContext(host = DEFAULT_HOST) {
|
|
119
|
+
const files = TLS.locateSslFiles(host);
|
|
120
|
+
if (!files.key) throw new Error(`SSL key not found for host ${host} (looked in ${files.dir})`);
|
|
121
|
+
if (!files.cert) throw new Error(`SSL certificate not found for host ${host} (looked in ${files.dir})`);
|
|
122
|
+
|
|
123
|
+
const key = fs.readFileSync(files.key, 'utf8');
|
|
124
|
+
const cert = fs.readFileSync(files.cert, 'utf8');
|
|
125
|
+
|
|
126
|
+
// If we have a root CA file (explicit) and cert is leaf-only, include ca
|
|
127
|
+
if (files.ca && files.ca !== files.cert) {
|
|
128
|
+
const ca = fs.readFileSync(files.ca, 'utf8');
|
|
129
|
+
return { key, cert, ca };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// If cert is fullchain (already contains chain), just return key/cert
|
|
133
|
+
return { key, cert };
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Convenience: ensure default host directory exists and copy any matching cert/key files into it using canonical names.
|
|
138
|
+
* This is useful if your generator produced nonstandard names and you want to normalize them.
|
|
139
|
+
* The function will copy existing discovered files to: key.key, crt.crt, ca_bundle.crt when possible.
|
|
140
|
+
* @param {string} host
|
|
141
|
+
* @returns {boolean} true if at least key+cert exist after operation
|
|
142
|
+
* @memberof UnderpostTLS
|
|
143
|
+
*/
|
|
144
|
+
static async buildLocalSSL(host = DEFAULT_HOST) {
|
|
145
|
+
const dir = SSL_BASE(host);
|
|
146
|
+
await fs.ensureDir(dir);
|
|
147
|
+
const files = TLS.locateSslFiles(host);
|
|
148
|
+
|
|
149
|
+
// If key+cert already exist under canonical names, done
|
|
150
|
+
const canonicalKey = path.join(dir, 'key.key');
|
|
151
|
+
const canonicalCert = path.join(dir, 'crt.crt');
|
|
152
|
+
const canonicalCa = path.join(dir, 'ca_bundle.crt');
|
|
153
|
+
|
|
154
|
+
try {
|
|
155
|
+
if (files.key && files.key !== canonicalKey) await fs.copy(files.key, canonicalKey, { overwrite: true });
|
|
156
|
+
if (files.cert && files.cert !== canonicalCert) await fs.copy(files.cert, canonicalCert, { overwrite: true });
|
|
157
|
+
if (files.ca && files.ca !== canonicalCa) await fs.copy(files.ca, canonicalCa, { overwrite: true });
|
|
158
|
+
|
|
159
|
+
// If we had a fullchain but not a separate ca, write fullchain also to ca_bundle if missing
|
|
160
|
+
if (files.fullchain && !fs.existsSync(canonicalCa)) {
|
|
161
|
+
await fs.copy(files.fullchain, canonicalCa, { overwrite: false });
|
|
162
|
+
}
|
|
163
|
+
} catch (err) {
|
|
164
|
+
logger.warn('buildLocalSSL copy step failed', { err: err.message });
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return TLS.validateSecureContext(host);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Create an HTTPS server (first host) and/or attach SNI contexts for additional hosts.
|
|
172
|
+
* hosts param is an object whose keys are hostnames (e.g. { 'localhost': {...} }).
|
|
173
|
+
* Returns the created https.Server instance (or undefined if none created).
|
|
174
|
+
* @param {import('express').Application} app
|
|
175
|
+
* @param {Object<string, any>} hosts
|
|
176
|
+
* @returns {{ServerSSL?: https.Server}}
|
|
177
|
+
* @memberof UnderpostTLS
|
|
178
|
+
*/
|
|
179
|
+
static async createSslServer(app, hosts = { [DEFAULT_HOST]: {} }) {
|
|
180
|
+
let server;
|
|
181
|
+
for (const host of Object.keys(hosts)) {
|
|
182
|
+
// ensure canonical files exist (copies where possible)
|
|
183
|
+
await TLS.buildLocalSSL(host);
|
|
184
|
+
if (!TLS.validateSecureContext(host)) {
|
|
185
|
+
logger.error('Invalid SSL context, skipping host', { host });
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// build secure context options
|
|
190
|
+
try {
|
|
191
|
+
const ctx = TLS.buildSecureContext(host);
|
|
192
|
+
if (!server) {
|
|
193
|
+
server = https.createServer(ctx, app);
|
|
194
|
+
logger.info('Created HTTPS server for host', { host });
|
|
195
|
+
} else {
|
|
196
|
+
server.addContext(host, ctx);
|
|
197
|
+
logger.info('Added SNI context for host', { host });
|
|
198
|
+
}
|
|
199
|
+
} catch (err) {
|
|
200
|
+
logger.error('Failed to build secure context', { host, message: err.message });
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return { ServerSSL: server };
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Middleware that redirects HTTP -> HTTPS in production for recognized hosts.
|
|
209
|
+
* Skips ACME challenge paths.
|
|
210
|
+
* @param {import('express').Request} req
|
|
211
|
+
* @param {import('express').Response} res
|
|
212
|
+
* @param {number} port
|
|
213
|
+
* @param {Object<string, any>} proxyRouter
|
|
214
|
+
* @returns {import('express').RequestHandler}
|
|
215
|
+
* @memberof UnderpostTLS
|
|
216
|
+
*/
|
|
217
|
+
static sslRedirectMiddleware(req, res, port = 80, proxyRouter = {}) {
|
|
218
|
+
const sslRedirectUrl = `https://${req.headers.host}${req.url}`;
|
|
219
|
+
if (
|
|
220
|
+
process.env.NODE_ENV === 'production' &&
|
|
221
|
+
port !== 443 &&
|
|
222
|
+
!req.secure &&
|
|
223
|
+
!req.url.startsWith('/.well-known/acme-challenge') &&
|
|
224
|
+
proxyRouter[443] &&
|
|
225
|
+
Object.keys(proxyRouter[443]).find((host) => {
|
|
226
|
+
const [hostSSL] = host.split('/');
|
|
227
|
+
return sslRedirectUrl.match(hostSSL) && TLS.validateSecureContext(hostSSL);
|
|
228
|
+
})
|
|
229
|
+
) {
|
|
230
|
+
return res.status(302).redirect(sslRedirectUrl);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @class UnderpostTLS
|
|
237
|
+
* @description TLS/SSL utilities for Underpost.
|
|
238
|
+
* @memberof UnderpostTLS
|
|
239
|
+
*/
|
|
240
|
+
class UnderpostTLS {
|
|
241
|
+
static API = {
|
|
242
|
+
TLS,
|
|
243
|
+
SSL_BASE,
|
|
244
|
+
locateSslFiles: TLS.locateSslFiles,
|
|
245
|
+
validateSecureContext: TLS.validateSecureContext,
|
|
246
|
+
buildSecureContext: TLS.buildSecureContext,
|
|
247
|
+
buildLocalSSL: TLS.buildLocalSSL,
|
|
248
|
+
createSslServer: TLS.createSslServer,
|
|
249
|
+
sslRedirectMiddleware: TLS.sslRedirectMiddleware,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export { TLS, SSL_BASE, UnderpostTLS };
|
|
254
|
+
export default UnderpostTLS;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Valkey connection and key-value store module.
|
|
3
|
+
*
|
|
4
|
+
* Responsibilities:
|
|
5
|
+
* - Manage per-instance Valkey connections keyed by `${host}${path}`.
|
|
6
|
+
* - Provide a thin, typed CRUD surface: get / set / del / update.
|
|
7
|
+
* - Expose connection status helpers.
|
|
8
|
+
*
|
|
9
|
+
* Out of scope: domain model factories, DTO projection — those belong in
|
|
10
|
+
* their respective service modules (e.g. guest.service.js).
|
|
11
|
+
*
|
|
12
|
+
* @module src/server/valkey.js
|
|
13
|
+
* @namespace ValkeyService
|
|
14
|
+
*/
|
|
15
|
+
import Valkey from 'iovalkey';
|
|
16
|
+
import { loggerFactory } from './logger.js';
|
|
17
|
+
import Underpost from '../index.js';
|
|
18
|
+
|
|
19
|
+
const logger = loggerFactory(import.meta);
|
|
20
|
+
|
|
21
|
+
// ─── Instance registry ────────────────────────────────────────────────────────
|
|
22
|
+
|
|
23
|
+
/** @type {Record<string, import('iovalkey').default>} */
|
|
24
|
+
const ValkeyInstances = {};
|
|
25
|
+
|
|
26
|
+
/** @type {Record<string, 'connected' | 'reconnecting' | 'error'>} */
|
|
27
|
+
const ValkeyStatus = {};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Derives the registry key from an instance descriptor.
|
|
31
|
+
* @param {{ host?: string, path?: string }} opts
|
|
32
|
+
* @returns {string}
|
|
33
|
+
*/
|
|
34
|
+
const _instanceKey = (opts = {}) => `${opts.host || ''}${opts.path || ''}`;
|
|
35
|
+
|
|
36
|
+
// ─── Connection ───────────────────────────────────────────────────────────────
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Returns true when at least one Valkey instance is connected.
|
|
40
|
+
* @returns {boolean}
|
|
41
|
+
* @memberof ValkeyService
|
|
42
|
+
*/
|
|
43
|
+
const isValkeyEnable = () => Object.values(ValkeyStatus).some((s) => s === 'connected');
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Creates a Valkey client for the given instance and waits for connectivity.
|
|
47
|
+
* Throws on connection failure — callers decide whether to abort or continue
|
|
48
|
+
* without Valkey.
|
|
49
|
+
*
|
|
50
|
+
* @param {{ host?: string, path?: string }} instance - Registry key descriptor.
|
|
51
|
+
* @param {{ host?: string, port?: number }} connectionOptions - iovalkey connection options.
|
|
52
|
+
* @returns {Promise<import('iovalkey').default>}
|
|
53
|
+
* @memberof ValkeyService
|
|
54
|
+
*/
|
|
55
|
+
const createValkeyConnection = async (instance = {}, connectionOptions = {}) => {
|
|
56
|
+
const key = _instanceKey(instance);
|
|
57
|
+
|
|
58
|
+
const client = new Valkey({
|
|
59
|
+
port: connectionOptions.port ?? undefined,
|
|
60
|
+
host: connectionOptions.host ?? undefined,
|
|
61
|
+
// Retry indefinitely with capped exponential backoff (1 s → 30 s)
|
|
62
|
+
retryStrategy: (attempt) => Math.min(attempt * 1000, 30000),
|
|
63
|
+
// Fail commands immediately when not connected; do NOT queue them
|
|
64
|
+
maxRetriesPerRequest: 0,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
client.on('ready', () => {
|
|
68
|
+
ValkeyStatus[key] = 'connected';
|
|
69
|
+
logger.info('Valkey connected', { instance });
|
|
70
|
+
});
|
|
71
|
+
client.on('error', (err) => {
|
|
72
|
+
ValkeyStatus[key] = 'error';
|
|
73
|
+
logger.error('Valkey error', { err: err?.message, instance });
|
|
74
|
+
if (Underpost.env.isInsideContainer()) Underpost.env.set('container-status', 'error');
|
|
75
|
+
});
|
|
76
|
+
client.on('reconnecting', () => {
|
|
77
|
+
ValkeyStatus[key] = 'reconnecting';
|
|
78
|
+
logger.warn('Valkey reconnecting...', { instance });
|
|
79
|
+
});
|
|
80
|
+
client.on('end', () => {
|
|
81
|
+
ValkeyStatus[key] = 'error';
|
|
82
|
+
logger.warn('Valkey connection ended', { instance });
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
// Verify connectivity with a probe before marking ready
|
|
86
|
+
await Promise.race([
|
|
87
|
+
(async () => {
|
|
88
|
+
try {
|
|
89
|
+
const probe = `__vk_probe_${Date.now()}`;
|
|
90
|
+
await client.set(probe, '1');
|
|
91
|
+
await client.get(probe);
|
|
92
|
+
await client.del(probe);
|
|
93
|
+
ValkeyStatus[key] = 'connected';
|
|
94
|
+
} catch {
|
|
95
|
+
ValkeyStatus[key] = 'error';
|
|
96
|
+
}
|
|
97
|
+
})(),
|
|
98
|
+
new Promise((resolve) => setTimeout(resolve, 1500)),
|
|
99
|
+
]);
|
|
100
|
+
|
|
101
|
+
ValkeyInstances[key] = client;
|
|
102
|
+
logger.info('Valkey instance registered', { key, status: ValkeyStatus[key] });
|
|
103
|
+
return client;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// ─── Internal client resolver ─────────────────────────────────────────────────
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Resolves the connected client for an instance or throws.
|
|
110
|
+
* @param {{ host?: string, path?: string }} options
|
|
111
|
+
* @returns {import('iovalkey').default}
|
|
112
|
+
*/
|
|
113
|
+
const _client = (options) => {
|
|
114
|
+
const k = _instanceKey(options);
|
|
115
|
+
const client = ValkeyInstances[k];
|
|
116
|
+
if (!client || ValkeyStatus[k] !== 'connected') {
|
|
117
|
+
throw new Error(`Valkey instance not connected: ${k}`);
|
|
118
|
+
}
|
|
119
|
+
return client;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
// ─── CRUD ─────────────────────────────────────────────────────────────────────
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Retrieves and JSON-parses a value by key.
|
|
126
|
+
* Returns null when the key does not exist.
|
|
127
|
+
*
|
|
128
|
+
* @param {{ host?: string, path?: string }} options
|
|
129
|
+
* @param {string} key
|
|
130
|
+
* @returns {Promise<object | string | null>}
|
|
131
|
+
* @memberof ValkeyService
|
|
132
|
+
*/
|
|
133
|
+
const get = async (options, key) => {
|
|
134
|
+
const raw = await _client(options).get(key);
|
|
135
|
+
if (raw == null) return null;
|
|
136
|
+
try {
|
|
137
|
+
return JSON.parse(raw);
|
|
138
|
+
} catch {
|
|
139
|
+
return raw;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Serialises and stores a value by key.
|
|
145
|
+
* Pass `ttlMs` to set an expiry in milliseconds.
|
|
146
|
+
*
|
|
147
|
+
* @param {{ host?: string, path?: string }} options
|
|
148
|
+
* @param {string} key
|
|
149
|
+
* @param {object | string} payload
|
|
150
|
+
* @param {number} [ttlMs]
|
|
151
|
+
* @returns {Promise<string>} Resolves to 'OK'.
|
|
152
|
+
* @memberof ValkeyService
|
|
153
|
+
*/
|
|
154
|
+
const set = async (options, key, payload, ttlMs) => {
|
|
155
|
+
const value = typeof payload === 'string' ? payload : JSON.stringify(payload);
|
|
156
|
+
if (ttlMs) return _client(options).set(key, value, 'PX', ttlMs);
|
|
157
|
+
return _client(options).set(key, value);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Deletes a key.
|
|
162
|
+
*
|
|
163
|
+
* @param {{ host?: string, path?: string }} options
|
|
164
|
+
* @param {string} key
|
|
165
|
+
* @returns {Promise<number>}
|
|
166
|
+
* @memberof ValkeyService
|
|
167
|
+
*/
|
|
168
|
+
const del = async (options, key) => _client(options).del(key);
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Shallow-merges `payload` into the existing object stored at `key`
|
|
172
|
+
* and persists the result. The `updatedAt` timestamp is refreshed automatically.
|
|
173
|
+
*
|
|
174
|
+
* @param {{ host?: string, path?: string }} options
|
|
175
|
+
* @param {string} key
|
|
176
|
+
* @param {object} payload
|
|
177
|
+
* @returns {Promise<string>} Resolves to 'OK'.
|
|
178
|
+
* @memberof ValkeyService
|
|
179
|
+
*/
|
|
180
|
+
const update = async (options, key, payload) => {
|
|
181
|
+
const base = (await get(options, key)) ?? {};
|
|
182
|
+
return set(options, key, { ...base, ...payload, updatedAt: new Date().toISOString() });
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
// ─── Public API class ─────────────────────────────────────────────────────────
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Namespace grouping all Valkey operations.
|
|
189
|
+
* @memberof ValkeyService
|
|
190
|
+
*/
|
|
191
|
+
class ValkeyAPI {
|
|
192
|
+
/** @param {{ host?: string, path?: string }} options */
|
|
193
|
+
static isConnected = (options) => ValkeyStatus[_instanceKey(options)] === 'connected';
|
|
194
|
+
static get = get;
|
|
195
|
+
static set = set;
|
|
196
|
+
static del = del;
|
|
197
|
+
static update = update;
|
|
198
|
+
static createValkeyConnection = createValkeyConnection;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export { isValkeyEnable, createValkeyConnection, get, set, del, update, ValkeyAPI };
|
package/src/server.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// https://nodejs.org/api
|
|
4
|
+
// https://expressjs.com/en/4x/api.html
|
|
5
|
+
|
|
6
|
+
import dotenv from 'dotenv';
|
|
7
|
+
import { loggerFactory } from './server/logger.js';
|
|
8
|
+
import { buildClient } from './client-builder/client-build.js';
|
|
9
|
+
import { buildRuntime } from './server/runtime.js';
|
|
10
|
+
import { ProcessController } from './server/process.js';
|
|
11
|
+
import { Config } from './server/conf.js';
|
|
12
|
+
|
|
13
|
+
dotenv.config();
|
|
14
|
+
|
|
15
|
+
await Config.build();
|
|
16
|
+
|
|
17
|
+
const logger = loggerFactory(import.meta);
|
|
18
|
+
|
|
19
|
+
await logger.setUpInfo();
|
|
20
|
+
|
|
21
|
+
if (process.env.NODE_ENV === 'development') await buildClient();
|
|
22
|
+
|
|
23
|
+
await buildRuntime();
|
|
24
|
+
|
|
25
|
+
ProcessController.init(logger);
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module for creating and managing WebSocket channels.
|
|
3
|
+
* @module src/ws/IoInterface.js
|
|
4
|
+
* @namespace SocketIoInterface
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { loggerFactory } from '../server/logger.js';
|
|
8
|
+
import { Socket } from 'socket.io';
|
|
9
|
+
|
|
10
|
+
const logger = loggerFactory(import.meta);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Defines the structure for a WebSocket channel's behavior functions.
|
|
14
|
+
* @typedef {Object} ChannelInterface
|
|
15
|
+
* @property {string} channel - The name of the channel.
|
|
16
|
+
* @property {function(Socket, Object.<string, Socket>, string): Promise<void>} [connection] - Handler on client connection.
|
|
17
|
+
* @property {function(Socket, Object.<string, Socket>, any, string, any[]): Promise<void>} [controller] - Handler for incoming channel messages.
|
|
18
|
+
* @property {function(Socket, Object.<string, Socket>, string, string): Promise<void>} [disconnect] - Handler on client disconnection.
|
|
19
|
+
* @property {boolean} [stream=false] - Whether the channel should treat the message as a raw stream (no JSON parsing).
|
|
20
|
+
* @memberof SocketIoInterface
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Manages the logic, client map, and event listeners for a specific WebSocket channel,
|
|
25
|
+
* ensuring robust message handling and lifecycle management.
|
|
26
|
+
* @class IoChannel
|
|
27
|
+
* @memberof SocketIoInterface
|
|
28
|
+
*/
|
|
29
|
+
class IoChannel {
|
|
30
|
+
/**
|
|
31
|
+
* @method
|
|
32
|
+
* @type {ChannelInterface}
|
|
33
|
+
*/
|
|
34
|
+
#IoInterface;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Map of connected sockets for this channel, keyed by socket ID.
|
|
38
|
+
* @type {Object.<string, Socket>}
|
|
39
|
+
*/
|
|
40
|
+
client = {};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Creates an instance of IoChannel.
|
|
44
|
+
* @param {ChannelInterface} IoInterface - The interface object defining the channel's behavior.
|
|
45
|
+
*/
|
|
46
|
+
constructor(IoInterface) {
|
|
47
|
+
this.#IoInterface = {
|
|
48
|
+
channel: '',
|
|
49
|
+
connection: async (socket = {}, client = {}, hostKeyContext = '') => { },
|
|
50
|
+
controller: async (socket = {}, client = {}, payload = {}, hostKeyContext = '', args = []) => { },
|
|
51
|
+
disconnect: async (socket = {}, client = {}, reason = '', hostKeyContext = '') => { },
|
|
52
|
+
stream: false,
|
|
53
|
+
...IoInterface,
|
|
54
|
+
};
|
|
55
|
+
logger.debug(`Channel instance created for: ${this.channel}`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Gets the name of the channel.
|
|
60
|
+
* @returns {string} The channel name.
|
|
61
|
+
*/
|
|
62
|
+
get channel() {
|
|
63
|
+
return this.#IoInterface.channel;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Handles a new socket connection for this channel.
|
|
68
|
+
* Sets up the listener for the channel message.
|
|
69
|
+
*
|
|
70
|
+
* @param {Socket} socket - The Socket.IO socket object.
|
|
71
|
+
* @param {string} hostKeyContext - Unique identifier for the WebSocket management context.
|
|
72
|
+
* @returns {Promise<void>}
|
|
73
|
+
*/
|
|
74
|
+
async connection(socket, hostKeyContext) {
|
|
75
|
+
try {
|
|
76
|
+
this.client[socket.id] = socket;
|
|
77
|
+
// Use bind/arrow function to maintain 'this' context for the controller
|
|
78
|
+
socket.on(this.channel, (...args) => this.controller(socket, args, hostKeyContext));
|
|
79
|
+
await this.#IoInterface.connection(socket, this.client, hostKeyContext);
|
|
80
|
+
logger.debug(`Socket ${socket.id} connected to channel ${this.channel}`);
|
|
81
|
+
} catch (error) {
|
|
82
|
+
logger.error(error, { channel: this.channel, hostKeyContext, stack: error.stack });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Handles incoming messages on the channel.
|
|
88
|
+
*
|
|
89
|
+
* @method
|
|
90
|
+
* @param {Socket} socket - The Socket.IO socket object.
|
|
91
|
+
* @param {any[]} args - The raw arguments received from the socket event.
|
|
92
|
+
* @param {string} hostKeyContext - Unique identifier for the WebSocket management context.
|
|
93
|
+
* @returns {Promise<void>}
|
|
94
|
+
*/
|
|
95
|
+
async controller(socket, args, hostKeyContext) {
|
|
96
|
+
try {
|
|
97
|
+
if (!args || args.length === 0) {
|
|
98
|
+
logger.warn(`No arguments received for channel: ${this.channel}`, { socketId: socket.id });
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
// Determine if JSON parsing is needed based on the stream flag
|
|
102
|
+
const payload = this.#IoInterface.stream ? args[0] : JSON.parse(args[0]);
|
|
103
|
+
|
|
104
|
+
await this.#IoInterface.controller(socket, this.client, payload, hostKeyContext, args);
|
|
105
|
+
} catch (error) {
|
|
106
|
+
logger.error(error, { channel: this.channel, hostKeyContext, socketId: socket.id, args, stack: error.stack });
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Handles a socket disconnection for this channel.
|
|
112
|
+
*
|
|
113
|
+
* @param {Socket} socket - The Socket.IO socket object.
|
|
114
|
+
* @param {string} reason - The reason for disconnection (e.g., 'client namespace disconnect').
|
|
115
|
+
* @param {string} hostKeyContext - Unique identifier for the WebSocket management context.
|
|
116
|
+
* @returns {Promise<void>}
|
|
117
|
+
*/
|
|
118
|
+
async disconnect(socket, reason, hostKeyContext) {
|
|
119
|
+
try {
|
|
120
|
+
await this.#IoInterface.disconnect(socket, this.client, reason, hostKeyContext);
|
|
121
|
+
delete this.client[socket.id];
|
|
122
|
+
logger.debug(`Socket ${socket.id} disconnected from channel ${this.channel}. Reason: ${reason}`);
|
|
123
|
+
} catch (error) {
|
|
124
|
+
logger.error(error, { channel: this.channel, hostKeyContext, reason, socketId: socket.id, stack: error.stack });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { IoChannel };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module for creating and managing WebSocket servers.
|
|
3
|
+
* @module ws/IoServer
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
import { Server } from 'socket.io';
|
|
9
|
+
import { loggerFactory } from '../server/logger.js';
|
|
10
|
+
import Underpost from '../index.js';
|
|
11
|
+
|
|
12
|
+
const logger = loggerFactory(import.meta);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @class IoServer
|
|
16
|
+
* @classdesc Factory for creating and configuring Socket.IO server instances
|
|
17
|
+
* with CORS configuration and HTTP server attachment.
|
|
18
|
+
*/
|
|
19
|
+
class IoServer {
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new WebSocket server instance attached to an HTTP server.
|
|
22
|
+
*
|
|
23
|
+
* @static
|
|
24
|
+
* @param {import('http').Server} httpServer - The HTTP server instance to attach to.
|
|
25
|
+
* @param {Object} options - Configuration options.
|
|
26
|
+
* @param {string[]} options.origins - Allowed CORS origins.
|
|
27
|
+
* @param {string} options.path - Base API path. Socket.IO path is appended automatically.
|
|
28
|
+
* @param {function(import('socket.io').Socket): void} connectionHandler - Handler for new connections.
|
|
29
|
+
* @returns {{ options: import('socket.io').ServerOptions, ioServer: import('socket.io').Server, meta: ImportMeta }}
|
|
30
|
+
*/
|
|
31
|
+
static create(httpServer, options = {}, connectionHandler = () => {}) {
|
|
32
|
+
logger.info('origins', options.origins);
|
|
33
|
+
const wsOptions = {
|
|
34
|
+
cors: {
|
|
35
|
+
origins: options.origins,
|
|
36
|
+
methods: ['GET', 'POST', 'DELETE', 'PUT'],
|
|
37
|
+
allowedHeaders: [
|
|
38
|
+
'Access-Control-Allow-Headers',
|
|
39
|
+
'Access-Control-Allow-Origin',
|
|
40
|
+
'X-Requested-With',
|
|
41
|
+
'X-Access-Token',
|
|
42
|
+
'Content-Type',
|
|
43
|
+
'Host',
|
|
44
|
+
'Accept',
|
|
45
|
+
'Connection',
|
|
46
|
+
'Cache-Control',
|
|
47
|
+
'Authorization',
|
|
48
|
+
],
|
|
49
|
+
credentials: true,
|
|
50
|
+
},
|
|
51
|
+
path: options.path !== '/' ? `${options.path}/socket.io/` : '/socket.io/',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const ioServerInstance = Underpost.start.listenServerFactory(() =>
|
|
55
|
+
new Server(httpServer, wsOptions).on('connection', connectionHandler),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
logger.info('Socket.IO Server created and listening', { path: wsOptions.path });
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
options: wsOptions,
|
|
62
|
+
meta: import.meta,
|
|
63
|
+
ioServer: ioServerInstance,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { IoServer };
|