@openclaw/openshell-sandbox 2026.9.2 → 2026.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +87 -47
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +700 -0
- package/node_modules/@openclaw/fs-safe/LICENSE +21 -0
- package/node_modules/@openclaw/fs-safe/README.md +564 -0
- package/node_modules/@openclaw/fs-safe/SECURITY.md +45 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +33 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +307 -0
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/advanced.js +28 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-crc32.js +14 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +103 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-entry.js +85 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-errors.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.js +74 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-input.js +92 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +82 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +57 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-limits.js +131 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +157 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-native.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-native.js +107 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-options.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-options.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +55 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts +22 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-policy.js +38 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-read.js +225 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +250 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-inspect.js +59 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +95 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts +18 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +99 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts +19 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-tar.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.js +60 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.js +140 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +228 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +27 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +41 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +100 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +44 -0
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/archive.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/archive.js +275 -0
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/async-lock.js +17 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/atomic.js +4 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.js +21 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +106 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/byte-budget.js +9 -0
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/config.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/config.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/containment.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/containment.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +69 -0
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/device-path.js +137 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +44 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +299 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +82 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/directory-mode-owner.js +78 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/durability.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/error-detail.js +10 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/errors.js +26 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-hash.js +73 -0
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-identity.js +34 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts +35 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +349 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-lock.js +46 -0
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-observation.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +33 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +189 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-limit.js +8 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +95 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +127 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +62 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-store.js +357 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.js +19 -0
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/filename.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/filename.js +91 -0
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +13 -0
- package/node_modules/@openclaw/fs-safe/dist/fs.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/fs.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +87 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +37 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +82 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/home-dir.js +84 -0
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/index.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/index.js +5 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +20 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/install-path.js +94 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +35 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +97 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +20 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +292 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +46 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +383 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-store.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json-stringify.js +7 -0
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts +50 -0
- package/node_modules/@openclaw/fs-safe/dist/json.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/json.js +343 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts +9 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +87 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +26 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/local-roots.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts +10 -0
- package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/lock-config.js +12 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +43 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +161 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/move-path.js +334 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +93 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +132 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +96 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +161 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +362 -0
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/native.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native.js +204 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.js +45 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +92 -0
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/output.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/output.js +123 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +28 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path-policy.js +44 -0
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path.js +136 -0
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +74 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +59 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +296 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +60 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/permissions.js +125 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +74 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +35 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +36 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +252 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/private-directory.js +14 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +45 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +299 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +28 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.js +22 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +366 -0
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/read-open-flags.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/read-opened-file.js +18 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/regular-file.js +391 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +42 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +39 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +331 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +107 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +51 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +161 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.js +30 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +53 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +376 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +58 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/replace-file.js +329 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +38 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-context.js +141 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-errors.js +75 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +45 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-file.js +120 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +163 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-impl.js +1230 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +68 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts +7 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path-symlink.js +35 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +40 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +481 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +89 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-paths.js +381 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +41 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-walk.js +133 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-mode.js +61 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +97 -0
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/root.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/root.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +75 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-file.js +329 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +73 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts +17 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +40 -0
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/secret.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secret.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-file.js +182 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +27 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +160 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +15 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +143 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +27 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +95 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +31 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +336 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +24 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.js +42 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +71 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +63 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +305 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +76 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts +63 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +265 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +60 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts +56 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/staged-file-types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/store.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/store.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +51 -0
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/string-coerce.js +16 -0
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts +6 -0
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/suppressed-error.js +15 -0
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts +12 -0
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +78 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.js +87 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +28 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-target.js +137 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +320 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/temp.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +25 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/test-hooks.js +13 -0
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +14 -0
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +14 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +8 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/timing.js +40 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/trash.js +171 -0
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts +23 -0
- package/node_modules/@openclaw/fs-safe/dist/types.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/types.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +37 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/walk.js +207 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-command.js +34 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +32 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +126 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts +5 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +35 -0
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts.map +1 -0
- package/node_modules/@openclaw/fs-safe/dist/write-queue.js +18 -0
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +153 -0
- package/node_modules/@openclaw/fs-safe/docs/archive.md +658 -0
- package/node_modules/@openclaw/fs-safe/docs/assets/readme-banner.jpg +0 -0
- package/node_modules/@openclaw/fs-safe/docs/atomic.md +334 -0
- package/node_modules/@openclaw/fs-safe/docs/config.md +131 -0
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +180 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +313 -0
- package/node_modules/@openclaw/fs-safe/docs/errors.md +232 -0
- package/node_modules/@openclaw/fs-safe/docs/file-store.md +258 -0
- package/node_modules/@openclaw/fs-safe/docs/filename.md +96 -0
- package/node_modules/@openclaw/fs-safe/docs/index.md +84 -0
- package/node_modules/@openclaw/fs-safe/docs/install-path.md +170 -0
- package/node_modules/@openclaw/fs-safe/docs/install.md +163 -0
- package/node_modules/@openclaw/fs-safe/docs/json-store.md +221 -0
- package/node_modules/@openclaw/fs-safe/docs/json.md +213 -0
- package/node_modules/@openclaw/fs-safe/docs/local-roots.md +141 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +196 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +43 -0
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +118 -0
- package/node_modules/@openclaw/fs-safe/docs/native.md +196 -0
- package/node_modules/@openclaw/fs-safe/docs/output.md +139 -0
- package/node_modules/@openclaw/fs-safe/docs/path-scope.md +159 -0
- package/node_modules/@openclaw/fs-safe/docs/path.md +208 -0
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +200 -0
- package/node_modules/@openclaw/fs-safe/docs/private-file-store.md +54 -0
- package/node_modules/@openclaw/fs-safe/docs/public-api.md +112 -0
- package/node_modules/@openclaw/fs-safe/docs/quickstart.md +154 -0
- package/node_modules/@openclaw/fs-safe/docs/reading.md +183 -0
- package/node_modules/@openclaw/fs-safe/docs/regular-file.md +190 -0
- package/node_modules/@openclaw/fs-safe/docs/root.md +266 -0
- package/node_modules/@openclaw/fs-safe/docs/secret-file.md +273 -0
- package/node_modules/@openclaw/fs-safe/docs/secure-file.md +100 -0
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +188 -0
- package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +439 -0
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +182 -0
- package/node_modules/@openclaw/fs-safe/docs/store.md +94 -0
- package/node_modules/@openclaw/fs-safe/docs/temp.md +476 -0
- package/node_modules/@openclaw/fs-safe/docs/test-hooks.md +96 -0
- package/node_modules/@openclaw/fs-safe/docs/testing.md +189 -0
- package/node_modules/@openclaw/fs-safe/docs/timing.md +121 -0
- package/node_modules/@openclaw/fs-safe/docs/types.md +188 -0
- package/node_modules/@openclaw/fs-safe/docs/walk.md +128 -0
- package/node_modules/@openclaw/fs-safe/docs/writing.md +347 -0
- package/node_modules/@openclaw/fs-safe/package.json +187 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +29 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +29 -0
- 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 +32 -0
- 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 +32 -0
- 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 +32 -0
- 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 +32 -0
- 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 +29 -0
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/README.md +3 -0
- package/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/core-util-is/package.json +38 -0
- package/node_modules/immediate/LICENSE.txt +20 -0
- package/node_modules/immediate/README.md +93 -0
- package/node_modules/immediate/dist/immediate.js +75 -0
- package/node_modules/immediate/dist/immediate.min.js +1 -0
- package/node_modules/immediate/lib/browser.js +69 -0
- package/node_modules/immediate/lib/index.js +73 -0
- package/node_modules/immediate/package.json +42 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/isarray/.npmignore +1 -0
- package/node_modules/isarray/.travis.yml +4 -0
- package/node_modules/isarray/Makefile +6 -0
- package/node_modules/isarray/README.md +60 -0
- package/node_modules/isarray/component.json +19 -0
- package/node_modules/isarray/index.js +5 -0
- package/node_modules/isarray/package.json +45 -0
- package/node_modules/isarray/test.js +20 -0
- package/node_modules/jszip/.codeclimate.yml +16 -0
- package/node_modules/jszip/.editorconfig +8 -0
- package/node_modules/jszip/.eslintrc.js +43 -0
- package/node_modules/jszip/.github/workflows/pr.yaml +58 -0
- package/node_modules/jszip/.jekyll-metadata +0 -0
- package/node_modules/jszip/.travis.yml +17 -0
- package/node_modules/jszip/CHANGES.md +204 -0
- package/node_modules/jszip/LICENSE.markdown +651 -0
- package/node_modules/jszip/README.markdown +33 -0
- package/node_modules/jszip/deps.js +37 -0
- package/node_modules/jszip/dist/jszip.js +11577 -0
- package/node_modules/jszip/dist/jszip.min.js +13 -0
- package/node_modules/jszip/graph.svg +601 -0
- package/node_modules/jszip/index.d.ts +330 -0
- package/node_modules/jszip/lib/base64.js +106 -0
- package/node_modules/jszip/lib/compressedObject.js +74 -0
- package/node_modules/jszip/lib/compressions.js +14 -0
- package/node_modules/jszip/lib/crc32.js +77 -0
- package/node_modules/jszip/lib/defaults.js +11 -0
- package/node_modules/jszip/lib/external.js +18 -0
- package/node_modules/jszip/lib/flate.js +85 -0
- package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
- package/node_modules/jszip/lib/generate/index.js +57 -0
- package/node_modules/jszip/lib/index.js +55 -0
- package/node_modules/jszip/lib/license_header.js +11 -0
- package/node_modules/jszip/lib/load.js +88 -0
- package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
- package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
- package/node_modules/jszip/lib/nodejsUtils.js +57 -0
- package/node_modules/jszip/lib/object.js +384 -0
- package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
- package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
- package/node_modules/jszip/lib/reader/DataReader.js +116 -0
- package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
- package/node_modules/jszip/lib/reader/StringReader.js +38 -0
- package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
- package/node_modules/jszip/lib/reader/readerFor.js +28 -0
- package/node_modules/jszip/lib/signature.js +7 -0
- package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
- package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
- package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
- package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
- package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
- package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
- package/node_modules/jszip/lib/support.js +38 -0
- package/node_modules/jszip/lib/utf8.js +275 -0
- package/node_modules/jszip/lib/utils.js +501 -0
- package/node_modules/jszip/lib/zipEntries.js +261 -0
- package/node_modules/jszip/lib/zipEntry.js +293 -0
- package/node_modules/jszip/lib/zipObject.js +133 -0
- package/node_modules/jszip/package.json +67 -0
- package/node_modules/jszip/sponsors.md +21 -0
- package/node_modules/jszip/tsconfig.json +101 -0
- package/node_modules/jszip/vendor/FileSaver.js +247 -0
- package/node_modules/lie/README.md +62 -0
- package/node_modules/lie/dist/lie.js +350 -0
- package/node_modules/lie/dist/lie.min.js +1 -0
- package/node_modules/lie/dist/lie.polyfill.js +358 -0
- package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
- package/node_modules/lie/lib/browser.js +273 -0
- package/node_modules/lie/lib/index.js +298 -0
- package/node_modules/lie/license.md +7 -0
- package/node_modules/lie/lie.d.ts +244 -0
- package/node_modules/lie/package.json +69 -0
- package/node_modules/lie/polyfill.js +4 -0
- package/node_modules/pako/CHANGELOG.md +164 -0
- package/node_modules/pako/LICENSE +21 -0
- package/node_modules/pako/README.md +191 -0
- package/node_modules/pako/dist/pako.js +6818 -0
- package/node_modules/pako/dist/pako.min.js +1 -0
- package/node_modules/pako/dist/pako_deflate.js +3997 -0
- package/node_modules/pako/dist/pako_deflate.min.js +1 -0
- package/node_modules/pako/dist/pako_inflate.js +3300 -0
- package/node_modules/pako/dist/pako_inflate.min.js +1 -0
- package/node_modules/pako/index.js +14 -0
- package/node_modules/pako/lib/deflate.js +400 -0
- package/node_modules/pako/lib/inflate.js +423 -0
- package/node_modules/pako/lib/utils/common.js +105 -0
- package/node_modules/pako/lib/utils/strings.js +187 -0
- package/node_modules/pako/lib/zlib/README +59 -0
- package/node_modules/pako/lib/zlib/adler32.js +51 -0
- package/node_modules/pako/lib/zlib/constants.js +68 -0
- package/node_modules/pako/lib/zlib/crc32.js +59 -0
- package/node_modules/pako/lib/zlib/deflate.js +1874 -0
- package/node_modules/pako/lib/zlib/gzheader.js +58 -0
- package/node_modules/pako/lib/zlib/inffast.js +345 -0
- package/node_modules/pako/lib/zlib/inflate.js +1556 -0
- package/node_modules/pako/lib/zlib/inftrees.js +343 -0
- package/node_modules/pako/lib/zlib/messages.js +32 -0
- package/node_modules/pako/lib/zlib/trees.js +1222 -0
- package/node_modules/pako/lib/zlib/zstream.js +47 -0
- package/node_modules/pako/package.json +44 -0
- package/node_modules/process-nextick-args/index.js +45 -0
- package/node_modules/process-nextick-args/license.md +19 -0
- package/node_modules/process-nextick-args/package.json +25 -0
- package/node_modules/process-nextick-args/readme.md +18 -0
- package/node_modules/readable-stream/.travis.yml +34 -0
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +58 -0
- package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
- package/node_modules/readable-stream/duplex-browser.js +1 -0
- package/node_modules/readable-stream/duplex.js +1 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +52 -0
- package/node_modules/readable-stream/passthrough.js +1 -0
- package/node_modules/readable-stream/readable-browser.js +7 -0
- package/node_modules/readable-stream/readable.js +19 -0
- package/node_modules/readable-stream/transform.js +1 -0
- package/node_modules/readable-stream/writable-browser.js +1 -0
- package/node_modules/readable-stream/writable.js +8 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +62 -0
- package/node_modules/safe-buffer/package.json +37 -0
- package/node_modules/setimmediate/LICENSE.txt +20 -0
- package/node_modules/setimmediate/package.json +30 -0
- package/node_modules/setimmediate/setImmediate.js +186 -0
- package/node_modules/string_decoder/.travis.yml +50 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/package.json +31 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/package.json +6 -4
- /package/node_modules/{p-limit/node_modules/yocto-queue → yocto-queue}/index.d.ts +0 -0
- /package/node_modules/{p-limit/node_modules/yocto-queue → yocto-queue}/index.js +0 -0
- /package/node_modules/{p-limit/node_modules/yocto-queue → yocto-queue}/license +0 -0
- /package/node_modules/{p-limit/node_modules/yocto-queue → yocto-queue}/package.json +0 -0
- /package/node_modules/{p-limit/node_modules/yocto-queue → yocto-queue}/readme.md +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var USE_TYPEDARRAY = (typeof Uint8Array !== "undefined") && (typeof Uint16Array !== "undefined") && (typeof Uint32Array !== "undefined");
|
|
3
|
+
|
|
4
|
+
var pako = require("pako");
|
|
5
|
+
var utils = require("./utils");
|
|
6
|
+
var GenericWorker = require("./stream/GenericWorker");
|
|
7
|
+
|
|
8
|
+
var ARRAY_TYPE = USE_TYPEDARRAY ? "uint8array" : "array";
|
|
9
|
+
|
|
10
|
+
exports.magic = "\x08\x00";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Create a worker that uses pako to inflate/deflate.
|
|
14
|
+
* @constructor
|
|
15
|
+
* @param {String} action the name of the pako function to call : either "Deflate" or "Inflate".
|
|
16
|
+
* @param {Object} options the options to use when (de)compressing.
|
|
17
|
+
*/
|
|
18
|
+
function FlateWorker(action, options) {
|
|
19
|
+
GenericWorker.call(this, "FlateWorker/" + action);
|
|
20
|
+
|
|
21
|
+
this._pako = null;
|
|
22
|
+
this._pakoAction = action;
|
|
23
|
+
this._pakoOptions = options;
|
|
24
|
+
// the `meta` object from the last chunk received
|
|
25
|
+
// this allow this worker to pass around metadata
|
|
26
|
+
this.meta = {};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
utils.inherits(FlateWorker, GenericWorker);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @see GenericWorker.processChunk
|
|
33
|
+
*/
|
|
34
|
+
FlateWorker.prototype.processChunk = function (chunk) {
|
|
35
|
+
this.meta = chunk.meta;
|
|
36
|
+
if (this._pako === null) {
|
|
37
|
+
this._createPako();
|
|
38
|
+
}
|
|
39
|
+
this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @see GenericWorker.flush
|
|
44
|
+
*/
|
|
45
|
+
FlateWorker.prototype.flush = function () {
|
|
46
|
+
GenericWorker.prototype.flush.call(this);
|
|
47
|
+
if (this._pako === null) {
|
|
48
|
+
this._createPako();
|
|
49
|
+
}
|
|
50
|
+
this._pako.push([], true);
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @see GenericWorker.cleanUp
|
|
54
|
+
*/
|
|
55
|
+
FlateWorker.prototype.cleanUp = function () {
|
|
56
|
+
GenericWorker.prototype.cleanUp.call(this);
|
|
57
|
+
this._pako = null;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Create the _pako object.
|
|
62
|
+
* TODO: lazy-loading this object isn't the best solution but it's the
|
|
63
|
+
* quickest. The best solution is to lazy-load the worker list. See also the
|
|
64
|
+
* issue #446.
|
|
65
|
+
*/
|
|
66
|
+
FlateWorker.prototype._createPako = function () {
|
|
67
|
+
this._pako = new pako[this._pakoAction]({
|
|
68
|
+
raw: true,
|
|
69
|
+
level: this._pakoOptions.level || -1 // default compression
|
|
70
|
+
});
|
|
71
|
+
var self = this;
|
|
72
|
+
this._pako.onData = function(data) {
|
|
73
|
+
self.push({
|
|
74
|
+
data : data,
|
|
75
|
+
meta : self.meta
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
exports.compressWorker = function (compressionOptions) {
|
|
81
|
+
return new FlateWorker("Deflate", compressionOptions);
|
|
82
|
+
};
|
|
83
|
+
exports.uncompressWorker = function () {
|
|
84
|
+
return new FlateWorker("Inflate", {});
|
|
85
|
+
};
|
|
@@ -0,0 +1,539 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var utils = require("../utils");
|
|
4
|
+
var GenericWorker = require("../stream/GenericWorker");
|
|
5
|
+
var utf8 = require("../utf8");
|
|
6
|
+
var crc32 = require("../crc32");
|
|
7
|
+
var signature = require("../signature");
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Transform an integer into a string in hexadecimal.
|
|
11
|
+
* @private
|
|
12
|
+
* @param {number} dec the number to convert.
|
|
13
|
+
* @param {number} bytes the number of bytes to generate.
|
|
14
|
+
* @returns {string} the result.
|
|
15
|
+
*/
|
|
16
|
+
var decToHex = function(dec, bytes) {
|
|
17
|
+
var hex = "", i;
|
|
18
|
+
for (i = 0; i < bytes; i++) {
|
|
19
|
+
hex += String.fromCharCode(dec & 0xff);
|
|
20
|
+
dec = dec >>> 8;
|
|
21
|
+
}
|
|
22
|
+
return hex;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Generate the UNIX part of the external file attributes.
|
|
27
|
+
* @param {Object} unixPermissions the unix permissions or null.
|
|
28
|
+
* @param {Boolean} isDir true if the entry is a directory, false otherwise.
|
|
29
|
+
* @return {Number} a 32 bit integer.
|
|
30
|
+
*
|
|
31
|
+
* adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :
|
|
32
|
+
*
|
|
33
|
+
* TTTTsstrwxrwxrwx0000000000ADVSHR
|
|
34
|
+
* ^^^^____________________________ file type, see zipinfo.c (UNX_*)
|
|
35
|
+
* ^^^_________________________ setuid, setgid, sticky
|
|
36
|
+
* ^^^^^^^^^________________ permissions
|
|
37
|
+
* ^^^^^^^^^^______ not used ?
|
|
38
|
+
* ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only
|
|
39
|
+
*/
|
|
40
|
+
var generateUnixExternalFileAttr = function (unixPermissions, isDir) {
|
|
41
|
+
|
|
42
|
+
var result = unixPermissions;
|
|
43
|
+
if (!unixPermissions) {
|
|
44
|
+
// I can't use octal values in strict mode, hence the hexa.
|
|
45
|
+
// 040775 => 0x41fd
|
|
46
|
+
// 0100664 => 0x81b4
|
|
47
|
+
result = isDir ? 0x41fd : 0x81b4;
|
|
48
|
+
}
|
|
49
|
+
return (result & 0xFFFF) << 16;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Generate the DOS part of the external file attributes.
|
|
54
|
+
* @param {Object} dosPermissions the dos permissions or null.
|
|
55
|
+
* @param {Boolean} isDir true if the entry is a directory, false otherwise.
|
|
56
|
+
* @return {Number} a 32 bit integer.
|
|
57
|
+
*
|
|
58
|
+
* Bit 0 Read-Only
|
|
59
|
+
* Bit 1 Hidden
|
|
60
|
+
* Bit 2 System
|
|
61
|
+
* Bit 3 Volume Label
|
|
62
|
+
* Bit 4 Directory
|
|
63
|
+
* Bit 5 Archive
|
|
64
|
+
*/
|
|
65
|
+
var generateDosExternalFileAttr = function (dosPermissions) {
|
|
66
|
+
// the dir flag is already set for compatibility
|
|
67
|
+
return (dosPermissions || 0) & 0x3F;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Generate the various parts used in the construction of the final zip file.
|
|
72
|
+
* @param {Object} streamInfo the hash with information about the compressed file.
|
|
73
|
+
* @param {Boolean} streamedContent is the content streamed ?
|
|
74
|
+
* @param {Boolean} streamingEnded is the stream finished ?
|
|
75
|
+
* @param {number} offset the current offset from the start of the zip file.
|
|
76
|
+
* @param {String} platform let's pretend we are this platform (change platform dependents fields)
|
|
77
|
+
* @param {Function} encodeFileName the function to encode the file name / comment.
|
|
78
|
+
* @return {Object} the zip parts.
|
|
79
|
+
*/
|
|
80
|
+
var generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) {
|
|
81
|
+
var file = streamInfo["file"],
|
|
82
|
+
compression = streamInfo["compression"],
|
|
83
|
+
useCustomEncoding = encodeFileName !== utf8.utf8encode,
|
|
84
|
+
encodedFileName = utils.transformTo("string", encodeFileName(file.name)),
|
|
85
|
+
utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file.name)),
|
|
86
|
+
comment = file.comment,
|
|
87
|
+
encodedComment = utils.transformTo("string", encodeFileName(comment)),
|
|
88
|
+
utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)),
|
|
89
|
+
useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,
|
|
90
|
+
useUTF8ForComment = utfEncodedComment.length !== comment.length,
|
|
91
|
+
dosTime,
|
|
92
|
+
dosDate,
|
|
93
|
+
extraFields = "",
|
|
94
|
+
unicodePathExtraField = "",
|
|
95
|
+
unicodeCommentExtraField = "",
|
|
96
|
+
dir = file.dir,
|
|
97
|
+
date = file.date;
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
var dataInfo = {
|
|
101
|
+
crc32 : 0,
|
|
102
|
+
compressedSize : 0,
|
|
103
|
+
uncompressedSize : 0
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// if the content is streamed, the sizes/crc32 are only available AFTER
|
|
107
|
+
// the end of the stream.
|
|
108
|
+
if (!streamedContent || streamingEnded) {
|
|
109
|
+
dataInfo.crc32 = streamInfo["crc32"];
|
|
110
|
+
dataInfo.compressedSize = streamInfo["compressedSize"];
|
|
111
|
+
dataInfo.uncompressedSize = streamInfo["uncompressedSize"];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
var bitflag = 0;
|
|
115
|
+
if (streamedContent) {
|
|
116
|
+
// Bit 3: the sizes/crc32 are set to zero in the local header.
|
|
117
|
+
// The correct values are put in the data descriptor immediately
|
|
118
|
+
// following the compressed data.
|
|
119
|
+
bitflag |= 0x0008;
|
|
120
|
+
}
|
|
121
|
+
if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) {
|
|
122
|
+
// Bit 11: Language encoding flag (EFS).
|
|
123
|
+
bitflag |= 0x0800;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
var extFileAttr = 0;
|
|
128
|
+
var versionMadeBy = 0;
|
|
129
|
+
if (dir) {
|
|
130
|
+
// dos or unix, we set the dos dir flag
|
|
131
|
+
extFileAttr |= 0x00010;
|
|
132
|
+
}
|
|
133
|
+
if(platform === "UNIX") {
|
|
134
|
+
versionMadeBy = 0x031E; // UNIX, version 3.0
|
|
135
|
+
extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);
|
|
136
|
+
} else { // DOS or other, fallback to DOS
|
|
137
|
+
versionMadeBy = 0x0014; // DOS, version 2.0
|
|
138
|
+
extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// date
|
|
142
|
+
// @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html
|
|
143
|
+
// @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html
|
|
144
|
+
// @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html
|
|
145
|
+
|
|
146
|
+
dosTime = date.getUTCHours();
|
|
147
|
+
dosTime = dosTime << 6;
|
|
148
|
+
dosTime = dosTime | date.getUTCMinutes();
|
|
149
|
+
dosTime = dosTime << 5;
|
|
150
|
+
dosTime = dosTime | date.getUTCSeconds() / 2;
|
|
151
|
+
|
|
152
|
+
dosDate = date.getUTCFullYear() - 1980;
|
|
153
|
+
dosDate = dosDate << 4;
|
|
154
|
+
dosDate = dosDate | (date.getUTCMonth() + 1);
|
|
155
|
+
dosDate = dosDate << 5;
|
|
156
|
+
dosDate = dosDate | date.getUTCDate();
|
|
157
|
+
|
|
158
|
+
if (useUTF8ForFileName) {
|
|
159
|
+
// set the unicode path extra field. unzip needs at least one extra
|
|
160
|
+
// field to correctly handle unicode path, so using the path is as good
|
|
161
|
+
// as any other information. This could improve the situation with
|
|
162
|
+
// other archive managers too.
|
|
163
|
+
// This field is usually used without the utf8 flag, with a non
|
|
164
|
+
// unicode path in the header (winrar, winzip). This helps (a bit)
|
|
165
|
+
// with the messy Windows' default compressed folders feature but
|
|
166
|
+
// breaks on p7zip which doesn't seek the unicode path extra field.
|
|
167
|
+
// So for now, UTF-8 everywhere !
|
|
168
|
+
unicodePathExtraField =
|
|
169
|
+
// Version
|
|
170
|
+
decToHex(1, 1) +
|
|
171
|
+
// NameCRC32
|
|
172
|
+
decToHex(crc32(encodedFileName), 4) +
|
|
173
|
+
// UnicodeName
|
|
174
|
+
utfEncodedFileName;
|
|
175
|
+
|
|
176
|
+
extraFields +=
|
|
177
|
+
// Info-ZIP Unicode Path Extra Field
|
|
178
|
+
"\x75\x70" +
|
|
179
|
+
// size
|
|
180
|
+
decToHex(unicodePathExtraField.length, 2) +
|
|
181
|
+
// content
|
|
182
|
+
unicodePathExtraField;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if(useUTF8ForComment) {
|
|
186
|
+
|
|
187
|
+
unicodeCommentExtraField =
|
|
188
|
+
// Version
|
|
189
|
+
decToHex(1, 1) +
|
|
190
|
+
// CommentCRC32
|
|
191
|
+
decToHex(crc32(encodedComment), 4) +
|
|
192
|
+
// UnicodeName
|
|
193
|
+
utfEncodedComment;
|
|
194
|
+
|
|
195
|
+
extraFields +=
|
|
196
|
+
// Info-ZIP Unicode Path Extra Field
|
|
197
|
+
"\x75\x63" +
|
|
198
|
+
// size
|
|
199
|
+
decToHex(unicodeCommentExtraField.length, 2) +
|
|
200
|
+
// content
|
|
201
|
+
unicodeCommentExtraField;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
var header = "";
|
|
205
|
+
|
|
206
|
+
// version needed to extract
|
|
207
|
+
header += "\x0A\x00";
|
|
208
|
+
// general purpose bit flag
|
|
209
|
+
header += decToHex(bitflag, 2);
|
|
210
|
+
// compression method
|
|
211
|
+
header += compression.magic;
|
|
212
|
+
// last mod file time
|
|
213
|
+
header += decToHex(dosTime, 2);
|
|
214
|
+
// last mod file date
|
|
215
|
+
header += decToHex(dosDate, 2);
|
|
216
|
+
// crc-32
|
|
217
|
+
header += decToHex(dataInfo.crc32, 4);
|
|
218
|
+
// compressed size
|
|
219
|
+
header += decToHex(dataInfo.compressedSize, 4);
|
|
220
|
+
// uncompressed size
|
|
221
|
+
header += decToHex(dataInfo.uncompressedSize, 4);
|
|
222
|
+
// file name length
|
|
223
|
+
header += decToHex(encodedFileName.length, 2);
|
|
224
|
+
// extra field length
|
|
225
|
+
header += decToHex(extraFields.length, 2);
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields;
|
|
229
|
+
|
|
230
|
+
var dirRecord = signature.CENTRAL_FILE_HEADER +
|
|
231
|
+
// version made by (00: DOS)
|
|
232
|
+
decToHex(versionMadeBy, 2) +
|
|
233
|
+
// file header (common to file and central directory)
|
|
234
|
+
header +
|
|
235
|
+
// file comment length
|
|
236
|
+
decToHex(encodedComment.length, 2) +
|
|
237
|
+
// disk number start
|
|
238
|
+
"\x00\x00" +
|
|
239
|
+
// internal file attributes TODO
|
|
240
|
+
"\x00\x00" +
|
|
241
|
+
// external file attributes
|
|
242
|
+
decToHex(extFileAttr, 4) +
|
|
243
|
+
// relative offset of local header
|
|
244
|
+
decToHex(offset, 4) +
|
|
245
|
+
// file name
|
|
246
|
+
encodedFileName +
|
|
247
|
+
// extra field
|
|
248
|
+
extraFields +
|
|
249
|
+
// file comment
|
|
250
|
+
encodedComment;
|
|
251
|
+
|
|
252
|
+
return {
|
|
253
|
+
fileRecord: fileRecord,
|
|
254
|
+
dirRecord: dirRecord
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Generate the EOCD record.
|
|
260
|
+
* @param {Number} entriesCount the number of entries in the zip file.
|
|
261
|
+
* @param {Number} centralDirLength the length (in bytes) of the central dir.
|
|
262
|
+
* @param {Number} localDirLength the length (in bytes) of the local dir.
|
|
263
|
+
* @param {String} comment the zip file comment as a binary string.
|
|
264
|
+
* @param {Function} encodeFileName the function to encode the comment.
|
|
265
|
+
* @return {String} the EOCD record.
|
|
266
|
+
*/
|
|
267
|
+
var generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) {
|
|
268
|
+
var dirEnd = "";
|
|
269
|
+
var encodedComment = utils.transformTo("string", encodeFileName(comment));
|
|
270
|
+
|
|
271
|
+
// end of central dir signature
|
|
272
|
+
dirEnd = signature.CENTRAL_DIRECTORY_END +
|
|
273
|
+
// number of this disk
|
|
274
|
+
"\x00\x00" +
|
|
275
|
+
// number of the disk with the start of the central directory
|
|
276
|
+
"\x00\x00" +
|
|
277
|
+
// total number of entries in the central directory on this disk
|
|
278
|
+
decToHex(entriesCount, 2) +
|
|
279
|
+
// total number of entries in the central directory
|
|
280
|
+
decToHex(entriesCount, 2) +
|
|
281
|
+
// size of the central directory 4 bytes
|
|
282
|
+
decToHex(centralDirLength, 4) +
|
|
283
|
+
// offset of start of central directory with respect to the starting disk number
|
|
284
|
+
decToHex(localDirLength, 4) +
|
|
285
|
+
// .ZIP file comment length
|
|
286
|
+
decToHex(encodedComment.length, 2) +
|
|
287
|
+
// .ZIP file comment
|
|
288
|
+
encodedComment;
|
|
289
|
+
|
|
290
|
+
return dirEnd;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Generate data descriptors for a file entry.
|
|
295
|
+
* @param {Object} streamInfo the hash generated by a worker, containing information
|
|
296
|
+
* on the file entry.
|
|
297
|
+
* @return {String} the data descriptors.
|
|
298
|
+
*/
|
|
299
|
+
var generateDataDescriptors = function (streamInfo) {
|
|
300
|
+
var descriptor = "";
|
|
301
|
+
descriptor = signature.DATA_DESCRIPTOR +
|
|
302
|
+
// crc-32 4 bytes
|
|
303
|
+
decToHex(streamInfo["crc32"], 4) +
|
|
304
|
+
// compressed size 4 bytes
|
|
305
|
+
decToHex(streamInfo["compressedSize"], 4) +
|
|
306
|
+
// uncompressed size 4 bytes
|
|
307
|
+
decToHex(streamInfo["uncompressedSize"], 4);
|
|
308
|
+
|
|
309
|
+
return descriptor;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* A worker to concatenate other workers to create a zip file.
|
|
315
|
+
* @param {Boolean} streamFiles `true` to stream the content of the files,
|
|
316
|
+
* `false` to accumulate it.
|
|
317
|
+
* @param {String} comment the comment to use.
|
|
318
|
+
* @param {String} platform the platform to use, "UNIX" or "DOS".
|
|
319
|
+
* @param {Function} encodeFileName the function to encode file names and comments.
|
|
320
|
+
*/
|
|
321
|
+
function ZipFileWorker(streamFiles, comment, platform, encodeFileName) {
|
|
322
|
+
GenericWorker.call(this, "ZipFileWorker");
|
|
323
|
+
// The number of bytes written so far. This doesn't count accumulated chunks.
|
|
324
|
+
this.bytesWritten = 0;
|
|
325
|
+
// The comment of the zip file
|
|
326
|
+
this.zipComment = comment;
|
|
327
|
+
// The platform "generating" the zip file.
|
|
328
|
+
this.zipPlatform = platform;
|
|
329
|
+
// the function to encode file names and comments.
|
|
330
|
+
this.encodeFileName = encodeFileName;
|
|
331
|
+
// Should we stream the content of the files ?
|
|
332
|
+
this.streamFiles = streamFiles;
|
|
333
|
+
// If `streamFiles` is false, we will need to accumulate the content of the
|
|
334
|
+
// files to calculate sizes / crc32 (and write them *before* the content).
|
|
335
|
+
// This boolean indicates if we are accumulating chunks (it will change a lot
|
|
336
|
+
// during the lifetime of this worker).
|
|
337
|
+
this.accumulate = false;
|
|
338
|
+
// The buffer receiving chunks when accumulating content.
|
|
339
|
+
this.contentBuffer = [];
|
|
340
|
+
// The list of generated directory records.
|
|
341
|
+
this.dirRecords = [];
|
|
342
|
+
// The offset (in bytes) from the beginning of the zip file for the current source.
|
|
343
|
+
this.currentSourceOffset = 0;
|
|
344
|
+
// The total number of entries in this zip file.
|
|
345
|
+
this.entriesCount = 0;
|
|
346
|
+
// the name of the file currently being added, null when handling the end of the zip file.
|
|
347
|
+
// Used for the emitted metadata.
|
|
348
|
+
this.currentFile = null;
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
this._sources = [];
|
|
353
|
+
}
|
|
354
|
+
utils.inherits(ZipFileWorker, GenericWorker);
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* @see GenericWorker.push
|
|
358
|
+
*/
|
|
359
|
+
ZipFileWorker.prototype.push = function (chunk) {
|
|
360
|
+
|
|
361
|
+
var currentFilePercent = chunk.meta.percent || 0;
|
|
362
|
+
var entriesCount = this.entriesCount;
|
|
363
|
+
var remainingFiles = this._sources.length;
|
|
364
|
+
|
|
365
|
+
if(this.accumulate) {
|
|
366
|
+
this.contentBuffer.push(chunk);
|
|
367
|
+
} else {
|
|
368
|
+
this.bytesWritten += chunk.data.length;
|
|
369
|
+
|
|
370
|
+
GenericWorker.prototype.push.call(this, {
|
|
371
|
+
data : chunk.data,
|
|
372
|
+
meta : {
|
|
373
|
+
currentFile : this.currentFile,
|
|
374
|
+
percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* The worker started a new source (an other worker).
|
|
382
|
+
* @param {Object} streamInfo the streamInfo object from the new source.
|
|
383
|
+
*/
|
|
384
|
+
ZipFileWorker.prototype.openedSource = function (streamInfo) {
|
|
385
|
+
this.currentSourceOffset = this.bytesWritten;
|
|
386
|
+
this.currentFile = streamInfo["file"].name;
|
|
387
|
+
|
|
388
|
+
var streamedContent = this.streamFiles && !streamInfo["file"].dir;
|
|
389
|
+
|
|
390
|
+
// don't stream folders (because they don't have any content)
|
|
391
|
+
if(streamedContent) {
|
|
392
|
+
var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
393
|
+
this.push({
|
|
394
|
+
data : record.fileRecord,
|
|
395
|
+
meta : {percent:0}
|
|
396
|
+
});
|
|
397
|
+
} else {
|
|
398
|
+
// we need to wait for the whole file before pushing anything
|
|
399
|
+
this.accumulate = true;
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* The worker finished a source (an other worker).
|
|
405
|
+
* @param {Object} streamInfo the streamInfo object from the finished source.
|
|
406
|
+
*/
|
|
407
|
+
ZipFileWorker.prototype.closedSource = function (streamInfo) {
|
|
408
|
+
this.accumulate = false;
|
|
409
|
+
var streamedContent = this.streamFiles && !streamInfo["file"].dir;
|
|
410
|
+
var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
411
|
+
|
|
412
|
+
this.dirRecords.push(record.dirRecord);
|
|
413
|
+
if(streamedContent) {
|
|
414
|
+
// after the streamed file, we put data descriptors
|
|
415
|
+
this.push({
|
|
416
|
+
data : generateDataDescriptors(streamInfo),
|
|
417
|
+
meta : {percent:100}
|
|
418
|
+
});
|
|
419
|
+
} else {
|
|
420
|
+
// the content wasn't streamed, we need to push everything now
|
|
421
|
+
// first the file record, then the content
|
|
422
|
+
this.push({
|
|
423
|
+
data : record.fileRecord,
|
|
424
|
+
meta : {percent:0}
|
|
425
|
+
});
|
|
426
|
+
while(this.contentBuffer.length) {
|
|
427
|
+
this.push(this.contentBuffer.shift());
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
this.currentFile = null;
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* @see GenericWorker.flush
|
|
435
|
+
*/
|
|
436
|
+
ZipFileWorker.prototype.flush = function () {
|
|
437
|
+
|
|
438
|
+
var localDirLength = this.bytesWritten;
|
|
439
|
+
for(var i = 0; i < this.dirRecords.length; i++) {
|
|
440
|
+
this.push({
|
|
441
|
+
data : this.dirRecords[i],
|
|
442
|
+
meta : {percent:100}
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
var centralDirLength = this.bytesWritten - localDirLength;
|
|
446
|
+
|
|
447
|
+
var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName);
|
|
448
|
+
|
|
449
|
+
this.push({
|
|
450
|
+
data : dirEnd,
|
|
451
|
+
meta : {percent:100}
|
|
452
|
+
});
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Prepare the next source to be read.
|
|
457
|
+
*/
|
|
458
|
+
ZipFileWorker.prototype.prepareNextSource = function () {
|
|
459
|
+
this.previous = this._sources.shift();
|
|
460
|
+
this.openedSource(this.previous.streamInfo);
|
|
461
|
+
if (this.isPaused) {
|
|
462
|
+
this.previous.pause();
|
|
463
|
+
} else {
|
|
464
|
+
this.previous.resume();
|
|
465
|
+
}
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* @see GenericWorker.registerPrevious
|
|
470
|
+
*/
|
|
471
|
+
ZipFileWorker.prototype.registerPrevious = function (previous) {
|
|
472
|
+
this._sources.push(previous);
|
|
473
|
+
var self = this;
|
|
474
|
+
|
|
475
|
+
previous.on("data", function (chunk) {
|
|
476
|
+
self.processChunk(chunk);
|
|
477
|
+
});
|
|
478
|
+
previous.on("end", function () {
|
|
479
|
+
self.closedSource(self.previous.streamInfo);
|
|
480
|
+
if(self._sources.length) {
|
|
481
|
+
self.prepareNextSource();
|
|
482
|
+
} else {
|
|
483
|
+
self.end();
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
previous.on("error", function (e) {
|
|
487
|
+
self.error(e);
|
|
488
|
+
});
|
|
489
|
+
return this;
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* @see GenericWorker.resume
|
|
494
|
+
*/
|
|
495
|
+
ZipFileWorker.prototype.resume = function () {
|
|
496
|
+
if(!GenericWorker.prototype.resume.call(this)) {
|
|
497
|
+
return false;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
if (!this.previous && this._sources.length) {
|
|
501
|
+
this.prepareNextSource();
|
|
502
|
+
return true;
|
|
503
|
+
}
|
|
504
|
+
if (!this.previous && !this._sources.length && !this.generatedError) {
|
|
505
|
+
this.end();
|
|
506
|
+
return true;
|
|
507
|
+
}
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* @see GenericWorker.error
|
|
512
|
+
*/
|
|
513
|
+
ZipFileWorker.prototype.error = function (e) {
|
|
514
|
+
var sources = this._sources;
|
|
515
|
+
if(!GenericWorker.prototype.error.call(this, e)) {
|
|
516
|
+
return false;
|
|
517
|
+
}
|
|
518
|
+
for(var i = 0; i < sources.length; i++) {
|
|
519
|
+
try {
|
|
520
|
+
sources[i].error(e);
|
|
521
|
+
} catch(e) {
|
|
522
|
+
// the `error` exploded, nothing to do
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
return true;
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* @see GenericWorker.lock
|
|
530
|
+
*/
|
|
531
|
+
ZipFileWorker.prototype.lock = function () {
|
|
532
|
+
GenericWorker.prototype.lock.call(this);
|
|
533
|
+
var sources = this._sources;
|
|
534
|
+
for(var i = 0; i < sources.length; i++) {
|
|
535
|
+
sources[i].lock();
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
module.exports = ZipFileWorker;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var compressions = require("../compressions");
|
|
4
|
+
var ZipFileWorker = require("./ZipFileWorker");
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Find the compression to use.
|
|
8
|
+
* @param {String} fileCompression the compression defined at the file level, if any.
|
|
9
|
+
* @param {String} zipCompression the compression defined at the load() level.
|
|
10
|
+
* @return {Object} the compression object to use.
|
|
11
|
+
*/
|
|
12
|
+
var getCompression = function (fileCompression, zipCompression) {
|
|
13
|
+
|
|
14
|
+
var compressionName = fileCompression || zipCompression;
|
|
15
|
+
var compression = compressions[compressionName];
|
|
16
|
+
if (!compression) {
|
|
17
|
+
throw new Error(compressionName + " is not a valid compression method !");
|
|
18
|
+
}
|
|
19
|
+
return compression;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Create a worker to generate a zip file.
|
|
24
|
+
* @param {JSZip} zip the JSZip instance at the right root level.
|
|
25
|
+
* @param {Object} options to generate the zip file.
|
|
26
|
+
* @param {String} comment the comment to use.
|
|
27
|
+
*/
|
|
28
|
+
exports.generateWorker = function (zip, options, comment) {
|
|
29
|
+
|
|
30
|
+
var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName);
|
|
31
|
+
var entriesCount = 0;
|
|
32
|
+
try {
|
|
33
|
+
|
|
34
|
+
zip.forEach(function (relativePath, file) {
|
|
35
|
+
entriesCount++;
|
|
36
|
+
var compression = getCompression(file.options.compression, options.compression);
|
|
37
|
+
var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};
|
|
38
|
+
var dir = file.dir, date = file.date;
|
|
39
|
+
|
|
40
|
+
file._compressWorker(compression, compressionOptions)
|
|
41
|
+
.withStreamInfo("file", {
|
|
42
|
+
name : relativePath,
|
|
43
|
+
dir : dir,
|
|
44
|
+
date : date,
|
|
45
|
+
comment : file.comment || "",
|
|
46
|
+
unixPermissions : file.unixPermissions,
|
|
47
|
+
dosPermissions : file.dosPermissions
|
|
48
|
+
})
|
|
49
|
+
.pipe(zipFileWorker);
|
|
50
|
+
});
|
|
51
|
+
zipFileWorker.entriesCount = entriesCount;
|
|
52
|
+
} catch (e) {
|
|
53
|
+
zipFileWorker.error(e);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return zipFileWorker;
|
|
57
|
+
};
|