@design-edito/tools 0.3.8 → 0.3.10
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/agnostic/arrays/index.d.ts +2 -2
- package/agnostic/arrays/index.js +2 -2
- package/agnostic/arrays/is-array-of/index.d.ts +1 -1
- package/agnostic/arrays/is-array-of/index.js +2 -2
- package/agnostic/booleans/is-falsy/index.d.ts +1 -1
- package/agnostic/colors/channels/index.d.ts +1 -1
- package/agnostic/colors/contrast/index.d.ts +1 -1
- package/agnostic/colors/convert/index.d.ts +1 -1
- package/agnostic/colors/convert/index.js +14 -17
- package/agnostic/colors/cssColorsMap.d.ts +9 -0
- package/agnostic/colors/distance/index.d.ts +1 -1
- package/agnostic/colors/index.d.ts +5 -5
- package/agnostic/colors/index.js +5 -5
- package/agnostic/colors/invert/index.d.ts +1 -1
- package/agnostic/colors/luminance/index.d.ts +1 -1
- package/agnostic/colors/palette/index.js +2 -0
- package/agnostic/colors/tidy/index.js +2 -1
- package/agnostic/colors/typechecks/index.d.ts +1 -1
- package/agnostic/colors/typechecks/index.js +1 -3
- package/agnostic/colors/types.d.ts +0 -7
- package/agnostic/colors/types.js +0 -154
- package/agnostic/css/bem/index.d.ts +3 -3
- package/agnostic/css/bem/index.js +6 -5
- package/agnostic/css/clss/index.d.ts +2 -1
- package/agnostic/css/clss/index.js +2 -2
- package/agnostic/css/generate-nice-color/index.js +1 -0
- package/agnostic/css/index.d.ts +3 -3
- package/agnostic/css/index.js +3 -3
- package/agnostic/css/styles-set/index.d.ts +4 -4
- package/agnostic/css/styles-set/index.js +1 -1
- package/agnostic/errors/register/index.js +4 -2
- package/agnostic/html/get-node-ancestors/index.js +1 -1
- package/agnostic/html/get-position-inside-parent/index.js +1 -1
- package/agnostic/html/hyper-json/cast/index.d.ts +1 -1
- package/agnostic/html/hyper-json/method/index.d.ts +2 -2
- package/agnostic/html/hyper-json/serialize/index.d.ts +1 -1
- package/agnostic/html/hyper-json/serialize/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +5 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +5 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/hjparse/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/hjstringify/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +21 -21
- package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +21 -21
- package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.d.ts +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.d.ts +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.d.ts +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +7 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.d.ts +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +7 -4
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +9 -9
- package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.d.ts +2 -2
- package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +0 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/any/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/array/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/get/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/global/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/null/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/record/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.d.ts +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +3 -1
- package/agnostic/html/hyper-json/transformer/index.d.ts +2 -2
- package/agnostic/html/hyper-json/transformer/index.js +6 -9
- package/agnostic/html/hyper-json/tree/index.d.ts +1 -1
- package/agnostic/html/hyper-json/tree/index.js +14 -10
- package/agnostic/html/hyper-json/types/index.d.ts +9 -13
- package/agnostic/html/hyper-json/utils/index.d.ts +7 -7
- package/agnostic/html/hyper-json/utils/index.js +1 -1
- package/agnostic/html/index.d.ts +2 -2
- package/agnostic/html/index.js +2 -2
- package/agnostic/html/placeholders/index.d.ts +1 -1
- package/agnostic/html/selector-to-element/index.js +1 -1
- package/agnostic/index.d.ts +7 -7
- package/agnostic/index.js +7 -7
- package/agnostic/misc/assert/index.d.ts +2 -2
- package/agnostic/misc/assert/index.js +4 -4
- package/agnostic/misc/cast/index.d.ts +1 -1
- package/agnostic/misc/connection/index.js +0 -1
- package/agnostic/misc/crawler/index.d.ts +2 -2
- package/agnostic/misc/crossenv/detect-runtime/index.js +4 -4
- package/agnostic/misc/crossenv/window/index.d.ts +1 -1
- package/agnostic/misc/crossenv/window/index.js +2 -2
- package/agnostic/misc/data-size/index.js +2 -2
- package/agnostic/misc/index.d.ts +4 -4
- package/agnostic/misc/index.js +4 -4
- package/agnostic/misc/is-constructor-function/index.d.ts +1 -1
- package/agnostic/misc/logs/index.d.ts +1 -1
- package/agnostic/misc/logs/index.js +1 -1
- package/agnostic/misc/logs/logger/index.d.ts +3 -3
- package/agnostic/misc/outcome/index.d.ts +7 -7
- package/agnostic/numbers/approximate-rational/index.js +4 -2
- package/agnostic/numbers/index.d.ts +3 -3
- package/agnostic/numbers/index.js +3 -3
- package/agnostic/objects/deep-get-property/index.js +2 -2
- package/agnostic/objects/flatten-getters/index.js +2 -1
- package/agnostic/objects/index.d.ts +5 -4
- package/agnostic/objects/index.js +5 -4
- package/agnostic/objects/record-format/index.js +1 -0
- package/agnostic/objects/sort-keys/index.d.ts +11 -0
- package/agnostic/objects/sort-keys/index.js +12 -0
- package/agnostic/objects/sort-keys/index.test.d.ts +1 -0
- package/agnostic/optim/index.d.ts +1 -1
- package/agnostic/optim/index.js +1 -1
- package/agnostic/optim/memoize/index.js +1 -1
- package/agnostic/optim/throttle-debounce/index.d.ts +12 -10
- package/agnostic/optim/throttle-debounce/index.js +2 -2
- package/agnostic/optim/throttle-debounce/types.d.ts +1 -1
- package/agnostic/random/index.d.ts +2 -2
- package/agnostic/random/index.js +2 -2
- package/agnostic/random/random/index.js +1 -1
- package/agnostic/sanitization/html/index.js +7 -7
- package/agnostic/sanitization/index.d.ts +2 -2
- package/agnostic/sanitization/index.js +2 -2
- package/agnostic/sanitization/types.d.ts +2 -6
- package/agnostic/strings/char-codes/index.d.ts +5 -5
- package/agnostic/strings/char-codes/index.js +2 -2
- package/agnostic/strings/matches/index.d.ts +2 -2
- package/agnostic/time/dates/format-date/index.js +23 -9
- package/agnostic/time/duration/index.d.ts +23 -2
- package/agnostic/time/duration/index.js +36 -4
- package/agnostic/time/index.d.ts +2 -2
- package/agnostic/time/index.js +2 -2
- package/agnostic/time/timeout/index.js +2 -2
- package/agnostic/time/wait/index.d.ts +2 -2
- package/agnostic/time/wait/index.js +1 -1
- package/components/EventListener/index.d.ts +10 -0
- package/components/EventListener/index.js +47 -0
- package/components/EventListener/styles.module.css +0 -0
- package/components/Input/index.d.ts +7 -0
- package/components/Input/index.js +29 -0
- package/components/Input/styles.module.css +0 -0
- package/components/IntersectionObserver/index.d.ts +20 -0
- package/components/IntersectionObserver/index.js +79 -0
- package/components/IntersectionObserver/styles.module.css +0 -0
- package/components/index.d.ts +3 -1
- package/components/index.js +3 -1
- package/components/public-classnames.d.ts +3 -0
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/node/@aws-s3/storage/directory/copy-dir/index.d.ts +2 -2
- package/node/@aws-s3/storage/directory/copy-dir/index.js +3 -3
- package/node/@aws-s3/storage/directory/index.d.ts +1 -1
- package/node/@aws-s3/storage/directory/index.js +1 -1
- package/node/@aws-s3/storage/directory/list/index.d.ts +2 -2
- package/node/@aws-s3/storage/directory/list/index.js +1 -1
- package/node/@aws-s3/storage/directory/move-dir/index.d.ts +3 -3
- package/node/@aws-s3/storage/directory/move-dir/index.js +3 -3
- package/node/@aws-s3/storage/directory/remove-dir/index.d.ts +2 -2
- package/node/@aws-s3/storage/directory/remove-dir/index.js +4 -4
- package/node/@aws-s3/storage/file/copy/index.d.ts +1 -1
- package/node/@aws-s3/storage/file/download/index.d.ts +3 -3
- package/node/@aws-s3/storage/file/exists/index.d.ts +2 -2
- package/node/@aws-s3/storage/file/exists/index.js +1 -2
- package/node/@aws-s3/storage/file/index.d.ts +2 -2
- package/node/@aws-s3/storage/file/index.js +2 -2
- package/node/@aws-s3/storage/file/move/index.d.ts +2 -2
- package/node/@aws-s3/storage/file/remove/index.d.ts +1 -1
- package/node/@aws-s3/storage/file/stat/index.d.ts +1 -1
- package/node/@aws-s3/storage/file/upload/index.d.ts +2 -2
- package/node/@express/@multer/index.d.ts +1 -1
- package/node/@google-cloud/storage/bucket/get-metadata/index.d.ts +1 -1
- package/node/@google-cloud/storage/directory/copy-dir/index.d.ts +1 -1
- package/node/@google-cloud/storage/directory/index.d.ts +1 -1
- package/node/@google-cloud/storage/directory/index.js +1 -1
- package/node/@google-cloud/storage/directory/list/index.d.ts +1 -1
- package/node/@google-cloud/storage/directory/move-dir/index.d.ts +1 -1
- package/node/@google-cloud/storage/directory/remove-dir/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/copy/index.d.ts +2 -2
- package/node/@google-cloud/storage/file/download/index.d.ts +2 -2
- package/node/@google-cloud/storage/file/exists/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/generate-signed-url/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/get-metadata/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/get-permissions/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/index.d.ts +4 -4
- package/node/@google-cloud/storage/file/index.js +4 -4
- package/node/@google-cloud/storage/file/move/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/remove/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.d.ts +4 -4
- package/node/@google-cloud/storage/file/stat/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/stat/index.js +2 -2
- package/node/@google-cloud/storage/file/update-metadata/index.d.ts +1 -1
- package/node/@google-cloud/storage/file/upload/index.d.ts +2 -2
- package/node/@google-cloud/storage/index.d.ts +1 -1
- package/node/@google-cloud/storage/index.js +1 -1
- package/node/cloud-storage/operations/copy-dir/index.d.ts +8 -8
- package/node/cloud-storage/operations/copy-dir/index.js +4 -4
- package/node/cloud-storage/operations/copy-file/index.d.ts +8 -8
- package/node/cloud-storage/operations/copy-file/index.js +4 -4
- package/node/cloud-storage/operations/download-file/index.d.ts +9 -9
- package/node/cloud-storage/operations/download-file/index.js +4 -4
- package/node/cloud-storage/operations/exists-file/index.d.ts +6 -6
- package/node/cloud-storage/operations/exists-file/index.js +4 -4
- package/node/cloud-storage/operations/index.d.ts +4 -4
- package/node/cloud-storage/operations/index.js +4 -4
- package/node/cloud-storage/operations/list-dir/index.d.ts +6 -6
- package/node/cloud-storage/operations/list-dir/index.js +4 -4
- package/node/cloud-storage/operations/move-dir/index.d.ts +8 -8
- package/node/cloud-storage/operations/move-dir/index.js +4 -4
- package/node/cloud-storage/operations/move-file/index.d.ts +8 -8
- package/node/cloud-storage/operations/move-file/index.js +4 -4
- package/node/cloud-storage/operations/remove-dir/index.d.ts +8 -8
- package/node/cloud-storage/operations/remove-dir/index.js +4 -4
- package/node/cloud-storage/operations/remove-file/index.d.ts +8 -8
- package/node/cloud-storage/operations/remove-file/index.js +4 -4
- package/node/cloud-storage/operations/stat-file/index.d.ts +8 -8
- package/node/cloud-storage/operations/stat-file/index.js +4 -4
- package/node/cloud-storage/operations/upload-file/index.d.ts +9 -9
- package/node/cloud-storage/operations/upload-file/index.js +4 -4
- package/node/files/read-write/index.js +1 -1
- package/node/files/subpaths/index.d.ts +3 -3
- package/node/files/subpaths/index.js +6 -6
- package/node/ftps/directory/copy-dir/index.d.ts +1 -1
- package/node/ftps/directory/copy-dir/index.js +1 -1
- package/node/ftps/directory/list/index.d.ts +1 -1
- package/node/ftps/directory/move-dir/index.d.ts +1 -1
- package/node/ftps/directory/move-dir/index.js +1 -3
- package/node/ftps/directory/remove-dir/index.d.ts +2 -2
- package/node/ftps/file/copy/index.d.ts +1 -1
- package/node/ftps/file/copy/index.js +1 -1
- package/node/ftps/file/download/index.d.ts +2 -2
- package/node/ftps/file/exists/index.d.ts +2 -2
- package/node/ftps/file/exists/index.js +1 -1
- package/node/ftps/file/index.d.ts +3 -3
- package/node/ftps/file/index.js +3 -3
- package/node/ftps/file/move/index.d.ts +3 -3
- package/node/ftps/file/move/index.js +1 -1
- package/node/ftps/file/remove/index.d.ts +1 -1
- package/node/ftps/file/stat/index.d.ts +1 -1
- package/node/ftps/file/stat/index.js +2 -2
- package/node/ftps/file/upload/index.d.ts +2 -2
- package/node/images/format/index.d.ts +1 -1
- package/node/images/format/index.js +9 -9
- package/node/images/index.d.ts +2 -2
- package/node/images/index.js +2 -2
- package/node/images/metadata/index.d.ts +1 -1
- package/node/images/metadata/index.js +1 -1
- package/node/images/transform/index.d.ts +2 -2
- package/node/images/transform/index.js +26 -21
- package/node/images/transform/operations/blur/index.d.ts +1 -1
- package/node/images/transform/operations/brighten/index.d.ts +1 -1
- package/node/images/transform/operations/extend/index.d.ts +1 -1
- package/node/images/transform/operations/extract/index.d.ts +1 -1
- package/node/images/transform/operations/flatten/index.d.ts +1 -1
- package/node/images/transform/operations/flatten/index.js +1 -1
- package/node/images/transform/operations/flip/index.d.ts +1 -1
- package/node/images/transform/operations/flop/index.d.ts +1 -1
- package/node/images/transform/operations/hue/index.d.ts +1 -1
- package/node/images/transform/operations/index.d.ts +5 -5
- package/node/images/transform/operations/index.js +5 -5
- package/node/images/transform/operations/level/index.d.ts +1 -1
- package/node/images/transform/operations/lighten/index.d.ts +1 -1
- package/node/images/transform/operations/normalize/index.d.ts +1 -1
- package/node/images/transform/operations/overlay/index.js +1 -1
- package/node/images/transform/operations/resize/index.d.ts +1 -1
- package/node/images/transform/operations/rotate/index.d.ts +1 -1
- package/node/images/transform/operations/saturate/index.d.ts +1 -1
- package/node/index.d.ts +5 -5
- package/node/index.js +5 -5
- package/node/process/prompt-continue/index.js +1 -1
- package/node/process/spawner/index.d.ts +1 -9
- package/node/process/spawner/index.js +10 -8
- package/node/sftp/directory/copy-dir/index.d.ts +2 -1
- package/node/sftp/directory/copy-dir/index.js +2 -2
- package/node/sftp/directory/list/index.d.ts +1 -1
- package/node/sftp/directory/move-dir/index.d.ts +1 -1
- package/node/sftp/directory/move-dir/index.js +2 -4
- package/node/sftp/directory/remove-dir/index.d.ts +2 -2
- package/node/sftp/file/copy/index.d.ts +2 -1
- package/node/sftp/file/copy/index.js +2 -2
- package/node/sftp/file/download/index.d.ts +3 -3
- package/node/sftp/file/exists/index.d.ts +1 -1
- package/node/sftp/file/index.d.ts +3 -3
- package/node/sftp/file/index.js +3 -3
- package/node/sftp/file/move/index.d.ts +3 -3
- package/node/sftp/file/move/index.js +3 -5
- package/node/sftp/file/remove/index.d.ts +1 -1
- package/node/sftp/file/remove/index.js +1 -1
- package/node/sftp/file/stat/index.d.ts +1 -1
- package/node/sftp/file/stat/index.js +1 -1
- package/node/sftp/file/upload/index.d.ts +3 -2
- package/node/sftp/file/upload/index.js +1 -1
- package/package.json +1260 -26
- package/components/Comp/index.d.ts +0 -1
- package/components/Comp/index.js +0 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * as copy from './copy/index.js'
|
|
2
2
|
export * as download from './download/index.js'
|
|
3
3
|
export * as exists from './exists/index.js'
|
|
4
|
-
export * as move from './move/index.js'
|
|
5
|
-
export * as stat from './stat/index.js'
|
|
6
4
|
export * as remove from './remove/index.js'
|
|
5
|
+
export * as move from './move/index.js'
|
|
7
6
|
export * as upload from './upload/index.js'
|
|
7
|
+
export * as stat from './stat/index.js'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * as copy from './copy/index.js'
|
|
2
2
|
export * as download from './download/index.js'
|
|
3
3
|
export * as exists from './exists/index.js'
|
|
4
|
-
export * as move from './move/index.js'
|
|
5
|
-
export * as stat from './stat/index.js'
|
|
6
4
|
export * as remove from './remove/index.js'
|
|
5
|
+
export * as move from './move/index.js'
|
|
7
6
|
export * as upload from './upload/index.js'
|
|
7
|
+
export * as stat from './stat/index.js'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S3Client, CopyObjectCommandInput, DeleteObjectCommandInput } from '@aws-sdk/client-s3';
|
|
1
|
+
import { type S3Client, type CopyObjectCommandInput, type DeleteObjectCommandInput } from '@aws-sdk/client-s3';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type MoveOptions = {
|
|
4
4
|
/** Extra parameters forwarded to `CopyObjectCommand` (`Bucket`, `Key`, `CopySource` are filled internally). */
|
|
@@ -13,7 +13,7 @@ export type MoveOptions = {
|
|
|
13
13
|
overwrite?: boolean;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* Moves an object from one key to another within the same S3 bucket (AWS SDK
|
|
16
|
+
* Moves an object from one key to another within the same S3 bucket (AWS SDK v3).
|
|
17
17
|
*
|
|
18
18
|
* The function copies the object from `sourcePath` to `targetPath` and, upon
|
|
19
19
|
* successful copy, deletes the original object.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S3Client, HeadObjectCommandInput, HeadObjectCommandOutput } from '@aws-sdk/client-s3';
|
|
1
|
+
import { type S3Client, type HeadObjectCommandInput, type HeadObjectCommandOutput } from '@aws-sdk/client-s3';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export interface Stat {
|
|
4
4
|
size?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Readable } from 'node:stream';
|
|
2
|
-
import { S3Client, PutObjectCommandInput } from '@aws-sdk/client-s3';
|
|
1
|
+
import { type Readable } from 'node:stream';
|
|
2
|
+
import { type S3Client, type PutObjectCommandInput } from '@aws-sdk/client-s3';
|
|
3
3
|
import { Upload } from '@aws-sdk/lib-storage';
|
|
4
4
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
5
5
|
export type UploadOptions = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, BucketMetadata, GetBucketMetadataOptions as GCSGetBucketMetadataOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type BucketMetadata, type GetBucketMetadataOptions as GCSGetBucketMetadataOptions } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type GetBucketMetadataOptions = GCSGetBucketMetadataOptions;
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, GetFileOptions, CopyOptions as GCSCopyOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type GetFileOptions, type CopyOptions as GCSCopyOptions } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type CopyDirOptions = {
|
|
4
4
|
getFileOptions?: GetFileOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, FileOptions, CopyOptions as GCSCopyOptions, DeleteFileOptions as GCSDeleteOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type FileOptions, type CopyOptions as GCSCopyOptions, type DeleteFileOptions as GCSDeleteOptions } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type MoveDirOptions = {
|
|
4
4
|
fileOptions?: FileOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, DeleteFileOptions as GCSDeleteFileOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type DeleteFileOptions as GCSDeleteFileOptions } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type RemoveDirOptions = {
|
|
4
4
|
/** Extra parameters forwarded to `bucket.deleteFiles`. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, FileOptions, CopyOptions as GCSFileCopyOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type FileOptions, type CopyOptions as GCSFileCopyOptions } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type CopyOptions = {
|
|
4
4
|
/** Additional options for constructing the `File` handles. */
|
|
@@ -18,7 +18,7 @@ export type CopyOptions = {
|
|
|
18
18
|
* If `overwrite` is **false** (default) and the destination object already
|
|
19
19
|
* exists, the operation aborts.
|
|
20
20
|
*
|
|
21
|
-
* @param {Bucket} bucket - The Google Cloud
|
|
21
|
+
* @param {Bucket} bucket - The Google Cloud Storage bucket containing the file.
|
|
22
22
|
* @param {string} sourcePath - The path of the source object to copy.
|
|
23
23
|
* @param {string} targetPath - The destination path for the copied object.
|
|
24
24
|
* @param {CopyOptions} [options] - Optional copy configuration.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Readable } from 'node:stream';
|
|
2
|
-
import { Bucket, FileOptions, DownloadOptions as GCSFileDownloadOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Readable } from 'node:stream';
|
|
2
|
+
import { type Bucket, type FileOptions, type DownloadOptions as GCSFileDownloadOptions } from '@google-cloud/storage';
|
|
3
3
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
4
4
|
export type DownloadOptions = {
|
|
5
5
|
fileOptions?: FileOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, FileOptions, FileExistsOptions as GCSFileExistsOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type FileOptions, type FileExistsOptions as GCSFileExistsOptions } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type ExistsOptions = {
|
|
4
4
|
fileOptions?: FileOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, FileOptions, GetSignedUrlConfig } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type FileOptions, type GetSignedUrlConfig } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type GenerateSignedUrlOptions = {
|
|
4
4
|
fileOptions?: FileOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, FileOptions, GetFileMetadataOptions as GCSGetFileMetadataOptions, FileMetadata } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type FileOptions, type GetFileMetadataOptions as GCSGetFileMetadataOptions, type FileMetadata } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type GetMetadataOptions = {
|
|
4
4
|
fileOptions?: FileOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, FileOptions, GetAclOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type FileOptions, type GetAclOptions } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type GetPermissionsOptions = {
|
|
4
4
|
fileOptions?: FileOptions;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export * as copy from './copy/index.js'
|
|
2
2
|
export * as exists from './exists/index.js'
|
|
3
|
+
export * as download from './download/index.js'
|
|
3
4
|
export * as generateSignedUrl from './generate-signed-url/index.js'
|
|
5
|
+
export * as remove from './remove/index.js'
|
|
6
|
+
export * as move from './move/index.js'
|
|
4
7
|
export * as getMetadata from './get-metadata/index.js'
|
|
5
8
|
export * as getPermissions from './get-permissions/index.js'
|
|
6
|
-
export * as move from './move/index.js'
|
|
7
|
-
export * as remove from './remove/index.js'
|
|
8
|
-
export * as download from './download/index.js'
|
|
9
9
|
export * as revokeSignedUrls from './revoke-signed-urls/index.js'
|
|
10
|
+
export * as stat from './stat/index.js'
|
|
10
11
|
export * as updateMetadata from './update-metadata/index.js'
|
|
11
12
|
export * as upload from './upload/index.js'
|
|
12
|
-
export * as stat from './stat/index.js'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export * as copy from './copy/index.js'
|
|
2
2
|
export * as exists from './exists/index.js'
|
|
3
|
+
export * as download from './download/index.js'
|
|
3
4
|
export * as generateSignedUrl from './generate-signed-url/index.js'
|
|
5
|
+
export * as remove from './remove/index.js'
|
|
6
|
+
export * as move from './move/index.js'
|
|
4
7
|
export * as getMetadata from './get-metadata/index.js'
|
|
5
8
|
export * as getPermissions from './get-permissions/index.js'
|
|
6
|
-
export * as move from './move/index.js'
|
|
7
|
-
export * as remove from './remove/index.js'
|
|
8
|
-
export * as download from './download/index.js'
|
|
9
9
|
export * as revokeSignedUrls from './revoke-signed-urls/index.js'
|
|
10
|
+
export * as stat from './stat/index.js'
|
|
10
11
|
export * as updateMetadata from './update-metadata/index.js'
|
|
11
12
|
export * as upload from './upload/index.js'
|
|
12
|
-
export * as stat from './stat/index.js'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, FileOptions, CopyOptions, DeleteFileOptions as GCSDeleteFileOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type FileOptions, type CopyOptions, type DeleteFileOptions as GCSDeleteFileOptions } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type MoveOptions = {
|
|
4
4
|
/** Options applied when obtaining `bucket.file(...)` handles. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, FileOptions, DeleteFileOptions as GCSDeleteFileOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type FileOptions, type DeleteFileOptions as GCSDeleteFileOptions } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type RemoveOptions = {
|
|
4
4
|
fileOptions?: FileOptions;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Bucket } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
|
-
import { DownloadOptions } from '../download/index.js';
|
|
4
|
-
import { RemoveOptions } from '../remove/index.js';
|
|
5
|
-
import { UploadOptions } from '../upload/index.js';
|
|
3
|
+
import { type DownloadOptions } from '../download/index.js';
|
|
4
|
+
import { type RemoveOptions } from '../remove/index.js';
|
|
5
|
+
import { type UploadOptions } from '../upload/index.js';
|
|
6
6
|
export type RevokeSignedUrlsOptions = {
|
|
7
7
|
downloadOptions?: DownloadOptions;
|
|
8
8
|
removeOptions?: RemoveOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, FileOptions, GetFileMetadataOptions, FileMetadata } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type FileOptions, type GetFileMetadataOptions, type FileMetadata } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
/** Provider‑agnostic view + strongly‑typed raw metadata */
|
|
4
4
|
export interface Stat {
|
|
@@ -6,8 +6,8 @@ async function stat(bucket, path, options) {
|
|
|
6
6
|
try {
|
|
7
7
|
const [meta] = await bucket.file(path, fileOptions).getMetadata(getMetadataOptions);
|
|
8
8
|
const res = {
|
|
9
|
-
size: meta.size ? Number(meta.size) : void 0,
|
|
10
|
-
modifiedAt: meta.updated ? new Date(meta.updated) : void 0,
|
|
9
|
+
size: meta.size !== void 0 ? Number(meta.size) : void 0,
|
|
10
|
+
modifiedAt: meta.updated !== void 0 ? new Date(meta.updated) : void 0,
|
|
11
11
|
checksum: meta.md5Hash ?? meta.crc32c,
|
|
12
12
|
contentType: meta.contentType,
|
|
13
13
|
metadata: meta.metadata,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bucket, FileOptions, SetFileMetadataOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Bucket, type FileOptions, type SetFileMetadataOptions } from '@google-cloud/storage';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type UpdateFileMetadataOptions = {
|
|
4
4
|
fileOptions?: FileOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Readable } from 'node:stream';
|
|
2
|
-
import { Bucket, FileOptions, SaveOptions } from '@google-cloud/storage';
|
|
1
|
+
import { type Readable } from 'node:stream';
|
|
2
|
+
import { type Bucket, type FileOptions, type SaveOptions } from '@google-cloud/storage';
|
|
3
3
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
4
4
|
export type UploadOptions = {
|
|
5
5
|
fileOptions?: FileOptions;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
-
import { Client as FtpClient } from 'basic-ftp';
|
|
3
|
-
import SftpClient from 'ssh2-sftp-client';
|
|
1
|
+
import { type Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
+
import { type Client as FtpClient } from 'basic-ftp';
|
|
3
|
+
import type SftpClient from 'ssh2-sftp-client';
|
|
4
4
|
import * as Outcome from '../../../../agnostic/misc/outcome/index.js';
|
|
5
|
-
import { S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
-
import { CopyDirOptions as FtpsCopyDirOptions } from '../../../ftps/directory/copy-dir/index.js';
|
|
7
|
-
import { CopyDirOptions as SftpCopyDirOptions } from '../../../sftp/directory/copy-dir/index.js';
|
|
8
|
-
import { CopyDirOptions as S3CopyDirOptions } from '../../../@aws-s3/storage/directory/copy-dir/index.js';
|
|
9
|
-
import { CopyDirOptions as GcsCopyDirOptions } from '../../../@google-cloud/storage/directory/copy-dir/index.js';
|
|
5
|
+
import { type S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
+
import { type CopyDirOptions as FtpsCopyDirOptions } from '../../../ftps/directory/copy-dir/index.js';
|
|
7
|
+
import { type CopyDirOptions as SftpCopyDirOptions } from '../../../sftp/directory/copy-dir/index.js';
|
|
8
|
+
import { type CopyDirOptions as S3CopyDirOptions } from '../../../@aws-s3/storage/directory/copy-dir/index.js';
|
|
9
|
+
import { type CopyDirOptions as GcsCopyDirOptions } from '../../../@google-cloud/storage/directory/copy-dir/index.js';
|
|
10
10
|
/** Return type for copy directory operations. */
|
|
11
11
|
type Returned = Outcome.Either<true, string>;
|
|
12
12
|
/**
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
copyDir as gcsCopyDir
|
|
20
20
|
} from "../../../@google-cloud/storage/directory/copy-dir/index.js";
|
|
21
21
|
async function copyDir(client, sourcePath, targetPath, options) {
|
|
22
|
-
if (isGcsBucket(client)) return gcsCopyDir(client, sourcePath, targetPath, options);
|
|
23
|
-
if (isS3ClientWithBucket(client)) return s3CopyDir(client.client, client.bucketName, sourcePath, targetPath, options);
|
|
24
|
-
if (isFtpClient(client)) return ftpCopyDir(client, sourcePath, targetPath);
|
|
25
|
-
if (isSftpClient(client)) return sftpCopyDir(client, sourcePath, targetPath);
|
|
22
|
+
if (isGcsBucket(client)) return await gcsCopyDir(client, sourcePath, targetPath, options);
|
|
23
|
+
if (isS3ClientWithBucket(client)) return await s3CopyDir(client.client, client.bucketName, sourcePath, targetPath, options);
|
|
24
|
+
if (isFtpClient(client)) return await ftpCopyDir(client, sourcePath, targetPath);
|
|
25
|
+
if (isSftpClient(client)) return await sftpCopyDir(client, sourcePath, targetPath);
|
|
26
26
|
return Outcome.makeFailure("Invalid client type");
|
|
27
27
|
}
|
|
28
28
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
-
import { Client as FtpClient } from 'basic-ftp';
|
|
3
|
-
import SftpClient from 'ssh2-sftp-client';
|
|
1
|
+
import { type Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
+
import { type Client as FtpClient } from 'basic-ftp';
|
|
3
|
+
import type SftpClient from 'ssh2-sftp-client';
|
|
4
4
|
import * as Outcome from '../../../../agnostic/misc/outcome/index.js';
|
|
5
|
-
import { S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
-
import { CopyOptions as FtpsCopyOptions } from '../../../ftps/file/copy/index.js';
|
|
7
|
-
import { CopyOptions as SftpCopyOptions } from '../../../sftp/file/copy/index.js';
|
|
8
|
-
import { CopyOptions as S3CopyOptions } from '../../../@aws-s3/storage/file/copy/index.js';
|
|
9
|
-
import { CopyOptions as GcsCopyOptions } from '../../../@google-cloud/storage/file/copy/index.js';
|
|
5
|
+
import { type S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
+
import { type CopyOptions as FtpsCopyOptions } from '../../../ftps/file/copy/index.js';
|
|
7
|
+
import { type CopyOptions as SftpCopyOptions } from '../../../sftp/file/copy/index.js';
|
|
8
|
+
import { type CopyOptions as S3CopyOptions } from '../../../@aws-s3/storage/file/copy/index.js';
|
|
9
|
+
import { type CopyOptions as GcsCopyOptions } from '../../../@google-cloud/storage/file/copy/index.js';
|
|
10
10
|
/** Return type for copy file operations. */
|
|
11
11
|
type Returned = Outcome.Either<true, string>;
|
|
12
12
|
/**
|
|
@@ -11,10 +11,10 @@ import { copy as sftpCopy } from "../../../sftp/file/copy/index.js";
|
|
|
11
11
|
import { copy as s3Copy } from "../../../@aws-s3/storage/file/copy/index.js";
|
|
12
12
|
import { copy as gcsCopy } from "../../../@google-cloud/storage/file/copy/index.js";
|
|
13
13
|
async function copyFile(client, sourcePath, targetPath, options) {
|
|
14
|
-
if (isGcsBucket(client)) return gcsCopy(client, sourcePath, targetPath, options);
|
|
15
|
-
if (isS3ClientWithBucket(client)) return s3Copy(client.client, client.bucketName, sourcePath, targetPath, options);
|
|
16
|
-
if (isFtpClient(client)) return ftpCopy(client, sourcePath, targetPath, options);
|
|
17
|
-
if (isSftpClient(client)) return sftpCopy(client, sourcePath, targetPath, options);
|
|
14
|
+
if (isGcsBucket(client)) return await gcsCopy(client, sourcePath, targetPath, options);
|
|
15
|
+
if (isS3ClientWithBucket(client)) return await s3Copy(client.client, client.bucketName, sourcePath, targetPath, options);
|
|
16
|
+
if (isFtpClient(client)) return await ftpCopy(client, sourcePath, targetPath, options);
|
|
17
|
+
if (isSftpClient(client)) return await sftpCopy(client, sourcePath, targetPath, options);
|
|
18
18
|
return Outcome.makeFailure("Invalid client type");
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Readable } from 'node:stream';
|
|
2
|
-
import { Bucket as GCSBucket } from '@google-cloud/storage';
|
|
3
|
-
import { Client as FtpClient } from 'basic-ftp';
|
|
4
|
-
import SftpClient from 'ssh2-sftp-client';
|
|
1
|
+
import { type Readable } from 'node:stream';
|
|
2
|
+
import { type Bucket as GCSBucket } from '@google-cloud/storage';
|
|
3
|
+
import { type Client as FtpClient } from 'basic-ftp';
|
|
4
|
+
import type SftpClient from 'ssh2-sftp-client';
|
|
5
5
|
import * as Outcome from '../../../../agnostic/misc/outcome/index.js';
|
|
6
|
-
import { S3ClientWithBucket } from '../../clients/index.js';
|
|
7
|
-
import { DownloadOptions as FtpDownloadOptions } from '../../../ftps/file/download/index.js';
|
|
8
|
-
import { DownloadOptions as SftpDownloadOptions } from '../../../sftp/file/download/index.js';
|
|
9
|
-
import { DownloadOptions as S3DownloadOptions } from '../../../@aws-s3/storage/file/download/index.js';
|
|
10
|
-
import { DownloadOptions as GcsDownloadOptions } from '../../../@google-cloud/storage/file/download/index.js';
|
|
6
|
+
import { type S3ClientWithBucket } from '../../clients/index.js';
|
|
7
|
+
import { type DownloadOptions as FtpDownloadOptions } from '../../../ftps/file/download/index.js';
|
|
8
|
+
import { type DownloadOptions as SftpDownloadOptions } from '../../../sftp/file/download/index.js';
|
|
9
|
+
import { type DownloadOptions as S3DownloadOptions } from '../../../@aws-s3/storage/file/download/index.js';
|
|
10
|
+
import { type DownloadOptions as GcsDownloadOptions } from '../../../@google-cloud/storage/file/download/index.js';
|
|
11
11
|
/** Return type for download file operations. */
|
|
12
12
|
type Returned = Outcome.Either<Readable, string>;
|
|
13
13
|
/**
|
|
@@ -11,10 +11,10 @@ import { download as sftpDownload } from "../../../sftp/file/download/index.js";
|
|
|
11
11
|
import { download as s3Download } from "../../../@aws-s3/storage/file/download/index.js";
|
|
12
12
|
import { download as gcsDownload } from "../../../@google-cloud/storage/file/download/index.js";
|
|
13
13
|
async function downloadFile(client, path, options) {
|
|
14
|
-
if (isGcsBucket(client)) return gcsDownload(client, path, options);
|
|
15
|
-
if (isS3ClientWithBucket(client)) return s3Download(client.client, client.bucketName, path, options);
|
|
16
|
-
if (isFtpClient(client)) return ftpDownload(client, path, options);
|
|
17
|
-
if (isSftpClient(client)) return sftpDownload(client, path, options);
|
|
14
|
+
if (isGcsBucket(client)) return await gcsDownload(client, path, options);
|
|
15
|
+
if (isS3ClientWithBucket(client)) return await s3Download(client.client, client.bucketName, path, options);
|
|
16
|
+
if (isFtpClient(client)) return await ftpDownload(client, path, options);
|
|
17
|
+
if (isSftpClient(client)) return await sftpDownload(client, path, options);
|
|
18
18
|
return Outcome.makeFailure("Invalid client type");
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
-
import { Client as FtpClient } from 'basic-ftp';
|
|
3
|
-
import SftpClient from 'ssh2-sftp-client';
|
|
1
|
+
import { type Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
+
import { type Client as FtpClient } from 'basic-ftp';
|
|
3
|
+
import type SftpClient from 'ssh2-sftp-client';
|
|
4
4
|
import * as Outcome from '../../../../agnostic/misc/outcome/index.js';
|
|
5
|
-
import { S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
-
import { ExistsOptions as S3ExistsOptions } from '../../../@aws-s3/storage/file/exists/index.js';
|
|
7
|
-
import { ExistsOptions as GcsExistsOptions } from '../../../@google-cloud/storage/file/exists/index.js';
|
|
5
|
+
import { type S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
+
import { type ExistsOptions as S3ExistsOptions } from '../../../@aws-s3/storage/file/exists/index.js';
|
|
7
|
+
import { type ExistsOptions as GcsExistsOptions } from '../../../@google-cloud/storage/file/exists/index.js';
|
|
8
8
|
/** Return type for file existence checks. */
|
|
9
9
|
type Returned = Outcome.Either<boolean, string>;
|
|
10
10
|
/**
|
|
@@ -11,10 +11,10 @@ import { exists as sftpExists } from "../../../sftp/file/exists/index.js";
|
|
|
11
11
|
import { exists as s3Exists } from "../../../@aws-s3/storage/file/exists/index.js";
|
|
12
12
|
import { exists as gcsExists } from "../../../@google-cloud/storage/file/exists/index.js";
|
|
13
13
|
async function existsFile(client, path, options) {
|
|
14
|
-
if (isGcsBucket(client)) return gcsExists(client, path, options);
|
|
15
|
-
if (isS3ClientWithBucket(client)) return s3Exists(client.client, client.bucketName, path, options);
|
|
16
|
-
if (isFtpClient(client)) return ftpExists(client, path);
|
|
17
|
-
if (isSftpClient(client)) return sftpExists(client, path);
|
|
14
|
+
if (isGcsBucket(client)) return await gcsExists(client, path, options);
|
|
15
|
+
if (isS3ClientWithBucket(client)) return await s3Exists(client.client, client.bucketName, path, options);
|
|
16
|
+
if (isFtpClient(client)) return await ftpExists(client, path);
|
|
17
|
+
if (isSftpClient(client)) return await sftpExists(client, path);
|
|
18
18
|
return Outcome.makeFailure("Invalid client type");
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
export * as copyDir from './copy-dir/index.js'
|
|
1
2
|
export * as copyFile from './copy-file/index.js'
|
|
2
3
|
export * as downloadFile from './download-file/index.js'
|
|
3
4
|
export * as existsFile from './exists-file/index.js'
|
|
4
5
|
export * as listDir from './list-dir/index.js'
|
|
5
|
-
export * as copyDir from './copy-dir/index.js'
|
|
6
|
-
export * as moveFile from './move-file/index.js'
|
|
7
|
-
export * as removeFile from './remove-file/index.js'
|
|
8
6
|
export * as moveDir from './move-dir/index.js'
|
|
7
|
+
export * as moveFile from './move-file/index.js'
|
|
8
|
+
export * as removeDir from './remove-dir/index.js'
|
|
9
9
|
export * as statFile from './stat-file/index.js'
|
|
10
10
|
export * as uploadFile from './upload-file/index.js'
|
|
11
|
-
export * as
|
|
11
|
+
export * as removeFile from './remove-file/index.js'
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
export * as copyDir from './copy-dir/index.js'
|
|
1
2
|
export * as copyFile from './copy-file/index.js'
|
|
2
3
|
export * as downloadFile from './download-file/index.js'
|
|
3
4
|
export * as existsFile from './exists-file/index.js'
|
|
4
5
|
export * as listDir from './list-dir/index.js'
|
|
5
|
-
export * as copyDir from './copy-dir/index.js'
|
|
6
|
-
export * as moveFile from './move-file/index.js'
|
|
7
|
-
export * as removeFile from './remove-file/index.js'
|
|
8
6
|
export * as moveDir from './move-dir/index.js'
|
|
7
|
+
export * as moveFile from './move-file/index.js'
|
|
8
|
+
export * as removeDir from './remove-dir/index.js'
|
|
9
9
|
export * as statFile from './stat-file/index.js'
|
|
10
10
|
export * as uploadFile from './upload-file/index.js'
|
|
11
|
-
export * as
|
|
11
|
+
export * as removeFile from './remove-file/index.js'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
-
import { Client as FtpClient } from 'basic-ftp';
|
|
3
|
-
import SftpClient from 'ssh2-sftp-client';
|
|
1
|
+
import { type Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
+
import { type Client as FtpClient } from 'basic-ftp';
|
|
3
|
+
import type SftpClient from 'ssh2-sftp-client';
|
|
4
4
|
import * as Outcome from '../../../../agnostic/misc/outcome/index.js';
|
|
5
|
-
import { S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
-
import { ListOptions as S3ListOptions } from '../../../@aws-s3/storage/directory/list/index.js';
|
|
7
|
-
import { ListOptions as GcsListOptions } from '../../../@google-cloud/storage/directory/list/index.js';
|
|
5
|
+
import { type S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
+
import { type ListOptions as S3ListOptions } from '../../../@aws-s3/storage/directory/list/index.js';
|
|
7
|
+
import { type ListOptions as GcsListOptions } from '../../../@google-cloud/storage/directory/list/index.js';
|
|
8
8
|
/** Return type for list directory operations. */
|
|
9
9
|
type Returned = Outcome.Either<string[], string>;
|
|
10
10
|
/**
|
|
@@ -11,10 +11,10 @@ import { list as sftpList } from "../../../sftp/directory/list/index.js";
|
|
|
11
11
|
import { list as s3List } from "../../../@aws-s3/storage/directory/list/index.js";
|
|
12
12
|
import { list as gcsList } from "../../../@google-cloud/storage/directory/list/index.js";
|
|
13
13
|
async function listDir(client, path, options) {
|
|
14
|
-
if (isGcsBucket(client)) return gcsList(client, path, options);
|
|
15
|
-
if (isS3ClientWithBucket(client)) return s3List(client.client, client.bucketName, path, options);
|
|
16
|
-
if (isFtpClient(client)) return ftpList(client, path);
|
|
17
|
-
if (isSftpClient(client)) return sftpList(client, path);
|
|
14
|
+
if (isGcsBucket(client)) return await gcsList(client, path, options);
|
|
15
|
+
if (isS3ClientWithBucket(client)) return await s3List(client.client, client.bucketName, path, options);
|
|
16
|
+
if (isFtpClient(client)) return await ftpList(client, path);
|
|
17
|
+
if (isSftpClient(client)) return await sftpList(client, path);
|
|
18
18
|
return Outcome.makeFailure("Invalid client type");
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
-
import { Client as FtpClient } from 'basic-ftp';
|
|
3
|
-
import SftpClient from 'ssh2-sftp-client';
|
|
1
|
+
import { type Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
+
import { type Client as FtpClient } from 'basic-ftp';
|
|
3
|
+
import type SftpClient from 'ssh2-sftp-client';
|
|
4
4
|
import * as Outcome from '../../../../agnostic/misc/outcome/index.js';
|
|
5
|
-
import { S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
-
import { MoveDirOptions as FtpsMoveDirOptions } from '../../../ftps/directory/move-dir/index.js';
|
|
7
|
-
import { MoveDirOptions as SftpMoveDirOptions } from '../../../sftp/directory/move-dir/index.js';
|
|
8
|
-
import { MoveDirOptions as S3MoveDirOptions } from '../../../@aws-s3/storage/directory/move-dir/index.js';
|
|
9
|
-
import { MoveDirOptions as GcsMoveDirOptions } from '../../../@google-cloud/storage/directory/move-dir/index.js';
|
|
5
|
+
import { type S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
+
import { type MoveDirOptions as FtpsMoveDirOptions } from '../../../ftps/directory/move-dir/index.js';
|
|
7
|
+
import { type MoveDirOptions as SftpMoveDirOptions } from '../../../sftp/directory/move-dir/index.js';
|
|
8
|
+
import { type MoveDirOptions as S3MoveDirOptions } from '../../../@aws-s3/storage/directory/move-dir/index.js';
|
|
9
|
+
import { type MoveDirOptions as GcsMoveDirOptions } from '../../../@google-cloud/storage/directory/move-dir/index.js';
|
|
10
10
|
/** Return type for move directory operations. */
|
|
11
11
|
type Returned = Outcome.Either<true, string>;
|
|
12
12
|
/**
|
|
@@ -11,10 +11,10 @@ import { moveDir as sftpMoveDir } from "../../../sftp/directory/move-dir/index.j
|
|
|
11
11
|
import { moveDir as s3MoveDir } from "../../../@aws-s3/storage/directory/move-dir/index.js";
|
|
12
12
|
import { moveDir as gcsMoveDir } from "../../../@google-cloud/storage/directory/move-dir/index.js";
|
|
13
13
|
async function moveDir(client, sourcePath, targetPath, options) {
|
|
14
|
-
if (isGcsBucket(client)) return gcsMoveDir(client, sourcePath, targetPath, options);
|
|
15
|
-
if (isS3ClientWithBucket(client)) return s3MoveDir(client.client, client.bucketName, sourcePath, targetPath, options);
|
|
16
|
-
if (isFtpClient(client)) return ftpMoveDir(client, sourcePath, targetPath, options);
|
|
17
|
-
if (isSftpClient(client)) return sftpMoveDir(client, sourcePath, targetPath, options);
|
|
14
|
+
if (isGcsBucket(client)) return await gcsMoveDir(client, sourcePath, targetPath, options);
|
|
15
|
+
if (isS3ClientWithBucket(client)) return await s3MoveDir(client.client, client.bucketName, sourcePath, targetPath, options);
|
|
16
|
+
if (isFtpClient(client)) return await ftpMoveDir(client, sourcePath, targetPath, options);
|
|
17
|
+
if (isSftpClient(client)) return await sftpMoveDir(client, sourcePath, targetPath, options);
|
|
18
18
|
return Outcome.makeFailure("Invalid client type");
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
-
import { Client as FtpClient } from 'basic-ftp';
|
|
3
|
-
import SftpClient from 'ssh2-sftp-client';
|
|
1
|
+
import { type Bucket as GCSBucket } from '@google-cloud/storage';
|
|
2
|
+
import { type Client as FtpClient } from 'basic-ftp';
|
|
3
|
+
import type SftpClient from 'ssh2-sftp-client';
|
|
4
4
|
import * as Outcome from '../../../../agnostic/misc/outcome/index.js';
|
|
5
|
-
import { S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
-
import { MoveOptions as FtpsMoveOptions } from '../../../ftps/file/move/index.js';
|
|
7
|
-
import { MoveOptions as SftpMoveOptions } from '../../../sftp/file/move/index.js';
|
|
8
|
-
import { MoveOptions as S3MoveOptions } from '../../../@aws-s3/storage/file/move/index.js';
|
|
9
|
-
import { MoveOptions as GcsMoveOptions } from '../../../@google-cloud/storage/file/move/index.js';
|
|
5
|
+
import { type S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
+
import { type MoveOptions as FtpsMoveOptions } from '../../../ftps/file/move/index.js';
|
|
7
|
+
import { type MoveOptions as SftpMoveOptions } from '../../../sftp/file/move/index.js';
|
|
8
|
+
import { type MoveOptions as S3MoveOptions } from '../../../@aws-s3/storage/file/move/index.js';
|
|
9
|
+
import { type MoveOptions as GcsMoveOptions } from '../../../@google-cloud/storage/file/move/index.js';
|
|
10
10
|
/** Return type for move file operations. */
|
|
11
11
|
type Returned = Outcome.Either<true, string>;
|
|
12
12
|
/**
|
|
@@ -11,10 +11,10 @@ import { move as sftpMove } from "../../../sftp/file/move/index.js";
|
|
|
11
11
|
import { move as s3Move } from "../../../@aws-s3/storage/file/move/index.js";
|
|
12
12
|
import { move as gcsMove } from "../../../@google-cloud/storage/file/move/index.js";
|
|
13
13
|
async function moveFile(client, sourcePath, targetPath, options) {
|
|
14
|
-
if (isGcsBucket(client)) return gcsMove(client, sourcePath, targetPath, options);
|
|
15
|
-
if (isS3ClientWithBucket(client)) return s3Move(client.client, client.bucketName, sourcePath, targetPath, options);
|
|
16
|
-
if (isFtpClient(client)) return ftpMove(client, sourcePath, targetPath);
|
|
17
|
-
if (isSftpClient(client)) return sftpMove(client, sourcePath, targetPath);
|
|
14
|
+
if (isGcsBucket(client)) return await gcsMove(client, sourcePath, targetPath, options);
|
|
15
|
+
if (isS3ClientWithBucket(client)) return await s3Move(client.client, client.bucketName, sourcePath, targetPath, options);
|
|
16
|
+
if (isFtpClient(client)) return await ftpMove(client, sourcePath, targetPath);
|
|
17
|
+
if (isSftpClient(client)) return await sftpMove(client, sourcePath, targetPath);
|
|
18
18
|
return Outcome.makeFailure("Invalid client type");
|
|
19
19
|
}
|
|
20
20
|
export {
|