@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
package/src/cli/ipfs.js
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IPFS Cluster module for managing ipfs-cluster StatefulSet deployment on Kubernetes.
|
|
3
|
+
* @module src/cli/ipfs.js
|
|
4
|
+
* @namespace UnderpostIPFS
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { loggerFactory } from '../server/logger.js';
|
|
8
|
+
import { shellExec } from '../server/process.js';
|
|
9
|
+
import fs from 'fs-extra';
|
|
10
|
+
import Underpost from '../index.js';
|
|
11
|
+
|
|
12
|
+
const logger = loggerFactory(import.meta);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @class UnderpostIPFS
|
|
16
|
+
* @description Manages deployment of an ipfs-cluster StatefulSet on Kubernetes.
|
|
17
|
+
* Credentials (cluster secret + peer identity) are generated once and persisted
|
|
18
|
+
* to engine-private/ so the cluster identity survives redeployments.
|
|
19
|
+
* @memberof UnderpostIPFS
|
|
20
|
+
*/
|
|
21
|
+
class UnderpostIPFS {
|
|
22
|
+
static API = {
|
|
23
|
+
/**
|
|
24
|
+
* @method resolveCredentials
|
|
25
|
+
* @description Resolves the IPFS cluster credentials from engine-private/ if they
|
|
26
|
+
* already exist, otherwise generates new ones (hex cluster secret + peer identity
|
|
27
|
+
* via ipfs-cluster-service init) and persists them with mode 0o600.
|
|
28
|
+
* @param {string} privateDir - Absolute path to the engine-private directory.
|
|
29
|
+
* @returns {{ CLUSTER_SECRET: string, IDENTITY_JSON: { id: string, private_key: string } }}
|
|
30
|
+
* @memberof UnderpostIPFS
|
|
31
|
+
*/
|
|
32
|
+
resolveCredentials(privateDir) {
|
|
33
|
+
const secretPath = `${privateDir}/ipfs-cluster-secret`;
|
|
34
|
+
const identityPath = `${privateDir}/ipfs-cluster-identity.json`;
|
|
35
|
+
|
|
36
|
+
if (fs.existsSync(secretPath) && fs.existsSync(identityPath)) {
|
|
37
|
+
logger.info('Reusing existing IPFS cluster credentials from engine-private/');
|
|
38
|
+
return {
|
|
39
|
+
CLUSTER_SECRET: fs.readFileSync(secretPath, 'utf8').trim(),
|
|
40
|
+
IDENTITY_JSON: JSON.parse(fs.readFileSync(identityPath, 'utf8')),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
logger.info('Generating new IPFS cluster credentials and persisting to engine-private/');
|
|
45
|
+
|
|
46
|
+
// ipfs-cluster-service requires CLUSTER_SECRET as a 64-char hex string.
|
|
47
|
+
// base64 (openssl rand -base64 32) contains '/', '+', '=' which are invalid hex bytes.
|
|
48
|
+
const CLUSTER_SECRET = shellExec("od -vN 32 -An -tx1 /dev/urandom | tr -d ' \\n'", {
|
|
49
|
+
stdout: true,
|
|
50
|
+
}).trim();
|
|
51
|
+
|
|
52
|
+
const tmpDir = '/tmp/ipfs-cluster-identity';
|
|
53
|
+
shellExec(`rm -rf ${tmpDir} && mkdir -p ${tmpDir}`);
|
|
54
|
+
shellExec(`docker run --rm -v ${tmpDir}:/data/ipfs-cluster ipfs/ipfs-cluster init -f`);
|
|
55
|
+
const IDENTITY_JSON = JSON.parse(shellExec(`cat ${tmpDir}/identity.json`, { stdout: true }).trim());
|
|
56
|
+
shellExec(`rm -rf ${tmpDir}`);
|
|
57
|
+
|
|
58
|
+
fs.ensureDirSync(privateDir);
|
|
59
|
+
fs.writeFileSync(secretPath, CLUSTER_SECRET, { mode: 0o600 });
|
|
60
|
+
fs.writeFileSync(identityPath, JSON.stringify(IDENTITY_JSON, null, 2), { mode: 0o600 });
|
|
61
|
+
|
|
62
|
+
logger.info(`IPFS cluster credentials saved (peer ID: ${IDENTITY_JSON.id})`);
|
|
63
|
+
|
|
64
|
+
return { CLUSTER_SECRET, IDENTITY_JSON };
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @method teardown
|
|
69
|
+
* @description Deletes the existing ipfs-cluster StatefulSet, its Kubernetes Secret,
|
|
70
|
+
* env ConfigMap, and all PVCs so the next deployment initialises a clean data volume
|
|
71
|
+
* (ensuring the correct datastore profile is applied by the init container).
|
|
72
|
+
* @param {object} options
|
|
73
|
+
* @param {string} options.namespace - Kubernetes namespace.
|
|
74
|
+
* @param {number} ipfsReplicas - Number of replicas whose PVCs must be removed.
|
|
75
|
+
* @memberof UnderpostIPFS
|
|
76
|
+
*/
|
|
77
|
+
teardown(options, ipfsReplicas) {
|
|
78
|
+
logger.info(`Tearing down existing ipfs-cluster deployment in namespace '${options.namespace}'`);
|
|
79
|
+
shellExec(`kubectl delete statefulset ipfs-cluster -n ${options.namespace} --ignore-not-found`);
|
|
80
|
+
shellExec(`kubectl delete secret ipfs-cluster-secret -n ${options.namespace} --ignore-not-found`);
|
|
81
|
+
shellExec(`kubectl delete configmap env-config -n ${options.namespace} --ignore-not-found`);
|
|
82
|
+
for (let i = 0; i < ipfsReplicas; i++) {
|
|
83
|
+
shellExec(
|
|
84
|
+
`kubectl delete pvc cluster-storage-ipfs-cluster-${i} ipfs-storage-ipfs-cluster-${i} -n ${options.namespace} --ignore-not-found`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @method applySecrets
|
|
91
|
+
* @description Creates (or idempotently updates) the Kubernetes Secret and env ConfigMap
|
|
92
|
+
* that the StatefulSet pods read at startup.
|
|
93
|
+
* - Secret `ipfs-cluster-secret`: cluster-secret + bootstrap-peer-priv-key
|
|
94
|
+
* - ConfigMap `env-config`: bootstrap-peer-id + CLUSTER_SVC_NAME
|
|
95
|
+
* @param {{ CLUSTER_SECRET: string, IDENTITY_JSON: { id: string, private_key: string } }} credentials
|
|
96
|
+
* @param {object} options
|
|
97
|
+
* @param {string} options.namespace - Kubernetes namespace.
|
|
98
|
+
* @memberof UnderpostIPFS
|
|
99
|
+
*/
|
|
100
|
+
applySecrets({ CLUSTER_SECRET, IDENTITY_JSON }, options) {
|
|
101
|
+
logger.info('Applying IPFS cluster Kubernetes Secret and env ConfigMap');
|
|
102
|
+
|
|
103
|
+
shellExec(
|
|
104
|
+
`kubectl create secret generic ipfs-cluster-secret \
|
|
105
|
+
--from-literal=cluster-secret=${CLUSTER_SECRET} \
|
|
106
|
+
--from-literal=bootstrap-peer-priv-key=${IDENTITY_JSON.private_key} \
|
|
107
|
+
--dry-run=client -o yaml | kubectl apply -f - -n ${options.namespace}`,
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
shellExec(
|
|
111
|
+
`kubectl create configmap env-config \
|
|
112
|
+
--from-literal=bootstrap-peer-id=${IDENTITY_JSON.id} \
|
|
113
|
+
--from-literal=CLUSTER_SVC_NAME=ipfs-cluster \
|
|
114
|
+
--dry-run=client -o yaml | kubectl apply -f - -n ${options.namespace}`,
|
|
115
|
+
);
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @method applyManifests
|
|
120
|
+
* @description Applies host-level sysctl tuning (Kind clusters only), the storage class,
|
|
121
|
+
* the kustomize manifests, and scales the StatefulSet to the requested replica count.
|
|
122
|
+
* @param {object} options
|
|
123
|
+
* @param {string} options.namespace - Kubernetes namespace.
|
|
124
|
+
* @param {boolean} [options.kubeadm] - Whether the cluster is Kubeadm-based.
|
|
125
|
+
* @param {boolean} [options.k3s] - Whether the cluster is K3s-based.
|
|
126
|
+
* @param {string} underpostRoot - Absolute path to the underpost project root.
|
|
127
|
+
* @param {number} ipfsReplicas - Desired replica count.
|
|
128
|
+
* @memberof UnderpostIPFS
|
|
129
|
+
*/
|
|
130
|
+
applyManifests(options, underpostRoot, ipfsReplicas) {
|
|
131
|
+
// Apply UDP buffer sysctl on every Kind node so QUIC (used by IPFS) can reach the
|
|
132
|
+
// recommended 7.5 MB buffer size. Kind nodes are containers and do NOT inherit the
|
|
133
|
+
// host sysctl values, so this must be set via docker exec on each node directly.
|
|
134
|
+
shellExec(
|
|
135
|
+
`sudo sysctl -w net.core.rmem_max=7500000
|
|
136
|
+
sudo sysctl -w net.core.wmem_max=7500000`,
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
shellExec(`kubectl apply -f ${underpostRoot}/manifests/ipfs/storage-class.yaml`);
|
|
140
|
+
shellExec(`kubectl apply -k ${underpostRoot}/manifests/ipfs -n ${options.namespace}`);
|
|
141
|
+
|
|
142
|
+
// statefulset.yaml hardcodes replicas: 3 as the ceiling; scale down here if needed.
|
|
143
|
+
shellExec(`kubectl scale statefulset ipfs-cluster --replicas=${ipfsReplicas} -n ${options.namespace}`);
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @method deploy
|
|
148
|
+
* @description Full orchestration of the ipfs-cluster StatefulSet deployment:
|
|
149
|
+
* optionally pulls images, resolves or generates credentials, tears down any existing
|
|
150
|
+
* deployment, applies secrets, applies manifests, and waits for all pods to be Running.
|
|
151
|
+
* @param {object} options - Cluster init options forwarded from UnderpostCluster.API.init.
|
|
152
|
+
* @param {string} options.namespace - Kubernetes namespace.
|
|
153
|
+
* @param {boolean} [options.pullImage] - Whether to pull container images first.
|
|
154
|
+
* @param {boolean} [options.kubeadm] - Whether the cluster is Kubeadm-based.
|
|
155
|
+
* @param {boolean} [options.k3s] - Whether the cluster is K3s-based.
|
|
156
|
+
* @param {string|number} [options.replicas] - Override replica count (defaults to 3).
|
|
157
|
+
* @param {string} underpostRoot - Absolute path to the underpost project root.
|
|
158
|
+
* @memberof UnderpostIPFS
|
|
159
|
+
*/
|
|
160
|
+
async deploy(options, underpostRoot) {
|
|
161
|
+
if (options.pullImage === true) {
|
|
162
|
+
Underpost.cluster.pullImage('ipfs/kubo:latest', options);
|
|
163
|
+
Underpost.cluster.pullImage('ipfs/ipfs-cluster:latest', options);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const credentials = Underpost.ipfs.resolveCredentials(`${underpostRoot}/engine-private`);
|
|
167
|
+
|
|
168
|
+
const ipfsReplicas = options.replicas ? parseInt(options.replicas) : 3;
|
|
169
|
+
|
|
170
|
+
Underpost.ipfs.teardown(options, ipfsReplicas);
|
|
171
|
+
Underpost.ipfs.applySecrets(credentials, options);
|
|
172
|
+
Underpost.ipfs.applyManifests(options, underpostRoot, ipfsReplicas);
|
|
173
|
+
|
|
174
|
+
logger.info(`Waiting for ${ipfsReplicas} ipfs-cluster pod(s) to reach Running state`);
|
|
175
|
+
for (let i = 0; i < ipfsReplicas; i++) {
|
|
176
|
+
await Underpost.test.statusMonitor(`ipfs-cluster-${i}`, 'Running', 'pods', 1000, 60 * 15);
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export default UnderpostIPFS;
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kickstart configuration generator for Underpost Engine
|
|
3
|
+
* @module src/cli/kickstart.js
|
|
4
|
+
* @namespace UnderpostKickStart
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import fs from 'fs';
|
|
8
|
+
import path from 'path';
|
|
9
|
+
import { fileURLToPath } from 'url';
|
|
10
|
+
import { loggerFactory } from '../server/logger.js';
|
|
11
|
+
|
|
12
|
+
const logger = loggerFactory(import.meta);
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = path.dirname(__filename);
|
|
15
|
+
|
|
16
|
+
class UnderpostKickStart {
|
|
17
|
+
static API = {
|
|
18
|
+
/**
|
|
19
|
+
* @method kickstartHeader
|
|
20
|
+
* @description Generates the kickstart header section with template variables.
|
|
21
|
+
* @param {object} options
|
|
22
|
+
* @param {string} [options.lang='en_US.UTF-8']
|
|
23
|
+
* @param {string} [options.keyboard='us']
|
|
24
|
+
* @param {string} [options.timezone='America/New_York']
|
|
25
|
+
* @param {string} [options.rootPassword]
|
|
26
|
+
* @memberof UnderpostKickStart
|
|
27
|
+
* @returns {string}
|
|
28
|
+
*/
|
|
29
|
+
kickstartHeader: ({ lang = 'en_US.UTF-8', keyboard = 'us', timezone = 'America/New_York', rootPassword = '' }) => {
|
|
30
|
+
return [
|
|
31
|
+
'# Rocky Linux 9 Kickstart - Ephemeral Anaconda Live Environment with SSHD',
|
|
32
|
+
'cmdline',
|
|
33
|
+
'eula --agreed',
|
|
34
|
+
`keyboard --vckeymap=${keyboard} --xlayouts='${keyboard}'`,
|
|
35
|
+
`lang ${lang}`,
|
|
36
|
+
'network --bootproto=dhcp --device=link --activate --onboot=yes',
|
|
37
|
+
`timezone ${timezone} --utc`,
|
|
38
|
+
rootPassword ? `rootpw --plaintext ${rootPassword}` : 'rootpw --lock',
|
|
39
|
+
'firstboot --disable',
|
|
40
|
+
'skipx',
|
|
41
|
+
].join('\n');
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @method kickstartPreVariables
|
|
46
|
+
* @description Generates the shell variable-assignment block injected at the top of the
|
|
47
|
+
* kickstart `%pre` script. These variables drive both the ephemeral commissioning runtime
|
|
48
|
+
* and the unattended disk installer in `scripts/rocky-kickstart.sh`. Passwords are emitted
|
|
49
|
+
* base64-encoded (`*_B64`) and decoded by an in-script `ks_b64d` helper; all other values
|
|
50
|
+
* are single-quote escaped so arbitrary content survives the shell/heredoc layers.
|
|
51
|
+
* @param {object} options - Variable values to bake into the `%pre` block.
|
|
52
|
+
* @param {string} [options.rootPassword=''] - root console password (base64-encoded).
|
|
53
|
+
* @param {string} [options.authorizedKeys=''] - SSH public key(s) installed as authorized_keys.
|
|
54
|
+
* @param {string} [options.adminUsername=''] - Primary (MAAS) admin user (defaults to MAAS_ADMIN_USERNAME).
|
|
55
|
+
* @param {string} [options.adminPassword=''] - Primary admin console password (defaults to rootPassword).
|
|
56
|
+
* @param {string} [options.deployUsername=''] - Optional second (deploy) admin user (e.g. admin).
|
|
57
|
+
* @param {string} [options.deployPassword=''] - Deploy user console password (defaults to rootPassword).
|
|
58
|
+
* @param {string} [options.netIp=''] - Static IPv4 for the deployed OS; empty = DHCP.
|
|
59
|
+
* @param {number} [options.netPrefix=24] - IPv4 prefix length for the static address.
|
|
60
|
+
* @param {string} [options.netGateway=''] - Default gateway for the deployed OS.
|
|
61
|
+
* @param {string} [options.netDns=''] - DNS server for the deployed OS.
|
|
62
|
+
* @param {string} [options.timezone=''] - IANA timezone configured in the deployed OS (e.g. America/Santiago).
|
|
63
|
+
* @param {string} [options.keyboardLayout=''] - Console/X11 keyboard layout for the deployed OS (e.g. es).
|
|
64
|
+
* @param {string} [options.chronyConfPath='/etc/chrony.conf'] - chrony config path written in the deployed OS.
|
|
65
|
+
* @param {string} [options.bootstrapUrl=''] - Base URL of the bootstrap HTTP server for this host (status POSTs).
|
|
66
|
+
* @param {string} [options.workflowId=''] - Workflow identifier reported in status metadata.
|
|
67
|
+
* @param {string} [options.systemId=''] - MAAS system id reported in status metadata (if known).
|
|
68
|
+
* @param {string} [options.targetHostname=''] - Hostname reported in status metadata and set on the deployed OS.
|
|
69
|
+
* @param {number} [options.sshPort=22] - SSH port the ephemeral runtime listens on.
|
|
70
|
+
* @param {string} [options.installDiskHint=''] - Optional explicit target disk (e.g. /dev/nvme0n1); empty = auto-detect.
|
|
71
|
+
* @param {boolean} [options.autoInstall=true] - When true, the ephemeral runtime self-installs after a fallback timeout if no remote trigger arrives.
|
|
72
|
+
* @memberof UnderpostKickStart
|
|
73
|
+
* @returns {string} Newline-joined bash variable assignments.
|
|
74
|
+
*/
|
|
75
|
+
kickstartPreVariables: ({
|
|
76
|
+
rootPassword = '',
|
|
77
|
+
authorizedKeys = '',
|
|
78
|
+
adminUsername = '',
|
|
79
|
+
adminPassword = '',
|
|
80
|
+
deployUsername = '',
|
|
81
|
+
deployPassword = '',
|
|
82
|
+
netIp = '',
|
|
83
|
+
netPrefix = 24,
|
|
84
|
+
netGateway = '',
|
|
85
|
+
netDns = '',
|
|
86
|
+
timezone = '',
|
|
87
|
+
keyboardLayout = '',
|
|
88
|
+
chronyConfPath = '/etc/chrony.conf',
|
|
89
|
+
bootstrapUrl = '',
|
|
90
|
+
workflowId = '',
|
|
91
|
+
systemId = '',
|
|
92
|
+
targetHostname = '',
|
|
93
|
+
sshPort = 22,
|
|
94
|
+
installDiskHint = '',
|
|
95
|
+
autoInstall = true,
|
|
96
|
+
}) => {
|
|
97
|
+
const sanitizedKeys = (authorizedKeys || '').trim();
|
|
98
|
+
// Passwords are passed base64-encoded so arbitrary characters (quotes,
|
|
99
|
+
// spaces, $, etc.) survive every shell/heredoc layer intact. base64 output
|
|
100
|
+
// never contains single quotes. Decoding tries `base64` then falls back to
|
|
101
|
+
// python3 so a minimal Anaconda environment can never yield empty passwords.
|
|
102
|
+
const b64 = (v) => Buffer.from(String(v || ''), 'utf8').toString('base64');
|
|
103
|
+
const sq = (v) => `'${String(v || '').replace(/'/g, "'\\''")}'`;
|
|
104
|
+
return [
|
|
105
|
+
`ks_b64d() { printf %s "$1" | base64 -d 2>/dev/null || printf %s "$1" | python3 -c 'import sys,base64;sys.stdout.buffer.write(base64.b64decode(sys.stdin.read().strip()))' 2>/dev/null; }`,
|
|
106
|
+
`ROOT_PASS_B64='${b64(rootPassword)}'`,
|
|
107
|
+
`ADMIN_PASS_B64='${b64(adminPassword || rootPassword)}'`,
|
|
108
|
+
`DEPLOY_PASS_B64='${b64(deployPassword)}'`,
|
|
109
|
+
`ROOT_PASS="$(ks_b64d "$ROOT_PASS_B64")"`,
|
|
110
|
+
`ADMIN_PASS="$(ks_b64d "$ADMIN_PASS_B64")"`,
|
|
111
|
+
`DEPLOY_PASS="$(ks_b64d "$DEPLOY_PASS_B64")"`,
|
|
112
|
+
`AUTHORIZED_KEYS=${sq(sanitizedKeys)}`,
|
|
113
|
+
`ADMIN_USER=${sq(adminUsername || process.env.MAAS_ADMIN_USERNAME || 'maas')}`,
|
|
114
|
+
`DEPLOY_USER=${sq(deployUsername)}`,
|
|
115
|
+
`NET_IP=${sq(netIp)}`,
|
|
116
|
+
`NET_PREFIX='${parseInt(netPrefix, 10) || 24}'`,
|
|
117
|
+
`NET_GATEWAY=${sq(netGateway)}`,
|
|
118
|
+
`NET_DNS=${sq(netDns)}`,
|
|
119
|
+
`TIMEZONE=${sq(timezone)}`,
|
|
120
|
+
`KEYBOARD_LAYOUT=${sq(keyboardLayout)}`,
|
|
121
|
+
`CHRONY_CONF_PATH=${sq(chronyConfPath || '/etc/chrony.conf')}`,
|
|
122
|
+
`BOOTSTRAP_URL=${sq(bootstrapUrl)}`,
|
|
123
|
+
`WORKFLOW_ID=${sq(workflowId)}`,
|
|
124
|
+
`SYSTEM_ID=${sq(systemId)}`,
|
|
125
|
+
`TARGET_HOSTNAME=${sq(targetHostname)}`,
|
|
126
|
+
`SSH_PORT='${sshPort || 22}'`,
|
|
127
|
+
`INSTALL_DISK_HINT=${sq(installDiskHint)}`,
|
|
128
|
+
`AUTO_INSTALL='${autoInstall ? '1' : '0'}'`,
|
|
129
|
+
].join('\n');
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @method kickstartFactory
|
|
134
|
+
* @description Generates a complete kickstart configuration by combining the header,
|
|
135
|
+
* the `%pre` variable-assignment block, and the `scripts/rocky-kickstart.sh` body.
|
|
136
|
+
* @param {object} options - Kickstart generation options.
|
|
137
|
+
* @param {string} [options.lang='en_US.UTF-8'] - System language for the ephemeral runtime.
|
|
138
|
+
* @param {string} [options.keyboard='us'] - Keyboard layout for the ephemeral runtime AND the deployed OS.
|
|
139
|
+
* @param {string} [options.timezone='America/New_York'] - Timezone for the ephemeral runtime AND the deployed OS.
|
|
140
|
+
* @param {string} [options.chronyConfPath='/etc/chrony.conf'] - chrony config path written in the deployed OS.
|
|
141
|
+
* @param {string} [options.rootPassword=process.env.MAAS_ADMIN_PASS] - root console password.
|
|
142
|
+
* @param {string} [options.adminUsername=''] - Primary (MAAS) admin user created in the deployed OS.
|
|
143
|
+
* @param {string} [options.adminPassword=''] - Primary admin console password (defaults to rootPassword).
|
|
144
|
+
* @param {string} [options.deployUsername=''] - Optional second (deploy) admin user (e.g. admin).
|
|
145
|
+
* @param {string} [options.deployPassword=''] - Deploy user console password (defaults to rootPassword).
|
|
146
|
+
* @param {string} [options.netIp=''] - Static IPv4 for the deployed OS; empty = DHCP.
|
|
147
|
+
* @param {number} [options.netPrefix=24] - IPv4 prefix length for the static address.
|
|
148
|
+
* @param {string} [options.netGateway=''] - Default gateway for the deployed OS.
|
|
149
|
+
* @param {string} [options.netDns=''] - DNS server for the deployed OS.
|
|
150
|
+
* @param {string} [options.authorizedKeys=''] - SSH public key(s) installed as authorized_keys.
|
|
151
|
+
* @param {string} [options.bootstrapUrl=''] - Base URL of the bootstrap HTTP server (status POSTs).
|
|
152
|
+
* @param {string} [options.workflowId=''] - Workflow identifier reported in status metadata.
|
|
153
|
+
* @param {string} [options.systemId=''] - MAAS system id reported in status metadata (if known).
|
|
154
|
+
* @param {string} [options.targetHostname=''] - Hostname reported in status metadata and set on the deployed OS.
|
|
155
|
+
* @param {number} [options.sshPort=22] - SSH port the ephemeral runtime listens on.
|
|
156
|
+
* @param {string} [options.installDiskHint=''] - Optional explicit target disk; empty = auto-detect.
|
|
157
|
+
* @param {boolean} [options.autoInstall=true] - When true, the runtime self-installs after a fallback timeout.
|
|
158
|
+
* @memberof UnderpostKickStart
|
|
159
|
+
* @returns {string} The full kickstart (ks.cfg) source.
|
|
160
|
+
*/
|
|
161
|
+
kickstartFactory: ({
|
|
162
|
+
lang = 'en_US.UTF-8',
|
|
163
|
+
keyboard = 'us',
|
|
164
|
+
timezone = 'America/New_York',
|
|
165
|
+
chronyConfPath = '/etc/chrony.conf',
|
|
166
|
+
rootPassword = process.env.MAAS_ADMIN_PASS,
|
|
167
|
+
adminUsername = '',
|
|
168
|
+
adminPassword = '',
|
|
169
|
+
deployUsername = '',
|
|
170
|
+
deployPassword = '',
|
|
171
|
+
netIp = '',
|
|
172
|
+
netPrefix = 24,
|
|
173
|
+
netGateway = '',
|
|
174
|
+
netDns = '',
|
|
175
|
+
authorizedKeys = '',
|
|
176
|
+
bootstrapUrl = '',
|
|
177
|
+
workflowId = '',
|
|
178
|
+
systemId = '',
|
|
179
|
+
targetHostname = '',
|
|
180
|
+
sshPort = 22,
|
|
181
|
+
installDiskHint = '',
|
|
182
|
+
autoInstall = true,
|
|
183
|
+
}) => {
|
|
184
|
+
const resolvedAdminUsername = adminUsername || process.env.MAAS_ADMIN_USERNAME || 'maas';
|
|
185
|
+
const header = UnderpostKickStart.API.kickstartHeader({ lang, keyboard, timezone, rootPassword });
|
|
186
|
+
const variables = UnderpostKickStart.API.kickstartPreVariables({
|
|
187
|
+
rootPassword,
|
|
188
|
+
authorizedKeys,
|
|
189
|
+
adminUsername: resolvedAdminUsername,
|
|
190
|
+
adminPassword,
|
|
191
|
+
deployUsername,
|
|
192
|
+
deployPassword,
|
|
193
|
+
netIp,
|
|
194
|
+
netPrefix,
|
|
195
|
+
netGateway,
|
|
196
|
+
netDns,
|
|
197
|
+
timezone,
|
|
198
|
+
keyboardLayout: keyboard,
|
|
199
|
+
chronyConfPath,
|
|
200
|
+
bootstrapUrl,
|
|
201
|
+
workflowId,
|
|
202
|
+
systemId,
|
|
203
|
+
targetHostname,
|
|
204
|
+
sshPort,
|
|
205
|
+
installDiskHint,
|
|
206
|
+
autoInstall,
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
const scriptPath = path.resolve(__dirname, '../../scripts/rocky-kickstart.sh');
|
|
210
|
+
const scriptBody = fs.readFileSync(scriptPath, 'utf8');
|
|
211
|
+
|
|
212
|
+
return [
|
|
213
|
+
header,
|
|
214
|
+
'',
|
|
215
|
+
'%pre --interpreter=/bin/bash --log=/tmp/ks-pre.log --erroronfail',
|
|
216
|
+
'#!/bin/bash',
|
|
217
|
+
variables,
|
|
218
|
+
'',
|
|
219
|
+
scriptBody,
|
|
220
|
+
'%end',
|
|
221
|
+
].join('\n');
|
|
222
|
+
},
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* @method kernelParamsFactory
|
|
226
|
+
* @description Appends kickstart-specific kernel parameters (inst.ks, inst.repo, inst.text, inst.sshd).
|
|
227
|
+
* @param {string} macAddress - The MAC address of the target machine.
|
|
228
|
+
* @param {array} cmd - The existing array of kernel parameters.
|
|
229
|
+
* @param {object} options - Options for generating kernel parameters.
|
|
230
|
+
* @param {string} options.ipDhcpServer - The IP address of the DHCP server.
|
|
231
|
+
* @param {number} [options.bootstrapHttpServerPort=8888] - Port for the bootstrap HTTP server.
|
|
232
|
+
* @param {string} options.hostname - The hostname of the target machine.
|
|
233
|
+
* @param {string} [options.architecture='amd64'] - The target architecture.
|
|
234
|
+
* @memberof UnderpostKickStart
|
|
235
|
+
* @returns {array}
|
|
236
|
+
*/
|
|
237
|
+
kernelParamsFactory(
|
|
238
|
+
macAddress,
|
|
239
|
+
cmd = [],
|
|
240
|
+
options = { ipDhcpServer: '', bootstrapHttpServerPort: 8888, hostname: '', architecture: 'amd64' },
|
|
241
|
+
) {
|
|
242
|
+
const { ipDhcpServer, bootstrapHttpServerPort, hostname, architecture } = options;
|
|
243
|
+
const repoArch = architecture && architecture.match('arm64') ? 'aarch64' : 'x86_64';
|
|
244
|
+
return cmd.concat([
|
|
245
|
+
`inst.ks=http://${ipDhcpServer}:${bootstrapHttpServerPort}/${hostname}/ks.cfg`,
|
|
246
|
+
`inst.repo=http://dl.rockylinux.org/pub/rocky/9/BaseOS/${repoArch}/os/`,
|
|
247
|
+
`inst.text`,
|
|
248
|
+
`inst.sshd`,
|
|
249
|
+
]);
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @method httpServerStaticFactory
|
|
254
|
+
* @description Writes kickstart ks.cfg file to the bootstrap HTTP server path.
|
|
255
|
+
* @param {object} params
|
|
256
|
+
* @param {string} params.bootstrapHttpServerPath
|
|
257
|
+
* @param {string} params.hostname
|
|
258
|
+
* @param {string} params.kickstartSrc
|
|
259
|
+
* @memberof UnderpostKickStart
|
|
260
|
+
* @returns {void}
|
|
261
|
+
*/
|
|
262
|
+
httpServerStaticFactory({ bootstrapHttpServerPath, hostname, kickstartSrc }) {
|
|
263
|
+
if (!kickstartSrc) return;
|
|
264
|
+
const dest = `${bootstrapHttpServerPath}/${hostname}/ks.cfg`;
|
|
265
|
+
fs.writeFileSync(dest, kickstartSrc, 'utf8');
|
|
266
|
+
logger.info(`Kickstart file written to ${dest}`);
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export default UnderpostKickStart;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kubectl module providing low-level Kubernetes resource management primitives.
|
|
3
|
+
* Centralises pod querying, file transfer, and in-container execution operations
|
|
4
|
+
* that were previously scattered across db, deploy, and cluster modules.
|
|
5
|
+
* @module src/cli/kubectl.js
|
|
6
|
+
* @namespace UnderpostKubectl
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { loggerFactory } from '../server/logger.js';
|
|
10
|
+
import { shellExec } from '../server/process.js';
|
|
11
|
+
import Underpost from '../index.js';
|
|
12
|
+
|
|
13
|
+
const logger = loggerFactory(import.meta);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Redacts credentials from shell command strings before logging.
|
|
17
|
+
* Masks passwords in `-p<password>`, `--password=<password>`, and `-P <password>` patterns.
|
|
18
|
+
* @param {string} cmd - The raw command string.
|
|
19
|
+
* @returns {string} The command with credentials replaced by `***`.
|
|
20
|
+
* @memberof UnderpostKubectl
|
|
21
|
+
*/
|
|
22
|
+
const sanitizeCommand = (cmd) => {
|
|
23
|
+
if (typeof cmd !== 'string') return cmd;
|
|
24
|
+
return cmd
|
|
25
|
+
.replace(/-p['"]?[^\s'"]+/g, '-p***')
|
|
26
|
+
.replace(/--password=['"]?[^\s'"]+/g, '--password=***')
|
|
27
|
+
.replace(/-P\s+['"]?[^\s'"]+/g, '-P ***');
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @class UnderpostKubectl
|
|
32
|
+
* @description Kubernetes cluster resource management primitives.
|
|
33
|
+
* Provides a unified interface for kubectl operations: resource listing, in-pod
|
|
34
|
+
* command execution, file transfer, and pod discovery/filtering.
|
|
35
|
+
* All methods are stateless and safe to call from any other CLI module.
|
|
36
|
+
* @memberof UnderpostKubectl
|
|
37
|
+
*/
|
|
38
|
+
class UnderpostKubectl {
|
|
39
|
+
static API = {
|
|
40
|
+
/**
|
|
41
|
+
* Lists Kubernetes resources matching `deployId`, parsed into plain objects.
|
|
42
|
+
* Equivalent to `kubectl get <kindType> -o wide`, filtered by name substring.
|
|
43
|
+
* @param {string} deployId - Substring to match against resource names. Empty string returns all.
|
|
44
|
+
* @param {string} [kindType='pods'] - Resource kind: pods, deployments, svc, nodes, …
|
|
45
|
+
* @param {string} [namespace=''] - Namespace to query; empty string → --all-namespaces.
|
|
46
|
+
* @returns {Array<object>} Parsed rows keyed by column header (NAME, STATUS, NODE, …).
|
|
47
|
+
* @memberof UnderpostKubectl
|
|
48
|
+
*/
|
|
49
|
+
get(deployId, kindType = 'pods', namespace = '') {
|
|
50
|
+
// Existence-check style: a missing kubectl context, a non-existent
|
|
51
|
+
// namespace, or no pods matching the filter must return an empty
|
|
52
|
+
// list (not throw). silentOnError keeps the legacy contract.
|
|
53
|
+
const raw = shellExec(
|
|
54
|
+
`sudo kubectl get ${kindType}${namespace ? ` -n ${namespace}` : ` --all-namespaces`} -o wide`,
|
|
55
|
+
{ stdout: true, disableLog: true, silent: true, silentOnError: true },
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const heads = raw
|
|
59
|
+
.split(`\n`)[0]
|
|
60
|
+
.split(' ')
|
|
61
|
+
.filter((_r) => _r.trim());
|
|
62
|
+
|
|
63
|
+
const pods = raw
|
|
64
|
+
.split(`\n`)
|
|
65
|
+
.filter((r) => (deployId ? r.match(deployId) : r.trim() && !r.match('NAME')))
|
|
66
|
+
.map((r) => r.split(' ').filter((_r) => _r.trim()));
|
|
67
|
+
|
|
68
|
+
const result = [];
|
|
69
|
+
for (const row of pods) {
|
|
70
|
+
const pod = {};
|
|
71
|
+
let index = -1;
|
|
72
|
+
for (const head of heads) {
|
|
73
|
+
index++;
|
|
74
|
+
pod[head] = row[index];
|
|
75
|
+
}
|
|
76
|
+
result.push(pod);
|
|
77
|
+
}
|
|
78
|
+
return result;
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Executes a kubectl command with credential-safe logging and error propagation.
|
|
83
|
+
* @param {string} command - Full kubectl command string.
|
|
84
|
+
* @param {object} [options={}] - Execution options.
|
|
85
|
+
* @param {string} [options.context=''] - Human-readable label for log messages.
|
|
86
|
+
* @returns {string} stdout output from the command.
|
|
87
|
+
* @throws {Error} Re-throws any execution error after logging.
|
|
88
|
+
* @memberof UnderpostKubectl
|
|
89
|
+
*/
|
|
90
|
+
run(command, options = {}) {
|
|
91
|
+
const { context = '' } = options;
|
|
92
|
+
try {
|
|
93
|
+
logger.info(`Executing kubectl command`, { command: sanitizeCommand(command), context });
|
|
94
|
+
return shellExec(command, { stdout: true, disableLog: true });
|
|
95
|
+
} catch (error) {
|
|
96
|
+
logger.error(`kubectl command failed`, { command: sanitizeCommand(command), error: error.message, context });
|
|
97
|
+
throw error;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Runs a shell command inside a pod container via `kubectl exec`.
|
|
103
|
+
* @param {object} params
|
|
104
|
+
* @param {string} params.podName - Target pod name.
|
|
105
|
+
* @param {string} params.namespace - Pod namespace.
|
|
106
|
+
* @param {string} params.command - Shell command to run inside the container.
|
|
107
|
+
* @returns {string} stdout output from the in-pod command.
|
|
108
|
+
* @throws {Error} Re-throws any execution error after logging.
|
|
109
|
+
* @memberof UnderpostKubectl
|
|
110
|
+
*/
|
|
111
|
+
exec({ podName, namespace, command }) {
|
|
112
|
+
try {
|
|
113
|
+
const kubectlCmd = `sudo kubectl exec -n ${namespace} -i ${podName} -- sh -c "${command}"`;
|
|
114
|
+
return Underpost.kubectl.run(kubectlCmd, { context: `exec in pod ${podName}` });
|
|
115
|
+
} catch (error) {
|
|
116
|
+
logger.error('Failed to execute command in pod', {
|
|
117
|
+
podName,
|
|
118
|
+
command: sanitizeCommand(command),
|
|
119
|
+
error: error.message,
|
|
120
|
+
});
|
|
121
|
+
throw error;
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Copies a local file into a pod via `kubectl cp`.
|
|
127
|
+
* @param {object} params
|
|
128
|
+
* @param {string} params.sourcePath - Local source path.
|
|
129
|
+
* @param {string} params.podName - Target pod name.
|
|
130
|
+
* @param {string} params.namespace - Pod namespace.
|
|
131
|
+
* @param {string} params.destPath - Destination path inside the container.
|
|
132
|
+
* @returns {boolean} `true` on success, `false` on error.
|
|
133
|
+
* @memberof UnderpostKubectl
|
|
134
|
+
*/
|
|
135
|
+
cpTo({ sourcePath, podName, namespace, destPath }) {
|
|
136
|
+
try {
|
|
137
|
+
const command = `sudo kubectl cp ${sourcePath} ${namespace}/${podName}:${destPath}`;
|
|
138
|
+
Underpost.kubectl.run(command, { context: `copy to pod ${podName}` });
|
|
139
|
+
return true;
|
|
140
|
+
} catch (error) {
|
|
141
|
+
logger.error('Failed to copy file to pod', { sourcePath, podName, destPath, error: error.message });
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Copies a file from a pod to the local filesystem via `kubectl cp`.
|
|
148
|
+
* @param {object} params
|
|
149
|
+
* @param {string} params.podName - Source pod name.
|
|
150
|
+
* @param {string} params.namespace - Pod namespace.
|
|
151
|
+
* @param {string} params.sourcePath - Source path inside the container.
|
|
152
|
+
* @param {string} params.destPath - Local destination path.
|
|
153
|
+
* @returns {boolean} `true` on success, `false` on error.
|
|
154
|
+
* @memberof UnderpostKubectl
|
|
155
|
+
*/
|
|
156
|
+
cpFrom({ podName, namespace, sourcePath, destPath }) {
|
|
157
|
+
try {
|
|
158
|
+
const command = `sudo kubectl cp ${namespace}/${podName}:${sourcePath} ${destPath}`;
|
|
159
|
+
Underpost.kubectl.run(command, { context: `copy from pod ${podName}` });
|
|
160
|
+
return true;
|
|
161
|
+
} catch (error) {
|
|
162
|
+
logger.error('Failed to copy file from pod', { podName, sourcePath, destPath, error: error.message });
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Checks whether a file exists inside a pod container.
|
|
169
|
+
* @param {object} params
|
|
170
|
+
* @param {string} params.podName - Pod name.
|
|
171
|
+
* @param {string} params.path - Absolute path inside the container to test.
|
|
172
|
+
* @returns {boolean} `true` if the file exists.
|
|
173
|
+
* @memberof UnderpostKubectl
|
|
174
|
+
*/
|
|
175
|
+
existsFile({ podName, path }) {
|
|
176
|
+
const result = shellExec(`kubectl exec ${podName} -- test -f ${path} && echo "true" || echo "false"`, {
|
|
177
|
+
stdout: true,
|
|
178
|
+
disableLog: true,
|
|
179
|
+
silent: true,
|
|
180
|
+
}).trim();
|
|
181
|
+
return result === 'true';
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Returns a filtered list of pods from the cluster.
|
|
186
|
+
* Supports wildcard glob patterns on pod names and optional deployId substring filtering.
|
|
187
|
+
* @param {object} [criteria={}] - Filter criteria.
|
|
188
|
+
* @param {string} [criteria.deployId] - Substring to match against pod names (forwards to `get`).
|
|
189
|
+
* @param {string} [criteria.podNames] - Comma-separated glob patterns (supports `*`).
|
|
190
|
+
* @param {string} [criteria.namespace='default'] - Kubernetes namespace to query.
|
|
191
|
+
* @returns {Array<object>} Filtered pod rows from `get`.
|
|
192
|
+
* @memberof UnderpostKubectl
|
|
193
|
+
*/
|
|
194
|
+
getFilteredPods(criteria = {}) {
|
|
195
|
+
const { podNames, namespace = 'default', deployId } = criteria;
|
|
196
|
+
try {
|
|
197
|
+
let pods = Underpost.kubectl.get(deployId || '', 'pods', namespace);
|
|
198
|
+
if (podNames) {
|
|
199
|
+
const patterns = podNames.split(',').map((p) => p.trim());
|
|
200
|
+
pods = pods.filter((pod) =>
|
|
201
|
+
patterns.some((pattern) => new RegExp('^' + pattern.replace(/\*/g, '.*') + '$').test(pod.NAME)),
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
logger.info(`Found ${pods.length} pod(s) matching criteria`, { criteria, podNames: pods.map((p) => p.NAME) });
|
|
205
|
+
return pods;
|
|
206
|
+
} catch (error) {
|
|
207
|
+
logger.error('Error filtering pods', { error: error.message, criteria });
|
|
208
|
+
return [];
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export default UnderpostKubectl;
|