windows-development-sandbox 1.4.3 → 1.5.0
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/.sandbox-config.example.json +1 -2
- package/README.md +9 -9
- package/config.example.json +159 -7
- package/dist/api.d.ts +2 -2
- package/dist/api.js +2 -2
- package/dist/cli/args.d.ts +15 -0
- package/dist/cli/args.js +24 -1
- package/dist/cli/commands/accounts.js +27 -26
- package/dist/cli/commands/agent-commands.d.ts +1 -1
- package/dist/cli/commands/agent-commands.js +10 -35
- package/dist/cli/commands/context.d.ts +6 -0
- package/dist/cli/commands/data/clean.d.ts +1 -13
- package/dist/cli/commands/data/clean.js +13 -98
- package/dist/cli/commands/data/index.js +4 -5
- package/dist/cli/commands/index.d.ts +2 -1
- package/dist/cli/commands/index.js +2 -1
- package/dist/cli/commands/launch/first-start.d.ts +1 -1
- package/dist/cli/commands/launch/first-start.js +1 -1
- package/dist/cli/commands/launch/launch.d.ts +3 -0
- package/dist/cli/commands/launch/launch.js +68 -6
- package/dist/cli/commands/launch/prepare.d.ts +2 -2
- package/dist/cli/commands/launch/prepare.js +1 -2
- package/dist/cli/commands/launch/resume-offer.d.ts +8 -0
- package/dist/cli/commands/launch/resume-offer.js +41 -0
- package/dist/cli/commands/maintenance/doctor.js +2 -48
- package/dist/cli/commands/maintenance/host-claude.d.ts +3 -0
- package/dist/cli/commands/maintenance/host-claude.js +11 -1
- package/dist/cli/commands/maintenance/index.d.ts +2 -0
- package/dist/cli/commands/maintenance/index.js +2 -0
- package/dist/cli/commands/maintenance/logs.js +8 -28
- package/dist/cli/commands/maintenance/migrate.d.ts +13 -0
- package/dist/cli/commands/maintenance/migrate.js +55 -0
- package/dist/cli/commands/maintenance/update.d.ts +22 -0
- package/dist/cli/commands/maintenance/update.js +106 -0
- package/dist/cli/commands/maintenance/watch.js +5 -1
- package/dist/cli/commands/projects/here.d.ts +3 -1
- package/dist/cli/commands/projects/here.js +24 -7
- package/dist/cli/commands/projects/projects.d.ts +0 -12
- package/dist/cli/commands/projects/projects.js +42 -102
- package/dist/cli/commands/projects/restart.d.ts +2 -12
- package/dist/cli/commands/projects/restart.js +10 -53
- package/dist/cli/commands/registry.js +5 -1
- package/dist/cli/commands/repair/index.d.ts +0 -3
- package/dist/cli/commands/repair/index.js +4 -37
- package/dist/cli/commands/resume.d.ts +2 -0
- package/dist/cli/commands/resume.js +61 -0
- package/dist/cli/commands/sessions/attach.d.ts +1 -1
- package/dist/cli/commands/sessions/attach.js +13 -14
- package/dist/cli/commands/sessions/control.d.ts +1 -1
- package/dist/cli/commands/sessions/control.js +23 -19
- package/dist/cli/commands/sessions/exec.d.ts +2 -2
- package/dist/cli/commands/sessions/exec.js +14 -14
- package/dist/cli/commands/sessions/list.d.ts +1 -14
- package/dist/cli/commands/sessions/list.js +19 -39
- package/dist/cli/commands/sessions/reopen.d.ts +36 -0
- package/dist/cli/commands/sessions/reopen.js +99 -0
- package/dist/cli/commands/sessions/status.d.ts +1 -1
- package/dist/cli/commands/sessions/status.js +37 -97
- package/dist/cli/commands/sessions/window.d.ts +1 -1
- package/dist/cli/commands/sessions/window.js +7 -7
- package/dist/cli/commands/setup/facts.js +2 -12
- package/dist/cli/commands/setup/index.js +10 -25
- package/dist/cli/commands/shared-use.d.ts +29 -0
- package/dist/cli/commands/shared-use.js +69 -0
- package/dist/cli/index.js +13 -2
- package/dist/cli/manifest.d.ts +182 -1
- package/dist/cli/manifest.js +80 -5
- package/dist/cli/menu/apps.d.ts +26 -15
- package/dist/cli/menu/apps.js +83 -114
- package/dist/cli/menu/command-form.d.ts +5 -0
- package/dist/cli/menu/command-form.js +44 -27
- package/dist/cli/menu/menu.d.ts +7 -12
- package/dist/cli/menu/menu.js +81 -96
- package/dist/cli/menu/pages/accounts-page.d.ts +29 -0
- package/dist/cli/menu/pages/accounts-page.js +168 -0
- package/dist/cli/menu/pages/apps-page.d.ts +26 -0
- package/dist/cli/menu/pages/apps-page.js +75 -0
- package/dist/cli/menu/pages/list-page.d.ts +42 -0
- package/dist/cli/menu/pages/list-page.js +65 -0
- package/dist/cli/menu/pages/maintenance-page.d.ts +76 -0
- package/dist/cli/menu/pages/maintenance-page.js +483 -0
- package/dist/cli/menu/pages/sandbox-page.d.ts +32 -0
- package/dist/cli/menu/pages/sandbox-page.js +273 -0
- package/dist/cli/menu/pages/scopes.d.ts +9 -0
- package/dist/cli/menu/pages/scopes.js +15 -0
- package/dist/cli/menu/pages/sessions-page.d.ts +20 -0
- package/dist/cli/menu/pages/sessions-page.js +94 -0
- package/dist/cli/menu/pages/settings-page.d.ts +31 -0
- package/dist/cli/menu/pages/settings-page.js +207 -0
- package/dist/cli/menu/pages/start-page.d.ts +43 -0
- package/dist/cli/menu/pages/start-page.js +192 -0
- package/dist/cli/menu/settings/categories.js +9 -2
- package/dist/cli/menu/settings/collections/collection-editor.d.ts +2 -2
- package/dist/cli/menu/settings/collections/collection-editor.js +9 -25
- package/dist/cli/menu/settings/config-file.d.ts +9 -0
- package/dist/cli/menu/settings/config-file.js +18 -7
- package/dist/cli/menu/settings/draft.d.ts +26 -0
- package/dist/cli/menu/settings/draft.js +67 -0
- package/dist/cli/menu/settings/editor-actions.d.ts +0 -1
- package/dist/cli/menu/settings/editor-actions.js +0 -1
- package/dist/cli/menu/settings/index.d.ts +2 -2
- package/dist/cli/menu/settings/index.js +1 -1
- package/dist/cli/menu/settings/object-editor.js +8 -28
- package/dist/cli/menu/shell.d.ts +54 -0
- package/dist/cli/menu/shell.js +109 -0
- package/dist/cli/services/accounts-service.d.ts +44 -0
- package/dist/cli/services/accounts-service.js +115 -0
- package/dist/cli/services/agent-commands-service.d.ts +22 -0
- package/dist/cli/services/agent-commands-service.js +44 -0
- package/dist/cli/services/data-service.d.ts +43 -0
- package/dist/cli/services/data-service.js +66 -0
- package/dist/cli/services/data-targets.d.ts +13 -0
- package/dist/cli/services/data-targets.js +67 -0
- package/dist/cli/services/databases-service.d.ts +27 -0
- package/dist/cli/services/databases-service.js +57 -0
- package/dist/cli/services/health-service.d.ts +28 -0
- package/dist/cli/services/health-service.js +120 -0
- package/dist/cli/services/index.d.ts +12 -0
- package/dist/cli/services/index.js +12 -0
- package/dist/cli/services/logs-service.d.ts +25 -0
- package/dist/cli/services/logs-service.js +54 -0
- package/dist/cli/services/migrate-service.d.ts +29 -0
- package/dist/cli/services/migrate-service.js +43 -0
- package/dist/cli/services/projects-service.d.ts +56 -0
- package/dist/cli/services/projects-service.js +111 -0
- package/dist/cli/services/sandbox-service.d.ts +78 -0
- package/dist/cli/services/sandbox-service.js +125 -0
- package/dist/cli/services/sessions-service.d.ts +42 -0
- package/dist/cli/services/sessions-service.js +81 -0
- package/dist/cli/services/update-service.d.ts +74 -0
- package/dist/cli/services/update-service.js +185 -0
- package/dist/cli/tui/app.d.ts +13 -0
- package/dist/cli/tui/app.js +37 -3
- package/dist/cli/tui/dialogs/overlay.d.ts +34 -0
- package/dist/cli/tui/dialogs/overlay.js +104 -0
- package/dist/cli/tui/frame.d.ts +13 -4
- package/dist/cli/tui/frame.js +10 -8
- package/dist/cli/tui/index.d.ts +5 -2
- package/dist/cli/tui/index.js +3 -0
- package/dist/cli/tui/key-bar.d.ts +5 -0
- package/dist/cli/tui/key-bar.js +22 -0
- package/dist/cli/tui/list/list-screen.d.ts +9 -0
- package/dist/cli/tui/list/list-screen.js +62 -22
- package/dist/cli/tui/list/list-types.d.ts +12 -1
- package/dist/cli/tui/tab-bar.d.ts +9 -0
- package/dist/cli/tui/tab-bar.js +33 -0
- package/dist/cli/tui/text.js +4 -1
- package/dist/core/config/defaults.js +77 -7
- package/dist/core/config/index.d.ts +1 -1
- package/dist/core/config/index.js +1 -1
- package/dist/core/config/loader.d.ts +13 -9
- package/dist/core/config/loader.js +61 -20
- package/dist/core/detect/databases.d.ts +2 -2
- package/dist/core/detect/databases.js +4 -4
- package/dist/core/detect/pwsh.d.ts +4 -4
- package/dist/core/detect/pwsh.js +11 -11
- package/dist/core/detect/toolchains.d.ts +7 -4
- package/dist/core/detect/toolchains.js +15 -6
- package/dist/core/detect/versions.d.ts +22 -14
- package/dist/core/detect/versions.js +43 -29
- package/dist/core/disk.d.ts +13 -7
- package/dist/core/disk.js +18 -12
- package/dist/core/local-config/file.d.ts +1 -1
- package/dist/core/local-config/file.js +2 -2
- package/dist/core/local-config/overrides.d.ts +7 -7
- package/dist/core/local-config/overrides.js +20 -18
- package/dist/core/local-config/policy.d.ts +2 -2
- package/dist/core/local-config/policy.js +5 -3
- package/dist/core/local-config/trust.d.ts +6 -6
- package/dist/core/local-config/trust.js +16 -8
- package/dist/core/package-info.d.ts +1 -1
- package/dist/core/package-info.js +2 -2
- package/dist/core/prompt.d.ts +2 -2
- package/dist/core/prompt.js +6 -5
- package/dist/core/run/guest-workspace.d.ts +6 -2
- package/dist/core/run/guest-workspace.js +4 -1
- package/dist/core/run/resolve-run.d.ts +5 -2
- package/dist/core/run/resolve-run.js +6 -3
- package/dist/core/run/versions.d.ts +3 -3
- package/dist/core/run/versions.js +4 -4
- package/dist/core/safe-paths.d.ts +6 -3
- package/dist/core/safe-paths.js +8 -5
- package/dist/core/schema/common.d.ts +3 -3
- package/dist/core/schema/common.js +9 -3
- package/dist/core/schema/config.d.ts +29 -10
- package/dist/core/schema/config.js +4 -1
- package/dist/core/schema/databases.d.ts +1 -1
- package/dist/core/schema/databases.js +4 -2
- package/dist/core/schema/harness.d.ts +14 -0
- package/dist/core/schema/harness.js +25 -0
- package/dist/core/schema/json-schema.d.ts +2 -2
- package/dist/core/schema/json-schema.js +10 -8
- package/dist/core/schema/resume.d.ts +11 -0
- package/dist/core/schema/resume.js +12 -0
- package/dist/core/schema/sandbox.d.ts +3 -0
- package/dist/core/schema/sandbox.js +5 -0
- package/dist/core/schema/toolchains.d.ts +3 -3
- package/dist/core/schema/toolchains.js +7 -5
- package/dist/core/types.d.ts +20 -3
- package/dist/core/util/errors.d.ts +1 -1
- package/dist/core/util/errors.js +3 -1
- package/dist/core/util/fs.d.ts +7 -7
- package/dist/core/util/fs.js +16 -12
- package/dist/core/util/index.d.ts +2 -2
- package/dist/core/util/index.js +2 -2
- package/dist/core/util/jsonc.d.ts +2 -2
- package/dist/core/util/jsonc.js +9 -4
- package/dist/core/util/links.d.ts +3 -3
- package/dist/core/util/links.js +6 -6
- package/dist/core/util/paths.d.ts +8 -6
- package/dist/core/util/paths.js +19 -13
- package/dist/core/util/process.d.ts +7 -11
- package/dist/core/util/process.js +8 -49
- package/dist/core/util/text.d.ts +6 -4
- package/dist/core/util/text.js +17 -4
- package/dist/guest/agents/agent-installer.d.ts +21 -10
- package/dist/guest/agents/agent-installer.js +76 -59
- package/dist/guest/agents/profile-links.d.ts +5 -0
- package/dist/guest/agents/profile-links.js +27 -0
- package/dist/guest/apps/shortcuts.d.ts +1 -1
- package/dist/guest/apps/shortcuts.js +11 -20
- package/dist/guest/audit/parse.d.ts +1 -1
- package/dist/guest/audit/parse.js +2 -2
- package/dist/guest/audit/process-audit.d.ts +2 -2
- package/dist/guest/audit/process-audit.js +4 -4
- package/dist/guest/boot/boot-env.d.ts +2 -2
- package/dist/guest/boot/boot-env.js +4 -4
- package/dist/guest/boot/boot.d.ts +18 -1
- package/dist/guest/boot/boot.js +168 -119
- package/dist/guest/boot/guide.d.ts +4 -4
- package/dist/guest/boot/guide.js +44 -40
- package/dist/guest/boot/project-env.d.ts +1 -1
- package/dist/guest/boot/project-env.js +2 -2
- package/dist/guest/boot/project-status.d.ts +2 -2
- package/dist/guest/boot/project-status.js +5 -3
- package/dist/guest/daemon/daemon.d.ts +7 -1
- package/dist/guest/daemon/daemon.js +48 -42
- package/dist/guest/daemon/exec.d.ts +3 -3
- package/dist/guest/daemon/exec.js +10 -6
- package/dist/guest/daemon/idle-shutdown.d.ts +8 -1
- package/dist/guest/daemon/idle-shutdown.js +26 -14
- package/dist/guest/daemon/project-provisioner.d.ts +17 -8
- package/dist/guest/daemon/project-provisioner.js +68 -58
- package/dist/guest/daemon/relays.d.ts +1 -1
- package/dist/guest/daemon/relays.js +2 -2
- package/dist/guest/daemon/sessions.d.ts +30 -8
- package/dist/guest/daemon/sessions.js +170 -105
- package/dist/guest/daemon/state.d.ts +5 -14
- package/dist/guest/daemon/state.js +16 -13
- package/dist/guest/entries/daemon.js +2 -2
- package/dist/guest/entries/db.js +4 -2
- package/dist/guest/git/decision.d.ts +1 -1
- package/dist/guest/git/decision.js +2 -2
- package/dist/guest/network/addresses.d.ts +1 -1
- package/dist/guest/network/addresses.js +6 -4
- package/dist/guest/network/allow-only.d.ts +2 -2
- package/dist/guest/network/allow-only.js +4 -4
- package/dist/guest/network/firewall.d.ts +2 -2
- package/dist/guest/network/firewall.js +12 -12
- package/dist/guest/runtime/csc.d.ts +13 -3
- package/dist/guest/runtime/csc.js +28 -11
- package/dist/guest/runtime/fs.d.ts +2 -2
- package/dist/guest/runtime/fs.js +5 -3
- package/dist/guest/runtime/log.d.ts +2 -2
- package/dist/guest/runtime/log.js +4 -4
- package/dist/guest/runtime/ports.d.ts +6 -4
- package/dist/guest/runtime/ports.js +22 -16
- package/dist/guest/runtime/process.d.ts +17 -9
- package/dist/guest/runtime/process.js +38 -14
- package/dist/guest/runtime/project-context.d.ts +3 -3
- package/dist/guest/runtime/project-context.js +9 -3
- package/dist/guest/sessions/cmdline.d.ts +3 -3
- package/dist/guest/sessions/cmdline.js +10 -6
- package/dist/guest/sessions/conversation.d.ts +5 -0
- package/dist/guest/sessions/conversation.js +38 -0
- package/dist/guest/sessions/pty-host.d.ts +5 -5
- package/dist/guest/sessions/pty-host.js +17 -10
- package/dist/guest/sessions/viewer.d.ts +1 -1
- package/dist/guest/sessions/viewer.js +2 -2
- package/dist/guest/setup/claude-mem.d.ts +2 -2
- package/dist/guest/setup/claude-mem.js +9 -6
- package/dist/guest/setup/claude-profile.d.ts +2 -2
- package/dist/guest/setup/claude-profile.js +5 -5
- package/dist/guest/setup/desktop.d.ts +1 -1
- package/dist/guest/setup/desktop.js +4 -13
- package/dist/guest/setup/environment.d.ts +3 -3
- package/dist/guest/setup/environment.js +26 -33
- package/dist/guest/setup/git-identity.d.ts +1 -1
- package/dist/guest/setup/git-identity.js +2 -2
- package/dist/guest/setup/git-rules.d.ts +1 -1
- package/dist/guest/setup/git-rules.js +2 -2
- package/dist/guest/setup/hooks.d.ts +3 -3
- package/dist/guest/setup/hooks.js +10 -8
- package/dist/guest/setup/managed-policy.d.ts +2 -2
- package/dist/guest/setup/managed-policy.js +5 -3
- package/dist/guest/toolchains/native/mesa.js +2 -2
- package/dist/guest/toolchains/native/rust-extras.d.ts +2 -2
- package/dist/guest/toolchains/native/rust-extras.js +4 -4
- package/dist/guest/toolchains/native/vcruntime.js +2 -10
- package/dist/guest/toolchains/plan.js +8 -3
- package/dist/guest/toolchains/tools/cli.js +3 -3
- package/dist/guest/toolchains/tools/vscode.js +4 -9
- package/dist/host/agent-commands/commands.d.ts +4 -4
- package/dist/host/agent-commands/commands.js +12 -8
- package/dist/host/agent-commands/forwarders.d.ts +2 -2
- package/dist/host/agent-commands/forwarders.js +14 -12
- package/dist/host/agent-commands/reconcile.d.ts +1 -1
- package/dist/host/agent-commands/reconcile.js +4 -4
- package/dist/host/agent-commands/user-path.d.ts +5 -2
- package/dist/host/agent-commands/user-path.js +15 -23
- package/dist/host/audit/collect.d.ts +2 -2
- package/dist/host/audit/collect.js +6 -2
- package/dist/host/audit/log.d.ts +1 -1
- package/dist/host/audit/log.js +2 -2
- package/dist/host/channel/attach.d.ts +4 -4
- package/dist/host/channel/attach.js +8 -8
- package/dist/host/channel/channel.d.ts +3 -1
- package/dist/host/channel/channel.js +3 -1
- package/dist/host/install/index.d.ts +4 -0
- package/dist/host/install/index.js +4 -0
- package/dist/host/install/install-record.d.ts +19 -0
- package/dist/host/install/install-record.js +28 -0
- package/dist/host/install/layout.d.ts +29 -0
- package/dist/host/install/layout.js +111 -0
- package/dist/host/install/scheduled-task.d.ts +10 -0
- package/dist/host/install/scheduled-task.js +40 -0
- package/dist/host/install/shims.d.ts +10 -0
- package/dist/host/install/shims.js +55 -0
- package/dist/host/launch/index.d.ts +1 -1
- package/dist/host/launch/index.js +1 -1
- package/dist/host/launch/mappings.js +4 -2
- package/dist/host/launch/pc-scan.js +8 -1
- package/dist/host/launch/project-scan.d.ts +2 -0
- package/dist/host/launch/project-scan.js +15 -0
- package/dist/host/launch/session-file.js +2 -0
- package/dist/host/launch/toolchains.js +12 -2
- package/dist/host/launch/wsb-file.js +1 -1
- package/dist/host/life/crash-report.d.ts +3 -1
- package/dist/host/life/crash-report.js +4 -2
- package/dist/host/life/index.d.ts +1 -0
- package/dist/host/life/index.js +1 -0
- package/dist/host/life/keep-awake.d.ts +3 -2
- package/dist/host/life/keep-awake.js +10 -7
- package/dist/host/life/life-record.d.ts +1 -1
- package/dist/host/life/life-record.js +3 -4
- package/dist/host/life/session-ledger.d.ts +65 -0
- package/dist/host/life/session-ledger.js +163 -0
- package/dist/host/life/stop-events.d.ts +4 -4
- package/dist/host/life/stop-events.js +14 -12
- package/dist/host/life/windows-update.d.ts +1 -1
- package/dist/host/life/windows-update.js +7 -5
- package/dist/host/migrate/backup.d.ts +15 -0
- package/dist/host/migrate/backup.js +92 -0
- package/dist/host/migrate/index.d.ts +5 -0
- package/dist/host/migrate/index.js +4 -0
- package/dist/host/migrate/marker.d.ts +21 -0
- package/dist/host/migrate/marker.js +49 -0
- package/dist/host/migrate/migration.d.ts +26 -0
- package/dist/host/migrate/migration.js +3 -0
- package/dist/host/migrate/migrations/config-file.d.ts +8 -0
- package/dist/host/migrate/migrations/config-file.js +28 -0
- package/dist/host/migrate/migrations/follow-machine-storage.d.ts +2 -0
- package/dist/host/migrate/migrations/follow-machine-storage.js +36 -0
- package/dist/host/migrate/migrations/unpin-config-defaults.d.ts +2 -0
- package/dist/host/migrate/migrations/unpin-config-defaults.js +41 -0
- package/dist/host/migrate/registry.d.ts +2 -0
- package/dist/host/migrate/registry.js +3 -0
- package/dist/host/migrate/runner.d.ts +21 -0
- package/dist/host/migrate/runner.js +67 -0
- package/dist/host/migrate/snapshots.d.ts +6 -0
- package/dist/host/migrate/snapshots.js +2200 -0
- package/dist/host/native.d.ts +8 -3
- package/dist/host/native.js +56 -6
- package/dist/host/network/port-forward.d.ts +4 -4
- package/dist/host/network/port-forward.js +11 -5
- package/dist/host/profile/accounts.d.ts +1 -0
- package/dist/host/profile/accounts.js +13 -0
- package/dist/host/profile/agent-accounts.d.ts +29 -0
- package/dist/host/profile/agent-accounts.js +169 -0
- package/dist/host/profile/index.d.ts +1 -0
- package/dist/host/profile/index.js +1 -0
- package/dist/host/profile/personalize.js +25 -22
- package/dist/host/projects/mapper.d.ts +1 -1
- package/dist/host/projects/mapper.js +2 -2
- package/dist/host/projects/registry.d.ts +11 -0
- package/dist/host/projects/registry.js +28 -0
- package/dist/host/sandbox/doctor.d.ts +1 -1
- package/dist/host/sandbox/doctor.js +2 -2
- package/dist/host/sandbox/host-claude.d.ts +4 -1
- package/dist/host/sandbox/host-claude.js +24 -3
- package/dist/host/sandbox/platform.d.ts +9 -7
- package/dist/host/sandbox/platform.js +29 -17
- package/dist/host/sandbox/probe.d.ts +1 -1
- package/dist/host/sandbox/probe.js +2 -2
- package/dist/host/sandbox/window.d.ts +2 -2
- package/dist/host/sandbox/window.js +36 -56
- package/dist/host/sandbox/wsb-cli.d.ts +10 -10
- package/dist/host/sandbox/wsb-cli.js +30 -18
- package/dist/host/sharing/acl.d.ts +30 -0
- package/dist/host/sharing/acl.js +65 -0
- package/dist/host/sharing/active-record.d.ts +27 -0
- package/dist/host/sharing/active-record.js +70 -0
- package/dist/host/sharing/borrow.d.ts +11 -0
- package/dist/host/sharing/borrow.js +20 -0
- package/dist/host/sharing/current.d.ts +11 -0
- package/dist/host/sharing/current.js +37 -0
- package/dist/host/sharing/index.d.ts +8 -0
- package/dist/host/sharing/index.js +10 -0
- package/dist/host/sharing/lifecycle.d.ts +26 -0
- package/dist/host/sharing/lifecycle.js +79 -0
- package/dist/host/sharing/machine-paths.d.ts +6 -0
- package/dist/host/sharing/machine-paths.js +13 -0
- package/dist/host/sharing/owner.d.ts +28 -0
- package/dist/host/sharing/owner.js +73 -0
- package/dist/host/sharing/rules.d.ts +39 -0
- package/dist/host/sharing/rules.js +60 -0
- package/dist/host/storage/cleanup.d.ts +4 -3
- package/dist/host/storage/cleanup.js +16 -13
- package/dist/host/storage/state-files.d.ts +1 -1
- package/dist/host/test-guard.d.ts +2 -2
- package/dist/host/test-guard.js +6 -5
- package/dist/host/tools/conpty.d.ts +2 -2
- package/dist/host/tools/conpty.js +5 -3
- package/dist/host/tools/windows-terminal.d.ts +6 -6
- package/dist/host/tools/windows-terminal.js +12 -8
- package/dist/host/update/decision.d.ts +29 -0
- package/dist/host/update/decision.js +32 -0
- package/dist/host/update/index.d.ts +6 -0
- package/dist/host/update/index.js +6 -0
- package/dist/host/update/notice.d.ts +11 -0
- package/dist/host/update/notice.js +28 -0
- package/dist/host/update/release-source.d.ts +32 -0
- package/dist/host/update/release-source.js +79 -0
- package/dist/host/update/update-lock.d.ts +7 -0
- package/dist/host/update/update-lock.js +48 -0
- package/dist/host/update/update-state.d.ts +24 -0
- package/dist/host/update/update-state.js +24 -0
- package/dist/host/update/updater.d.ts +62 -0
- package/dist/host/update/updater.js +241 -0
- package/dist/host/workspace-view/active-views.d.ts +2 -2
- package/dist/host/workspace-view/active-views.js +13 -9
- package/dist/host/workspace-view/plan.d.ts +3 -3
- package/dist/host/workspace-view/plan.js +7 -5
- package/dist/host/workspace-view/rules.d.ts +3 -1
- package/dist/host/workspace-view/rules.js +3 -1
- package/dist/host/workspace-view/view-state.d.ts +3 -3
- package/dist/host/workspace-view/view-state.js +6 -6
- package/dist/runtime/daemon.js +1542 -1181
- package/dist/runtime/db.js +482 -362
- package/dist/runtime/gitguard.js +2 -2
- package/dist/runtime/main.js +1424 -1229
- package/dist/runtime/netproxy.js +292 -203
- package/dist/runtime/view.js +255 -199
- package/dist/selftest/accounts.test.js +9 -9
- package/dist/selftest/agent-commands.test.js +8 -8
- package/dist/selftest/channel.test.js +58 -52
- package/dist/selftest/cli.test.js +67 -108
- package/dist/selftest/cmdline.test.js +4 -3
- package/dist/selftest/data.test.js +37 -19
- package/dist/selftest/detect.test.js +43 -28
- package/dist/selftest/generate.test.js +39 -37
- package/dist/selftest/git-access.test.js +2 -1
- package/dist/selftest/guest-boot.test.js +40 -38
- package/dist/selftest/host-sim.test.js +3 -0
- package/dist/selftest/hostile-input.test.js +2 -0
- package/dist/selftest/index.d.ts +3 -3
- package/dist/selftest/index.js +37 -9
- package/dist/selftest/install.test.d.ts +2 -0
- package/dist/selftest/install.test.js +49 -0
- package/dist/selftest/live-daemon.test.js +17 -17
- package/dist/selftest/live-git.test.js +3 -3
- package/dist/selftest/live-network.test.js +51 -2
- package/dist/selftest/live-projects.test.js +25 -21
- package/dist/selftest/live-terminal.test.js +34 -22
- package/dist/selftest/local-config.test.js +37 -38
- package/dist/selftest/menu-screens.d.ts +2 -0
- package/dist/selftest/menu-screens.js +224 -0
- package/dist/selftest/menu.test.d.ts +2 -0
- package/dist/selftest/menu.test.js +149 -0
- package/dist/selftest/migrate.test.d.ts +2 -0
- package/dist/selftest/migrate.test.js +194 -0
- package/dist/selftest/mirror.test.js +51 -82
- package/dist/selftest/network.test.js +5 -5
- package/dist/selftest/personalization.test.js +15 -16
- package/dist/selftest/projects.test.js +241 -228
- package/dist/selftest/repo-guard.test.js +34 -32
- package/dist/selftest/resume.test.d.ts +2 -0
- package/dist/selftest/resume.test.js +175 -0
- package/dist/selftest/secrets.test.js +2 -2
- package/dist/selftest/setup.test.js +33 -25
- package/dist/selftest/shared-use.test.d.ts +2 -0
- package/dist/selftest/shared-use.test.js +116 -0
- package/dist/selftest/sharing.test.d.ts +2 -0
- package/dist/selftest/sharing.test.js +201 -0
- package/dist/selftest/support/fixtures.d.ts +24 -7
- package/dist/selftest/support/fixtures.js +45 -32
- package/dist/selftest/support/harness.d.ts +1 -1
- package/dist/selftest/support/harness.js +2 -2
- package/dist/selftest/support/live.d.ts +18 -12
- package/dist/selftest/support/live.js +27 -16
- package/dist/selftest/support/releases.d.ts +15 -0
- package/dist/selftest/support/releases.js +73 -0
- package/dist/selftest/sync.test.js +65 -63
- package/dist/selftest/toolchains.test.js +86 -99
- package/dist/selftest/update-service.test.d.ts +2 -0
- package/dist/selftest/update-service.test.js +188 -0
- package/dist/selftest/update.test.d.ts +2 -0
- package/dist/selftest/update.test.js +172 -0
- package/dist/selftest/workspace-view.test.js +21 -16
- package/dist/selftest/workspace.test.js +9 -8
- package/dist/shared/apps/catalogue.d.ts +8 -3
- package/dist/shared/apps/catalogue.js +3 -1
- package/dist/shared/apps/selection.d.ts +3 -3
- package/dist/shared/apps/selection.js +7 -5
- package/dist/shared/channel/schema.d.ts +38 -9
- package/dist/shared/channel/schema.js +2 -0
- package/dist/shared/download/archive.d.ts +4 -4
- package/dist/shared/download/archive.js +11 -17
- package/dist/shared/download/downloader.d.ts +4 -1
- package/dist/shared/download/downloader.js +2 -1
- package/dist/shared/download/github.d.ts +7 -5
- package/dist/shared/download/github.js +13 -10
- package/dist/shared/download/http.d.ts +3 -3
- package/dist/shared/download/http.js +8 -4
- package/dist/shared/download/spawn.d.ts +2 -1
- package/dist/shared/download/spawn.js +7 -5
- package/dist/shared/io/json.d.ts +4 -4
- package/dist/shared/io/json.js +9 -7
- package/dist/shared/io/safe-remove.d.ts +2 -2
- package/dist/shared/io/safe-remove.js +20 -17
- package/dist/shared/network/firewall-rules.d.ts +19 -13
- package/dist/shared/network/firewall-rules.js +31 -23
- package/dist/shared/network/policy.d.ts +4 -4
- package/dist/shared/network/policy.js +15 -11
- package/dist/shared/paths/agent-profile.d.ts +9 -0
- package/dist/shared/paths/agent-profile.js +21 -0
- package/dist/shared/paths/claude-paths.d.ts +7 -6
- package/dist/shared/paths/claude-paths.js +19 -14
- package/dist/shared/paths/conversation.d.ts +23 -0
- package/dist/shared/paths/conversation.js +25 -0
- package/dist/shared/paths/guest-paths.d.ts +12 -12
- package/dist/shared/paths/guest-paths.js +26 -22
- package/dist/shared/paths/index.d.ts +2 -0
- package/dist/shared/paths/index.js +2 -0
- package/dist/shared/paths/projects.d.ts +24 -19
- package/dist/shared/paths/projects.js +37 -24
- package/dist/shared/pty/client.d.ts +3 -3
- package/dist/shared/pty/client.js +6 -6
- package/dist/shared/pty/console-input.d.ts +1 -1
- package/dist/shared/pty/console-input.js +11 -42
- package/dist/shared/pty/output-filter.d.ts +4 -1
- package/dist/shared/pty/output-filter.js +4 -1
- package/dist/shared/pty/protocol.d.ts +7 -5
- package/dist/shared/pty/protocol.js +11 -9
- package/dist/shared/pty/terminal.d.ts +8 -5
- package/dist/shared/pty/terminal.js +12 -6
- package/dist/shared/scripts.d.ts +4 -0
- package/dist/shared/scripts.js +26 -0
- package/dist/shared/system.d.ts +11 -1
- package/dist/shared/system.js +15 -1
- package/dist/shared/test-guard.d.ts +3 -3
- package/dist/shared/test-guard.js +15 -9
- package/dist/sync/claude-mem.d.ts +2 -2
- package/dist/sync/claude-mem.js +10 -7
- package/dist/sync/history.d.ts +4 -4
- package/dist/sync/history.js +9 -6
- package/dist/sync/sync-cycle.d.ts +4 -4
- package/dist/sync/sync-cycle.js +6 -6
- package/dist/sync/sync-state.d.ts +3 -3
- package/dist/sync/sync-state.js +9 -3
- package/dist/sync/watcher.d.ts +42 -2
- package/dist/sync/watcher.js +199 -98
- package/native/{power.cs → csharp/HostTools/KeepAwake.cs} +2 -1
- package/native/csharp/HostTools/Program.cs +227 -0
- package/native/csharp/HostTools/UserPath.cs +74 -0
- package/native/csharp/HostTools/Window.cs +143 -0
- package/native/scripts/capture-look.ps1 +22 -0
- package/native/scripts/check-syntax.ps1 +14 -0
- package/native/scripts/edit-user-path.ps1 +11 -0
- package/native/scripts/hide-window.ps1 +8 -0
- package/native/{keep-awake.ps1 → scripts/keep-awake.ps1} +2 -2
- package/native/scripts/run-elevated.ps1 +12 -0
- package/native/scripts/sandbox-probe.ps1 +15 -0
- package/native/scripts/set-folder-access.ps1 +44 -0
- package/native/scripts/set-update-task.ps1 +43 -0
- package/native/scripts/show-window.ps1 +13 -0
- package/native/{stop-events.ps1 → scripts/stop-events.ps1} +1 -1
- package/node_modules/@inquirer/ansi/LICENSE +22 -0
- package/node_modules/@inquirer/ansi/README.md +89 -0
- package/node_modules/@inquirer/ansi/dist/commonjs/index.d.ts +14 -0
- package/node_modules/@inquirer/ansi/dist/commonjs/index.js +28 -0
- package/node_modules/@inquirer/ansi/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/ansi/dist/esm/index.d.ts +14 -0
- package/node_modules/@inquirer/ansi/dist/esm/index.js +21 -0
- package/node_modules/@inquirer/ansi/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/ansi/package.json +97 -0
- package/node_modules/@inquirer/checkbox/LICENSE +22 -0
- package/node_modules/@inquirer/checkbox/README.md +188 -0
- package/node_modules/@inquirer/checkbox/dist/commonjs/index.d.ts +57 -0
- package/node_modules/@inquirer/checkbox/dist/commonjs/index.js +209 -0
- package/node_modules/@inquirer/checkbox/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/checkbox/dist/esm/index.d.ts +57 -0
- package/node_modules/@inquirer/checkbox/dist/esm/index.js +202 -0
- package/node_modules/@inquirer/checkbox/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/checkbox/package.json +113 -0
- package/node_modules/@inquirer/confirm/LICENSE +22 -0
- package/node_modules/@inquirer/confirm/README.md +92 -0
- package/node_modules/@inquirer/confirm/dist/commonjs/index.d.ts +10 -0
- package/node_modules/@inquirer/confirm/dist/commonjs/index.js +50 -0
- package/node_modules/@inquirer/confirm/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/confirm/dist/esm/index.d.ts +10 -0
- package/node_modules/@inquirer/confirm/dist/esm/index.js +48 -0
- package/node_modules/@inquirer/confirm/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/confirm/package.json +110 -0
- package/node_modules/@inquirer/core/LICENSE +22 -0
- package/node_modules/@inquirer/core/README.md +383 -0
- package/node_modules/@inquirer/core/dist/commonjs/index.d.ts +13 -0
- package/node_modules/@inquirer/core/dist/commonjs/index.js +46 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/Separator.d.ts +10 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/Separator.js +28 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.d.ts +4 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/create-prompt.js +156 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/errors.d.ts +20 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/errors.js +29 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.d.ts +23 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/hook-engine.js +118 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/key.d.ts +12 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/key.js +29 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.d.ts +3 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/make-theme.js +33 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.d.ts +16 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/pagination/use-pagination.js +124 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.d.ts +7 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/promise-polyfill.js +18 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.d.ts +14 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/screen-manager.js +82 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/theme.d.ts +155 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/theme.js +27 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.d.ts +2 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-effect.js +14 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.d.ts +3 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-keypress.js +23 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.d.ts +1 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-memo.js +17 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.d.ts +5 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-prefix.js +38 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.d.ts +6 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-ref.js +7 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-state.d.ts +4 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/use-state.js +23 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/utils.d.ts +13 -0
- package/node_modules/@inquirer/core/dist/commonjs/lib/utils.js +32 -0
- package/node_modules/@inquirer/core/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/core/dist/esm/index.d.ts +13 -0
- package/node_modules/@inquirer/core/dist/esm/index.js +12 -0
- package/node_modules/@inquirer/core/dist/esm/lib/Separator.d.ts +10 -0
- package/node_modules/@inquirer/core/dist/esm/lib/Separator.js +21 -0
- package/node_modules/@inquirer/core/dist/esm/lib/create-prompt.d.ts +4 -0
- package/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js +117 -0
- package/node_modules/@inquirer/core/dist/esm/lib/errors.d.ts +20 -0
- package/node_modules/@inquirer/core/dist/esm/lib/errors.js +21 -0
- package/node_modules/@inquirer/core/dist/esm/lib/hook-engine.d.ts +23 -0
- package/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js +110 -0
- package/node_modules/@inquirer/core/dist/esm/lib/key.d.ts +12 -0
- package/node_modules/@inquirer/core/dist/esm/lib/key.js +19 -0
- package/node_modules/@inquirer/core/dist/esm/lib/make-theme.d.ts +3 -0
- package/node_modules/@inquirer/core/dist/esm/lib/make-theme.js +30 -0
- package/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.d.ts +16 -0
- package/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js +121 -0
- package/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.d.ts +7 -0
- package/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js +14 -0
- package/node_modules/@inquirer/core/dist/esm/lib/screen-manager.d.ts +14 -0
- package/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js +79 -0
- package/node_modules/@inquirer/core/dist/esm/lib/theme.d.ts +155 -0
- package/node_modules/@inquirer/core/dist/esm/lib/theme.js +21 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-effect.d.ts +2 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-effect.js +11 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-keypress.d.ts +3 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js +20 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-memo.d.ts +1 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-memo.js +14 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-prefix.d.ts +5 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js +35 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-ref.d.ts +6 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-ref.js +4 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-state.d.ts +4 -0
- package/node_modules/@inquirer/core/dist/esm/lib/use-state.js +20 -0
- package/node_modules/@inquirer/core/dist/esm/lib/utils.d.ts +13 -0
- package/node_modules/@inquirer/core/dist/esm/lib/utils.js +25 -0
- package/node_modules/@inquirer/core/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/core/package.json +119 -0
- package/node_modules/@inquirer/editor/LICENSE +22 -0
- package/node_modules/@inquirer/editor/README.md +101 -0
- package/node_modules/@inquirer/editor/dist/commonjs/index.d.ts +17 -0
- package/node_modules/@inquirer/editor/dist/commonjs/index.js +76 -0
- package/node_modules/@inquirer/editor/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/editor/dist/esm/index.d.ts +17 -0
- package/node_modules/@inquirer/editor/dist/esm/index.js +74 -0
- package/node_modules/@inquirer/editor/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/editor/package.json +111 -0
- package/node_modules/@inquirer/expand/LICENSE +22 -0
- package/node_modules/@inquirer/expand/README.md +141 -0
- package/node_modules/@inquirer/expand/dist/commonjs/index.d.ts +25 -0
- package/node_modules/@inquirer/expand/dist/commonjs/index.js +115 -0
- package/node_modules/@inquirer/expand/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/expand/dist/esm/index.d.ts +25 -0
- package/node_modules/@inquirer/expand/dist/esm/index.js +108 -0
- package/node_modules/@inquirer/expand/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/expand/package.json +111 -0
- package/node_modules/@inquirer/external-editor/LICENSE +22 -0
- package/node_modules/@inquirer/external-editor/README.md +154 -0
- package/node_modules/@inquirer/external-editor/dist/commonjs/errors/CreateFileError.d.ts +10 -0
- package/node_modules/@inquirer/external-editor/dist/commonjs/errors/CreateFileError.js +17 -0
- package/node_modules/@inquirer/external-editor/dist/commonjs/errors/LaunchEditorError.d.ts +10 -0
- package/node_modules/@inquirer/external-editor/dist/commonjs/errors/LaunchEditorError.js +17 -0
- package/node_modules/@inquirer/external-editor/dist/commonjs/errors/ReadFileError.d.ts +10 -0
- package/node_modules/@inquirer/external-editor/dist/commonjs/errors/ReadFileError.js +17 -0
- package/node_modules/@inquirer/external-editor/dist/commonjs/errors/RemoveFileError.d.ts +10 -0
- package/node_modules/@inquirer/external-editor/dist/commonjs/errors/RemoveFileError.js +17 -0
- package/node_modules/@inquirer/external-editor/dist/commonjs/index.d.ts +39 -0
- package/node_modules/@inquirer/external-editor/dist/commonjs/index.js +203 -0
- package/node_modules/@inquirer/external-editor/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/external-editor/dist/esm/errors/CreateFileError.d.ts +10 -0
- package/node_modules/@inquirer/external-editor/dist/esm/errors/CreateFileError.js +13 -0
- package/node_modules/@inquirer/external-editor/dist/esm/errors/LaunchEditorError.d.ts +10 -0
- package/node_modules/@inquirer/external-editor/dist/esm/errors/LaunchEditorError.js +13 -0
- package/node_modules/@inquirer/external-editor/dist/esm/errors/ReadFileError.d.ts +10 -0
- package/node_modules/@inquirer/external-editor/dist/esm/errors/ReadFileError.js +13 -0
- package/node_modules/@inquirer/external-editor/dist/esm/errors/RemoveFileError.d.ts +10 -0
- package/node_modules/@inquirer/external-editor/dist/esm/errors/RemoveFileError.js +13 -0
- package/node_modules/@inquirer/external-editor/dist/esm/index.d.ts +39 -0
- package/node_modules/@inquirer/external-editor/dist/esm/index.js +191 -0
- package/node_modules/@inquirer/external-editor/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/external-editor/package.json +115 -0
- package/node_modules/@inquirer/figures/LICENSE +22 -0
- package/node_modules/@inquirer/figures/dist/commonjs/index.d.ts +275 -0
- package/node_modules/@inquirer/figures/dist/commonjs/index.js +321 -0
- package/node_modules/@inquirer/figures/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/figures/dist/esm/index.d.ts +275 -0
- package/node_modules/@inquirer/figures/dist/esm/index.js +314 -0
- package/node_modules/@inquirer/figures/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/figures/package.json +98 -0
- package/node_modules/@inquirer/input/LICENSE +22 -0
- package/node_modules/@inquirer/input/README.md +101 -0
- package/node_modules/@inquirer/input/dist/commonjs/index.d.ts +20 -0
- package/node_modules/@inquirer/input/dist/commonjs/index.js +99 -0
- package/node_modules/@inquirer/input/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/input/dist/esm/index.d.ts +20 -0
- package/node_modules/@inquirer/input/dist/esm/index.js +97 -0
- package/node_modules/@inquirer/input/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/input/package.json +110 -0
- package/node_modules/@inquirer/number/LICENSE +22 -0
- package/node_modules/@inquirer/number/README.md +95 -0
- package/node_modules/@inquirer/number/dist/commonjs/index.d.ts +15 -0
- package/node_modules/@inquirer/number/dist/commonjs/index.js +96 -0
- package/node_modules/@inquirer/number/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/number/dist/esm/index.d.ts +15 -0
- package/node_modules/@inquirer/number/dist/esm/index.js +94 -0
- package/node_modules/@inquirer/number/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/number/package.json +110 -0
- package/node_modules/@inquirer/password/LICENSE +22 -0
- package/node_modules/@inquirer/password/README.md +93 -0
- package/node_modules/@inquirer/password/dist/commonjs/index.d.ts +10 -0
- package/node_modules/@inquirer/password/dist/commonjs/index.js +57 -0
- package/node_modules/@inquirer/password/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/password/dist/esm/index.d.ts +10 -0
- package/node_modules/@inquirer/password/dist/esm/index.js +55 -0
- package/node_modules/@inquirer/password/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/password/package.json +111 -0
- package/node_modules/@inquirer/prompts/LICENSE +22 -0
- package/node_modules/@inquirer/prompts/README.md +528 -0
- package/node_modules/@inquirer/prompts/dist/commonjs/index.d.ts +10 -0
- package/node_modules/@inquirer/prompts/dist/commonjs/index.js +27 -0
- package/node_modules/@inquirer/prompts/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/prompts/dist/esm/index.d.ts +10 -0
- package/node_modules/@inquirer/prompts/dist/esm/index.js +10 -0
- package/node_modules/@inquirer/prompts/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/prompts/package.json +120 -0
- package/node_modules/@inquirer/rawlist/LICENSE +22 -0
- package/node_modules/@inquirer/rawlist/README.md +124 -0
- package/node_modules/@inquirer/rawlist/dist/commonjs/index.d.ts +18 -0
- package/node_modules/@inquirer/rawlist/dist/commonjs/index.js +132 -0
- package/node_modules/@inquirer/rawlist/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/rawlist/dist/esm/index.d.ts +18 -0
- package/node_modules/@inquirer/rawlist/dist/esm/index.js +125 -0
- package/node_modules/@inquirer/rawlist/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/rawlist/package.json +111 -0
- package/node_modules/@inquirer/search/LICENSE +22 -0
- package/node_modules/@inquirer/search/README.md +212 -0
- package/node_modules/@inquirer/search/dist/commonjs/index.d.ts +40 -0
- package/node_modules/@inquirer/search/dist/commonjs/index.js +206 -0
- package/node_modules/@inquirer/search/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/search/dist/esm/index.d.ts +40 -0
- package/node_modules/@inquirer/search/dist/esm/index.js +199 -0
- package/node_modules/@inquirer/search/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/search/package.json +112 -0
- package/node_modules/@inquirer/select/LICENSE +22 -0
- package/node_modules/@inquirer/select/README.md +181 -0
- package/node_modules/@inquirer/select/dist/commonjs/index.d.ts +40 -0
- package/node_modules/@inquirer/select/dist/commonjs/index.js +194 -0
- package/node_modules/@inquirer/select/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/select/dist/esm/index.d.ts +40 -0
- package/node_modules/@inquirer/select/dist/esm/index.js +187 -0
- package/node_modules/@inquirer/select/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/select/package.json +113 -0
- package/node_modules/@inquirer/type/LICENSE +22 -0
- package/node_modules/@inquirer/type/dist/commonjs/index.d.ts +2 -0
- package/node_modules/@inquirer/type/dist/commonjs/index.js +18 -0
- package/node_modules/@inquirer/type/dist/commonjs/inquirer.d.ts +38 -0
- package/node_modules/@inquirer/type/dist/commonjs/inquirer.js +2 -0
- package/node_modules/@inquirer/type/dist/commonjs/package.json +3 -0
- package/node_modules/@inquirer/type/dist/commonjs/utils.d.ts +29 -0
- package/node_modules/@inquirer/type/dist/commonjs/utils.js +3 -0
- package/node_modules/@inquirer/type/dist/esm/index.d.ts +2 -0
- package/node_modules/@inquirer/type/dist/esm/index.js +2 -0
- package/node_modules/@inquirer/type/dist/esm/inquirer.d.ts +38 -0
- package/node_modules/@inquirer/type/dist/esm/inquirer.js +1 -0
- package/node_modules/@inquirer/type/dist/esm/package.json +3 -0
- package/node_modules/@inquirer/type/dist/esm/utils.d.ts +29 -0
- package/node_modules/@inquirer/type/dist/esm/utils.js +2 -0
- package/node_modules/@inquirer/type/package.json +106 -0
- package/node_modules/ansi-regex/index.d.ts +37 -0
- package/node_modules/ansi-regex/index.js +10 -0
- package/node_modules/ansi-regex/license +9 -0
- package/node_modules/ansi-regex/package.json +55 -0
- package/node_modules/ansi-regex/readme.md +78 -0
- package/node_modules/ansi-styles/index.d.ts +345 -0
- package/node_modules/ansi-styles/index.js +163 -0
- package/node_modules/ansi-styles/license +9 -0
- package/node_modules/ansi-styles/package.json +56 -0
- package/node_modules/ansi-styles/readme.md +152 -0
- package/node_modules/chardet/LICENSE +19 -0
- package/node_modules/chardet/README.md +135 -0
- package/node_modules/chardet/lib/encoding/ascii.d.ts +6 -0
- package/node_modules/chardet/lib/encoding/ascii.js +23 -0
- package/node_modules/chardet/lib/encoding/ascii.js.map +1 -0
- package/node_modules/chardet/lib/encoding/index.d.ts +14 -0
- package/node_modules/chardet/lib/encoding/index.js +3 -0
- package/node_modules/chardet/lib/encoding/index.js.map +1 -0
- package/node_modules/chardet/lib/encoding/iso2022.d.ts +23 -0
- package/node_modules/chardet/lib/encoding/iso2022.js +114 -0
- package/node_modules/chardet/lib/encoding/iso2022.js.map +1 -0
- package/node_modules/chardet/lib/encoding/mbcs.d.ts +50 -0
- package/node_modules/chardet/lib/encoding/mbcs.js +347 -0
- package/node_modules/chardet/lib/encoding/mbcs.js.map +1 -0
- package/node_modules/chardet/lib/encoding/sbcs.d.ts +94 -0
- package/node_modules/chardet/lib/encoding/sbcs.js +935 -0
- package/node_modules/chardet/lib/encoding/sbcs.js.map +1 -0
- package/node_modules/chardet/lib/encoding/unicode.d.ts +27 -0
- package/node_modules/chardet/lib/encoding/unicode.js +109 -0
- package/node_modules/chardet/lib/encoding/unicode.js.map +1 -0
- package/node_modules/chardet/lib/encoding/utf8.d.ts +6 -0
- package/node_modules/chardet/lib/encoding/utf8.js +72 -0
- package/node_modules/chardet/lib/encoding/utf8.js.map +1 -0
- package/node_modules/chardet/lib/fs/browser.d.ts +2 -0
- package/node_modules/chardet/lib/fs/browser.js +6 -0
- package/node_modules/chardet/lib/fs/browser.js.map +1 -0
- package/node_modules/chardet/lib/fs/node.d.ts +2 -0
- package/node_modules/chardet/lib/fs/node.js +11 -0
- package/node_modules/chardet/lib/fs/node.js.map +1 -0
- package/node_modules/chardet/lib/index.d.ts +20 -0
- package/node_modules/chardet/lib/index.js +177 -0
- package/node_modules/chardet/lib/index.js.map +1 -0
- package/node_modules/chardet/lib/match.d.ts +9 -0
- package/node_modules/chardet/lib/match.js +8 -0
- package/node_modules/chardet/lib/match.js.map +1 -0
- package/node_modules/chardet/lib/utils.d.ts +1 -0
- package/node_modules/chardet/lib/utils.js +10 -0
- package/node_modules/chardet/lib/utils.js.map +1 -0
- package/node_modules/chardet/package.json +100 -0
- package/node_modules/cli-width/LICENSE +13 -0
- package/node_modules/cli-width/README.md +71 -0
- package/node_modules/cli-width/index.d.ts +13 -0
- package/node_modules/cli-width/index.js +49 -0
- package/node_modules/cli-width/package.json +40 -0
- package/node_modules/color-convert/CHANGELOG.md +54 -0
- package/node_modules/color-convert/LICENSE +21 -0
- package/node_modules/color-convert/README.md +68 -0
- package/node_modules/color-convert/conversions.js +839 -0
- package/node_modules/color-convert/index.js +81 -0
- package/node_modules/color-convert/package.json +48 -0
- package/node_modules/color-convert/route.js +97 -0
- package/node_modules/color-name/LICENSE +8 -0
- package/node_modules/color-name/README.md +11 -0
- package/node_modules/color-name/index.js +152 -0
- package/node_modules/color-name/package.json +28 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1176 -0
- package/node_modules/commander/esm.mjs +16 -0
- package/node_modules/commander/index.js +24 -0
- package/node_modules/commander/lib/argument.js +150 -0
- package/node_modules/commander/lib/command.js +2777 -0
- package/node_modules/commander/lib/error.js +39 -0
- package/node_modules/commander/lib/help.js +747 -0
- package/node_modules/commander/lib/option.js +380 -0
- package/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/commander/package-support.json +19 -0
- package/node_modules/commander/package.json +82 -0
- package/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/commander/typings/index.d.ts +1113 -0
- package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- package/node_modules/emoji-regex/README.md +73 -0
- package/node_modules/emoji-regex/es2015/index.js +6 -0
- package/node_modules/emoji-regex/es2015/text.js +6 -0
- package/node_modules/emoji-regex/index.d.ts +23 -0
- package/node_modules/emoji-regex/index.js +6 -0
- package/node_modules/emoji-regex/package.json +50 -0
- package/node_modules/emoji-regex/text.js +6 -0
- package/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/iconv-lite/README.md +138 -0
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
- package/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
- package/node_modules/iconv-lite/encodings/index.js +23 -0
- package/node_modules/iconv-lite/encodings/internal.js +218 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +180 -0
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/iconv-lite/encodings/utf16.js +187 -0
- package/node_modules/iconv-lite/encodings/utf32.js +314 -0
- package/node_modules/iconv-lite/encodings/utf7.js +283 -0
- package/node_modules/iconv-lite/lib/bom-handling.js +48 -0
- package/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
- package/node_modules/iconv-lite/lib/index.d.ts +129 -0
- package/node_modules/iconv-lite/lib/index.js +182 -0
- package/node_modules/iconv-lite/lib/streams.js +105 -0
- package/node_modules/iconv-lite/package.json +70 -0
- package/node_modules/iconv-lite/types/encodings.d.ts +425 -0
- package/node_modules/ignore/LICENSE-MIT +21 -0
- package/node_modules/ignore/README.md +501 -0
- package/node_modules/ignore/index.d.ts +81 -0
- package/node_modules/ignore/index.js +1566 -0
- package/node_modules/ignore/legacy.js +1346 -0
- package/node_modules/ignore/package.json +93 -0
- package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/node_modules/is-fullwidth-code-point/index.js +50 -0
- package/node_modules/is-fullwidth-code-point/license +9 -0
- package/node_modules/is-fullwidth-code-point/package.json +42 -0
- package/node_modules/is-fullwidth-code-point/readme.md +39 -0
- package/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/node_modules/jsonc-parser/LICENSE.md +21 -0
- package/node_modules/jsonc-parser/README.md +364 -0
- package/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
- package/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
- package/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
- package/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
- package/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
- package/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/esm/main.js +178 -0
- package/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
- package/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
- package/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
- package/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
- package/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
- package/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/umd/main.js +194 -0
- package/node_modules/jsonc-parser/package.json +37 -0
- package/node_modules/lodash/LICENSE +47 -0
- package/node_modules/lodash/README.md +39 -0
- package/node_modules/lodash/_DataView.js +7 -0
- package/node_modules/lodash/_Hash.js +32 -0
- package/node_modules/lodash/_LazyWrapper.js +28 -0
- package/node_modules/lodash/_ListCache.js +32 -0
- package/node_modules/lodash/_LodashWrapper.js +22 -0
- package/node_modules/lodash/_Map.js +7 -0
- package/node_modules/lodash/_MapCache.js +32 -0
- package/node_modules/lodash/_Promise.js +7 -0
- package/node_modules/lodash/_Set.js +7 -0
- package/node_modules/lodash/_SetCache.js +27 -0
- package/node_modules/lodash/_Stack.js +27 -0
- package/node_modules/lodash/_Symbol.js +6 -0
- package/node_modules/lodash/_Uint8Array.js +6 -0
- package/node_modules/lodash/_WeakMap.js +7 -0
- package/node_modules/lodash/_apply.js +21 -0
- package/node_modules/lodash/_arrayAggregator.js +22 -0
- package/node_modules/lodash/_arrayEach.js +22 -0
- package/node_modules/lodash/_arrayEachRight.js +21 -0
- package/node_modules/lodash/_arrayEvery.js +23 -0
- package/node_modules/lodash/_arrayFilter.js +25 -0
- package/node_modules/lodash/_arrayIncludes.js +17 -0
- package/node_modules/lodash/_arrayIncludesWith.js +22 -0
- package/node_modules/lodash/_arrayLikeKeys.js +49 -0
- package/node_modules/lodash/_arrayMap.js +21 -0
- package/node_modules/lodash/_arrayPush.js +20 -0
- package/node_modules/lodash/_arrayReduce.js +26 -0
- package/node_modules/lodash/_arrayReduceRight.js +24 -0
- package/node_modules/lodash/_arraySample.js +15 -0
- package/node_modules/lodash/_arraySampleSize.js +17 -0
- package/node_modules/lodash/_arrayShuffle.js +15 -0
- package/node_modules/lodash/_arraySome.js +23 -0
- package/node_modules/lodash/_asciiSize.js +12 -0
- package/node_modules/lodash/_asciiToArray.js +12 -0
- package/node_modules/lodash/_asciiWords.js +15 -0
- package/node_modules/lodash/_assignMergeValue.js +20 -0
- package/node_modules/lodash/_assignValue.js +28 -0
- package/node_modules/lodash/_assocIndexOf.js +21 -0
- package/node_modules/lodash/_baseAggregator.js +21 -0
- package/node_modules/lodash/_baseAssign.js +17 -0
- package/node_modules/lodash/_baseAssignIn.js +17 -0
- package/node_modules/lodash/_baseAssignValue.js +25 -0
- package/node_modules/lodash/_baseAt.js +23 -0
- package/node_modules/lodash/_baseClamp.js +22 -0
- package/node_modules/lodash/_baseClone.js +166 -0
- package/node_modules/lodash/_baseConforms.js +18 -0
- package/node_modules/lodash/_baseConformsTo.js +27 -0
- package/node_modules/lodash/_baseCreate.js +30 -0
- package/node_modules/lodash/_baseDelay.js +21 -0
- package/node_modules/lodash/_baseDifference.js +67 -0
- package/node_modules/lodash/_baseEach.js +14 -0
- package/node_modules/lodash/_baseEachRight.js +14 -0
- package/node_modules/lodash/_baseEvery.js +21 -0
- package/node_modules/lodash/_baseExtremum.js +32 -0
- package/node_modules/lodash/_baseFill.js +32 -0
- package/node_modules/lodash/_baseFilter.js +21 -0
- package/node_modules/lodash/_baseFindIndex.js +24 -0
- package/node_modules/lodash/_baseFindKey.js +23 -0
- package/node_modules/lodash/_baseFlatten.js +38 -0
- package/node_modules/lodash/_baseFor.js +16 -0
- package/node_modules/lodash/_baseForOwn.js +16 -0
- package/node_modules/lodash/_baseForOwnRight.js +16 -0
- package/node_modules/lodash/_baseForRight.js +15 -0
- package/node_modules/lodash/_baseFunctions.js +19 -0
- package/node_modules/lodash/_baseGet.js +24 -0
- package/node_modules/lodash/_baseGetAllKeys.js +20 -0
- package/node_modules/lodash/_baseGetTag.js +28 -0
- package/node_modules/lodash/_baseGt.js +14 -0
- package/node_modules/lodash/_baseHas.js +19 -0
- package/node_modules/lodash/_baseHasIn.js +13 -0
- package/node_modules/lodash/_baseInRange.js +18 -0
- package/node_modules/lodash/_baseIndexOf.js +20 -0
- package/node_modules/lodash/_baseIndexOfWith.js +23 -0
- package/node_modules/lodash/_baseIntersection.js +74 -0
- package/node_modules/lodash/_baseInverter.js +21 -0
- package/node_modules/lodash/_baseInvoke.js +24 -0
- package/node_modules/lodash/_baseIsArguments.js +18 -0
- package/node_modules/lodash/_baseIsArrayBuffer.js +17 -0
- package/node_modules/lodash/_baseIsDate.js +18 -0
- package/node_modules/lodash/_baseIsEqual.js +28 -0
- package/node_modules/lodash/_baseIsEqualDeep.js +83 -0
- package/node_modules/lodash/_baseIsMap.js +18 -0
- package/node_modules/lodash/_baseIsMatch.js +62 -0
- package/node_modules/lodash/_baseIsNaN.js +12 -0
- package/node_modules/lodash/_baseIsNative.js +47 -0
- package/node_modules/lodash/_baseIsRegExp.js +18 -0
- package/node_modules/lodash/_baseIsSet.js +18 -0
- package/node_modules/lodash/_baseIsTypedArray.js +60 -0
- package/node_modules/lodash/_baseIteratee.js +31 -0
- package/node_modules/lodash/_baseKeys.js +30 -0
- package/node_modules/lodash/_baseKeysIn.js +33 -0
- package/node_modules/lodash/_baseLodash.js +10 -0
- package/node_modules/lodash/_baseLt.js +14 -0
- package/node_modules/lodash/_baseMap.js +22 -0
- package/node_modules/lodash/_baseMatches.js +22 -0
- package/node_modules/lodash/_baseMatchesProperty.js +33 -0
- package/node_modules/lodash/_baseMean.js +20 -0
- package/node_modules/lodash/_baseMerge.js +42 -0
- package/node_modules/lodash/_baseMergeDeep.js +94 -0
- package/node_modules/lodash/_baseNth.js +20 -0
- package/node_modules/lodash/_baseOrderBy.js +49 -0
- package/node_modules/lodash/_basePick.js +19 -0
- package/node_modules/lodash/_basePickBy.js +30 -0
- package/node_modules/lodash/_baseProperty.js +14 -0
- package/node_modules/lodash/_basePropertyDeep.js +16 -0
- package/node_modules/lodash/_basePropertyOf.js +14 -0
- package/node_modules/lodash/_basePullAll.js +51 -0
- package/node_modules/lodash/_basePullAt.js +37 -0
- package/node_modules/lodash/_baseRandom.js +18 -0
- package/node_modules/lodash/_baseRange.js +28 -0
- package/node_modules/lodash/_baseReduce.js +23 -0
- package/node_modules/lodash/_baseRepeat.js +35 -0
- package/node_modules/lodash/_baseRest.js +17 -0
- package/node_modules/lodash/_baseSample.js +15 -0
- package/node_modules/lodash/_baseSampleSize.js +18 -0
- package/node_modules/lodash/_baseSet.js +51 -0
- package/node_modules/lodash/_baseSetData.js +17 -0
- package/node_modules/lodash/_baseSetToString.js +22 -0
- package/node_modules/lodash/_baseShuffle.js +15 -0
- package/node_modules/lodash/_baseSlice.js +31 -0
- package/node_modules/lodash/_baseSome.js +22 -0
- package/node_modules/lodash/_baseSortBy.js +21 -0
- package/node_modules/lodash/_baseSortedIndex.js +42 -0
- package/node_modules/lodash/_baseSortedIndexBy.js +67 -0
- package/node_modules/lodash/_baseSortedUniq.js +30 -0
- package/node_modules/lodash/_baseSum.js +24 -0
- package/node_modules/lodash/_baseTimes.js +20 -0
- package/node_modules/lodash/_baseToNumber.js +24 -0
- package/node_modules/lodash/_baseToPairs.js +18 -0
- package/node_modules/lodash/_baseToString.js +37 -0
- package/node_modules/lodash/_baseTrim.js +19 -0
- package/node_modules/lodash/_baseUnary.js +14 -0
- package/node_modules/lodash/_baseUniq.js +72 -0
- package/node_modules/lodash/_baseUnset.js +52 -0
- package/node_modules/lodash/_baseUpdate.js +18 -0
- package/node_modules/lodash/_baseValues.js +19 -0
- package/node_modules/lodash/_baseWhile.js +26 -0
- package/node_modules/lodash/_baseWrapperValue.js +25 -0
- package/node_modules/lodash/_baseXor.js +36 -0
- package/node_modules/lodash/_baseZipObject.js +23 -0
- package/node_modules/lodash/_cacheHas.js +13 -0
- package/node_modules/lodash/_castArrayLikeObject.js +14 -0
- package/node_modules/lodash/_castFunction.js +14 -0
- package/node_modules/lodash/_castPath.js +21 -0
- package/node_modules/lodash/_castRest.js +14 -0
- package/node_modules/lodash/_castSlice.js +18 -0
- package/node_modules/lodash/_charsEndIndex.js +19 -0
- package/node_modules/lodash/_charsStartIndex.js +20 -0
- package/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/node_modules/lodash/_cloneBuffer.js +35 -0
- package/node_modules/lodash/_cloneDataView.js +16 -0
- package/node_modules/lodash/_cloneRegExp.js +17 -0
- package/node_modules/lodash/_cloneSymbol.js +18 -0
- package/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/node_modules/lodash/_compareAscending.js +41 -0
- package/node_modules/lodash/_compareMultiple.js +44 -0
- package/node_modules/lodash/_composeArgs.js +39 -0
- package/node_modules/lodash/_composeArgsRight.js +41 -0
- package/node_modules/lodash/_copyArray.js +20 -0
- package/node_modules/lodash/_copyObject.js +40 -0
- package/node_modules/lodash/_copySymbols.js +16 -0
- package/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/node_modules/lodash/_coreJsData.js +6 -0
- package/node_modules/lodash/_countHolders.js +21 -0
- package/node_modules/lodash/_createAggregator.js +23 -0
- package/node_modules/lodash/_createAssigner.js +37 -0
- package/node_modules/lodash/_createBaseEach.js +32 -0
- package/node_modules/lodash/_createBaseFor.js +25 -0
- package/node_modules/lodash/_createBind.js +28 -0
- package/node_modules/lodash/_createCaseFirst.js +33 -0
- package/node_modules/lodash/_createCompounder.js +24 -0
- package/node_modules/lodash/_createCtor.js +37 -0
- package/node_modules/lodash/_createCurry.js +46 -0
- package/node_modules/lodash/_createFind.js +25 -0
- package/node_modules/lodash/_createFlow.js +78 -0
- package/node_modules/lodash/_createHybrid.js +92 -0
- package/node_modules/lodash/_createInverter.js +17 -0
- package/node_modules/lodash/_createMathOperation.js +38 -0
- package/node_modules/lodash/_createOver.js +27 -0
- package/node_modules/lodash/_createPadding.js +33 -0
- package/node_modules/lodash/_createPartial.js +43 -0
- package/node_modules/lodash/_createRange.js +30 -0
- package/node_modules/lodash/_createRecurry.js +56 -0
- package/node_modules/lodash/_createRelationalOperation.js +20 -0
- package/node_modules/lodash/_createRound.js +35 -0
- package/node_modules/lodash/_createSet.js +19 -0
- package/node_modules/lodash/_createToPairs.js +30 -0
- package/node_modules/lodash/_createWrap.js +106 -0
- package/node_modules/lodash/_customDefaultsAssignIn.js +29 -0
- package/node_modules/lodash/_customDefaultsMerge.js +28 -0
- package/node_modules/lodash/_customOmitClone.js +16 -0
- package/node_modules/lodash/_deburrLetter.js +71 -0
- package/node_modules/lodash/_defineProperty.js +11 -0
- package/node_modules/lodash/_equalArrays.js +84 -0
- package/node_modules/lodash/_equalByTag.js +112 -0
- package/node_modules/lodash/_equalObjects.js +90 -0
- package/node_modules/lodash/_escapeHtmlChar.js +21 -0
- package/node_modules/lodash/_escapeStringChar.js +22 -0
- package/node_modules/lodash/_flatRest.js +16 -0
- package/node_modules/lodash/_freeGlobal.js +4 -0
- package/node_modules/lodash/_getAllKeys.js +16 -0
- package/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/node_modules/lodash/_getData.js +15 -0
- package/node_modules/lodash/_getFuncName.js +31 -0
- package/node_modules/lodash/_getHolder.js +13 -0
- package/node_modules/lodash/_getMapData.js +18 -0
- package/node_modules/lodash/_getMatchData.js +24 -0
- package/node_modules/lodash/_getNative.js +17 -0
- package/node_modules/lodash/_getPrototype.js +6 -0
- package/node_modules/lodash/_getRawTag.js +46 -0
- package/node_modules/lodash/_getSymbols.js +30 -0
- package/node_modules/lodash/_getSymbolsIn.js +25 -0
- package/node_modules/lodash/_getTag.js +58 -0
- package/node_modules/lodash/_getValue.js +13 -0
- package/node_modules/lodash/_getView.js +33 -0
- package/node_modules/lodash/_getWrapDetails.js +17 -0
- package/node_modules/lodash/_hasPath.js +39 -0
- package/node_modules/lodash/_hasUnicode.js +26 -0
- package/node_modules/lodash/_hasUnicodeWord.js +15 -0
- package/node_modules/lodash/_hashClear.js +15 -0
- package/node_modules/lodash/_hashDelete.js +17 -0
- package/node_modules/lodash/_hashGet.js +30 -0
- package/node_modules/lodash/_hashHas.js +23 -0
- package/node_modules/lodash/_hashSet.js +23 -0
- package/node_modules/lodash/_initCloneArray.js +26 -0
- package/node_modules/lodash/_initCloneByTag.js +77 -0
- package/node_modules/lodash/_initCloneObject.js +18 -0
- package/node_modules/lodash/_insertWrapDetails.js +23 -0
- package/node_modules/lodash/_isFlattenable.js +20 -0
- package/node_modules/lodash/_isIndex.js +25 -0
- package/node_modules/lodash/_isIterateeCall.js +30 -0
- package/node_modules/lodash/_isKey.js +29 -0
- package/node_modules/lodash/_isKeyable.js +15 -0
- package/node_modules/lodash/_isLaziable.js +28 -0
- package/node_modules/lodash/_isMaskable.js +14 -0
- package/node_modules/lodash/_isMasked.js +20 -0
- package/node_modules/lodash/_isPrototype.js +18 -0
- package/node_modules/lodash/_isStrictComparable.js +15 -0
- package/node_modules/lodash/_iteratorToArray.js +18 -0
- package/node_modules/lodash/_lazyClone.js +23 -0
- package/node_modules/lodash/_lazyReverse.js +23 -0
- package/node_modules/lodash/_lazyValue.js +69 -0
- package/node_modules/lodash/_listCacheClear.js +13 -0
- package/node_modules/lodash/_listCacheDelete.js +35 -0
- package/node_modules/lodash/_listCacheGet.js +19 -0
- package/node_modules/lodash/_listCacheHas.js +16 -0
- package/node_modules/lodash/_listCacheSet.js +26 -0
- package/node_modules/lodash/_mapCacheClear.js +21 -0
- package/node_modules/lodash/_mapCacheDelete.js +18 -0
- package/node_modules/lodash/_mapCacheGet.js +16 -0
- package/node_modules/lodash/_mapCacheHas.js +16 -0
- package/node_modules/lodash/_mapCacheSet.js +22 -0
- package/node_modules/lodash/_mapToArray.js +18 -0
- package/node_modules/lodash/_matchesStrictComparable.js +20 -0
- package/node_modules/lodash/_memoizeCapped.js +26 -0
- package/node_modules/lodash/_mergeData.js +90 -0
- package/node_modules/lodash/_metaMap.js +6 -0
- package/node_modules/lodash/_nativeCreate.js +6 -0
- package/node_modules/lodash/_nativeKeys.js +6 -0
- package/node_modules/lodash/_nativeKeysIn.js +20 -0
- package/node_modules/lodash/_nodeUtil.js +30 -0
- package/node_modules/lodash/_objectToString.js +22 -0
- package/node_modules/lodash/_overArg.js +15 -0
- package/node_modules/lodash/_overRest.js +36 -0
- package/node_modules/lodash/_parent.js +16 -0
- package/node_modules/lodash/_reEscape.js +4 -0
- package/node_modules/lodash/_reEvaluate.js +4 -0
- package/node_modules/lodash/_reInterpolate.js +4 -0
- package/node_modules/lodash/_realNames.js +4 -0
- package/node_modules/lodash/_reorder.js +29 -0
- package/node_modules/lodash/_replaceHolders.js +29 -0
- package/node_modules/lodash/_root.js +9 -0
- package/node_modules/lodash/_safeGet.js +21 -0
- package/node_modules/lodash/_setCacheAdd.js +19 -0
- package/node_modules/lodash/_setCacheHas.js +14 -0
- package/node_modules/lodash/_setData.js +20 -0
- package/node_modules/lodash/_setToArray.js +18 -0
- package/node_modules/lodash/_setToPairs.js +18 -0
- package/node_modules/lodash/_setToString.js +14 -0
- package/node_modules/lodash/_setWrapToString.js +21 -0
- package/node_modules/lodash/_shortOut.js +37 -0
- package/node_modules/lodash/_shuffleSelf.js +28 -0
- package/node_modules/lodash/_stackClear.js +15 -0
- package/node_modules/lodash/_stackDelete.js +18 -0
- package/node_modules/lodash/_stackGet.js +14 -0
- package/node_modules/lodash/_stackHas.js +14 -0
- package/node_modules/lodash/_stackSet.js +34 -0
- package/node_modules/lodash/_strictIndexOf.js +23 -0
- package/node_modules/lodash/_strictLastIndexOf.js +21 -0
- package/node_modules/lodash/_stringSize.js +18 -0
- package/node_modules/lodash/_stringToArray.js +18 -0
- package/node_modules/lodash/_stringToPath.js +27 -0
- package/node_modules/lodash/_toKey.js +21 -0
- package/node_modules/lodash/_toSource.js +26 -0
- package/node_modules/lodash/_trimmedEndIndex.js +19 -0
- package/node_modules/lodash/_unescapeHtmlChar.js +21 -0
- package/node_modules/lodash/_unicodeSize.js +44 -0
- package/node_modules/lodash/_unicodeToArray.js +40 -0
- package/node_modules/lodash/_unicodeWords.js +69 -0
- package/node_modules/lodash/_updateWrapDetails.js +46 -0
- package/node_modules/lodash/_wrapperClone.js +23 -0
- package/node_modules/lodash/add.js +22 -0
- package/node_modules/lodash/after.js +42 -0
- package/node_modules/lodash/array.js +67 -0
- package/node_modules/lodash/ary.js +29 -0
- package/node_modules/lodash/assign.js +58 -0
- package/node_modules/lodash/assignIn.js +40 -0
- package/node_modules/lodash/assignInWith.js +38 -0
- package/node_modules/lodash/assignWith.js +37 -0
- package/node_modules/lodash/at.js +23 -0
- package/node_modules/lodash/attempt.js +35 -0
- package/node_modules/lodash/before.js +40 -0
- package/node_modules/lodash/bind.js +57 -0
- package/node_modules/lodash/bindAll.js +41 -0
- package/node_modules/lodash/bindKey.js +68 -0
- package/node_modules/lodash/camelCase.js +29 -0
- package/node_modules/lodash/capitalize.js +23 -0
- package/node_modules/lodash/castArray.js +44 -0
- package/node_modules/lodash/ceil.js +26 -0
- package/node_modules/lodash/chain.js +38 -0
- package/node_modules/lodash/chunk.js +50 -0
- package/node_modules/lodash/clamp.js +39 -0
- package/node_modules/lodash/clone.js +36 -0
- package/node_modules/lodash/cloneDeep.js +29 -0
- package/node_modules/lodash/cloneDeepWith.js +40 -0
- package/node_modules/lodash/cloneWith.js +42 -0
- package/node_modules/lodash/collection.js +30 -0
- package/node_modules/lodash/commit.js +33 -0
- package/node_modules/lodash/compact.js +31 -0
- package/node_modules/lodash/concat.js +43 -0
- package/node_modules/lodash/cond.js +60 -0
- package/node_modules/lodash/conforms.js +35 -0
- package/node_modules/lodash/conformsTo.js +32 -0
- package/node_modules/lodash/constant.js +26 -0
- package/node_modules/lodash/core.js +3877 -0
- package/node_modules/lodash/core.min.js +30 -0
- package/node_modules/lodash/countBy.js +40 -0
- package/node_modules/lodash/create.js +43 -0
- package/node_modules/lodash/curry.js +57 -0
- package/node_modules/lodash/curryRight.js +54 -0
- package/node_modules/lodash/date.js +3 -0
- package/node_modules/lodash/debounce.js +191 -0
- package/node_modules/lodash/deburr.js +45 -0
- package/node_modules/lodash/defaultTo.js +25 -0
- package/node_modules/lodash/defaults.js +64 -0
- package/node_modules/lodash/defaultsDeep.js +30 -0
- package/node_modules/lodash/defer.js +26 -0
- package/node_modules/lodash/delay.js +28 -0
- package/node_modules/lodash/difference.js +33 -0
- package/node_modules/lodash/differenceBy.js +44 -0
- package/node_modules/lodash/differenceWith.js +40 -0
- package/node_modules/lodash/divide.js +22 -0
- package/node_modules/lodash/drop.js +38 -0
- package/node_modules/lodash/dropRight.js +39 -0
- package/node_modules/lodash/dropRightWhile.js +45 -0
- package/node_modules/lodash/dropWhile.js +45 -0
- package/node_modules/lodash/each.js +1 -0
- package/node_modules/lodash/eachRight.js +1 -0
- package/node_modules/lodash/endsWith.js +43 -0
- package/node_modules/lodash/entries.js +1 -0
- package/node_modules/lodash/entriesIn.js +1 -0
- package/node_modules/lodash/eq.js +37 -0
- package/node_modules/lodash/escape.js +43 -0
- package/node_modules/lodash/escapeRegExp.js +32 -0
- package/node_modules/lodash/every.js +56 -0
- package/node_modules/lodash/extend.js +1 -0
- package/node_modules/lodash/extendWith.js +1 -0
- package/node_modules/lodash/fill.js +45 -0
- package/node_modules/lodash/filter.js +52 -0
- package/node_modules/lodash/find.js +42 -0
- package/node_modules/lodash/findIndex.js +55 -0
- package/node_modules/lodash/findKey.js +44 -0
- package/node_modules/lodash/findLast.js +25 -0
- package/node_modules/lodash/findLastIndex.js +59 -0
- package/node_modules/lodash/findLastKey.js +44 -0
- package/node_modules/lodash/first.js +1 -0
- package/node_modules/lodash/flatMap.js +29 -0
- package/node_modules/lodash/flatMapDeep.js +31 -0
- package/node_modules/lodash/flatMapDepth.js +31 -0
- package/node_modules/lodash/flatten.js +22 -0
- package/node_modules/lodash/flattenDeep.js +25 -0
- package/node_modules/lodash/flattenDepth.js +33 -0
- package/node_modules/lodash/flip.js +28 -0
- package/node_modules/lodash/floor.js +26 -0
- package/node_modules/lodash/flow.js +27 -0
- package/node_modules/lodash/flowRight.js +26 -0
- package/node_modules/lodash/forEach.js +41 -0
- package/node_modules/lodash/forEachRight.js +31 -0
- package/node_modules/lodash/forIn.js +39 -0
- package/node_modules/lodash/forInRight.js +37 -0
- package/node_modules/lodash/forOwn.js +36 -0
- package/node_modules/lodash/forOwnRight.js +34 -0
- package/node_modules/lodash/fp/F.js +1 -0
- package/node_modules/lodash/fp/T.js +1 -0
- package/node_modules/lodash/fp/__.js +1 -0
- package/node_modules/lodash/fp/_baseConvert.js +569 -0
- package/node_modules/lodash/fp/_convertBrowser.js +18 -0
- package/node_modules/lodash/fp/_falseOptions.js +7 -0
- package/node_modules/lodash/fp/_mapping.js +358 -0
- package/node_modules/lodash/fp/_util.js +16 -0
- package/node_modules/lodash/fp/add.js +5 -0
- package/node_modules/lodash/fp/after.js +5 -0
- package/node_modules/lodash/fp/all.js +1 -0
- package/node_modules/lodash/fp/allPass.js +1 -0
- package/node_modules/lodash/fp/always.js +1 -0
- package/node_modules/lodash/fp/any.js +1 -0
- package/node_modules/lodash/fp/anyPass.js +1 -0
- package/node_modules/lodash/fp/apply.js +1 -0
- package/node_modules/lodash/fp/array.js +2 -0
- package/node_modules/lodash/fp/ary.js +5 -0
- package/node_modules/lodash/fp/assign.js +5 -0
- package/node_modules/lodash/fp/assignAll.js +5 -0
- package/node_modules/lodash/fp/assignAllWith.js +5 -0
- package/node_modules/lodash/fp/assignIn.js +5 -0
- package/node_modules/lodash/fp/assignInAll.js +5 -0
- package/node_modules/lodash/fp/assignInAllWith.js +5 -0
- package/node_modules/lodash/fp/assignInWith.js +5 -0
- package/node_modules/lodash/fp/assignWith.js +5 -0
- package/node_modules/lodash/fp/assoc.js +1 -0
- package/node_modules/lodash/fp/assocPath.js +1 -0
- package/node_modules/lodash/fp/at.js +5 -0
- package/node_modules/lodash/fp/attempt.js +5 -0
- package/node_modules/lodash/fp/before.js +5 -0
- package/node_modules/lodash/fp/bind.js +5 -0
- package/node_modules/lodash/fp/bindAll.js +5 -0
- package/node_modules/lodash/fp/bindKey.js +5 -0
- package/node_modules/lodash/fp/camelCase.js +5 -0
- package/node_modules/lodash/fp/capitalize.js +5 -0
- package/node_modules/lodash/fp/castArray.js +5 -0
- package/node_modules/lodash/fp/ceil.js +5 -0
- package/node_modules/lodash/fp/chain.js +5 -0
- package/node_modules/lodash/fp/chunk.js +5 -0
- package/node_modules/lodash/fp/clamp.js +5 -0
- package/node_modules/lodash/fp/clone.js +5 -0
- package/node_modules/lodash/fp/cloneDeep.js +5 -0
- package/node_modules/lodash/fp/cloneDeepWith.js +5 -0
- package/node_modules/lodash/fp/cloneWith.js +5 -0
- package/node_modules/lodash/fp/collection.js +2 -0
- package/node_modules/lodash/fp/commit.js +5 -0
- package/node_modules/lodash/fp/compact.js +5 -0
- package/node_modules/lodash/fp/complement.js +1 -0
- package/node_modules/lodash/fp/compose.js +1 -0
- package/node_modules/lodash/fp/concat.js +5 -0
- package/node_modules/lodash/fp/cond.js +5 -0
- package/node_modules/lodash/fp/conforms.js +1 -0
- package/node_modules/lodash/fp/conformsTo.js +5 -0
- package/node_modules/lodash/fp/constant.js +5 -0
- package/node_modules/lodash/fp/contains.js +1 -0
- package/node_modules/lodash/fp/convert.js +18 -0
- package/node_modules/lodash/fp/countBy.js +5 -0
- package/node_modules/lodash/fp/create.js +5 -0
- package/node_modules/lodash/fp/curry.js +5 -0
- package/node_modules/lodash/fp/curryN.js +5 -0
- package/node_modules/lodash/fp/curryRight.js +5 -0
- package/node_modules/lodash/fp/curryRightN.js +5 -0
- package/node_modules/lodash/fp/date.js +2 -0
- package/node_modules/lodash/fp/debounce.js +5 -0
- package/node_modules/lodash/fp/deburr.js +5 -0
- package/node_modules/lodash/fp/defaultTo.js +5 -0
- package/node_modules/lodash/fp/defaults.js +5 -0
- package/node_modules/lodash/fp/defaultsAll.js +5 -0
- package/node_modules/lodash/fp/defaultsDeep.js +5 -0
- package/node_modules/lodash/fp/defaultsDeepAll.js +5 -0
- package/node_modules/lodash/fp/defer.js +5 -0
- package/node_modules/lodash/fp/delay.js +5 -0
- package/node_modules/lodash/fp/difference.js +5 -0
- package/node_modules/lodash/fp/differenceBy.js +5 -0
- package/node_modules/lodash/fp/differenceWith.js +5 -0
- package/node_modules/lodash/fp/dissoc.js +1 -0
- package/node_modules/lodash/fp/dissocPath.js +1 -0
- package/node_modules/lodash/fp/divide.js +5 -0
- package/node_modules/lodash/fp/drop.js +5 -0
- package/node_modules/lodash/fp/dropLast.js +1 -0
- package/node_modules/lodash/fp/dropLastWhile.js +1 -0
- package/node_modules/lodash/fp/dropRight.js +5 -0
- package/node_modules/lodash/fp/dropRightWhile.js +5 -0
- package/node_modules/lodash/fp/dropWhile.js +5 -0
- package/node_modules/lodash/fp/each.js +1 -0
- package/node_modules/lodash/fp/eachRight.js +1 -0
- package/node_modules/lodash/fp/endsWith.js +5 -0
- package/node_modules/lodash/fp/entries.js +1 -0
- package/node_modules/lodash/fp/entriesIn.js +1 -0
- package/node_modules/lodash/fp/eq.js +5 -0
- package/node_modules/lodash/fp/equals.js +1 -0
- package/node_modules/lodash/fp/escape.js +5 -0
- package/node_modules/lodash/fp/escapeRegExp.js +5 -0
- package/node_modules/lodash/fp/every.js +5 -0
- package/node_modules/lodash/fp/extend.js +1 -0
- package/node_modules/lodash/fp/extendAll.js +1 -0
- package/node_modules/lodash/fp/extendAllWith.js +1 -0
- package/node_modules/lodash/fp/extendWith.js +1 -0
- package/node_modules/lodash/fp/fill.js +5 -0
- package/node_modules/lodash/fp/filter.js +5 -0
- package/node_modules/lodash/fp/find.js +5 -0
- package/node_modules/lodash/fp/findFrom.js +5 -0
- package/node_modules/lodash/fp/findIndex.js +5 -0
- package/node_modules/lodash/fp/findIndexFrom.js +5 -0
- package/node_modules/lodash/fp/findKey.js +5 -0
- package/node_modules/lodash/fp/findLast.js +5 -0
- package/node_modules/lodash/fp/findLastFrom.js +5 -0
- package/node_modules/lodash/fp/findLastIndex.js +5 -0
- package/node_modules/lodash/fp/findLastIndexFrom.js +5 -0
- package/node_modules/lodash/fp/findLastKey.js +5 -0
- package/node_modules/lodash/fp/first.js +1 -0
- package/node_modules/lodash/fp/flatMap.js +5 -0
- package/node_modules/lodash/fp/flatMapDeep.js +5 -0
- package/node_modules/lodash/fp/flatMapDepth.js +5 -0
- package/node_modules/lodash/fp/flatten.js +5 -0
- package/node_modules/lodash/fp/flattenDeep.js +5 -0
- package/node_modules/lodash/fp/flattenDepth.js +5 -0
- package/node_modules/lodash/fp/flip.js +5 -0
- package/node_modules/lodash/fp/floor.js +5 -0
- package/node_modules/lodash/fp/flow.js +5 -0
- package/node_modules/lodash/fp/flowRight.js +5 -0
- package/node_modules/lodash/fp/forEach.js +5 -0
- package/node_modules/lodash/fp/forEachRight.js +5 -0
- package/node_modules/lodash/fp/forIn.js +5 -0
- package/node_modules/lodash/fp/forInRight.js +5 -0
- package/node_modules/lodash/fp/forOwn.js +5 -0
- package/node_modules/lodash/fp/forOwnRight.js +5 -0
- package/node_modules/lodash/fp/fromPairs.js +5 -0
- package/node_modules/lodash/fp/function.js +2 -0
- package/node_modules/lodash/fp/functions.js +5 -0
- package/node_modules/lodash/fp/functionsIn.js +5 -0
- package/node_modules/lodash/fp/get.js +5 -0
- package/node_modules/lodash/fp/getOr.js +5 -0
- package/node_modules/lodash/fp/groupBy.js +5 -0
- package/node_modules/lodash/fp/gt.js +5 -0
- package/node_modules/lodash/fp/gte.js +5 -0
- package/node_modules/lodash/fp/has.js +5 -0
- package/node_modules/lodash/fp/hasIn.js +5 -0
- package/node_modules/lodash/fp/head.js +5 -0
- package/node_modules/lodash/fp/identical.js +1 -0
- package/node_modules/lodash/fp/identity.js +5 -0
- package/node_modules/lodash/fp/inRange.js +5 -0
- package/node_modules/lodash/fp/includes.js +5 -0
- package/node_modules/lodash/fp/includesFrom.js +5 -0
- package/node_modules/lodash/fp/indexBy.js +1 -0
- package/node_modules/lodash/fp/indexOf.js +5 -0
- package/node_modules/lodash/fp/indexOfFrom.js +5 -0
- package/node_modules/lodash/fp/init.js +1 -0
- package/node_modules/lodash/fp/initial.js +5 -0
- package/node_modules/lodash/fp/intersection.js +5 -0
- package/node_modules/lodash/fp/intersectionBy.js +5 -0
- package/node_modules/lodash/fp/intersectionWith.js +5 -0
- package/node_modules/lodash/fp/invert.js +5 -0
- package/node_modules/lodash/fp/invertBy.js +5 -0
- package/node_modules/lodash/fp/invertObj.js +1 -0
- package/node_modules/lodash/fp/invoke.js +5 -0
- package/node_modules/lodash/fp/invokeArgs.js +5 -0
- package/node_modules/lodash/fp/invokeArgsMap.js +5 -0
- package/node_modules/lodash/fp/invokeMap.js +5 -0
- package/node_modules/lodash/fp/isArguments.js +5 -0
- package/node_modules/lodash/fp/isArray.js +5 -0
- package/node_modules/lodash/fp/isArrayBuffer.js +5 -0
- package/node_modules/lodash/fp/isArrayLike.js +5 -0
- package/node_modules/lodash/fp/isArrayLikeObject.js +5 -0
- package/node_modules/lodash/fp/isBoolean.js +5 -0
- package/node_modules/lodash/fp/isBuffer.js +5 -0
- package/node_modules/lodash/fp/isDate.js +5 -0
- package/node_modules/lodash/fp/isElement.js +5 -0
- package/node_modules/lodash/fp/isEmpty.js +5 -0
- package/node_modules/lodash/fp/isEqual.js +5 -0
- package/node_modules/lodash/fp/isEqualWith.js +5 -0
- package/node_modules/lodash/fp/isError.js +5 -0
- package/node_modules/lodash/fp/isFinite.js +5 -0
- package/node_modules/lodash/fp/isFunction.js +5 -0
- package/node_modules/lodash/fp/isInteger.js +5 -0
- package/node_modules/lodash/fp/isLength.js +5 -0
- package/node_modules/lodash/fp/isMap.js +5 -0
- package/node_modules/lodash/fp/isMatch.js +5 -0
- package/node_modules/lodash/fp/isMatchWith.js +5 -0
- package/node_modules/lodash/fp/isNaN.js +5 -0
- package/node_modules/lodash/fp/isNative.js +5 -0
- package/node_modules/lodash/fp/isNil.js +5 -0
- package/node_modules/lodash/fp/isNull.js +5 -0
- package/node_modules/lodash/fp/isNumber.js +5 -0
- package/node_modules/lodash/fp/isObject.js +5 -0
- package/node_modules/lodash/fp/isObjectLike.js +5 -0
- package/node_modules/lodash/fp/isPlainObject.js +5 -0
- package/node_modules/lodash/fp/isRegExp.js +5 -0
- package/node_modules/lodash/fp/isSafeInteger.js +5 -0
- package/node_modules/lodash/fp/isSet.js +5 -0
- package/node_modules/lodash/fp/isString.js +5 -0
- package/node_modules/lodash/fp/isSymbol.js +5 -0
- package/node_modules/lodash/fp/isTypedArray.js +5 -0
- package/node_modules/lodash/fp/isUndefined.js +5 -0
- package/node_modules/lodash/fp/isWeakMap.js +5 -0
- package/node_modules/lodash/fp/isWeakSet.js +5 -0
- package/node_modules/lodash/fp/iteratee.js +5 -0
- package/node_modules/lodash/fp/join.js +5 -0
- package/node_modules/lodash/fp/juxt.js +1 -0
- package/node_modules/lodash/fp/kebabCase.js +5 -0
- package/node_modules/lodash/fp/keyBy.js +5 -0
- package/node_modules/lodash/fp/keys.js +5 -0
- package/node_modules/lodash/fp/keysIn.js +5 -0
- package/node_modules/lodash/fp/lang.js +2 -0
- package/node_modules/lodash/fp/last.js +5 -0
- package/node_modules/lodash/fp/lastIndexOf.js +5 -0
- package/node_modules/lodash/fp/lastIndexOfFrom.js +5 -0
- package/node_modules/lodash/fp/lowerCase.js +5 -0
- package/node_modules/lodash/fp/lowerFirst.js +5 -0
- package/node_modules/lodash/fp/lt.js +5 -0
- package/node_modules/lodash/fp/lte.js +5 -0
- package/node_modules/lodash/fp/map.js +5 -0
- package/node_modules/lodash/fp/mapKeys.js +5 -0
- package/node_modules/lodash/fp/mapValues.js +5 -0
- package/node_modules/lodash/fp/matches.js +1 -0
- package/node_modules/lodash/fp/matchesProperty.js +5 -0
- package/node_modules/lodash/fp/math.js +2 -0
- package/node_modules/lodash/fp/max.js +5 -0
- package/node_modules/lodash/fp/maxBy.js +5 -0
- package/node_modules/lodash/fp/mean.js +5 -0
- package/node_modules/lodash/fp/meanBy.js +5 -0
- package/node_modules/lodash/fp/memoize.js +5 -0
- package/node_modules/lodash/fp/merge.js +5 -0
- package/node_modules/lodash/fp/mergeAll.js +5 -0
- package/node_modules/lodash/fp/mergeAllWith.js +5 -0
- package/node_modules/lodash/fp/mergeWith.js +5 -0
- package/node_modules/lodash/fp/method.js +5 -0
- package/node_modules/lodash/fp/methodOf.js +5 -0
- package/node_modules/lodash/fp/min.js +5 -0
- package/node_modules/lodash/fp/minBy.js +5 -0
- package/node_modules/lodash/fp/mixin.js +5 -0
- package/node_modules/lodash/fp/multiply.js +5 -0
- package/node_modules/lodash/fp/nAry.js +1 -0
- package/node_modules/lodash/fp/negate.js +5 -0
- package/node_modules/lodash/fp/next.js +5 -0
- package/node_modules/lodash/fp/noop.js +5 -0
- package/node_modules/lodash/fp/now.js +5 -0
- package/node_modules/lodash/fp/nth.js +5 -0
- package/node_modules/lodash/fp/nthArg.js +5 -0
- package/node_modules/lodash/fp/number.js +2 -0
- package/node_modules/lodash/fp/object.js +2 -0
- package/node_modules/lodash/fp/omit.js +5 -0
- package/node_modules/lodash/fp/omitAll.js +1 -0
- package/node_modules/lodash/fp/omitBy.js +5 -0
- package/node_modules/lodash/fp/once.js +5 -0
- package/node_modules/lodash/fp/orderBy.js +5 -0
- package/node_modules/lodash/fp/over.js +5 -0
- package/node_modules/lodash/fp/overArgs.js +5 -0
- package/node_modules/lodash/fp/overEvery.js +5 -0
- package/node_modules/lodash/fp/overSome.js +5 -0
- package/node_modules/lodash/fp/pad.js +5 -0
- package/node_modules/lodash/fp/padChars.js +5 -0
- package/node_modules/lodash/fp/padCharsEnd.js +5 -0
- package/node_modules/lodash/fp/padCharsStart.js +5 -0
- package/node_modules/lodash/fp/padEnd.js +5 -0
- package/node_modules/lodash/fp/padStart.js +5 -0
- package/node_modules/lodash/fp/parseInt.js +5 -0
- package/node_modules/lodash/fp/partial.js +5 -0
- package/node_modules/lodash/fp/partialRight.js +5 -0
- package/node_modules/lodash/fp/partition.js +5 -0
- package/node_modules/lodash/fp/path.js +1 -0
- package/node_modules/lodash/fp/pathEq.js +1 -0
- package/node_modules/lodash/fp/pathOr.js +1 -0
- package/node_modules/lodash/fp/paths.js +1 -0
- package/node_modules/lodash/fp/pick.js +5 -0
- package/node_modules/lodash/fp/pickAll.js +1 -0
- package/node_modules/lodash/fp/pickBy.js +5 -0
- package/node_modules/lodash/fp/pipe.js +1 -0
- package/node_modules/lodash/fp/placeholder.js +6 -0
- package/node_modules/lodash/fp/plant.js +5 -0
- package/node_modules/lodash/fp/pluck.js +1 -0
- package/node_modules/lodash/fp/prop.js +1 -0
- package/node_modules/lodash/fp/propEq.js +1 -0
- package/node_modules/lodash/fp/propOr.js +1 -0
- package/node_modules/lodash/fp/property.js +1 -0
- package/node_modules/lodash/fp/propertyOf.js +5 -0
- package/node_modules/lodash/fp/props.js +1 -0
- package/node_modules/lodash/fp/pull.js +5 -0
- package/node_modules/lodash/fp/pullAll.js +5 -0
- package/node_modules/lodash/fp/pullAllBy.js +5 -0
- package/node_modules/lodash/fp/pullAllWith.js +5 -0
- package/node_modules/lodash/fp/pullAt.js +5 -0
- package/node_modules/lodash/fp/random.js +5 -0
- package/node_modules/lodash/fp/range.js +5 -0
- package/node_modules/lodash/fp/rangeRight.js +5 -0
- package/node_modules/lodash/fp/rangeStep.js +5 -0
- package/node_modules/lodash/fp/rangeStepRight.js +5 -0
- package/node_modules/lodash/fp/rearg.js +5 -0
- package/node_modules/lodash/fp/reduce.js +5 -0
- package/node_modules/lodash/fp/reduceRight.js +5 -0
- package/node_modules/lodash/fp/reject.js +5 -0
- package/node_modules/lodash/fp/remove.js +5 -0
- package/node_modules/lodash/fp/repeat.js +5 -0
- package/node_modules/lodash/fp/replace.js +5 -0
- package/node_modules/lodash/fp/rest.js +5 -0
- package/node_modules/lodash/fp/restFrom.js +5 -0
- package/node_modules/lodash/fp/result.js +5 -0
- package/node_modules/lodash/fp/reverse.js +5 -0
- package/node_modules/lodash/fp/round.js +5 -0
- package/node_modules/lodash/fp/sample.js +5 -0
- package/node_modules/lodash/fp/sampleSize.js +5 -0
- package/node_modules/lodash/fp/seq.js +2 -0
- package/node_modules/lodash/fp/set.js +5 -0
- package/node_modules/lodash/fp/setWith.js +5 -0
- package/node_modules/lodash/fp/shuffle.js +5 -0
- package/node_modules/lodash/fp/size.js +5 -0
- package/node_modules/lodash/fp/slice.js +5 -0
- package/node_modules/lodash/fp/snakeCase.js +5 -0
- package/node_modules/lodash/fp/some.js +5 -0
- package/node_modules/lodash/fp/sortBy.js +5 -0
- package/node_modules/lodash/fp/sortedIndex.js +5 -0
- package/node_modules/lodash/fp/sortedIndexBy.js +5 -0
- package/node_modules/lodash/fp/sortedIndexOf.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndex.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndexBy.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndexOf.js +5 -0
- package/node_modules/lodash/fp/sortedUniq.js +5 -0
- package/node_modules/lodash/fp/sortedUniqBy.js +5 -0
- package/node_modules/lodash/fp/split.js +5 -0
- package/node_modules/lodash/fp/spread.js +5 -0
- package/node_modules/lodash/fp/spreadFrom.js +5 -0
- package/node_modules/lodash/fp/startCase.js +5 -0
- package/node_modules/lodash/fp/startsWith.js +5 -0
- package/node_modules/lodash/fp/string.js +2 -0
- package/node_modules/lodash/fp/stubArray.js +5 -0
- package/node_modules/lodash/fp/stubFalse.js +5 -0
- package/node_modules/lodash/fp/stubObject.js +5 -0
- package/node_modules/lodash/fp/stubString.js +5 -0
- package/node_modules/lodash/fp/stubTrue.js +5 -0
- package/node_modules/lodash/fp/subtract.js +5 -0
- package/node_modules/lodash/fp/sum.js +5 -0
- package/node_modules/lodash/fp/sumBy.js +5 -0
- package/node_modules/lodash/fp/symmetricDifference.js +1 -0
- package/node_modules/lodash/fp/symmetricDifferenceBy.js +1 -0
- package/node_modules/lodash/fp/symmetricDifferenceWith.js +1 -0
- package/node_modules/lodash/fp/tail.js +5 -0
- package/node_modules/lodash/fp/take.js +5 -0
- package/node_modules/lodash/fp/takeLast.js +1 -0
- package/node_modules/lodash/fp/takeLastWhile.js +1 -0
- package/node_modules/lodash/fp/takeRight.js +5 -0
- package/node_modules/lodash/fp/takeRightWhile.js +5 -0
- package/node_modules/lodash/fp/takeWhile.js +5 -0
- package/node_modules/lodash/fp/tap.js +5 -0
- package/node_modules/lodash/fp/template.js +5 -0
- package/node_modules/lodash/fp/templateSettings.js +5 -0
- package/node_modules/lodash/fp/throttle.js +5 -0
- package/node_modules/lodash/fp/thru.js +5 -0
- package/node_modules/lodash/fp/times.js +5 -0
- package/node_modules/lodash/fp/toArray.js +5 -0
- package/node_modules/lodash/fp/toFinite.js +5 -0
- package/node_modules/lodash/fp/toInteger.js +5 -0
- package/node_modules/lodash/fp/toIterator.js +5 -0
- package/node_modules/lodash/fp/toJSON.js +5 -0
- package/node_modules/lodash/fp/toLength.js +5 -0
- package/node_modules/lodash/fp/toLower.js +5 -0
- package/node_modules/lodash/fp/toNumber.js +5 -0
- package/node_modules/lodash/fp/toPairs.js +5 -0
- package/node_modules/lodash/fp/toPairsIn.js +5 -0
- package/node_modules/lodash/fp/toPath.js +5 -0
- package/node_modules/lodash/fp/toPlainObject.js +5 -0
- package/node_modules/lodash/fp/toSafeInteger.js +5 -0
- package/node_modules/lodash/fp/toString.js +5 -0
- package/node_modules/lodash/fp/toUpper.js +5 -0
- package/node_modules/lodash/fp/transform.js +5 -0
- package/node_modules/lodash/fp/trim.js +5 -0
- package/node_modules/lodash/fp/trimChars.js +5 -0
- package/node_modules/lodash/fp/trimCharsEnd.js +5 -0
- package/node_modules/lodash/fp/trimCharsStart.js +5 -0
- package/node_modules/lodash/fp/trimEnd.js +5 -0
- package/node_modules/lodash/fp/trimStart.js +5 -0
- package/node_modules/lodash/fp/truncate.js +5 -0
- package/node_modules/lodash/fp/unapply.js +1 -0
- package/node_modules/lodash/fp/unary.js +5 -0
- package/node_modules/lodash/fp/unescape.js +5 -0
- package/node_modules/lodash/fp/union.js +5 -0
- package/node_modules/lodash/fp/unionBy.js +5 -0
- package/node_modules/lodash/fp/unionWith.js +5 -0
- package/node_modules/lodash/fp/uniq.js +5 -0
- package/node_modules/lodash/fp/uniqBy.js +5 -0
- package/node_modules/lodash/fp/uniqWith.js +5 -0
- package/node_modules/lodash/fp/uniqueId.js +5 -0
- package/node_modules/lodash/fp/unnest.js +1 -0
- package/node_modules/lodash/fp/unset.js +5 -0
- package/node_modules/lodash/fp/unzip.js +5 -0
- package/node_modules/lodash/fp/unzipWith.js +5 -0
- package/node_modules/lodash/fp/update.js +5 -0
- package/node_modules/lodash/fp/updateWith.js +5 -0
- package/node_modules/lodash/fp/upperCase.js +5 -0
- package/node_modules/lodash/fp/upperFirst.js +5 -0
- package/node_modules/lodash/fp/useWith.js +1 -0
- package/node_modules/lodash/fp/util.js +2 -0
- package/node_modules/lodash/fp/value.js +5 -0
- package/node_modules/lodash/fp/valueOf.js +5 -0
- package/node_modules/lodash/fp/values.js +5 -0
- package/node_modules/lodash/fp/valuesIn.js +5 -0
- package/node_modules/lodash/fp/where.js +1 -0
- package/node_modules/lodash/fp/whereEq.js +1 -0
- package/node_modules/lodash/fp/without.js +5 -0
- package/node_modules/lodash/fp/words.js +5 -0
- package/node_modules/lodash/fp/wrap.js +5 -0
- package/node_modules/lodash/fp/wrapperAt.js +5 -0
- package/node_modules/lodash/fp/wrapperChain.js +5 -0
- package/node_modules/lodash/fp/wrapperLodash.js +5 -0
- package/node_modules/lodash/fp/wrapperReverse.js +5 -0
- package/node_modules/lodash/fp/wrapperValue.js +5 -0
- package/node_modules/lodash/fp/xor.js +5 -0
- package/node_modules/lodash/fp/xorBy.js +5 -0
- package/node_modules/lodash/fp/xorWith.js +5 -0
- package/node_modules/lodash/fp/zip.js +5 -0
- package/node_modules/lodash/fp/zipAll.js +5 -0
- package/node_modules/lodash/fp/zipObj.js +1 -0
- package/node_modules/lodash/fp/zipObject.js +5 -0
- package/node_modules/lodash/fp/zipObjectDeep.js +5 -0
- package/node_modules/lodash/fp/zipWith.js +5 -0
- package/node_modules/lodash/fp.js +2 -0
- package/node_modules/lodash/fromPairs.js +30 -0
- package/node_modules/lodash/function.js +25 -0
- package/node_modules/lodash/functions.js +31 -0
- package/node_modules/lodash/functionsIn.js +31 -0
- package/node_modules/lodash/get.js +33 -0
- package/node_modules/lodash/groupBy.js +41 -0
- package/node_modules/lodash/gt.js +29 -0
- package/node_modules/lodash/gte.js +30 -0
- package/node_modules/lodash/has.js +35 -0
- package/node_modules/lodash/hasIn.js +34 -0
- package/node_modules/lodash/head.js +23 -0
- package/node_modules/lodash/identity.js +21 -0
- package/node_modules/lodash/inRange.js +55 -0
- package/node_modules/lodash/includes.js +53 -0
- package/node_modules/lodash/index.js +1 -0
- package/node_modules/lodash/indexOf.js +42 -0
- package/node_modules/lodash/initial.js +22 -0
- package/node_modules/lodash/intersection.js +30 -0
- package/node_modules/lodash/intersectionBy.js +45 -0
- package/node_modules/lodash/intersectionWith.js +41 -0
- package/node_modules/lodash/invert.js +42 -0
- package/node_modules/lodash/invertBy.js +56 -0
- package/node_modules/lodash/invoke.js +24 -0
- package/node_modules/lodash/invokeMap.js +41 -0
- package/node_modules/lodash/isArguments.js +36 -0
- package/node_modules/lodash/isArray.js +26 -0
- package/node_modules/lodash/isArrayBuffer.js +27 -0
- package/node_modules/lodash/isArrayLike.js +33 -0
- package/node_modules/lodash/isArrayLikeObject.js +33 -0
- package/node_modules/lodash/isBoolean.js +29 -0
- package/node_modules/lodash/isBuffer.js +38 -0
- package/node_modules/lodash/isDate.js +27 -0
- package/node_modules/lodash/isElement.js +25 -0
- package/node_modules/lodash/isEmpty.js +77 -0
- package/node_modules/lodash/isEqual.js +35 -0
- package/node_modules/lodash/isEqualWith.js +41 -0
- package/node_modules/lodash/isError.js +36 -0
- package/node_modules/lodash/isFinite.js +36 -0
- package/node_modules/lodash/isFunction.js +37 -0
- package/node_modules/lodash/isInteger.js +33 -0
- package/node_modules/lodash/isLength.js +35 -0
- package/node_modules/lodash/isMap.js +27 -0
- package/node_modules/lodash/isMatch.js +36 -0
- package/node_modules/lodash/isMatchWith.js +41 -0
- package/node_modules/lodash/isNaN.js +38 -0
- package/node_modules/lodash/isNative.js +40 -0
- package/node_modules/lodash/isNil.js +25 -0
- package/node_modules/lodash/isNull.js +22 -0
- package/node_modules/lodash/isNumber.js +38 -0
- package/node_modules/lodash/isObject.js +31 -0
- package/node_modules/lodash/isObjectLike.js +29 -0
- package/node_modules/lodash/isPlainObject.js +62 -0
- package/node_modules/lodash/isRegExp.js +27 -0
- package/node_modules/lodash/isSafeInteger.js +37 -0
- package/node_modules/lodash/isSet.js +27 -0
- package/node_modules/lodash/isString.js +30 -0
- package/node_modules/lodash/isSymbol.js +29 -0
- package/node_modules/lodash/isTypedArray.js +27 -0
- package/node_modules/lodash/isUndefined.js +22 -0
- package/node_modules/lodash/isWeakMap.js +28 -0
- package/node_modules/lodash/isWeakSet.js +28 -0
- package/node_modules/lodash/iteratee.js +53 -0
- package/node_modules/lodash/join.js +26 -0
- package/node_modules/lodash/kebabCase.js +28 -0
- package/node_modules/lodash/keyBy.js +36 -0
- package/node_modules/lodash/keys.js +37 -0
- package/node_modules/lodash/keysIn.js +32 -0
- package/node_modules/lodash/lang.js +58 -0
- package/node_modules/lodash/last.js +20 -0
- package/node_modules/lodash/lastIndexOf.js +46 -0
- package/node_modules/lodash/lodash.js +17259 -0
- package/node_modules/lodash/lodash.min.js +136 -0
- package/node_modules/lodash/lowerCase.js +27 -0
- package/node_modules/lodash/lowerFirst.js +22 -0
- package/node_modules/lodash/lt.js +29 -0
- package/node_modules/lodash/lte.js +30 -0
- package/node_modules/lodash/map.js +53 -0
- package/node_modules/lodash/mapKeys.js +36 -0
- package/node_modules/lodash/mapValues.js +43 -0
- package/node_modules/lodash/matches.js +46 -0
- package/node_modules/lodash/matchesProperty.js +44 -0
- package/node_modules/lodash/math.js +17 -0
- package/node_modules/lodash/max.js +29 -0
- package/node_modules/lodash/maxBy.js +34 -0
- package/node_modules/lodash/mean.js +22 -0
- package/node_modules/lodash/meanBy.js +31 -0
- package/node_modules/lodash/memoize.js +73 -0
- package/node_modules/lodash/merge.js +39 -0
- package/node_modules/lodash/mergeWith.js +39 -0
- package/node_modules/lodash/method.js +34 -0
- package/node_modules/lodash/methodOf.js +33 -0
- package/node_modules/lodash/min.js +29 -0
- package/node_modules/lodash/minBy.js +34 -0
- package/node_modules/lodash/mixin.js +74 -0
- package/node_modules/lodash/multiply.js +22 -0
- package/node_modules/lodash/negate.js +40 -0
- package/node_modules/lodash/next.js +35 -0
- package/node_modules/lodash/noop.js +17 -0
- package/node_modules/lodash/now.js +23 -0
- package/node_modules/lodash/nth.js +29 -0
- package/node_modules/lodash/nthArg.js +32 -0
- package/node_modules/lodash/number.js +5 -0
- package/node_modules/lodash/object.js +49 -0
- package/node_modules/lodash/omit.js +57 -0
- package/node_modules/lodash/omitBy.js +29 -0
- package/node_modules/lodash/once.js +25 -0
- package/node_modules/lodash/orderBy.js +47 -0
- package/node_modules/lodash/over.js +24 -0
- package/node_modules/lodash/overArgs.js +61 -0
- package/node_modules/lodash/overEvery.js +34 -0
- package/node_modules/lodash/overSome.js +37 -0
- package/node_modules/lodash/package.json +19 -0
- package/node_modules/lodash/pad.js +49 -0
- package/node_modules/lodash/padEnd.js +39 -0
- package/node_modules/lodash/padStart.js +39 -0
- package/node_modules/lodash/parseInt.js +43 -0
- package/node_modules/lodash/partial.js +50 -0
- package/node_modules/lodash/partialRight.js +49 -0
- package/node_modules/lodash/partition.js +43 -0
- package/node_modules/lodash/pick.js +25 -0
- package/node_modules/lodash/pickBy.js +37 -0
- package/node_modules/lodash/plant.js +48 -0
- package/node_modules/lodash/property.js +32 -0
- package/node_modules/lodash/propertyOf.js +30 -0
- package/node_modules/lodash/pull.js +29 -0
- package/node_modules/lodash/pullAll.js +29 -0
- package/node_modules/lodash/pullAllBy.js +33 -0
- package/node_modules/lodash/pullAllWith.js +32 -0
- package/node_modules/lodash/pullAt.js +43 -0
- package/node_modules/lodash/random.js +91 -0
- package/node_modules/lodash/range.js +46 -0
- package/node_modules/lodash/rangeRight.js +41 -0
- package/node_modules/lodash/rearg.js +33 -0
- package/node_modules/lodash/reduce.js +51 -0
- package/node_modules/lodash/reduceRight.js +36 -0
- package/node_modules/lodash/reject.js +46 -0
- package/node_modules/lodash/remove.js +53 -0
- package/node_modules/lodash/repeat.js +37 -0
- package/node_modules/lodash/replace.js +29 -0
- package/node_modules/lodash/rest.js +40 -0
- package/node_modules/lodash/result.js +56 -0
- package/node_modules/lodash/reverse.js +34 -0
- package/node_modules/lodash/round.js +26 -0
- package/node_modules/lodash/sample.js +24 -0
- package/node_modules/lodash/sampleSize.js +37 -0
- package/node_modules/lodash/seq.js +16 -0
- package/node_modules/lodash/set.js +35 -0
- package/node_modules/lodash/setWith.js +32 -0
- package/node_modules/lodash/shuffle.js +25 -0
- package/node_modules/lodash/size.js +46 -0
- package/node_modules/lodash/slice.js +37 -0
- package/node_modules/lodash/snakeCase.js +28 -0
- package/node_modules/lodash/some.js +51 -0
- package/node_modules/lodash/sortBy.js +48 -0
- package/node_modules/lodash/sortedIndex.js +24 -0
- package/node_modules/lodash/sortedIndexBy.js +33 -0
- package/node_modules/lodash/sortedIndexOf.js +31 -0
- package/node_modules/lodash/sortedLastIndex.js +25 -0
- package/node_modules/lodash/sortedLastIndexBy.js +33 -0
- package/node_modules/lodash/sortedLastIndexOf.js +31 -0
- package/node_modules/lodash/sortedUniq.js +24 -0
- package/node_modules/lodash/sortedUniqBy.js +26 -0
- package/node_modules/lodash/split.js +52 -0
- package/node_modules/lodash/spread.js +63 -0
- package/node_modules/lodash/startCase.js +29 -0
- package/node_modules/lodash/startsWith.js +39 -0
- package/node_modules/lodash/string.js +33 -0
- package/node_modules/lodash/stubArray.js +23 -0
- package/node_modules/lodash/stubFalse.js +18 -0
- package/node_modules/lodash/stubObject.js +23 -0
- package/node_modules/lodash/stubString.js +18 -0
- package/node_modules/lodash/stubTrue.js +18 -0
- package/node_modules/lodash/subtract.js +22 -0
- package/node_modules/lodash/sum.js +24 -0
- package/node_modules/lodash/sumBy.js +33 -0
- package/node_modules/lodash/tail.js +22 -0
- package/node_modules/lodash/take.js +37 -0
- package/node_modules/lodash/takeRight.js +39 -0
- package/node_modules/lodash/takeRightWhile.js +45 -0
- package/node_modules/lodash/takeWhile.js +45 -0
- package/node_modules/lodash/tap.js +29 -0
- package/node_modules/lodash/template.js +284 -0
- package/node_modules/lodash/templateSettings.js +71 -0
- package/node_modules/lodash/throttle.js +69 -0
- package/node_modules/lodash/thru.js +28 -0
- package/node_modules/lodash/times.js +51 -0
- package/node_modules/lodash/toArray.js +58 -0
- package/node_modules/lodash/toFinite.js +42 -0
- package/node_modules/lodash/toInteger.js +36 -0
- package/node_modules/lodash/toIterator.js +23 -0
- package/node_modules/lodash/toJSON.js +1 -0
- package/node_modules/lodash/toLength.js +38 -0
- package/node_modules/lodash/toLower.js +28 -0
- package/node_modules/lodash/toNumber.js +64 -0
- package/node_modules/lodash/toPairs.js +30 -0
- package/node_modules/lodash/toPairsIn.js +30 -0
- package/node_modules/lodash/toPath.js +33 -0
- package/node_modules/lodash/toPlainObject.js +32 -0
- package/node_modules/lodash/toSafeInteger.js +37 -0
- package/node_modules/lodash/toString.js +28 -0
- package/node_modules/lodash/toUpper.js +28 -0
- package/node_modules/lodash/transform.js +65 -0
- package/node_modules/lodash/trim.js +47 -0
- package/node_modules/lodash/trimEnd.js +41 -0
- package/node_modules/lodash/trimStart.js +43 -0
- package/node_modules/lodash/truncate.js +111 -0
- package/node_modules/lodash/unary.js +22 -0
- package/node_modules/lodash/unescape.js +34 -0
- package/node_modules/lodash/union.js +26 -0
- package/node_modules/lodash/unionBy.js +39 -0
- package/node_modules/lodash/unionWith.js +34 -0
- package/node_modules/lodash/uniq.js +25 -0
- package/node_modules/lodash/uniqBy.js +31 -0
- package/node_modules/lodash/uniqWith.js +28 -0
- package/node_modules/lodash/uniqueId.js +28 -0
- package/node_modules/lodash/unset.js +34 -0
- package/node_modules/lodash/unzip.js +45 -0
- package/node_modules/lodash/unzipWith.js +39 -0
- package/node_modules/lodash/update.js +35 -0
- package/node_modules/lodash/updateWith.js +33 -0
- package/node_modules/lodash/upperCase.js +27 -0
- package/node_modules/lodash/upperFirst.js +22 -0
- package/node_modules/lodash/util.js +34 -0
- package/node_modules/lodash/value.js +1 -0
- package/node_modules/lodash/valueOf.js +1 -0
- package/node_modules/lodash/values.js +34 -0
- package/node_modules/lodash/valuesIn.js +32 -0
- package/node_modules/lodash/without.js +31 -0
- package/node_modules/lodash/words.js +35 -0
- package/node_modules/lodash/wrap.js +30 -0
- package/node_modules/lodash/wrapperAt.js +48 -0
- package/node_modules/lodash/wrapperChain.js +34 -0
- package/node_modules/lodash/wrapperLodash.js +147 -0
- package/node_modules/lodash/wrapperReverse.js +44 -0
- package/node_modules/lodash/wrapperValue.js +21 -0
- package/node_modules/lodash/xor.js +28 -0
- package/node_modules/lodash/xorBy.js +39 -0
- package/node_modules/lodash/xorWith.js +34 -0
- package/node_modules/lodash/zip.js +22 -0
- package/node_modules/lodash/zipObject.js +24 -0
- package/node_modules/lodash/zipObjectDeep.js +23 -0
- package/node_modules/lodash/zipWith.js +32 -0
- package/node_modules/mute-stream/LICENSE +15 -0
- package/node_modules/mute-stream/README.md +68 -0
- package/node_modules/mute-stream/lib/index.js +142 -0
- package/node_modules/mute-stream/package.json +54 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/signal-exit/LICENSE.txt +16 -0
- package/node_modules/signal-exit/README.md +74 -0
- package/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
- package/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/browser.js +10 -0
- package/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
- package/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
- package/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/index.js +279 -0
- package/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
- package/node_modules/signal-exit/dist/cjs/package.json +3 -0
- package/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
- package/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/signals.js +42 -0
- package/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
- package/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/browser.js +4 -0
- package/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
- package/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/index.js +275 -0
- package/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/package.json +3 -0
- package/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
- package/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/signals.js +39 -0
- package/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
- package/node_modules/signal-exit/package.json +106 -0
- package/node_modules/string-width/index.d.ts +29 -0
- package/node_modules/string-width/index.js +47 -0
- package/node_modules/string-width/license +9 -0
- package/node_modules/string-width/package.json +56 -0
- package/node_modules/string-width/readme.md +50 -0
- package/node_modules/strip-ansi/index.d.ts +17 -0
- package/node_modules/strip-ansi/index.js +4 -0
- package/node_modules/strip-ansi/license +9 -0
- package/node_modules/strip-ansi/package.json +54 -0
- package/node_modules/strip-ansi/readme.md +46 -0
- package/node_modules/wrap-ansi/index.js +186 -0
- package/node_modules/wrap-ansi/license +9 -0
- package/node_modules/wrap-ansi/package.json +61 -0
- package/node_modules/wrap-ansi/readme.md +97 -0
- package/node_modules/yoctocolors-cjs/index.d.ts +94 -0
- package/node_modules/yoctocolors-cjs/index.js +98 -0
- package/node_modules/yoctocolors-cjs/license +9 -0
- package/node_modules/yoctocolors-cjs/package.json +67 -0
- package/node_modules/yoctocolors-cjs/readme.md +130 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +218 -0
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +52 -0
- package/node_modules/zod/index.d.cts +3 -0
- package/node_modules/zod/index.d.ts +3 -0
- package/node_modules/zod/index.js +7 -0
- package/node_modules/zod/locales/index.cjs +36 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +51 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +147 -0
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +7 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +340 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +586 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +128 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +206 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +431 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +114 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +922 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +33 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +78 -0
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +97 -0
- package/node_modules/zod/src/v4/classic/external.ts +57 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +944 -0
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +20 -0
- package/node_modules/zod/src/v4/classic/parse.ts +88 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2937 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +402 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +89 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +604 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +572 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +704 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +316 -0
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +455 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +221 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +942 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +305 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +917 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +1108 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +1467 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +391 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +67 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +958 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +334 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +262 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +128 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +342 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +401 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +1006 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +366 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +497 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +144 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +44 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +184 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +885 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +707 -0
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +693 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +190 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +153 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1440 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +124 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +812 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +4733 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +511 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +310 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1875 -0
- package/node_modules/zod/src/v4/core/checks.ts +1266 -0
- package/node_modules/zod/src/v4/core/compile.ts +2313 -0
- package/node_modules/zod/src/v4/core/core.ts +230 -0
- package/node_modules/zod/src/v4/core/doc.ts +52 -0
- package/node_modules/zod/src/v4/core/errors.ts +543 -0
- package/node_modules/zod/src/v4/core/index.ts +19 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +131 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +934 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +148 -0
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +309 -0
- package/node_modules/zod/src/v4/core/regexes.ts +217 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +5192 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +214 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +180 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +857 -0
- package/node_modules/zod/src/v4/core/util.ts +1280 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +120 -0
- package/node_modules/zod/src/v4/locales/az.ts +116 -0
- package/node_modules/zod/src/v4/locales/be.ts +188 -0
- package/node_modules/zod/src/v4/locales/bg.ts +133 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +121 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +123 -0
- package/node_modules/zod/src/v4/locales/da.ts +128 -0
- package/node_modules/zod/src/v4/locales/de.ts +121 -0
- package/node_modules/zod/src/v4/locales/el.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +136 -0
- package/node_modules/zod/src/v4/locales/eo.ts +123 -0
- package/node_modules/zod/src/v4/locales/es.ts +145 -0
- package/node_modules/zod/src/v4/locales/fa.ts +131 -0
- package/node_modules/zod/src/v4/locales/fi.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr.ts +139 -0
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +253 -0
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +135 -0
- package/node_modules/zod/src/v4/locales/hu.ts +122 -0
- package/node_modules/zod/src/v4/locales/hy.ts +175 -0
- package/node_modules/zod/src/v4/locales/id.ts +120 -0
- package/node_modules/zod/src/v4/locales/index.ts +63 -0
- package/node_modules/zod/src/v4/locales/is.ts +124 -0
- package/node_modules/zod/src/v4/locales/it.ts +121 -0
- package/node_modules/zod/src/v4/locales/ja.ts +119 -0
- package/node_modules/zod/src/v4/locales/ka.ts +128 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +124 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +126 -0
- package/node_modules/zod/src/v4/locales/lt.ts +243 -0
- package/node_modules/zod/src/v4/locales/mk.ts +123 -0
- package/node_modules/zod/src/v4/locales/ms.ts +120 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +121 -0
- package/node_modules/zod/src/v4/locales/ota.ts +122 -0
- package/node_modules/zod/src/v4/locales/pl.ts +123 -0
- package/node_modules/zod/src/v4/locales/ps.ts +131 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +159 -0
- package/node_modules/zod/src/v4/locales/ro.ts +132 -0
- package/node_modules/zod/src/v4/locales/ru.ts +188 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +123 -0
- package/node_modules/zod/src/v4/locales/sv.ts +124 -0
- package/node_modules/zod/src/v4/locales/ta.ts +123 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +124 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +116 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +122 -0
- package/node_modules/zod/src/v4/locales/ur.ts +124 -0
- package/node_modules/zod/src/v4/locales/uz.ts +120 -0
- package/node_modules/zod/src/v4/locales/vi.ts +122 -0
- package/node_modules/zod/src/v4/locales/yo.ts +129 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +121 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +120 -0
- package/node_modules/zod/src/v4/mini/checks.ts +33 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +52 -0
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +16 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +2051 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +57 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +190 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +158 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +582 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +30 -0
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +41 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +1146 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +109 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +292 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +341 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +396 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +167 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +143 -0
- package/node_modules/zod/v3/errors.cjs +36 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +41 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +21 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +28 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +143 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +21 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +21 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +156 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +52 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +21 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3798 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3697 -0
- package/node_modules/zod/v4/classic/checks.cjs +53 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +66 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +80 -0
- package/node_modules/zod/v4/classic/compat.d.cts +48 -0
- package/node_modules/zod/v4/classic/compat.d.ts +48 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +102 -0
- package/node_modules/zod/v4/classic/errors.d.cts +29 -0
- package/node_modules/zod/v4/classic/errors.d.ts +29 -0
- package/node_modules/zod/v4/classic/errors.js +57 -0
- package/node_modules/zod/v4/classic/external.cjs +97 -0
- package/node_modules/zod/v4/classic/external.d.cts +19 -0
- package/node_modules/zod/v4/classic/external.d.ts +19 -0
- package/node_modules/zod/v4/classic/external.js +17 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +926 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +881 -0
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +52 -0
- package/node_modules/zod/v4/classic/index.d.cts +3 -0
- package/node_modules/zod/v4/classic/index.d.ts +3 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +68 -0
- package/node_modules/zod/v4/classic/iso.d.cts +7 -0
- package/node_modules/zod/v4/classic/iso.d.ts +7 -0
- package/node_modules/zod/v4/classic/iso.js +15 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +63 -0
- package/node_modules/zod/v4/classic/parse.d.cts +44 -0
- package/node_modules/zod/v4/classic/parse.d.ts +44 -0
- package/node_modules/zod/v4/classic/parse.js +16 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1676 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +816 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +816 -0
- package/node_modules/zod/v4/classic/schemas.js +1535 -0
- package/node_modules/zod/v4/core/api.cjs +1269 -0
- package/node_modules/zod/v4/core/api.d.cts +335 -0
- package/node_modules/zod/v4/core/api.d.ts +335 -0
- package/node_modules/zod/v4/core/api.js +1107 -0
- package/node_modules/zod/v4/core/checks.cjs +561 -0
- package/node_modules/zod/v4/core/checks.d.cts +294 -0
- package/node_modules/zod/v4/core/checks.d.ts +294 -0
- package/node_modules/zod/v4/core/checks.js +516 -0
- package/node_modules/zod/v4/core/compile.cjs +1908 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1858 -0
- package/node_modules/zod/v4/core/core.cjs +167 -0
- package/node_modules/zod/v4/core/core.d.cts +82 -0
- package/node_modules/zod/v4/core/core.d.ts +82 -0
- package/node_modules/zod/v4/core/core.js +141 -0
- package/node_modules/zod/v4/core/doc.cjs +61 -0
- package/node_modules/zod/v4/core/doc.d.cts +16 -0
- package/node_modules/zod/v4/core/doc.d.ts +16 -0
- package/node_modules/zod/v4/core/doc.js +38 -0
- package/node_modules/zod/v4/core/errors.cjs +317 -0
- package/node_modules/zod/v4/core/errors.d.cts +225 -0
- package/node_modules/zod/v4/core/errors.d.ts +225 -0
- package/node_modules/zod/v4/core/errors.js +267 -0
- package/node_modules/zod/v4/core/index.cjs +70 -0
- package/node_modules/zod/v4/core/index.d.cts +19 -0
- package/node_modules/zod/v4/core/index.d.ts +19 -0
- package/node_modules/zod/v4/core/index.js +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +122 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +99 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +929 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +843 -0
- package/node_modules/zod/v4/core/json-schema.cjs +21 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +89 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +89 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +233 -0
- package/node_modules/zod/v4/core/parse.d.cts +52 -0
- package/node_modules/zod/v4/core/parse.d.ts +52 -0
- package/node_modules/zod/v4/core/parse.js +175 -0
- package/node_modules/zod/v4/core/regexes.cjs +209 -0
- package/node_modules/zod/v4/core/regexes.d.cts +90 -0
- package/node_modules/zod/v4/core/regexes.d.ts +90 -0
- package/node_modules/zod/v4/core/regexes.js +156 -0
- package/node_modules/zod/v4/core/registries.cjs +75 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2669 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1273 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1273 -0
- package/node_modules/zod/v4/core/schemas.js +2606 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +21 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +681 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +154 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +154 -0
- package/node_modules/zod/v4/core/to-json-schema.js +651 -0
- package/node_modules/zod/v4/core/util.cjs +949 -0
- package/node_modules/zod/v4/core/util.d.cts +278 -0
- package/node_modules/zod/v4/core/util.d.ts +278 -0
- package/node_modules/zod/v4/core/util.js +859 -0
- package/node_modules/zod/v4/core/versions.cjs +27 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +51 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +4 -0
- package/node_modules/zod/v4/locales/ar.cjs +138 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +111 -0
- package/node_modules/zod/v4/locales/az.cjs +137 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +110 -0
- package/node_modules/zod/v4/locales/be.cjs +195 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +168 -0
- package/node_modules/zod/v4/locales/bg.cjs +152 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +125 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +139 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +112 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +143 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +116 -0
- package/node_modules/zod/v4/locales/da.cjs +147 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +120 -0
- package/node_modules/zod/v4/locales/de.cjs +140 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +113 -0
- package/node_modules/zod/v4/locales/el.cjs +139 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +112 -0
- package/node_modules/zod/v4/locales/en.cjs +152 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +125 -0
- package/node_modules/zod/v4/locales/eo.cjs +141 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +114 -0
- package/node_modules/zod/v4/locales/es.cjs +163 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +136 -0
- package/node_modules/zod/v4/locales/fa.cjs +146 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +119 -0
- package/node_modules/zod/v4/locales/fi.cjs +144 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +117 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +139 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +112 -0
- package/node_modules/zod/v4/locales/fr.cjs +156 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +129 -0
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +248 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +221 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +153 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +126 -0
- package/node_modules/zod/v4/locales/hu.cjs +140 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +113 -0
- package/node_modules/zod/v4/locales/hy.cjs +185 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +158 -0
- package/node_modules/zod/v4/locales/id.cjs +138 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +111 -0
- package/node_modules/zod/v4/locales/index.cjs +152 -0
- package/node_modules/zod/v4/locales/index.d.cts +63 -0
- package/node_modules/zod/v4/locales/index.d.ts +63 -0
- package/node_modules/zod/v4/locales/index.js +63 -0
- package/node_modules/zod/v4/locales/is.cjs +141 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +114 -0
- package/node_modules/zod/v4/locales/it.cjs +140 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +113 -0
- package/node_modules/zod/v4/locales/ja.cjs +139 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +112 -0
- package/node_modules/zod/v4/locales/ka.cjs +144 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +117 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +142 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +115 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +143 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +116 -0
- package/node_modules/zod/v4/locales/lt.cjs +234 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +207 -0
- package/node_modules/zod/v4/locales/mk.cjs +141 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +114 -0
- package/node_modules/zod/v4/locales/ms.cjs +139 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +112 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +142 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +115 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +140 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +113 -0
- package/node_modules/zod/v4/locales/ota.cjs +141 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +114 -0
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +141 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +114 -0
- package/node_modules/zod/v4/locales/ps.cjs +146 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +119 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +169 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +142 -0
- package/node_modules/zod/v4/locales/ro.cjs +149 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +122 -0
- package/node_modules/zod/v4/locales/ru.cjs +195 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +168 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +141 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +114 -0
- package/node_modules/zod/v4/locales/sv.cjs +142 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +115 -0
- package/node_modules/zod/v4/locales/ta.cjs +142 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +115 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +142 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +115 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +137 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +110 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +140 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +113 -0
- package/node_modules/zod/v4/locales/ur.cjs +142 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +115 -0
- package/node_modules/zod/v4/locales/uz.cjs +140 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +113 -0
- package/node_modules/zod/v4/locales/vi.cjs +140 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +113 -0
- package/node_modules/zod/v4/locales/yo.cjs +139 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +112 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +141 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +114 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +139 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +112 -0
- package/node_modules/zod/v4/mini/checks.cjs +54 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +71 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +95 -0
- package/node_modules/zod/v4/mini/external.d.cts +16 -0
- package/node_modules/zod/v4/mini/external.d.ts +16 -0
- package/node_modules/zod/v4/mini/external.js +16 -0
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +51 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +83 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +37 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1147 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +480 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +480 -0
- package/node_modules/zod/v4/mini/schemas.js +1002 -0
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +51 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/package.json +9 -1
- package/sandbox/boot/bootstrap/drives.ps1 +29 -0
- package/sandbox/boot/bootstrap/files.ps1 +49 -0
- package/sandbox/boot/bootstrap/runner.ps1 +87 -0
- package/sandbox/boot/bootstrap/status.ps1 +8 -0
- package/sandbox/boot/bootstrap.ps1 +91 -0
- package/sandbox/{logon.cmd → boot/logon.cmd} +11 -5
- package/sandbox/{cargoshim.cs → csharp/CargoShim.cs} +28 -7
- package/sandbox/csharp/Desktop.cs +33 -0
- package/sandbox/{gitshim.cs → csharp/GitShim.cs} +15 -3
- package/sandbox/{linkgate.cs → csharp/LinkGate.cs} +15 -5
- package/sandbox/{openssl.cs → csharp/OpenSsl.cs} +18 -4
- package/sandbox/csharp/PtyHost.cs +1327 -0
- package/sandbox/csharp/SandboxTools/CpuCap.cs +134 -0
- package/sandbox/csharp/SandboxTools/MemoryLog.cs +157 -0
- package/sandbox/csharp/SandboxTools/PageFile.cs +72 -0
- package/sandbox/csharp/SandboxTools/Program.cs +153 -0
- package/sandbox/csharp/VsWhere.cs +145 -0
- package/sandbox/csharp/VtInput.cs +63 -0
- package/sandbox/scripts/enable-vt-input.ps1 +9 -0
- package/sandbox/scripts/expand-archive.ps1 +9 -0
- package/sandbox/scripts/get-gpu-names.ps1 +5 -0
- package/sandbox/scripts/get-signer.ps1 +8 -0
- package/sandbox/scripts/link-profile-dirs.ps1 +35 -0
- package/sandbox/scripts/new-shortcuts.ps1 +15 -0
- package/sandbox/scripts/set-desktop.ps1 +16 -0
- package/sandbox/scripts/set-dns-servers.ps1 +8 -0
- package/sandbox/scripts/set-machine-environment.ps1 +29 -0
- package/schemas/config.schema.json +108 -6
- package/schemas/sandbox-config.schema.json +30 -6
- package/dist/cli/menu/home.d.ts +0 -22
- package/dist/cli/menu/home.js +0 -72
- package/dist/cli/menu/settings/settings-editor.d.ts +0 -30
- package/dist/cli/menu/settings/settings-editor.js +0 -176
- package/sandbox/bootstrap.ps1 +0 -258
- package/sandbox/cpucap.cs +0 -33
- package/sandbox/cpucap.ps1 +0 -20
- package/sandbox/memlog.ps1 +0 -43
- package/sandbox/pagefile.cs +0 -31
- package/sandbox/pagefile.ps1 +0 -21
- package/sandbox/ptyhost.cs +0 -769
- package/sandbox/vswhere.cs +0 -83
- /package/sandbox/{trust.cmd → boot/trust.cmd} +0 -0
|
@@ -0,0 +1,2036 @@
|
|
|
1
|
+
import { expect, expectTypeOf, test } from "vitest";
|
|
2
|
+
|
|
3
|
+
import * as z from "../../index.js";
|
|
4
|
+
import {
|
|
5
|
+
INVALID,
|
|
6
|
+
ZodCompileAsyncError,
|
|
7
|
+
ZodCompileUnsupportedError,
|
|
8
|
+
compile,
|
|
9
|
+
compileFn,
|
|
10
|
+
withParser,
|
|
11
|
+
} from "../compile.js";
|
|
12
|
+
import { $ZodAsyncError } from "../core.js";
|
|
13
|
+
|
|
14
|
+
// Differential helper: assert compiled schema matches the original on a value.
|
|
15
|
+
function expectMatch(schema: z.ZodType, value: unknown) {
|
|
16
|
+
const compiled = compile(schema);
|
|
17
|
+
const original = schema.safeParse(value);
|
|
18
|
+
const fast = compiled.safeParse(value);
|
|
19
|
+
|
|
20
|
+
expect(fast.success).toBe(original.success);
|
|
21
|
+
if (original.success && fast.success) {
|
|
22
|
+
expect(fast.data).toEqual(original.data);
|
|
23
|
+
} else if (!original.success && !fast.success) {
|
|
24
|
+
expect(fast.error.issues).toEqual(original.error.issues);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Parse and assert success; return the parsed data for further assertions.
|
|
29
|
+
function valid<T extends z.ZodType>(schema: T, value: unknown): z.output<T> {
|
|
30
|
+
const result = schema.safeParse(value);
|
|
31
|
+
if (!result.success) {
|
|
32
|
+
throw new Error(`expected success, got issues: ${JSON.stringify(result.error.issues)}`);
|
|
33
|
+
}
|
|
34
|
+
return result.data;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Parse and assert failure.
|
|
38
|
+
function invalid(schema: z.ZodType, value: unknown) {
|
|
39
|
+
const result = schema.safeParse(value);
|
|
40
|
+
expect(result.success).toBe(false);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// === Primitives ===
|
|
44
|
+
|
|
45
|
+
test("string", () => {
|
|
46
|
+
const aot = compile(z.string());
|
|
47
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
48
|
+
expect(valid(aot, "")).toBe("");
|
|
49
|
+
invalid(aot, 123);
|
|
50
|
+
invalid(aot, null);
|
|
51
|
+
invalid(aot, undefined);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
test("number", () => {
|
|
55
|
+
const aot = compile(z.number());
|
|
56
|
+
expect(valid(aot, 123)).toBe(123);
|
|
57
|
+
expect(valid(aot, 0)).toBe(0);
|
|
58
|
+
expect(valid(aot, -5.5)).toBe(-5.5);
|
|
59
|
+
invalid(aot, Number.NaN); // z.number() rejects NaN
|
|
60
|
+
invalid(aot, Number.POSITIVE_INFINITY); // z.number() rejects Infinity
|
|
61
|
+
invalid(aot, Number.NEGATIVE_INFINITY);
|
|
62
|
+
invalid(aot, "123");
|
|
63
|
+
invalid(aot, null);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test("boolean", () => {
|
|
67
|
+
const aot = compile(z.boolean());
|
|
68
|
+
expect(valid(aot, true)).toBe(true);
|
|
69
|
+
expect(valid(aot, false)).toBe(false);
|
|
70
|
+
invalid(aot, 1);
|
|
71
|
+
invalid(aot, "true");
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test("bigint", () => {
|
|
75
|
+
const aot = compile(z.bigint());
|
|
76
|
+
expect(valid(aot, 123n)).toBe(123n);
|
|
77
|
+
expect(valid(aot, 0n)).toBe(0n);
|
|
78
|
+
invalid(aot, 123);
|
|
79
|
+
invalid(aot, "123");
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
test("symbol", () => {
|
|
83
|
+
const aot = compile(z.symbol());
|
|
84
|
+
const sym = Symbol();
|
|
85
|
+
expect(valid(aot, sym)).toBe(sym);
|
|
86
|
+
const namedSym = Symbol.for("test");
|
|
87
|
+
expect(valid(aot, namedSym)).toBe(namedSym);
|
|
88
|
+
invalid(aot, "symbol");
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test("undefined", () => {
|
|
92
|
+
const aot = compile(z.undefined());
|
|
93
|
+
expect(valid(aot, undefined)).toBe(undefined);
|
|
94
|
+
invalid(aot, null);
|
|
95
|
+
invalid(aot, 0);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test("null", () => {
|
|
99
|
+
const aot = compile(z.null());
|
|
100
|
+
expect(valid(aot, null)).toBe(null);
|
|
101
|
+
invalid(aot, undefined);
|
|
102
|
+
invalid(aot, 0);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
test("void", () => {
|
|
106
|
+
const aot = compile(z.void());
|
|
107
|
+
expect(valid(aot, undefined)).toBe(undefined);
|
|
108
|
+
invalid(aot, null);
|
|
109
|
+
invalid(aot, 0);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test("nan", () => {
|
|
113
|
+
const aot = compile(z.nan());
|
|
114
|
+
expect(Number.isNaN(valid(aot, Number.NaN))).toBe(true);
|
|
115
|
+
expect(Number.isNaN(valid(aot, Number.NaN))).toBe(true);
|
|
116
|
+
invalid(aot, 0);
|
|
117
|
+
invalid(aot, Number.POSITIVE_INFINITY);
|
|
118
|
+
invalid(aot, "NaN");
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
test("date", () => {
|
|
122
|
+
const aot = compile(z.date());
|
|
123
|
+
const d1 = new Date();
|
|
124
|
+
expect(valid(aot, d1)).toBe(d1);
|
|
125
|
+
const d2 = new Date(0);
|
|
126
|
+
expect(valid(aot, d2)).toBe(d2);
|
|
127
|
+
invalid(aot, new Date("invalid")); // Invalid date
|
|
128
|
+
invalid(aot, "2024-01-01");
|
|
129
|
+
invalid(aot, Date.now());
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// === Special Types ===
|
|
133
|
+
|
|
134
|
+
test("any", () => {
|
|
135
|
+
const aot = compile(z.any());
|
|
136
|
+
expect(valid(aot, null)).toBe(null);
|
|
137
|
+
expect(valid(aot, undefined)).toBe(undefined);
|
|
138
|
+
expect(valid(aot, 123)).toBe(123);
|
|
139
|
+
expect(valid(aot, { nested: { deep: true } })).toEqual({ nested: { deep: true } });
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
test("unknown", () => {
|
|
143
|
+
const aot = compile(z.unknown());
|
|
144
|
+
expect(valid(aot, null)).toBe(null);
|
|
145
|
+
expect(valid(aot, undefined)).toBe(undefined);
|
|
146
|
+
expect(valid(aot, 123)).toBe(123);
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
test("never", () => {
|
|
150
|
+
const aot = compile(z.never());
|
|
151
|
+
invalid(aot, null);
|
|
152
|
+
invalid(aot, undefined);
|
|
153
|
+
invalid(aot, 123);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
// === Literal ===
|
|
157
|
+
|
|
158
|
+
test("literal string", () => {
|
|
159
|
+
const aot = compile(z.literal("hello"));
|
|
160
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
161
|
+
invalid(aot, "Hello");
|
|
162
|
+
invalid(aot, "");
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
test("literal number", () => {
|
|
166
|
+
const aot = compile(z.literal(42));
|
|
167
|
+
expect(valid(aot, 42)).toBe(42);
|
|
168
|
+
invalid(aot, 43);
|
|
169
|
+
invalid(aot, "42");
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
test("literal boolean", () => {
|
|
173
|
+
const aot = compile(z.literal(true));
|
|
174
|
+
expect(valid(aot, true)).toBe(true);
|
|
175
|
+
invalid(aot, false);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
test("literal null", () => {
|
|
179
|
+
const aot = compile(z.literal(null));
|
|
180
|
+
expect(valid(aot, null)).toBe(null);
|
|
181
|
+
invalid(aot, undefined);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
test("literal bigint", () => {
|
|
185
|
+
const aot = compile(z.literal(100n));
|
|
186
|
+
expect(valid(aot, 100n)).toBe(100n);
|
|
187
|
+
invalid(aot, 100);
|
|
188
|
+
invalid(aot, 101n);
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
// === Enum ===
|
|
192
|
+
|
|
193
|
+
test("enum", () => {
|
|
194
|
+
const aot = compile(z.enum(["a", "b", "c"]));
|
|
195
|
+
expect(valid(aot, "a")).toBe("a");
|
|
196
|
+
expect(valid(aot, "b")).toBe("b");
|
|
197
|
+
expect(valid(aot, "c")).toBe("c");
|
|
198
|
+
invalid(aot, "d");
|
|
199
|
+
invalid(aot, "A");
|
|
200
|
+
invalid(aot, 1);
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
// === Wrapper Types ===
|
|
204
|
+
|
|
205
|
+
test("readonly", () => {
|
|
206
|
+
const aot = compile(z.readonly(z.string()));
|
|
207
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
208
|
+
invalid(aot, 123);
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
test("default", () => {
|
|
212
|
+
const aot = compile(z.string().default("hello"));
|
|
213
|
+
expect(valid(aot, "world")).toBe("world");
|
|
214
|
+
expect(valid(aot, undefined)).toBe("hello"); // default applies
|
|
215
|
+
invalid(aot, 123);
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
test("prefault", () => {
|
|
219
|
+
const aot = compile(z.string().trim().prefault(" hello "));
|
|
220
|
+
expect(valid(aot, "world")).toBe("world");
|
|
221
|
+
expect(valid(aot, undefined)).toBe("hello");
|
|
222
|
+
invalid(aot, 123);
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
test("nonoptional", () => {
|
|
226
|
+
const aot = compile(z.string().optional().nonoptional());
|
|
227
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
228
|
+
invalid(aot, undefined); // nonoptional rejects undefined
|
|
229
|
+
invalid(aot, 123);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
test("nonoptional judges the inner's output, not its input", () => {
|
|
233
|
+
// An inner catch turns a *defined* input into undefined, which must still be rejected; an inner default turns an absent input into a value, which must be accepted. Testing the input alone got both backwards.
|
|
234
|
+
const caught = z
|
|
235
|
+
.string()
|
|
236
|
+
.min(2)
|
|
237
|
+
.max(8)
|
|
238
|
+
.prefault("abc")
|
|
239
|
+
.catch(undefined as any)
|
|
240
|
+
.optional()
|
|
241
|
+
.nonoptional();
|
|
242
|
+
for (const input of ["abc", "abcdefghij", "a", undefined]) expectMatch(caught, input);
|
|
243
|
+
|
|
244
|
+
expectMatch(
|
|
245
|
+
z
|
|
246
|
+
.string()
|
|
247
|
+
.transform(() => undefined)
|
|
248
|
+
.nonoptional(),
|
|
249
|
+
"s"
|
|
250
|
+
);
|
|
251
|
+
for (const input of [undefined, "y", 1]) expectMatch(z.string().default("x").nonoptional(), input);
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
test("a nonoptional object key whose inner supplies a value still needs the key", () => {
|
|
255
|
+
// The runtime separates an absent key from an explicit undefined here: absent fails, explicit undefined takes the default. The fast path has to as well.
|
|
256
|
+
const prop = z
|
|
257
|
+
.literal("lit")
|
|
258
|
+
.default("other" as any)
|
|
259
|
+
.optional()
|
|
260
|
+
.nonoptional();
|
|
261
|
+
const schema = z.object({ k1: prop });
|
|
262
|
+
expectMatch(schema, {});
|
|
263
|
+
expectMatch(schema, { k1: undefined });
|
|
264
|
+
expectMatch(schema, { k1: "lit" });
|
|
265
|
+
expectMatch(prop, undefined);
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
test("success", () => {
|
|
269
|
+
const aot = compile(z.success(z.string()));
|
|
270
|
+
expect(valid(aot, "hello")).toBe(true);
|
|
271
|
+
invalid(aot, 123);
|
|
272
|
+
expectMatch(z.success(z.string()), "hello");
|
|
273
|
+
expectMatch(z.success(z.string()), 123);
|
|
274
|
+
expectMatch(z.object({ ok: z.success(z.number()) }), { ok: 5 });
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
// === Optional & Nullable ===
|
|
278
|
+
|
|
279
|
+
test("optional", () => {
|
|
280
|
+
const aot = compile(z.optional(z.string()));
|
|
281
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
282
|
+
expect(valid(aot, undefined)).toBe(undefined);
|
|
283
|
+
invalid(aot, null);
|
|
284
|
+
invalid(aot, 123);
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
test("nullable", () => {
|
|
288
|
+
const aot = compile(z.nullable(z.string()));
|
|
289
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
290
|
+
expect(valid(aot, null)).toBe(null);
|
|
291
|
+
invalid(aot, undefined);
|
|
292
|
+
invalid(aot, 123);
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
// === Array ===
|
|
296
|
+
|
|
297
|
+
test("array of strings", () => {
|
|
298
|
+
const aot = compile(z.array(z.string()));
|
|
299
|
+
expect(valid(aot, [])).toEqual([]);
|
|
300
|
+
expect(valid(aot, ["a", "b"])).toEqual(["a", "b"]);
|
|
301
|
+
invalid(aot, [1, 2]);
|
|
302
|
+
invalid(aot, ["a", 1]);
|
|
303
|
+
invalid(aot, "not array");
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
test("array of objects", () => {
|
|
307
|
+
const aot = compile(z.array(z.object({ id: z.number() })));
|
|
308
|
+
expect(valid(aot, [{ id: 1 }, { id: 2 }])).toEqual([{ id: 1 }, { id: 2 }]);
|
|
309
|
+
invalid(aot, [{ id: "1" }]);
|
|
310
|
+
invalid(aot, [{}]);
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
// === Object ===
|
|
314
|
+
|
|
315
|
+
test("simple object", () => {
|
|
316
|
+
const aot = compile(z.object({ name: z.string(), age: z.number() }));
|
|
317
|
+
expect(valid(aot, { name: "Alice", age: 30 })).toEqual({ name: "Alice", age: 30 });
|
|
318
|
+
expect(valid(aot, { name: "Bob", age: 25, extra: true })).toEqual({ name: "Bob", age: 25 }); // strip mode
|
|
319
|
+
invalid(aot, { name: "Charlie" });
|
|
320
|
+
invalid(aot, { name: 123, age: 30 });
|
|
321
|
+
invalid(aot, null);
|
|
322
|
+
invalid(aot, []);
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
test("nested object", () => {
|
|
326
|
+
const aot = compile(
|
|
327
|
+
z.object({
|
|
328
|
+
user: z.object({
|
|
329
|
+
name: z.string(),
|
|
330
|
+
address: z.object({
|
|
331
|
+
city: z.string(),
|
|
332
|
+
}),
|
|
333
|
+
}),
|
|
334
|
+
})
|
|
335
|
+
);
|
|
336
|
+
expect(valid(aot, { user: { name: "Alice", address: { city: "NYC" } } })).toEqual({
|
|
337
|
+
user: { name: "Alice", address: { city: "NYC" } },
|
|
338
|
+
});
|
|
339
|
+
invalid(aot, { user: { name: "Alice", address: {} } });
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
test("object with optional property", () => {
|
|
343
|
+
const aot = compile(z.object({ name: z.string(), age: z.optional(z.number()) }));
|
|
344
|
+
expect(valid(aot, { name: "Alice" })).toEqual({ name: "Alice" });
|
|
345
|
+
expect(valid(aot, { name: "Alice", age: 30 })).toEqual({ name: "Alice", age: 30 });
|
|
346
|
+
expect(valid(aot, { name: "Alice", age: undefined })).toEqual({ name: "Alice", age: undefined });
|
|
347
|
+
invalid(aot, { name: "Alice", age: "30" });
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
test("object required undefined-accepting properties distinguish absence", () => {
|
|
351
|
+
const cases = [
|
|
352
|
+
z.object({ value: z.undefined() }),
|
|
353
|
+
z.object({ value: z.union([z.string(), z.undefined()]) }),
|
|
354
|
+
z.object({ value: z.any() }),
|
|
355
|
+
z.object({ value: z.unknown() }),
|
|
356
|
+
];
|
|
357
|
+
|
|
358
|
+
for (const schema of cases) {
|
|
359
|
+
const aot = compile(schema);
|
|
360
|
+
invalid(aot, {});
|
|
361
|
+
expect(valid(aot, { value: undefined })).toEqual({ value: undefined });
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
test("strictObject", () => {
|
|
366
|
+
const aot = compile(z.strictObject({ name: z.string() }));
|
|
367
|
+
expect(valid(aot, { name: "Alice" })).toEqual({ name: "Alice" });
|
|
368
|
+
invalid(aot, { name: "Alice", extra: true });
|
|
369
|
+
invalid(aot, {});
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
test("strictObject with optional", () => {
|
|
373
|
+
const aot = compile(z.strictObject({ name: z.string(), age: z.optional(z.number()) }));
|
|
374
|
+
expect(valid(aot, { name: "Alice" })).toEqual({ name: "Alice" });
|
|
375
|
+
expect(valid(aot, { name: "Alice", age: 30 })).toEqual({ name: "Alice", age: 30 });
|
|
376
|
+
invalid(aot, { name: "Alice", extra: true });
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
test("looseObject", () => {
|
|
380
|
+
const aot = compile(z.looseObject({ name: z.string() }));
|
|
381
|
+
expect(valid(aot, { name: "Alice" })).toEqual({ name: "Alice" });
|
|
382
|
+
expect(valid(aot, { name: "Alice", extra: true })).toEqual({ name: "Alice", extra: true });
|
|
383
|
+
invalid(aot, {});
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
test("object with catchall", () => {
|
|
387
|
+
const aot = compile(z.object({ name: z.string() }).catchall(z.number()));
|
|
388
|
+
expect(valid(aot, { name: "Alice" })).toEqual({ name: "Alice" });
|
|
389
|
+
expect(valid(aot, { name: "Alice", age: 30 })).toEqual({ name: "Alice", age: 30 });
|
|
390
|
+
invalid(aot, { name: "Alice", age: "30" });
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
// === Matches Zod behavior ===
|
|
394
|
+
|
|
395
|
+
test("matches Zod: primitives", () => {
|
|
396
|
+
expectMatch(z.string(), "hello");
|
|
397
|
+
expectMatch(z.string(), 123);
|
|
398
|
+
expectMatch(z.number(), 123);
|
|
399
|
+
expectMatch(z.number(), Number.NaN);
|
|
400
|
+
expectMatch(z.boolean(), true);
|
|
401
|
+
expectMatch(z.boolean(), 1);
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
test("matches Zod: void/nan/date", () => {
|
|
405
|
+
expectMatch(z.void(), undefined);
|
|
406
|
+
expectMatch(z.void(), null);
|
|
407
|
+
expectMatch(z.nan(), Number.NaN);
|
|
408
|
+
expectMatch(z.nan(), 0);
|
|
409
|
+
expectMatch(z.date(), new Date());
|
|
410
|
+
expectMatch(z.date(), new Date("invalid"));
|
|
411
|
+
expectMatch(z.date(), "2024-01-01");
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
test("matches Zod: complex schema", () => {
|
|
415
|
+
const schema = z.strictObject({
|
|
416
|
+
id: z.number(),
|
|
417
|
+
name: z.string(),
|
|
418
|
+
tags: z.array(z.string()),
|
|
419
|
+
nested: z.object({
|
|
420
|
+
active: z.boolean(),
|
|
421
|
+
}),
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
expectMatch(schema, { id: 1, name: "test", tags: ["a"], nested: { active: true } });
|
|
425
|
+
expectMatch(schema, { id: 1, name: "test", tags: ["a"], nested: { active: true }, extra: "x" });
|
|
426
|
+
expectMatch(schema, { id: "1", name: "test", tags: ["a"], nested: { active: true } });
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
// === Checks ===
|
|
430
|
+
|
|
431
|
+
test("number min/max", () => {
|
|
432
|
+
const aot = compile(z.number().min(0).max(100));
|
|
433
|
+
expect(valid(aot, 50)).toBe(50);
|
|
434
|
+
expect(valid(aot, 0)).toBe(0);
|
|
435
|
+
expect(valid(aot, 100)).toBe(100);
|
|
436
|
+
invalid(aot, -1);
|
|
437
|
+
invalid(aot, 101);
|
|
438
|
+
});
|
|
439
|
+
|
|
440
|
+
test("number exclusive min/max", () => {
|
|
441
|
+
const aot = compile(z.number().gt(0).lt(100));
|
|
442
|
+
expect(valid(aot, 50)).toBe(50);
|
|
443
|
+
expect(valid(aot, 1)).toBe(1);
|
|
444
|
+
expect(valid(aot, 99)).toBe(99);
|
|
445
|
+
invalid(aot, 0);
|
|
446
|
+
invalid(aot, 100);
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
test("number int", () => {
|
|
450
|
+
const aot = compile(z.number().int());
|
|
451
|
+
expect(valid(aot, 5)).toBe(5);
|
|
452
|
+
expect(valid(aot, -10)).toBe(-10);
|
|
453
|
+
invalid(aot, 5.5);
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
test("number multipleOf", () => {
|
|
457
|
+
const aot = compile(z.number().multipleOf(5));
|
|
458
|
+
expect(valid(aot, 0)).toBe(0);
|
|
459
|
+
expect(valid(aot, 5)).toBe(5);
|
|
460
|
+
expect(valid(aot, 10)).toBe(10);
|
|
461
|
+
invalid(aot, 7);
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
test("string length checks", () => {
|
|
465
|
+
const aot = compile(z.string().min(3).max(10));
|
|
466
|
+
expect(valid(aot, "abc")).toBe("abc");
|
|
467
|
+
expect(valid(aot, "0123456789")).toBe("0123456789");
|
|
468
|
+
invalid(aot, "ab");
|
|
469
|
+
invalid(aot, "01234567890");
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
test("string exact length", () => {
|
|
473
|
+
const aot = compile(z.string().length(5));
|
|
474
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
475
|
+
invalid(aot, "hi");
|
|
476
|
+
invalid(aot, "toolong");
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
test("string regex", () => {
|
|
480
|
+
const aot = compile(z.string().regex(/^[a-z]+$/));
|
|
481
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
482
|
+
invalid(aot, "Hello");
|
|
483
|
+
invalid(aot, "hello123");
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
test("string startsWith/endsWith/includes", () => {
|
|
487
|
+
const aot = compile(z.string().startsWith("hello").endsWith("world").includes("beautiful"));
|
|
488
|
+
expect(valid(aot, "hello beautiful world")).toBe("hello beautiful world");
|
|
489
|
+
invalid(aot, "hello world");
|
|
490
|
+
invalid(aot, "beautiful world");
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
test("string lowercase/uppercase", () => {
|
|
494
|
+
const lower = compile(z.string().lowercase());
|
|
495
|
+
expect(valid(lower, "hello")).toBe("hello");
|
|
496
|
+
invalid(lower, "Hello");
|
|
497
|
+
|
|
498
|
+
const upper = compile(z.string().uppercase());
|
|
499
|
+
expect(valid(upper, "HELLO")).toBe("HELLO");
|
|
500
|
+
invalid(upper, "Hello");
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
test("array length checks", () => {
|
|
504
|
+
const aot = compile(z.array(z.number()).min(1).max(3));
|
|
505
|
+
expect(valid(aot, [1])).toEqual([1]);
|
|
506
|
+
expect(valid(aot, [1, 2, 3])).toEqual([1, 2, 3]);
|
|
507
|
+
invalid(aot, []);
|
|
508
|
+
invalid(aot, [1, 2, 3, 4]);
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
test("bigint min/max", () => {
|
|
512
|
+
const aot = compile(z.bigint().min(0n).max(100n));
|
|
513
|
+
expect(valid(aot, 50n)).toBe(50n);
|
|
514
|
+
expect(valid(aot, 0n)).toBe(0n);
|
|
515
|
+
invalid(aot, -1n);
|
|
516
|
+
invalid(aot, 101n);
|
|
517
|
+
});
|
|
518
|
+
|
|
519
|
+
test("matches Zod: checks", () => {
|
|
520
|
+
const schema = z
|
|
521
|
+
.string()
|
|
522
|
+
.min(3)
|
|
523
|
+
.max(10)
|
|
524
|
+
.regex(/^[a-z]+$/);
|
|
525
|
+
expectMatch(schema, "hello");
|
|
526
|
+
expectMatch(schema, "ab");
|
|
527
|
+
expectMatch(schema, "Hello");
|
|
528
|
+
expectMatch(schema, "toolongstring");
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
test("custom refine", () => {
|
|
532
|
+
const aot = compile(z.string().refine((x) => x.length > 3));
|
|
533
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
534
|
+
invalid(aot, "abc");
|
|
535
|
+
invalid(aot, "ab");
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
test("custom refine with object", () => {
|
|
539
|
+
const aot = compile(
|
|
540
|
+
z
|
|
541
|
+
.object({
|
|
542
|
+
password: z.string(),
|
|
543
|
+
confirm: z.string(),
|
|
544
|
+
})
|
|
545
|
+
.refine((data) => data.password === data.confirm)
|
|
546
|
+
);
|
|
547
|
+
expect(valid(aot, { password: "secret", confirm: "secret" })).toEqual({ password: "secret", confirm: "secret" });
|
|
548
|
+
invalid(aot, { password: "secret", confirm: "wrong" });
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
// === String Formats ===
|
|
552
|
+
|
|
553
|
+
test("email", () => {
|
|
554
|
+
const aot = compile(z.email());
|
|
555
|
+
expect(valid(aot, "test@example.com")).toBe("test@example.com");
|
|
556
|
+
expect(valid(aot, "user.name+tag@example.co.uk")).toBe("user.name+tag@example.co.uk");
|
|
557
|
+
invalid(aot, "invalid");
|
|
558
|
+
invalid(aot, "@example.com");
|
|
559
|
+
invalid(aot, 123);
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
test("uuid", () => {
|
|
563
|
+
const aot = compile(z.uuid());
|
|
564
|
+
expect(valid(aot, "550e8400-e29b-41d4-a716-446655440000")).toBe("550e8400-e29b-41d4-a716-446655440000");
|
|
565
|
+
expect(valid(aot, "00000000-0000-0000-0000-000000000000")).toBe("00000000-0000-0000-0000-000000000000");
|
|
566
|
+
invalid(aot, "not-a-uuid");
|
|
567
|
+
invalid(aot, "550e8400-e29b-41d4-a716");
|
|
568
|
+
});
|
|
569
|
+
|
|
570
|
+
test("url", () => {
|
|
571
|
+
const aot = compile(z.url());
|
|
572
|
+
expect(valid(aot, "https://example.com")).toBe("https://example.com");
|
|
573
|
+
expect(valid(aot, " https://example.com ")).toBe("https://example.com");
|
|
574
|
+
expect(valid(aot, "http://localhost:3000/path")).toBe("http://localhost:3000/path");
|
|
575
|
+
invalid(aot, "not a url");
|
|
576
|
+
invalid(aot, "example.com");
|
|
577
|
+
});
|
|
578
|
+
|
|
579
|
+
test("ipv4", () => {
|
|
580
|
+
const aot = compile(z.ipv4());
|
|
581
|
+
expect(valid(aot, "192.168.1.1")).toBe("192.168.1.1");
|
|
582
|
+
expect(valid(aot, "0.0.0.0")).toBe("0.0.0.0");
|
|
583
|
+
expect(valid(aot, "255.255.255.255")).toBe("255.255.255.255");
|
|
584
|
+
invalid(aot, "192.168.1");
|
|
585
|
+
invalid(aot, "256.0.0.0");
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
test("matches Zod: string formats", () => {
|
|
589
|
+
expectMatch(z.email(), "test@example.com");
|
|
590
|
+
expectMatch(z.email(), "invalid");
|
|
591
|
+
expectMatch(z.uuid(), "550e8400-e29b-41d4-a716-446655440000");
|
|
592
|
+
expectMatch(z.uuid(), "not-a-uuid");
|
|
593
|
+
// z.url() intentionally throws at compile time (see "url is unsupported").
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
// === Tuple ===
|
|
597
|
+
|
|
598
|
+
test("tuple basic", () => {
|
|
599
|
+
const aot = compile(z.tuple([z.string(), z.number()]));
|
|
600
|
+
expect(valid(aot, ["hello", 42])).toEqual(["hello", 42]);
|
|
601
|
+
invalid(aot, ["hello", "world"]);
|
|
602
|
+
invalid(aot, ["hello"]);
|
|
603
|
+
invalid(aot, ["hello", 42, "extra"]);
|
|
604
|
+
invalid(aot, {});
|
|
605
|
+
});
|
|
606
|
+
|
|
607
|
+
test("tuple with rest", () => {
|
|
608
|
+
const aot = compile(z.tuple([z.string(), z.number()]).rest(z.boolean()));
|
|
609
|
+
expect(valid(aot, ["hello", 42])).toEqual(["hello", 42]);
|
|
610
|
+
expect(valid(aot, ["hello", 42, true])).toEqual(["hello", 42, true]);
|
|
611
|
+
expect(valid(aot, ["hello", 42, true, false])).toEqual(["hello", 42, true, false]);
|
|
612
|
+
invalid(aot, ["hello", 42, "extra"]);
|
|
613
|
+
invalid(aot, ["hello"]);
|
|
614
|
+
});
|
|
615
|
+
|
|
616
|
+
test("tuple empty", () => {
|
|
617
|
+
const aot = compile(z.tuple([]));
|
|
618
|
+
expect(valid(aot, [])).toEqual([]);
|
|
619
|
+
invalid(aot, ["extra"]);
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
test("matches Zod: tuple", () => {
|
|
623
|
+
const schema = z.tuple([z.string(), z.number()]).rest(z.boolean());
|
|
624
|
+
expectMatch(schema, ["hello", 42]);
|
|
625
|
+
expectMatch(schema, ["hello", 42, true, false]);
|
|
626
|
+
expectMatch(schema, ["hello", 42, "not boolean"]);
|
|
627
|
+
expectMatch(schema, ["hello"]);
|
|
628
|
+
});
|
|
629
|
+
|
|
630
|
+
// === Union ===
|
|
631
|
+
|
|
632
|
+
test("union of primitives", () => {
|
|
633
|
+
const aot = compile(z.union([z.string(), z.number()]));
|
|
634
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
635
|
+
expect(valid(aot, 42)).toBe(42);
|
|
636
|
+
invalid(aot, true);
|
|
637
|
+
invalid(aot, null);
|
|
638
|
+
});
|
|
639
|
+
|
|
640
|
+
test("union of literals (Set optimization)", () => {
|
|
641
|
+
const aot = compile(z.union([z.literal("a"), z.literal("b"), z.literal("c")]));
|
|
642
|
+
expect(valid(aot, "a")).toBe("a");
|
|
643
|
+
expect(valid(aot, "b")).toBe("b");
|
|
644
|
+
expect(valid(aot, "c")).toBe("c");
|
|
645
|
+
invalid(aot, "d");
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
test("union single option", () => {
|
|
649
|
+
const aot = compile(z.union([z.string()]));
|
|
650
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
651
|
+
invalid(aot, 42);
|
|
652
|
+
});
|
|
653
|
+
|
|
654
|
+
test("union with objects", () => {
|
|
655
|
+
const aot = compile(
|
|
656
|
+
z.union([
|
|
657
|
+
z.object({ type: z.literal("a"), value: z.string() }),
|
|
658
|
+
z.object({ type: z.literal("b"), value: z.number() }),
|
|
659
|
+
])
|
|
660
|
+
);
|
|
661
|
+
expect(valid(aot, { type: "a", value: "hello" })).toEqual({ type: "a", value: "hello" });
|
|
662
|
+
expect(valid(aot, { type: "b", value: 42 })).toEqual({ type: "b", value: 42 });
|
|
663
|
+
invalid(aot, { type: "a", value: 42 });
|
|
664
|
+
invalid(aot, { type: "c", value: "hello" });
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
test("matches Zod: union", () => {
|
|
668
|
+
const schema = z.union([z.string(), z.number(), z.null()]);
|
|
669
|
+
expectMatch(schema, "hello");
|
|
670
|
+
expectMatch(schema, 42);
|
|
671
|
+
expectMatch(schema, null);
|
|
672
|
+
expectMatch(schema, true);
|
|
673
|
+
expectMatch(schema, undefined);
|
|
674
|
+
});
|
|
675
|
+
|
|
676
|
+
// === Intersection ===
|
|
677
|
+
|
|
678
|
+
test("intersection of objects", () => {
|
|
679
|
+
const aot = compile(z.intersection(z.object({ name: z.string() }), z.object({ age: z.number() })));
|
|
680
|
+
expect(valid(aot, { name: "Alice", age: 30 })).toEqual({ name: "Alice", age: 30 });
|
|
681
|
+
invalid(aot, { name: "Alice" });
|
|
682
|
+
invalid(aot, { age: 30 });
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
test("intersection deep merge", () => {
|
|
686
|
+
const aot = compile(
|
|
687
|
+
z.intersection(z.object({ nested: z.object({ a: z.string() }) }), z.object({ nested: z.object({ b: z.number() }) }))
|
|
688
|
+
);
|
|
689
|
+
expect(valid(aot, { nested: { a: "x", b: 1 } })).toEqual({ nested: { a: "x", b: 1 } });
|
|
690
|
+
});
|
|
691
|
+
|
|
692
|
+
// === Record ===
|
|
693
|
+
|
|
694
|
+
test("record basic", () => {
|
|
695
|
+
const aot = compile(z.record(z.string(), z.number()));
|
|
696
|
+
expect(valid(aot, {})).toEqual({});
|
|
697
|
+
expect(valid(aot, { a: 1, b: 2 })).toEqual({ a: 1, b: 2 });
|
|
698
|
+
invalid(aot, { a: "hello" });
|
|
699
|
+
invalid(aot, null);
|
|
700
|
+
invalid(aot, []);
|
|
701
|
+
});
|
|
702
|
+
|
|
703
|
+
test("record with enum keys", () => {
|
|
704
|
+
// Records with enum/literal keys have exhaustive semantics: every enum value must be present in the input. Compile currently forces fallback for this case (see compile.ts generateRecordCheck), so behavior matches the runtime by delegation.
|
|
705
|
+
const aot = compile(z.record(z.enum(["a", "b"]), z.number()));
|
|
706
|
+
expect(valid(aot, { a: 1, b: 2 })).toEqual({ a: 1, b: 2 });
|
|
707
|
+
invalid(aot, { a: 1 }); // missing required key b
|
|
708
|
+
invalid(aot, { c: 3 }); // unknown key
|
|
709
|
+
});
|
|
710
|
+
|
|
711
|
+
test("matches Zod: record", () => {
|
|
712
|
+
const schema = z.record(z.string(), z.number());
|
|
713
|
+
expectMatch(schema, {});
|
|
714
|
+
expectMatch(schema, { a: 1, b: 2 });
|
|
715
|
+
expectMatch(schema, { a: "hello" });
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
// === Map ===
|
|
719
|
+
|
|
720
|
+
test("map basic", () => {
|
|
721
|
+
const aot = compile(z.map(z.string(), z.number()));
|
|
722
|
+
expect(valid(aot, new Map())).toEqual(new Map());
|
|
723
|
+
expect(
|
|
724
|
+
valid(
|
|
725
|
+
aot,
|
|
726
|
+
new Map([
|
|
727
|
+
["a", 1],
|
|
728
|
+
["b", 2],
|
|
729
|
+
])
|
|
730
|
+
)
|
|
731
|
+
).toEqual(
|
|
732
|
+
new Map([
|
|
733
|
+
["a", 1],
|
|
734
|
+
["b", 2],
|
|
735
|
+
])
|
|
736
|
+
);
|
|
737
|
+
invalid(aot, new Map([["a", "hello"]]));
|
|
738
|
+
invalid(aot, new Map([[1, 1]]));
|
|
739
|
+
invalid(aot, {});
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
test("matches Zod: map", () => {
|
|
743
|
+
const schema = z.map(z.string(), z.number());
|
|
744
|
+
expectMatch(schema, new Map());
|
|
745
|
+
expectMatch(schema, new Map([["a", 1]]));
|
|
746
|
+
expectMatch(schema, new Map([["a", "hello"]]));
|
|
747
|
+
expectMatch(schema, {});
|
|
748
|
+
});
|
|
749
|
+
|
|
750
|
+
// === Set ===
|
|
751
|
+
|
|
752
|
+
test("set basic", () => {
|
|
753
|
+
const aot = compile(z.set(z.number()));
|
|
754
|
+
expect(valid(aot, new Set())).toEqual(new Set());
|
|
755
|
+
expect(valid(aot, new Set([1, 2, 3]))).toEqual(new Set([1, 2, 3]));
|
|
756
|
+
invalid(aot, new Set(["hello"]));
|
|
757
|
+
invalid(aot, []);
|
|
758
|
+
});
|
|
759
|
+
|
|
760
|
+
test("set size checks", () => {
|
|
761
|
+
const aot = compile(z.set(z.number()).min(1).max(3));
|
|
762
|
+
expect(valid(aot, new Set([1]))).toEqual(new Set([1]));
|
|
763
|
+
expect(valid(aot, new Set([1, 2, 3]))).toEqual(new Set([1, 2, 3]));
|
|
764
|
+
invalid(aot, new Set());
|
|
765
|
+
invalid(aot, new Set([1, 2, 3, 4]));
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
test("matches Zod: set", () => {
|
|
769
|
+
const schema = z.set(z.string());
|
|
770
|
+
expectMatch(schema, new Set());
|
|
771
|
+
expectMatch(schema, new Set(["a", "b"]));
|
|
772
|
+
expectMatch(schema, new Set([1, 2]));
|
|
773
|
+
expectMatch(schema, []);
|
|
774
|
+
});
|
|
775
|
+
|
|
776
|
+
// === Template Literal ===
|
|
777
|
+
|
|
778
|
+
test("template literal basic", () => {
|
|
779
|
+
const aot = compile(z.templateLiteral([z.literal("hello"), z.literal("-"), z.literal("world")]));
|
|
780
|
+
expect(valid(aot, "hello-world")).toBe("hello-world");
|
|
781
|
+
invalid(aot, "hello-world!");
|
|
782
|
+
invalid(aot, "helloworld");
|
|
783
|
+
invalid(aot, 123);
|
|
784
|
+
});
|
|
785
|
+
|
|
786
|
+
test("template literal with types", () => {
|
|
787
|
+
const aot = compile(z.templateLiteral(["user-", z.number()]));
|
|
788
|
+
expect(valid(aot, "user-123")).toBe("user-123");
|
|
789
|
+
expect(valid(aot, "user-0")).toBe("user-0");
|
|
790
|
+
invalid(aot, "user-abc");
|
|
791
|
+
invalid(aot, "admin-123");
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
test("matches Zod: template literal", () => {
|
|
795
|
+
const schema = z.templateLiteral(["id-", z.number()]);
|
|
796
|
+
expectMatch(schema, "id-123");
|
|
797
|
+
expectMatch(schema, "id-abc");
|
|
798
|
+
expectMatch(schema, "other-123");
|
|
799
|
+
});
|
|
800
|
+
|
|
801
|
+
// === Lazy ===
|
|
802
|
+
|
|
803
|
+
test("lazy basic", () => {
|
|
804
|
+
const aot = compile(z.lazy(() => z.string()));
|
|
805
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
806
|
+
invalid(aot, 123);
|
|
807
|
+
});
|
|
808
|
+
|
|
809
|
+
test("lazy recursive schemas are refused, and still parse through the runtime", () => {
|
|
810
|
+
interface Node {
|
|
811
|
+
value: string;
|
|
812
|
+
next?: Node | undefined;
|
|
813
|
+
}
|
|
814
|
+
const nodeSchema: z.ZodType<Node> = z.object({
|
|
815
|
+
value: z.string(),
|
|
816
|
+
next: z.lazy(() => nodeSchema).optional(),
|
|
817
|
+
});
|
|
818
|
+
|
|
819
|
+
// A recursive schema is re-entered by a single parse, which is how the runtime memoizer terminates input containing a reference cycle. That state is keyed on the parse context, and the fast path has none, so it declines the schema rather than following the cycle until the stack runs out.
|
|
820
|
+
expect(() => compile(nodeSchema, { strict: true })).toThrow(ZodCompileUnsupportedError);
|
|
821
|
+
|
|
822
|
+
expect(valid(nodeSchema, { value: "a" })).toEqual({ value: "a" });
|
|
823
|
+
expect(valid(nodeSchema, { value: "a", next: { value: "b" } })).toEqual({ value: "a", next: { value: "b" } });
|
|
824
|
+
invalid(nodeSchema, { value: "a", next: { value: 123 } });
|
|
825
|
+
invalid(nodeSchema, { value: 123 });
|
|
826
|
+
|
|
827
|
+
// The case the refusal exists for: cyclic input parses instead of crashing.
|
|
828
|
+
const cyclic: any = { value: "a" };
|
|
829
|
+
cyclic.next = cyclic;
|
|
830
|
+
expect(() => nodeSchema.parse(cyclic)).not.toThrow();
|
|
831
|
+
});
|
|
832
|
+
|
|
833
|
+
test("matches Zod: lazy", () => {
|
|
834
|
+
const schema = z.lazy(() => z.string());
|
|
835
|
+
expectMatch(schema, "hello");
|
|
836
|
+
expectMatch(schema, 123);
|
|
837
|
+
});
|
|
838
|
+
|
|
839
|
+
// === Pipe ===
|
|
840
|
+
|
|
841
|
+
test("pipe without transform", () => {
|
|
842
|
+
// Pipe with both schemas validating the same type
|
|
843
|
+
const aot = compile(z.string().pipe(z.string().min(3)));
|
|
844
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
845
|
+
invalid(aot, "ab");
|
|
846
|
+
invalid(aot, 123);
|
|
847
|
+
});
|
|
848
|
+
|
|
849
|
+
test("matches Zod: pipe without transform", () => {
|
|
850
|
+
const schema = z.string().pipe(z.string().min(3));
|
|
851
|
+
expectMatch(schema, "hello");
|
|
852
|
+
expectMatch(schema, "ab");
|
|
853
|
+
expectMatch(schema, 123);
|
|
854
|
+
});
|
|
855
|
+
|
|
856
|
+
// === Custom / Instanceof ===
|
|
857
|
+
|
|
858
|
+
test("instanceof", () => {
|
|
859
|
+
class MyClass {
|
|
860
|
+
value: number;
|
|
861
|
+
constructor(v: number) {
|
|
862
|
+
this.value = v;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
const aot = compile(z.instanceof(MyClass));
|
|
867
|
+
const instance = new MyClass(1);
|
|
868
|
+
expect(valid(aot, instance)).toBe(instance);
|
|
869
|
+
invalid(aot, { value: 1 });
|
|
870
|
+
invalid(aot, null);
|
|
871
|
+
});
|
|
872
|
+
|
|
873
|
+
test("instanceof Date", () => {
|
|
874
|
+
const aot = compile(z.instanceof(Date));
|
|
875
|
+
const d = new Date();
|
|
876
|
+
expect(valid(aot, d)).toBe(d);
|
|
877
|
+
invalid(aot, "2024-01-01");
|
|
878
|
+
invalid(aot, {});
|
|
879
|
+
});
|
|
880
|
+
|
|
881
|
+
test("matches Zod: instanceof", () => {
|
|
882
|
+
class Test {}
|
|
883
|
+
const schema = z.instanceof(Test);
|
|
884
|
+
expectMatch(schema, new Test());
|
|
885
|
+
expectMatch(schema, {});
|
|
886
|
+
expectMatch(schema, null);
|
|
887
|
+
});
|
|
888
|
+
|
|
889
|
+
// === Bigint Format Checks ===
|
|
890
|
+
|
|
891
|
+
test("bigint int64 format", () => {
|
|
892
|
+
const aot = compile(z.int64());
|
|
893
|
+
expect(valid(aot, 0n)).toBe(0n);
|
|
894
|
+
expect(valid(aot, 9223372036854775807n)).toBe(9223372036854775807n);
|
|
895
|
+
expect(valid(aot, -9223372036854775808n)).toBe(-9223372036854775808n);
|
|
896
|
+
invalid(aot, 9223372036854775808n); // too big
|
|
897
|
+
invalid(aot, -9223372036854775809n); // too small
|
|
898
|
+
});
|
|
899
|
+
|
|
900
|
+
test("bigint uint64 format", () => {
|
|
901
|
+
const aot = compile(z.uint64());
|
|
902
|
+
expect(valid(aot, 0n)).toBe(0n);
|
|
903
|
+
expect(valid(aot, 18446744073709551615n)).toBe(18446744073709551615n);
|
|
904
|
+
invalid(aot, -1n); // negative
|
|
905
|
+
invalid(aot, 18446744073709551616n); // too big
|
|
906
|
+
});
|
|
907
|
+
|
|
908
|
+
test("matches Zod: bigint format", () => {
|
|
909
|
+
const schema = z.int64();
|
|
910
|
+
expectMatch(schema, 0n);
|
|
911
|
+
expectMatch(schema, 9223372036854775807n);
|
|
912
|
+
expectMatch(schema, 9223372036854775808n);
|
|
913
|
+
});
|
|
914
|
+
|
|
915
|
+
// === Nullish (combines optional + nullable) ===
|
|
916
|
+
|
|
917
|
+
test("nullish", () => {
|
|
918
|
+
const aot = compile(z.string().nullish());
|
|
919
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
920
|
+
expect(valid(aot, null)).toBe(null);
|
|
921
|
+
expect(valid(aot, undefined)).toBe(undefined);
|
|
922
|
+
invalid(aot, 123);
|
|
923
|
+
});
|
|
924
|
+
|
|
925
|
+
test("matches Zod: nullish", () => {
|
|
926
|
+
const schema = z.string().nullish();
|
|
927
|
+
expectMatch(schema, "hello");
|
|
928
|
+
expectMatch(schema, null);
|
|
929
|
+
expectMatch(schema, undefined);
|
|
930
|
+
expectMatch(schema, 123);
|
|
931
|
+
});
|
|
932
|
+
|
|
933
|
+
// === Codec (extends pipe with transform) ===
|
|
934
|
+
// Note: Codecs involve transforms, so AOT validates input and executes transforms.
|
|
935
|
+
|
|
936
|
+
test("codec validates and transforms", () => {
|
|
937
|
+
// stringbool is a codec from string to boolean
|
|
938
|
+
const aot = compile(z.stringbool());
|
|
939
|
+
expect(valid(aot, "true")).toBe(true);
|
|
940
|
+
expect(valid(aot, "false")).toBe(false);
|
|
941
|
+
expect(valid(aot, "1")).toBe(true);
|
|
942
|
+
expect(valid(aot, "0")).toBe(false);
|
|
943
|
+
invalid(aot, 123); // Not a string
|
|
944
|
+
invalid(aot, null);
|
|
945
|
+
});
|
|
946
|
+
|
|
947
|
+
// === SuperRefine ===
|
|
948
|
+
|
|
949
|
+
test("superRefine basic", () => {
|
|
950
|
+
const schema = z.string().superRefine((val, ctx) => {
|
|
951
|
+
if (val.length < 3) {
|
|
952
|
+
ctx.addIssue({ code: "custom", message: "Too short" });
|
|
953
|
+
}
|
|
954
|
+
});
|
|
955
|
+
const aot = compile(schema);
|
|
956
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
957
|
+
invalid(aot, "ab");
|
|
958
|
+
invalid(aot, 123);
|
|
959
|
+
});
|
|
960
|
+
|
|
961
|
+
test("superRefine with multiple issues", () => {
|
|
962
|
+
const schema = z.number().superRefine((val, ctx) => {
|
|
963
|
+
if (val < 0) ctx.addIssue({ code: "custom", message: "Must be positive" });
|
|
964
|
+
if (val > 100) ctx.addIssue({ code: "custom", message: "Must be <= 100" });
|
|
965
|
+
});
|
|
966
|
+
const aot = compile(schema);
|
|
967
|
+
expect(valid(aot, 50)).toBe(50);
|
|
968
|
+
invalid(aot, -1);
|
|
969
|
+
invalid(aot, 101);
|
|
970
|
+
});
|
|
971
|
+
|
|
972
|
+
test("matches Zod: superRefine", () => {
|
|
973
|
+
const schema = z.string().superRefine((val, ctx) => {
|
|
974
|
+
if (!val.includes("@")) {
|
|
975
|
+
ctx.addIssue({ code: "custom", message: "Must contain @" });
|
|
976
|
+
}
|
|
977
|
+
});
|
|
978
|
+
expectMatch(schema, "test@example.com");
|
|
979
|
+
expectMatch(schema, "invalid");
|
|
980
|
+
expectMatch(schema, 123);
|
|
981
|
+
});
|
|
982
|
+
|
|
983
|
+
// === Transform ===
|
|
984
|
+
|
|
985
|
+
test("transform basic", () => {
|
|
986
|
+
const schema = z.string().transform((val) => val.toUpperCase());
|
|
987
|
+
const aot = compile(schema);
|
|
988
|
+
expect(valid(aot, "hello")).toBe("HELLO"); // Transform succeeds
|
|
989
|
+
invalid(aot, 123); // Not a string (fails before transform)
|
|
990
|
+
});
|
|
991
|
+
|
|
992
|
+
test("transform with validation", () => {
|
|
993
|
+
const schema = z.string().transform((val, ctx) => {
|
|
994
|
+
if (val.length === 0) {
|
|
995
|
+
ctx.addIssue({ code: "custom", message: "Empty string" });
|
|
996
|
+
return z.NEVER;
|
|
997
|
+
}
|
|
998
|
+
return val.length;
|
|
999
|
+
});
|
|
1000
|
+
const aot = compile(schema);
|
|
1001
|
+
expect(valid(aot, "hello")).toBe(5);
|
|
1002
|
+
invalid(aot, ""); // Transform adds issue
|
|
1003
|
+
});
|
|
1004
|
+
|
|
1005
|
+
test("matches Zod: transform", () => {
|
|
1006
|
+
const schema = z.string().transform((val) => val.length);
|
|
1007
|
+
expectMatch(schema, "hello");
|
|
1008
|
+
expectMatch(schema, 123);
|
|
1009
|
+
});
|
|
1010
|
+
|
|
1011
|
+
// === Overwrite Checks (trim, toLowerCase, toUpperCase) ===
|
|
1012
|
+
|
|
1013
|
+
test("trim", () => {
|
|
1014
|
+
const schema = z.string().trim();
|
|
1015
|
+
const aot = compile(schema);
|
|
1016
|
+
|
|
1017
|
+
// AOT validates the input type and applies trim transform
|
|
1018
|
+
expect(valid(aot, " hello ")).toBe("hello");
|
|
1019
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
1020
|
+
expect(valid(aot, "")).toBe("");
|
|
1021
|
+
invalid(aot, 123);
|
|
1022
|
+
});
|
|
1023
|
+
|
|
1024
|
+
test("toLowerCase", () => {
|
|
1025
|
+
const schema = z.string().toLowerCase();
|
|
1026
|
+
const aot = compile(schema);
|
|
1027
|
+
|
|
1028
|
+
// AOT validates the input type and applies toLowerCase transform
|
|
1029
|
+
expect(valid(aot, "HELLO")).toBe("hello");
|
|
1030
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
1031
|
+
expect(valid(aot, "")).toBe("");
|
|
1032
|
+
invalid(aot, 123);
|
|
1033
|
+
});
|
|
1034
|
+
|
|
1035
|
+
test("toUpperCase", () => {
|
|
1036
|
+
const schema = z.string().toUpperCase();
|
|
1037
|
+
const aot = compile(schema);
|
|
1038
|
+
|
|
1039
|
+
// AOT validates the input type and applies toUpperCase transform
|
|
1040
|
+
expect(valid(aot, "hello")).toBe("HELLO");
|
|
1041
|
+
expect(valid(aot, "HELLO")).toBe("HELLO");
|
|
1042
|
+
expect(valid(aot, "")).toBe("");
|
|
1043
|
+
invalid(aot, 123);
|
|
1044
|
+
});
|
|
1045
|
+
|
|
1046
|
+
test("chained overwrites", () => {
|
|
1047
|
+
const schema = z.string().trim().toLowerCase();
|
|
1048
|
+
const aot = compile(schema);
|
|
1049
|
+
|
|
1050
|
+
// AOT validates the input type and applies transforms in order
|
|
1051
|
+
expect(valid(aot, " HELLO ")).toBe("hello");
|
|
1052
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
1053
|
+
expect(valid(aot, "")).toBe("");
|
|
1054
|
+
invalid(aot, 123);
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
test("overwrite with validation", () => {
|
|
1058
|
+
const schema = z.string().trim().min(3);
|
|
1059
|
+
const aot = compile(schema);
|
|
1060
|
+
|
|
1061
|
+
// After trim, check min length
|
|
1062
|
+
expect(valid(aot, " hello ")).toBe("hello"); // "hello" length 5 >= 3
|
|
1063
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
1064
|
+
invalid(aot, " ab "); // "ab" length 2 < 3
|
|
1065
|
+
expect(valid(aot, "abc")).toBe("abc");
|
|
1066
|
+
invalid(aot, 123);
|
|
1067
|
+
});
|
|
1068
|
+
|
|
1069
|
+
test("matches Zod: trim", () => {
|
|
1070
|
+
const schema = z.string().trim();
|
|
1071
|
+
expectMatch(schema, " hello ");
|
|
1072
|
+
expectMatch(schema, "hello");
|
|
1073
|
+
expectMatch(schema, 123);
|
|
1074
|
+
});
|
|
1075
|
+
|
|
1076
|
+
test("matches Zod: toLowerCase", () => {
|
|
1077
|
+
const schema = z.string().toLowerCase();
|
|
1078
|
+
expectMatch(schema, "HELLO");
|
|
1079
|
+
expectMatch(schema, "hello");
|
|
1080
|
+
expectMatch(schema, 123);
|
|
1081
|
+
});
|
|
1082
|
+
|
|
1083
|
+
test("matches Zod: toUpperCase", () => {
|
|
1084
|
+
const schema = z.string().toUpperCase();
|
|
1085
|
+
expectMatch(schema, "hello");
|
|
1086
|
+
expectMatch(schema, "HELLO");
|
|
1087
|
+
expectMatch(schema, 123);
|
|
1088
|
+
});
|
|
1089
|
+
|
|
1090
|
+
test("matches Zod: chained overwrites", () => {
|
|
1091
|
+
const schema = z.string().trim().toLowerCase();
|
|
1092
|
+
expectMatch(schema, " HELLO ");
|
|
1093
|
+
expectMatch(schema, "hello");
|
|
1094
|
+
expectMatch(schema, 123);
|
|
1095
|
+
});
|
|
1096
|
+
|
|
1097
|
+
test("matches Zod: overwrite with validation", () => {
|
|
1098
|
+
const schema = z.string().trim().min(3);
|
|
1099
|
+
expectMatch(schema, " hello ");
|
|
1100
|
+
expectMatch(schema, " ab ");
|
|
1101
|
+
expectMatch(schema, "abc");
|
|
1102
|
+
expectMatch(schema, 123);
|
|
1103
|
+
});
|
|
1104
|
+
|
|
1105
|
+
// === Regressions tracking main ===
|
|
1106
|
+
|
|
1107
|
+
test("object catchall ignores __proto__ key (#5898)", () => {
|
|
1108
|
+
// Passthrough variant
|
|
1109
|
+
const loose = compile(z.looseObject({ name: z.string() }));
|
|
1110
|
+
const polluted = JSON.parse('{"name":"ok","__proto__":{"polluted":true}}');
|
|
1111
|
+
const out = valid(loose, polluted) as Record<string, unknown>;
|
|
1112
|
+
expect(Object.getPrototypeOf(out)).toBe(Object.prototype);
|
|
1113
|
+
expect((out as { polluted?: unknown }).polluted).toBeUndefined();
|
|
1114
|
+
|
|
1115
|
+
// Schema-typed catchall
|
|
1116
|
+
const typed = compile(z.object({ name: z.string() }).catchall(z.number()));
|
|
1117
|
+
const out2 = valid(typed, JSON.parse('{"name":"ok","extra":1}')) as Record<string, unknown>;
|
|
1118
|
+
expect(Object.getPrototypeOf(out2)).toBe(Object.prototype);
|
|
1119
|
+
});
|
|
1120
|
+
|
|
1121
|
+
test("multipleOf with sub-integer step uses float tolerance (#5793)", () => {
|
|
1122
|
+
const aot = compile(z.number().multipleOf(1e-7));
|
|
1123
|
+
expect(valid(aot, 0)).toBe(0);
|
|
1124
|
+
expect(valid(aot, 1e-7)).toBe(1e-7);
|
|
1125
|
+
expect(valid(aot, 3e-7)).toBe(3e-7);
|
|
1126
|
+
invalid(aot, 2.5e-7);
|
|
1127
|
+
invalid(aot, 1.5e-7);
|
|
1128
|
+
});
|
|
1129
|
+
|
|
1130
|
+
test("tuple with trailing optionals accepts short input (#5661)", () => {
|
|
1131
|
+
const schema = z.tuple([z.string(), z.number().optional()]);
|
|
1132
|
+
const aot = compile(schema);
|
|
1133
|
+
expect(valid(aot, ["a"])).toEqual(["a"]);
|
|
1134
|
+
expect(valid(aot, ["a", 1])).toEqual(["a", 1]);
|
|
1135
|
+
invalid(aot, []);
|
|
1136
|
+
invalid(aot, ["a", "b"]);
|
|
1137
|
+
invalid(aot, ["a", 1, "extra"]);
|
|
1138
|
+
});
|
|
1139
|
+
|
|
1140
|
+
test("tuple exactOptional rejects explicit undefined but accepts absence", () => {
|
|
1141
|
+
const aot = compile(z.tuple([z.string().exactOptional()]));
|
|
1142
|
+
expect(valid(aot, [])).toEqual([]);
|
|
1143
|
+
expect(valid(aot, ["x"])).toEqual(["x"]);
|
|
1144
|
+
invalid(aot, [undefined]);
|
|
1145
|
+
invalid(aot, [1]);
|
|
1146
|
+
});
|
|
1147
|
+
|
|
1148
|
+
test("tuple mixed required and exactOptional", () => {
|
|
1149
|
+
const aot = compile(z.tuple([z.number(), z.string().exactOptional(), z.boolean().exactOptional()]));
|
|
1150
|
+
expect(valid(aot, [1])).toEqual([1]);
|
|
1151
|
+
expect(valid(aot, [1, "x"])).toEqual([1, "x"]);
|
|
1152
|
+
expect(valid(aot, [1, "x", true])).toEqual([1, "x", true]);
|
|
1153
|
+
invalid(aot, []);
|
|
1154
|
+
invalid(aot, [1, undefined]);
|
|
1155
|
+
invalid(aot, [1, "x", undefined]);
|
|
1156
|
+
invalid(aot, [1, "x", true, "extra"]);
|
|
1157
|
+
});
|
|
1158
|
+
|
|
1159
|
+
test("tuple optional vs exactOptional differ on explicit undefined", () => {
|
|
1160
|
+
const opt = compile(z.tuple([z.string().optional()]));
|
|
1161
|
+
expect(valid(opt, [])).toEqual([]);
|
|
1162
|
+
expect(valid(opt, [undefined])).toEqual([undefined]);
|
|
1163
|
+
|
|
1164
|
+
const exact = compile(z.tuple([z.string().exactOptional()]));
|
|
1165
|
+
expect(valid(exact, [])).toEqual([]);
|
|
1166
|
+
invalid(exact, [undefined]);
|
|
1167
|
+
});
|
|
1168
|
+
|
|
1169
|
+
test("default() shallow-clones Map/Set/array/object (#5855)", () => {
|
|
1170
|
+
const mapSchema = z.map(z.string(), z.number()).default(new Map([["a", 1]]));
|
|
1171
|
+
const mapFn = compile(mapSchema);
|
|
1172
|
+
const m1 = valid(mapFn, undefined) as Map<string, number>;
|
|
1173
|
+
const m2 = valid(mapFn, undefined) as Map<string, number>;
|
|
1174
|
+
expect(m1).not.toBe(m2);
|
|
1175
|
+
m1.set("b", 2);
|
|
1176
|
+
expect(m2.has("b")).toBe(false);
|
|
1177
|
+
|
|
1178
|
+
const setSchema = z.set(z.string()).default(new Set(["x"]));
|
|
1179
|
+
const setFn = compile(setSchema);
|
|
1180
|
+
const s1 = valid(setFn, undefined) as Set<string>;
|
|
1181
|
+
const s2 = valid(setFn, undefined) as Set<string>;
|
|
1182
|
+
expect(s1).not.toBe(s2);
|
|
1183
|
+
});
|
|
1184
|
+
|
|
1185
|
+
test("multi-value literal accepts each value", () => {
|
|
1186
|
+
const aot = compile(z.literal(["a", "b", 1]));
|
|
1187
|
+
expect(valid(aot, "a")).toBe("a");
|
|
1188
|
+
expect(valid(aot, "b")).toBe("b");
|
|
1189
|
+
expect(valid(aot, 1)).toBe(1);
|
|
1190
|
+
invalid(aot, "c");
|
|
1191
|
+
invalid(aot, 2);
|
|
1192
|
+
});
|
|
1193
|
+
|
|
1194
|
+
// === Phase 1: schema-clone + fallback contract ===
|
|
1195
|
+
|
|
1196
|
+
test("compile returns a fresh clone; original schema is untouched", () => {
|
|
1197
|
+
const original = z.object({ name: z.string() });
|
|
1198
|
+
const originalRun = original._zod.run;
|
|
1199
|
+
const compiled = compile(original);
|
|
1200
|
+
expect(compiled).not.toBe(original);
|
|
1201
|
+
expect(original._zod.run).toBe(originalRun);
|
|
1202
|
+
expect(compiled._zod.run).not.toBe(originalRun);
|
|
1203
|
+
// shape def is shared by reference; cloning is structural at the top
|
|
1204
|
+
expect(compiled._zod.def).toBe(original._zod.def);
|
|
1205
|
+
});
|
|
1206
|
+
|
|
1207
|
+
test("fallback produces ZodError identical to the original schema", () => {
|
|
1208
|
+
const schema = z.object({ name: z.string(), age: z.number().min(0) });
|
|
1209
|
+
const compiled = compile(schema);
|
|
1210
|
+
const cases: unknown[] = [
|
|
1211
|
+
{ name: 123, age: 30 },
|
|
1212
|
+
{ name: "ok", age: -5 },
|
|
1213
|
+
{ name: "ok", age: "thirty" },
|
|
1214
|
+
null,
|
|
1215
|
+
[],
|
|
1216
|
+
{ name: "ok" },
|
|
1217
|
+
];
|
|
1218
|
+
for (const value of cases) {
|
|
1219
|
+
const a = schema.safeParse(value);
|
|
1220
|
+
const b = compiled.safeParse(value);
|
|
1221
|
+
expect(b.success).toBe(a.success);
|
|
1222
|
+
if (!a.success && !b.success) {
|
|
1223
|
+
expect(b.error.issues).toEqual(a.error.issues);
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
});
|
|
1227
|
+
|
|
1228
|
+
test("fallback preserves instanceof class name in error message", () => {
|
|
1229
|
+
class User {}
|
|
1230
|
+
const schema = z.instanceof(User);
|
|
1231
|
+
const compiled = compile(schema);
|
|
1232
|
+
expect(compiled.safeParse(new User()).success).toBe(true);
|
|
1233
|
+
const bad = compiled.safeParse({});
|
|
1234
|
+
expect(bad.success).toBe(false);
|
|
1235
|
+
if (!bad.success) {
|
|
1236
|
+
// The error must come from the original schema's runtime, which captured `inst` referring to the original. Class name surfaces in the message.
|
|
1237
|
+
expect(bad.error.issues[0]?.message).toMatch(/User/);
|
|
1238
|
+
}
|
|
1239
|
+
});
|
|
1240
|
+
|
|
1241
|
+
test("compile bypasses fast path for backward direction (codec encode)", () => {
|
|
1242
|
+
const codec = z.stringbool();
|
|
1243
|
+
const compiled = compile(codec);
|
|
1244
|
+
expect(compiled.safeParse("true").data).toBe(true);
|
|
1245
|
+
expect(compiled.safeParse("false").data).toBe(false);
|
|
1246
|
+
expect(compiled.encode(true)).toBe("true");
|
|
1247
|
+
expect(compiled.encode(false)).toBe("false");
|
|
1248
|
+
});
|
|
1249
|
+
|
|
1250
|
+
test("compile bypasses fast path for safeParseAsync", async () => {
|
|
1251
|
+
const schema = z.string().min(3);
|
|
1252
|
+
const compiled = compile(schema);
|
|
1253
|
+
const r = await compiled.safeParseAsync("ok");
|
|
1254
|
+
expect(r.success).toBe(false);
|
|
1255
|
+
const ok = await compiled.safeParseAsync("hello");
|
|
1256
|
+
expect(ok.success).toBe(true);
|
|
1257
|
+
});
|
|
1258
|
+
|
|
1259
|
+
test("ZodCompileAsyncError thrown on async refinement", () => {
|
|
1260
|
+
const schema = z.string().refine(async () => true);
|
|
1261
|
+
expect(() => compile(schema, { strict: true })).toThrow(ZodCompileAsyncError);
|
|
1262
|
+
});
|
|
1263
|
+
|
|
1264
|
+
test("ZodCompileAsyncError thrown on async transform", () => {
|
|
1265
|
+
const schema = z.string().transform(async (s) => s.length);
|
|
1266
|
+
expect(() => compile(schema, { strict: true })).toThrow(ZodCompileAsyncError);
|
|
1267
|
+
});
|
|
1268
|
+
|
|
1269
|
+
test("compiled clone is composable inside another schema", () => {
|
|
1270
|
+
const inner = z.object({ name: z.string() });
|
|
1271
|
+
const compiledInner = compile(inner);
|
|
1272
|
+
const outer = z.object({ user: compiledInner, count: z.number() });
|
|
1273
|
+
const r = outer.safeParse({ user: { name: "ok" }, count: 1 });
|
|
1274
|
+
expect(r.success).toBe(true);
|
|
1275
|
+
if (r.success) expect(r.data).toEqual({ user: { name: "ok" }, count: 1 });
|
|
1276
|
+
const bad = outer.safeParse({ user: { name: 1 }, count: 1 });
|
|
1277
|
+
expect(bad.success).toBe(false);
|
|
1278
|
+
});
|
|
1279
|
+
|
|
1280
|
+
// === catch ===
|
|
1281
|
+
|
|
1282
|
+
test("catch over primitive", () => {
|
|
1283
|
+
const aot = compile(z.catch(z.string(), "fallback"));
|
|
1284
|
+
expect(valid(aot, "hello")).toBe("hello");
|
|
1285
|
+
expect(valid(aot, 123)).toBe("fallback");
|
|
1286
|
+
expect(valid(aot, undefined)).toBe("fallback");
|
|
1287
|
+
});
|
|
1288
|
+
|
|
1289
|
+
test("catch as object property", () => {
|
|
1290
|
+
const aot = compile(z.object({ name: z.catch(z.string(), "anon") }));
|
|
1291
|
+
expect(valid(aot, { name: "Alice" })).toEqual({ name: "Alice" });
|
|
1292
|
+
expect(valid(aot, { name: 123 })).toEqual({ name: "anon" });
|
|
1293
|
+
expect(valid(aot, {})).toEqual({ name: "anon" });
|
|
1294
|
+
});
|
|
1295
|
+
|
|
1296
|
+
test("a catch callback reading ctx is refused; a constant catch compiles", () => {
|
|
1297
|
+
// Finalizing the issues the callback sees depends on the caller's per-parse error map, which generated code never receives — the compiled path produced the default message where `.parse(input, { error })` produces the mapped one. Refuse it, so a union treats it as uncompilable rather than as a rejected branch.
|
|
1298
|
+
const reads = z.catch(z.string().min(5), (ctx) => `bad:${ctx.error.issues.length}`);
|
|
1299
|
+
expect(() => compile(reads, { strict: true })).toThrow(ZodCompileUnsupportedError);
|
|
1300
|
+
expect(reads.parse("hi")).toBe("bad:1");
|
|
1301
|
+
expect(reads.parse(42 as never)).toMatch(/^bad:\d+$/);
|
|
1302
|
+
|
|
1303
|
+
// A constant catch value needs no issues at all, so it keeps the fast path.
|
|
1304
|
+
const constant = compile(z.catch(z.string().min(5), "fb"));
|
|
1305
|
+
expect(valid(constant, "hello world")).toBe("hello world");
|
|
1306
|
+
expect(valid(constant, "hi")).toBe("fb");
|
|
1307
|
+
expect(valid(constant, 42)).toBe("fb");
|
|
1308
|
+
});
|
|
1309
|
+
|
|
1310
|
+
test("catch falls through unsupported inner via runtime island", () => {
|
|
1311
|
+
// Async refine in the inner makes the inner uncompilable, but catch should still compile by treating the whole catch as a runtime island.
|
|
1312
|
+
const aot = compile(z.catch(z.union([z.string(), z.number()]), "fb"));
|
|
1313
|
+
expect(valid(aot, "x")).toBe("x");
|
|
1314
|
+
expect(valid(aot, 1)).toBe(1);
|
|
1315
|
+
expect(valid(aot, true)).toBe("fb");
|
|
1316
|
+
});
|
|
1317
|
+
|
|
1318
|
+
// === IPv6 / CIDRv6 hoisted helpers ===
|
|
1319
|
+
|
|
1320
|
+
test("ipv6 compiled rejects regex-passing but URL-rejecting values", () => {
|
|
1321
|
+
const aot = compile(z.ipv6());
|
|
1322
|
+
expect(valid(aot, "::1")).toBe("::1");
|
|
1323
|
+
expect(valid(aot, "2001:db8::1")).toBe("2001:db8::1");
|
|
1324
|
+
// "0:0:0:0:0:0:0:1:1" matches the IPv6 regex but `new URL` rejects it.
|
|
1325
|
+
invalid(aot, "0:0:0:0:0:0:0:1:1");
|
|
1326
|
+
// Differential: confirm runtime and compiled agree on this fixture.
|
|
1327
|
+
expectMatch(z.ipv6(), "0:0:0:0:0:0:0:1:1");
|
|
1328
|
+
});
|
|
1329
|
+
|
|
1330
|
+
test("cidrv6 compiled validates prefix range and address", () => {
|
|
1331
|
+
const aot = compile(z.cidrv6());
|
|
1332
|
+
expect(valid(aot, "::1/128")).toBe("::1/128");
|
|
1333
|
+
invalid(aot, "::1/129");
|
|
1334
|
+
invalid(aot, "::1/-1");
|
|
1335
|
+
invalid(aot, "not-an-address/64");
|
|
1336
|
+
invalid(aot, "::1");
|
|
1337
|
+
expectMatch(z.cidrv6(), "::1/129");
|
|
1338
|
+
});
|
|
1339
|
+
|
|
1340
|
+
// === Runtime islands ===
|
|
1341
|
+
|
|
1342
|
+
test("runtime island falls through unsupported child inside object", () => {
|
|
1343
|
+
// z.xor (exclusive union) currently throws ZodCompileUnsupportedError. As an object property, the island should let the rest of the object compile.
|
|
1344
|
+
const aot = compile(
|
|
1345
|
+
z.object({
|
|
1346
|
+
label: z.string(),
|
|
1347
|
+
payload: z.xor([z.string(), z.number()]),
|
|
1348
|
+
})
|
|
1349
|
+
);
|
|
1350
|
+
expect(valid(aot, { label: "ok", payload: "x" })).toEqual({ label: "ok", payload: "x" });
|
|
1351
|
+
invalid(aot, { label: "ok", payload: true });
|
|
1352
|
+
invalid(aot, { label: 1, payload: "x" });
|
|
1353
|
+
});
|
|
1354
|
+
|
|
1355
|
+
test("runtime island inside array element", () => {
|
|
1356
|
+
const aot = compile(z.array(z.xor([z.string(), z.number()])));
|
|
1357
|
+
expect(valid(aot, ["a", 1, "b"])).toEqual(["a", 1, "b"]);
|
|
1358
|
+
invalid(aot, ["a", true]);
|
|
1359
|
+
});
|
|
1360
|
+
|
|
1361
|
+
test("an island thrown from inside an indented block leaves the indent level alone", () => {
|
|
1362
|
+
// nullable opens an indented block, coerce throws inside it, and the property islands the pair — two of them so a leak compounds
|
|
1363
|
+
const schema = z.object({ a: z.coerce.number().nullable(), b: z.coerce.number().nullable(), tail: z.string() });
|
|
1364
|
+
expect(compileFn(schema, { debug: true }).code).toMatchInlineSnapshot(`
|
|
1365
|
+
"// Constants: INVALID, c0, c1, c2
|
|
1366
|
+
if (typeof input !== "object" || input === null || Array.isArray(input)) return INVALID;
|
|
1367
|
+
const v0 = input["a"];
|
|
1368
|
+
if (!("a" in input)) return INVALID;
|
|
1369
|
+
const v1 = c1(c0, v0);
|
|
1370
|
+
if (v1 === INVALID) return INVALID;
|
|
1371
|
+
const v2 = input["b"];
|
|
1372
|
+
if (!("b" in input)) return INVALID;
|
|
1373
|
+
const v3 = c1(c2, v2);
|
|
1374
|
+
if (v3 === INVALID) return INVALID;
|
|
1375
|
+
const v4 = input["tail"];
|
|
1376
|
+
if (typeof v4 !== "string") return INVALID;
|
|
1377
|
+
const v5 = { "a": v1, "b": v3, "tail": v4 };
|
|
1378
|
+
return v5;"
|
|
1379
|
+
`);
|
|
1380
|
+
expectMatch(schema, { a: "1", b: null, tail: "x" });
|
|
1381
|
+
expectMatch(schema, { a: "nope", b: null, tail: "x" });
|
|
1382
|
+
});
|
|
1383
|
+
|
|
1384
|
+
test("url string-format check never assigns to its accessor", () => {
|
|
1385
|
+
// const accessor (array element): previously emitted `elem = normalized`,
|
|
1386
|
+
// a TypeError on valid input.
|
|
1387
|
+
const arr = compile(z.array(z.string().url()));
|
|
1388
|
+
expect(valid(arr, ["https://example.com"])).toEqual(["https://example.com"]);
|
|
1389
|
+
invalid(arr, ["not a url"]);
|
|
1390
|
+
|
|
1391
|
+
// property accessor: previously wrote the normalized value back into the caller's input object.
|
|
1392
|
+
const padded = " https://example.com ";
|
|
1393
|
+
const input = { u: padded };
|
|
1394
|
+
expectMatch(z.object({ u: z.string().url() }), input);
|
|
1395
|
+
expect(input.u).toBe(padded);
|
|
1396
|
+
});
|
|
1397
|
+
|
|
1398
|
+
test("lazy schemas with checked or defaulted descendants parse without crashing", () => {
|
|
1399
|
+
// Inner runtime run must receive a ctx — checks read ctx.skipChecks, default/transform read ctx.direction.
|
|
1400
|
+
const aot = compile(z.lazy(() => z.string().min(2)));
|
|
1401
|
+
expect(valid(aot, "abc")).toEqual("abc");
|
|
1402
|
+
invalid(aot, "a");
|
|
1403
|
+
|
|
1404
|
+
// Recursive, so the fast path declines it; the runtime still parses it.
|
|
1405
|
+
const tree: z.ZodType = z.lazy(() => z.object({ v: z.number().int(), kids: z.array(tree).default([]) }));
|
|
1406
|
+
expect(() => compile(tree, { strict: true })).toThrow(ZodCompileUnsupportedError);
|
|
1407
|
+
expect(valid(tree, { v: 1, kids: [{ v: 2 }] })).toEqual({ v: 1, kids: [{ v: 2, kids: [] }] });
|
|
1408
|
+
invalid(tree, { v: 1.5 });
|
|
1409
|
+
});
|
|
1410
|
+
|
|
1411
|
+
test("sync refine returning a Promise rejects like the runtime", () => {
|
|
1412
|
+
const schema = z.string().refine((() => Promise.resolve(true)) as unknown as (v: string) => boolean);
|
|
1413
|
+
const aot = compile(schema);
|
|
1414
|
+
let runtimeErr: string | undefined;
|
|
1415
|
+
let compiledErr: string | undefined;
|
|
1416
|
+
try {
|
|
1417
|
+
schema.parse("x");
|
|
1418
|
+
} catch (e) {
|
|
1419
|
+
runtimeErr = (e as Error).name;
|
|
1420
|
+
}
|
|
1421
|
+
try {
|
|
1422
|
+
aot.parse("x");
|
|
1423
|
+
} catch (e) {
|
|
1424
|
+
compiledErr = (e as Error).name;
|
|
1425
|
+
}
|
|
1426
|
+
expect(runtimeErr).toBeDefined();
|
|
1427
|
+
expect(compiledErr).toBe(runtimeErr);
|
|
1428
|
+
});
|
|
1429
|
+
|
|
1430
|
+
test("literal-union Set optimization respects checks and multi-value literals", () => {
|
|
1431
|
+
const withCheck = z.union([z.literal("a").refine(() => false), z.literal("b")]);
|
|
1432
|
+
expectMatch(withCheck, "a"); // runtime rejects via refine; compiled must too
|
|
1433
|
+
expectMatch(withCheck, "b");
|
|
1434
|
+
|
|
1435
|
+
const multi = z.union([z.literal(["a", "b"]), z.literal("c")]);
|
|
1436
|
+
for (const v of ["a", "b", "c", "d"]) expectMatch(multi, v);
|
|
1437
|
+
});
|
|
1438
|
+
|
|
1439
|
+
test("xor and custom when-gated checks force runtime fallback", () => {
|
|
1440
|
+
expect(() => compile(z.xor([z.string(), z.number()]), { strict: true })).toThrow(ZodCompileUnsupportedError);
|
|
1441
|
+
// Multi-match must reject — verified through the object island.
|
|
1442
|
+
expectMatch(z.object({ v: z.xor([z.number(), z.number().int()]) }), { v: 2 });
|
|
1443
|
+
expectMatch(z.object({ v: z.xor([z.number(), z.number().int()]) }), { v: 1.5 });
|
|
1444
|
+
|
|
1445
|
+
const gated = z.number().gt(5);
|
|
1446
|
+
(gated._zod.def.checks![0]!._zod.def as { when?: unknown }).when = () => false;
|
|
1447
|
+
expect(() => compile(gated, { strict: true })).toThrow(ZodCompileUnsupportedError);
|
|
1448
|
+
expectMatch(z.object({ n: gated }), { n: 3 }); // runtime skips the gated check
|
|
1449
|
+
});
|
|
1450
|
+
|
|
1451
|
+
test("compiled parse surfaces the interpreter's throws through the fallback", () => {
|
|
1452
|
+
// an unmergeable intersection bails to INVALID, and the fallback it hands to raises the interpreter's own error
|
|
1453
|
+
const unmergeable = compile(
|
|
1454
|
+
z.intersection(
|
|
1455
|
+
z.number(),
|
|
1456
|
+
z.number().transform((x) => x + 1)
|
|
1457
|
+
),
|
|
1458
|
+
{ strict: true }
|
|
1459
|
+
);
|
|
1460
|
+
expect(() => unmergeable.parse(1234)).toThrowErrorMatchingInlineSnapshot(
|
|
1461
|
+
`[Error: Unmergable intersection. Error path: []]`
|
|
1462
|
+
);
|
|
1463
|
+
|
|
1464
|
+
// a when-gated check islands at codegen, and the island's INVALID for an async run reaches the same fallback
|
|
1465
|
+
const gated = z.number().refine(() => Promise.resolve(true));
|
|
1466
|
+
(gated._zod.def.checks![0]!._zod.def as { when?: unknown }).when = () => true;
|
|
1467
|
+
const compiled = compile(z.object({ n: gated }), { strict: true });
|
|
1468
|
+
expect(() => compiled.parse({ n: 3 })).toThrow($ZodAsyncError);
|
|
1469
|
+
});
|
|
1470
|
+
|
|
1471
|
+
test("strict objects reject inherited enumerable keys like the runtime", () => {
|
|
1472
|
+
const schema = z.strictObject({ a: z.string() });
|
|
1473
|
+
expectMatch(schema, Object.assign(Object.create({ extra: 1 }), { a: "x" }));
|
|
1474
|
+
expectMatch(schema, { a: "x" });
|
|
1475
|
+
// Own __proto__ keys are skipped by the runtime, not unrecognized.
|
|
1476
|
+
expectMatch(schema, JSON.parse('{"a":"x","__proto__":{"polluted":true}}'));
|
|
1477
|
+
|
|
1478
|
+
const withOptional = z.strictObject({ a: z.string(), b: z.string().optional() });
|
|
1479
|
+
expectMatch(withOptional, Object.assign(Object.create({ extra: 1 }), { a: "x" }));
|
|
1480
|
+
expectMatch(withOptional, JSON.parse('{"a":"x","__proto__":{}}'));
|
|
1481
|
+
});
|
|
1482
|
+
|
|
1483
|
+
test("object output parity: key order, undefined keys, inherited keys, getters", () => {
|
|
1484
|
+
// Loose object: shape keys precede unknown keys in the output.
|
|
1485
|
+
const loose = z.looseObject({ a: z.string() });
|
|
1486
|
+
const looseIn = { x: 1, a: "q", y: 2 };
|
|
1487
|
+
expect(Object.keys(compile(loose).parse(looseIn) as object)).toEqual(Object.keys(loose.parse(looseIn)));
|
|
1488
|
+
|
|
1489
|
+
const cat = z.object({ a: z.string() }).catchall(z.number());
|
|
1490
|
+
const catIn = { x: 1, a: "q" };
|
|
1491
|
+
expect(Object.keys(compile(cat).parse(catIn) as object)).toEqual(Object.keys(cat.parse(catIn)));
|
|
1492
|
+
|
|
1493
|
+
// optin-optional/optout-required prop: absent key omitted, explicit undefined preserved (runtime handlePropertyResult rule).
|
|
1494
|
+
const tf = z.object({
|
|
1495
|
+
a: z
|
|
1496
|
+
.string()
|
|
1497
|
+
.optional()
|
|
1498
|
+
.transform((v) => v),
|
|
1499
|
+
});
|
|
1500
|
+
expect("a" in (compile(tf).parse({}) as object)).toBe(false);
|
|
1501
|
+
expect("a" in tf.parse({})).toBe(false);
|
|
1502
|
+
const opt = z.object({ a: z.string().optional() });
|
|
1503
|
+
expect(Object.keys(compile(opt).parse({ a: undefined }) as object)).toEqual(["a"]);
|
|
1504
|
+
|
|
1505
|
+
// Empty-shape loose: inherited enumerable keys included, own __proto__ dropped.
|
|
1506
|
+
const empty = z.looseObject({});
|
|
1507
|
+
const inherited = Object.assign(Object.create({ extra: 1 }), { own: 2 });
|
|
1508
|
+
expect(compile(empty).parse(inherited)).toEqual({ own: 2, extra: 1 });
|
|
1509
|
+
expect(empty.parse(inherited)).toEqual({ own: 2, extra: 1 });
|
|
1510
|
+
const protoIn = JSON.parse('{"__proto__":{"polluted":1},"x":2}');
|
|
1511
|
+
expect(Object.keys(compile(empty).parse(protoIn) as object)).toEqual(Object.keys(empty.parse(protoIn)));
|
|
1512
|
+
|
|
1513
|
+
// Getters are read exactly once, like the runtime.
|
|
1514
|
+
let reads = 0;
|
|
1515
|
+
const getterIn = {
|
|
1516
|
+
get a() {
|
|
1517
|
+
reads++;
|
|
1518
|
+
return "v";
|
|
1519
|
+
},
|
|
1520
|
+
};
|
|
1521
|
+
expect(compile(z.object({ a: z.string().min(1) })).parse(getterIn)).toEqual({ a: "v" });
|
|
1522
|
+
expect(reads).toBe(1);
|
|
1523
|
+
});
|
|
1524
|
+
|
|
1525
|
+
// === Error taxonomy ===
|
|
1526
|
+
|
|
1527
|
+
test("unsupported features throw ZodCompileUnsupportedError, not raw errors", () => {
|
|
1528
|
+
// __proto__ shape key: output object literal would set the prototype.
|
|
1529
|
+
expect(() => compile(z.object({ ["__proto__"]: z.string() }), { strict: true })).toThrow(ZodCompileUnsupportedError);
|
|
1530
|
+
// Exclusive unions need every branch's failure to be a real runtime failure.
|
|
1531
|
+
expect(() => compile(z.xor([z.object({ a: z.string() }), z.object({ b: z.string() })]), { strict: true })).toThrow(
|
|
1532
|
+
ZodCompileUnsupportedError
|
|
1533
|
+
);
|
|
1534
|
+
// NaN comparison bounds can't compile to a faithful comparison.
|
|
1535
|
+
expect(() => compile(z.number().gt(Number.NaN), { strict: true })).toThrow(ZodCompileUnsupportedError);
|
|
1536
|
+
// A zero bigint divisor has no compiled form: `x % 0n` throws.
|
|
1537
|
+
expect(() => compile(z.bigint().multipleOf(BigInt(0)), { strict: true })).toThrow(ZodCompileUnsupportedError);
|
|
1538
|
+
// Unsupported children still island inside containers.
|
|
1539
|
+
const aot = compile(z.object({ a: z.string(), x: z.xor([z.literal("p"), z.literal("q")]) }));
|
|
1540
|
+
expect(valid(aot, { a: "x", x: "p" })).toEqual({ a: "x", x: "p" });
|
|
1541
|
+
invalid(aot, { a: "x", x: "z" });
|
|
1542
|
+
});
|
|
1543
|
+
|
|
1544
|
+
test("record key schemas compile: formats, checks, numbers, transforms", () => {
|
|
1545
|
+
// A string format lives on the def rather than in `checks`, so an email key schema reads as a bare `z.string()` unless the key path looks for it.
|
|
1546
|
+
for (const [schema, inputs] of [
|
|
1547
|
+
[z.record(z.email(), z.number()), [{ "a@b.com": 1 }, { nope: 1 }, {}]],
|
|
1548
|
+
[z.record(z.string().min(2), z.number()), [{ ab: 1 }, { a: 1 }]],
|
|
1549
|
+
[z.record(z.string().regex(/^k_/), z.number()), [{ k_a: 1 }, { x: 1 }]],
|
|
1550
|
+
// Numeric keys arrive stringified; the runtime retries them as numbers.
|
|
1551
|
+
[z.record(z.number(), z.string()), [{ 1: "a" }, { "1.5": "a" }, { x: "a" }]],
|
|
1552
|
+
[z.record(z.templateLiteral(["id_", z.string()]), z.number()), [{ id_a: 1 }, { b: 1 }]],
|
|
1553
|
+
// The key schema picks the output key, not the input key.
|
|
1554
|
+
[
|
|
1555
|
+
z.record(
|
|
1556
|
+
z
|
|
1557
|
+
.string()
|
|
1558
|
+
.min(1)
|
|
1559
|
+
.overwrite((s: string) => s.toUpperCase()),
|
|
1560
|
+
z.number()
|
|
1561
|
+
),
|
|
1562
|
+
[{ ab: 1 }, { "": 1 }],
|
|
1563
|
+
],
|
|
1564
|
+
] as [z.ZodType, unknown[]][]) {
|
|
1565
|
+
for (const input of inputs) expectMatch(schema, input);
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
// Own __proto__ is skipped rather than validated, matching the runtime.
|
|
1569
|
+
expectMatch(z.record(z.email(), z.number()), JSON.parse('{"__proto__":{"p":1},"a@b.com":1}'));
|
|
1570
|
+
|
|
1571
|
+
// Coercion is modelled nowhere, so a coercing key schema is refused outright rather than compiled to the bare type test it would otherwise become.
|
|
1572
|
+
expect(() => compile(z.record(z.coerce.string(), z.number()), { strict: true })).toThrow(ZodCompileUnsupportedError);
|
|
1573
|
+
|
|
1574
|
+
// A loose record keeps a rejected key verbatim, copying its value across unvalidated instead of failing.
|
|
1575
|
+
for (const input of [{ "a@b.com": 1 }, { nope: 1 }, { "a@b.com": 1, nope: "raw" }, { "a@b.com": "bad" }]) {
|
|
1576
|
+
expectMatch(z.looseRecord(z.email(), z.number()), input);
|
|
1577
|
+
}
|
|
1578
|
+
});
|
|
1579
|
+
|
|
1580
|
+
test("date min/max bounds compile with runtime parity", () => {
|
|
1581
|
+
const schema = z.date().min(new Date("2024-01-01")).max(new Date("2025-01-01"));
|
|
1582
|
+
const aot = compile(schema);
|
|
1583
|
+
const inputs = [new Date("2024-06-15"), new Date("2024-01-01"), new Date("2023-12-31"), new Date("2025-01-02")];
|
|
1584
|
+
for (const input of inputs) expectMatch(schema, input);
|
|
1585
|
+
expect(valid(aot, inputs[0])).toEqual(inputs[0]);
|
|
1586
|
+
invalid(aot, inputs[2]);
|
|
1587
|
+
});
|
|
1588
|
+
|
|
1589
|
+
test("the compiled fallback builds the same Error-shaped error as the runtime", () => {
|
|
1590
|
+
const schema = z.object({ a: z.string(), b: z.number() });
|
|
1591
|
+
const aot = compile(schema);
|
|
1592
|
+
|
|
1593
|
+
// both fast closures fall back to the runtime on rejection, so the error is the runtime's
|
|
1594
|
+
const err = aot.safeParse({ a: 1, b: "x" }).error!;
|
|
1595
|
+
expect(err).toBeInstanceOf(Error);
|
|
1596
|
+
expect(err).toBeInstanceOf(z.core.$ZodError);
|
|
1597
|
+
expect(err.issues).toEqual(schema.safeParse({ a: 1, b: "x" }).error!.issues);
|
|
1598
|
+
|
|
1599
|
+
function callSite() {
|
|
1600
|
+
aot.parse({ a: 1, b: "x" });
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
let thrown: unknown;
|
|
1604
|
+
try {
|
|
1605
|
+
callSite();
|
|
1606
|
+
} catch (err) {
|
|
1607
|
+
thrown = err;
|
|
1608
|
+
}
|
|
1609
|
+
expect(thrown).toBeInstanceOf(Error);
|
|
1610
|
+
expect((thrown as Error).stack).toContain("callSite");
|
|
1611
|
+
});
|
|
1612
|
+
|
|
1613
|
+
// === Never throws ===
|
|
1614
|
+
|
|
1615
|
+
// Snapshot a parse outcome structurally, so a refused compile can be shown not to have disturbed it.
|
|
1616
|
+
function snap(schema: z.ZodType, value: unknown) {
|
|
1617
|
+
const r = schema.safeParse(value);
|
|
1618
|
+
return r.success ? { ok: true, data: r.data } : { ok: false, issues: r.error.issues };
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
// Every shape the compiler refuses, with inputs that exercise the pass, fail and fallback branches of each.
|
|
1622
|
+
function refusedCases(): [string, z.ZodType, unknown[]][] {
|
|
1623
|
+
const gated = z.number().gt(5);
|
|
1624
|
+
(gated._zod.def.checks![0]!._zod.def as { when?: unknown }).when = () => false;
|
|
1625
|
+
const tree: z.ZodType = z.lazy(() => z.object({ v: z.number().int(), kids: z.array(tree).default([]) }));
|
|
1626
|
+
|
|
1627
|
+
return [
|
|
1628
|
+
["cycle", tree, [{ v: 1, kids: [{ v: 2 }] }, { v: 1.5 }, "nope"]],
|
|
1629
|
+
["async refine", z.string().refine(async () => true), ["a", 1]],
|
|
1630
|
+
["async transform", z.string().transform(async (s) => s.length), ["a", 1]],
|
|
1631
|
+
["async custom", z.custom(async () => true), ["a"]],
|
|
1632
|
+
["xor", z.xor([z.string(), z.number()]), ["a", 1, true]],
|
|
1633
|
+
["coerce", z.coerce.number(), ["5", 5, Symbol("x")]],
|
|
1634
|
+
["catch callback", z.catch(z.string().min(5), (c) => `bad:${c.error.issues.length}`), ["hello world", "hi", 42]],
|
|
1635
|
+
["when-gated check", gated, [3, 9, "x"]],
|
|
1636
|
+
["__proto__ key", z.object({ ["__proto__"]: z.string() }), [{}, { a: 1 }]],
|
|
1637
|
+
["NaN bound", z.number().gt(Number.NaN), [1, "x"]],
|
|
1638
|
+
["zero bigint divisor", z.bigint().multipleOf(BigInt(0)), [BigInt(4), "x"]],
|
|
1639
|
+
["coercing record key", z.record(z.coerce.string(), z.number()), [{ a: 1 }, { a: "x" }]],
|
|
1640
|
+
];
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
test("compile hands back the original schema instead of throwing", () => {
|
|
1644
|
+
for (const [name, schema] of refusedCases()) {
|
|
1645
|
+
expect(() => compile(schema, { strict: true }), name).toThrow();
|
|
1646
|
+
// No wrapper and no clone: the uncompilable schema is its own fallback, exactly as global mode leaves it.
|
|
1647
|
+
expect(compile(schema), name).toBe(schema);
|
|
1648
|
+
}
|
|
1649
|
+
});
|
|
1650
|
+
|
|
1651
|
+
test("a refused compile leaves the schema parsing identically", () => {
|
|
1652
|
+
for (const [name, schema, inputs] of refusedCases()) {
|
|
1653
|
+
// Async schemas throw $ZodAsyncError out of a sync parse; that path is covered separately.
|
|
1654
|
+
if (name.startsWith("async")) continue;
|
|
1655
|
+
const before = inputs.map((i) => snap(schema, i));
|
|
1656
|
+
compile(schema);
|
|
1657
|
+
expect(
|
|
1658
|
+
inputs.map((i) => snap(schema, i)),
|
|
1659
|
+
name
|
|
1660
|
+
).toEqual(before);
|
|
1661
|
+
}
|
|
1662
|
+
});
|
|
1663
|
+
|
|
1664
|
+
test("a refused compile keeps cyclic input parsing", () => {
|
|
1665
|
+
const nodeSchema: z.ZodType = z.object({ value: z.string(), next: z.lazy(() => nodeSchema).optional() });
|
|
1666
|
+
const cyclic: any = { value: "a" };
|
|
1667
|
+
cyclic.next = cyclic;
|
|
1668
|
+
expect(() => compile(nodeSchema).parse(cyclic)).not.toThrow();
|
|
1669
|
+
});
|
|
1670
|
+
|
|
1671
|
+
test("a refused async compile parses async and rejects sync like the runtime", async () => {
|
|
1672
|
+
const schema = z.string().refine(async (s) => s.length > 1);
|
|
1673
|
+
const aot = compile(schema);
|
|
1674
|
+
expect(aot).toBe(schema);
|
|
1675
|
+
|
|
1676
|
+
await expect(aot.parseAsync("ab")).resolves.toBe("ab");
|
|
1677
|
+
const bad = await aot.safeParseAsync("a");
|
|
1678
|
+
expect(bad.success).toBe(false);
|
|
1679
|
+
expect(bad.error!.issues).toEqual((await schema.safeParseAsync("a")).error!.issues);
|
|
1680
|
+
expect(() => aot.parse("ab")).toThrow(z.core.$ZodAsyncError);
|
|
1681
|
+
});
|
|
1682
|
+
|
|
1683
|
+
test("strict is per-call, so a supported schema compiles either way", () => {
|
|
1684
|
+
const schema = z.object({ a: z.string(), b: z.number() });
|
|
1685
|
+
for (const aot of [compile(schema), compile(schema, { strict: true }), compile(schema, { strict: false })]) {
|
|
1686
|
+
expect(aot).not.toBe(schema);
|
|
1687
|
+
expect(valid(aot, { a: "x", b: 1 })).toEqual({ a: "x", b: 1 });
|
|
1688
|
+
invalid(aot, { a: 1, b: 1 });
|
|
1689
|
+
}
|
|
1690
|
+
});
|
|
1691
|
+
|
|
1692
|
+
test("compiled records walk own enumerable keys without Reflect.ownKeys", () => {
|
|
1693
|
+
// a getOwnPropertyNames snapshot plus a per-key recheck sees the same keys as the runtime's Reflect.ownKeys walk: inherited enumerables are skipped, symbols fail a string key schema but pass a symbol one, and the numeric-string retry still applies
|
|
1694
|
+
const sym = Symbol("s");
|
|
1695
|
+
const bare = compile(z.record(z.string(), z.number()));
|
|
1696
|
+
const inherited = Object.assign(Object.create({ proto: 1 }), { a: 1 });
|
|
1697
|
+
expect(bare.parse(inherited)).toEqual({ a: 1 });
|
|
1698
|
+
const symbolic = { a: 1, [sym]: 2 };
|
|
1699
|
+
expect(bare.safeParse(symbolic).error!.issues).toEqual(
|
|
1700
|
+
z.record(z.string(), z.number()).safeParse(symbolic).error!.issues
|
|
1701
|
+
);
|
|
1702
|
+
expect(bare.safeParse({ a: 1, b: "x" }).error!.issues).toEqual(
|
|
1703
|
+
z.record(z.string(), z.number()).safeParse({ a: 1, b: "x" }).error!.issues
|
|
1704
|
+
);
|
|
1705
|
+
const symKeys = compile(z.record(z.symbol(), z.number()));
|
|
1706
|
+
expect(symKeys.parse({ [sym]: 2 })).toEqual({ [sym]: 2 });
|
|
1707
|
+
expect(symKeys.safeParse({ a: 1 }).success).toBe(false);
|
|
1708
|
+
const emailKeys = compile(z.record(z.email(), z.number()));
|
|
1709
|
+
expect(emailKeys.parse({ "a@b.co": 1 })).toEqual({ "a@b.co": 1 });
|
|
1710
|
+
expect(emailKeys.safeParse({ "a@b.co": 1, [sym]: 2 }).success).toBe(false);
|
|
1711
|
+
expect(compile(z.record(z.number(), z.string())).parse({ 1: "a" })).toEqual({ 1: "a" });
|
|
1712
|
+
// keys are snapshotted before any value is read and rechecked when visited, like the runtime's Reflect.ownKeys walk: a getter that adds a key mid-walk is not visited, one that hides a later key skips it
|
|
1713
|
+
const mutating = (effect: (o: Record<PropertyKey, unknown>) => void) => {
|
|
1714
|
+
const o: Record<PropertyKey, unknown> = {};
|
|
1715
|
+
Object.defineProperty(o, "a", {
|
|
1716
|
+
enumerable: true,
|
|
1717
|
+
get() {
|
|
1718
|
+
effect(o);
|
|
1719
|
+
return 1;
|
|
1720
|
+
},
|
|
1721
|
+
});
|
|
1722
|
+
o.b = 2;
|
|
1723
|
+
return o;
|
|
1724
|
+
};
|
|
1725
|
+
const both = z.record(z.union([z.string(), z.symbol()]), z.number());
|
|
1726
|
+
for (const [schema, effect] of [
|
|
1727
|
+
[
|
|
1728
|
+
both,
|
|
1729
|
+
(o: Record<PropertyKey, unknown>) => {
|
|
1730
|
+
o[sym] = 2;
|
|
1731
|
+
},
|
|
1732
|
+
],
|
|
1733
|
+
[
|
|
1734
|
+
z.record(z.string(), z.number()),
|
|
1735
|
+
(o: Record<PropertyKey, unknown>) => {
|
|
1736
|
+
o[sym] = "bad";
|
|
1737
|
+
},
|
|
1738
|
+
],
|
|
1739
|
+
[
|
|
1740
|
+
z.record(z.string(), z.number()),
|
|
1741
|
+
(o: Record<PropertyKey, unknown>) => {
|
|
1742
|
+
o.z = "bad";
|
|
1743
|
+
},
|
|
1744
|
+
],
|
|
1745
|
+
[
|
|
1746
|
+
z.record(z.string(), z.number()),
|
|
1747
|
+
(o: Record<PropertyKey, unknown>) => Object.defineProperty(o, "b", { enumerable: false }),
|
|
1748
|
+
],
|
|
1749
|
+
] as const) {
|
|
1750
|
+
const expected = schema.safeParse(mutating(effect));
|
|
1751
|
+
const actual = compile(schema).safeParse(mutating(effect));
|
|
1752
|
+
expect(actual.success).toBe(expected.success);
|
|
1753
|
+
if (expected.success)
|
|
1754
|
+
expect(Reflect.ownKeys(actual.data as object)).toEqual(Reflect.ownKeys(expected.data as object));
|
|
1755
|
+
else expect(actual.error!.issues).toEqual(expected.error!.issues);
|
|
1756
|
+
}
|
|
1757
|
+
// a getter that defines an own key under an inherited enumerable name mid-walk: the snapshot predates it, so neither walk visits it, and a union that accepts the record cannot be corrected by a fallback
|
|
1758
|
+
const shadowing = () => {
|
|
1759
|
+
const o = Object.create({ z: 0 });
|
|
1760
|
+
Object.defineProperty(o, "a", {
|
|
1761
|
+
enumerable: true,
|
|
1762
|
+
get() {
|
|
1763
|
+
Object.defineProperty(o, "z", { value: 2, enumerable: true });
|
|
1764
|
+
return 1;
|
|
1765
|
+
},
|
|
1766
|
+
});
|
|
1767
|
+
return o;
|
|
1768
|
+
};
|
|
1769
|
+
const inUnion = z.union([z.record(z.string(), z.number()), z.any()]);
|
|
1770
|
+
expect(compile(inUnion).parse(shadowing())).toStrictEqual(inUnion.parse(shadowing()));
|
|
1771
|
+
expect(compile(inUnion).parse(shadowing())).toStrictEqual({ a: 1 });
|
|
1772
|
+
// a key that is non-enumerable at snapshot time and revealed by an earlier getter is in the snapshot and passes the recheck, like the runtime
|
|
1773
|
+
const revealing = () => {
|
|
1774
|
+
const o: Record<string, unknown> = {};
|
|
1775
|
+
Object.defineProperty(o, "a", {
|
|
1776
|
+
enumerable: true,
|
|
1777
|
+
get() {
|
|
1778
|
+
Object.defineProperty(o, "b", { enumerable: true });
|
|
1779
|
+
return 1;
|
|
1780
|
+
},
|
|
1781
|
+
});
|
|
1782
|
+
Object.defineProperty(o, "b", { value: 2, enumerable: false, configurable: true });
|
|
1783
|
+
return o;
|
|
1784
|
+
};
|
|
1785
|
+
const plain = z.record(z.string(), z.number());
|
|
1786
|
+
expect(compile(plain).parse(revealing())).toStrictEqual(plain.parse(revealing()));
|
|
1787
|
+
expect(compile(plain).parse(revealing())).toStrictEqual({ a: 1, b: 2 });
|
|
1788
|
+
});
|
|
1789
|
+
|
|
1790
|
+
test("validate honors custom checks composed with format traits", () => {
|
|
1791
|
+
const postProcessor = z.core.globalConfig.postProcessor;
|
|
1792
|
+
z.core.globalConfig.postProcessor = undefined;
|
|
1793
|
+
try {
|
|
1794
|
+
const CustomEmail = z.core.$constructor<z.core.$ZodEmail>("CustomEmail", (inst, def) => {
|
|
1795
|
+
inst._zod.check = (payload) => {
|
|
1796
|
+
if (payload.value !== "custom") payload.issues.push({ code: "custom", input: payload.value });
|
|
1797
|
+
};
|
|
1798
|
+
z.core.$ZodEmail.init(inst, def);
|
|
1799
|
+
});
|
|
1800
|
+
const schema = new CustomEmail({ type: "string", format: "email", check: "string_format" });
|
|
1801
|
+
for (const [input, valid] of [
|
|
1802
|
+
["custom", true],
|
|
1803
|
+
["test@example.com", false],
|
|
1804
|
+
[42, false],
|
|
1805
|
+
] as const) {
|
|
1806
|
+
expect(z.safeParse(schema, input).success).toBe(valid);
|
|
1807
|
+
expect(z.validate(schema, input)).toBe(valid);
|
|
1808
|
+
}
|
|
1809
|
+
} finally {
|
|
1810
|
+
z.core.globalConfig.postProcessor = postProcessor;
|
|
1811
|
+
}
|
|
1812
|
+
});
|
|
1813
|
+
|
|
1814
|
+
test("validate honors standalone format checks", () => {
|
|
1815
|
+
const cases = [
|
|
1816
|
+
[z.iso.datetime(), "2021-01-01T00:00:00Z"],
|
|
1817
|
+
[z.iso.date(), "2021-01-01"],
|
|
1818
|
+
[z.iso.time(), "00:00:00"],
|
|
1819
|
+
[z.iso.duration(), "P1Y2M3DT4H5M6S"],
|
|
1820
|
+
[z.email(), "test@example.com"],
|
|
1821
|
+
[z.uuid(), "20354d7a-e4fe-47af-8ff6-187bca92f3f9"],
|
|
1822
|
+
[z.ipv4(), "192.168.0.1"],
|
|
1823
|
+
] as const;
|
|
1824
|
+
|
|
1825
|
+
for (const [schema, valid] of cases) {
|
|
1826
|
+
expect(schema._zod.traits.has("$ZodStringFormat")).toBe(true);
|
|
1827
|
+
expect(schema instanceof z.core.$ZodStringFormat).toBe(true);
|
|
1828
|
+
expect(z.validate(schema, valid)).toBe(true);
|
|
1829
|
+
expect(z.validate(schema, "invalid")).toBe(false);
|
|
1830
|
+
expect(z.validate(schema, 1)).toBe(false);
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
const source = z.email();
|
|
1834
|
+
const refined = source.refine((value) => value.startsWith("x"));
|
|
1835
|
+
const asyncRefined = source.refine(async () => true);
|
|
1836
|
+
const coercedDef = Object.assign(Object.create({ coerce: true }), source._zod.def);
|
|
1837
|
+
const coerced = source.clone(coercedDef);
|
|
1838
|
+
const checkedDef = Object.assign(Object.create({ checks: refined._zod.def.checks }), source._zod.def);
|
|
1839
|
+
const inheritedChecked = source.clone(checkedDef);
|
|
1840
|
+
expect(z.validate(refined, "test@example.com")).toBe(false);
|
|
1841
|
+
expect(z.validate(refined, "x@example.com")).toBe(true);
|
|
1842
|
+
expect(z.validate(inheritedChecked, "test@example.com")).toBe(false);
|
|
1843
|
+
expect(() => z.validate(asyncRefined, "test@example.com")).toThrow($ZodAsyncError);
|
|
1844
|
+
expect(z.validate(coerced, { toString: () => "test@example.com" })).toBe(true);
|
|
1845
|
+
});
|
|
1846
|
+
|
|
1847
|
+
test("runtime validate preserves contexts, getters, errors, and regex state", () => {
|
|
1848
|
+
const postProcessor = z.core.globalConfig.postProcessor;
|
|
1849
|
+
z.core.globalConfig.postProcessor = undefined;
|
|
1850
|
+
try {
|
|
1851
|
+
const source = z.email();
|
|
1852
|
+
expect(z.validate(source, "invalid", { skipChecks: true } as any)).toBe(true);
|
|
1853
|
+
|
|
1854
|
+
let whenReads = 0;
|
|
1855
|
+
const whenProto = Object.defineProperty({}, "when", {
|
|
1856
|
+
enumerable: true,
|
|
1857
|
+
get() {
|
|
1858
|
+
whenReads++;
|
|
1859
|
+
return () => false;
|
|
1860
|
+
},
|
|
1861
|
+
});
|
|
1862
|
+
const whenDef = Object.assign(Object.create(whenProto), source._zod.def);
|
|
1863
|
+
const gated = source.clone(whenDef as typeof source._zod.def);
|
|
1864
|
+
expect(whenReads).toBe(0);
|
|
1865
|
+
expect(z.validate(gated, "invalid")).toBe(true);
|
|
1866
|
+
expect(whenReads).toBeGreaterThan(0);
|
|
1867
|
+
|
|
1868
|
+
let errorReads = 0;
|
|
1869
|
+
const errorDef = Object.defineProperties({}, Object.getOwnPropertyDescriptors(source._zod.def));
|
|
1870
|
+
Object.defineProperty(errorDef, "error", {
|
|
1871
|
+
enumerable: true,
|
|
1872
|
+
get() {
|
|
1873
|
+
errorReads++;
|
|
1874
|
+
return () => "custom";
|
|
1875
|
+
},
|
|
1876
|
+
});
|
|
1877
|
+
const customError = source.clone(errorDef as typeof source._zod.def);
|
|
1878
|
+
expect(z.validate(customError, "invalid")).toBe(false);
|
|
1879
|
+
expect(errorReads).toBe(0);
|
|
1880
|
+
const result = customError.safeParse("invalid");
|
|
1881
|
+
expect(errorReads).toBe(0);
|
|
1882
|
+
if (result.success) expect.unreachable();
|
|
1883
|
+
expect(result.error.issues[0]?.message).toBe("custom");
|
|
1884
|
+
expect(errorReads).toBeGreaterThan(0);
|
|
1885
|
+
|
|
1886
|
+
const pattern = /^a$/g;
|
|
1887
|
+
const cloned = source.clone({ ...source._zod.def, pattern });
|
|
1888
|
+
for (let i = 0; i < 3; i++) expect(z.validate(cloned, "a")).toBe(true);
|
|
1889
|
+
expect(z.validate(cloned, "b")).toBe(false);
|
|
1890
|
+
expect(pattern.lastIndex).toBe(0);
|
|
1891
|
+
const replacement = /^b$/g;
|
|
1892
|
+
cloned._zod.def.pattern = replacement;
|
|
1893
|
+
expect(z.validate(cloned, "a")).toBe(false);
|
|
1894
|
+
expect(z.validate(cloned, "b")).toBe(true);
|
|
1895
|
+
} finally {
|
|
1896
|
+
z.core.globalConfig.postProcessor = postProcessor;
|
|
1897
|
+
}
|
|
1898
|
+
});
|
|
1899
|
+
|
|
1900
|
+
test("validate preserves live pattern accessor reads", () => {
|
|
1901
|
+
const postProcessor = z.core.globalConfig.postProcessor;
|
|
1902
|
+
z.core.globalConfig.postProcessor = undefined;
|
|
1903
|
+
try {
|
|
1904
|
+
const schema = z.email();
|
|
1905
|
+
let reads = 0;
|
|
1906
|
+
Object.defineProperty(schema.def, "pattern", {
|
|
1907
|
+
get: () => (++reads % 2 === 1 ? /^a$/ : /^b$/),
|
|
1908
|
+
});
|
|
1909
|
+
expect(schema.safeParse("b").success).toBe(true);
|
|
1910
|
+
expect(reads).toBe(2);
|
|
1911
|
+
reads = 0;
|
|
1912
|
+
expect(z.validate(schema, "b")).toBe(true);
|
|
1913
|
+
expect(reads).toBe(2);
|
|
1914
|
+
} finally {
|
|
1915
|
+
z.core.globalConfig.postProcessor = postProcessor;
|
|
1916
|
+
}
|
|
1917
|
+
});
|
|
1918
|
+
|
|
1919
|
+
test.each(["when", "coerce"] as const)("runtime validate honors live %s options", (option) => {
|
|
1920
|
+
const postProcessor = z.core.globalConfig.postProcessor;
|
|
1921
|
+
z.core.globalConfig.postProcessor = undefined;
|
|
1922
|
+
try {
|
|
1923
|
+
for (const inherited of [false, true]) {
|
|
1924
|
+
const schema = z.email();
|
|
1925
|
+
const input = option === "when" ? "invalid" : { toString: () => "test@example.com" };
|
|
1926
|
+
expect(z.validate(schema, input)).toBe(false);
|
|
1927
|
+
|
|
1928
|
+
const target = inherited ? Object.create(Object.getPrototypeOf(schema.def)) : schema.def;
|
|
1929
|
+
let reads = 0;
|
|
1930
|
+
Object.defineProperty(target, option, {
|
|
1931
|
+
get() {
|
|
1932
|
+
reads++;
|
|
1933
|
+
return option === "when" ? () => false : true;
|
|
1934
|
+
},
|
|
1935
|
+
});
|
|
1936
|
+
if (inherited) Object.setPrototypeOf(schema.def, target);
|
|
1937
|
+
expect(reads).toBe(0);
|
|
1938
|
+
expect(z.validate(schema, input)).toBe(true);
|
|
1939
|
+
expect(reads).toBeGreaterThan(0);
|
|
1940
|
+
expect(schema.safeParse(input).success).toBe(true);
|
|
1941
|
+
}
|
|
1942
|
+
} finally {
|
|
1943
|
+
z.core.globalConfig.postProcessor = postProcessor;
|
|
1944
|
+
}
|
|
1945
|
+
});
|
|
1946
|
+
|
|
1947
|
+
test("validate uses compiled validators and runtime fallbacks", () => {
|
|
1948
|
+
const compiled = compile(z.email());
|
|
1949
|
+
expect((compiled._zod.bag as { validator?: unknown }).validator).toBeTypeOf("function");
|
|
1950
|
+
expect(z.validate(compiled, "test@example.com")).toBe(true);
|
|
1951
|
+
expect(z.validate(compiled, "invalid")).toBe(false);
|
|
1952
|
+
expect(z.validate(compiled, "invalid", { skipChecks: true } as any)).toBe(true);
|
|
1953
|
+
|
|
1954
|
+
const source = z.email();
|
|
1955
|
+
const installed = withParser(source, () => INVALID);
|
|
1956
|
+
const bag = installed._zod.bag as { fallbackRun: typeof source._zod.run };
|
|
1957
|
+
const originalRun = bag.fallbackRun;
|
|
1958
|
+
let fallbackRuns = 0;
|
|
1959
|
+
bag.fallbackRun = (payload, ctx) => {
|
|
1960
|
+
fallbackRuns++;
|
|
1961
|
+
return originalRun(payload, ctx);
|
|
1962
|
+
};
|
|
1963
|
+
expect(z.validate(installed, "invalid")).toBe(false);
|
|
1964
|
+
expect(fallbackRuns).toBeGreaterThan(0);
|
|
1965
|
+
});
|
|
1966
|
+
|
|
1967
|
+
// withParser: a parser Zod did not generate, installed on the same wrapper compile() uses.
|
|
1968
|
+
|
|
1969
|
+
// tags its output so a test fails loudly if the runtime ran instead of the supplied parser
|
|
1970
|
+
function taggedParser(input: unknown) {
|
|
1971
|
+
if (typeof input !== "object" || input === null) return INVALID;
|
|
1972
|
+
const o = input as Record<string, unknown>;
|
|
1973
|
+
if (typeof o.a !== "string") return INVALID;
|
|
1974
|
+
return { a: o.a, tag: "supplied" };
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
const withParserSchema = z.object({ a: z.string() });
|
|
1978
|
+
|
|
1979
|
+
test("withParser installs the supplied parser", () => {
|
|
1980
|
+
const installed = withParser(withParserSchema, taggedParser);
|
|
1981
|
+
expect(installed.parse({ a: "x" })).toStrictEqual({ a: "x", tag: "supplied" });
|
|
1982
|
+
// the clone is a new schema; the original keeps the runtime
|
|
1983
|
+
expect(installed).not.toBe(withParserSchema);
|
|
1984
|
+
expect(withParserSchema.parse({ a: "x" })).toStrictEqual({ a: "x" });
|
|
1985
|
+
});
|
|
1986
|
+
|
|
1987
|
+
test("withParser hands INVALID to the runtime and gets a real ZodError", () => {
|
|
1988
|
+
const installed = withParser(withParserSchema, taggedParser);
|
|
1989
|
+
const result = installed.safeParse({ a: 1 });
|
|
1990
|
+
expect(result.success).toBe(false);
|
|
1991
|
+
expect(result.error!.issues).toEqual(withParserSchema.safeParse({ a: 1 }).error!.issues);
|
|
1992
|
+
});
|
|
1993
|
+
|
|
1994
|
+
test("withParser answers validate with the supplied parser", () => {
|
|
1995
|
+
const installed = withParser(withParserSchema, taggedParser);
|
|
1996
|
+
expect(z.validate(installed, { a: "x" })).toBe(true);
|
|
1997
|
+
expect(z.validate(installed, { a: 1 })).toBe(false);
|
|
1998
|
+
});
|
|
1999
|
+
|
|
2000
|
+
test("withParser bypasses the fast path on async, like compile()", async () => {
|
|
2001
|
+
const installed = withParser(withParserSchema, taggedParser);
|
|
2002
|
+
// async runs on the runtime, so the tag is absent
|
|
2003
|
+
await expect(installed.parseAsync({ a: "x" })).resolves.toStrictEqual({ a: "x" });
|
|
2004
|
+
});
|
|
2005
|
+
|
|
2006
|
+
test("withParser reaches a parse it does not own the call site of", () => {
|
|
2007
|
+
const installed = withParser(withParserSchema, taggedParser);
|
|
2008
|
+
// installing on _zod.run rather than wrapping a call site is the whole point: a framework holding the schema gets the supplied parser through Standard Schema, and so does z.parse
|
|
2009
|
+
expect((installed["~standard"].validate({ a: "x" }) as { value: unknown }).value).toStrictEqual({
|
|
2010
|
+
a: "x",
|
|
2011
|
+
tag: "supplied",
|
|
2012
|
+
});
|
|
2013
|
+
expect(z.parse(installed, { a: "x" })).toStrictEqual({ a: "x", tag: "supplied" });
|
|
2014
|
+
});
|
|
2015
|
+
|
|
2016
|
+
test("withParser refuses a recursive schema", () => {
|
|
2017
|
+
type Node = { next: Node | null };
|
|
2018
|
+
const Node: z.ZodType<Node> = z.object({ next: z.lazy(() => z.nullable(Node)) });
|
|
2019
|
+
expect(() => withParser(Node, () => INVALID)).toThrow(ZodCompileUnsupportedError);
|
|
2020
|
+
});
|
|
2021
|
+
|
|
2022
|
+
test("withParser leaves encode on the runtime", () => {
|
|
2023
|
+
const codec = z.codec(z.string(), z.number(), {
|
|
2024
|
+
decode: (s) => Number(s),
|
|
2025
|
+
encode: (n) => String(n),
|
|
2026
|
+
});
|
|
2027
|
+
const installed = withParser(codec, () => INVALID);
|
|
2028
|
+
expect(z.encode(installed, 5)).toBe("5");
|
|
2029
|
+
});
|
|
2030
|
+
|
|
2031
|
+
test("withParser rejects a parser whose output contradicts the schema", () => {
|
|
2032
|
+
// the returned schema still claims T, so a parser that succeeds with something else would make parse() lie about its own type
|
|
2033
|
+
// @ts-expect-error a number is not the output of z.string()
|
|
2034
|
+
withParser(z.string(), () => 123);
|
|
2035
|
+
expectTypeOf(withParser(z.string(), () => "ok")).toEqualTypeOf<z.ZodString>();
|
|
2036
|
+
});
|