@design-edito/tools 0.3.9 → 0.3.11
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 +3 -3
- package/agnostic/colors/index.js +3 -3
- 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 +54 -1
- package/agnostic/css/clss/index.js +3 -3
- package/agnostic/css/generate-nice-color/index.js +1 -0
- package/agnostic/css/index.d.ts +1 -1
- package/agnostic/css/index.js +1 -1
- package/agnostic/css/styles-set/index.d.ts +4 -4
- package/agnostic/css/styles-set/index.js +1 -1
- package/agnostic/errors/index.d.ts +1 -1
- package/agnostic/errors/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 +14 -14
- package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +14 -14
- 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 +3 -3
- package/agnostic/html/hyper-json/smart-tags/isolated/index.js +3 -3
- 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 +1 -1
- package/agnostic/html/index.js +1 -1
- package/agnostic/html/placeholders/index.d.ts +1 -1
- package/agnostic/html/selector-to-element/index.js +1 -1
- package/agnostic/index.d.ts +6 -6
- package/agnostic/index.js +6 -6
- package/agnostic/misc/assert/index.d.ts +5 -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/index.d.ts +1 -1
- package/agnostic/misc/crossenv/index.js +1 -1
- 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 +6 -6
- package/agnostic/misc/index.js +6 -6
- package/agnostic/misc/is-constructor-function/index.d.ts +1 -1
- package/agnostic/misc/logs/logger/index.d.ts +11 -1
- package/agnostic/misc/logs/logger/index.js +40 -10
- package/agnostic/misc/logs/styles/index.d.ts +1 -0
- package/agnostic/misc/logs/styles/index.js +27 -9
- 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/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 +1 -1
- package/agnostic/random/index.js +1 -1
- package/agnostic/random/random/index.js +1 -1
- package/agnostic/sanitization/html/index.js +7 -7
- package/agnostic/sanitization/index.d.ts +1 -1
- package/agnostic/sanitization/index.js +1 -1
- 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/index.d.ts +3 -3
- package/agnostic/strings/index.js +3 -3
- 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/transitions/index.d.ts +3 -3
- package/agnostic/time/transitions/index.js +4 -4
- package/agnostic/time/wait/index.d.ts +2 -2
- package/agnostic/time/wait/index.js +1 -1
- package/components/Disclaimer/index.d.ts +45 -0
- package/components/Disclaimer/index.js +70 -0
- package/components/Drawer/index.d.ts +45 -0
- package/components/Drawer/index.js +82 -0
- package/components/Drawer/styles.module.css +0 -0
- package/components/EventListener/index.d.ts +20 -3
- package/components/EventListener/index.js +15 -22
- package/components/Gallery/index.d.ts +67 -0
- package/components/Gallery/index.js +173 -0
- package/components/Gallery/styles.module.css +33 -0
- package/components/Gallery/utils.d.ts +1 -0
- package/components/Image/index.d.ts +60 -0
- package/components/Image/index.js +99 -0
- package/components/Image/styles.module.css +0 -0
- package/components/IntersectionObserver/index.d.ts +48 -11
- package/components/IntersectionObserver/index.js +13 -22
- package/components/Paginator/index.d.ts +72 -0
- package/components/Paginator/index.js +116 -0
- package/components/Paginator/styles.module.css +9 -0
- package/components/ResizeObserver/index.d.ts +27 -0
- package/components/ResizeObserver/index.js +81 -0
- package/components/Scrllgngn/index.d.ts +123 -0
- package/components/Scrllgngn/index.js +175 -0
- package/components/Scrllgngn/styles.module.css +74 -0
- package/components/Sequencer/index.controlled.d.ts +78 -0
- package/components/Sequencer/index.d.ts +85 -0
- package/components/Sequencer/index.js +109 -0
- package/components/Sequencer/styles.module.css +0 -0
- package/components/ShadowRoot/index.d.ts +35 -0
- package/components/ShadowRoot/index.js +56 -0
- package/components/ShadowRoot/styles.module.css +0 -0
- package/components/Subtitles/index.d.ts +58 -0
- package/components/Subtitles/index.js +111 -0
- package/components/Subtitles/styles.module.css +0 -0
- package/components/Subtitles/types.d.ts +10 -0
- package/components/Subtitles/types.js +0 -0
- package/components/Subtitles/utils.d.ts +28 -0
- package/components/Theatre/index.d.ts +64 -0
- package/components/Theatre/index.js +97 -0
- package/components/Theatre/styles.module.css +0 -0
- package/components/Video/index.d.ts +119 -0
- package/components/Video/index.js +358 -0
- package/components/Video/styles.module.css +0 -0
- package/components/Video/utils.d.ts +10 -0
- package/components/_WIP_AudioQuote/index.d.ts +1 -0
- package/components/_WIP_AudioQuote/index.js +0 -0
- package/components/_WIP_Icon/index.d.ts +1 -0
- package/components/_WIP_Icon/index.js +0 -0
- package/components/index.d.ts +15 -1
- package/components/index.js +15 -1
- package/components/public-classnames.d.ts +14 -3
- package/components/utils/index.d.ts +1 -0
- package/components/utils/index.js +12 -0
- package/components/utils/types.d.ts +3 -0
- package/components/utils/types.js +0 -0
- package/node/@aws-s3/index.test.d.ts +1 -0
- 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/@aws-s3/storage/index.d.ts +1 -1
- package/node/@aws-s3/storage/index.js +1 -1
- 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 +6 -6
- package/node/@google-cloud/storage/file/index.js +6 -6
- 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 +1 -1
- package/node/cloud-storage/operations/index.js +1 -1
- 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/encryption/index.d.ts +1 -1
- package/node/encryption/index.js +1 -1
- package/node/files/index.d.ts +1 -1
- package/node/files/index.js +1 -1
- 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/index.d.ts +2 -2
- package/node/ftps/directory/index.js +2 -2
- 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 +1 -1
- package/node/ftps/file/index.js +1 -1
- 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 +1 -1
- package/node/images/index.js +1 -1
- 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 +2 -2
- package/node/index.js +2 -2
- package/node/process/prompt-continue/index.js +1 -1
- package/node/process/spawner/index.d.ts +61 -10
- package/node/process/spawner/index.js +15 -13
- 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/index.d.ts +1 -1
- package/node/sftp/directory/index.js +1 -1
- 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 +2 -2
- package/node/sftp/file/index.js +2 -2
- 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 +2265 -14
- package/components/Input/index.d.ts +0 -7
- package/components/Input/index.js +0 -29
- /package/components/{Input → Disclaimer}/styles.module.css +0 -0
|
@@ -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 {
|
|
@@ -5,7 +5,7 @@ export * as existsFile from './exists-file/index.js'
|
|
|
5
5
|
export * as moveDir from './move-dir/index.js'
|
|
6
6
|
export * as listDir from './list-dir/index.js'
|
|
7
7
|
export * as moveFile from './move-file/index.js'
|
|
8
|
-
export * as removeDir from './remove-dir/index.js'
|
|
9
8
|
export * as removeFile from './remove-file/index.js'
|
|
10
9
|
export * as statFile from './stat-file/index.js'
|
|
10
|
+
export * as removeDir from './remove-dir/index.js'
|
|
11
11
|
export * as uploadFile from './upload-file/index.js'
|
|
@@ -5,7 +5,7 @@ export * as existsFile from './exists-file/index.js'
|
|
|
5
5
|
export * as moveDir from './move-dir/index.js'
|
|
6
6
|
export * as listDir from './list-dir/index.js'
|
|
7
7
|
export * as moveFile from './move-file/index.js'
|
|
8
|
-
export * as removeDir from './remove-dir/index.js'
|
|
9
8
|
export * as removeFile from './remove-file/index.js'
|
|
10
9
|
export * as statFile from './stat-file/index.js'
|
|
10
|
+
export * as removeDir from './remove-dir/index.js'
|
|
11
11
|
export * as uploadFile from './upload-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 {
|
|
@@ -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 { RemoveDirOptions as FtpsRemoveDirOptions } from '../../../ftps/directory/remove-dir/index.js';
|
|
7
|
-
import { RemoveDirOptions as SftpRemoveDirOptions } from '../../../sftp/directory/remove-dir/index.js';
|
|
8
|
-
import { RemoveDirOptions as S3RemoveDirOptions } from '../../../@aws-s3/storage/directory/remove-dir/index.js';
|
|
9
|
-
import { RemoveDirOptions as GcsRemoveDirOptions } from '../../../@google-cloud/storage/directory/remove-dir/index.js';
|
|
5
|
+
import { type S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
+
import { type RemoveDirOptions as FtpsRemoveDirOptions } from '../../../ftps/directory/remove-dir/index.js';
|
|
7
|
+
import { type RemoveDirOptions as SftpRemoveDirOptions } from '../../../sftp/directory/remove-dir/index.js';
|
|
8
|
+
import { type RemoveDirOptions as S3RemoveDirOptions } from '../../../@aws-s3/storage/directory/remove-dir/index.js';
|
|
9
|
+
import { type RemoveDirOptions as GcsRemoveDirOptions } from '../../../@google-cloud/storage/directory/remove-dir/index.js';
|
|
10
10
|
/** Return type for remove directory operations. */
|
|
11
11
|
type Returned = Outcome.Either<true, string>;
|
|
12
12
|
/**
|
|
@@ -11,10 +11,10 @@ import { removeDir as sftpRemoveDir } from "../../../sftp/directory/remove-dir/i
|
|
|
11
11
|
import { removeDir as s3RemoveDir } from "../../../@aws-s3/storage/directory/remove-dir/index.js";
|
|
12
12
|
import { removeDir as gcsRemoveDir } from "../../../@google-cloud/storage/directory/remove-dir/index.js";
|
|
13
13
|
async function removeDir(client, sourcePath, options) {
|
|
14
|
-
if (isGcsBucket(client)) return gcsRemoveDir(client, sourcePath, options);
|
|
15
|
-
if (isS3ClientWithBucket(client)) return s3RemoveDir(client.client, client.bucketName, sourcePath, options);
|
|
16
|
-
if (isFtpClient(client)) return ftpRemoveDir(client, sourcePath, options);
|
|
17
|
-
if (isSftpClient(client)) return sftpRemoveDir(client, sourcePath, options);
|
|
14
|
+
if (isGcsBucket(client)) return await gcsRemoveDir(client, sourcePath, options);
|
|
15
|
+
if (isS3ClientWithBucket(client)) return await s3RemoveDir(client.client, client.bucketName, sourcePath, options);
|
|
16
|
+
if (isFtpClient(client)) return await ftpRemoveDir(client, sourcePath, options);
|
|
17
|
+
if (isSftpClient(client)) return await sftpRemoveDir(client, sourcePath, 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 { RemoveOptions as FtpRemoveOptions } from '../../../ftps/file/remove/index.js';
|
|
7
|
-
import { RemoveOptions as SftpRemoveOptions } from '../../../sftp/file/remove/index.js';
|
|
8
|
-
import { RemoveOptions as S3RemoveOptions } from '../../../@aws-s3/storage/file/remove/index.js';
|
|
9
|
-
import { RemoveOptions as GcsRemoveOptions } from '../../../@google-cloud/storage/file/remove/index.js';
|
|
5
|
+
import { type S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
+
import { type RemoveOptions as FtpRemoveOptions } from '../../../ftps/file/remove/index.js';
|
|
7
|
+
import { type RemoveOptions as SftpRemoveOptions } from '../../../sftp/file/remove/index.js';
|
|
8
|
+
import { type RemoveOptions as S3RemoveOptions } from '../../../@aws-s3/storage/file/remove/index.js';
|
|
9
|
+
import { type RemoveOptions as GcsRemoveOptions } from '../../../@google-cloud/storage/file/remove/index.js';
|
|
10
10
|
/** Return type for remove file operations. */
|
|
11
11
|
type Returned = Outcome.Either<true, string>;
|
|
12
12
|
/**
|
|
@@ -11,10 +11,10 @@ import { remove as sftpRemove } from "../../../sftp/file/remove/index.js";
|
|
|
11
11
|
import { remove as s3Remove } from "../../../@aws-s3/storage/file/remove/index.js";
|
|
12
12
|
import { remove as gcsRemove } from "../../../@google-cloud/storage/file/remove/index.js";
|
|
13
13
|
async function removeFile(client, path, options) {
|
|
14
|
-
if (isGcsBucket(client)) return gcsRemove(client, path, options);
|
|
15
|
-
if (isS3ClientWithBucket(client)) return s3Remove(client.client, path, client.bucketName, options);
|
|
16
|
-
if (isFtpClient(client)) return ftpRemove(client, path, options);
|
|
17
|
-
if (isSftpClient(client)) return sftpRemove(client, path, options);
|
|
14
|
+
if (isGcsBucket(client)) return await gcsRemove(client, path, options);
|
|
15
|
+
if (isS3ClientWithBucket(client)) return await s3Remove(client.client, path, client.bucketName, options);
|
|
16
|
+
if (isFtpClient(client)) return await ftpRemove(client, path, options);
|
|
17
|
+
if (isSftpClient(client)) return await sftpRemove(client, path, 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 { Stat as FtpStat } from '../../../ftps/file/stat/index.js';
|
|
7
|
-
import { Stat as SftpStat } from '../../../sftp/file/stat/index.js';
|
|
8
|
-
import { Stat as S3Stat, StatOptions as S3StatOptions } from '../../../@aws-s3/storage/file/stat/index.js';
|
|
9
|
-
import { Stat as GcsStat, StatOptions as GcsStatOptions } from '../../../@google-cloud/storage/file/stat/index.js';
|
|
5
|
+
import { type S3ClientWithBucket } from '../../clients/index.js';
|
|
6
|
+
import { type Stat as FtpStat } from '../../../ftps/file/stat/index.js';
|
|
7
|
+
import { type Stat as SftpStat } from '../../../sftp/file/stat/index.js';
|
|
8
|
+
import { type Stat as S3Stat, type StatOptions as S3StatOptions } from '../../../@aws-s3/storage/file/stat/index.js';
|
|
9
|
+
import { type Stat as GcsStat, type StatOptions as GcsStatOptions } from '../../../@google-cloud/storage/file/stat/index.js';
|
|
10
10
|
/** Return type for stat file operations. */
|
|
11
11
|
type Returned<K extends FtpStat | SftpStat | S3Stat | GcsStat> = Outcome.Either<K, string>;
|
|
12
12
|
/**
|
|
@@ -11,10 +11,10 @@ import { stat as sftpStat } from "../../../sftp/file/stat/index.js";
|
|
|
11
11
|
import { stat as s3Stat } from "../../../@aws-s3/storage/file/stat/index.js";
|
|
12
12
|
import { stat as gcsStat } from "../../../@google-cloud/storage/file/stat/index.js";
|
|
13
13
|
async function statFile(client, path, options) {
|
|
14
|
-
if (isGcsBucket(client)) return gcsStat(client, path, options);
|
|
15
|
-
if (isS3ClientWithBucket(client)) return s3Stat(client.client, path, client.bucketName, options);
|
|
16
|
-
if (isFtpClient(client)) return ftpStat(client, path);
|
|
17
|
-
if (isSftpClient(client)) return sftpStat(client, path);
|
|
14
|
+
if (isGcsBucket(client)) return await gcsStat(client, path, options);
|
|
15
|
+
if (isS3ClientWithBucket(client)) return await s3Stat(client.client, path, client.bucketName, options);
|
|
16
|
+
if (isFtpClient(client)) return await ftpStat(client, path);
|
|
17
|
+
if (isSftpClient(client)) return await sftpStat(client, path);
|
|
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 { UploadOptions as FtpUploadOptions } from '../../../ftps/file/upload/index.js';
|
|
8
|
-
import { UploadOptions as SftpUploadOptions } from '../../../sftp/file/upload/index.js';
|
|
9
|
-
import { UploadOptions as S3UploadOptions } from '../../../@aws-s3/storage/file/upload/index.js';
|
|
10
|
-
import { UploadOptions as GcsUploadOptions } from '../../../@google-cloud/storage/file/upload/index.js';
|
|
6
|
+
import { type S3ClientWithBucket } from '../../clients/index.js';
|
|
7
|
+
import { type UploadOptions as FtpUploadOptions } from '../../../ftps/file/upload/index.js';
|
|
8
|
+
import { type UploadOptions as SftpUploadOptions } from '../../../sftp/file/upload/index.js';
|
|
9
|
+
import { type UploadOptions as S3UploadOptions } from '../../../@aws-s3/storage/file/upload/index.js';
|
|
10
|
+
import { type UploadOptions as GcsUploadOptions } from '../../../@google-cloud/storage/file/upload/index.js';
|
|
11
11
|
/** Return type for upload file operations. */
|
|
12
12
|
type Returned = Outcome.Either<true, string>;
|
|
13
13
|
/**
|
|
@@ -11,10 +11,10 @@ import { upload as sftpUpload } from "../../../sftp/file/upload/index.js";
|
|
|
11
11
|
import { upload as s3Upload } from "../../../@aws-s3/storage/file/upload/index.js";
|
|
12
12
|
import { upload as gcsUpload } from "../../../@google-cloud/storage/file/upload/index.js";
|
|
13
13
|
async function uploadFile(fileStream, path, client, options) {
|
|
14
|
-
if (isGcsBucket(client)) return gcsUpload(client, path, fileStream, options);
|
|
15
|
-
if (isS3ClientWithBucket(client)) return s3Upload(client.client, client.bucketName, path, fileStream, options);
|
|
16
|
-
if (isFtpClient(client)) return ftpUpload(client, path, fileStream, options);
|
|
17
|
-
if (isSftpClient(client)) return sftpUpload(client, path, fileStream, options);
|
|
14
|
+
if (isGcsBucket(client)) return await gcsUpload(client, path, fileStream, options);
|
|
15
|
+
if (isS3ClientWithBucket(client)) return await s3Upload(client.client, client.bucketName, path, fileStream, options);
|
|
16
|
+
if (isFtpClient(client)) return await ftpUpload(client, path, fileStream, options);
|
|
17
|
+
if (isSftpClient(client)) return await sftpUpload(client, path, fileStream, options);
|
|
18
18
|
return Outcome.makeFailure("Invalid client type");
|
|
19
19
|
}
|
|
20
20
|
export {
|
package/node/encryption/index.js
CHANGED
package/node/files/index.d.ts
CHANGED
package/node/files/index.js
CHANGED
|
@@ -7,7 +7,7 @@ async function readWrite(path, editor, opts = {}) {
|
|
|
7
7
|
readData.toString()
|
|
8
8
|
);
|
|
9
9
|
const actualWriteOptions = opts.writeOptions ?? opts.readOptions;
|
|
10
|
-
const targetOutput = opts.output
|
|
10
|
+
const targetOutput = opts.output ?? path;
|
|
11
11
|
if (opts.dryRun !== true) await fs.writeFile(targetOutput, edited, actualWriteOptions);
|
|
12
12
|
return edited;
|
|
13
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Stats } from 'node:fs';
|
|
1
|
+
import { type Stats } from 'node:fs';
|
|
2
2
|
/** Type of child entry in a directory. */
|
|
3
3
|
export type ChildType = 'file' | 'directory' | 'symlink';
|
|
4
4
|
export type ChildDetails = {
|
|
@@ -28,8 +28,8 @@ export type ListOptions = {
|
|
|
28
28
|
/** Whether to deduplicate paths when following symlinks. @default false */ dedupeSimlinksContents?: boolean;
|
|
29
29
|
/** Maximum recursion depth. @default Infinity */ maxDepth?: number;
|
|
30
30
|
/** Whether to return relative paths instead of absolute paths. @default false */ returnRelative?: boolean;
|
|
31
|
-
/** Patterns to exclude from the results. */ exclude?: RegExp | string |
|
|
32
|
-
/** Patterns to include in the results (takes precedence over exclude). */ include?: RegExp | string |
|
|
31
|
+
/** Patterns to exclude from the results. */ exclude?: RegExp | string | Array<RegExp | string> | null;
|
|
32
|
+
/** Patterns to include in the results (takes precedence over exclude). */ include?: RegExp | string | Array<RegExp | string> | null;
|
|
33
33
|
/** Custom filter function to further refine results. */ filter?: ((path: string, details: ChildDetails) => boolean | Promise<boolean>);
|
|
34
34
|
};
|
|
35
35
|
export declare const defaultListOptions: Required<ListOptions>;
|
|
@@ -63,10 +63,10 @@ async function listAbsoluteSubpaths(inputPath, _options = {}, __private_context
|
|
|
63
63
|
const isFile = !isDirectory && !isSymlink;
|
|
64
64
|
const isHidden = path.basename(childAbsPath).startsWith(".");
|
|
65
65
|
const type = isDirectory ? "directory" : isSymlink ? "symlink" : "file";
|
|
66
|
-
if (isDirectory && options.directories
|
|
67
|
-
if (isSymlink && options.symlinks
|
|
68
|
-
if (isFile && options.files
|
|
69
|
-
if (isHidden && options.hidden
|
|
66
|
+
if (isDirectory && !options.directories) throw true;
|
|
67
|
+
if (isSymlink && !options.symlinks) throw false;
|
|
68
|
+
if (isFile && !options.files) throw false;
|
|
69
|
+
if (isHidden && !options.hidden) throw false;
|
|
70
70
|
const realPath = isSymlink ? await fs.realpath(childAbsPath) : childAbsPath;
|
|
71
71
|
const childPathForFilters = options.returnRelative ? childRelFromRootPath : childAbsPath;
|
|
72
72
|
const isInExclude = stringMatchesSome(childPathForFilters, options.exclude ?? []);
|
|
@@ -75,7 +75,7 @@ async function listAbsoluteSubpaths(inputPath, _options = {}, __private_context
|
|
|
75
75
|
const isInFilter = await options.filter(childPathForFilters, { type, hidden: isHidden, realPath });
|
|
76
76
|
if (!isInFilter) throw true;
|
|
77
77
|
if (isSymlink) {
|
|
78
|
-
if (options.followSimlinks
|
|
78
|
+
if (!options.followSimlinks) subpaths.push(childAbsPath);
|
|
79
79
|
else {
|
|
80
80
|
const childSubpaths = await listAbsoluteSubpaths(realPath, options, {
|
|
81
81
|
..._private_context,
|
|
@@ -96,7 +96,7 @@ async function listAbsoluteSubpaths(inputPath, _options = {}, __private_context
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
} catch (err) {
|
|
99
|
-
if (typeof err !== "boolean") throw new Error(
|
|
99
|
+
if (typeof err !== "boolean") throw new Error("This try/catch block should only throw booleans");
|
|
100
100
|
const shouldDiveDeeper = err;
|
|
101
101
|
if (!shouldDiveDeeper) return [];
|
|
102
102
|
const childSubpaths = await listAbsoluteSubpaths(childAbsPath, options, {
|
|
@@ -26,7 +26,7 @@ async function copyDir(ftpClient, sourceDir, targetDir, options) {
|
|
|
26
26
|
}
|
|
27
27
|
if (ensureDir) {
|
|
28
28
|
const dirPath = dst.substring(0, dst.lastIndexOf("/"));
|
|
29
|
-
|
|
29
|
+
await ftpClient.ensureDir(dirPath);
|
|
30
30
|
}
|
|
31
31
|
const pass = new PassThrough();
|
|
32
32
|
const upload = ftpClient.uploadFrom(pass, dst);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * as copyDir from './copy-dir/index.js'
|
|
2
|
-
export * as list from './list/index.js'
|
|
3
|
-
export * as moveDir from './move-dir/index.js'
|
|
4
2
|
export * as removeDir from './remove-dir/index.js'
|
|
3
|
+
export * as moveDir from './move-dir/index.js'
|
|
4
|
+
export * as list from './list/index.js'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * as copyDir from './copy-dir/index.js'
|
|
2
|
-
export * as list from './list/index.js'
|
|
3
|
-
export * as moveDir from './move-dir/index.js'
|
|
4
2
|
export * as removeDir from './remove-dir/index.js'
|
|
3
|
+
export * as moveDir from './move-dir/index.js'
|
|
4
|
+
export * as list from './list/index.js'
|
|
@@ -6,9 +6,7 @@ async function moveDir(ftpClient, sourceDir, targetDir, options) {
|
|
|
6
6
|
try {
|
|
7
7
|
if (ensureDir) {
|
|
8
8
|
const parentDir = targetDir.substring(0, targetDir.lastIndexOf("/"));
|
|
9
|
-
|
|
10
|
-
await ftpClient.ensureDir(parentDir);
|
|
11
|
-
}
|
|
9
|
+
await ftpClient.ensureDir(parentDir);
|
|
12
10
|
}
|
|
13
11
|
if (!overwrite) {
|
|
14
12
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Client } from 'basic-ftp';
|
|
1
|
+
import { type Client } from 'basic-ftp';
|
|
2
2
|
import * as Outcome from '../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
export type RemoveDirOptions = {
|
|
4
4
|
/**
|
|
@@ -17,7 +17,7 @@ export type RemoveDirOptions = {
|
|
|
17
17
|
* @param {RemoveDirOptions} [options] - Optional configuration.
|
|
18
18
|
* @param {boolean} [options.ignoreMissing=true] - Whether to ignore a missing directory.
|
|
19
19
|
* @returns {Promise<Outcome.Either<true, string>>}
|
|
20
|
-
* - On success: `Outcome.makeSuccess(true)`
|
|
20
|
+
* - On success: `Outcome.makeSuccess(true)` – deletion succeeded, or directory
|
|
21
21
|
* was absent and `ignoreMissing` is true.
|
|
22
22
|
* - On failure: `Outcome.makeFailure(errStr)` if deletion fails, or directory
|
|
23
23
|
* absent and `ignoreMissing` is false.
|