cyberia 3.2.5 → 3.2.12
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/.github/workflows/engine-cyberia.cd.yml +8 -2
- package/.github/workflows/npmpkg.ci.yml +1 -0
- package/.github/workflows/pwa-microservices-template-test.ci.yml +1 -1
- package/.github/workflows/release.cd.yml +2 -2
- package/.vscode/extensions.json +9 -9
- package/.vscode/settings.json +20 -4
- package/CHANGELOG.md +563 -1
- package/CLI-HELP.md +130 -34
- package/Dockerfile +0 -4
- package/README.md +194 -607
- package/bin/build.js +42 -12
- package/bin/build.template.js +187 -0
- package/bin/cyberia.js +1367 -281
- package/bin/deploy.js +582 -3
- package/bin/index.js +1367 -281
- package/bump.config.js +26 -0
- package/conf.js +195 -111
- package/deployment.yaml +6 -222
- package/hardhat/package-lock.json +118 -149
- package/hardhat/package.json +5 -4
- package/jsconfig.json +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +2 -2
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +2 -2
- package/manifests/deployment/dd-cyberia-development/deployment.yaml +6 -222
- package/manifests/deployment/dd-cyberia-development/proxy.yaml +10 -118
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -6
- package/manifests/deployment/dd-test-development/deployment.yaml +138 -66
- package/manifests/deployment/dd-test-development/proxy.yaml +41 -5
- package/manifests/kind-config-dev.yaml +8 -0
- package/manifests/lxd/lxd-admin-profile.yaml +12 -3
- package/manifests/mongodb/pv-pvc.yaml +44 -8
- package/manifests/mongodb/statefulset.yaml +55 -68
- package/manifests/mongodb-4.4/headless-service.yaml +10 -0
- package/manifests/mongodb-4.4/kustomization.yaml +3 -1
- package/manifests/mongodb-4.4/mongodb-nodeport.yaml +17 -0
- package/manifests/mongodb-4.4/pv-pvc.yaml +10 -14
- package/manifests/mongodb-4.4/statefulset.yaml +79 -0
- package/manifests/mongodb-4.4/storage-class.yaml +9 -0
- package/manifests/valkey/statefulset.yaml +1 -1
- package/manifests/valkey/valkey-nodeport.yaml +17 -0
- package/package.json +45 -24
- package/proxy.yaml +10 -118
- package/scripts/ipxe-setup.sh +52 -49
- package/scripts/k3s-node-setup.sh +83 -48
- package/scripts/lxd-vm-setup.sh +193 -8
- package/scripts/maas-nat-firewalld.sh +145 -0
- package/scripts/nat-iptables.sh +103 -18
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.controller.js +18 -18
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.model.js +7 -14
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.router.js +38 -33
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +91 -36
- package/src/api/core/core.controller.js +10 -10
- package/src/api/core/core.router.js +19 -14
- package/src/api/core/core.service.js +15 -15
- package/src/api/crypto/crypto.controller.js +8 -8
- package/src/api/crypto/crypto.router.js +18 -12
- package/src/api/crypto/crypto.service.js +11 -11
- package/src/api/cyberia-action/cyberia-action.controller.js +74 -0
- package/src/api/cyberia-action/cyberia-action.model.js +87 -0
- package/src/api/cyberia-action/cyberia-action.router.js +31 -0
- package/src/api/cyberia-action/cyberia-action.service.js +42 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.controller.js +74 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.model.js +99 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.router.js +98 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.service.js +152 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.controller.js +13 -13
- package/src/api/cyberia-dialogue/cyberia-dialogue.model.js +11 -11
- package/src/api/cyberia-dialogue/cyberia-dialogue.router.js +25 -20
- package/src/api/cyberia-dialogue/cyberia-dialogue.service.js +22 -22
- package/src/api/cyberia-entity/cyberia-entity.controller.js +10 -10
- package/src/api/cyberia-entity/cyberia-entity.router.js +22 -18
- package/src/api/cyberia-entity/cyberia-entity.service.js +15 -15
- package/src/api/cyberia-instance/cyberia-fallback-world.js +83 -198
- package/src/api/cyberia-instance/cyberia-instance.controller.js +14 -14
- package/src/api/cyberia-instance/cyberia-instance.model.js +3 -0
- package/src/api/cyberia-instance/cyberia-instance.router.js +57 -52
- package/src/api/cyberia-instance/cyberia-instance.service.js +32 -67
- package/src/api/cyberia-instance/cyberia-portal-connector.js +20 -246
- package/src/api/cyberia-instance/cyberia-world-generator.js +505 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.controller.js +10 -10
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +18 -49
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.router.js +22 -18
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.service.js +19 -15
- package/src/api/cyberia-map/cyberia-map.controller.js +10 -10
- package/src/api/cyberia-map/cyberia-map.router.js +35 -30
- package/src/api/cyberia-map/cyberia-map.service.js +17 -17
- package/src/api/cyberia-quest/cyberia-quest.controller.js +74 -0
- package/src/api/cyberia-quest/cyberia-quest.model.js +67 -0
- package/src/api/cyberia-quest/cyberia-quest.router.js +31 -0
- package/src/api/cyberia-quest/cyberia-quest.service.js +42 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.controller.js +74 -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 +31 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.service.js +42 -0
- package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +451 -0
- package/src/api/default/default.controller.js +10 -10
- package/src/api/default/default.router.js +22 -18
- package/src/api/default/default.service.js +15 -15
- package/src/api/document/document.controller.js +12 -12
- package/src/api/document/document.model.js +10 -16
- package/src/api/document/document.router.js +28 -23
- package/src/api/document/document.service.js +100 -23
- package/src/api/file/file.controller.js +8 -8
- package/src/api/file/file.model.js +10 -10
- package/src/api/file/file.router.js +19 -13
- package/src/api/file/file.service.js +45 -43
- package/src/api/instance/instance.controller.js +10 -10
- package/src/api/instance/instance.model.js +4 -10
- package/src/api/instance/instance.router.js +29 -24
- package/src/api/instance/instance.service.js +16 -16
- package/src/api/ipfs/ipfs.controller.js +12 -12
- package/src/api/ipfs/ipfs.model.js +4 -13
- package/src/api/ipfs/ipfs.router.js +21 -16
- package/src/api/ipfs/ipfs.service.js +22 -36
- package/src/api/object-layer/object-layer.controller.js +12 -12
- package/src/api/object-layer/object-layer.model.js +4 -17
- package/src/api/object-layer/object-layer.router.js +512 -507
- package/src/api/object-layer/object-layer.service.js +29 -26
- package/src/api/object-layer-render-frames/object-layer-render-frames.controller.js +10 -10
- package/src/api/object-layer-render-frames/object-layer-render-frames.model.js +6 -16
- package/src/api/object-layer-render-frames/object-layer-render-frames.router.js +22 -18
- package/src/api/object-layer-render-frames/object-layer-render-frames.service.js +19 -15
- package/src/api/test/test.controller.js +8 -8
- package/src/api/test/test.router.js +17 -12
- package/src/api/test/test.service.js +8 -8
- package/src/api/types.js +24 -0
- package/src/api/user/guest.service.js +100 -0
- package/src/api/user/user.controller.js +6 -6
- package/src/api/user/user.model.js +8 -13
- package/src/api/user/user.router.js +297 -288
- package/src/api/user/user.service.js +103 -55
- package/src/cli/baremetal.js +132 -101
- package/src/cli/cluster.js +732 -217
- package/src/cli/db.js +106 -62
- package/src/cli/deploy.js +260 -149
- package/src/cli/fs.js +90 -9
- package/src/cli/image.js +43 -1
- package/src/cli/index.js +106 -16
- package/src/cli/ipfs.js +4 -6
- package/src/cli/kubectl.js +4 -1
- package/src/cli/lxd.js +1099 -223
- package/src/cli/monitor.js +9 -3
- package/src/cli/release.js +336 -86
- package/src/cli/repository.js +136 -53
- package/src/cli/run.js +599 -76
- package/src/cli/secrets.js +11 -2
- package/src/cli/ssh.js +1 -1
- package/src/cli/static.js +43 -115
- package/src/cli/test.js +9 -3
- package/src/client/Cryptokoyn.index.js +18 -21
- package/src/client/CyberiaPortal.index.js +19 -23
- package/src/client/Default.index.js +30 -36
- package/src/client/Itemledger.index.js +20 -26
- package/src/client/Underpost.index.js +19 -23
- package/src/client/components/core/404.js +4 -4
- package/src/client/components/core/500.js +4 -4
- package/src/client/components/core/Account.js +73 -60
- package/src/client/components/core/AgGrid.js +23 -33
- package/src/client/components/core/Alert.js +12 -13
- package/src/client/components/core/AppStore.js +1 -1
- package/src/client/components/core/Auth.js +40 -37
- package/src/client/components/core/Badge.js +7 -13
- package/src/client/components/core/BtnIcon.js +15 -17
- package/src/client/components/core/CalendarCore.js +42 -63
- package/src/client/components/core/Chat.js +13 -15
- package/src/client/components/core/ClientEvents.js +163 -0
- package/src/client/components/core/ColorPaletteElement.js +309 -0
- package/src/client/components/core/Content.js +17 -14
- package/src/client/components/core/Css.js +15 -71
- package/src/client/components/core/CssCore.js +12 -16
- package/src/client/components/core/D3Chart.js +4 -4
- package/src/client/components/core/Docs.js +64 -91
- package/src/client/components/core/DropDown.js +69 -91
- package/src/client/components/core/EventBus.js +96 -0
- package/src/client/components/core/EventsUI.js +14 -17
- package/src/client/components/core/FileExplorer.js +96 -228
- package/src/client/components/core/FullScreen.js +47 -75
- package/src/client/components/core/Input.js +24 -69
- package/src/client/components/core/Keyboard.js +25 -18
- package/src/client/components/core/KeyboardAvoidance.js +145 -0
- package/src/client/components/core/LoadingAnimation.js +25 -31
- package/src/client/components/core/LogIn.js +41 -41
- package/src/client/components/core/LogOut.js +23 -14
- package/src/client/components/core/Modal.js +544 -219
- package/src/client/components/core/NotificationManager.js +14 -18
- package/src/client/components/core/Panel.js +54 -50
- package/src/client/components/core/PanelForm.js +81 -177
- package/src/client/components/core/Polyhedron.js +110 -214
- package/src/client/components/core/PublicProfile.js +39 -32
- package/src/client/components/core/Recover.js +48 -44
- package/src/client/components/core/Responsive.js +88 -32
- package/src/client/components/core/RichText.js +9 -18
- package/src/client/components/core/Router.js +24 -3
- package/src/client/components/core/SearchBox.js +37 -37
- package/src/client/components/core/SignUp.js +39 -30
- package/src/client/components/core/SocketIo.js +31 -2
- package/src/client/components/core/SocketIoHandler.js +6 -6
- package/src/client/components/core/ToggleSwitch.js +8 -20
- package/src/client/components/core/ToolTip.js +5 -17
- package/src/client/components/core/Translate.js +56 -59
- package/src/client/components/core/Validator.js +26 -16
- package/src/client/components/core/Wallet.js +15 -26
- package/src/client/components/core/Worker.js +211 -276
- package/src/client/components/core/windowGetDimensions.js +7 -7
- package/src/client/components/cryptokoyn/{MenuCryptokoyn.js → AppShellCryptokoyn.js} +57 -57
- package/src/client/components/cryptokoyn/CssCryptokoyn.js +15 -15
- package/src/client/components/cryptokoyn/LogInCryptokoyn.js +6 -4
- package/src/client/components/cryptokoyn/LogOutCryptokoyn.js +6 -4
- package/src/client/components/cryptokoyn/RouterCryptokoyn.js +37 -0
- package/src/client/components/cryptokoyn/SettingsCryptokoyn.js +4 -4
- package/src/client/components/cryptokoyn/SignUpCryptokoyn.js +6 -4
- package/src/client/components/cyberia/InstanceEngineCyberia.js +141 -60
- package/src/client/components/cyberia/MapEngineCyberia.js +691 -214
- package/src/client/components/cyberia/ObjectLayerEngine.js +19 -0
- package/src/client/components/cyberia/ObjectLayerEngineModal.js +1204 -94
- package/src/client/components/cyberia/ObjectLayerEngineViewer.js +196 -298
- package/src/client/components/cyberia/SharedDefaultsCyberia.js +330 -0
- package/src/client/components/cyberia-portal/{MenuCyberiaPortal.js → AppShellCyberiaPortal.js} +102 -102
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +15 -15
- package/src/client/components/cyberia-portal/LogInCyberiaPortal.js +6 -4
- package/src/client/components/cyberia-portal/LogOutCyberiaPortal.js +6 -4
- package/src/client/components/cyberia-portal/MainBodyCyberiaPortal.js +4 -4
- package/src/client/components/cyberia-portal/RouterCyberiaPortal.js +60 -0
- package/src/client/components/cyberia-portal/SettingsCyberiaPortal.js +4 -4
- package/src/client/components/cyberia-portal/SignUpCyberiaPortal.js +6 -4
- package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +4 -4
- package/src/client/components/default/{MenuDefault.js → AppShellDefault.js} +87 -87
- package/src/client/components/default/CssDefault.js +12 -12
- package/src/client/components/default/LogInDefault.js +6 -4
- package/src/client/components/default/LogOutDefault.js +6 -4
- package/src/client/components/default/RouterDefault.js +47 -0
- package/src/client/components/default/SettingsDefault.js +4 -4
- package/src/client/components/default/SignUpDefault.js +6 -4
- package/src/client/components/default/TranslateDefault.js +3 -3
- package/src/client/components/itemledger/{MenuItemledger.js → AppShellItemledger.js} +57 -57
- package/src/client/components/itemledger/CssItemledger.js +15 -15
- package/src/client/components/itemledger/LogInItemledger.js +6 -4
- package/src/client/components/itemledger/LogOutItemledger.js +6 -4
- package/src/client/components/itemledger/RouterItemledger.js +38 -0
- package/src/client/components/itemledger/SettingsItemledger.js +4 -4
- package/src/client/components/itemledger/SignUpItemledger.js +6 -4
- package/src/client/components/itemledger/TranslateItemledger.js +3 -3
- package/src/client/components/underpost/{MenuUnderpost.js → AppShellUnderpost.js} +88 -88
- package/src/client/components/underpost/CssUnderpost.js +14 -14
- package/src/client/components/underpost/CyberpunkBloggerUnderpost.js +4 -4
- package/src/client/components/underpost/DocumentSearchProvider.js +1 -1
- package/src/client/components/underpost/LabGalleryUnderpost.js +12 -15
- package/src/client/components/underpost/LogInUnderpost.js +6 -4
- package/src/client/components/underpost/LogOutUnderpost.js +6 -4
- package/src/client/components/underpost/RouterUnderpost.js +45 -0
- package/src/client/components/underpost/SettingsUnderpost.js +4 -4
- package/src/client/components/underpost/SignUpUnderpost.js +6 -4
- package/src/client/components/underpost/TranslateUnderpost.js +4 -4
- package/src/client/public/cyberia-docs/ACTION-SYSTEM.md +235 -0
- package/src/client/public/cyberia-docs/ARCHITECTURE.md +83 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLI.md +204 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLIENT.md +291 -0
- package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +278 -0
- package/src/client/public/cyberia-docs/CYBERIA.md +259 -0
- package/src/client/public/cyberia-docs/ENTITY-PROFILE.md +241 -0
- package/src/client/public/cyberia-docs/HARDHAT-MODULE.md +300 -0
- package/src/client/public/cyberia-docs/OFF-CHAIN-ECONOMY.md +279 -0
- package/src/client/public/cyberia-docs/QUEST-SYSTEM.md +206 -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 +732 -0
- package/src/client/services/atlas-sprite-sheet/atlas-sprite-sheet.service.js +14 -20
- package/src/client/services/core/core.service.js +17 -49
- package/src/client/services/crypto/crypto.service.js +8 -13
- 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 +10 -16
- package/src/client/services/cyberia-entity/cyberia-entity.management.js +5 -5
- package/src/client/services/cyberia-entity/cyberia-entity.service.js +10 -16
- package/src/client/services/cyberia-instance/cyberia-instance.management.js +6 -6
- package/src/client/services/cyberia-instance/cyberia-instance.service.js +12 -18
- package/src/client/services/cyberia-instance-conf/cyberia-instance-conf.service.js +10 -16
- package/src/client/services/cyberia-map/cyberia-map.management.js +6 -6
- package/src/client/services/cyberia-map/cyberia-map.service.js +12 -18
- 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/default/default.management.js +159 -267
- package/src/client/services/default/default.service.js +10 -16
- package/src/client/services/document/document.service.js +14 -19
- package/src/client/services/file/file.service.js +8 -13
- package/src/client/services/instance/instance.management.js +5 -5
- package/src/client/services/instance/instance.service.js +10 -15
- package/src/client/services/ipfs/ipfs.service.js +12 -18
- package/src/client/services/object-layer/object-layer.management.js +12 -12
- package/src/client/services/object-layer/object-layer.service.js +20 -26
- package/src/client/services/object-layer-render-frames/object-layer-render-frames.service.js +10 -16
- package/src/client/services/test/test.service.js +8 -13
- package/src/client/services/user/guest.service.js +86 -0
- package/src/client/services/user/user.management.js +5 -5
- package/src/client/services/user/user.service.js +14 -20
- package/src/client/ssr/body/404.js +3 -3
- package/src/client/ssr/body/500.js +3 -3
- package/src/client/ssr/body/CacheControl.js +5 -2
- package/src/client/ssr/body/DefaultSplashScreen.js +19 -12
- package/src/client/ssr/body/UnderpostDefaultSplashScreen.js +13 -6
- package/src/client/ssr/head/PwaItemledger.js +197 -60
- package/src/client/ssr/mailer/DefaultRecoverEmail.js +19 -20
- package/src/client/ssr/mailer/DefaultVerifyEmail.js +15 -16
- package/src/client/ssr/views/CyberiaServerMetrics.js +982 -0
- package/src/client/ssr/{offline → views}/Maintenance.js +12 -11
- package/src/client/ssr/{offline → views}/NoNetworkConnection.js +3 -3
- package/src/client/ssr/{pages → views}/Test.js +2 -2
- package/src/client/sw/core.sw.js +274 -0
- package/src/db/DataBaseProvider.js +115 -15
- package/src/db/mariadb/MariaDB.js +2 -1
- package/src/db/mongo/MongoBootstrap.js +657 -0
- package/src/db/mongo/MongooseDB.js +129 -21
- package/src/grpc/cyberia/grpc-server.js +185 -105
- package/src/index.js +1 -1
- package/src/runtime/cyberia-client/Dockerfile +101 -0
- package/src/runtime/cyberia-client/Dockerfile.dev +82 -0
- package/src/runtime/cyberia-server/Dockerfile +62 -0
- package/src/runtime/cyberia-server/Dockerfile.dev +71 -0
- package/src/runtime/express/Dockerfile +4 -4
- package/src/runtime/express/Express.js +2 -2
- package/src/runtime/lampp/Dockerfile +8 -7
- package/src/runtime/wp/Dockerfile +11 -17
- package/src/runtime/wp/Wp.js +8 -5
- package/src/server/atlas-sprite-sheet-generator.js +4 -2
- package/src/server/auth.js +2 -2
- package/src/server/client-build-docs.js +46 -47
- package/src/server/client-build.js +371 -132
- package/src/server/client-formatted.js +47 -16
- package/src/server/conf.js +91 -87
- package/src/server/data-query.js +32 -20
- package/src/server/dns.js +22 -0
- package/src/server/ipfs-client.js +232 -91
- package/src/server/object-layer.js +1 -6
- package/src/server/process.js +192 -45
- package/src/server/proxy.js +9 -2
- package/src/server/runtime.js +1 -1
- package/src/server/semantic-layer-generator-floor.js +11 -51
- package/src/server/semantic-layer-generator-resource.js +259 -0
- package/src/server/semantic-layer-generator-skin.js +41 -171
- package/src/server/semantic-layer-generator.js +122 -14
- package/src/server/shape-generator.js +108 -0
- package/src/server/start.js +34 -8
- package/src/server/valkey.js +143 -235
- package/src/ws/IoInterface.js +16 -16
- package/src/ws/core/channels/core.ws.chat.js +11 -11
- package/src/ws/core/channels/core.ws.mailer.js +29 -29
- package/src/ws/core/channels/core.ws.stream.js +19 -19
- package/src/ws/core/core.ws.connection.js +8 -8
- package/src/ws/core/core.ws.server.js +6 -5
- package/src/ws/default/channels/default.ws.main.js +10 -10
- package/src/ws/default/default.ws.connection.js +4 -4
- package/src/ws/default/default.ws.server.js +4 -3
- package/tsconfig.docs.json +15 -0
- package/typedoc.dd-cyberia.json +29 -0
- package/typedoc.json +29 -0
- package/WHITE-PAPER.md +0 -1540
- package/bin/file.js +0 -196
- package/bin/vs.js +0 -74
- package/bin/zed.js +0 -84
- package/hardhat/README.md +0 -531
- package/hardhat/WHITE-PAPER.md +0 -1540
- package/jsdoc.dd-cyberia.json +0 -68
- package/jsdoc.json +0 -68
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.defaults.js +0 -413
- package/src/api/object-layer/README.md +0 -672
- package/src/client/components/core/ColorPalette.js +0 -5267
- package/src/client/components/core/JoyStick.js +0 -80
- package/src/client/components/cryptokoyn/RoutesCryptokoyn.js +0 -39
- package/src/client/components/cyberia-portal/CommonCyberiaPortal.js +0 -223
- package/src/client/components/cyberia-portal/RoutesCyberiaPortal.js +0 -62
- package/src/client/components/cyberia-portal/ServerCyberiaPortal.js +0 -136
- package/src/client/components/default/RoutesDefault.js +0 -49
- package/src/client/components/itemledger/RoutesItemledger.js +0 -40
- package/src/client/components/underpost/RoutesUnderpost.js +0 -47
- package/src/client/ssr/email/DefaultRecoverEmail.js +0 -21
- package/src/client/ssr/email/DefaultVerifyEmail.js +0 -17
- package/src/client/ssr/pages/CyberiaServerMetrics.js +0 -461
- package/src/client/sw/default.sw.js +0 -127
- package/src/client/sw/template.sw.js +0 -84
- package/src/grpc/cyberia/OFF_CHAIN_ECONOMY.md +0 -305
- package/src/grpc/cyberia/README.md +0 -326
package/src/cli/fs.js
CHANGED
|
@@ -75,6 +75,7 @@ class UnderpostFileStorage {
|
|
|
75
75
|
* @param {boolean} [options.force=false] - Flag to force file operations.
|
|
76
76
|
* @param {boolean} [options.pull=false] - Flag to pull files from storage.
|
|
77
77
|
* @param {boolean} [options.git=false] - Flag to use Git for file operations.
|
|
78
|
+
* @param {boolean} [options.omitUnzip=false] - If true, do not extract zip and keep downloaded zip file.
|
|
78
79
|
* @param {string} [options.storageFilePath=''] - The path to the storage configuration file.
|
|
79
80
|
* @returns {Promise<void>} A promise that resolves when the recursive callback is complete.
|
|
80
81
|
* @memberof UnderpostFileStorage
|
|
@@ -88,10 +89,54 @@ class UnderpostFileStorage {
|
|
|
88
89
|
force: false,
|
|
89
90
|
pull: false,
|
|
90
91
|
git: false,
|
|
92
|
+
omitUnzip: false,
|
|
91
93
|
storageFilePath: '',
|
|
92
94
|
},
|
|
93
95
|
) {
|
|
94
96
|
const { storage, storageConf } = Underpost.fs.getStorageConf(options);
|
|
97
|
+
|
|
98
|
+
// In recursive remove mode, delete every tracked storage key under the requested path,
|
|
99
|
+
// even when local files/directories are already missing.
|
|
100
|
+
if (options.rm === true) {
|
|
101
|
+
const normalizedPath = typeof path === 'string' ? path.trim() : '';
|
|
102
|
+
const basePath = normalizedPath.replace(/\/+$/, '');
|
|
103
|
+
const hasPathFilter = basePath.length > 0;
|
|
104
|
+
|
|
105
|
+
const associatedPaths = Object.keys(storage || {}).filter((storedPath) => {
|
|
106
|
+
if (!hasPathFilter) return true;
|
|
107
|
+
return storedPath === basePath || storedPath.startsWith(`${basePath}/`);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
for (const associatedPath of associatedPaths) {
|
|
111
|
+
await Underpost.fs.delete(associatedPath);
|
|
112
|
+
if (storage) delete storage[associatedPath];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (hasPathFilter && options.force === true && fs.existsSync(basePath)) fs.removeSync(basePath);
|
|
116
|
+
|
|
117
|
+
Underpost.fs.writeStorageConf(storage, storageConf);
|
|
118
|
+
|
|
119
|
+
if (associatedPaths.length === 0)
|
|
120
|
+
logger.warn('No associated tracked storage paths found', { path: hasPathFilter ? basePath : '*' });
|
|
121
|
+
else
|
|
122
|
+
logger.info('Removed associated tracked storage paths', {
|
|
123
|
+
path: hasPathFilter ? basePath : '*',
|
|
124
|
+
removed: associatedPaths.length,
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
if (options.git === true) {
|
|
128
|
+
const gitPath = hasPathFilter ? basePath : '.';
|
|
129
|
+
shellExec(`cd ${gitPath} && git add .`);
|
|
130
|
+
shellExec(`underpost cmt ${gitPath} feat`, {
|
|
131
|
+
silentOnError: true,
|
|
132
|
+
silent: true,
|
|
133
|
+
disableLog: true,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
95
140
|
const deleteFiles = options.pull === true ? [] : Underpost.repo.getDeleteFiles(path);
|
|
96
141
|
for (const relativePath of deleteFiles) {
|
|
97
142
|
const _path = path + '/' + relativePath;
|
|
@@ -109,8 +154,14 @@ class UnderpostFileStorage {
|
|
|
109
154
|
} else pullSkipCount++;
|
|
110
155
|
}
|
|
111
156
|
if (pullSkipCount > 0) logger.warn(`Pull skipped ${pullSkipCount} files that already exist`);
|
|
112
|
-
|
|
113
|
-
|
|
157
|
+
// Only run git init/commit when the caller explicitly requests git tracking (--git flag).
|
|
158
|
+
// For bundle pulls into ./build the git step is unwanted and would error on a non-repo path.
|
|
159
|
+
if (options.git === true) {
|
|
160
|
+
Underpost.repo.initLocalRepo({ path });
|
|
161
|
+
shellExec(`cd ${path} && git add . && git commit -m "Base pull state"`, {
|
|
162
|
+
silentOnError: true,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
114
165
|
} else {
|
|
115
166
|
const files =
|
|
116
167
|
options.git === true ? Underpost.repo.getChangedFiles(path) : await fs.readdir(path, { recursive: true });
|
|
@@ -128,7 +179,11 @@ class UnderpostFileStorage {
|
|
|
128
179
|
Underpost.fs.writeStorageConf(storage, storageConf);
|
|
129
180
|
if (options.git === true) {
|
|
130
181
|
shellExec(`cd ${path} && git add .`);
|
|
131
|
-
shellExec(`underpost cmt ${path} feat
|
|
182
|
+
shellExec(`underpost cmt ${path} feat`, {
|
|
183
|
+
silentOnError: true,
|
|
184
|
+
silent: true,
|
|
185
|
+
disableLog: true,
|
|
186
|
+
});
|
|
132
187
|
}
|
|
133
188
|
},
|
|
134
189
|
/**
|
|
@@ -143,12 +198,13 @@ class UnderpostFileStorage {
|
|
|
143
198
|
* @param {boolean} [options.force=false] - Flag to force file operations.
|
|
144
199
|
* @param {boolean} [options.pull=false] - Flag to pull files from storage.
|
|
145
200
|
* @param {boolean} [options.git=false] - Flag to use Git for file operations.
|
|
201
|
+
* @param {boolean} [options.omitUnzip=false] - If true, do not extract zip and keep downloaded zip file.
|
|
146
202
|
* @returns {Promise<void>} A promise that resolves when the callback is complete.
|
|
147
203
|
* @memberof UnderpostFileStorage
|
|
148
204
|
*/
|
|
149
205
|
async callback(
|
|
150
206
|
path,
|
|
151
|
-
options = { rm: false, recursive: false, deployId: '', force: false, pull: false, git: false },
|
|
207
|
+
options = { rm: false, recursive: false, deployId: '', force: false, pull: false, git: false, omitUnzip: false },
|
|
152
208
|
) {
|
|
153
209
|
if (options.recursive === true || options.git === true)
|
|
154
210
|
return await Underpost.fs.recursiveCallback(path, options);
|
|
@@ -161,11 +217,13 @@ class UnderpostFileStorage {
|
|
|
161
217
|
* @description Uploads a file to Cloudinary.
|
|
162
218
|
* @param {string} path - The path to the file to upload.
|
|
163
219
|
* @param {object} [options] - An object containing options for the upload.
|
|
164
|
-
* @param {
|
|
220
|
+
* @param {string} [options.deployId=''] - The identifier for the deployment (used to locate the storage config file).
|
|
221
|
+
* @param {boolean} [options.force=false] - Flag to force file operations (overwrites existing remote asset).
|
|
165
222
|
* @param {string} [options.storageFilePath=''] - The path to the storage configuration file.
|
|
166
223
|
* @returns {Promise<object>} A promise that resolves to the upload result.
|
|
167
224
|
* @memberof UnderpostFileStorage
|
|
168
225
|
*/
|
|
226
|
+
|
|
169
227
|
async upload(
|
|
170
228
|
path,
|
|
171
229
|
options = { rm: false, recursive: false, deployId: '', force: false, pull: false, storageFilePath: '' },
|
|
@@ -191,22 +249,45 @@ class UnderpostFileStorage {
|
|
|
191
249
|
* @method pull
|
|
192
250
|
* @description Pulls a file from Cloudinary.
|
|
193
251
|
* @param {string} path - The path to the file to pull.
|
|
252
|
+
* @param {object} [options] - Pull options.
|
|
253
|
+
* @param {boolean} [options.omitUnzip=false] - If true, do not extract zip and keep downloaded zip file.
|
|
254
|
+
* @param {boolean} [options.force=false] - If true, re-download even if the local zip already exists.
|
|
194
255
|
* @returns {Promise<void>} A promise that resolves when the file is pulled.
|
|
195
256
|
* @memberof UnderpostFileStorage
|
|
196
257
|
*/
|
|
197
|
-
async pull(path) {
|
|
258
|
+
async pull(path, options = { omitUnzip: false, force: false }) {
|
|
198
259
|
Underpost.fs.cloudinaryConfig();
|
|
199
260
|
const folder = dir.dirname(path);
|
|
200
261
|
if (!fs.existsSync(folder)) fs.mkdirSync(folder, { recursive: true });
|
|
262
|
+
const zipPath = `${path}.zip`;
|
|
263
|
+
|
|
264
|
+
if (options.omitUnzip === true && options.force !== true && fs.existsSync(zipPath)) {
|
|
265
|
+
logger.warn('pull skipped, zip already exists and omit-unzip is enabled', { path, zipPath });
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
|
|
201
269
|
const downloadResult = await cloudinary.utils.download_archive_url({
|
|
202
270
|
public_ids: [path],
|
|
203
271
|
resource_type: 'raw',
|
|
204
272
|
});
|
|
205
273
|
logger.info('download result', downloadResult);
|
|
206
|
-
await Downloader.downloadFile(downloadResult,
|
|
207
|
-
|
|
208
|
-
|
|
274
|
+
await Downloader.downloadFile(downloadResult, zipPath);
|
|
275
|
+
|
|
276
|
+
if (options.omitUnzip === true) {
|
|
277
|
+
logger.warn('omit unzip enabled, keeping downloaded zip file', { path, zipPath });
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
path = Underpost.fs.zip2File(zipPath);
|
|
282
|
+
fs.removeSync(`${path}.zip`);
|
|
209
283
|
},
|
|
284
|
+
/**
|
|
285
|
+
* @method delete
|
|
286
|
+
* @description Deletes a file from Cloudinary by its public ID.
|
|
287
|
+
* @param {string} path - The path (public ID) of the file to delete.
|
|
288
|
+
* @returns {Promise<object>} A promise that resolves to the Cloudinary delete result.
|
|
289
|
+
* @memberof UnderpostFileStorage
|
|
290
|
+
*/
|
|
210
291
|
async delete(path) {
|
|
211
292
|
Underpost.fs.cloudinaryConfig();
|
|
212
293
|
const deleteResult = await cloudinary.api
|
package/src/cli/image.js
CHANGED
|
@@ -99,6 +99,7 @@ class UnderpostImage {
|
|
|
99
99
|
if (!path) path = '.';
|
|
100
100
|
if (!imageName) imageName = `rockylinux9-underpost:${Underpost.version}`;
|
|
101
101
|
if (!imagePath) imagePath = '.';
|
|
102
|
+
if (imageName.match('/')) imageName = imageName.split('/')[1];
|
|
102
103
|
if (!version) version = 'latest';
|
|
103
104
|
version = imageName && imageName.match(':') ? '' : `:${version}`;
|
|
104
105
|
const podManImg = `localhost/${imageName}${version}`;
|
|
@@ -178,6 +179,12 @@ class UnderpostImage {
|
|
|
178
179
|
* @memberof UnderpostImage
|
|
179
180
|
*/
|
|
180
181
|
pullDockerHubImage(options = { k3s: false, kubeadm: false, kind: false, dockerhubImage: '', version: '' }) {
|
|
182
|
+
if (options.dockerhubImage && options.dockerhubImage.startsWith('localhost')) {
|
|
183
|
+
logger.warn(`[image] pullDockerHubImage skipped — local image cannot be pulled from Docker Hub`, {
|
|
184
|
+
dockerhubImage: options.dockerhubImage,
|
|
185
|
+
});
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
181
188
|
if (options.dockerhubImage === 'underpost') {
|
|
182
189
|
options.dockerhubImage = 'underpost/underpost-engine';
|
|
183
190
|
if (!options.version) options.version = Underpost.version;
|
|
@@ -185,7 +192,42 @@ class UnderpostImage {
|
|
|
185
192
|
if (!options.version) options.version = 'latest';
|
|
186
193
|
const version = options.dockerhubImage && options.dockerhubImage.match(':') ? '' : `:${options.version}`;
|
|
187
194
|
const image = `${options.dockerhubImage}${version}`;
|
|
188
|
-
|
|
195
|
+
const targetKind = options.kind === true;
|
|
196
|
+
const targetK3s = options.k3s === true;
|
|
197
|
+
const targetKubeadm = options.kubeadm === true || (!targetKind && !targetK3s);
|
|
198
|
+
|
|
199
|
+
const requestedRepo = image.replace(/:[^/]+$/, '');
|
|
200
|
+
const requestedTag = image.match(/:([^/]+)$/)?.[1] || 'latest';
|
|
201
|
+
const normalizeRepo = (repo = '') =>
|
|
202
|
+
repo
|
|
203
|
+
.trim()
|
|
204
|
+
.replace(/^localhost\//, '')
|
|
205
|
+
.replace(/^docker\.io\//, '')
|
|
206
|
+
.replace(/^library\//, '');
|
|
207
|
+
|
|
208
|
+
const currentImages = UnderpostImage.API.list({
|
|
209
|
+
kind: targetKind,
|
|
210
|
+
kubeadm: targetKubeadm,
|
|
211
|
+
k3s: targetK3s,
|
|
212
|
+
log: false,
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
const existsInCluster = currentImages.some((row) => {
|
|
216
|
+
const rowImageRaw = String(row.IMAGE || row.image || '').trim();
|
|
217
|
+
if (!rowImageRaw) return false;
|
|
218
|
+
const rowImage = rowImageRaw.replace(/:[^/]+$/, '');
|
|
219
|
+
const rowTag = String(row.TAG || rowImageRaw.match(/:([^/]+)$/)?.[1] || '').trim();
|
|
220
|
+
return normalizeRepo(rowImage) === normalizeRepo(requestedRepo) && rowTag === requestedTag;
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
if (existsInCluster) {
|
|
224
|
+
logger.info(`[image] pull skipped. Image already loaded`, {
|
|
225
|
+
image,
|
|
226
|
+
clusterType: targetKind ? 'kind' : targetK3s ? 'k3s' : 'kubeadm',
|
|
227
|
+
});
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
if (targetKind) {
|
|
189
231
|
shellExec(`docker pull ${image}`);
|
|
190
232
|
shellExec(`sudo kind load docker-image ${image}`);
|
|
191
233
|
} else {
|
package/src/cli/index.js
CHANGED
|
@@ -46,6 +46,9 @@ program
|
|
|
46
46
|
.option('--sync-env-port', 'Sync environment port assignments across all deploy IDs')
|
|
47
47
|
.option('--single-replica', 'Build single replica folders instead of full client')
|
|
48
48
|
.option('--build-zip', 'Create zip files of the builds')
|
|
49
|
+
.option('--split <mb>', 'Split generated zip files into parts of the specified size in MB')
|
|
50
|
+
.option('--unzip <build-prefix>', 'Extract a built client zip or split zip parts using the given build prefix')
|
|
51
|
+
.option('--merge-zip <build-prefix>', 'Merge split ZIP parts back into a single ZIP file for the given build prefix')
|
|
49
52
|
.option('--lite-build', 'Skip full build (default is full build)')
|
|
50
53
|
.option('--icons-build', 'Build icons')
|
|
51
54
|
.description('Builds client assets, single replicas, and/or syncs environment ports.')
|
|
@@ -62,6 +65,11 @@ program
|
|
|
62
65
|
.option('--build', 'Triggers the client-side application build process.')
|
|
63
66
|
.option('--underpost-quickly-install', 'Uses Underpost Quickly Install for dependency installation.')
|
|
64
67
|
.option('--skip-pull-base', 'Skips cloning repositories, uses current workspace code directly.')
|
|
68
|
+
.option('--skip-full-build', 'Skips the full client bundle build during deployment.')
|
|
69
|
+
.option(
|
|
70
|
+
'--pull-bundle',
|
|
71
|
+
'Downloads the pre-built client bundle from Cloudinary via pull-bundle before starting. Use together with --skip-full-build to skip the local build entirely.',
|
|
72
|
+
)
|
|
65
73
|
.action(Underpost.start.callback)
|
|
66
74
|
.description('Initiates application servers, build pipelines, or other defined services based on the deployment ID.');
|
|
67
75
|
|
|
@@ -226,6 +234,7 @@ program
|
|
|
226
234
|
.option('--ban-egress-clear', 'Clears all banned egress IP addresses.')
|
|
227
235
|
.option('--ban-both-add', 'Adds IP addresses to both banned ingress and egress lists.')
|
|
228
236
|
.option('--ban-both-remove', 'Removes IP addresses from both banned ingress and egress lists.')
|
|
237
|
+
.option('--mac', 'Prints the MAC address of the main network interface.')
|
|
229
238
|
.description('Displays the current public machine IP addresses.')
|
|
230
239
|
.action(Underpost.dns.ipDispatcher);
|
|
231
240
|
|
|
@@ -233,15 +242,27 @@ program
|
|
|
233
242
|
.command('cluster')
|
|
234
243
|
.argument('[pod-name]', 'Optional: Filters information by a specific pod name.')
|
|
235
244
|
.option('--reset', `Deletes all clusters and prunes all related data and caches.`)
|
|
245
|
+
.option(
|
|
246
|
+
'--reset-mongodb',
|
|
247
|
+
`Performs a hard cleanup of only MongoDB-related resources (StatefulSet, PVCs/PVs, Secrets, ConfigMaps, caches) without restarting the whole node.`,
|
|
248
|
+
)
|
|
236
249
|
.option('--mariadb', 'Initializes the cluster with a MariaDB statefulset.')
|
|
237
250
|
.option('--mysql', 'Initializes the cluster with a MySQL statefulset.')
|
|
238
251
|
.option('--mongodb', 'Initializes the cluster with a MongoDB statefulset.')
|
|
239
|
-
.option('--
|
|
252
|
+
.option('--service-host <host>', 'Set custom host/IP for exposed MongoDB and Valkey clients.')
|
|
240
253
|
.option('--postgresql', 'Initializes the cluster with a PostgreSQL statefulset.')
|
|
241
254
|
.option('--mongodb4', 'Initializes the cluster with a MongoDB 4.4 service.')
|
|
242
255
|
.option('--valkey', 'Initializes the cluster with a Valkey service.')
|
|
243
256
|
.option('--ipfs', 'Initializes the cluster with an ipfs-cluster statefulset.')
|
|
244
257
|
.option('--contour', 'Initializes the cluster with Project Contour base HTTPProxy and Envoy.')
|
|
258
|
+
.option(
|
|
259
|
+
'--node-port',
|
|
260
|
+
'Exposes enabled ready services (e.g. MongoDB 4.4, Valkey) to the host/public network via their NodePort Service manifest.',
|
|
261
|
+
)
|
|
262
|
+
.option(
|
|
263
|
+
'--node-selector <k8s-node-name>',
|
|
264
|
+
'Pins the just-deployed StatefulSet (MongoDB 4.4 / Valkey) to the given Kubernetes node once it is ready (via a kubernetes.io/hostname nodeSelector).',
|
|
265
|
+
)
|
|
245
266
|
.option('--cert-manager', "Initializes the cluster with a Let's Encrypt production ClusterIssuer.")
|
|
246
267
|
.option('--dedicated-gpu', 'Initializes the cluster with dedicated GPU base resources and environment settings.')
|
|
247
268
|
.option(
|
|
@@ -272,6 +293,10 @@ program
|
|
|
272
293
|
.option('--k3s', 'Initializes the cluster using K3s (Lightweight Kubernetes).')
|
|
273
294
|
.option('--hosts <hosts>', 'A comma-separated list of cluster hostnames or IP addresses.')
|
|
274
295
|
.option('--remove-volume-host-paths', 'Removes specified volume host paths after execution.')
|
|
296
|
+
.option(
|
|
297
|
+
'--reset-mode <mode>',
|
|
298
|
+
'Reset mode for --reset --k3s: "drain" (stop services, keep K3s installed) or "full" (uninstall + cleanup). Default: "full".',
|
|
299
|
+
)
|
|
275
300
|
.option('--namespace <namespace>', 'Kubernetes namespace for cluster operations (defaults to "default").')
|
|
276
301
|
.option('--replicas <replicas>', 'Sets a custom number of replicas for statefulset deployments.')
|
|
277
302
|
.action(Underpost.cluster.init)
|
|
@@ -318,8 +343,6 @@ program
|
|
|
318
343
|
.option('--k3s', 'Enables the k3s context for deployment operations.')
|
|
319
344
|
.option('--kind', 'Enables the kind context for deployment operations.')
|
|
320
345
|
.option('--git-clean', 'Runs git clean on volume mount paths before copying.')
|
|
321
|
-
.option('--etc-hosts', 'Enables the etc-hosts context for deployment operations.')
|
|
322
|
-
.option('--restore-hosts', 'Restores default `/etc/hosts` entries.')
|
|
323
346
|
.option('--disable-update-underpost-config', 'Disables updates to Underpost configuration during deployment.')
|
|
324
347
|
.option('--namespace <namespace>', 'Kubernetes namespace for deployment operations (defaults to "default").')
|
|
325
348
|
.option('--kind-type <kind-type>', 'Specifies the Kind cluster type for deployment operations.')
|
|
@@ -329,6 +352,18 @@ program
|
|
|
329
352
|
'Sets the local:remote port to expose when --expose is active (overrides auto-detected service port).',
|
|
330
353
|
)
|
|
331
354
|
.option('--cmd <cmd>', 'Custom initialization command for deployment (comma-separated commands).')
|
|
355
|
+
.option(
|
|
356
|
+
'--skip-full-build',
|
|
357
|
+
'Skip client bundle rebuild; container will pull pre-built bundle via pull-bundle instead.',
|
|
358
|
+
)
|
|
359
|
+
.option(
|
|
360
|
+
'--pull-bundle',
|
|
361
|
+
'Explicitly pull the pre-built client bundle from Cloudinary inside the container. Use together with --skip-full-build.',
|
|
362
|
+
)
|
|
363
|
+
.option(
|
|
364
|
+
'--image-pull-policy <policy>',
|
|
365
|
+
'Override container imagePullPolicy in the generated deployment manifest (Always, IfNotPresent, Never). Defaults to Never for localhost/ images and IfNotPresent otherwise.',
|
|
366
|
+
)
|
|
332
367
|
.description('Manages application deployments, defaulting to deploying development pods.')
|
|
333
368
|
.action(Underpost.deploy.callback);
|
|
334
369
|
|
|
@@ -485,6 +520,7 @@ program
|
|
|
485
520
|
.option('--recursive', 'Uploads files recursively from the specified path.')
|
|
486
521
|
.option('--deploy-id <deploy-id>', 'Specifies the deployment configuration ID for file operations.')
|
|
487
522
|
.option('--pull', 'Downloads the specified file.')
|
|
523
|
+
.option('--omit-unzip', 'With --pull, keeps the downloaded .zip file and skips extraction.')
|
|
488
524
|
.option('--force', 'Forces the action, overriding any warnings or conflicts.')
|
|
489
525
|
.option('--storage-file-path <storage-file-path>', 'Specifies a custom file storage path.')
|
|
490
526
|
.description('Manages file storage, defaulting to file upload operations.')
|
|
@@ -613,7 +649,6 @@ program
|
|
|
613
649
|
.option('--k3s', 'Sets the k3s cluster context for the runner execution.')
|
|
614
650
|
.option('--kind', 'Sets the kind cluster context for the runner execution.')
|
|
615
651
|
.option('--git-clean', 'Runs git clean on volume mount paths before copying.')
|
|
616
|
-
.option('--log-type <log-type>', 'Sets the log type for the runner execution.')
|
|
617
652
|
.option('--deploy-id <deploy-id>', 'Sets deploy id context for the runner execution.')
|
|
618
653
|
.option('--user <user>', 'Sets user context for the runner execution.')
|
|
619
654
|
.option('--hosts <hosts>', 'Comma-separated list of hosts for the runner execution.')
|
|
@@ -657,13 +692,41 @@ program
|
|
|
657
692
|
'(e.g., "127.0.0.1=foo.local,bar.local;10.1.2.3=foo.remote,bar.remote").',
|
|
658
693
|
)
|
|
659
694
|
.option('--copy', 'Copies the runner output to the clipboard (supported by: generate-pass, template-deploy-local).')
|
|
695
|
+
.option(
|
|
696
|
+
'--skip-full-build',
|
|
697
|
+
'Skip client bundle rebuild; triggers pull-bundle in container startup (supported by: sync, template-deploy).',
|
|
698
|
+
)
|
|
699
|
+
.option(
|
|
700
|
+
'--pull-bundle',
|
|
701
|
+
'Explicitly download the pre-built client bundle from Cloudinary inside the container (supported by: sync, template-deploy). Use together with --skip-full-build.',
|
|
702
|
+
)
|
|
703
|
+
.option('--remove', 'Remove/teardown resources')
|
|
660
704
|
.description('Runs specified scripts using various runners.')
|
|
661
705
|
.action(Underpost.run.callback);
|
|
662
706
|
|
|
663
707
|
program
|
|
664
708
|
.command('lxd')
|
|
709
|
+
.argument(
|
|
710
|
+
'[vm-id]',
|
|
711
|
+
'VM identifier shared by current-VM flags like --vm-create, --vm-delete, --vm-init, --vm-info, and --vm-test.',
|
|
712
|
+
)
|
|
665
713
|
.option('--init', 'Initializes LXD on the current machine via preseed.')
|
|
666
|
-
.option(
|
|
714
|
+
.option(
|
|
715
|
+
'--reset',
|
|
716
|
+
'Host-safe reset: removes proxy devices, stops/deletes VMs, drops admin-profile and lxdbr0. Does NOT touch the LXD snap or storage pools.',
|
|
717
|
+
)
|
|
718
|
+
.option(
|
|
719
|
+
'--purge',
|
|
720
|
+
'DESTRUCTIVE: gracefully shuts down the LXD daemon (60s timeout), then removes the LXD snap. Combine with --reset to wipe per-VM state first. Safe replacement for the prior aggressive teardown.',
|
|
721
|
+
)
|
|
722
|
+
.option(
|
|
723
|
+
'--shutdown',
|
|
724
|
+
'Pre-host-reboot procedure: gracefully stops every VM and the LXD daemon. Run BEFORE any reboot/poweroff to keep the host bootable.',
|
|
725
|
+
)
|
|
726
|
+
.option(
|
|
727
|
+
'--restore',
|
|
728
|
+
'Symmetric to --shutdown: starts the LXD daemon, waits for it to be responsive, then starts every VM. VMs created via admin-profile have boot.autostart=false, so this is the explicit "bring the lab back up" command.',
|
|
729
|
+
)
|
|
667
730
|
.option('--install', 'Installs the LXD snap.')
|
|
668
731
|
.option('--dev', 'Use local paths instead of the global npm installation.')
|
|
669
732
|
.option('--create-virtual-network', 'Creates the lxdbr0 bridge network.')
|
|
@@ -671,25 +734,48 @@ program
|
|
|
671
734
|
.option('--create-admin-profile', 'Creates the admin-profile for VM management.')
|
|
672
735
|
.option('--control', 'Initialize the target VM as a K3s control plane node.')
|
|
673
736
|
.option('--worker', 'Initialize the target VM as a K3s worker node.')
|
|
674
|
-
.option('--
|
|
675
|
-
.option(
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
.option(
|
|
737
|
+
.option('--vm-create', 'Copy the LXC launch command for the command argument [vm-id] to the clipboard.')
|
|
738
|
+
.option(
|
|
739
|
+
'--vm-delete',
|
|
740
|
+
'SAFELY stop and delete the command argument [vm-id] (removes proxy devices first, then stops, then deletes). Safe to re-run.',
|
|
741
|
+
)
|
|
742
|
+
.option(
|
|
743
|
+
'--vm-init',
|
|
744
|
+
'Bring the command argument [vm-id] up as a K3s node end-to-end: OS base setup, mirror /home/dd/engine into the VM, then K3s role install via the local engine (use with --control or --worker).',
|
|
745
|
+
)
|
|
746
|
+
.option('--vm-info', 'Display full configuration and status for the command argument [vm-id].')
|
|
747
|
+
.option('--vm-test', 'Run connectivity and health checks on the command argument [vm-id].')
|
|
748
|
+
.option(
|
|
749
|
+
'--vm-sync-engine',
|
|
750
|
+
'Re-copy the host engine source into the command argument [vm-id], overriding whatever is currently there (equivalent to the engine-bootstrap step of --vm-init in isolation).',
|
|
751
|
+
)
|
|
752
|
+
.option('--root-size <gb-size>', 'Root disk size in GiB for --vm-create (default: 32).')
|
|
680
753
|
.option(
|
|
681
754
|
'--join-node <nodes>',
|
|
682
755
|
'Join a K3s worker to a control plane. Standalone format: "workerName,controlName". ' +
|
|
683
|
-
'When used with --init
|
|
756
|
+
'When used with --vm-init --worker, provide just the control node name for auto-join.',
|
|
684
757
|
)
|
|
685
758
|
.option('--expose <vm-name:ports>', 'Proxy host ports to a VM (e.g., "k3s-control:80,443").')
|
|
759
|
+
.option(
|
|
760
|
+
'--node-port <port>',
|
|
761
|
+
'Customizes the VM-side (connect) port for --expose, so the host listens on the given port but proxies to this NodePort inside the VM (e.g. expose host 27017 -> VM NodePort 32017).',
|
|
762
|
+
)
|
|
686
763
|
.option('--delete-expose <vm-name:ports>', 'Remove proxied ports from a VM (e.g., "k3s-control:80,443").')
|
|
687
|
-
.option(
|
|
688
|
-
|
|
689
|
-
|
|
764
|
+
.option(
|
|
765
|
+
'--copy',
|
|
766
|
+
'For two-phase flows that surface a command for the user to execute (e.g. --create-admin-profile phase 1), copy the command to the clipboard instead of printing it to the terminal.',
|
|
767
|
+
)
|
|
690
768
|
.option('--namespace <namespace>', 'Kubernetes namespace context (defaults to "default").')
|
|
769
|
+
.option(
|
|
770
|
+
'--maas-project <project>',
|
|
771
|
+
'LXD project managed by MAAS (e.g. "k3s-cluster"). When set, all lxc commands target this project so MAAS enumerates the VMs in its machines UI.',
|
|
772
|
+
)
|
|
773
|
+
.option(
|
|
774
|
+
'--move-to-project',
|
|
775
|
+
'Stop the [vm-id] VM in the default project, move it to --maas-project, then start it so MAAS picks it up. Requires --maas-project.',
|
|
776
|
+
)
|
|
691
777
|
.description('Manages LXD virtual machines as K3s nodes (control plane or workers).')
|
|
692
|
-
.action(Underpost.lxd.callback);
|
|
778
|
+
.action((vmId, options) => Underpost.lxd.callback(vmId, options));
|
|
693
779
|
|
|
694
780
|
program
|
|
695
781
|
.command('baremetal [workflow-id]')
|
|
@@ -799,6 +885,10 @@ program
|
|
|
799
885
|
'--pwa-build',
|
|
800
886
|
'Runs the pwa-microservices-template update flow: always re-clones, syncs engine sources, installs, builds, and pushes.',
|
|
801
887
|
)
|
|
888
|
+
.option(
|
|
889
|
+
'--dry-run',
|
|
890
|
+
'For --build: previews version-bump changes (per-file substitution counts) without writing files or running downstream commands.',
|
|
891
|
+
)
|
|
802
892
|
.description('Release orchestrator for building new versions and deploying releases of the Underpost CLI.')
|
|
803
893
|
.action(async (version, options) => {
|
|
804
894
|
if (options.build) return Underpost.release.build(version, options);
|
package/src/cli/ipfs.js
CHANGED
|
@@ -131,12 +131,10 @@ class UnderpostIPFS {
|
|
|
131
131
|
// Apply UDP buffer sysctl on every Kind node so QUIC (used by IPFS) can reach the
|
|
132
132
|
// recommended 7.5 MB buffer size. Kind nodes are containers and do NOT inherit the
|
|
133
133
|
// host sysctl values, so this must be set via docker exec on each node directly.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
);
|
|
139
|
-
}
|
|
134
|
+
shellExec(
|
|
135
|
+
`sudo sysctl -w net.core.rmem_max=7500000
|
|
136
|
+
sudo sysctl -w net.core.wmem_max=7500000`,
|
|
137
|
+
);
|
|
140
138
|
|
|
141
139
|
shellExec(`kubectl apply -f ${underpostRoot}/manifests/ipfs/storage-class.yaml`);
|
|
142
140
|
shellExec(`kubectl apply -k ${underpostRoot}/manifests/ipfs -n ${options.namespace}`);
|
package/src/cli/kubectl.js
CHANGED
|
@@ -47,9 +47,12 @@ class UnderpostKubectl {
|
|
|
47
47
|
* @memberof UnderpostKubectl
|
|
48
48
|
*/
|
|
49
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.
|
|
50
53
|
const raw = shellExec(
|
|
51
54
|
`sudo kubectl get ${kindType}${namespace ? ` -n ${namespace}` : ` --all-namespaces`} -o wide`,
|
|
52
|
-
{ stdout: true, disableLog: true, silent: true },
|
|
55
|
+
{ stdout: true, disableLog: true, silent: true, silentOnError: true },
|
|
53
56
|
);
|
|
54
57
|
|
|
55
58
|
const heads = raw
|