windows-development-sandbox 1.9.0 → 1.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -17
- package/config.example.json +7 -2
- package/dist/app/features/accounts/accounts.def.d.ts +122 -0
- package/dist/app/features/accounts/accounts.def.js +243 -0
- package/dist/app/features/accounts/accounts.run.d.ts +51 -0
- package/dist/app/features/accounts/accounts.run.js +125 -0
- package/dist/app/features/accounts/index.d.ts +2 -0
- package/dist/app/features/accounts/index.js +3 -0
- package/dist/app/features/agents/agent-entry.d.ts +17 -0
- package/dist/app/features/agents/agent-entry.js +50 -0
- package/dist/app/features/agents/agents.def.d.ts +65 -0
- package/dist/app/features/agents/agents.def.js +142 -0
- package/dist/app/features/agents/agents.run.d.ts +31 -0
- package/dist/app/features/agents/agents.run.js +189 -0
- package/dist/app/features/agents/index.d.ts +3 -0
- package/dist/app/features/agents/index.js +4 -0
- package/dist/app/features/apps/apps-rows.d.ts +31 -0
- package/dist/app/features/apps/apps-rows.js +73 -0
- package/dist/app/features/apps/apps.def.d.ts +181 -0
- package/dist/app/features/apps/apps.def.js +264 -0
- package/dist/app/features/apps/apps.run.d.ts +58 -0
- package/dist/app/features/apps/apps.run.js +76 -0
- package/dist/app/features/apps/index.d.ts +3 -0
- package/dist/app/features/apps/index.js +4 -0
- package/dist/app/features/data/data.def.d.ts +154 -0
- package/dist/app/features/data/data.def.js +201 -0
- package/dist/app/features/data/data.run.d.ts +46 -0
- package/dist/app/features/data/data.run.js +141 -0
- package/dist/app/features/data/index.d.ts +2 -0
- package/dist/app/features/data/index.js +3 -0
- package/dist/app/features/defs.d.ts +952 -4
- package/dist/app/features/defs.js +147 -10
- package/dist/app/features/engine/engine.def.d.ts +228 -0
- package/dist/app/features/engine/engine.def.js +194 -0
- package/dist/app/features/engine/engine.run.d.ts +72 -0
- package/dist/app/features/engine/engine.run.js +77 -0
- package/dist/app/features/engine/index.d.ts +2 -0
- package/dist/app/features/engine/index.js +4 -0
- package/dist/app/features/files/files.def.d.ts +51 -0
- package/dist/app/features/files/files.def.js +38 -0
- package/dist/app/features/files/files.run.d.ts +20 -0
- package/dist/app/features/files/files.run.js +59 -0
- package/dist/app/features/files/index.d.ts +2 -0
- package/dist/app/features/files/index.js +3 -0
- package/dist/app/features/github/github.def.d.ts +80 -0
- package/dist/app/features/github/github.def.js +142 -0
- package/dist/app/features/github/github.run.d.ts +36 -0
- package/dist/app/features/github/github.run.js +59 -0
- package/dist/app/features/github/index.d.ts +2 -0
- package/dist/app/features/github/index.js +3 -0
- package/dist/app/features/health/health.def.d.ts +275 -0
- package/dist/app/features/health/health.def.js +281 -0
- package/dist/app/features/health/health.run.d.ts +125 -0
- package/dist/app/features/health/health.run.js +204 -0
- package/dist/app/features/health/index.d.ts +2 -0
- package/dist/app/features/health/index.js +3 -0
- package/dist/app/features/logs/index.d.ts +2 -0
- package/dist/app/features/logs/index.js +3 -0
- package/dist/app/features/logs/logs.def.d.ts +78 -0
- package/dist/app/features/logs/logs.def.js +115 -0
- package/dist/app/features/logs/logs.run.d.ts +20 -0
- package/dist/app/features/logs/logs.run.js +42 -0
- package/dist/app/features/projects/index.d.ts +2 -0
- package/dist/app/features/projects/index.js +3 -0
- package/dist/app/features/projects/projects.def.d.ts +101 -0
- package/dist/app/features/projects/projects.def.js +208 -0
- package/dist/app/features/projects/projects.run.d.ts +56 -0
- package/dist/app/features/projects/projects.run.js +155 -0
- package/dist/app/features/sandbox/sandbox.def.js +11 -5
- package/dist/app/features/sessions/sessions.def.js +3 -0
- package/dist/app/features/settings/categories.def.js +3 -2
- package/dist/{cli/menu/settings/share.d.ts → app/features/settings/settings-share.d.ts} +1 -1
- package/dist/{cli/menu/settings/share.js → app/features/settings/settings-share.js} +3 -2
- package/dist/app/features/settings/settings.def.d.ts +22 -5
- package/dist/app/features/settings/settings.def.js +81 -6
- package/dist/app/features/settings/settings.run.d.ts +17 -0
- package/dist/app/features/settings/settings.run.js +89 -4
- package/dist/app/features/storage/index.d.ts +2 -0
- package/dist/app/features/storage/index.js +3 -0
- package/dist/app/features/storage/storage.def.d.ts +133 -0
- package/dist/app/features/storage/storage.def.js +225 -0
- package/dist/app/features/storage/storage.run.d.ts +62 -0
- package/dist/app/features/storage/storage.run.js +370 -0
- package/dist/app/features/updates/index.d.ts +3 -0
- package/dist/app/features/updates/index.js +4 -0
- package/dist/app/features/updates/update-lines.d.ts +13 -0
- package/dist/app/features/updates/update-lines.js +61 -0
- package/dist/app/features/updates/updates.def.d.ts +89 -0
- package/dist/app/features/updates/updates.def.js +225 -0
- package/dist/app/features/updates/updates.run.d.ts +48 -0
- package/dist/app/features/updates/updates.run.js +154 -0
- package/dist/app/features/vpn/index.d.ts +2 -0
- package/dist/app/features/vpn/index.js +3 -0
- package/dist/app/features/vpn/vpn.def.d.ts +112 -0
- package/dist/app/features/vpn/vpn.def.js +174 -0
- package/dist/app/features/vpn/vpn.run.d.ts +37 -0
- package/dist/app/features/vpn/vpn.run.js +54 -0
- package/dist/app/features/web/index.d.ts +2 -0
- package/dist/app/features/web/index.js +3 -0
- package/dist/app/features/web/web.def.d.ts +33 -0
- package/dist/app/features/web/web.def.js +90 -0
- package/dist/app/features/web/web.run.d.ts +24 -0
- package/dist/app/features/web/web.run.js +93 -0
- package/dist/app/kernel/define.d.ts +10 -1
- package/dist/app/kernel/io.d.ts +34 -0
- package/dist/app/kernel/io.js +9 -0
- package/dist/app/kernel/rpc.d.ts +17 -0
- package/dist/app/kernel/text.d.ts +2 -0
- package/dist/app/kernel/text.js +7 -0
- package/dist/app/kernel/view.d.ts +24 -1
- package/dist/app/kernel/view.js +1 -1
- package/dist/app/registry.js +74 -1
- package/dist/cli/args.js +1 -1
- package/dist/cli/commands/context.d.ts +7 -0
- package/dist/cli/commands/context.js +29 -2
- package/dist/cli/commands/engine.js +5 -58
- package/dist/cli/commands/github.d.ts +2 -0
- package/dist/cli/commands/github.js +11 -0
- package/dist/cli/commands/index.d.ts +3 -5
- package/dist/cli/commands/index.js +3 -5
- package/dist/cli/commands/launch/launch.js +23 -4
- package/dist/cli/commands/launch/running.js +4 -1
- package/dist/cli/commands/maintenance/config.js +1 -6
- package/dist/cli/commands/maintenance/index.d.ts +0 -1
- package/dist/cli/commands/maintenance/index.js +1 -2
- package/dist/cli/commands/maintenance/logs.js +27 -32
- package/dist/cli/commands/maintenance/migrate.d.ts +0 -8
- package/dist/cli/commands/maintenance/migrate.js +2 -44
- package/dist/cli/commands/maintenance/update.d.ts +0 -19
- package/dist/cli/commands/maintenance/update.js +1 -99
- package/dist/cli/commands/projects/index.d.ts +0 -1
- package/dist/cli/commands/projects/index.js +0 -1
- package/dist/cli/commands/registry.d.ts +1 -1
- package/dist/cli/commands/registry.js +29 -11
- package/dist/cli/commands/repair/checks/data.js +1 -1
- package/dist/cli/commands/repair/checks/hcs.js +28 -1
- package/dist/cli/commands/repair/checks/sandbox.js +1 -1
- package/dist/cli/commands/repair/health-run.d.ts +30 -0
- package/dist/cli/commands/repair/health-run.js +32 -0
- package/dist/cli/commands/repair/printer.d.ts +2 -2
- package/dist/cli/commands/repair/printer.js +2 -11
- package/dist/cli/commands/repair/run.d.ts +1 -21
- package/dist/cli/commands/repair/run.js +13 -70
- package/dist/cli/commands/storage/index.d.ts +0 -1
- package/dist/cli/commands/storage/index.js +0 -1
- package/dist/cli/commands/storage/offer.js +6 -2
- package/dist/cli/commands/vpn.d.ts +1 -3
- package/dist/cli/commands/vpn.js +8 -88
- package/dist/cli/commands/web.d.ts +7 -1
- package/dist/cli/commands/web.js +45 -71
- package/dist/cli/index.js +3 -2
- package/dist/cli/manifest.d.ts +16 -153
- package/dist/cli/manifest.js +20 -50
- package/dist/cli/menu/command-form.js +1 -2
- package/dist/cli/menu/io-menu.d.ts +2 -2
- package/dist/cli/menu/io-menu.js +6 -4
- package/dist/cli/menu/menu.js +1 -1
- package/dist/cli/menu/pages/accounts-page.d.ts +5 -17
- package/dist/cli/menu/pages/accounts-page.js +28 -170
- package/dist/cli/menu/pages/agents-page.d.ts +17 -18
- package/dist/cli/menu/pages/agents-page.js +67 -124
- package/dist/cli/menu/pages/apps-page.d.ts +15 -8
- package/dist/cli/menu/pages/apps-page.js +121 -29
- package/dist/cli/menu/pages/list-page.js +10 -1
- package/dist/cli/menu/pages/maintenance-page.d.ts +51 -52
- package/dist/cli/menu/pages/maintenance-page.js +246 -427
- package/dist/cli/menu/pages/sandbox-page.d.ts +3 -5
- package/dist/cli/menu/pages/sandbox-page.js +34 -112
- package/dist/cli/menu/pages/settings-page.d.ts +21 -3
- package/dist/cli/menu/pages/settings-page.js +89 -17
- package/dist/cli/menu/render-view.js +2 -1
- package/dist/cli/menu/settings/index.d.ts +0 -1
- package/dist/cli/menu/settings/index.js +3 -3
- package/dist/cli/menu/views.js +28 -0
- package/dist/cli/operations/handler.js +7 -3
- package/dist/cli/operations/input.d.ts +1 -1
- package/dist/cli/operations/input.js +29 -5
- package/dist/cli/operations/io-cli.js +9 -1
- package/dist/cli/operations/spec.js +8 -2
- package/dist/cli/output/render-view.js +2 -0
- package/dist/cli/{commands/data/collect.js → services/data-collect.js} +2 -2
- package/dist/cli/{commands/data/remove.js → services/data-remove.js} +2 -2
- package/dist/cli/services/data-service.d.ts +1 -1
- package/dist/cli/services/data-service.js +2 -2
- package/dist/cli/services/databases-service.d.ts +5 -0
- package/dist/cli/services/databases-service.js +15 -0
- package/dist/cli/services/health-service.d.ts +8 -4
- package/dist/cli/services/health-service.js +10 -8
- package/dist/cli/services/index.d.ts +4 -1
- package/dist/cli/services/index.js +4 -1
- package/dist/cli/services/logs-service.d.ts +7 -0
- package/dist/cli/services/logs-service.js +13 -0
- package/dist/cli/services/storage-service.d.ts +19 -0
- package/dist/cli/services/storage-service.js +71 -0
- package/dist/cli/services/vpn-service.d.ts +6 -4
- package/dist/cli/services/vpn-service.js +5 -11
- package/dist/cli/services/web-service.d.ts +4 -3
- package/dist/cli/services/web-service.js +12 -32
- package/dist/core/config/defaults.js +3 -2
- package/dist/core/schema/config.d.ts +6 -0
- package/dist/core/schema/config.js +2 -0
- package/dist/core/schema/github.d.ts +4 -0
- package/dist/core/schema/github.js +7 -0
- package/dist/core/schema/index.d.ts +1 -0
- package/dist/core/schema/index.js +1 -0
- package/dist/core/schema/profile.d.ts +1 -0
- package/dist/core/schema/profile.js +3 -0
- package/dist/core/schema/sandbox.js +3 -3
- package/dist/core/schema/toolchains.js +2 -2
- package/dist/core/schema/vpn.js +1 -1
- package/dist/core/schema/web.d.ts +1 -0
- package/dist/core/schema/web.js +4 -1
- package/dist/core/types.d.ts +6 -3
- package/dist/guest/boot/boot.js +11 -1
- package/dist/guest/daemon/daemon.js +1 -1
- package/dist/guest/daemon/sessions.d.ts +3 -2
- package/dist/guest/daemon/sessions.js +38 -7
- package/dist/guest/governor/core.d.ts +44 -0
- package/dist/guest/governor/core.js +124 -0
- package/dist/guest/governor/decide.d.ts +53 -15
- package/dist/guest/governor/decide.js +155 -72
- package/dist/guest/governor/governor.d.ts +2 -35
- package/dist/guest/governor/governor.js +35 -99
- package/dist/guest/governor/index.d.ts +1 -0
- package/dist/guest/governor/index.js +1 -0
- package/dist/guest/network/firewall.d.ts +3 -0
- package/dist/guest/network/firewall.js +65 -23
- package/dist/guest/runtime/process.js +53 -5
- package/dist/guest/sessions/viewer.js +5 -1
- package/dist/guest/setup/claude-mem.js +12 -4
- package/dist/guest/setup/github-token.d.ts +7 -0
- package/dist/guest/setup/github-token.js +65 -0
- package/dist/guest/toolchains/languages/node.js +40 -4
- package/dist/guest/toolchains/native/rust-extras.js +2 -2
- package/dist/guest/toolchains/tools/cli.d.ts +8 -0
- package/dist/guest/toolchains/tools/cli.js +16 -2
- package/dist/guest/vpn/openvpn.d.ts +5 -0
- package/dist/guest/vpn/openvpn.js +14 -1
- package/dist/guest/vpn/vpn.js +55 -16
- package/dist/guest/vpn/wireguard.js +2 -0
- package/dist/host/channel/attach.d.ts +1 -0
- package/dist/host/channel/attach.js +1 -0
- package/dist/host/channel/channel.d.ts +1 -1
- package/dist/host/channel/channel.js +2 -2
- package/dist/host/engines/hcs/check.d.ts +1 -0
- package/dist/host/engines/hcs/check.js +1 -1
- package/dist/host/engines/hcs/engine.d.ts +1 -1
- package/dist/host/engines/hcs/engine.js +6 -4
- package/dist/host/engines/hcs/helper.d.ts +11 -0
- package/dist/host/engines/hcs/helper.js +31 -2
- package/dist/host/engines/hcs/leftovers.d.ts +42 -0
- package/dist/host/engines/hcs/leftovers.js +101 -0
- package/dist/host/engines/index.d.ts +1 -0
- package/dist/host/engines/index.js +1 -0
- package/dist/host/github/deliver.d.ts +13 -0
- package/dist/host/github/deliver.js +51 -0
- package/dist/host/github/index.d.ts +2 -0
- package/dist/host/github/index.js +3 -0
- package/dist/host/github/token.d.ts +21 -0
- package/dist/host/github/token.js +74 -0
- package/dist/host/launch/generate.js +11 -5
- package/dist/host/launch/index.d.ts +1 -1
- package/dist/host/launch/index.js +1 -1
- package/dist/host/launch/session-file.js +1 -2
- package/dist/host/launch/wsb-file.d.ts +11 -7
- package/dist/host/launch/wsb-file.js +30 -12
- package/dist/host/life/host-memory.d.ts +1 -0
- package/dist/host/life/host-memory.js +4 -1
- package/dist/host/life/watchdog.d.ts +11 -0
- package/dist/host/life/watchdog.js +36 -4
- package/dist/host/sandbox/tasklist.d.ts +6 -0
- package/dist/host/sandbox/tasklist.js +37 -0
- package/dist/host/secrets/launch-secrets.d.ts +2 -1
- package/dist/host/secrets/launch-secrets.js +4 -2
- package/dist/host/vpn/status.js +13 -3
- package/dist/host/web/backend.d.ts +1 -3
- package/dist/host/web/index.d.ts +2 -1
- package/dist/host/web/index.js +2 -1
- package/dist/host/web/live.d.ts +23 -0
- package/dist/host/web/live.js +107 -0
- package/dist/host/web/rpc.d.ts +6 -1
- package/dist/host/web/rpc.js +23 -31
- package/dist/host/web/runner.d.ts +4 -0
- package/dist/host/web/runner.js +12 -1
- package/dist/host/web/server.d.ts +30 -2
- package/dist/host/web/server.js +87 -29
- package/dist/host/web/state.d.ts +1 -0
- package/dist/host/web/state.js +2 -0
- package/dist/runtime/agent.js +44 -16
- package/dist/runtime/daemon.js +1154 -857
- package/dist/runtime/db.js +44 -16
- package/dist/runtime/main.js +532 -115
- package/dist/runtime/netproxy.js +34 -9
- package/dist/runtime/view.js +499 -149
- package/dist/selftest/app.test.js +620 -12
- package/dist/selftest/channel.test.js +18 -1
- package/dist/selftest/cli.test.js +1 -1
- package/dist/selftest/config.test.js +1 -1
- package/dist/selftest/contained.test.js +1 -1
- package/dist/selftest/data.test.js +1 -2
- package/dist/selftest/engine.test.js +3 -1
- package/dist/selftest/github.test.d.ts +2 -0
- package/dist/selftest/github.test.js +243 -0
- package/dist/selftest/guest-boot.test.js +47 -1
- package/dist/selftest/hcs.test.js +105 -8
- package/dist/selftest/health.test.js +71 -0
- package/dist/selftest/heavy-load.test.js +152 -66
- package/dist/selftest/index.js +4 -0
- package/dist/selftest/layout.test.js +8 -0
- package/dist/selftest/live-terminal.test.js +74 -0
- package/dist/selftest/menu-screens.js +171 -56
- package/dist/selftest/menu.test.js +54 -37
- package/dist/selftest/migrate.test.js +14 -12
- package/dist/selftest/network.test.js +20 -1
- package/dist/selftest/powershell-variables.test.d.ts +2 -0
- package/dist/selftest/powershell-variables.test.js +61 -0
- package/dist/selftest/support/engine-golden.js +1 -0
- package/dist/selftest/support/fixtures.d.ts +5 -0
- package/dist/selftest/support/web-preview.d.ts +1 -0
- package/dist/selftest/support/web-preview.js +856 -0
- package/dist/selftest/update-service.test.js +15 -8
- package/dist/selftest/vpn.test.js +86 -2
- package/dist/selftest/web.test.js +58 -11
- package/dist/shared/channel/run-dir.d.ts +2 -0
- package/dist/shared/channel/run-dir.js +3 -0
- package/dist/shared/channel/schema.d.ts +7 -0
- package/dist/shared/channel/schema.js +9 -1
- package/dist/shared/channel/secrets.d.ts +1 -0
- package/dist/shared/channel/secrets.js +3 -0
- package/dist/shared/github/index.d.ts +1 -0
- package/dist/shared/github/index.js +2 -0
- package/dist/shared/github/token.d.ts +29 -0
- package/dist/shared/github/token.js +89 -0
- package/dist/shared/io/copy-tree.d.ts +7 -0
- package/dist/shared/io/copy-tree.js +45 -0
- package/dist/shared/io/index.d.ts +2 -0
- package/dist/shared/io/index.js +2 -0
- package/dist/shared/io/robocopy-result.d.ts +6 -0
- package/dist/shared/io/robocopy-result.js +23 -0
- package/dist/shared/memory/policy.d.ts +38 -12
- package/dist/shared/memory/policy.js +58 -19
- package/dist/shared/network/firewall-rules.d.ts +8 -0
- package/dist/shared/network/firewall-rules.js +28 -0
- package/dist/shared/pty/ctrl-c.d.ts +18 -0
- package/dist/shared/pty/ctrl-c.js +36 -0
- package/dist/shared/pty/index.d.ts +1 -0
- package/dist/shared/pty/index.js +1 -0
- package/dist/shared/pty/terminal.d.ts +2 -0
- package/dist/shared/pty/terminal.js +21 -2
- package/dist/shared/vpn/kill-switch.d.ts +13 -2
- package/dist/shared/vpn/kill-switch.js +88 -8
- package/dist/shared/web/protocol.d.ts +0 -4
- package/dist/sync/watcher.js +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/{main-T5DMCHYV.css → main-6JF3ASB5.css} +1 -1
- package/dist/web/main-Z645W45E.js +219 -0
- package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
- package/native/csharp/HostTools/MemoryStatus.cs +128 -107
- package/native/scripts/memory-status.ps1 +10 -2
- package/package.json +10 -3
- package/sandbox/csharp/MemGov.cs +668 -398
- package/sandbox/csharp/PtyHost.cs +104 -15
- package/sandbox/csharp/SandboxTools/CpuCap.cs +50 -1
- package/sandbox/csharp/SandboxTools/Program.cs +1 -1
- package/sandbox/scripts/new-shortcuts.ps1 +3 -1
- package/sandbox/scripts/repair-wmi-services.ps1 +26 -0
- package/schemas/config.schema.json +25 -7
- package/schemas/sandbox-config.schema.json +7 -3
- package/dist/cli/commands/accounts.d.ts +0 -2
- package/dist/cli/commands/accounts.js +0 -96
- package/dist/cli/commands/data/clean.d.ts +0 -3
- package/dist/cli/commands/data/clean.js +0 -60
- package/dist/cli/commands/data/index.d.ts +0 -4
- package/dist/cli/commands/data/index.js +0 -62
- package/dist/cli/commands/maintenance/clean.d.ts +0 -2
- package/dist/cli/commands/maintenance/clean.js +0 -24
- package/dist/cli/commands/maintenance/config-share.d.ts +0 -12
- package/dist/cli/commands/maintenance/config-share.js +0 -80
- package/dist/cli/commands/projects/projects.d.ts +0 -2
- package/dist/cli/commands/projects/projects.js +0 -162
- package/dist/cli/commands/storage/contained.d.ts +0 -3
- package/dist/cli/commands/storage/contained.js +0 -179
- package/dist/cli/commands/storage/storage.d.ts +0 -8
- package/dist/cli/commands/storage/storage.js +0 -179
- package/dist/cli/menu/add-agent.d.ts +0 -47
- package/dist/cli/menu/add-agent.js +0 -168
- package/dist/cli/menu/apps.d.ts +0 -69
- package/dist/cli/menu/apps.js +0 -214
- package/dist/cli/menu/data-folder.d.ts +0 -18
- package/dist/cli/menu/data-folder.js +0 -99
- package/dist/cli/menu/share-settings.d.ts +0 -21
- package/dist/cli/menu/share-settings.js +0 -112
- package/dist/cli/menu/vpn-login.d.ts +0 -16
- package/dist/cli/menu/vpn-login.js +0 -74
- package/dist/web/main-NRRS5O6Z.js +0 -157
- /package/dist/cli/{commands/data/collect.d.ts → services/data-collect.d.ts} +0 -0
- /package/dist/cli/{commands/data/remove.d.ts → services/data-remove.d.ts} +0 -0
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
// from the config schema through Fields, with get, set and reset. Pure: schemas and the view; the rows are made on the
|
|
3
3
|
// Node side (settings-rows.ts) because the config schema is, and secrets never leave it unmasked.
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { action, defineOperation, defineQuery, defineView, FieldSchema,
|
|
5
|
+
import { action, defineOperation, defineQuery, defineView, FieldSchema, fieldOf, SchemaNode, valueText, } from '../../kernel/index.js';
|
|
6
|
+
import { browseFolder } from '../files/files.def.js';
|
|
7
|
+
import { changeDataFolder } from '../storage/storage.def.js';
|
|
6
8
|
export const ScopeSchema = z
|
|
7
9
|
.enum(['user', 'project'])
|
|
8
10
|
.describe("Your own settings (all projects) or this folder's .sandbox-config.json (this project)");
|
|
@@ -40,6 +42,8 @@ export const SettingsListSchema = z.object({
|
|
|
40
42
|
exists: z.boolean(),
|
|
41
43
|
/** Your own settings: where the data folder is (it has its own flow; its setting is not listed). */
|
|
42
44
|
dataFolder: z.string().optional(),
|
|
45
|
+
/** Where an export goes by default (full path; your own settings only). */
|
|
46
|
+
exportFile: z.string().optional().describe('Where an export goes by default (full path; your own settings only)'),
|
|
43
47
|
categories: z.array(z.object({ id: z.string(), label: z.string(), description: z.string() })),
|
|
44
48
|
rows: z.array(SettingRowSchema),
|
|
45
49
|
});
|
|
@@ -83,6 +87,57 @@ export const resetSetting = defineOperation({
|
|
|
83
87
|
text: (o) => o.message,
|
|
84
88
|
cli: { name: 'config', action: 'reset', positional: ['key'] },
|
|
85
89
|
});
|
|
90
|
+
const JsonFileSchema = z
|
|
91
|
+
.string()
|
|
92
|
+
.max(2000)
|
|
93
|
+
.regex(/\.json$/i, 'The file name should end in .json.');
|
|
94
|
+
export const exportConfig = defineOperation({
|
|
95
|
+
id: 'settings.export',
|
|
96
|
+
title: 'Export settings…',
|
|
97
|
+
summary: 'write the settings you changed to a .json file to share (no secrets, no data folder, no paths of this PC)',
|
|
98
|
+
input: z.object({
|
|
99
|
+
settingsFile: JsonFileSchema.optional().describe('(export, import) the .json file; default sandbox-settings.json in the current folder'),
|
|
100
|
+
withPaths: z.boolean().default(false).describe('(export) keep folders and files of this PC in the file'),
|
|
101
|
+
}),
|
|
102
|
+
output: z.object({
|
|
103
|
+
file: z.string().describe('The file written (full path)'),
|
|
104
|
+
leftOut: z.array(z.string()).describe('What was left out, one "<key> (<why>)" each'),
|
|
105
|
+
pathsLeftOut: z.boolean().describe('A folder or file of this PC was left out (and --with-paths was not given)'),
|
|
106
|
+
}),
|
|
107
|
+
text: (o) => [
|
|
108
|
+
'Wrote ' + o.file + ' (only what differs from the defaults).',
|
|
109
|
+
...(o.leftOut.length ? ['Left out:', ...o.leftOut.map((l) => ' ' + l)] : []),
|
|
110
|
+
...(o.pathsLeftOut ? ["Keep this PC's folders and files in the file with --with-paths."] : []),
|
|
111
|
+
].join('\n'),
|
|
112
|
+
cli: {
|
|
113
|
+
name: 'config',
|
|
114
|
+
action: 'export',
|
|
115
|
+
positional: ['settingsFile'],
|
|
116
|
+
flags: { withPaths: { flag: '--with-paths' } },
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
export const importConfig = defineOperation({
|
|
120
|
+
id: 'settings.import',
|
|
121
|
+
title: 'Import settings…',
|
|
122
|
+
summary: 'read a shared settings file, show what it would change, and apply it after one yes',
|
|
123
|
+
input: z.object({
|
|
124
|
+
settingsFile: JsonFileSchema.optional().describe('(export, import) the .json file'),
|
|
125
|
+
}),
|
|
126
|
+
output: z.object({
|
|
127
|
+
changed: z.number().describe('How many settings changed'),
|
|
128
|
+
message: z.string().describe('What happened'),
|
|
129
|
+
}),
|
|
130
|
+
text: (o) => o.message,
|
|
131
|
+
cli: { name: 'config', action: 'import', positional: ['settingsFile'] },
|
|
132
|
+
});
|
|
133
|
+
/** A file field of an operation's input, asked for in the page (a path to a file). */
|
|
134
|
+
function fileField(def, label) {
|
|
135
|
+
return {
|
|
136
|
+
...fieldOf(new SchemaNode(def.input).child('settingsFile'), ['settingsFile']),
|
|
137
|
+
label,
|
|
138
|
+
optional: false,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
86
141
|
/** The facts under a setting: its key, your value, the project's, the default, and the lock. */
|
|
87
142
|
function details(row, scope) {
|
|
88
143
|
const text = (v) => valueText(v, row.field, 40).text;
|
|
@@ -103,15 +158,17 @@ function settingItem(row, scope) {
|
|
|
103
158
|
id: row.id,
|
|
104
159
|
label: row.label,
|
|
105
160
|
hint: shown,
|
|
106
|
-
...(row.set ? { tone: scope === 'project' ? 'accent' : 'ok', badges: [{ text: '
|
|
161
|
+
...(row.set ? { tone: scope === 'project' ? 'accent' : 'ok', badges: [{ text: 'changed', tone: 'accent' }] } : {}),
|
|
107
162
|
description: row.field.help,
|
|
108
163
|
group: row.section,
|
|
109
164
|
details: details(row, scope),
|
|
110
165
|
keywords: row.id,
|
|
166
|
+
code: row.id,
|
|
111
167
|
cells: { setting: row.id, value: shown },
|
|
112
168
|
primary: action(setSetting, { scope, key: row.id }, {
|
|
113
169
|
label: 'Change',
|
|
114
170
|
verb: 'edit',
|
|
171
|
+
inline: true,
|
|
115
172
|
fields: [{ ...row.field, name: 'value', label: row.label }],
|
|
116
173
|
initial: { value: editable },
|
|
117
174
|
}),
|
|
@@ -122,15 +179,15 @@ function settingItem(row, scope) {
|
|
|
122
179
|
: [],
|
|
123
180
|
};
|
|
124
181
|
}
|
|
125
|
-
/** The Data folder row: where the saved data is;
|
|
182
|
+
/** The Data folder row: where the saved data is; changing it asks for the folder, then moves or switches (storage). */
|
|
126
183
|
function dataFolderItem(folder) {
|
|
127
184
|
return {
|
|
128
185
|
id: '@data-folder',
|
|
129
186
|
label: 'Data folder',
|
|
130
187
|
hint: folder,
|
|
131
188
|
cells: { setting: 'storage.root', value: folder },
|
|
132
|
-
description: 'Where your tools, logins, history and logs are kept between sandboxes. Move it with
|
|
133
|
-
primary:
|
|
189
|
+
description: 'Where your tools, logins, history and logs are kept between sandboxes. Move it with sandbox storage move <folder>.',
|
|
190
|
+
primary: action(changeDataFolder, {}, { label: 'Data folder', verb: 'change' }),
|
|
134
191
|
};
|
|
135
192
|
}
|
|
136
193
|
/** The settings page of one scope: a section per category, each setting with its value and an edit action. */
|
|
@@ -151,6 +208,7 @@ export function settingsPage(o) {
|
|
|
151
208
|
}));
|
|
152
209
|
return {
|
|
153
210
|
title: 'Settings',
|
|
211
|
+
categories: true,
|
|
154
212
|
notice: {
|
|
155
213
|
text: 'Editing ' +
|
|
156
214
|
o.file +
|
|
@@ -159,6 +217,22 @@ export function settingsPage(o) {
|
|
|
159
217
|
tone: o.scope === 'project' ? 'accent' : 'muted',
|
|
160
218
|
},
|
|
161
219
|
sections,
|
|
220
|
+
// Export and import are for your own settings only (never on the project tab).
|
|
221
|
+
actions: o.scope === 'user'
|
|
222
|
+
? [
|
|
223
|
+
action(exportConfig, {}, {
|
|
224
|
+
verb: 'export',
|
|
225
|
+
fields: [fileField(exportConfig, 'Where to write the settings file')],
|
|
226
|
+
initial: { settingsFile: o.exportFile },
|
|
227
|
+
description: 'Write the settings you changed to a .json file you can share with a team. Secrets, the data folder and folders or files of this PC are left out.',
|
|
228
|
+
}),
|
|
229
|
+
action(importConfig, {}, {
|
|
230
|
+
verb: 'import',
|
|
231
|
+
fields: [fileField(importConfig, 'Which settings file')],
|
|
232
|
+
description: 'Read a settings file someone shared, see what it would change, and apply it once you say yes. Secrets, the data folder and paths in it are never taken.',
|
|
233
|
+
}),
|
|
234
|
+
]
|
|
235
|
+
: [],
|
|
162
236
|
};
|
|
163
237
|
}
|
|
164
238
|
export const settingsView = defineView({
|
|
@@ -166,7 +240,8 @@ export const settingsView = defineView({
|
|
|
166
240
|
title: 'Settings',
|
|
167
241
|
summary: 'Every setting, for all projects or just this project, with its value, default and description.',
|
|
168
242
|
queries: { settings: listSettings },
|
|
169
|
-
operations: [setSetting, resetSetting],
|
|
243
|
+
operations: [setSetting, resetSetting, exportConfig, importConfig, changeDataFolder],
|
|
244
|
+
pickers: [browseFolder],
|
|
170
245
|
tabs: {
|
|
171
246
|
param: 'scope',
|
|
172
247
|
choices: [
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type AppContext } from '../../context.js';
|
|
2
2
|
import { type SettingsFiles } from './settings-rows.js';
|
|
3
|
+
/** The file `sandbox config export` writes when none is named. */
|
|
4
|
+
export declare const DEFAULT_EXPORT = "sandbox-settings.json";
|
|
3
5
|
/** Your own settings file (the one --config names) and the project file of the current folder. */
|
|
4
6
|
export declare function settingsFiles(ctx: AppContext): SettingsFiles;
|
|
5
7
|
export declare const listSettingsRun: import("../../kernel/define.js").Implementation<import("../../kernel/define.js").QueryDef<import("zod").ZodObject<{
|
|
@@ -15,6 +17,7 @@ export declare const listSettingsRun: import("../../kernel/define.js").Implement
|
|
|
15
17
|
file: import("zod").ZodString;
|
|
16
18
|
exists: import("zod").ZodBoolean;
|
|
17
19
|
dataFolder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
+
exportFile: import("zod").ZodOptional<import("zod").ZodString>;
|
|
18
21
|
categories: import("zod").ZodArray<import("zod").ZodObject<{
|
|
19
22
|
id: import("zod").ZodString;
|
|
20
23
|
label: import("zod").ZodString;
|
|
@@ -65,3 +68,17 @@ export declare const resetSettingRun: import("../../kernel/define.js").Implement
|
|
|
65
68
|
changed: import("zod").ZodBoolean;
|
|
66
69
|
message: import("zod").ZodString;
|
|
67
70
|
}, import("zod/v4/core").$strip>, "settings.reset">, import("../../../cli/commands/context.js").Context>;
|
|
71
|
+
export declare const exportConfigRun: import("../../kernel/define.js").Implementation<import("../../kernel/define.js").OperationDef<import("zod").ZodObject<{
|
|
72
|
+
settingsFile: import("zod").ZodOptional<import("zod").ZodString>;
|
|
73
|
+
withPaths: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
74
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
75
|
+
file: import("zod").ZodString;
|
|
76
|
+
leftOut: import("zod").ZodArray<import("zod").ZodString>;
|
|
77
|
+
pathsLeftOut: import("zod").ZodBoolean;
|
|
78
|
+
}, import("zod/v4/core").$strip>, "settings.export">, import("../../../cli/commands/context.js").Context>;
|
|
79
|
+
export declare const importConfigRun: import("../../kernel/define.js").Implementation<import("../../kernel/define.js").OperationDef<import("zod").ZodObject<{
|
|
80
|
+
settingsFile: import("zod").ZodOptional<import("zod").ZodString>;
|
|
81
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
82
|
+
changed: import("zod").ZodNumber;
|
|
83
|
+
message: import("zod").ZodString;
|
|
84
|
+
}, import("zod/v4/core").$strip>, "settings.import">, import("../../../cli/commands/context.js").Context>;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
// The settings feature's work: the rows of a scope, and one setting read, changed or reset. Files are changed one
|
|
2
2
|
// setting at a time with comments kept, and nothing is written unless the whole file stays valid (settings-file.ts).
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
3
5
|
import _ from 'lodash';
|
|
6
|
+
import { loadConfig } from '../../../core/config/index.js';
|
|
4
7
|
import { redactSecrets } from '../../../core/schema/index.js';
|
|
5
|
-
import { fail } from '../../../core/util/index.js';
|
|
8
|
+
import { fail, safeText, writeJson } from '../../../core/util/index.js';
|
|
6
9
|
import { hereDir } from '../../../cli/commands/projects/here.js';
|
|
7
10
|
import { implement } from '../../context.js';
|
|
8
|
-
import { allowedText, valueFromText } from '../../kernel/index.js';
|
|
11
|
+
import { allowedText, cancelled, valueFromText } from '../../kernel/index.js';
|
|
9
12
|
import { CATEGORIES } from './categories.def.js';
|
|
10
13
|
import { ConfigFile } from './settings-file.js';
|
|
14
|
+
import { diffText, exportSettings, planImport, skippedLine } from './settings-share.js';
|
|
11
15
|
import { findSetting, masked, settingRows } from './settings-rows.js';
|
|
12
|
-
import { getSetting, listSettings, resetSetting, setSetting } from './settings.def.js';
|
|
16
|
+
import { exportConfig, getSetting, importConfig, listSettings, resetSetting, setSetting, } from './settings.def.js';
|
|
17
|
+
/** The file `sandbox config export` writes when none is named. */
|
|
18
|
+
export const DEFAULT_EXPORT = 'sandbox-settings.json';
|
|
19
|
+
/** A shared file is a few KB; anything bigger is not one. */
|
|
20
|
+
const MAX_BYTES = 1024 * 1024;
|
|
13
21
|
/** Your own settings file (the one --config names) and the project file of the current folder. */
|
|
14
22
|
export function settingsFiles(ctx) {
|
|
15
23
|
return { user: ConfigFile.user(ctx.loaded.configPath), project: ConfigFile.project(hereDir(ctx)) };
|
|
@@ -26,7 +34,7 @@ export const listSettingsRun = implement(listSettings, (ctx, input) => {
|
|
|
26
34
|
scope: input.scope,
|
|
27
35
|
file: file.file,
|
|
28
36
|
exists: file.exists,
|
|
29
|
-
...(input.scope === 'user' ? { dataFolder: ctx.storageRoot } : {}),
|
|
37
|
+
...(input.scope === 'user' ? { dataFolder: ctx.storageRoot, exportFile: path.resolve(DEFAULT_EXPORT) } : {}),
|
|
30
38
|
categories: CATEGORIES.filter((c) => rows.some((r) => r.category === c.id)).map((c) => ({
|
|
31
39
|
id: c.id,
|
|
32
40
|
label: c.label,
|
|
@@ -82,3 +90,80 @@ export const resetSettingRun = implement(resetSetting, (ctx, input) => {
|
|
|
82
90
|
: input.key + ' is back to its default: ' + JSON.stringify(masked(key, file.defaultOf(key))) + '.',
|
|
83
91
|
};
|
|
84
92
|
});
|
|
93
|
+
/** Your settings as they are on disk now (the menu may have saved changes since it started). */
|
|
94
|
+
function freshConfig(ctx) {
|
|
95
|
+
return loadConfig(ctx.loaded.configPath ?? undefined).config;
|
|
96
|
+
}
|
|
97
|
+
/** Reads a shared file and plans the import. Fails with the reason when it cannot be read. */
|
|
98
|
+
function readImport(config, file) {
|
|
99
|
+
const source = path.resolve(file);
|
|
100
|
+
if (!fs.existsSync(source))
|
|
101
|
+
fail('There is no file ' + source + '.', 'Give the path of a file made by sandbox config export.');
|
|
102
|
+
if (fs.statSync(source).size > MAX_BYTES)
|
|
103
|
+
fail(source + ' is too big to be a settings file.');
|
|
104
|
+
const plan = planImport(fs.readFileSync(source, 'utf8'), config);
|
|
105
|
+
if (plan.problems.length)
|
|
106
|
+
fail(source + ' is not valid settings:\n ' + plan.problems.map(safeText).join('\n '), 'Nothing was changed. Fix the file, or export a new one with: sandbox config export');
|
|
107
|
+
return plan;
|
|
108
|
+
}
|
|
109
|
+
/** Writes the planned changes to your settings file (comments stay); returns how many settings changed. */
|
|
110
|
+
function applyImport(ctx, plan) {
|
|
111
|
+
const outcome = ConfigFile.user(ctx.loaded.configPath).setMany(plan.changes);
|
|
112
|
+
if (typeof outcome === 'object')
|
|
113
|
+
fail('Could not import: ' + outcome.problems.join('; '), 'Nothing was written. Your settings are unchanged.');
|
|
114
|
+
return plan.changes.length;
|
|
115
|
+
}
|
|
116
|
+
export const exportConfigRun = implement(exportConfig, async (ctx, input, io) => {
|
|
117
|
+
const target = path.resolve(input.settingsFile ?? DEFAULT_EXPORT);
|
|
118
|
+
if (fs.existsSync(target)) {
|
|
119
|
+
const replace = await io.confirm({
|
|
120
|
+
title: target + ' exists. Replace it?',
|
|
121
|
+
yes: 'Replace',
|
|
122
|
+
noTerminal: { message: target + ' exists already.', fix: 'Pick another name, or delete it first.' },
|
|
123
|
+
});
|
|
124
|
+
if (!replace)
|
|
125
|
+
cancelled();
|
|
126
|
+
}
|
|
127
|
+
const { data, skipped } = exportSettings(freshConfig(ctx), input.withPaths);
|
|
128
|
+
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
129
|
+
writeJson(target, data);
|
|
130
|
+
return {
|
|
131
|
+
file: target,
|
|
132
|
+
leftOut: skipped.map(skippedLine),
|
|
133
|
+
pathsLeftOut: !input.withPaths && skipped.some((s) => s.why === 'path'),
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
export const importConfigRun = implement(importConfig, async (ctx, input, io) => {
|
|
137
|
+
const file = input.settingsFile ??
|
|
138
|
+
(await io.path({
|
|
139
|
+
title: 'Which settings file',
|
|
140
|
+
lines: ['A file made by Export settings (or sandbox config export).'],
|
|
141
|
+
pathKind: 'file',
|
|
142
|
+
}));
|
|
143
|
+
if (file === undefined)
|
|
144
|
+
cancelled();
|
|
145
|
+
const plan = readImport(freshConfig(ctx), file);
|
|
146
|
+
if (plan.skipped.length) {
|
|
147
|
+
io.log('Not imported (never taken from a file):');
|
|
148
|
+
for (const s of plan.skipped)
|
|
149
|
+
io.log(' ' + safeText(skippedLine(s)));
|
|
150
|
+
}
|
|
151
|
+
const n = plan.changes.length;
|
|
152
|
+
if (!n)
|
|
153
|
+
return { changed: 0, message: 'Nothing to change: your settings already match the file.' };
|
|
154
|
+
io.log('This would change ' + n + ' setting' + (n === 1 ? '' : 's') + ':');
|
|
155
|
+
for (const line of diffText(plan.lines))
|
|
156
|
+
io.log(' ' + safeText(line));
|
|
157
|
+
const yes = await io.confirm({
|
|
158
|
+
title: 'Change your settings like this?',
|
|
159
|
+
yes: 'Change',
|
|
160
|
+
noTerminal: { message: 'Cannot ask here (no terminal).', fix: 'Add --yes to change them without asking.' },
|
|
161
|
+
});
|
|
162
|
+
if (!yes)
|
|
163
|
+
cancelled('Nothing was changed.');
|
|
164
|
+
const changed = applyImport(ctx, plan);
|
|
165
|
+
return {
|
|
166
|
+
changed,
|
|
167
|
+
message: 'Imported ' + changed + ' setting' + (changed === 1 ? '' : 's') + '. New sandboxes use them.',
|
|
168
|
+
};
|
|
169
|
+
});
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type Page } from '../../kernel/index.js';
|
|
3
|
+
export declare const StorageShowSchema: z.ZodObject<{
|
|
4
|
+
root: z.ZodString;
|
|
5
|
+
exists: z.ZodBoolean;
|
|
6
|
+
holdsData: z.ZodBoolean;
|
|
7
|
+
measured: z.ZodNullable<z.ZodObject<{
|
|
8
|
+
bytes: z.ZodNumber;
|
|
9
|
+
files: z.ZodNumber;
|
|
10
|
+
partial: z.ZodBoolean;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
size: z.ZodString;
|
|
13
|
+
defaultRoot: z.ZodString;
|
|
14
|
+
defaultInUse: z.ZodBoolean;
|
|
15
|
+
otherFoldersWithData: z.ZodArray<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type StorageShow = z.output<typeof StorageShowSchema>;
|
|
18
|
+
export declare const showStorage: import("../../kernel/define.js").QueryDef<z.ZodObject<{
|
|
19
|
+
measure: z.ZodDefault<z.ZodBoolean>;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
root: z.ZodString;
|
|
22
|
+
exists: z.ZodBoolean;
|
|
23
|
+
holdsData: z.ZodBoolean;
|
|
24
|
+
measured: z.ZodNullable<z.ZodObject<{
|
|
25
|
+
bytes: z.ZodNumber;
|
|
26
|
+
files: z.ZodNumber;
|
|
27
|
+
partial: z.ZodBoolean;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
size: z.ZodString;
|
|
30
|
+
defaultRoot: z.ZodString;
|
|
31
|
+
defaultInUse: z.ZodBoolean;
|
|
32
|
+
otherFoldersWithData: z.ZodArray<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>, "storage.show">;
|
|
34
|
+
export declare const moveStorage: import("../../kernel/define.js").OperationDef<z.ZodObject<{
|
|
35
|
+
folder: z.ZodOptional<z.ZodString>;
|
|
36
|
+
keepOld: z.ZodDefault<z.ZodBoolean>;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
from: z.ZodString;
|
|
39
|
+
to: z.ZodString;
|
|
40
|
+
copied: z.ZodBoolean;
|
|
41
|
+
files: z.ZodNumber;
|
|
42
|
+
bytes: z.ZodNumber;
|
|
43
|
+
pinned: z.ZodString;
|
|
44
|
+
removedOld: z.ZodBoolean;
|
|
45
|
+
notes: z.ZodArray<z.ZodString>;
|
|
46
|
+
message: z.ZodString;
|
|
47
|
+
}, z.core.$strip>, "storage.move">;
|
|
48
|
+
export declare const useStorage: import("../../kernel/define.js").OperationDef<z.ZodObject<{
|
|
49
|
+
folder: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
message: z.ZodString;
|
|
52
|
+
}, z.core.$strip>, "storage.use">;
|
|
53
|
+
export declare const changeDataFolder: import("../../kernel/define.js").OperationDef<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
message: z.ZodString;
|
|
55
|
+
}, z.core.$strip>, "storage.change">;
|
|
56
|
+
export declare const ContainedStatusSchema: z.ZodObject<{
|
|
57
|
+
setting: z.ZodEnum<{
|
|
58
|
+
off: "off";
|
|
59
|
+
vhdx: "vhdx";
|
|
60
|
+
}>;
|
|
61
|
+
maxGb: z.ZodNumber;
|
|
62
|
+
available: z.ZodBoolean;
|
|
63
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
64
|
+
fixes: z.ZodArray<z.ZodString>;
|
|
65
|
+
image: z.ZodString;
|
|
66
|
+
imageExists: z.ZodBoolean;
|
|
67
|
+
imageBytes: z.ZodNullable<z.ZodNumber>;
|
|
68
|
+
mountFolder: z.ZodString;
|
|
69
|
+
recordedMounted: z.ZodBoolean;
|
|
70
|
+
holders: z.ZodNumber;
|
|
71
|
+
mountedNow: z.ZodNullable<z.ZodBoolean>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export type ContainedStatus = z.output<typeof ContainedStatusSchema>;
|
|
74
|
+
export declare const containedStatus: import("../../kernel/define.js").QueryDef<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
75
|
+
setting: z.ZodEnum<{
|
|
76
|
+
off: "off";
|
|
77
|
+
vhdx: "vhdx";
|
|
78
|
+
}>;
|
|
79
|
+
maxGb: z.ZodNumber;
|
|
80
|
+
available: z.ZodBoolean;
|
|
81
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
82
|
+
fixes: z.ZodArray<z.ZodString>;
|
|
83
|
+
image: z.ZodString;
|
|
84
|
+
imageExists: z.ZodBoolean;
|
|
85
|
+
imageBytes: z.ZodNullable<z.ZodNumber>;
|
|
86
|
+
mountFolder: z.ZodString;
|
|
87
|
+
recordedMounted: z.ZodBoolean;
|
|
88
|
+
holders: z.ZodNumber;
|
|
89
|
+
mountedNow: z.ZodNullable<z.ZodBoolean>;
|
|
90
|
+
}, z.core.$strip>, "storage.containedStatus">;
|
|
91
|
+
export declare const containedOn: import("../../kernel/define.js").OperationDef<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
92
|
+
message: z.ZodString;
|
|
93
|
+
}, z.core.$strip>, "storage.containedOn">;
|
|
94
|
+
export declare const containedOff: import("../../kernel/define.js").OperationDef<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
95
|
+
message: z.ZodString;
|
|
96
|
+
}, z.core.$strip>, "storage.containedOff">;
|
|
97
|
+
/** The Storage page: the data folder (change, move, use another), then contained storage (beta). */
|
|
98
|
+
export declare function storagePage(o: StorageShow, c: ContainedStatus): Page;
|
|
99
|
+
export declare const storageView: import("../../kernel/define.js").ViewDef<{
|
|
100
|
+
storage: import("../../kernel/define.js").QueryDef<z.ZodObject<{
|
|
101
|
+
measure: z.ZodDefault<z.ZodBoolean>;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
root: z.ZodString;
|
|
104
|
+
exists: z.ZodBoolean;
|
|
105
|
+
holdsData: z.ZodBoolean;
|
|
106
|
+
measured: z.ZodNullable<z.ZodObject<{
|
|
107
|
+
bytes: z.ZodNumber;
|
|
108
|
+
files: z.ZodNumber;
|
|
109
|
+
partial: z.ZodBoolean;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
size: z.ZodString;
|
|
112
|
+
defaultRoot: z.ZodString;
|
|
113
|
+
defaultInUse: z.ZodBoolean;
|
|
114
|
+
otherFoldersWithData: z.ZodArray<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>, "storage.show">;
|
|
116
|
+
contained: import("../../kernel/define.js").QueryDef<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
117
|
+
setting: z.ZodEnum<{
|
|
118
|
+
off: "off";
|
|
119
|
+
vhdx: "vhdx";
|
|
120
|
+
}>;
|
|
121
|
+
maxGb: z.ZodNumber;
|
|
122
|
+
available: z.ZodBoolean;
|
|
123
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
124
|
+
fixes: z.ZodArray<z.ZodString>;
|
|
125
|
+
image: z.ZodString;
|
|
126
|
+
imageExists: z.ZodBoolean;
|
|
127
|
+
imageBytes: z.ZodNullable<z.ZodNumber>;
|
|
128
|
+
mountFolder: z.ZodString;
|
|
129
|
+
recordedMounted: z.ZodBoolean;
|
|
130
|
+
holders: z.ZodNumber;
|
|
131
|
+
mountedNow: z.ZodNullable<z.ZodBoolean>;
|
|
132
|
+
}, z.core.$strip>, "storage.containedStatus">;
|
|
133
|
+
}, Record<string, never>, "storage">;
|