@openclaw/fs-safe 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/dist/absolute-path.d.ts +0 -1
- package/dist/advanced.d.ts +0 -1
- package/dist/archive-crc32.d.ts +0 -1
- package/dist/archive-deadline.d.ts +0 -1
- package/dist/archive-durability.d.ts +0 -1
- package/dist/archive-entry.d.ts +0 -1
- package/dist/archive-errors.d.ts +0 -1
- package/dist/archive-gzip-tail.d.ts +0 -1
- package/dist/archive-input.d.ts +0 -1
- package/dist/archive-kind.d.ts +0 -1
- package/dist/archive-limits.d.ts +0 -1
- package/dist/archive-merge.d.ts +2 -4
- package/dist/archive-merge.js +14 -4
- package/dist/archive-native.d.ts +3 -15
- package/dist/archive-native.js +46 -71
- package/dist/archive-options.d.ts +7 -2
- package/dist/archive-parser-errors.d.ts +0 -1
- package/dist/archive-plan.d.ts +10 -1
- package/dist/archive-plan.js +31 -21
- package/dist/archive-policy.d.ts +0 -1
- package/dist/archive-read.d.ts +0 -1
- package/dist/archive-staging.d.ts +0 -1
- package/dist/archive-tar-inspect.d.ts +0 -1
- package/dist/archive-tar-stream.d.ts +0 -1
- package/dist/archive-tar-wasm.d.ts +0 -1
- package/dist/archive-tar.d.ts +0 -1
- package/dist/archive-zip-admission.d.ts +0 -1
- package/dist/archive-zip-count.d.ts +0 -1
- package/dist/archive-zip-directory.d.ts +0 -1
- package/dist/archive-zip-entry.d.ts +0 -1
- package/dist/archive-zip-integrity.d.ts +0 -1
- package/dist/archive-zip-loader.d.ts +0 -1
- package/dist/archive-zip-manifest.d.ts +0 -1
- package/dist/archive-zip-names.d.ts +0 -1
- package/dist/archive-zip-preflight.d.ts +0 -1
- package/dist/archive.d.ts +0 -1
- package/dist/archive.js +87 -164
- package/dist/async-lock.d.ts +0 -1
- package/dist/atomic.d.ts +0 -1
- package/dist/bounded-read-stream.d.ts +0 -1
- package/dist/bounded-read.d.ts +0 -1
- package/dist/byte-budget.d.ts +0 -1
- package/dist/byte-view.d.ts +0 -1
- package/dist/clone-metadata.d.ts +0 -1
- package/dist/config.d.ts +0 -1
- package/dist/containment.d.ts +0 -1
- package/dist/copy-file-input.d.ts +0 -1
- package/dist/copy-policy.d.ts +0 -1
- package/dist/copy-publication.d.ts +0 -1
- package/dist/copy-tree-portable.d.ts +0 -1
- package/dist/copy-tree-portable.js +9 -6
- package/dist/copy.d.ts +0 -1
- package/dist/copy.js +5 -5
- package/dist/create-directory.d.ts +0 -2
- package/dist/create-directory.js +3 -22
- package/dist/create-file-async.d.ts +0 -1
- package/dist/create-file.d.ts +0 -1
- package/dist/create-file.js +3 -14
- package/dist/create-owned-file.d.ts +0 -1
- package/dist/create.d.ts +1 -2
- package/dist/create.js +1 -1
- package/dist/creation-darwin.d.ts +0 -1
- package/dist/creation-file-state.d.ts +0 -1
- package/dist/creation-path.d.ts +2 -1
- package/dist/creation-path.js +12 -0
- package/dist/creation-permissions.d.ts +0 -1
- package/dist/creation-permissions.js +28 -38
- package/dist/deny-mutations.d.ts +2 -3
- package/dist/deny-mutations.js +55 -35
- package/dist/device-path.d.ts +0 -1
- package/dist/directory-durability.d.ts +0 -1
- package/dist/directory-entry-path.d.ts +0 -1
- package/dist/directory-guard.d.ts +2 -7
- package/dist/directory-guard.js +25 -56
- package/dist/directory-mode-node.d.ts +0 -1
- package/dist/directory-mode-owner.d.ts +0 -1
- package/dist/directory-receipt.d.ts +0 -1
- package/dist/durability.d.ts +0 -1
- package/dist/effective-uid.d.ts +0 -1
- package/dist/error-detail.d.ts +0 -1
- package/dist/errors.d.ts +0 -1
- package/dist/file-cleanup.d.ts +0 -1
- package/dist/file-contents.d.ts +0 -1
- package/dist/file-handle-transfer.d.ts +0 -1
- package/dist/file-hash.d.ts +0 -1
- package/dist/file-hash.js +170 -66
- package/dist/file-identity.d.ts +0 -1
- package/dist/file-lock-sync-acquisition.d.ts +22 -0
- package/dist/file-lock-sync-acquisition.js +98 -0
- package/dist/file-lock-sync-admission.d.ts +0 -2
- package/dist/file-lock-sync-admission.js +9 -48
- package/dist/file-lock-sync-root-acquire.d.ts +0 -1
- package/dist/file-lock-sync-root-acquire.js +32 -98
- package/dist/file-lock-sync-root-arbitration.d.ts +0 -1
- package/dist/file-lock-sync-root-held.d.ts +0 -1
- package/dist/file-lock-sync-root-io.d.ts +0 -1
- package/dist/file-lock-sync-root-mutation.d.ts +4 -5
- package/dist/file-lock-sync-root-mutation.js +7 -9
- package/dist/file-lock-sync-root-options.d.ts +0 -1
- package/dist/file-lock-sync-root-registration.d.ts +0 -1
- package/dist/file-lock-sync-root.d.ts +1 -2
- package/dist/file-lock-sync-root.js +14 -87
- package/dist/file-lock-sync-stale-admission.d.ts +2 -7
- package/dist/file-lock-sync-stale-admission.js +21 -23
- package/dist/file-lock-sync.d.ts +0 -1
- package/dist/file-lock-sync.js +38 -117
- package/dist/file-lock.d.ts +0 -1
- package/dist/file-observation.d.ts +0 -1
- package/dist/file-store-boundary.d.ts +0 -2
- package/dist/file-store-boundary.js +6 -26
- package/dist/file-store-copy-source.d.ts +1 -2
- package/dist/file-store-copy-source.js +1 -1
- package/dist/file-store-limit.d.ts +1 -2
- package/dist/file-store-limit.js +2 -3
- package/dist/file-store-path.d.ts +0 -1
- package/dist/file-store-prune.d.ts +0 -1
- package/dist/file-store-sync-directory.d.ts +0 -1
- package/dist/file-store-sync-directory.js +194 -231
- package/dist/file-store-sync-write.d.ts +0 -1
- package/dist/file-store-sync-write.js +16 -26
- package/dist/file-store.d.ts +0 -1
- package/dist/file-store.js +3 -4
- package/dist/file-sync.d.ts +0 -1
- package/dist/filename.d.ts +0 -1
- package/dist/filename.js +1 -7
- package/dist/fs.d.ts +0 -1
- package/dist/guarded-mkdir.d.ts +0 -1
- package/dist/guarded-mutation.d.ts +0 -7
- package/dist/guarded-mutation.js +6 -11
- package/dist/guest-dispatch-python.d.ts +0 -1
- package/dist/guest-dispatch-python.js +41 -90
- package/dist/guest-native-python.d.ts +0 -1
- package/dist/guest.d.ts +0 -1
- package/dist/home-dir.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/install-path.d.ts +0 -1
- package/dist/json-document-store.d.ts +0 -1
- package/dist/json-durable-queue-directory.d.ts +13 -1
- package/dist/json-durable-queue-directory.js +134 -0
- package/dist/json-durable-queue-ownership.d.ts +0 -1
- package/dist/json-durable-queue-ownership.js +42 -61
- package/dist/json-durable-queue-read.d.ts +0 -1
- package/dist/json-durable-queue-read.js +6 -6
- package/dist/json-durable-queue.d.ts +0 -1
- package/dist/json-durable-queue.js +7 -130
- package/dist/json-store.d.ts +0 -1
- package/dist/json-stringify.d.ts +0 -1
- package/dist/json.d.ts +0 -1
- package/dist/json.js +6 -15
- package/dist/local-file-access.d.ts +0 -1
- package/dist/local-file-access.js +3 -10
- package/dist/local-file-descriptor.d.ts +0 -1
- package/dist/local-roots.d.ts +0 -1
- package/dist/lock-config.d.ts +0 -1
- package/dist/move-path-cleanup.d.ts +0 -1
- package/dist/move-path-stage.d.ts +0 -1
- package/dist/move-path.d.ts +0 -1
- package/dist/mutation-authority.d.ts +0 -1
- package/dist/native-binding.d.ts +0 -1
- package/dist/native-config.d.ts +0 -1
- package/dist/native-directory-observation.d.ts +0 -1
- package/dist/native-fallback-warning.d.ts +0 -1
- package/dist/native-operations.d.ts +1 -5
- package/dist/native-operations.js +2 -6
- package/dist/native-parent-admission.d.ts +0 -1
- package/dist/native-pinned-write-windows.d.ts +0 -1
- package/dist/native-pinned-write.d.ts +0 -1
- package/dist/native-pinned-write.js +4 -10
- package/dist/native-policy-directory-observation.d.ts +0 -1
- package/dist/native-policy-parent-windows.d.ts +0 -1
- package/dist/native-rename-outcome.d.ts +0 -1
- package/dist/native-staged-file.d.ts +15 -3
- package/dist/native-staged-file.js +55 -63
- package/dist/native.d.ts +0 -1
- package/dist/opened-file-failure.d.ts +0 -1
- package/dist/opened-realpath.d.ts +0 -1
- package/dist/output.d.ts +0 -1
- package/dist/overwrite-file-handle.d.ts +0 -1
- package/dist/owner-dacl.d.ts +0 -1
- package/dist/path-case.d.ts +0 -1
- package/dist/path-policy.d.ts +0 -1
- package/dist/path-prefix.d.ts +0 -1
- package/dist/path-scope-lexical.d.ts +0 -1
- package/dist/path-segment-route.d.ts +0 -1
- package/dist/path-suffix-aliases.d.ts +0 -1
- package/dist/path.d.ts +0 -1
- package/dist/permission-exec.d.ts +0 -1
- package/dist/permission-exec.js +19 -25
- package/dist/permissions-public.d.ts +0 -1
- package/dist/permissions-windows.d.ts +2 -10
- package/dist/permissions-windows.js +10 -30
- package/dist/permissions.d.ts +0 -1
- package/dist/permissions.js +8 -16
- package/dist/pinned-mutation-admission.d.ts +0 -1
- package/dist/pinned-mutation-observation.d.ts +0 -1
- package/dist/pinned-mutation-shared-route.d.ts +0 -1
- package/dist/pinned-open.d.ts +1 -1
- package/dist/pinned-open.js +1 -1
- package/dist/pinned-operation.d.ts +0 -1
- package/dist/pinned-write-input.d.ts +0 -1
- package/dist/pinned-write-mode.d.ts +0 -1
- package/dist/pinned-write-staged.d.ts +0 -1
- package/dist/pinned-write-types.d.ts +9 -21
- package/dist/pinned-write.d.ts +0 -1
- package/dist/positional-read.d.ts +0 -1
- package/dist/private-directory.d.ts +0 -1
- package/dist/private-producer-handoff-sync.d.ts +0 -1
- package/dist/private-producer-handoff-sync.js +9 -51
- package/dist/private-producer-handoff.d.ts +20 -1
- package/dist/private-producer-handoff.js +69 -46
- package/dist/private-temp-workspace.d.ts +0 -1
- package/dist/private-temp-workspace.js +11 -36
- package/dist/publish-copy-stage.d.ts +0 -1
- package/dist/publish-file-failure.d.ts +0 -1
- package/dist/publish-file.d.ts +0 -1
- package/dist/read-open-flags.d.ts +0 -1
- package/dist/read-opened-file.d.ts +0 -1
- package/dist/realpath.d.ts +0 -1
- package/dist/recursive-mkdir-path.d.ts +0 -1
- package/dist/regular-file.d.ts +0 -1
- package/dist/regular-file.js +77 -139
- package/dist/replace-directory.d.ts +0 -1
- package/dist/replace-file-copy-fallback.d.ts +0 -1
- package/dist/replace-file-copy-fallback.js +14 -3
- package/dist/replace-file-copy-source.d.ts +0 -1
- package/dist/replace-file-copy-source.js +6 -1
- package/dist/replace-file-descriptor.d.ts +0 -1
- package/dist/replace-file-descriptor.js +6 -1
- package/dist/replace-file-mode.d.ts +0 -1
- package/dist/replace-file-rename-policy.d.ts +0 -1
- package/dist/replace-file-temp-owner.d.ts +12 -13
- package/dist/replace-file-temp-owner.js +66 -85
- package/dist/replace-file.d.ts +0 -1
- package/dist/retained-directory-replacement.d.ts +0 -1
- package/dist/root-boundary.d.ts +0 -1
- package/dist/root-context.d.ts +0 -1
- package/dist/root-create-input.d.ts +0 -1
- package/dist/root-directory-creation.d.ts +0 -1
- package/dist/root-directory-list.d.ts +0 -1
- package/dist/root-directory.d.ts +0 -1
- package/dist/root-entries.d.ts +0 -1
- package/dist/root-errors.d.ts +0 -1
- package/dist/root-file-final-admission.d.ts +0 -1
- package/dist/root-file.d.ts +0 -1
- package/dist/root-impl.d.ts +2 -10
- package/dist/root-impl.js +114 -91
- package/dist/root-move-noreplace.d.ts +0 -1
- package/dist/root-move-preflight.d.ts +0 -1
- package/dist/root-observed-path.d.ts +0 -1
- package/dist/root-options.d.ts +0 -1
- package/dist/root-path-errors.d.ts +0 -1
- package/dist/root-path-existing.d.ts +3 -1
- package/dist/root-path-existing.js +39 -18
- package/dist/root-path-observation.d.ts +0 -1
- package/dist/root-path-stat.d.ts +0 -1
- package/dist/root-path.d.ts +0 -1
- package/dist/root-path.js +60 -188
- package/dist/root-paths-lexical.d.ts +0 -1
- package/dist/root-paths.d.ts +0 -1
- package/dist/root-read-admission.d.ts +0 -1
- package/dist/root-read-admission.js +31 -44
- package/dist/root-remove-identity.d.ts +0 -1
- package/dist/root-remove-receipt.d.ts +0 -1
- package/dist/root-remove.d.ts +0 -1
- package/dist/root-symlink-policy.d.ts +0 -1
- package/dist/root-walk.d.ts +0 -1
- package/dist/root-write-admission.d.ts +0 -1
- package/dist/root-write-compatibility.d.ts +0 -1
- package/dist/root-write-complete-parent.d.ts +0 -1
- package/dist/root-write-lock-binding.d.ts +0 -1
- package/dist/root-write-mode.d.ts +0 -1
- package/dist/root-write-publication.d.ts +0 -1
- package/dist/root-write-verification.d.ts +0 -1
- package/dist/root.d.ts +0 -1
- package/dist/safe-path-segment.d.ts +1 -2
- package/dist/safe-path-segment.js +2 -5
- package/dist/secret-file.d.ts +0 -1
- package/dist/secret-file.js +7 -17
- package/dist/secret-read-async.d.ts +0 -1
- package/dist/secret-read-async.js +5 -5
- package/dist/secret-read-policy.d.ts +0 -1
- package/dist/secret.d.ts +0 -1
- package/dist/secure-file-windows.d.ts +0 -6
- package/dist/secure-file-windows.js +13 -28
- package/dist/secure-file.d.ts +0 -1
- package/dist/secure-file.js +9 -9
- package/dist/secure-temp-dir.d.ts +0 -1
- package/dist/secure-temp-repair.d.ts +0 -1
- package/dist/sibling-staged-file.d.ts +0 -1
- package/dist/sibling-staged-file.js +32 -39
- package/dist/sibling-temp.d.ts +0 -1
- package/dist/sidecar-lock-acquire.d.ts +1 -2
- package/dist/sidecar-lock-acquire.js +31 -52
- package/dist/sidecar-lock-admission-context.d.ts +0 -1
- package/dist/sidecar-lock-admission-parser.d.ts +0 -1
- package/dist/sidecar-lock-admission.d.ts +1 -5
- package/dist/sidecar-lock-admission.js +1 -7
- package/dist/sidecar-lock-handle.d.ts +0 -1
- package/dist/sidecar-lock-policy.d.ts +3 -1
- package/dist/sidecar-lock-policy.js +16 -0
- package/dist/sidecar-lock-reclaim.d.ts +0 -1
- package/dist/sidecar-lock-registration.d.ts +13 -0
- package/dist/sidecar-lock-registration.js +47 -0
- package/dist/sidecar-lock-root.d.ts +0 -1
- package/dist/sidecar-lock-stale-admission.d.ts +0 -1
- package/dist/sidecar-lock-target.d.ts +0 -1
- package/dist/sidecar-lock-types.d.ts +0 -1
- package/dist/sidecar-lock.d.ts +0 -1
- package/dist/sidecar-lock.js +16 -83
- package/dist/staged-directory.d.ts +0 -1
- package/dist/staged-file-settlement.d.ts +0 -1
- package/dist/staged-file-types.d.ts +0 -1
- package/dist/standalone-publication-path.d.ts +0 -1
- package/dist/stat-observation.d.ts +0 -1
- package/dist/store.d.ts +0 -1
- package/dist/strict-file-identity.d.ts +0 -1
- package/dist/string-coerce.d.ts +0 -1
- package/dist/suppressed-error.d.ts +0 -1
- package/dist/symlink-parents.d.ts +0 -1
- package/dist/temp-cleanup.d.ts +0 -1
- package/dist/temp-target.d.ts +0 -1
- package/dist/temp-target.js +7 -46
- package/dist/temp-workspace-admission.d.ts +0 -8
- package/dist/temp-workspace-admission.js +0 -4
- package/dist/temp-workspace-child-admission.d.ts +0 -4
- package/dist/temp-workspace-child-admission.js +0 -12
- package/dist/temp-workspace-descriptor.d.ts +0 -6
- package/dist/temp-workspace-descriptor.js +0 -2
- package/dist/temp-workspace-identity.d.ts +0 -1
- package/dist/temp-workspace-owner.d.ts +1 -1
- package/dist/temp-workspace-owner.js +45 -22
- package/dist/temp-workspace-permissions.d.ts +0 -1
- package/dist/temp-workspace-types.d.ts +0 -1
- package/dist/temp.d.ts +0 -1
- package/dist/test-hooks.d.ts +0 -1
- package/dist/text-atomic.d.ts +0 -1
- package/dist/timing.d.ts +0 -1
- package/dist/trash.d.ts +0 -1
- package/dist/types.d.ts +0 -1
- package/dist/unicode-path.d.ts +0 -1
- package/dist/walk.d.ts +0 -1
- package/dist/windows-command.d.ts +0 -1
- package/dist/windows-owner.d.ts +0 -1
- package/dist/windows-owner.js +4 -1
- package/dist/windows-path-alias.d.ts +0 -1
- package/dist/windows-path-alias.js +7 -43
- package/dist/windows-path-syntax.d.ts +5 -0
- package/dist/windows-path-syntax.js +21 -0
- package/dist/windows-security-command.d.ts +0 -1
- package/dist/windows-security-facts.d.ts +0 -1
- package/dist/write-file-handle.d.ts +0 -1
- package/dist/write-open-flags.d.ts +0 -1
- package/dist/write-queue.d.ts +0 -1
- package/docs/atomic.md +14 -0
- package/docs/copy.md +2 -0
- package/docs/mutation-policy-proof.md +6 -4
- package/docs/permissions.md +6 -0
- package/docs/root.md +10 -0
- package/docs/secret-file.md +4 -0
- package/docs/writing.md +9 -3
- package/package.json +8 -9
- package/dist/absolute-path.d.ts.map +0 -1
- package/dist/advanced.d.ts.map +0 -1
- package/dist/archive-crc32.d.ts.map +0 -1
- package/dist/archive-deadline.d.ts.map +0 -1
- package/dist/archive-durability.d.ts.map +0 -1
- package/dist/archive-entry.d.ts.map +0 -1
- package/dist/archive-errors.d.ts.map +0 -1
- package/dist/archive-gzip-tail.d.ts.map +0 -1
- package/dist/archive-input.d.ts.map +0 -1
- package/dist/archive-kind.d.ts.map +0 -1
- package/dist/archive-limits.d.ts.map +0 -1
- package/dist/archive-merge.d.ts.map +0 -1
- package/dist/archive-native.d.ts.map +0 -1
- package/dist/archive-options.d.ts.map +0 -1
- package/dist/archive-parser-errors.d.ts.map +0 -1
- package/dist/archive-plan.d.ts.map +0 -1
- package/dist/archive-policy.d.ts.map +0 -1
- package/dist/archive-read.d.ts.map +0 -1
- package/dist/archive-staging.d.ts.map +0 -1
- package/dist/archive-tar-inspect.d.ts.map +0 -1
- package/dist/archive-tar-stream.d.ts.map +0 -1
- package/dist/archive-tar-wasm.d.ts.map +0 -1
- package/dist/archive-tar.d.ts.map +0 -1
- package/dist/archive-zip-admission.d.ts.map +0 -1
- package/dist/archive-zip-count.d.ts.map +0 -1
- package/dist/archive-zip-directory.d.ts.map +0 -1
- package/dist/archive-zip-entry.d.ts.map +0 -1
- package/dist/archive-zip-integrity.d.ts.map +0 -1
- package/dist/archive-zip-loader.d.ts.map +0 -1
- package/dist/archive-zip-manifest.d.ts.map +0 -1
- package/dist/archive-zip-names.d.ts.map +0 -1
- package/dist/archive-zip-preflight.d.ts.map +0 -1
- package/dist/archive.d.ts.map +0 -1
- package/dist/async-lock.d.ts.map +0 -1
- package/dist/atomic.d.ts.map +0 -1
- package/dist/bounded-read-stream.d.ts.map +0 -1
- package/dist/bounded-read.d.ts.map +0 -1
- package/dist/byte-budget.d.ts.map +0 -1
- package/dist/byte-view.d.ts.map +0 -1
- package/dist/clone-metadata.d.ts.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/containment.d.ts.map +0 -1
- package/dist/copy-file-input.d.ts.map +0 -1
- package/dist/copy-policy.d.ts.map +0 -1
- package/dist/copy-publication.d.ts.map +0 -1
- package/dist/copy-tree-portable.d.ts.map +0 -1
- package/dist/copy.d.ts.map +0 -1
- package/dist/create-directory.d.ts.map +0 -1
- package/dist/create-file-async.d.ts.map +0 -1
- package/dist/create-file.d.ts.map +0 -1
- package/dist/create-owned-file.d.ts.map +0 -1
- package/dist/create.d.ts.map +0 -1
- package/dist/creation-darwin.d.ts.map +0 -1
- package/dist/creation-file-state.d.ts.map +0 -1
- package/dist/creation-path.d.ts.map +0 -1
- package/dist/creation-permissions.d.ts.map +0 -1
- package/dist/deny-mutations.d.ts.map +0 -1
- package/dist/device-path.d.ts.map +0 -1
- package/dist/directory-durability.d.ts.map +0 -1
- package/dist/directory-entry-path.d.ts.map +0 -1
- package/dist/directory-guard.d.ts.map +0 -1
- package/dist/directory-mode-node.d.ts.map +0 -1
- package/dist/directory-mode-owner.d.ts.map +0 -1
- package/dist/directory-receipt.d.ts.map +0 -1
- package/dist/durability.d.ts.map +0 -1
- package/dist/effective-uid.d.ts.map +0 -1
- package/dist/error-detail.d.ts.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/file-cleanup.d.ts.map +0 -1
- package/dist/file-contents.d.ts.map +0 -1
- package/dist/file-handle-transfer.d.ts.map +0 -1
- package/dist/file-hash.d.ts.map +0 -1
- package/dist/file-identity.d.ts.map +0 -1
- package/dist/file-lock-sync-admission.d.ts.map +0 -1
- package/dist/file-lock-sync-root-acquire.d.ts.map +0 -1
- package/dist/file-lock-sync-root-arbitration.d.ts.map +0 -1
- package/dist/file-lock-sync-root-held.d.ts.map +0 -1
- package/dist/file-lock-sync-root-io.d.ts.map +0 -1
- package/dist/file-lock-sync-root-mutation.d.ts.map +0 -1
- package/dist/file-lock-sync-root-options.d.ts.map +0 -1
- package/dist/file-lock-sync-root-registration.d.ts.map +0 -1
- package/dist/file-lock-sync-root.d.ts.map +0 -1
- package/dist/file-lock-sync-stale-admission.d.ts.map +0 -1
- package/dist/file-lock-sync.d.ts.map +0 -1
- package/dist/file-lock.d.ts.map +0 -1
- package/dist/file-observation.d.ts.map +0 -1
- package/dist/file-store-boundary.d.ts.map +0 -1
- package/dist/file-store-copy-source.d.ts.map +0 -1
- package/dist/file-store-limit.d.ts.map +0 -1
- package/dist/file-store-path.d.ts.map +0 -1
- package/dist/file-store-prune.d.ts.map +0 -1
- package/dist/file-store-sync-directory.d.ts.map +0 -1
- package/dist/file-store-sync-write.d.ts.map +0 -1
- package/dist/file-store.d.ts.map +0 -1
- package/dist/file-sync.d.ts.map +0 -1
- package/dist/filename.d.ts.map +0 -1
- package/dist/fs.d.ts.map +0 -1
- package/dist/guarded-mkdir.d.ts.map +0 -1
- package/dist/guarded-mutation.d.ts.map +0 -1
- package/dist/guest-dispatch-python.d.ts.map +0 -1
- package/dist/guest-native-python.d.ts.map +0 -1
- package/dist/guest.d.ts.map +0 -1
- package/dist/home-dir.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/install-path.d.ts.map +0 -1
- package/dist/json-document-store.d.ts.map +0 -1
- package/dist/json-durable-queue-directory.d.ts.map +0 -1
- package/dist/json-durable-queue-ownership.d.ts.map +0 -1
- package/dist/json-durable-queue-paths.d.ts +0 -11
- package/dist/json-durable-queue-paths.d.ts.map +0 -1
- package/dist/json-durable-queue-paths.js +0 -20
- package/dist/json-durable-queue-read.d.ts.map +0 -1
- package/dist/json-durable-queue.d.ts.map +0 -1
- package/dist/json-store.d.ts.map +0 -1
- package/dist/json-stringify.d.ts.map +0 -1
- package/dist/json.d.ts.map +0 -1
- package/dist/local-file-access.d.ts.map +0 -1
- package/dist/local-file-descriptor.d.ts.map +0 -1
- package/dist/local-roots.d.ts.map +0 -1
- package/dist/lock-config.d.ts.map +0 -1
- package/dist/move-path-cleanup.d.ts.map +0 -1
- package/dist/move-path-stage.d.ts.map +0 -1
- package/dist/move-path.d.ts.map +0 -1
- package/dist/mutation-authority.d.ts.map +0 -1
- package/dist/native-binding.d.ts.map +0 -1
- package/dist/native-config.d.ts.map +0 -1
- package/dist/native-directory-observation.d.ts.map +0 -1
- package/dist/native-fallback-warning.d.ts.map +0 -1
- package/dist/native-operations.d.ts.map +0 -1
- package/dist/native-parent-admission.d.ts.map +0 -1
- package/dist/native-pinned-write-windows.d.ts.map +0 -1
- package/dist/native-pinned-write.d.ts.map +0 -1
- package/dist/native-policy-directory-observation.d.ts.map +0 -1
- package/dist/native-policy-parent-windows.d.ts.map +0 -1
- package/dist/native-rename-outcome.d.ts.map +0 -1
- package/dist/native-staged-file.d.ts.map +0 -1
- package/dist/native.d.ts.map +0 -1
- package/dist/opened-file-failure.d.ts.map +0 -1
- package/dist/opened-realpath.d.ts.map +0 -1
- package/dist/output.d.ts.map +0 -1
- package/dist/overwrite-file-handle.d.ts.map +0 -1
- package/dist/owner-dacl.d.ts.map +0 -1
- package/dist/path-case.d.ts.map +0 -1
- package/dist/path-policy.d.ts.map +0 -1
- package/dist/path-prefix.d.ts.map +0 -1
- package/dist/path-scope-lexical.d.ts.map +0 -1
- package/dist/path-segment-route.d.ts.map +0 -1
- package/dist/path-suffix-aliases.d.ts.map +0 -1
- package/dist/path.d.ts.map +0 -1
- package/dist/permission-exec.d.ts.map +0 -1
- package/dist/permissions-public.d.ts.map +0 -1
- package/dist/permissions-windows.d.ts.map +0 -1
- package/dist/permissions.d.ts.map +0 -1
- package/dist/pinned-mutation-admission.d.ts.map +0 -1
- package/dist/pinned-mutation-observation.d.ts.map +0 -1
- package/dist/pinned-mutation-shared-route.d.ts.map +0 -1
- package/dist/pinned-open.d.ts.map +0 -1
- package/dist/pinned-operation.d.ts.map +0 -1
- package/dist/pinned-write-input.d.ts.map +0 -1
- package/dist/pinned-write-mode.d.ts.map +0 -1
- package/dist/pinned-write-staged.d.ts.map +0 -1
- package/dist/pinned-write-types.d.ts.map +0 -1
- package/dist/pinned-write.d.ts.map +0 -1
- package/dist/positional-read.d.ts.map +0 -1
- package/dist/private-directory.d.ts.map +0 -1
- package/dist/private-producer-handoff-sync.d.ts.map +0 -1
- package/dist/private-producer-handoff.d.ts.map +0 -1
- package/dist/private-temp-workspace.d.ts.map +0 -1
- package/dist/publish-copy-stage.d.ts.map +0 -1
- package/dist/publish-file-failure.d.ts.map +0 -1
- package/dist/publish-file.d.ts.map +0 -1
- package/dist/read-open-flags.d.ts.map +0 -1
- package/dist/read-opened-file.d.ts.map +0 -1
- package/dist/realpath.d.ts.map +0 -1
- package/dist/recursive-mkdir-path.d.ts.map +0 -1
- package/dist/regular-file.d.ts.map +0 -1
- package/dist/replace-directory.d.ts.map +0 -1
- package/dist/replace-file-copy-fallback.d.ts.map +0 -1
- package/dist/replace-file-copy-source.d.ts.map +0 -1
- package/dist/replace-file-descriptor.d.ts.map +0 -1
- package/dist/replace-file-mode.d.ts.map +0 -1
- package/dist/replace-file-rename-policy.d.ts.map +0 -1
- package/dist/replace-file-temp-owner.d.ts.map +0 -1
- package/dist/replace-file.d.ts.map +0 -1
- package/dist/retained-directory-replacement.d.ts.map +0 -1
- package/dist/root-boundary.d.ts.map +0 -1
- package/dist/root-context.d.ts.map +0 -1
- package/dist/root-create-input.d.ts.map +0 -1
- package/dist/root-directory-creation.d.ts.map +0 -1
- package/dist/root-directory-list.d.ts.map +0 -1
- package/dist/root-directory.d.ts.map +0 -1
- package/dist/root-entries.d.ts.map +0 -1
- package/dist/root-errors.d.ts.map +0 -1
- package/dist/root-file-final-admission.d.ts.map +0 -1
- package/dist/root-file.d.ts.map +0 -1
- package/dist/root-impl.d.ts.map +0 -1
- package/dist/root-move-noreplace.d.ts.map +0 -1
- package/dist/root-move-preflight.d.ts.map +0 -1
- package/dist/root-observed-path.d.ts.map +0 -1
- package/dist/root-options.d.ts.map +0 -1
- package/dist/root-path-errors.d.ts.map +0 -1
- package/dist/root-path-existing.d.ts.map +0 -1
- package/dist/root-path-observation.d.ts.map +0 -1
- package/dist/root-path-stat.d.ts.map +0 -1
- package/dist/root-path-symlink.d.ts +0 -7
- package/dist/root-path-symlink.d.ts.map +0 -1
- package/dist/root-path-symlink.js +0 -55
- package/dist/root-path.d.ts.map +0 -1
- package/dist/root-paths-lexical.d.ts.map +0 -1
- package/dist/root-paths.d.ts.map +0 -1
- package/dist/root-read-admission.d.ts.map +0 -1
- package/dist/root-remove-identity.d.ts.map +0 -1
- package/dist/root-remove-receipt.d.ts.map +0 -1
- package/dist/root-remove.d.ts.map +0 -1
- package/dist/root-symlink-policy.d.ts.map +0 -1
- package/dist/root-walk.d.ts.map +0 -1
- package/dist/root-write-admission.d.ts.map +0 -1
- package/dist/root-write-compatibility.d.ts.map +0 -1
- package/dist/root-write-complete-parent.d.ts.map +0 -1
- package/dist/root-write-lock-binding.d.ts.map +0 -1
- package/dist/root-write-mode.d.ts.map +0 -1
- package/dist/root-write-publication.d.ts.map +0 -1
- package/dist/root-write-verification.d.ts.map +0 -1
- package/dist/root.d.ts.map +0 -1
- package/dist/safe-path-segment.d.ts.map +0 -1
- package/dist/secret-file.d.ts.map +0 -1
- package/dist/secret-read-async.d.ts.map +0 -1
- package/dist/secret-read-policy.d.ts.map +0 -1
- package/dist/secret.d.ts.map +0 -1
- package/dist/secure-file-windows.d.ts.map +0 -1
- package/dist/secure-file.d.ts.map +0 -1
- package/dist/secure-temp-dir.d.ts.map +0 -1
- package/dist/secure-temp-repair.d.ts.map +0 -1
- package/dist/sibling-staged-file.d.ts.map +0 -1
- package/dist/sibling-temp.d.ts.map +0 -1
- package/dist/sidecar-lock-acquire.d.ts.map +0 -1
- package/dist/sidecar-lock-admission-context.d.ts.map +0 -1
- package/dist/sidecar-lock-admission-parser.d.ts.map +0 -1
- package/dist/sidecar-lock-admission.d.ts.map +0 -1
- package/dist/sidecar-lock-handle.d.ts.map +0 -1
- package/dist/sidecar-lock-policy.d.ts.map +0 -1
- package/dist/sidecar-lock-reclaim.d.ts.map +0 -1
- package/dist/sidecar-lock-root.d.ts.map +0 -1
- package/dist/sidecar-lock-stale-admission.d.ts.map +0 -1
- package/dist/sidecar-lock-target.d.ts.map +0 -1
- package/dist/sidecar-lock-types.d.ts.map +0 -1
- package/dist/sidecar-lock.d.ts.map +0 -1
- package/dist/staged-directory.d.ts.map +0 -1
- package/dist/staged-file-settlement.d.ts.map +0 -1
- package/dist/staged-file-types.d.ts.map +0 -1
- package/dist/standalone-publication-path.d.ts.map +0 -1
- package/dist/stat-observation.d.ts.map +0 -1
- package/dist/store.d.ts.map +0 -1
- package/dist/strict-file-identity.d.ts.map +0 -1
- package/dist/string-coerce.d.ts.map +0 -1
- package/dist/suppressed-error.d.ts.map +0 -1
- package/dist/symlink-parents.d.ts.map +0 -1
- package/dist/temp-cleanup.d.ts.map +0 -1
- package/dist/temp-target.d.ts.map +0 -1
- package/dist/temp-workspace-admission.d.ts.map +0 -1
- package/dist/temp-workspace-child-admission.d.ts.map +0 -1
- package/dist/temp-workspace-descriptor.d.ts.map +0 -1
- package/dist/temp-workspace-identity.d.ts.map +0 -1
- package/dist/temp-workspace-owner.d.ts.map +0 -1
- package/dist/temp-workspace-permissions.d.ts.map +0 -1
- package/dist/temp-workspace-types.d.ts.map +0 -1
- package/dist/temp.d.ts.map +0 -1
- package/dist/test-hooks.d.ts.map +0 -1
- package/dist/text-atomic.d.ts.map +0 -1
- package/dist/timing.d.ts.map +0 -1
- package/dist/trash.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/unicode-path.d.ts.map +0 -1
- package/dist/walk.d.ts.map +0 -1
- package/dist/windows-command.d.ts.map +0 -1
- package/dist/windows-owner.d.ts.map +0 -1
- package/dist/windows-path-alias.d.ts.map +0 -1
- package/dist/windows-security-command.d.ts.map +0 -1
- package/dist/windows-security-facts.d.ts.map +0 -1
- package/dist/write-file-handle.d.ts.map +0 -1
- package/dist/write-open-flags.d.ts.map +0 -1
- package/dist/write-queue.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.18.0 - 2026-09-21
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- **Security hardening for Root arguments:** explicit paths, payloads, and copy sources take precedence over matching properties in wider options objects. A supplied source Root retains its admission and read policy; directory creation and writable opens keep their internal controls. ([#577](https://github.com/openclaw/fs-safe/pull/577))
|
|
10
|
+
- **More reliable cancellation and failure reporting:** tree-copy workers receive cancellation even when caller abort handlers stop event propagation. Secret reads and asynchronous atomic operations preserve their selected failures when best-effort descriptor cleanup also fails. ([#561](https://github.com/openclaw/fs-safe/pull/561), [#566](https://github.com/openclaw/fs-safe/pull/566), [#545](https://github.com/openclaw/fs-safe/pull/545), [#554](https://github.com/openclaw/fs-safe/pull/554))
|
|
11
|
+
- **Reliable Windows publication and ownership checks:** keep missing buffered-write destinations absent until complete content is published, including across process interruption, and preserve write-only access when admitting a destination that appears during staging. Permission-query results must explicitly verify owner locality. ([#573](https://github.com/openclaw/fs-safe/pull/573), [#547](https://github.com/openclaw/fs-safe/pull/547))
|
|
12
|
+
- **Less repeated work in targeted workloads:** reduce metadata observations and Promise scheduling in secret reads, Root path resolution, and durable queues; reuse bounded, cleared scratch storage for fallback SHA-256. Measurements show gains in selected Linux read workloads, with workload-specific costs retained in the linked PRs. ([#535](https://github.com/openclaw/fs-safe/pull/535), [#536](https://github.com/openclaw/fs-safe/pull/536), [#549](https://github.com/openclaw/fs-safe/pull/549), [#550](https://github.com/openclaw/fs-safe/pull/550))
|
|
13
|
+
- **Smaller npm installs with intact TypeScript declarations:** stop shipping declaration maps that point to unpublished source files. Public declarations and exports remain available. Thanks @vincentkoc. ([#570](https://github.com/openclaw/fs-safe/pull/570))
|
|
14
|
+
|
|
15
|
+
### Compatibility and upgrade notes
|
|
16
|
+
|
|
17
|
+
- Explicit Root arguments remain authoritative even when JavaScript callers or structurally wider TypeScript options include `relativePath`, `data`, or `source`. Enumerable option getters still run and can throw; supported defaults and policy options keep their precedence. This fixes argument selection within the existing filesystem capability contract. ([#577](https://github.com/openclaw/fs-safe/pull/577), [Root contract](https://github.com/openclaw/fs-safe/blob/v0.18.0/docs/root.md))
|
|
18
|
+
- Injected Windows permission executors must return valid owner/current-user SIDs, an explicit boolean `remote`, and complete DACL facts. Missing or nonboolean locality leaves both inspectors unverified; `remote: true` retains the ACL report but does not grant trusted ownership. ([#547](https://github.com/openclaw/fs-safe/pull/547), [permission-query contract](https://github.com/openclaw/fs-safe/blob/v0.18.0/docs/permissions.md))
|
|
19
|
+
- Descriptor-close behavior remains operation-specific. Synchronous secret readers report a lone close failure before trimming or empty-content validation, while an earlier read or identity failure retains precedence. Atomic best-effort cleanup now treats synchronous adapter throws like rejected close promises; synchronous successful admission, parent-mode admission, and retained descriptor-owner closes keep their existing failure reporting. ([#566](https://github.com/openclaw/fs-safe/pull/566), [#545](https://github.com/openclaw/fs-safe/pull/545), [#554](https://github.com/openclaw/fs-safe/pull/554), [atomic cleanup contract](https://github.com/openclaw/fs-safe/blob/v0.18.0/docs/atomic.md))
|
|
20
|
+
- Root path properties are readonly metadata. Each Root retains its originally admitted canonical directory and identity; create another Root to select a different directory. Values in the supplied defaults object remain live for later operations. ([#546](https://github.com/openclaw/fs-safe/pull/546))
|
|
21
|
+
|
|
22
|
+
### Security hardening and correctness
|
|
23
|
+
|
|
24
|
+
- Preserve positional paths and payloads across Root reads, writable opens, writes, creates, appends, removals, and copies, including JSON and streamed wrappers. Keep Root-scoped copy sources authoritative instead of allowing an options property to substitute a raw path. `mkdir()` and `ensureRoot()` retain their distinct root-directory rules, and internal removal or writable-open fields cannot replace their caller-owned controls. ([#577](https://github.com/openclaw/fs-safe/pull/577))
|
|
25
|
+
- Keep missing destinations absent until buffered Windows `Root.write()` publishes complete content; existing destinations retain their previous bytes during staging. Re-admit raced destinations before replacement, preserving write-only access, link rejection, final authority checks, and cleanup. ([#573](https://github.com/openclaw/fs-safe/pull/573))
|
|
26
|
+
- Isolate tree-copy cancellation from caller event handlers across native cloning and portable byte-copy fallback. Preserve caller handlers, first-failure selection, and per-file cancellation; join admitted work before releasing descriptors and native signal handlers. Dispatched APFS/Btrfs bulk operations remain uninterruptible, and failed or cancelled copies can leave caller-owned output. ([#561](https://github.com/openclaw/fs-safe/pull/561), [copy cancellation contract](https://github.com/openclaw/fs-safe/blob/v0.18.0/docs/copy.md))
|
|
27
|
+
- Preserve synchronous secret-read and identity-validation errors, including their causes, when closing the descriptor also fails. Make one close attempt and retain the existing lone-close failure behavior. ([#566](https://github.com/openclaw/fs-safe/pull/566))
|
|
28
|
+
- Preserve asynchronous copy-source results and destination-admission failures when custom filesystem adapters throw synchronously during best-effort close. Apply the same handling to atomic admission pins, best-effort parent synchronization, and replacement pins that were not adopted, without changing filesystem identity checks or retained-owner close policy. ([#545](https://github.com/openclaw/fs-safe/pull/545), [#554](https://github.com/openclaw/fs-safe/pull/554))
|
|
29
|
+
- Reject unverified Windows owner locality while retaining valid local/remote classification, SID-validation precedence, bounded diagnostics, and exact rejected values. Share permission-report metadata across native and command inspection without sharing mutable public results or changing ACL policy. ([#547](https://github.com/openclaw/fs-safe/pull/547), [#567](https://github.com/openclaw/fs-safe/pull/567))
|
|
30
|
+
|
|
31
|
+
### Performance and package size
|
|
32
|
+
|
|
33
|
+
- Reduce redundant metadata observations and scheduling in secret reads, regular-file admission, and staged publication. An isolated Linux comparison measured `readSecretFileSync()` about 11% faster; five other measured calls were roughly unchanged. Exact identity and mutation checks remain. ([#535](https://github.com/openclaw/fs-safe/pull/535))
|
|
34
|
+
- Share Root metadata traversal and reuse normalized missing-path suffixes instead of rebuilding per-component arrays. An isolated Linux/native-off comparison measured roughly 3–4% lower resolver medians, with a slightly higher maximum synchronous sample average. Preserve async/sync canonicalization routes, Windows alias rejection, dangling-link behavior, and observation receipts. ([#536](https://github.com/openclaw/fs-safe/pull/536), [#562](https://github.com/openclaw/fs-safe/pull/562))
|
|
35
|
+
- Consolidate durable-queue directory and metadata ownership while retaining asynchronous file I/O, path admission, exact identities, and recovery synchronization. Small and 64 KiB reads measured 8.68% and 13.78% faster in a balanced Linux comparison; durable medians stayed within −1.09% to +1.21%, with isolated higher maxima documented. ([#549](https://github.com/openclaw/fs-safe/pull/549))
|
|
36
|
+
- Reuse scratch storage between fallback SHA-256 operations, retaining at most four idle buffers of up to 256 KiB each. Clear used contents before retention and keep each pending read's storage exclusive until settlement, including cancellation; preserve byte limits and borrowed descriptor cursors. ([#550](https://github.com/openclaw/fs-safe/pull/550))
|
|
37
|
+
- Share Windows drive and namespace syntax checks without rewriting whole inputs during network classification. Predicate measurements showed gains for normal Windows paths under Linux with explicit Windows rules and a small rooted-alias cost; they do not establish end-to-end Windows throughput. ([#539](https://github.com/openclaw/fs-safe/pull/539))
|
|
38
|
+
- Omit `.d.ts.map` output and package entries whose targets are unpublished TypeScript sources, and make package validation reject those maps. The PR's baseline/candidate comparison measured a 5.8% smaller compressed package and 7.8% smaller unpacked package; declarations and public exports remain intact. Thanks @vincentkoc. ([#570](https://github.com/openclaw/fs-safe/pull/570))
|
|
39
|
+
|
|
40
|
+
### Maintenance and platform validation
|
|
41
|
+
|
|
42
|
+
- Consolidate archive staging, directory admission, temporary ownership, synchronous store receipt chains, lock registration and acquisition, and ordered mutation-denial policy. Preserve authority boundaries, exact identity checks, callback ordering, stale recovery, and publication/cleanup ownership. These are maintenance changes; measured raw-lock overhead and other control tradeoffs remain documented in their PRs. ([#535](https://github.com/openclaw/fs-safe/pull/535), [#537](https://github.com/openclaw/fs-safe/pull/537), [#538](https://github.com/openclaw/fs-safe/pull/538), [#542](https://github.com/openclaw/fs-safe/pull/542))
|
|
43
|
+
- Specialize private lock, store, JSON retry, filename, rename, and move-cleanup helpers to their existing callers; remove unused descriptor projections and native lock-handle methods. Preserve public defaults, shared validators, Windows device-name protection, root replacement checks, and trash fallback behavior. Share write-policy callback types without changing emitted JavaScript or public type semantics. ([#551](https://github.com/openclaw/fs-safe/pull/551), [#552](https://github.com/openclaw/fs-safe/pull/552), [#556](https://github.com/openclaw/fs-safe/pull/556), [#558](https://github.com/openclaw/fs-safe/pull/558), [#546](https://github.com/openclaw/fs-safe/pull/546), [#543](https://github.com/openclaw/fs-safe/pull/543))
|
|
44
|
+
- Share guest Python operand admission and descriptor cleanup, retain native POSIX beneath-open descriptors until handoff, and use the shared Windows handle owner for process tokens. Simplify native task settlement, SHA-256 worker state, and Unix cleanup forwarding while preserving containment, positioned reads, cancellation checks, handle ownership, and error precedence. ([#540](https://github.com/openclaw/fs-safe/pull/540), [#541](https://github.com/openclaw/fs-safe/pull/541), [#535](https://github.com/openclaw/fs-safe/pull/535), [#555](https://github.com/openclaw/fs-safe/pull/555), [#565](https://github.com/openclaw/fs-safe/pull/565))
|
|
45
|
+
- Use existing Windows SDK declarations for native syscalls and verify the built addon's imports in installed npm and pnpm consumers. Share native link/rename admission and the archive entry schema; simplify Windows relative-open policy while preserving source-before-target errors, manifest snapshots, reparse checks, exact created-directory ownership, and hardlink access. ([#563](https://github.com/openclaw/fs-safe/pull/563), [#560](https://github.com/openclaw/fs-safe/pull/560), [#564](https://github.com/openclaw/fs-safe/pull/564), [#559](https://github.com/openclaw/fs-safe/pull/559))
|
|
46
|
+
- Keep filesystem fixtures and backend settings alive until timed-out operations settle, make the in-flight archive deadline regression deterministic, and exercise queue recovery where directory synchronization is unsupported. Send guest-test stdin only to operations that consume it and give the durable copy-restoration regression its instrumented Windows budget. Expand public mutation proof selection to shared policy/path owners without weakening runtime deadlines or settlement assertions. ([#553](https://github.com/openclaw/fs-safe/pull/553), [#556](https://github.com/openclaw/fs-safe/pull/556), [#549](https://github.com/openclaw/fs-safe/pull/549), [#543](https://github.com/openclaw/fs-safe/pull/543), [#540](https://github.com/openclaw/fs-safe/pull/540), [#538](https://github.com/openclaw/fs-safe/pull/538))
|
|
47
|
+
|
|
5
48
|
## 0.17.0 - 2026-09-20
|
|
6
49
|
|
|
7
50
|
### Highlights
|
package/dist/absolute-path.d.ts
CHANGED
|
@@ -30,4 +30,3 @@ export declare function resolveAbsolutePathForRead(filePath: string, options?: {
|
|
|
30
30
|
export declare function resolveAbsolutePathForWrite(filePath: string, options?: {
|
|
31
31
|
symlinks?: AbsolutePathSymlinkPolicy;
|
|
32
32
|
}): Promise<ResolvedWritableAbsolutePath>;
|
|
33
|
-
//# sourceMappingURL=absolute-path.d.ts.map
|
package/dist/advanced.d.ts
CHANGED
|
@@ -33,4 +33,3 @@ export { appendRegularFile, appendRegularFileSync, readRegularFile, readRegularF
|
|
|
33
33
|
export { buildRandomTempFilePath, sanitizeTempFileName, type TempFile, tempFile, withTempFile, } from "./temp-target.js";
|
|
34
34
|
export { writeSiblingTempFile, writeViaSiblingTempPath, type WriteSiblingTempFileOptions, type WriteSiblingTempFileResult, } from "./sibling-temp.js";
|
|
35
35
|
export { createIcaclsResetCommand, formatIcaclsResetCommand, formatWindowsAclSummary, inspectWindowsAcl, parseIcaclsOutput, resolveWindowsUserPrincipal, summarizeWindowsAcl, type IcaclsResetCommandOptions, type PermissionCommandFailure, type PermissionExec, type WindowsAclEntry, type WindowsAclSummary, } from "./permissions.js";
|
|
36
|
-
//# sourceMappingURL=advanced.d.ts.map
|
package/dist/archive-crc32.d.ts
CHANGED
|
@@ -9,4 +9,3 @@ export declare function ownExtractionDestinationMutation<T>(deadline: Extraction
|
|
|
9
9
|
export declare function createPipelineTimeoutError(err: unknown, deadline: ExtractionDeadline): unknown;
|
|
10
10
|
export declare function waitForDeadline<T>(promise: Promise<T>, deadline: ExtractionDeadline): Promise<T>;
|
|
11
11
|
export declare function withExtractionDeadline<T>(timeoutMs: number, label: string, run: (deadline: ExtractionDeadline) => Promise<T>): Promise<T>;
|
|
12
|
-
//# sourceMappingURL=archive-deadline.d.ts.map
|
package/dist/archive-entry.d.ts
CHANGED
package/dist/archive-errors.d.ts
CHANGED
|
@@ -10,4 +10,3 @@ export declare class ArchiveFormatError extends Error {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function isArchiveFormatErrorMessage(message: string): boolean;
|
|
12
12
|
export declare function isArchiveTarPathErrorMessage(message: string): boolean;
|
|
13
|
-
//# sourceMappingURL=archive-errors.d.ts.map
|
|
@@ -18,4 +18,3 @@ export declare class GzipInput extends Writable {
|
|
|
18
18
|
/** Check the immutable staged suffix from the first unused physical byte,
|
|
19
19
|
* including later chunks the decoder may have consumed, before returning. */
|
|
20
20
|
export declare function validateGzipContainerTail(filePath: string, consumed: number, signal?: AbortSignal): Promise<void>;
|
|
21
|
-
//# sourceMappingURL=archive-gzip-tail.d.ts.map
|
package/dist/archive-input.d.ts
CHANGED
package/dist/archive-kind.d.ts
CHANGED
package/dist/archive-limits.d.ts
CHANGED
package/dist/archive-merge.d.ts
CHANGED
|
@@ -14,11 +14,9 @@ type MergeParams = {
|
|
|
14
14
|
type GuardedMergeParams = Pick<MergeParams, "sourceDir" | "deadline"> & {
|
|
15
15
|
destinationGuard: ArchiveDirectoryGuard;
|
|
16
16
|
};
|
|
17
|
-
export declare function
|
|
18
|
-
entries: readonly ArchivePublicationEntry[];
|
|
17
|
+
export declare function withStagedArchivePublication(params: Omit<GuardedMergeParams, "sourceDir"> & {
|
|
19
18
|
durable?: boolean;
|
|
20
19
|
entryUmask?: number;
|
|
21
|
-
}): Promise<void>;
|
|
20
|
+
}, extract: (stagingDir: string) => Promise<readonly ArchivePublicationEntry[]>): Promise<void>;
|
|
22
21
|
export declare function mergeExtractedTreeIntoDestination(params: MergeParams): Promise<void>;
|
|
23
22
|
export {};
|
|
24
|
-
//# sourceMappingURL=archive-merge.d.ts.map
|
package/dist/archive-merge.js
CHANGED
|
@@ -2,7 +2,7 @@ import fsSync from "node:fs";
|
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { ownExtractionDestinationMutation } from "./archive-deadline.js";
|
|
5
|
-
import { assertDirectoryIdentityGuard, assertResolvedInsideDestination, createDirectoryIdentityGuard, createArchiveSymlinkTraversalError, preparePrivateArchiveOutputPath, } from "./archive-staging.js";
|
|
5
|
+
import { assertDirectoryIdentityGuard, assertResolvedInsideDestination, createDirectoryIdentityGuard, createArchiveSymlinkTraversalError, preparePrivateArchiveOutputPath, withStagedArchiveDestination, } from "./archive-staging.js";
|
|
6
6
|
import {} from "./directory-mode-owner.js";
|
|
7
7
|
import { pinNodeDirectoryForMode } from "./directory-mode-node.js";
|
|
8
8
|
import { assertSyncDirectoryGuard, inspectDirectoryIdentitySync } from "./directory-guard.js";
|
|
@@ -18,9 +18,19 @@ import { syncFileBestEffortSync } from "./file-sync.js";
|
|
|
18
18
|
import { finalizeArchivePublication } from "./archive-durability.js";
|
|
19
19
|
import { assertNoWindowsPathAlias } from "./windows-path-alias.js";
|
|
20
20
|
import { inspectFileIdentitySync } from "./strict-file-identity.js";
|
|
21
|
-
export async function
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
export async function withStagedArchivePublication(params, extract) {
|
|
22
|
+
await withStagedArchiveDestination({
|
|
23
|
+
destinationRealDir: params.destinationGuard.realPath,
|
|
24
|
+
run: async (stagingPath) => {
|
|
25
|
+
const sourceDir = realpathSync.native(stagingPath);
|
|
26
|
+
const entries = await extract(sourceDir);
|
|
27
|
+
params.deadline?.check();
|
|
28
|
+
const mergeParams = { ...params, sourceDir };
|
|
29
|
+
assertMergePathInputs(mergeParams);
|
|
30
|
+
await mergeTree(mergeParams, entries, params.durable === true, params.entryUmask);
|
|
31
|
+
params.deadline?.check();
|
|
32
|
+
},
|
|
33
|
+
});
|
|
24
34
|
}
|
|
25
35
|
export async function mergeExtractedTreeIntoDestination(params) {
|
|
26
36
|
const sourceDir = params.sourceDir;
|
package/dist/archive-native.d.ts
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
import type { ExtractionDeadline } from "./archive-deadline.js";
|
|
2
1
|
import type { ArchiveKind } from "./archive-kind.js";
|
|
3
|
-
import { type
|
|
4
|
-
import type {
|
|
2
|
+
import { type TarMeterLimits } from "./archive-limits.js";
|
|
3
|
+
import type { StagedArchiveExtractOptions } from "./archive-options.js";
|
|
5
4
|
import type { NativeBinding } from "./native.js";
|
|
6
5
|
export declare function throwMappedNativeArchiveError(error: unknown): never;
|
|
7
|
-
export declare function extractNativeArchive(params: {
|
|
8
|
-
durable?: boolean;
|
|
6
|
+
export declare function extractNativeArchive(params: StagedArchiveExtractOptions & {
|
|
9
7
|
binding: NativeBinding;
|
|
10
|
-
archivePath: string;
|
|
11
|
-
destDir: string;
|
|
12
8
|
kind: ArchiveKind;
|
|
13
|
-
stripComponents?: number;
|
|
14
|
-
limits: ResolvedArchiveExtractLimits;
|
|
15
9
|
tarLimits: TarMeterLimits;
|
|
16
|
-
deadline: ExtractionDeadline;
|
|
17
|
-
entryModes?: ExtractArchiveOptions["entryModes"];
|
|
18
|
-
entryUmask?: number;
|
|
19
|
-
entryFilter?: ExtractArchiveOptions["entryFilter"];
|
|
20
|
-
onFiltered?: ExtractArchiveOptions["onFiltered"];
|
|
21
10
|
}): Promise<void>;
|
|
22
|
-
//# sourceMappingURL=archive-native.d.ts.map
|
package/dist/archive-native.js
CHANGED
|
@@ -4,10 +4,9 @@ import fs from "node:fs/promises";
|
|
|
4
4
|
import { ArchiveFormatError, isArchiveFormatErrorMessage, } from "./archive-errors.js";
|
|
5
5
|
import { validateArchiveEntryPath } from "./archive-entry.js";
|
|
6
6
|
import { createArchiveEntryPlanner } from "./archive-plan.js";
|
|
7
|
-
import { stageArchiveFileForExtraction } from "./archive-input.js";
|
|
8
7
|
import { assertArchiveEntryCountWithinLimit, } from "./archive-limits.js";
|
|
9
|
-
import { prepareArchiveDestinationGuard
|
|
10
|
-
import {
|
|
8
|
+
import { prepareArchiveDestinationGuard } from "./archive-staging.js";
|
|
9
|
+
import { withStagedArchivePublication } from "./archive-merge.js";
|
|
11
10
|
import { admitZipFile } from "./archive-zip-admission.js";
|
|
12
11
|
import { validateNativeZipManifest } from "./archive-zip-manifest.js";
|
|
13
12
|
export function throwMappedNativeArchiveError(error) {
|
|
@@ -25,74 +24,50 @@ export function throwMappedNativeArchiveError(error) {
|
|
|
25
24
|
throw error;
|
|
26
25
|
}
|
|
27
26
|
export async function extractNativeArchive(params) {
|
|
28
|
-
const { limits, tarLimits } = params;
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
limits,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
const { archivePath, limits, tarLimits, deadline } = params;
|
|
28
|
+
const zipEntries = [];
|
|
29
|
+
if (params.kind === "zip") {
|
|
30
|
+
await admitZipFile(archivePath, limits, deadline, (entry) => { zipEntries.push(entry); });
|
|
31
|
+
}
|
|
32
|
+
const destinationGuard = await prepareArchiveDestinationGuard(params.destDir);
|
|
33
|
+
await withStagedArchivePublication({ ...params, destinationGuard }, async (stagingDir) => {
|
|
34
|
+
deadline.check();
|
|
35
|
+
// N-API retains completed task state on its signal; each pass needs its own.
|
|
36
|
+
const manifest = await params.binding
|
|
37
|
+
.inspectArchiveNative(archivePath, params.kind, tarLimits, AbortSignal.any([deadline.signal]))
|
|
38
|
+
.catch(throwMappedNativeArchiveError);
|
|
39
|
+
deadline.check();
|
|
40
|
+
assertArchiveEntryCountWithinLimit(manifest.length, limits);
|
|
36
41
|
if (params.kind === "zip") {
|
|
37
|
-
|
|
42
|
+
validateNativeZipManifest(manifest, zipEntries);
|
|
38
43
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
: entry.mode;
|
|
69
|
-
const accepted = planEntry({ ...entry, mode });
|
|
70
|
-
if (accepted)
|
|
71
|
-
plan.push({ ...accepted, index: entry.index });
|
|
72
|
-
}
|
|
73
|
-
const directory = await fs.open(stagingDir, fsConstants.O_RDONLY |
|
|
74
|
-
(typeof fsConstants.O_DIRECTORY === "number" ? fsConstants.O_DIRECTORY : 0));
|
|
75
|
-
try {
|
|
76
|
-
params.deadline.check();
|
|
77
|
-
await params.binding.extractArchiveNative(stagedArchive.path, params.kind, directory.fd, plan.map((entry) => ({ ...entry, mode: entry.kind === "directory" ? 0o700 : 0o600 })), tarLimits, AbortSignal.any([params.deadline.signal])).catch(throwMappedNativeArchiveError);
|
|
78
|
-
}
|
|
79
|
-
finally {
|
|
80
|
-
await directory.close().catch(() => undefined);
|
|
81
|
-
}
|
|
82
|
-
params.deadline.check();
|
|
83
|
-
await mergePlannedArchiveIntoDestination({
|
|
84
|
-
entries: plan,
|
|
85
|
-
durable: params.durable,
|
|
86
|
-
entryUmask: params.entryUmask,
|
|
87
|
-
sourceDir: stagingDir,
|
|
88
|
-
destinationGuard,
|
|
89
|
-
deadline: params.deadline,
|
|
90
|
-
});
|
|
91
|
-
params.deadline.check();
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
finally {
|
|
96
|
-
await stagedArchive.cleanup();
|
|
97
|
-
}
|
|
44
|
+
// Recheck the native manifest before any caller callback observes an entry.
|
|
45
|
+
if (params.kind !== "zip") {
|
|
46
|
+
for (const entry of manifest)
|
|
47
|
+
validateArchiveEntryPath(entry.path);
|
|
48
|
+
}
|
|
49
|
+
const planEntry = createArchiveEntryPlanner({ ...params, rootDir: stagingDir }, params.kind);
|
|
50
|
+
const plan = [];
|
|
51
|
+
for (const entry of manifest) {
|
|
52
|
+
deadline.check();
|
|
53
|
+
const mode = params.kind === "zip"
|
|
54
|
+
? zipEntries[entry.index].creatorSystem === 3
|
|
55
|
+
? zipEntries[entry.index].externalAttributes >>> 16
|
|
56
|
+
: undefined
|
|
57
|
+
: entry.mode;
|
|
58
|
+
const accepted = planEntry({ ...entry, mode });
|
|
59
|
+
if (accepted)
|
|
60
|
+
plan.push({ ...accepted, index: entry.index });
|
|
61
|
+
}
|
|
62
|
+
const directory = await fs.open(stagingDir, fsConstants.O_RDONLY |
|
|
63
|
+
(typeof fsConstants.O_DIRECTORY === "number" ? fsConstants.O_DIRECTORY : 0));
|
|
64
|
+
try {
|
|
65
|
+
deadline.check();
|
|
66
|
+
await params.binding.extractArchiveNative(archivePath, params.kind, directory.fd, plan.map((entry) => ({ ...entry, mode: entry.kind === "directory" ? 0o700 : 0o600 })), tarLimits, AbortSignal.any([deadline.signal])).catch(throwMappedNativeArchiveError);
|
|
67
|
+
}
|
|
68
|
+
finally {
|
|
69
|
+
await directory.close().catch(() => undefined);
|
|
70
|
+
}
|
|
71
|
+
return plan;
|
|
72
|
+
});
|
|
98
73
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ArchiveKind } from "./archive-kind.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ExtractionDeadline } from "./archive-deadline.js";
|
|
3
|
+
import type { ArchiveExtractLimits, ResolvedArchiveExtractLimits } from "./archive-limits.js";
|
|
3
4
|
import type { ArchiveEntryFilter, ArchiveEntryModePolicy, ArchiveFilteredEntryPolicy } from "./archive-policy.js";
|
|
4
5
|
export type ArchiveLogger = {
|
|
5
6
|
info?: (message: string) => void;
|
|
@@ -22,4 +23,8 @@ export type ExtractArchiveOptions = {
|
|
|
22
23
|
entryFilter?: ArchiveEntryFilter;
|
|
23
24
|
onFiltered?: ArchiveFilteredEntryPolicy;
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
+
/** Private executors receive owned options and an already-staged archive path. */
|
|
27
|
+
export type StagedArchiveExtractOptions = Pick<ExtractArchiveOptions, "archivePath" | "destDir" | "durable" | "stripComponents" | "entryModes" | "entryUmask" | "entryFilter" | "onFiltered"> & {
|
|
28
|
+
limits: ResolvedArchiveExtractLimits;
|
|
29
|
+
deadline: ExtractionDeadline;
|
|
30
|
+
};
|
package/dist/archive-plan.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ArchiveKind } from "./archive-kind.js";
|
|
2
|
+
import { type ResolvedArchiveExtractLimits } from "./archive-limits.js";
|
|
2
3
|
import type { ExtractArchiveOptions } from "./archive-options.js";
|
|
4
|
+
import { type ArchiveEntryKind } from "./archive-policy.js";
|
|
3
5
|
export type ArchiveMemberKind = "file" | "directory" | "symlink" | "hardlink" | "blocked" | "sparse" | "other";
|
|
4
6
|
export type ArchivePlanEntry = {
|
|
5
7
|
path: string;
|
|
@@ -11,10 +13,17 @@ export type ArchivePlanOptions = Pick<ExtractArchiveOptions, "stripComponents" |
|
|
|
11
13
|
rootDir?: string;
|
|
12
14
|
escapeLabel?: string;
|
|
13
15
|
};
|
|
16
|
+
export declare function createArchiveEntrySelector(params: ArchivePlanOptions): {
|
|
17
|
+
limits: ResolvedArchiveExtractLimits;
|
|
18
|
+
select(entry: {
|
|
19
|
+
path: string;
|
|
20
|
+
kind: ArchiveEntryKind;
|
|
21
|
+
size: number;
|
|
22
|
+
}): string | null;
|
|
23
|
+
};
|
|
14
24
|
export declare function createArchiveEntryPlanner(params: ArchivePlanOptions, archiveKind: ArchiveKind): (entry: {
|
|
15
25
|
path: string;
|
|
16
26
|
kind: ArchiveMemberKind;
|
|
17
27
|
size: number;
|
|
18
28
|
mode?: number;
|
|
19
29
|
}) => ArchivePlanEntry | null;
|
|
20
|
-
//# sourceMappingURL=archive-plan.d.ts.map
|
package/dist/archive-plan.js
CHANGED
|
@@ -3,34 +3,44 @@ import { createArchiveOutputPathTracker, resolveArchiveOutputPath, stripArchiveP
|
|
|
3
3
|
import { ARCHIVE_LIMIT_ERROR_CODE, ArchiveLimitError, assertArchiveEntryCountWithinLimit, assertArchiveEntryPathComponentsWithinLimit, createByteBudgetTracker, resolveExtractLimits, } from "./archive-limits.js";
|
|
4
4
|
import { resolveArchiveEntryMode, shouldExtractArchiveEntry } from "./archive-policy.js";
|
|
5
5
|
import { formatErrorDetail } from "./error-detail.js";
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
export function
|
|
6
|
+
// Portable ZIP selects each entry immediately before streaming its payload;
|
|
7
|
+
// manifest-backed routes add declared-byte admission through the planner below.
|
|
8
|
+
export function createArchiveEntrySelector(params) {
|
|
9
9
|
const strip = Math.max(0, Math.floor(params.stripComponents ?? 0));
|
|
10
10
|
const limits = resolveExtractLimits(params.limits);
|
|
11
|
-
const budget = createByteBudgetTracker(limits);
|
|
12
11
|
const trackOutputPath = createArchiveOutputPathTracker();
|
|
13
12
|
let entryCount = 0;
|
|
13
|
+
return { limits, select(entry) {
|
|
14
|
+
assertArchiveEntryCountWithinLimit(++entryCount, limits);
|
|
15
|
+
validateArchiveEntryPath(entry.path, { escapeLabel: params.escapeLabel });
|
|
16
|
+
const canonicalPath = stripArchivePath(entry.path, 0);
|
|
17
|
+
if (!canonicalPath)
|
|
18
|
+
return null;
|
|
19
|
+
const relPath = strip === 0 ? canonicalPath : stripArchivePath(canonicalPath, strip);
|
|
20
|
+
if (!relPath)
|
|
21
|
+
return null;
|
|
22
|
+
validateArchiveEntryPath(relPath, { escapeLabel: params.escapeLabel });
|
|
23
|
+
assertArchiveEntryPathComponentsWithinLimit(relPath, limits);
|
|
24
|
+
trackOutputPath(relPath, entry.path);
|
|
25
|
+
if (params.rootDir !== undefined) {
|
|
26
|
+
resolveArchiveOutputPath({ rootDir: params.rootDir, relPath, originalPath: entry.path,
|
|
27
|
+
escapeLabel: params.escapeLabel });
|
|
28
|
+
}
|
|
29
|
+
if (!shouldExtractArchiveEntry({ filter: params.entryFilter, onFiltered: params.onFiltered,
|
|
30
|
+
entry: { path: canonicalPath, kind: entry.kind, size: entry.size } }))
|
|
31
|
+
return null;
|
|
32
|
+
return relPath;
|
|
33
|
+
} };
|
|
34
|
+
}
|
|
35
|
+
// A destination is optional only for inspection; writers still prove containment.
|
|
36
|
+
export function createArchiveEntryPlanner(params, archiveKind) {
|
|
37
|
+
const { select, limits } = createArchiveEntrySelector(params);
|
|
38
|
+
const budget = createByteBudgetTracker(limits);
|
|
14
39
|
return (entry) => {
|
|
15
|
-
assertArchiveEntryCountWithinLimit(++entryCount, limits);
|
|
16
|
-
validateArchiveEntryPath(entry.path, { escapeLabel: params.escapeLabel });
|
|
17
|
-
const canonicalPath = stripArchivePath(entry.path, 0);
|
|
18
|
-
if (!canonicalPath)
|
|
19
|
-
return null;
|
|
20
|
-
const relPath = strip === 0 ? canonicalPath : stripArchivePath(canonicalPath, strip);
|
|
21
|
-
if (!relPath)
|
|
22
|
-
return null;
|
|
23
|
-
validateArchiveEntryPath(relPath, { escapeLabel: params.escapeLabel });
|
|
24
|
-
assertArchiveEntryPathComponentsWithinLimit(relPath, limits);
|
|
25
|
-
trackOutputPath(relPath, entry.path);
|
|
26
|
-
if (params.rootDir !== undefined) {
|
|
27
|
-
resolveArchiveOutputPath({ rootDir: params.rootDir, relPath, originalPath: entry.path,
|
|
28
|
-
escapeLabel: params.escapeLabel });
|
|
29
|
-
}
|
|
30
40
|
const kind = entry.kind === "file" || entry.kind === "directory" ? entry.kind
|
|
31
41
|
: entry.kind === "symlink" || entry.kind === "hardlink" ? "symlink" : "other";
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
const relPath = select({ path: entry.path, kind, size: entry.size });
|
|
43
|
+
if (relPath === null)
|
|
34
44
|
return null;
|
|
35
45
|
if (entry.kind === "sparse") {
|
|
36
46
|
throw new ArchiveFormatError(`GNU sparse archive entry is not supported: ${formatErrorDetail(entry.path)}`);
|
package/dist/archive-policy.d.ts
CHANGED
package/dist/archive-read.d.ts
CHANGED
|
@@ -31,4 +31,3 @@ export declare function withStagedArchiveDestination<T>(params: {
|
|
|
31
31
|
}): Promise<T>;
|
|
32
32
|
export { mergeExtractedTreeIntoDestination } from "./archive-merge.js";
|
|
33
33
|
export declare function createArchiveSymlinkTraversalError(originalPath: string): ArchiveSecurityError;
|
|
34
|
-
//# sourceMappingURL=archive-staging.d.ts.map
|
|
@@ -4,4 +4,3 @@ export type InspectTarArchiveOptions = Pick<ExtractArchiveOptions, "archivePath"
|
|
|
4
4
|
export type InspectedTarEntry = Readonly<Pick<ArchivePlanEntry, "path" | "kind" | "size">>;
|
|
5
5
|
/** Complete TAR/gzip admission and zero-strip extraction policy, without output writes. */
|
|
6
6
|
export declare function inspectTarArchive(params: InspectTarArchiveOptions): Promise<readonly InspectedTarEntry[]>;
|
|
7
|
-
//# sourceMappingURL=archive-tar-inspect.d.ts.map
|
package/dist/archive-tar.d.ts
CHANGED
|
@@ -5,4 +5,3 @@ import { type ZipDirectoryEntry } from "./archive-zip-directory.js";
|
|
|
5
5
|
export declare function admitZipBuffer(input: Uint8Array, limits: ResolvedArchiveExtractLimits, onEntry?: (entry: ZipDirectoryEntry) => void): number;
|
|
6
6
|
/** The extraction input is private and immutable; read bounded metadata windows. */
|
|
7
7
|
export declare function admitZipFile(archivePath: string, limits: ResolvedArchiveExtractLimits, deadline: ExtractionDeadline, onEntry?: (entry: ZipDirectoryEntry) => void): Promise<number>;
|
|
8
|
-
//# sourceMappingURL=archive-zip-admission.d.ts.map
|
|
@@ -19,4 +19,3 @@ export type ZipDirectoryEntry = {
|
|
|
19
19
|
kind: ArchiveEntryKind;
|
|
20
20
|
};
|
|
21
21
|
export declare function scanZipDirectory(size: number, limits: ResolvedArchiveExtractLimits, onEntry?: (entry: ZipDirectoryEntry) => void): ZipScan;
|
|
22
|
-
//# sourceMappingURL=archive-zip-directory.d.ts.map
|
|
@@ -22,4 +22,3 @@ export declare function isZipSymlinkEntry(entry: ZipEntry): boolean;
|
|
|
22
22
|
export declare function zipEntryKind(entry: ZipEntry): ArchiveEntryKind;
|
|
23
23
|
export declare function zipEntryMode(entry: ZipEntry, policy: ArchiveEntryModePolicy | undefined): number;
|
|
24
24
|
export declare function zipEntryDeclaredSize(entry: ZipEntry): number;
|
|
25
|
-
//# sourceMappingURL=archive-zip-entry.d.ts.map
|
|
@@ -2,4 +2,3 @@ import { Transform } from "node:stream";
|
|
|
2
2
|
import { type ZipEntry } from "./archive-zip-entry.js";
|
|
3
3
|
export declare function normalizeZipIntegrityError(error: unknown): Error;
|
|
4
4
|
export declare function createZipIntegrityTransform(entry: ZipEntry): Transform;
|
|
5
|
-
//# sourceMappingURL=archive-zip-integrity.d.ts.map
|
|
@@ -6,4 +6,3 @@ export type ZipArchiveWithFiles = {
|
|
|
6
6
|
export declare function admittedZipEntries(archive: ZipArchiveWithFiles): readonly ZipEntry[];
|
|
7
7
|
/** Internal: the caller has admitted these unchanged bytes and their metadata. */
|
|
8
8
|
export declare function loadAdmittedZipArchive(buffer: Buffer | Uint8Array, admitted: ZipDirectoryEntry[]): Promise<ZipArchiveWithFiles>;
|
|
9
|
-
//# sourceMappingURL=archive-zip-loader.d.ts.map
|
|
@@ -2,4 +2,3 @@ import type { NativeArchiveEntry } from "./native-binding.js";
|
|
|
2
2
|
import type { ZipDirectoryEntry } from "./archive-zip-directory.js";
|
|
3
3
|
/** Associate all native entries with physical admission before exposing any. */
|
|
4
4
|
export declare function validateNativeZipManifest(manifest: NativeArchiveEntry[], admitted: ZipDirectoryEntry[]): void;
|
|
5
|
-
//# sourceMappingURL=archive-zip-manifest.d.ts.map
|
|
@@ -3,4 +3,3 @@ import { type ZipArchiveWithFiles } from "./archive-zip-loader.js";
|
|
|
3
3
|
export { readZipCentralDirectoryEntryCount } from "./archive-zip-count.js";
|
|
4
4
|
export type { ZipArchiveWithFiles } from "./archive-zip-loader.js";
|
|
5
5
|
export declare function loadZipArchiveWithPreflight(buffer: Buffer | Uint8Array, limits?: ArchiveExtractLimits): Promise<ZipArchiveWithFiles>;
|
|
6
|
-
//# sourceMappingURL=archive-zip-preflight.d.ts.map
|
package/dist/archive.d.ts
CHANGED
|
@@ -12,4 +12,3 @@ export { createArchiveSymlinkTraversalError, mergeExtractedTreeIntoDestination,
|
|
|
12
12
|
export { createTarEntryPreflightChecker, type TarEntryInfo } from "./archive-tar.js";
|
|
13
13
|
export { loadZipArchiveWithPreflight, readZipCentralDirectoryEntryCount, type ZipArchiveWithFiles, } from "./archive-zip-preflight.js";
|
|
14
14
|
export declare function extractArchive(params: ExtractArchiveOptions): Promise<void>;
|
|
15
|
-
//# sourceMappingURL=archive.d.ts.map
|