@openclaw/openshell-sandbox 2026.9.4 → 2026.9.6
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/assets/activity.svg +3 -0
- package/assets/icon.png +0 -0
- package/dist/index.js +49 -75
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +487 -0
- package/node_modules/@openclaw/fs-safe/LICENSE +1 -0
- package/node_modules/@openclaw/fs-safe/README.md +106 -16
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +30 -14
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +13 -3
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +11 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.js +6 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +23 -25
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.js +8 -8
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.js +33 -8
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-input.js +14 -8
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +8 -19
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +8 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +185 -59
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +72 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +86 -22
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +132 -114
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +6 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +100 -42
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +14 -5
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +68 -36
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts +17 -6
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +129 -25
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.js +50 -14
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.js +21 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +7 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +38 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +24 -9
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +3 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +147 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +7 -2
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +67 -18
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +4 -35
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +8 -6
- package/node_modules/@openclaw/fs-safe/dist/archive.js +225 -171
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +3 -2
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.js +0 -6
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +12 -1
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +83 -46
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/byte-view.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-view.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-policy.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +33 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +245 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/copy.js +143 -0
- package/node_modules/@openclaw/fs-safe/dist/create-owned-file.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/create-owned-file.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/create.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/create.js +388 -0
- package/node_modules/@openclaw/fs-safe/dist/creation-boundary.d.ts +60 -0
- package/node_modules/@openclaw/fs-safe/dist/creation-boundary.js +371 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts +2 -3
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +61 -35
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/device-path.js +5 -3
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +7 -8
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +48 -61
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +31 -7
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +136 -39
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +14 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +125 -9
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.js +5 -5
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +123 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +3 -3
- package/node_modules/@openclaw/fs-safe/dist/durability.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +25 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/error-detail.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-cleanup.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/file-cleanup.js +81 -0
- package/node_modules/@openclaw/fs-safe/dist/file-contents.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/file-contents.js +40 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +190 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +9 -3
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +273 -50
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +18 -4
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.js +98 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +54 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +303 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +66 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +395 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +43 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +209 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.js +275 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.js +58 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.js +90 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.d.ts +36 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.js +288 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +199 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts +4 -22
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +226 -234
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock.js +29 -9
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +9 -4
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +69 -81
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +20 -6
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +319 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +74 -73
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +4 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +71 -66
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.js +83 -36
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/fs.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +12 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +227 -33
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +2 -7
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +15 -16
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +68 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/guest.js +424 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/home-dir.js +81 -16
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +9 -7
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/install-path.js +73 -31
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +23 -15
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts +13 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +137 -3
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +8 -2
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +153 -90
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +65 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +93 -261
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-store.js +4 -1
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json.js +90 -110
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +7 -10
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.js +84 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-roots.js +63 -38
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +7 -20
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +100 -37
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-stage.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path.js +120 -64
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +71 -2
- package/node_modules/@openclaw/fs-safe/dist/native-binding.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.js +11 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +1 -7
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +6 -27
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +147 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +194 -38
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +360 -49
- package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.js +209 -0
- package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +23 -9
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +180 -100
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/native.js +9 -4
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +16 -6
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/output.js +28 -12
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +46 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +12 -4
- package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/path-case.js +136 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-policy.js +7 -2
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +104 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/path-segment-route.js +24 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +394 -0
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path.js +40 -7
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +144 -21
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +2 -10
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +106 -83
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions.js +37 -30
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +419 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +205 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.js +70 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +7 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +35 -10
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +4 -17
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +35 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.js +31 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +185 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +68 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +6 -30
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +202 -154
- package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/positional-read.js +36 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +20 -4
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.js +72 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts +53 -0
- package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +358 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +2 -40
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +145 -103
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +56 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +110 -144
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/realpath.js +43 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +127 -201
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +269 -24
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +130 -120
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +36 -42
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +16 -17
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.js +10 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts +1 -3
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +18 -22
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +123 -143
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +4 -4
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +58 -51
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +193 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +29 -0
- package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +186 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +15 -10
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +133 -42
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +225 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +382 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory.js +141 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/root-entries.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +10 -6
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +32 -15
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +86 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +113 -25
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +17 -63
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +803 -590
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +205 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +84 -0
- package/node_modules/@openclaw/fs-safe/dist/root-options.js +18 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-errors.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +10 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +133 -41
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +62 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-observation.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +151 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +14 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +292 -330
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +3 -30
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +89 -174
- package/node_modules/@openclaw/fs-safe/dist/root-public-types.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-public-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +86 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +87 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.js +37 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/root-remove.js +464 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.js +34 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +6 -6
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +116 -51
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +65 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +304 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +11 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +41 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +180 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.js +162 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.js +22 -11
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +85 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +35 -37
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts +2 -4
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +5 -6
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +60 -52
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +13 -28
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts +6 -3
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +31 -3
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +88 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +143 -28
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +6 -4
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +122 -101
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts +34 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +110 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +4 -2
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +215 -57
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +64 -27
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +2 -29
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +298 -192
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.js +60 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.d.ts +42 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.js +113 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +6 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +45 -3
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +10 -6
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +106 -36
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.js +47 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +5 -2
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +228 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.js +55 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts +22 -17
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +47 -32
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +18 -7
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +98 -10
- package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.js +57 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +64 -0
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +41 -4
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +9 -29
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.js +3 -2
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +16 -13
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +120 -19
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +392 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +151 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +42 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +342 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +8 -7
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +156 -73
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +1 -2
- package/node_modules/@openclaw/fs-safe/dist/temp.js +1 -1
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +7 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.js +25 -6
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/trash.js +61 -13
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +5 -2
- package/node_modules/@openclaw/fs-safe/dist/walk.js +47 -47
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +9 -13
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +36 -61
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +122 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +336 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.ps1 +15 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +363 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +108 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +49 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +1 -9
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-queue.js +1 -4
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +123 -7
- package/node_modules/@openclaw/fs-safe/docs/archive.md +227 -42
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +199 -12
- package/node_modules/@openclaw/fs-safe/docs/config.md +7 -2
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +88 -6
- package/node_modules/@openclaw/fs-safe/docs/copy.md +197 -0
- package/node_modules/@openclaw/fs-safe/docs/creation.md +132 -0
- package/node_modules/@openclaw/fs-safe/docs/directory-identity.md +85 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +130 -5
- package/node_modules/@openclaw/fs-safe/docs/entries.md +109 -0
- package/node_modules/@openclaw/fs-safe/docs/errors.md +18 -10
- package/node_modules/@openclaw/fs-safe/docs/file-contents.md +68 -0
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +112 -6
- package/node_modules/@openclaw/fs-safe/docs/filename.md +21 -7
- package/node_modules/@openclaw/fs-safe/docs/guest.md +146 -0
- package/node_modules/@openclaw/fs-safe/docs/in-place-write.md +81 -0
- package/node_modules/@openclaw/fs-safe/docs/index.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/install-path.md +61 -15
- package/node_modules/@openclaw/fs-safe/docs/install.md +69 -10
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +20 -1
- package/node_modules/@openclaw/fs-safe/docs/json.md +16 -4
- package/node_modules/@openclaw/fs-safe/docs/local-roots.md +10 -1
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +15 -6
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +9 -4
- package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +69 -0
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +75 -16
- package/node_modules/@openclaw/fs-safe/docs/native.md +108 -15
- package/node_modules/@openclaw/fs-safe/docs/output.md +61 -7
- package/node_modules/@openclaw/fs-safe/docs/path-case.md +64 -0
- package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +74 -0
- package/node_modules/@openclaw/fs-safe/docs/path-scope.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +204 -0
- package/node_modules/@openclaw/fs-safe/docs/path.md +16 -5
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +106 -20
- package/node_modules/@openclaw/fs-safe/docs/positional-read.md +63 -0
- package/node_modules/@openclaw/fs-safe/docs/private-file-store.md +14 -0
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +51 -2
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/reading.md +16 -3
- package/node_modules/@openclaw/fs-safe/docs/regular-file.md +3 -0
- package/node_modules/@openclaw/fs-safe/docs/root.md +294 -15
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +28 -2
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +28 -16
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +90 -9
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +163 -7
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +16 -6
- package/node_modules/@openclaw/fs-safe/docs/store.md +35 -2
- package/node_modules/@openclaw/fs-safe/docs/temp.md +313 -29
- package/node_modules/@openclaw/fs-safe/docs/test-hooks.md +14 -0
- package/node_modules/@openclaw/fs-safe/docs/timing.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +35 -12
- package/node_modules/@openclaw/fs-safe/docs/walk.md +128 -6
- package/node_modules/@openclaw/fs-safe/docs/writing.md +314 -20
- package/node_modules/@openclaw/fs-safe/package.json +33 -20
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/node_modules/jszip/.github/FUNDING.yml +1 -0
- package/node_modules/jszip/.github/actions/setup/action.yml +23 -0
- package/node_modules/jszip/.github/workflows/benchmark.yml +38 -0
- package/node_modules/jszip/.github/workflows/main.yml +55 -0
- package/node_modules/jszip/CHANGES.md +6 -0
- package/node_modules/jszip/dist/jszip.js +28 -19
- package/node_modules/jszip/dist/jszip.min.js +2 -2
- package/node_modules/jszip/index.d.ts +14 -0
- package/node_modules/jszip/lib/index.js +1 -1
- package/node_modules/jszip/lib/utils.js +26 -17
- package/node_modules/jszip/package.json +2 -2
- package/node_modules/p-limit/index.d.ts +1 -1
- package/node_modules/p-limit/index.js +6 -1
- package/node_modules/p-limit/package.json +1 -1
- package/node_modules/p-limit/readme.md +8 -0
- package/node_modules/zod/README.md +29 -2
- 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 +21 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +20 -8
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +14 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -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 +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- 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 +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- 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 +21 -2
- 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 +67 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -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 +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
- 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 +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +87 -35
- package/node_modules/zod/src/v4/core/checks.ts +119 -146
- package/node_modules/zod/src/v4/core/compile.ts +2313 -0
- package/node_modules/zod/src/v4/core/core.ts +99 -22
- package/node_modules/zod/src/v4/core/doc.ts +17 -9
- package/node_modules/zod/src/v4/core/errors.ts +113 -25
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +164 -50
- package/node_modules/zod/src/v4/core/regexes.ts +42 -15
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +1000 -538
- 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/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -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/polyfill-collision.test.ts +46 -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 +283 -48
- package/node_modules/zod/src/v4/core/util.ts +454 -157
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +5 -0
- package/node_modules/zod/src/v4/locales/az.ts +5 -0
- package/node_modules/zod/src/v4/locales/be.ts +12 -0
- package/node_modules/zod/src/v4/locales/bg.ts +5 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +5 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +5 -0
- package/node_modules/zod/src/v4/locales/da.ts +7 -2
- package/node_modules/zod/src/v4/locales/de.ts +5 -0
- package/node_modules/zod/src/v4/locales/el.ts +3 -0
- package/node_modules/zod/src/v4/locales/en.ts +17 -4
- package/node_modules/zod/src/v4/locales/eo.ts +5 -0
- package/node_modules/zod/src/v4/locales/es.ts +4 -0
- package/node_modules/zod/src/v4/locales/fa.ts +5 -0
- package/node_modules/zod/src/v4/locales/fi.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr.ts +21 -14
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +8 -1
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +4 -0
- package/node_modules/zod/src/v4/locales/hu.ts +5 -0
- package/node_modules/zod/src/v4/locales/hy.ts +11 -0
- package/node_modules/zod/src/v4/locales/id.ts +5 -0
- package/node_modules/zod/src/v4/locales/index.ts +11 -0
- package/node_modules/zod/src/v4/locales/is.ts +5 -0
- package/node_modules/zod/src/v4/locales/it.ts +5 -0
- package/node_modules/zod/src/v4/locales/ja.ts +5 -0
- package/node_modules/zod/src/v4/locales/ka.ts +5 -0
- package/node_modules/zod/src/v4/locales/km.ts +5 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +5 -0
- package/node_modules/zod/src/v4/locales/lt.ts +4 -0
- package/node_modules/zod/src/v4/locales/mk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ms.ts +5 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +5 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +7 -2
- package/node_modules/zod/src/v4/locales/ota.ts +5 -0
- package/node_modules/zod/src/v4/locales/pl.ts +5 -0
- package/node_modules/zod/src/v4/locales/ps.ts +5 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +101 -58
- package/node_modules/zod/src/v4/locales/ro.ts +3 -0
- package/node_modules/zod/src/v4/locales/ru.ts +12 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +5 -0
- package/node_modules/zod/src/v4/locales/sv.ts +7 -2
- package/node_modules/zod/src/v4/locales/ta.ts +5 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +5 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +5 -0
- package/node_modules/zod/src/v4/locales/uk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ur.ts +5 -0
- package/node_modules/zod/src/v4/locales/uz.ts +3 -0
- package/node_modules/zod/src/v4/locales/vi.ts +5 -0
- package/node_modules/zod/src/v4/locales/yo.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +12 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- 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 +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
- package/node_modules/zod/v3/ZodError.cjs +41 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +26 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +21 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- 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 +62 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +51 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
- 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 +21 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +30 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +23 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +591 -426
- package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
- package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
- package/node_modules/zod/v4/classic/schemas.js +564 -424
- package/node_modules/zod/v4/core/api.cjs +66 -24
- package/node_modules/zod/v4/core/api.d.cts +22 -12
- package/node_modules/zod/v4/core/api.d.ts +22 -12
- package/node_modules/zod/v4/core/api.js +44 -24
- package/node_modules/zod/v4/core/checks.cjs +88 -128
- package/node_modules/zod/v4/core/checks.d.cts +29 -13
- package/node_modules/zod/v4/core/checks.d.ts +29 -13
- package/node_modules/zod/v4/core/checks.js +68 -127
- 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 +101 -19
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +83 -20
- package/node_modules/zod/v4/core/doc.cjs +31 -9
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +12 -9
- package/node_modules/zod/v4/core/errors.cjs +126 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +107 -25
- package/node_modules/zod/v4/core/index.cjs +24 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- 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/parse.cjs +148 -46
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +127 -45
- package/node_modules/zod/v4/core/regexes.cjs +54 -17
- package/node_modules/zod/v4/core/regexes.d.cts +5 -0
- package/node_modules/zod/v4/core/regexes.d.ts +5 -0
- package/node_modules/zod/v4/core/regexes.js +32 -15
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +785 -386
- package/node_modules/zod/v4/core/schemas.d.cts +123 -34
- package/node_modules/zod/v4/core/schemas.d.ts +123 -34
- package/node_modules/zod/v4/core/schemas.js +753 -386
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
- package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.js +247 -44
- package/node_modules/zod/v4/core/util.cjs +372 -157
- package/node_modules/zod/v4/core/util.d.cts +79 -1
- package/node_modules/zod/v4/core/util.d.ts +79 -1
- package/node_modules/zod/v4/core/util.js +341 -156
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- 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 +34 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +5 -0
- package/node_modules/zod/v4/locales/ar.js +5 -0
- package/node_modules/zod/v4/locales/az.cjs +5 -0
- package/node_modules/zod/v4/locales/az.js +5 -0
- package/node_modules/zod/v4/locales/be.cjs +12 -0
- package/node_modules/zod/v4/locales/be.js +12 -0
- package/node_modules/zod/v4/locales/bg.cjs +5 -0
- package/node_modules/zod/v4/locales/bg.js +5 -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 +5 -0
- package/node_modules/zod/v4/locales/ca.js +5 -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 +5 -0
- package/node_modules/zod/v4/locales/cs.js +5 -0
- package/node_modules/zod/v4/locales/da.cjs +7 -2
- package/node_modules/zod/v4/locales/da.js +7 -2
- package/node_modules/zod/v4/locales/de.cjs +5 -0
- package/node_modules/zod/v4/locales/de.js +5 -0
- package/node_modules/zod/v4/locales/el.cjs +3 -0
- package/node_modules/zod/v4/locales/el.js +3 -0
- package/node_modules/zod/v4/locales/en.cjs +16 -4
- package/node_modules/zod/v4/locales/en.js +16 -4
- package/node_modules/zod/v4/locales/eo.cjs +5 -0
- package/node_modules/zod/v4/locales/eo.js +5 -0
- package/node_modules/zod/v4/locales/es.cjs +4 -0
- package/node_modules/zod/v4/locales/es.js +4 -0
- package/node_modules/zod/v4/locales/fa.cjs +5 -0
- package/node_modules/zod/v4/locales/fa.js +5 -0
- package/node_modules/zod/v4/locales/fi.cjs +5 -0
- package/node_modules/zod/v4/locales/fi.js +5 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
- package/node_modules/zod/v4/locales/fr-CA.js +5 -0
- package/node_modules/zod/v4/locales/fr.cjs +18 -14
- package/node_modules/zod/v4/locales/fr.js +18 -14
- 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 +7 -0
- package/node_modules/zod/v4/locales/he.js +7 -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 +4 -0
- package/node_modules/zod/v4/locales/hr.js +4 -0
- package/node_modules/zod/v4/locales/hu.cjs +5 -0
- package/node_modules/zod/v4/locales/hu.js +5 -0
- package/node_modules/zod/v4/locales/hy.cjs +11 -0
- package/node_modules/zod/v4/locales/hy.js +11 -0
- package/node_modules/zod/v4/locales/id.cjs +5 -0
- package/node_modules/zod/v4/locales/id.js +5 -0
- package/node_modules/zod/v4/locales/index.cjs +43 -2
- package/node_modules/zod/v4/locales/index.d.cts +11 -0
- package/node_modules/zod/v4/locales/index.d.ts +11 -0
- package/node_modules/zod/v4/locales/index.js +11 -0
- package/node_modules/zod/v4/locales/is.cjs +5 -0
- package/node_modules/zod/v4/locales/is.js +5 -0
- package/node_modules/zod/v4/locales/it.cjs +5 -0
- package/node_modules/zod/v4/locales/it.js +5 -0
- package/node_modules/zod/v4/locales/ja.cjs +5 -0
- package/node_modules/zod/v4/locales/ja.js +5 -0
- package/node_modules/zod/v4/locales/ka.cjs +5 -0
- package/node_modules/zod/v4/locales/ka.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +5 -0
- package/node_modules/zod/v4/locales/km.js +5 -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 +5 -0
- package/node_modules/zod/v4/locales/ko.js +5 -0
- package/node_modules/zod/v4/locales/lt.cjs +4 -0
- package/node_modules/zod/v4/locales/lt.js +4 -0
- package/node_modules/zod/v4/locales/mk.cjs +5 -0
- package/node_modules/zod/v4/locales/mk.js +5 -0
- package/node_modules/zod/v4/locales/ms.cjs +5 -0
- package/node_modules/zod/v4/locales/ms.js +5 -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 +5 -0
- package/node_modules/zod/v4/locales/nl.js +5 -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 +7 -2
- package/node_modules/zod/v4/locales/no.js +7 -2
- package/node_modules/zod/v4/locales/ota.cjs +5 -0
- package/node_modules/zod/v4/locales/ota.js +5 -0
- package/node_modules/zod/v4/locales/pl.cjs +5 -0
- package/node_modules/zod/v4/locales/pl.js +5 -0
- package/node_modules/zod/v4/locales/ps.cjs +5 -0
- package/node_modules/zod/v4/locales/ps.js +5 -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 +89 -55
- package/node_modules/zod/v4/locales/pt.js +89 -55
- package/node_modules/zod/v4/locales/ro.cjs +3 -0
- package/node_modules/zod/v4/locales/ro.js +3 -0
- package/node_modules/zod/v4/locales/ru.cjs +12 -0
- package/node_modules/zod/v4/locales/ru.js +12 -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 +5 -0
- package/node_modules/zod/v4/locales/sl.js +5 -0
- package/node_modules/zod/v4/locales/sv.cjs +7 -2
- package/node_modules/zod/v4/locales/sv.js +7 -2
- package/node_modules/zod/v4/locales/ta.cjs +5 -0
- package/node_modules/zod/v4/locales/ta.js +5 -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 +5 -0
- package/node_modules/zod/v4/locales/th.js +5 -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 +5 -0
- package/node_modules/zod/v4/locales/tr.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +5 -0
- package/node_modules/zod/v4/locales/uk.js +5 -0
- package/node_modules/zod/v4/locales/ur.cjs +5 -0
- package/node_modules/zod/v4/locales/ur.js +5 -0
- package/node_modules/zod/v4/locales/uz.cjs +3 -0
- package/node_modules/zod/v4/locales/uz.js +3 -0
- package/node_modules/zod/v4/locales/vi.cjs +5 -0
- package/node_modules/zod/v4/locales/vi.js +5 -0
- package/node_modules/zod/v4/locales/yo.cjs +5 -0
- package/node_modules/zod/v4/locales/yo.js +5 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-CN.js +5 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-TW.js +5 -0
- package/node_modules/zod/v4/mini/checks.cjs +21 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/coerce.cjs +19 -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 +33 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- 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 +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +22 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +117 -53
- package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
- package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
- package/node_modules/zod/v4/mini/schemas.js +92 -51
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/openclaw.plugin.json +21 -1
- package/package.json +10 -8
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts +0 -20
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-native.js +0 -107
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts +0 -21
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts +0 -22
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.js +0 -38
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts +0 -7
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.js +0 -59
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts +0 -19
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.js +0 -21
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts +0 -2
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.js +0 -8
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts +0 -7
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.js +0 -35
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts.map +0 -1
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts.map +0 -1
- package/node_modules/jszip/.github/workflows/pr.yaml +0 -58
- package/node_modules/jszip/.jekyll-metadata +0 -0
- package/node_modules/jszip/.travis.yml +0 -17
- package/node_modules/jszip/deps.js +0 -37
- package/node_modules/jszip/graph.svg +0 -601
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- /package/node_modules/@openclaw/fs-safe/dist/{archive-options.js → pinned-write-types.js} +0 -0
|
@@ -1,72 +1,27 @@
|
|
|
1
|
+
import type { $ZodBigIntFormats } from "../core/checks.js";
|
|
1
2
|
import * as core from "../core/index.js";
|
|
2
|
-
import { util } from "../core/index.js";
|
|
3
|
+
import { util, type $ZodNumberFormats } from "../core/index.js";
|
|
3
4
|
import * as processors from "../core/json-schema-processors.js";
|
|
5
|
+
import * as regexes from "../core/regexes.js";
|
|
4
6
|
import type { StandardSchemaWithJSONProps } from "../core/standard-schema.js";
|
|
5
7
|
import { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from "../core/to-json-schema.js";
|
|
8
|
+
import en from "../locales/en.js";
|
|
6
9
|
|
|
7
10
|
import * as checks from "./checks.js";
|
|
8
|
-
import * as iso from "./iso.js";
|
|
9
11
|
import * as parse from "./parse.js";
|
|
10
12
|
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// prototype. On first access from an instance the getter allocates
|
|
16
|
-
// `fn.bind(this)` and caches it as an own property on that instance,
|
|
17
|
-
// so detached usage (`const m = schema.optional; m()`) still works
|
|
18
|
-
// and the per-instance allocation only happens for methods actually
|
|
19
|
-
// touched.
|
|
20
|
-
//
|
|
21
|
-
// One install per (prototype, group), memoized by `_installedGroups`.
|
|
22
|
-
const _installedGroups = /* @__PURE__ */ new WeakMap<object, Set<string>>();
|
|
13
|
+
// Register English as the default locale on first ZodType construction. Hooked into the `ZodType` `$constructor` (rather than a top-level `config(en())` in `external.ts`) so bundlers honoring `sideEffects: false` can't tree-shake it out — see #5953, #5725. An explicit `z.config(z.locales.xx())` call wins regardless of order, since this only sets the default when none is present.
|
|
14
|
+
function _ensureDefaultLocale(): void {
|
|
15
|
+
if (!core.globalConfig.localeError) core.config(en());
|
|
16
|
+
}
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
* us to type-check inline method-shorthand bodies against the
|
|
28
|
-
* `ZodType` / `_ZodString` / etc. interface declarations.
|
|
29
|
-
*/
|
|
30
|
-
type _LazyMethodsOf<T> = Partial<{
|
|
31
|
-
[K in keyof T]: T[K] extends (...args: infer A) => infer R ? (this: T, ...args: A) => R : never;
|
|
32
|
-
}>;
|
|
33
|
-
|
|
34
|
-
function _installLazyMethods<T extends object>(inst: T, group: string, methods: _LazyMethodsOf<T>): void {
|
|
35
|
-
const proto = Object.getPrototypeOf(inst);
|
|
36
|
-
let installed = _installedGroups.get(proto);
|
|
37
|
-
if (!installed) {
|
|
38
|
-
installed = new Set();
|
|
39
|
-
_installedGroups.set(proto, installed);
|
|
40
|
-
}
|
|
41
|
-
if (installed.has(group)) return;
|
|
42
|
-
installed.add(group);
|
|
43
|
-
for (const key in methods) {
|
|
44
|
-
const fn = methods[key]!;
|
|
45
|
-
Object.defineProperty(proto, key, {
|
|
46
|
-
configurable: true,
|
|
47
|
-
enumerable: false,
|
|
48
|
-
get(this: any) {
|
|
49
|
-
const bound = fn.bind(this);
|
|
50
|
-
Object.defineProperty(this, key, {
|
|
51
|
-
configurable: true,
|
|
52
|
-
writable: true,
|
|
53
|
-
enumerable: true,
|
|
54
|
-
value: bound,
|
|
55
|
-
});
|
|
56
|
-
return bound;
|
|
57
|
-
},
|
|
58
|
-
set(this: any, v: unknown) {
|
|
59
|
-
Object.defineProperty(this, key, {
|
|
60
|
-
configurable: true,
|
|
61
|
-
writable: true,
|
|
62
|
-
enumerable: true,
|
|
63
|
-
value: v,
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
}
|
|
18
|
+
// the default memoizer is read by the core container init, which runs before `ZodType.init`, so each container calls this first
|
|
19
|
+
function _ensureDefaultMemoizer(): void {
|
|
20
|
+
if (!core.globalConfig.memoizer) core.config({ memoizer: core.memoizer() });
|
|
68
21
|
}
|
|
69
22
|
|
|
23
|
+
// Methods live on each concrete constructor's prototype and materialize per instance on first access, so a schema only pays for what it is asked for.
|
|
24
|
+
|
|
70
25
|
///////////////////////////////////////////
|
|
71
26
|
///////////////////////////////////////////
|
|
72
27
|
//////////// ////////////
|
|
@@ -124,6 +79,8 @@ export interface ZodType<
|
|
|
124
79
|
data: unknown,
|
|
125
80
|
params?: core.ParseContext<core.$ZodIssue>
|
|
126
81
|
) => Promise<parse.ZodSafeParseResult<core.output<this>>>;
|
|
82
|
+
validate(data: unknown, params?: core.ParseContext<core.$ZodIssue>): data is core.input<this>;
|
|
83
|
+
validateAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<boolean>;
|
|
127
84
|
|
|
128
85
|
// encoding/decoding
|
|
129
86
|
encode(data: core.output<this>, params?: core.ParseContext<core.$ZodIssue>): core.input<this>;
|
|
@@ -207,52 +164,24 @@ export interface ZodType<
|
|
|
207
164
|
* ```
|
|
208
165
|
*/
|
|
209
166
|
isNullable(): boolean;
|
|
210
|
-
apply<T>(fn: (schema: this) => T): T;
|
|
167
|
+
apply<T, TArgs extends unknown[] = []>(fn: (schema: this, ...args: TArgs) => T, ...args: TArgs): T;
|
|
211
168
|
}
|
|
212
169
|
|
|
213
170
|
export interface _ZodType<out Internals extends core.$ZodTypeInternals = core.$ZodTypeInternals>
|
|
214
171
|
extends ZodType<any, any, Internals> {}
|
|
215
172
|
|
|
216
|
-
export const ZodType: core.$constructor<ZodType> = /*@__PURE__*/ core.$constructor
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
Object.defineProperty(inst, "_def", { value: def });
|
|
229
|
-
|
|
230
|
-
// Parse-family is intentionally kept as per-instance closures: these are
|
|
231
|
-
// the hot path AND the most-detached methods (`arr.map(schema.parse)`,
|
|
232
|
-
// `const { parse } = schema`, etc.). Eager closures here mean callers pay
|
|
233
|
-
// ~12 closure allocations per schema but get monomorphic call sites and
|
|
234
|
-
// detached usage that "just works".
|
|
235
|
-
inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });
|
|
236
|
-
inst.safeParse = (data, params) => parse.safeParse(inst, data, params);
|
|
237
|
-
inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
238
|
-
inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);
|
|
239
|
-
inst.spa = inst.safeParseAsync;
|
|
240
|
-
inst.encode = (data, params) => parse.encode(inst, data, params);
|
|
241
|
-
inst.decode = (data, params) => parse.decode(inst, data, params);
|
|
242
|
-
inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);
|
|
243
|
-
inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);
|
|
244
|
-
inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);
|
|
245
|
-
inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);
|
|
246
|
-
inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);
|
|
247
|
-
inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);
|
|
248
|
-
|
|
249
|
-
// All builder methods are placed on the internal prototype as lazy-bind
|
|
250
|
-
// getters. On first access per-instance, a bound thunk is allocated and
|
|
251
|
-
// cached as an own property; subsequent accesses skip the getter. This
|
|
252
|
-
// means: no per-instance allocation for unused methods, full
|
|
253
|
-
// detachability preserved (`const m = schema.optional; m()` works), and
|
|
254
|
-
// shared underlying function references across all instances.
|
|
255
|
-
_installLazyMethods(inst, "ZodType", {
|
|
173
|
+
export const ZodType: core.$constructor<ZodType> = /*@__PURE__*/ core.$constructor<ZodType>(
|
|
174
|
+
"ZodType",
|
|
175
|
+
(inst, def) => {
|
|
176
|
+
_ensureDefaultLocale();
|
|
177
|
+
core.$ZodType.init(inst, def);
|
|
178
|
+
|
|
179
|
+
inst.def = def;
|
|
180
|
+
inst.type = def.type;
|
|
181
|
+
|
|
182
|
+
return inst;
|
|
183
|
+
},
|
|
184
|
+
{
|
|
256
185
|
check(...chks) {
|
|
257
186
|
const def = this.def;
|
|
258
187
|
return this.clone(
|
|
@@ -337,10 +266,7 @@ export const ZodType: core.$constructor<ZodType> = /*@__PURE__*/ core.$construct
|
|
|
337
266
|
return cl;
|
|
338
267
|
},
|
|
339
268
|
meta(...args: any[]): any {
|
|
340
|
-
// overloaded: meta() returns the registered metadata, meta(data)
|
|
341
|
-
// returns a clone with `data` registered. The mapped type picks
|
|
342
|
-
// up the second overload, so we accept variadic any-args and
|
|
343
|
-
// return `any` to satisfy both at runtime.
|
|
269
|
+
// overloaded: meta() returns the registered metadata, meta(data) returns a clone with `data` registered. The mapped type picks up the second overload, so we accept variadic any-args and return `any` to satisfy both at runtime.
|
|
344
270
|
if (args.length === 0) return core.globalRegistry.get(this);
|
|
345
271
|
const cl = this.clone();
|
|
346
272
|
core.globalRegistry.add(cl, args[0]);
|
|
@@ -352,18 +278,84 @@ export const ZodType: core.$constructor<ZodType> = /*@__PURE__*/ core.$construct
|
|
|
352
278
|
isNullable() {
|
|
353
279
|
return this.safeParse(null).success;
|
|
354
280
|
},
|
|
355
|
-
apply(fn) {
|
|
356
|
-
return fn(this);
|
|
281
|
+
apply(fn, ...args) {
|
|
282
|
+
return args.length === 0 ? fn(this) : fn(this, ...args);
|
|
357
283
|
},
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
284
|
+
// Overrides core's `~standard` to add `jsonSchema`. Must stay a prototype entry: redefining it per instance demotes instances to dictionary mode.
|
|
285
|
+
get "~standard"(): ZodType["~standard"] {
|
|
286
|
+
return util.hide(this, "~standard", {
|
|
287
|
+
...core.standardProps(this),
|
|
288
|
+
jsonSchema: {
|
|
289
|
+
input: createStandardJSONSchemaMethod(this, "input"),
|
|
290
|
+
output: createStandardJSONSchemaMethod(this, "output"),
|
|
291
|
+
},
|
|
292
|
+
} as ZodType["~standard"]);
|
|
362
293
|
},
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
294
|
+
set "~standard"(value: ZodType["~standard"]) {
|
|
295
|
+
util.own(this, "~standard", value);
|
|
296
|
+
},
|
|
297
|
+
parse: function _parse(data, params) {
|
|
298
|
+
return parse.parse(this, data, params, { callee: _parse });
|
|
299
|
+
},
|
|
300
|
+
parseAsync: async function _parseAsync(data, params) {
|
|
301
|
+
return await parse.parseAsync(this, data, params, { callee: _parseAsync });
|
|
302
|
+
},
|
|
303
|
+
safeParse(data, params) {
|
|
304
|
+
return parse.safeParse(this, data, params);
|
|
305
|
+
},
|
|
306
|
+
async safeParseAsync(data, params) {
|
|
307
|
+
return parse.safeParseAsync(this, data, params);
|
|
308
|
+
},
|
|
309
|
+
// `spa` is an alias: same function object as `safeParseAsync`, as before.
|
|
310
|
+
get spa(): ZodType["safeParseAsync"] {
|
|
311
|
+
return this?.safeParseAsync;
|
|
312
|
+
},
|
|
313
|
+
set spa(value: ZodType["safeParseAsync"]) {
|
|
314
|
+
util.own(this, "spa", value);
|
|
315
|
+
},
|
|
316
|
+
validate(data, params) {
|
|
317
|
+
return parse.validate(this, data, params);
|
|
318
|
+
},
|
|
319
|
+
validateAsync(data, params) {
|
|
320
|
+
return parse.validateAsync(this, data, params);
|
|
321
|
+
},
|
|
322
|
+
encode: function _encode(data, params) {
|
|
323
|
+
return parse.encode(this, data, params, { callee: _encode });
|
|
324
|
+
},
|
|
325
|
+
decode: function _decode(data, params) {
|
|
326
|
+
return parse.decode(this, data, params, { callee: _decode });
|
|
327
|
+
},
|
|
328
|
+
encodeAsync: async function _encodeAsync(data, params) {
|
|
329
|
+
return await parse.encodeAsync(this, data, params, { callee: _encodeAsync });
|
|
330
|
+
},
|
|
331
|
+
decodeAsync: async function _decodeAsync(data, params) {
|
|
332
|
+
return await parse.decodeAsync(this, data, params, { callee: _decodeAsync });
|
|
333
|
+
},
|
|
334
|
+
safeEncode(data, params) {
|
|
335
|
+
return parse.safeEncode(this, data, params);
|
|
336
|
+
},
|
|
337
|
+
safeDecode(data, params) {
|
|
338
|
+
return parse.safeDecode(this, data, params);
|
|
339
|
+
},
|
|
340
|
+
async safeEncodeAsync(data, params) {
|
|
341
|
+
return parse.safeEncodeAsync(this, data, params);
|
|
342
|
+
},
|
|
343
|
+
async safeDecodeAsync(data, params) {
|
|
344
|
+
return parse.safeDecodeAsync(this, data, params);
|
|
345
|
+
},
|
|
346
|
+
toJSONSchema(params) {
|
|
347
|
+
return createToJSONSchemaMethod(this, {})(params);
|
|
348
|
+
},
|
|
349
|
+
// Reads through to the registry on every access, so it must not cache.
|
|
350
|
+
get description(): string | undefined {
|
|
351
|
+
return core.globalRegistry.get(this as unknown as ZodType)?.description;
|
|
352
|
+
},
|
|
353
|
+
// No setter: `schema._def = x` throws, as it did when `_def` was a non-writable own property.
|
|
354
|
+
get _def(): core.$ZodTypeDef {
|
|
355
|
+
return (this as unknown as ZodType)._zod.def;
|
|
356
|
+
},
|
|
357
|
+
}
|
|
358
|
+
);
|
|
367
359
|
|
|
368
360
|
// ZodString
|
|
369
361
|
export interface _ZodString<T extends core.$ZodStringInternals<unknown> = core.$ZodStringInternals<unknown>>
|
|
@@ -393,65 +385,69 @@ export interface _ZodString<T extends core.$ZodStringInternals<unknown> = core.$
|
|
|
393
385
|
}
|
|
394
386
|
|
|
395
387
|
/** @internal */
|
|
396
|
-
export const _ZodString: core.$constructor<_ZodString> = /*@__PURE__*/ core.$constructor
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
const bag = inst._zod.bag;
|
|
403
|
-
inst.format = bag.format ?? null;
|
|
404
|
-
inst.minLength = bag.minimum ?? null;
|
|
405
|
-
inst.maxLength = bag.maximum ?? null;
|
|
388
|
+
export const _ZodString: core.$constructor<_ZodString> = /*@__PURE__*/ core.$constructor<_ZodString>(
|
|
389
|
+
"_ZodString",
|
|
390
|
+
(inst, def) => {
|
|
391
|
+
core.$ZodString.init(inst, def);
|
|
392
|
+
ZodType.init(inst, def);
|
|
406
393
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
startsWith(...args) {
|
|
415
|
-
return this.check((checks.startsWith as any)(...args));
|
|
416
|
-
},
|
|
417
|
-
endsWith(...args) {
|
|
418
|
-
return this.check((checks.endsWith as any)(...args));
|
|
419
|
-
},
|
|
420
|
-
min(...args) {
|
|
421
|
-
return this.check((checks.minLength as any)(...args));
|
|
422
|
-
},
|
|
423
|
-
max(...args) {
|
|
424
|
-
return this.check((checks.maxLength as any)(...args));
|
|
425
|
-
},
|
|
426
|
-
length(...args) {
|
|
427
|
-
return this.check((checks.length as any)(...args));
|
|
428
|
-
},
|
|
429
|
-
nonempty(...args) {
|
|
430
|
-
return this.check((checks.minLength as any)(1, ...args));
|
|
431
|
-
},
|
|
432
|
-
lowercase(params) {
|
|
433
|
-
return this.check(checks.lowercase(params));
|
|
434
|
-
},
|
|
435
|
-
uppercase(params) {
|
|
436
|
-
return this.check(checks.uppercase(params));
|
|
437
|
-
},
|
|
438
|
-
trim() {
|
|
439
|
-
return this.check(checks.trim());
|
|
440
|
-
},
|
|
441
|
-
normalize(...args) {
|
|
442
|
-
return this.check(checks.normalize(...args));
|
|
443
|
-
},
|
|
444
|
-
toLowerCase() {
|
|
445
|
-
return this.check(checks.toLowerCase());
|
|
446
|
-
},
|
|
447
|
-
toUpperCase() {
|
|
448
|
-
return this.check(checks.toUpperCase());
|
|
449
|
-
},
|
|
450
|
-
slugify() {
|
|
451
|
-
return this.check(checks.slugify());
|
|
394
|
+
inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);
|
|
395
|
+
},
|
|
396
|
+
/*@__PURE__*/ util.derived<_ZodString>(
|
|
397
|
+
{
|
|
398
|
+
format: (inst) => processors.aggregateChecks(inst).format ?? null,
|
|
399
|
+
minLength: (inst) => processors.aggregateChecks<number>(inst).minimum ?? null,
|
|
400
|
+
maxLength: (inst) => processors.aggregateChecks<number>(inst).maximum ?? null,
|
|
452
401
|
},
|
|
453
|
-
|
|
454
|
-
|
|
402
|
+
{
|
|
403
|
+
regex(...args) {
|
|
404
|
+
return this.check((checks.regex as any)(...args));
|
|
405
|
+
},
|
|
406
|
+
includes(...args) {
|
|
407
|
+
return this.check((checks.includes as any)(...args));
|
|
408
|
+
},
|
|
409
|
+
startsWith(...args) {
|
|
410
|
+
return this.check((checks.startsWith as any)(...args));
|
|
411
|
+
},
|
|
412
|
+
endsWith(...args) {
|
|
413
|
+
return this.check((checks.endsWith as any)(...args));
|
|
414
|
+
},
|
|
415
|
+
min(...args) {
|
|
416
|
+
return this.check((checks.minLength as any)(...args));
|
|
417
|
+
},
|
|
418
|
+
max(...args) {
|
|
419
|
+
return this.check((checks.maxLength as any)(...args));
|
|
420
|
+
},
|
|
421
|
+
length(...args) {
|
|
422
|
+
return this.check((checks.length as any)(...args));
|
|
423
|
+
},
|
|
424
|
+
nonempty(...args) {
|
|
425
|
+
return this.check((checks.minLength as any)(1, ...args));
|
|
426
|
+
},
|
|
427
|
+
lowercase(params) {
|
|
428
|
+
return this.check(checks.lowercase(params));
|
|
429
|
+
},
|
|
430
|
+
uppercase(params) {
|
|
431
|
+
return this.check(checks.uppercase(params));
|
|
432
|
+
},
|
|
433
|
+
trim() {
|
|
434
|
+
return this.check(checks.trim());
|
|
435
|
+
},
|
|
436
|
+
normalize(...args) {
|
|
437
|
+
return this.check(checks.normalize(...args));
|
|
438
|
+
},
|
|
439
|
+
toLowerCase() {
|
|
440
|
+
return this.check(checks.toLowerCase());
|
|
441
|
+
},
|
|
442
|
+
toUpperCase() {
|
|
443
|
+
return this.check(checks.toUpperCase());
|
|
444
|
+
},
|
|
445
|
+
slugify() {
|
|
446
|
+
return this.check(checks.slugify());
|
|
447
|
+
},
|
|
448
|
+
}
|
|
449
|
+
)
|
|
450
|
+
);
|
|
455
451
|
|
|
456
452
|
export interface ZodString extends _ZodString<core.$ZodStringInternals<string>> {
|
|
457
453
|
// string format checks
|
|
@@ -530,40 +526,93 @@ export interface ZodString extends _ZodString<core.$ZodStringInternals<string>>
|
|
|
530
526
|
duration(params?: string | core.$ZodCheckISODurationParams): this;
|
|
531
527
|
}
|
|
532
528
|
|
|
533
|
-
export const ZodString: core.$constructor<ZodString> = /*@__PURE__*/ core.$constructor
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
}
|
|
529
|
+
export const ZodString: core.$constructor<ZodString> = /*@__PURE__*/ core.$constructor<ZodString>(
|
|
530
|
+
"ZodString",
|
|
531
|
+
(inst, def) => {
|
|
532
|
+
core.$ZodString.init(inst, def);
|
|
533
|
+
_ZodString.init(inst, def);
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
email(params) {
|
|
537
|
+
return this.check(core._email(ZodEmail, params));
|
|
538
|
+
},
|
|
539
|
+
url(params) {
|
|
540
|
+
return this.check(core._url(ZodURL, params));
|
|
541
|
+
},
|
|
542
|
+
jwt(params) {
|
|
543
|
+
return this.check(core._jwt(ZodJWT, params));
|
|
544
|
+
},
|
|
545
|
+
emoji(params) {
|
|
546
|
+
return this.check(core._emoji(ZodEmoji, params));
|
|
547
|
+
},
|
|
548
|
+
guid(params) {
|
|
549
|
+
return this.check(core._guid(ZodGUID, params));
|
|
550
|
+
},
|
|
551
|
+
uuid(params) {
|
|
552
|
+
return this.check(core._uuid(ZodUUID, params));
|
|
553
|
+
},
|
|
554
|
+
uuidv4(params) {
|
|
555
|
+
return this.check(core._uuidv4(ZodUUID, params));
|
|
556
|
+
},
|
|
557
|
+
uuidv6(params) {
|
|
558
|
+
return this.check(core._uuidv6(ZodUUID, params));
|
|
559
|
+
},
|
|
560
|
+
uuidv7(params) {
|
|
561
|
+
return this.check(core._uuidv7(ZodUUID, params));
|
|
562
|
+
},
|
|
563
|
+
nanoid(params) {
|
|
564
|
+
return this.check(core._nanoid(ZodNanoID, params));
|
|
565
|
+
},
|
|
566
|
+
cuid(params) {
|
|
567
|
+
return this.check(core._cuid(ZodCUID, params));
|
|
568
|
+
},
|
|
569
|
+
cuid2(params) {
|
|
570
|
+
return this.check(core._cuid2(ZodCUID2, params));
|
|
571
|
+
},
|
|
572
|
+
ulid(params) {
|
|
573
|
+
return this.check(core._ulid(ZodULID, params));
|
|
574
|
+
},
|
|
575
|
+
base64(params) {
|
|
576
|
+
return this.check(core._base64(ZodBase64, params));
|
|
577
|
+
},
|
|
578
|
+
base64url(params) {
|
|
579
|
+
return this.check(core._base64url(ZodBase64URL, params));
|
|
580
|
+
},
|
|
581
|
+
xid(params) {
|
|
582
|
+
return this.check(core._xid(ZodXID, params));
|
|
583
|
+
},
|
|
584
|
+
ksuid(params) {
|
|
585
|
+
return this.check(core._ksuid(ZodKSUID, params));
|
|
586
|
+
},
|
|
587
|
+
ipv4(params) {
|
|
588
|
+
return this.check(core._ipv4(ZodIPv4, params));
|
|
589
|
+
},
|
|
590
|
+
ipv6(params) {
|
|
591
|
+
return this.check(core._ipv6(ZodIPv6, params));
|
|
592
|
+
},
|
|
593
|
+
cidrv4(params) {
|
|
594
|
+
return this.check(core._cidrv4(ZodCIDRv4, params));
|
|
595
|
+
},
|
|
596
|
+
cidrv6(params) {
|
|
597
|
+
return this.check(core._cidrv6(ZodCIDRv6, params));
|
|
598
|
+
},
|
|
599
|
+
e164(params) {
|
|
600
|
+
return this.check(core._e164(ZodE164, params));
|
|
601
|
+
},
|
|
602
|
+
datetime(params) {
|
|
603
|
+
return this.check(core._isoDateTime(ZodISODateTime, params as any));
|
|
604
|
+
},
|
|
605
|
+
date(params) {
|
|
606
|
+
return this.check(core._isoDate(ZodISODate, params as any));
|
|
607
|
+
},
|
|
608
|
+
time(params) {
|
|
609
|
+
return this.check(core._isoTime(ZodISOTime, params as any));
|
|
610
|
+
},
|
|
611
|
+
duration(params) {
|
|
612
|
+
return this.check(core._isoDuration(ZodISODuration, params as any));
|
|
613
|
+
},
|
|
614
|
+
}
|
|
615
|
+
);
|
|
567
616
|
|
|
568
617
|
export function string(params?: string | core.$ZodStringParams): ZodString;
|
|
569
618
|
export function string<T extends string>(params?: string | core.$ZodStringParams): core.$ZodType<T, T>;
|
|
@@ -582,6 +631,72 @@ export const ZodStringFormat: core.$constructor<ZodStringFormat> = /*@__PURE__*/
|
|
|
582
631
|
}
|
|
583
632
|
);
|
|
584
633
|
|
|
634
|
+
//////////////////////////////////////////////
|
|
635
|
+
//////////////////////////////////////////////
|
|
636
|
+
////////// //////////
|
|
637
|
+
////////// ZodISODateTime //////////
|
|
638
|
+
////////// //////////
|
|
639
|
+
//////////////////////////////////////////////
|
|
640
|
+
//////////////////////////////////////////////
|
|
641
|
+
export interface ZodISODateTime extends ZodStringFormat {
|
|
642
|
+
_zod: core.$ZodISODateTimeInternals;
|
|
643
|
+
}
|
|
644
|
+
export const ZodISODateTime: core.$constructor<ZodISODateTime> = /*@__PURE__*/ core.$constructor(
|
|
645
|
+
"ZodISODateTime",
|
|
646
|
+
(inst, def) => {
|
|
647
|
+
core.$ZodISODateTime.init(inst, def);
|
|
648
|
+
ZodStringFormat.init(inst, def);
|
|
649
|
+
}
|
|
650
|
+
);
|
|
651
|
+
|
|
652
|
+
//////////////////////////////////////////
|
|
653
|
+
//////////////////////////////////////////
|
|
654
|
+
////////// //////////
|
|
655
|
+
////////// ZodISODate //////////
|
|
656
|
+
////////// //////////
|
|
657
|
+
//////////////////////////////////////////
|
|
658
|
+
//////////////////////////////////////////
|
|
659
|
+
export interface ZodISODate extends ZodStringFormat {
|
|
660
|
+
_zod: core.$ZodISODateInternals;
|
|
661
|
+
}
|
|
662
|
+
export const ZodISODate: core.$constructor<ZodISODate> = /*@__PURE__*/ core.$constructor("ZodISODate", (inst, def) => {
|
|
663
|
+
core.$ZodISODate.init(inst, def);
|
|
664
|
+
ZodStringFormat.init(inst, def);
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
//////////////////////////////////////////
|
|
668
|
+
//////////////////////////////////////////
|
|
669
|
+
////////// //////////
|
|
670
|
+
////////// ZodISOTime //////////
|
|
671
|
+
////////// //////////
|
|
672
|
+
//////////////////////////////////////////
|
|
673
|
+
//////////////////////////////////////////
|
|
674
|
+
export interface ZodISOTime extends ZodStringFormat {
|
|
675
|
+
_zod: core.$ZodISOTimeInternals;
|
|
676
|
+
}
|
|
677
|
+
export const ZodISOTime: core.$constructor<ZodISOTime> = /*@__PURE__*/ core.$constructor("ZodISOTime", (inst, def) => {
|
|
678
|
+
core.$ZodISOTime.init(inst, def);
|
|
679
|
+
ZodStringFormat.init(inst, def);
|
|
680
|
+
});
|
|
681
|
+
|
|
682
|
+
//////////////////////////////////////////////
|
|
683
|
+
//////////////////////////////////////////////
|
|
684
|
+
////////// //////////
|
|
685
|
+
////////// ZodISODuration //////////
|
|
686
|
+
////////// //////////
|
|
687
|
+
//////////////////////////////////////////////
|
|
688
|
+
//////////////////////////////////////////////
|
|
689
|
+
export interface ZodISODuration extends ZodStringFormat {
|
|
690
|
+
_zod: core.$ZodISODurationInternals;
|
|
691
|
+
}
|
|
692
|
+
export const ZodISODuration: core.$constructor<ZodISODuration> = /*@__PURE__*/ core.$constructor(
|
|
693
|
+
"ZodISODuration",
|
|
694
|
+
(inst, def) => {
|
|
695
|
+
core.$ZodISODuration.init(inst, def);
|
|
696
|
+
ZodStringFormat.init(inst, def);
|
|
697
|
+
}
|
|
698
|
+
);
|
|
699
|
+
|
|
585
700
|
// ZodEmail
|
|
586
701
|
export interface ZodEmail extends ZodStringFormat<"email"> {
|
|
587
702
|
_zod: core.$ZodEmailInternals;
|
|
@@ -656,8 +771,8 @@ export function url(params?: string | core.$ZodURLParams): ZodURL {
|
|
|
656
771
|
|
|
657
772
|
export function httpUrl(params?: string | Omit<core.$ZodURLParams, "protocol" | "hostname">): ZodURL {
|
|
658
773
|
return core._url(ZodURL, {
|
|
659
|
-
protocol:
|
|
660
|
-
hostname:
|
|
774
|
+
protocol: regexes.httpProtocol,
|
|
775
|
+
hostname: regexes.domain,
|
|
661
776
|
...util.normalizeParams(params),
|
|
662
777
|
});
|
|
663
778
|
}
|
|
@@ -900,6 +1015,35 @@ export function e164(params?: string | core.$ZodE164Params): ZodE164 {
|
|
|
900
1015
|
return core._e164(ZodE164, params);
|
|
901
1016
|
}
|
|
902
1017
|
|
|
1018
|
+
// ZodCreditCard
|
|
1019
|
+
export interface ZodCreditCard extends ZodStringFormat<"credit_card"> {
|
|
1020
|
+
_zod: core.$ZodCreditCardInternals;
|
|
1021
|
+
}
|
|
1022
|
+
export const ZodCreditCard: core.$constructor<ZodCreditCard> = /*@__PURE__*/ core.$constructor(
|
|
1023
|
+
"ZodCreditCard",
|
|
1024
|
+
(inst, def) => {
|
|
1025
|
+
core.$ZodCreditCard.init(inst, def);
|
|
1026
|
+
ZodStringFormat.init(inst, def);
|
|
1027
|
+
}
|
|
1028
|
+
);
|
|
1029
|
+
|
|
1030
|
+
export function creditCard(params?: string | core.$ZodCreditCardParams): ZodCreditCard {
|
|
1031
|
+
return core._creditCard(ZodCreditCard, params);
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
// ZodIBAN
|
|
1035
|
+
export interface ZodIBAN extends ZodStringFormat<"iban"> {
|
|
1036
|
+
_zod: core.$ZodIBANInternals;
|
|
1037
|
+
}
|
|
1038
|
+
export const ZodIBAN: core.$constructor<ZodIBAN> = /*@__PURE__*/ core.$constructor("ZodIBAN", (inst, def) => {
|
|
1039
|
+
core.$ZodIBAN.init(inst, def);
|
|
1040
|
+
ZodStringFormat.init(inst, def);
|
|
1041
|
+
});
|
|
1042
|
+
|
|
1043
|
+
export function iban(params?: string | core.$ZodIBANParams): ZodIBAN {
|
|
1044
|
+
return core._iban(ZodIBAN, params);
|
|
1045
|
+
}
|
|
1046
|
+
|
|
903
1047
|
// ZodJWT
|
|
904
1048
|
export interface ZodJWT extends ZodStringFormat<"jwt"> {
|
|
905
1049
|
_zod: core.$ZodJWTInternals;
|
|
@@ -938,11 +1082,15 @@ export function stringFormat<Format extends string>(
|
|
|
938
1082
|
}
|
|
939
1083
|
|
|
940
1084
|
export function hostname(_params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<"hostname"> {
|
|
941
|
-
return core._stringFormat(ZodCustomStringFormat, "hostname",
|
|
1085
|
+
return core._stringFormat(ZodCustomStringFormat, "hostname", regexes.hostname, _params) as any;
|
|
942
1086
|
}
|
|
943
1087
|
|
|
944
1088
|
export function hex(_params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<"hex"> {
|
|
945
|
-
return core._stringFormat(ZodCustomStringFormat, "hex",
|
|
1089
|
+
return core._stringFormat(ZodCustomStringFormat, "hex", regexes.hex, _params) as any;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
export function currencyCode(_params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<"currency_code"> {
|
|
1093
|
+
return core._stringFormat(ZodCustomStringFormat, "currency_code", regexes.currencyCode, _params) as any;
|
|
946
1094
|
}
|
|
947
1095
|
|
|
948
1096
|
export function hash<Alg extends util.HashAlgorithm, Enc extends util.HashEncoding = "hex">(
|
|
@@ -995,78 +1143,89 @@ export interface _ZodNumber<Internals extends core.$ZodNumberInternals = core.$Z
|
|
|
995
1143
|
|
|
996
1144
|
export interface ZodNumber extends _ZodNumber<core.$ZodNumberInternals<number>> {}
|
|
997
1145
|
|
|
998
|
-
export const ZodNumber: core.$constructor<ZodNumber> = /*@__PURE__*/ core.$constructor
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1146
|
+
export const ZodNumber: core.$constructor<ZodNumber> = /*@__PURE__*/ core.$constructor<ZodNumber>(
|
|
1147
|
+
"ZodNumber",
|
|
1148
|
+
(inst, def) => {
|
|
1149
|
+
core.$ZodNumber.init(inst, def);
|
|
1002
1150
|
|
|
1003
|
-
|
|
1151
|
+
ZodType.init(inst, def);
|
|
1004
1152
|
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
},
|
|
1024
|
-
int(params) {
|
|
1025
|
-
return this.check(int(params));
|
|
1026
|
-
},
|
|
1027
|
-
safe(params) {
|
|
1028
|
-
return this.check(int(params));
|
|
1029
|
-
},
|
|
1030
|
-
positive(params) {
|
|
1031
|
-
return this.check(checks.gt(0, params));
|
|
1032
|
-
},
|
|
1033
|
-
nonnegative(params) {
|
|
1034
|
-
return this.check(checks.gte(0, params));
|
|
1035
|
-
},
|
|
1036
|
-
negative(params) {
|
|
1037
|
-
return this.check(checks.lt(0, params));
|
|
1038
|
-
},
|
|
1039
|
-
nonpositive(params) {
|
|
1040
|
-
return this.check(checks.lte(0, params));
|
|
1041
|
-
},
|
|
1042
|
-
multipleOf(value, params) {
|
|
1043
|
-
return this.check(checks.multipleOf(value, params));
|
|
1044
|
-
},
|
|
1045
|
-
step(value, params) {
|
|
1046
|
-
return this.check(checks.multipleOf(value, params));
|
|
1047
|
-
},
|
|
1048
|
-
finite() {
|
|
1049
|
-
return this;
|
|
1153
|
+
inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);
|
|
1154
|
+
inst.isFinite = true;
|
|
1155
|
+
},
|
|
1156
|
+
/*@__PURE__*/ util.derived<ZodNumber>(
|
|
1157
|
+
{
|
|
1158
|
+
minValue: (inst) => {
|
|
1159
|
+
const { minimum, exclusiveMinimum } = processors.aggregateChecks<number>(inst);
|
|
1160
|
+
return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
|
|
1161
|
+
},
|
|
1162
|
+
maxValue: (inst) => {
|
|
1163
|
+
const { maximum, exclusiveMaximum } = processors.aggregateChecks<number>(inst);
|
|
1164
|
+
return Math.min(maximum ?? Number.POSITIVE_INFINITY, exclusiveMaximum ?? Number.POSITIVE_INFINITY);
|
|
1165
|
+
},
|
|
1166
|
+
isInt: (inst) => {
|
|
1167
|
+
const { isInt, multipleOf } = processors.aggregateChecks(inst);
|
|
1168
|
+
return !!isInt || !!multipleOf?.some(Number.isSafeInteger);
|
|
1169
|
+
},
|
|
1170
|
+
format: (inst) => processors.aggregateChecks(inst).format ?? null,
|
|
1050
1171
|
},
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1172
|
+
{
|
|
1173
|
+
gt(value, params) {
|
|
1174
|
+
return this.check(checks.gt(value, params));
|
|
1175
|
+
},
|
|
1176
|
+
gte(value, params) {
|
|
1177
|
+
return this.check(checks.gte(value, params));
|
|
1178
|
+
},
|
|
1179
|
+
min(value, params) {
|
|
1180
|
+
return this.check(checks.gte(value, params));
|
|
1181
|
+
},
|
|
1182
|
+
lt(value, params) {
|
|
1183
|
+
return this.check(checks.lt(value, params));
|
|
1184
|
+
},
|
|
1185
|
+
lte(value, params) {
|
|
1186
|
+
return this.check(checks.lte(value, params));
|
|
1187
|
+
},
|
|
1188
|
+
max(value, params) {
|
|
1189
|
+
return this.check(checks.lte(value, params));
|
|
1190
|
+
},
|
|
1191
|
+
int(params) {
|
|
1192
|
+
return this.check(int(params));
|
|
1193
|
+
},
|
|
1194
|
+
safe(params) {
|
|
1195
|
+
return this.check(int(params));
|
|
1196
|
+
},
|
|
1197
|
+
positive(params) {
|
|
1198
|
+
return this.check(checks.gt(0, params));
|
|
1199
|
+
},
|
|
1200
|
+
nonnegative(params) {
|
|
1201
|
+
return this.check(checks.gte(0, params));
|
|
1202
|
+
},
|
|
1203
|
+
negative(params) {
|
|
1204
|
+
return this.check(checks.lt(0, params));
|
|
1205
|
+
},
|
|
1206
|
+
nonpositive(params) {
|
|
1207
|
+
return this.check(checks.lte(0, params));
|
|
1208
|
+
},
|
|
1209
|
+
multipleOf(value, params) {
|
|
1210
|
+
return this.check(checks.multipleOf(value, params));
|
|
1211
|
+
},
|
|
1212
|
+
step(value, params) {
|
|
1213
|
+
return this.check(checks.multipleOf(value, params));
|
|
1214
|
+
},
|
|
1215
|
+
finite() {
|
|
1216
|
+
return this;
|
|
1217
|
+
},
|
|
1218
|
+
}
|
|
1219
|
+
)
|
|
1220
|
+
);
|
|
1062
1221
|
|
|
1063
1222
|
export function number(params?: string | core.$ZodNumberParams): ZodNumber {
|
|
1064
1223
|
return core._number(ZodNumber, params);
|
|
1065
1224
|
}
|
|
1066
1225
|
|
|
1067
1226
|
// ZodNumberFormat
|
|
1068
|
-
export interface ZodNumberFormat extends ZodNumber {
|
|
1069
|
-
_zod: core.$ZodNumberFormatInternals
|
|
1227
|
+
export interface ZodNumberFormat<Format extends $ZodNumberFormats = $ZodNumberFormats> extends ZodNumber {
|
|
1228
|
+
_zod: core.$ZodNumberFormatInternals<Format>;
|
|
1070
1229
|
}
|
|
1071
1230
|
export const ZodNumberFormat: core.$constructor<ZodNumberFormat> = /*@__PURE__*/ core.$constructor(
|
|
1072
1231
|
"ZodNumberFormat",
|
|
@@ -1077,33 +1236,33 @@ export const ZodNumberFormat: core.$constructor<ZodNumberFormat> = /*@__PURE__*/
|
|
|
1077
1236
|
);
|
|
1078
1237
|
|
|
1079
1238
|
// int
|
|
1080
|
-
export interface ZodInt extends ZodNumberFormat {}
|
|
1239
|
+
export interface ZodInt extends ZodNumberFormat<"safeint"> {}
|
|
1081
1240
|
export function int(params?: string | core.$ZodCheckNumberFormatParams): ZodInt {
|
|
1082
|
-
return core._int(ZodNumberFormat, params);
|
|
1241
|
+
return core._int(ZodNumberFormat, params) as ZodInt;
|
|
1083
1242
|
}
|
|
1084
1243
|
|
|
1085
1244
|
// float32
|
|
1086
|
-
export interface ZodFloat32 extends ZodNumberFormat {}
|
|
1245
|
+
export interface ZodFloat32 extends ZodNumberFormat<"float32"> {}
|
|
1087
1246
|
export function float32(params?: string | core.$ZodCheckNumberFormatParams): ZodFloat32 {
|
|
1088
|
-
return core._float32(ZodNumberFormat, params);
|
|
1247
|
+
return core._float32(ZodNumberFormat, params) as ZodFloat32;
|
|
1089
1248
|
}
|
|
1090
1249
|
|
|
1091
1250
|
// float64
|
|
1092
|
-
export interface ZodFloat64 extends ZodNumberFormat {}
|
|
1251
|
+
export interface ZodFloat64 extends ZodNumberFormat<"float64"> {}
|
|
1093
1252
|
export function float64(params?: string | core.$ZodCheckNumberFormatParams): ZodFloat64 {
|
|
1094
|
-
return core._float64(ZodNumberFormat, params);
|
|
1253
|
+
return core._float64(ZodNumberFormat, params) as ZodFloat64;
|
|
1095
1254
|
}
|
|
1096
1255
|
|
|
1097
1256
|
// int32
|
|
1098
|
-
export interface ZodInt32 extends ZodNumberFormat {}
|
|
1257
|
+
export interface ZodInt32 extends ZodNumberFormat<"int32"> {}
|
|
1099
1258
|
export function int32(params?: string | core.$ZodCheckNumberFormatParams): ZodInt32 {
|
|
1100
|
-
return core._int32(ZodNumberFormat, params);
|
|
1259
|
+
return core._int32(ZodNumberFormat, params) as ZodInt32;
|
|
1101
1260
|
}
|
|
1102
1261
|
|
|
1103
1262
|
// uint32
|
|
1104
|
-
export interface ZodUInt32 extends ZodNumberFormat {}
|
|
1263
|
+
export interface ZodUInt32 extends ZodNumberFormat<"uint32"> {}
|
|
1105
1264
|
export function uint32(params?: string | core.$ZodCheckNumberFormatParams): ZodUInt32 {
|
|
1106
|
-
return core._uint32(ZodNumberFormat, params);
|
|
1265
|
+
return core._uint32(ZodNumberFormat, params) as ZodUInt32;
|
|
1107
1266
|
}
|
|
1108
1267
|
|
|
1109
1268
|
// boolean
|
|
@@ -1141,30 +1300,56 @@ export interface _ZodBigInt<T extends core.$ZodBigIntInternals = core.$ZodBigInt
|
|
|
1141
1300
|
}
|
|
1142
1301
|
|
|
1143
1302
|
export interface ZodBigInt extends _ZodBigInt<core.$ZodBigIntInternals<bigint>> {}
|
|
1144
|
-
export const ZodBigInt: core.$constructor<ZodBigInt> = /*@__PURE__*/ core.$constructor
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1303
|
+
export const ZodBigInt: core.$constructor<ZodBigInt> = /*@__PURE__*/ core.$constructor<ZodBigInt>(
|
|
1304
|
+
"ZodBigInt",
|
|
1305
|
+
(inst, def) => {
|
|
1306
|
+
core.$ZodBigInt.init(inst, def);
|
|
1307
|
+
ZodType.init(inst, def);
|
|
1308
|
+
inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);
|
|
1309
|
+
},
|
|
1310
|
+
/*@__PURE__*/ util.derived<ZodBigInt>(
|
|
1311
|
+
{
|
|
1312
|
+
minValue: (inst) => processors.aggregateChecks<bigint>(inst).minimum ?? null,
|
|
1313
|
+
maxValue: (inst) => processors.aggregateChecks<bigint>(inst).maximum ?? null,
|
|
1314
|
+
format: (inst) => processors.aggregateChecks(inst).format ?? null,
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
gte(value, params) {
|
|
1318
|
+
return this.check(checks.gte(value, params));
|
|
1319
|
+
},
|
|
1320
|
+
min(value, params) {
|
|
1321
|
+
return this.check(checks.gte(value, params));
|
|
1322
|
+
},
|
|
1323
|
+
gt(value, params) {
|
|
1324
|
+
return this.check(checks.gt(value, params));
|
|
1325
|
+
},
|
|
1326
|
+
lt(value, params) {
|
|
1327
|
+
return this.check(checks.lt(value, params));
|
|
1328
|
+
},
|
|
1329
|
+
lte(value, params) {
|
|
1330
|
+
return this.check(checks.lte(value, params));
|
|
1331
|
+
},
|
|
1332
|
+
max(value, params) {
|
|
1333
|
+
return this.check(checks.lte(value, params));
|
|
1334
|
+
},
|
|
1335
|
+
positive(params) {
|
|
1336
|
+
return this.check(checks.gt(BigInt(0), params));
|
|
1337
|
+
},
|
|
1338
|
+
negative(params) {
|
|
1339
|
+
return this.check(checks.lt(BigInt(0), params));
|
|
1340
|
+
},
|
|
1341
|
+
nonpositive(params) {
|
|
1342
|
+
return this.check(checks.lte(BigInt(0), params));
|
|
1343
|
+
},
|
|
1344
|
+
nonnegative(params) {
|
|
1345
|
+
return this.check(checks.gte(BigInt(0), params));
|
|
1346
|
+
},
|
|
1347
|
+
multipleOf(value, params) {
|
|
1348
|
+
return this.check(checks.multipleOf(value, params));
|
|
1349
|
+
},
|
|
1350
|
+
}
|
|
1351
|
+
)
|
|
1352
|
+
);
|
|
1168
1353
|
|
|
1169
1354
|
export function bigint(params?: string | core.$ZodBigIntParams): ZodBigInt {
|
|
1170
1355
|
return core._bigint(ZodBigInt, params);
|
|
@@ -1172,8 +1357,8 @@ export function bigint(params?: string | core.$ZodBigIntParams): ZodBigInt {
|
|
|
1172
1357
|
// bigint formats
|
|
1173
1358
|
|
|
1174
1359
|
// ZodBigIntFormat
|
|
1175
|
-
export interface ZodBigIntFormat extends ZodBigInt {
|
|
1176
|
-
_zod: core.$ZodBigIntFormatInternals
|
|
1360
|
+
export interface ZodBigIntFormat<Format extends $ZodBigIntFormats = $ZodBigIntFormats> extends ZodBigInt {
|
|
1361
|
+
_zod: core.$ZodBigIntFormatInternals<Format>;
|
|
1177
1362
|
}
|
|
1178
1363
|
export const ZodBigIntFormat: core.$constructor<ZodBigIntFormat> = /*@__PURE__*/ core.$constructor(
|
|
1179
1364
|
"ZodBigIntFormat",
|
|
@@ -1184,13 +1369,15 @@ export const ZodBigIntFormat: core.$constructor<ZodBigIntFormat> = /*@__PURE__*/
|
|
|
1184
1369
|
);
|
|
1185
1370
|
|
|
1186
1371
|
// int64
|
|
1187
|
-
export
|
|
1188
|
-
|
|
1372
|
+
export interface ZodInt64 extends ZodBigIntFormat<"int64"> {}
|
|
1373
|
+
export function int64(params?: string | core.$ZodBigIntFormatParams): ZodInt64 {
|
|
1374
|
+
return core._int64(ZodBigIntFormat, params) as ZodInt64;
|
|
1189
1375
|
}
|
|
1190
1376
|
|
|
1191
1377
|
// uint64
|
|
1192
|
-
export
|
|
1193
|
-
|
|
1378
|
+
export interface ZodUInt64 extends ZodBigIntFormat<"uint64"> {}
|
|
1379
|
+
export function uint64(params?: string | core.$ZodBigIntFormatParams): ZodUInt64 {
|
|
1380
|
+
return core._uint64(ZodBigIntFormat, params) as ZodUInt64;
|
|
1194
1381
|
}
|
|
1195
1382
|
|
|
1196
1383
|
// symbol
|
|
@@ -1295,18 +1482,30 @@ export interface _ZodDate<T extends core.$ZodDateInternals = core.$ZodDateIntern
|
|
|
1295
1482
|
}
|
|
1296
1483
|
|
|
1297
1484
|
export interface ZodDate extends _ZodDate<core.$ZodDateInternals<Date>> {}
|
|
1298
|
-
export const ZodDate: core.$constructor<ZodDate> = /*@__PURE__*/ core.$constructor
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
inst.max = (value, params) => inst.check(checks.lte(value, params));
|
|
1485
|
+
export const ZodDate: core.$constructor<ZodDate> = /*@__PURE__*/ core.$constructor<ZodDate>(
|
|
1486
|
+
"ZodDate",
|
|
1487
|
+
(inst, def) => {
|
|
1488
|
+
core.$ZodDate.init(inst, def);
|
|
1489
|
+
ZodType.init(inst, def);
|
|
1490
|
+
inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);
|
|
1305
1491
|
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1492
|
+
inst.min = (value, params) => inst.check(checks.gte(value, params));
|
|
1493
|
+
inst.max = (value, params) => inst.check(checks.lte(value, params));
|
|
1494
|
+
},
|
|
1495
|
+
/*@__PURE__*/ util.derived<ZodDate>(
|
|
1496
|
+
{
|
|
1497
|
+
minDate: (inst) => {
|
|
1498
|
+
const { minimum } = processors.aggregateChecks<Date>(inst);
|
|
1499
|
+
return minimum ? new Date(minimum) : null;
|
|
1500
|
+
},
|
|
1501
|
+
maxDate: (inst) => {
|
|
1502
|
+
const { maximum } = processors.aggregateChecks<Date>(inst);
|
|
1503
|
+
return maximum ? new Date(maximum) : null;
|
|
1504
|
+
},
|
|
1505
|
+
},
|
|
1506
|
+
{}
|
|
1507
|
+
)
|
|
1508
|
+
);
|
|
1310
1509
|
|
|
1311
1510
|
export function date(params?: string | core.$ZodDateParams): ZodDate {
|
|
1312
1511
|
return core._date(ZodDate, params);
|
|
@@ -1325,13 +1524,17 @@ export interface ZodArray<T extends core.SomeType = core.$ZodType>
|
|
|
1325
1524
|
unwrap(): T;
|
|
1326
1525
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
1327
1526
|
}
|
|
1328
|
-
export const ZodArray: core.$constructor<ZodArray> = /*@__PURE__*/ core.$constructor
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1527
|
+
export const ZodArray: core.$constructor<ZodArray> = /*@__PURE__*/ core.$constructor<ZodArray>(
|
|
1528
|
+
"ZodArray",
|
|
1529
|
+
(inst, def) => {
|
|
1530
|
+
_ensureDefaultMemoizer();
|
|
1531
|
+
core.$ZodArray.init(inst, def);
|
|
1532
|
+
ZodType.init(inst, def);
|
|
1533
|
+
inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);
|
|
1332
1534
|
|
|
1333
|
-
|
|
1334
|
-
|
|
1535
|
+
inst.element = def.element;
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1335
1538
|
min(n, params) {
|
|
1336
1539
|
return this.check(checks.minLength(n, params));
|
|
1337
1540
|
},
|
|
@@ -1347,8 +1550,8 @@ export const ZodArray: core.$constructor<ZodArray> = /*@__PURE__*/ core.$constru
|
|
|
1347
1550
|
unwrap() {
|
|
1348
1551
|
return this.element;
|
|
1349
1552
|
},
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1553
|
+
}
|
|
1554
|
+
);
|
|
1352
1555
|
|
|
1353
1556
|
export function array<T extends core.SomeType>(element: T, params?: string | core.$ZodArrayParams): ZodArray<T> {
|
|
1354
1557
|
return core._array(ZodArray, element as any, params) as any;
|
|
@@ -1435,6 +1638,22 @@ export interface ZodObject<
|
|
|
1435
1638
|
Config
|
|
1436
1639
|
>;
|
|
1437
1640
|
|
|
1641
|
+
// exactPartial
|
|
1642
|
+
exactPartial(): ZodObject<
|
|
1643
|
+
{
|
|
1644
|
+
-readonly [k in keyof Shape]: ZodExactOptional<Shape[k]>;
|
|
1645
|
+
},
|
|
1646
|
+
Config
|
|
1647
|
+
>;
|
|
1648
|
+
exactPartial<M extends util.Mask<keyof Shape>>(
|
|
1649
|
+
mask: M & Record<Exclude<keyof M, keyof Shape>, never>
|
|
1650
|
+
): ZodObject<
|
|
1651
|
+
{
|
|
1652
|
+
-readonly [k in keyof Shape]: k extends keyof M ? ZodExactOptional<Shape[k]> : Shape[k];
|
|
1653
|
+
},
|
|
1654
|
+
Config
|
|
1655
|
+
>;
|
|
1656
|
+
|
|
1438
1657
|
// required
|
|
1439
1658
|
required(): ZodObject<
|
|
1440
1659
|
{
|
|
@@ -1452,33 +1671,35 @@ export interface ZodObject<
|
|
|
1452
1671
|
>;
|
|
1453
1672
|
}
|
|
1454
1673
|
|
|
1455
|
-
export const ZodObject: core.$constructor<ZodObject> = /*@__PURE__*/ core.$constructor
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
});
|
|
1674
|
+
export const ZodObject: core.$constructor<ZodObject> = /*@__PURE__*/ core.$constructor<ZodObject>(
|
|
1675
|
+
"ZodObject",
|
|
1676
|
+
(inst, def) => {
|
|
1677
|
+
_ensureDefaultMemoizer();
|
|
1678
|
+
core.$ZodObjectJIT.init(inst, def);
|
|
1679
|
+
ZodType.init(inst, def);
|
|
1680
|
+
inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);
|
|
1463
1681
|
|
|
1464
|
-
|
|
1682
|
+
util.installLazyProp(inst, "shape", (self) => self._zod.def.shape, false);
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1465
1685
|
keyof() {
|
|
1466
1686
|
return _enum(Object.keys(this._zod.def.shape));
|
|
1467
1687
|
},
|
|
1468
1688
|
catchall(catchall) {
|
|
1469
|
-
|
|
1689
|
+
// `mergeDefs` rather than a spread: spreading reads `shape`, and resolving it can mint a whole fresh subtree
|
|
1690
|
+
return this.clone(util.mergeDefs(this._zod.def, { catchall: catchall as any }));
|
|
1470
1691
|
},
|
|
1471
1692
|
passthrough() {
|
|
1472
|
-
return this.clone(
|
|
1693
|
+
return this.clone(util.mergeDefs(this._zod.def, { catchall: unknown() }));
|
|
1473
1694
|
},
|
|
1474
1695
|
loose() {
|
|
1475
|
-
return this.clone(
|
|
1696
|
+
return this.clone(util.mergeDefs(this._zod.def, { catchall: unknown() }));
|
|
1476
1697
|
},
|
|
1477
1698
|
strict() {
|
|
1478
|
-
return this.clone(
|
|
1699
|
+
return this.clone(util.mergeDefs(this._zod.def, { catchall: never() }));
|
|
1479
1700
|
},
|
|
1480
1701
|
strip() {
|
|
1481
|
-
return this.clone(
|
|
1702
|
+
return this.clone(util.mergeDefs(this._zod.def, { catchall: undefined }));
|
|
1482
1703
|
},
|
|
1483
1704
|
extend(incoming) {
|
|
1484
1705
|
return util.extend(this, incoming);
|
|
@@ -1498,11 +1719,14 @@ export const ZodObject: core.$constructor<ZodObject> = /*@__PURE__*/ core.$const
|
|
|
1498
1719
|
partial(...args) {
|
|
1499
1720
|
return util.partial(ZodOptional, this, args[0]);
|
|
1500
1721
|
},
|
|
1722
|
+
exactPartial(...args) {
|
|
1723
|
+
return util.partial(ZodExactOptional, this, args[0], "exactPartial");
|
|
1724
|
+
},
|
|
1501
1725
|
required(...args) {
|
|
1502
1726
|
return util.required(ZodNonOptional, this, args[0]);
|
|
1503
1727
|
},
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1728
|
+
}
|
|
1729
|
+
);
|
|
1506
1730
|
|
|
1507
1731
|
export function object<T extends core.$ZodLooseShape = Partial<Record<never, core.SomeType>>>(
|
|
1508
1732
|
shape?: T,
|
|
@@ -1617,7 +1841,7 @@ export const ZodDiscriminatedUnion: core.$constructor<ZodDiscriminatedUnion> = /
|
|
|
1617
1841
|
);
|
|
1618
1842
|
|
|
1619
1843
|
export function discriminatedUnion<
|
|
1620
|
-
Types extends readonly [core.$ZodTypeDiscriminable
|
|
1844
|
+
Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]],
|
|
1621
1845
|
Disc extends string,
|
|
1622
1846
|
>(
|
|
1623
1847
|
discriminator: Disc,
|
|
@@ -1627,7 +1851,7 @@ export function discriminatedUnion<
|
|
|
1627
1851
|
// const [options, params] = args;
|
|
1628
1852
|
return new ZodDiscriminatedUnion({
|
|
1629
1853
|
type: "union",
|
|
1630
|
-
options,
|
|
1854
|
+
options: options as any as core.$ZodType[],
|
|
1631
1855
|
discriminator,
|
|
1632
1856
|
...util.normalizeParams(params),
|
|
1633
1857
|
}) as any;
|
|
@@ -1667,17 +1891,34 @@ export interface ZodTuple<
|
|
|
1667
1891
|
core.$ZodTuple<T, Rest> {
|
|
1668
1892
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
1669
1893
|
rest<Rest extends core.SomeType = core.$ZodType>(rest: Rest): ZodTuple<T, Rest>;
|
|
1894
|
+
partial(): ZodTuple<{ -readonly [k in keyof T]: ZodOptional<T[k]> }, Rest>;
|
|
1670
1895
|
}
|
|
1671
|
-
export const ZodTuple: core.$constructor<ZodTuple> = /*@__PURE__*/ core.$constructor
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1896
|
+
export const ZodTuple: core.$constructor<ZodTuple> = /*@__PURE__*/ core.$constructor<ZodTuple>(
|
|
1897
|
+
"ZodTuple",
|
|
1898
|
+
(inst, def) => {
|
|
1899
|
+
_ensureDefaultMemoizer();
|
|
1900
|
+
core.$ZodTuple.init(inst, def);
|
|
1901
|
+
ZodType.init(inst, def);
|
|
1902
|
+
inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
rest(rest) {
|
|
1906
|
+
return this.clone({
|
|
1907
|
+
...this._zod.def,
|
|
1908
|
+
rest: rest as any as core.$ZodType,
|
|
1909
|
+
}) as any;
|
|
1910
|
+
},
|
|
1911
|
+
partial() {
|
|
1912
|
+
const def = this._zod.def;
|
|
1913
|
+
// a refinement was authored against the full arity; partialing would run it on a shorter array
|
|
1914
|
+
if (def.checks?.length) throw new Error(".partial() cannot be used on tuple schemas containing refinements");
|
|
1915
|
+
return this.clone({
|
|
1916
|
+
...def,
|
|
1917
|
+
items: def.items.map((item) => new ZodOptional({ type: "optional", innerType: item })),
|
|
1918
|
+
}) as any;
|
|
1919
|
+
},
|
|
1920
|
+
}
|
|
1921
|
+
);
|
|
1681
1922
|
|
|
1682
1923
|
export function tuple<T extends readonly [core.SomeType, ...core.SomeType[]]>(
|
|
1683
1924
|
items: T,
|
|
@@ -1716,6 +1957,7 @@ export interface ZodRecord<
|
|
|
1716
1957
|
valueType: Value;
|
|
1717
1958
|
}
|
|
1718
1959
|
export const ZodRecord: core.$constructor<ZodRecord> = /*@__PURE__*/ core.$constructor("ZodRecord", (inst, def) => {
|
|
1960
|
+
_ensureDefaultMemoizer();
|
|
1719
1961
|
core.$ZodRecord.init(inst, def);
|
|
1720
1962
|
ZodType.init(inst, def);
|
|
1721
1963
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);
|
|
@@ -1751,13 +1993,12 @@ export function partialRecord<Key extends core.$ZodRecordKey, Value extends core
|
|
|
1751
1993
|
valueType: Value,
|
|
1752
1994
|
params?: string | core.$ZodRecordParams
|
|
1753
1995
|
): ZodRecord<Key & core.$partial, Value> {
|
|
1754
|
-
const k = core.clone(keyType);
|
|
1755
|
-
k._zod.values = undefined;
|
|
1756
1996
|
return new ZodRecord({
|
|
1757
1997
|
type: "record",
|
|
1758
|
-
keyType
|
|
1998
|
+
keyType,
|
|
1759
1999
|
valueType: valueType as any,
|
|
1760
2000
|
...util.normalizeParams(params),
|
|
2001
|
+
partial: true,
|
|
1761
2002
|
}) as any;
|
|
1762
2003
|
}
|
|
1763
2004
|
|
|
@@ -1788,6 +2029,7 @@ export interface ZodMap<Key extends core.SomeType = core.$ZodType, Value extends
|
|
|
1788
2029
|
size(size: number, params?: string | core.$ZodCheckSizeEqualsParams): this;
|
|
1789
2030
|
}
|
|
1790
2031
|
export const ZodMap: core.$constructor<ZodMap> = /*@__PURE__*/ core.$constructor("ZodMap", (inst, def) => {
|
|
2032
|
+
_ensureDefaultMemoizer();
|
|
1791
2033
|
core.$ZodMap.init(inst, def);
|
|
1792
2034
|
ZodType.init(inst, def);
|
|
1793
2035
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);
|
|
@@ -1823,6 +2065,7 @@ export interface ZodSet<T extends core.SomeType = core.$ZodType>
|
|
|
1823
2065
|
size(size: number, params?: string | core.$ZodCheckSizeEqualsParams): this;
|
|
1824
2066
|
}
|
|
1825
2067
|
export const ZodSet: core.$constructor<ZodSet> = /*@__PURE__*/ core.$constructor("ZodSet", (inst, def) => {
|
|
2068
|
+
_ensureDefaultMemoizer();
|
|
1826
2069
|
core.$ZodSet.init(inst, def);
|
|
1827
2070
|
ZodType.init(inst, def);
|
|
1828
2071
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);
|
|
@@ -1869,7 +2112,8 @@ export const ZodEnum: core.$constructor<ZodEnum> = /*@__PURE__*/ core.$construct
|
|
|
1869
2112
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);
|
|
1870
2113
|
|
|
1871
2114
|
inst.enum = def.entries;
|
|
1872
|
-
|
|
2115
|
+
// reuse the parsed value set so a numeric TS enum's reverse-mapping keys stay out
|
|
2116
|
+
inst.options = [...inst._zod.values] as util.EnumValue[];
|
|
1873
2117
|
|
|
1874
2118
|
const keys = new Set(Object.keys(def.entries));
|
|
1875
2119
|
|
|
@@ -2005,6 +2249,7 @@ export interface ZodTransform<O = unknown, I = unknown>
|
|
|
2005
2249
|
export const ZodTransform: core.$constructor<ZodTransform> = /*@__PURE__*/ core.$constructor(
|
|
2006
2250
|
"ZodTransform",
|
|
2007
2251
|
(inst, def) => {
|
|
2252
|
+
_ensureDefaultMemoizer();
|
|
2008
2253
|
core.$ZodTransform.init(inst, def);
|
|
2009
2254
|
ZodType.init(inst, def);
|
|
2010
2255
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);
|
|
@@ -2023,7 +2268,7 @@ export const ZodTransform: core.$constructor<ZodTransform> = /*@__PURE__*/ core.
|
|
|
2023
2268
|
|
|
2024
2269
|
if (_issue.fatal) _issue.continue = false;
|
|
2025
2270
|
_issue.code ??= "custom";
|
|
2026
|
-
_issue.input
|
|
2271
|
+
if (!("input" in _issue)) _issue.input = payload.value;
|
|
2027
2272
|
_issue.inst ??= inst;
|
|
2028
2273
|
// _issue.continue ??= true;
|
|
2029
2274
|
payload.issues.push(util.issue(_issue));
|
|
@@ -2034,12 +2279,10 @@ export const ZodTransform: core.$constructor<ZodTransform> = /*@__PURE__*/ core.
|
|
|
2034
2279
|
if (output instanceof Promise) {
|
|
2035
2280
|
return output.then((output) => {
|
|
2036
2281
|
payload.value = output;
|
|
2037
|
-
payload.fallback = true;
|
|
2038
2282
|
return payload;
|
|
2039
2283
|
});
|
|
2040
2284
|
}
|
|
2041
2285
|
payload.value = output;
|
|
2042
|
-
payload.fallback = true;
|
|
2043
2286
|
return payload;
|
|
2044
2287
|
};
|
|
2045
2288
|
}
|
|
@@ -2271,7 +2514,7 @@ function _catch<T extends core.SomeType>(
|
|
|
2271
2514
|
return new ZodCatch({
|
|
2272
2515
|
type: "catch",
|
|
2273
2516
|
innerType: innerType as any as core.$ZodType,
|
|
2274
|
-
catchValue: (typeof catchValue === "function" ? catchValue : (
|
|
2517
|
+
catchValue: (typeof catchValue === "function" ? catchValue : core.util.constantCatch(catchValue)) as (
|
|
2275
2518
|
ctx: core.$ZodCatchCtx
|
|
2276
2519
|
) => core.output<T>,
|
|
2277
2520
|
}) as any;
|
|
@@ -2364,12 +2607,12 @@ export function invertCodec<A extends core.SomeType, B extends core.SomeType>(co
|
|
|
2364
2607
|
}
|
|
2365
2608
|
|
|
2366
2609
|
// ZodPreprocess
|
|
2367
|
-
export interface ZodPreprocess<B extends core.SomeType = core.$ZodType>
|
|
2368
|
-
extends ZodPipe<core.$ZodTransform, B>,
|
|
2369
|
-
core.$ZodPreprocess<B> {
|
|
2610
|
+
export interface ZodPreprocess<B extends core.SomeType = core.$ZodType, I = unknown>
|
|
2611
|
+
extends ZodPipe<core.$ZodTransform<unknown, I>, B>,
|
|
2612
|
+
core.$ZodPreprocess<B, I> {
|
|
2370
2613
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2371
|
-
_zod: core.$ZodPreprocessInternals<B>;
|
|
2372
|
-
def: core.$ZodPreprocessDef<B>;
|
|
2614
|
+
_zod: core.$ZodPreprocessInternals<B, I>;
|
|
2615
|
+
def: core.$ZodPreprocessDef<B, I>;
|
|
2373
2616
|
}
|
|
2374
2617
|
export const ZodPreprocess: core.$constructor<ZodPreprocess> = /*@__PURE__*/ core.$constructor(
|
|
2375
2618
|
"ZodPreprocess",
|
|
@@ -2595,14 +2838,36 @@ type ZodInstanceOfParams = core.Params<
|
|
|
2595
2838
|
core.$ZodIssueCustom,
|
|
2596
2839
|
"type" | "check" | "checks" | "fn" | "abort" | "error" | "params" | "path"
|
|
2597
2840
|
>;
|
|
2841
|
+
|
|
2842
|
+
// ZodInstanceOf
|
|
2843
|
+
export interface ZodInstanceOf<T = unknown> extends ZodCustom<T, T> {
|
|
2844
|
+
// the shape is keyed off the instance type, so keys autocomplete and a schema that can't accept the property's type is an error. Methods are excluded: every object literal inherits Object.prototype.toString, which would otherwise collide with the constraint's own toString entry and reject every shape.
|
|
2845
|
+
properties<Shape extends { [k in keyof T as T[k] extends Function ? never : k]?: core.$ZodType<unknown, T[k]> }>(
|
|
2846
|
+
shape: Shape,
|
|
2847
|
+
params?: string | core.$ZodCheckPropertiesParams
|
|
2848
|
+
): ZodInstanceOf<T & core.$InferObjectInput<Shape, {}>>;
|
|
2849
|
+
}
|
|
2850
|
+
export const ZodInstanceOf: core.$constructor<ZodInstanceOf> = /*@__PURE__*/ core.$constructor(
|
|
2851
|
+
"ZodInstanceOf",
|
|
2852
|
+
(inst, def) => {
|
|
2853
|
+
ZodCustom.init(inst, def);
|
|
2854
|
+
},
|
|
2855
|
+
{
|
|
2856
|
+
properties(shape: core.$ZodShape, params?: string | core.$ZodCheckPropertiesParams) {
|
|
2857
|
+
// asserts in place, so the narrowed output type is truthful without a wrapper
|
|
2858
|
+
return this.check(core._properties(shape, params)) as any;
|
|
2859
|
+
},
|
|
2860
|
+
}
|
|
2861
|
+
);
|
|
2862
|
+
|
|
2598
2863
|
function _instanceof<T extends typeof util.Class>(
|
|
2599
2864
|
cls: T,
|
|
2600
2865
|
params: ZodInstanceOfParams = {}
|
|
2601
|
-
):
|
|
2602
|
-
const inst = new
|
|
2866
|
+
): ZodInstanceOf<InstanceType<T>> {
|
|
2867
|
+
const inst = new ZodInstanceOf({
|
|
2603
2868
|
type: "custom",
|
|
2604
2869
|
check: "custom",
|
|
2605
|
-
fn: (data) => data instanceof cls,
|
|
2870
|
+
fn: (data: unknown) => data instanceof cls,
|
|
2606
2871
|
abort: true,
|
|
2607
2872
|
...(util.normalizeParams(params) as any),
|
|
2608
2873
|
});
|
|
@@ -2663,7 +2928,7 @@ export function json(params?: string | core.$ZodCustomParams): ZodJSONSchema {
|
|
|
2663
2928
|
export function preprocess<A, U extends core.SomeType, B = unknown>(
|
|
2664
2929
|
fn: (arg: B, ctx: core.$RefinementCtx) => A,
|
|
2665
2930
|
schema: U
|
|
2666
|
-
): ZodPreprocess<U> {
|
|
2931
|
+
): ZodPreprocess<U, B> {
|
|
2667
2932
|
return new ZodPreprocess({
|
|
2668
2933
|
type: "pipe",
|
|
2669
2934
|
in: transform(fn as any) as any as core.$ZodTransform,
|