@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
|
@@ -17,7 +17,7 @@ async function copy(ftpClient, sourcePath, targetPath, options) {
|
|
|
17
17
|
}
|
|
18
18
|
if (ensureDir) {
|
|
19
19
|
const dirPath = targetPath.substring(0, targetPath.lastIndexOf("/"));
|
|
20
|
-
|
|
20
|
+
await ftpClient.ensureDir(dirPath);
|
|
21
21
|
}
|
|
22
22
|
const pass = new PassThrough();
|
|
23
23
|
const uploadPromise = ftpClient.uploadFrom(pass, targetPath);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Readable } from 'node:stream';
|
|
2
|
-
import { Client } from 'basic-ftp';
|
|
1
|
+
import { type Readable } from 'node:stream';
|
|
2
|
+
import { type Client } from 'basic-ftp';
|
|
3
3
|
import * as Outcome from '../../../../agnostic/misc/outcome/index.js';
|
|
4
4
|
export type DownloadOptions = {
|
|
5
5
|
startAt?: number;
|
|
@@ -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
|
/**
|
|
4
4
|
* Checks if a *file* (not a directory) exists on a specified FTP server.
|
|
@@ -15,7 +15,7 @@ import * as Outcome from '../../../../agnostic/misc/outcome/index.js';
|
|
|
15
15
|
* @param {Client} ftpClient - The basic‑ftp client instance.
|
|
16
16
|
* @param {string} sourcePath - The full path to check on the FTP server.
|
|
17
17
|
* @returns {Promise<Outcome.Either<boolean, string>>}
|
|
18
|
-
* - Success: `Outcome.makeSuccess(true | false)` –
|
|
18
|
+
* - Success: `Outcome.makeSuccess(true | false)` – true only if a file exists.
|
|
19
19
|
* - Failure: `Outcome.makeFailure(errStr)` if an error occurs.
|
|
20
20
|
*/
|
|
21
21
|
export declare function exists(ftpClient: Client, sourcePath: string): Promise<Outcome.Either<boolean, string>>;
|
|
@@ -9,7 +9,7 @@ async function exists(ftpClient, sourcePath) {
|
|
|
9
9
|
const baseName = lastSlash === -1 ? sourcePath : sourcePath.slice(lastSlash + 1);
|
|
10
10
|
const list = await ftpClient.list(parentDir);
|
|
11
11
|
const entry = list.find((e) => e.name === baseName);
|
|
12
|
-
const isFile = entry ? entry.type === FileType.File || entry.type === FileType.SymbolicLink : false;
|
|
12
|
+
const isFile = entry !== void 0 ? entry.type === FileType.File || entry.type === FileType.SymbolicLink : false;
|
|
13
13
|
return Outcome.makeSuccess(isFile);
|
|
14
14
|
} catch (err) {
|
|
15
15
|
return Outcome.makeFailure(unknownToString(err));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * as copy from './copy/index.js'
|
|
2
|
-
export * as move from './move/index.js'
|
|
3
2
|
export * as download from './download/index.js'
|
|
4
3
|
export * as remove from './remove/index.js'
|
|
4
|
+
export * as move from './move/index.js'
|
|
5
5
|
export * as exists from './exists/index.js'
|
|
6
6
|
export * as stat from './stat/index.js'
|
|
7
7
|
export * as upload from './upload/index.js'
|
package/node/ftps/file/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * as copy from './copy/index.js'
|
|
2
|
-
export * as move from './move/index.js'
|
|
3
2
|
export * as download from './download/index.js'
|
|
4
3
|
export * as remove from './remove/index.js'
|
|
4
|
+
export * as move from './move/index.js'
|
|
5
5
|
export * as exists from './exists/index.js'
|
|
6
6
|
export * as stat from './stat/index.js'
|
|
7
7
|
export * as upload from './upload/index.js'
|
|
@@ -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 MoveOptions = {
|
|
4
4
|
/**
|
|
@@ -20,9 +20,9 @@ export type MoveOptions = {
|
|
|
20
20
|
* The function performs a simple `rename` operation, which moves the file from
|
|
21
21
|
* `sourcePath` to `targetPath`. It supports two safety features:
|
|
22
22
|
*
|
|
23
|
-
* 1. **ensureDir** –
|
|
23
|
+
* 1. **ensureDir** – If enabled, the parent directory of `targetPath`
|
|
24
24
|
* is created with `ftpClient.ensureDir` before the rename.
|
|
25
|
-
* 2. **overwrite** –
|
|
25
|
+
* 2. **overwrite** – If disabled (default) the function first checks whether
|
|
26
26
|
* an object already exists at `targetPath`; if so, it aborts.
|
|
27
27
|
*
|
|
28
28
|
* @param {Client} ftpClient - The basic‑ftp client instance.
|
|
@@ -9,7 +9,7 @@ async function move(ftpClient, sourcePath, targetPath, options) {
|
|
|
9
9
|
try {
|
|
10
10
|
if (ensureDir) {
|
|
11
11
|
const dirPath = targetPath.substring(0, targetPath.lastIndexOf("/"));
|
|
12
|
-
|
|
12
|
+
await ftpClient.ensureDir(dirPath);
|
|
13
13
|
}
|
|
14
14
|
if (!overwrite) {
|
|
15
15
|
try {
|
|
@@ -8,11 +8,11 @@ async function stat(ftp, path) {
|
|
|
8
8
|
const name = slash === -1 ? path : path.slice(slash + 1);
|
|
9
9
|
const list = await ftp.list(dir);
|
|
10
10
|
const entry = list.find((e) => e.name === name && e.isFile);
|
|
11
|
-
if (
|
|
11
|
+
if (entry === void 0) return Outcome.makeFailure(`File not found: ${path}`);
|
|
12
12
|
return Outcome.makeSuccess({
|
|
13
13
|
size: entry.size,
|
|
14
14
|
modifiedAt: entry.modifiedAt ?? void 0,
|
|
15
|
-
permissions: entry.rawModifiedAt
|
|
15
|
+
permissions: entry.rawModifiedAt.toString(),
|
|
16
16
|
raw: entry
|
|
17
17
|
});
|
|
18
18
|
} catch (err) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Readable } from 'node:stream';
|
|
2
|
-
import { Client, UploadOptions as BasicFtpUploadOptions } from 'basic-ftp';
|
|
1
|
+
import { type Readable } from 'node:stream';
|
|
2
|
+
import { type Client, type UploadOptions as BasicFtpUploadOptions } from 'basic-ftp';
|
|
3
3
|
import * as Outcome from '../../../../agnostic/misc/outcome/index.js';
|
|
4
4
|
export type UploadOptions = BasicFtpUploadOptions & {
|
|
5
5
|
ensureDir?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { FormatCommonOptions, FormatJpgOptions, FormatPngOptions, FormatWebpOptions, FormatAvifOptions, FormatTiffOptions, FormatHeifOptions, FormatOptions, ImageLike } from '../types.js';
|
|
4
4
|
/** Type guard to check if options match FormatCommonOptions. */
|
|
@@ -115,7 +115,7 @@ var toSharpResizeOptions = (options) => {
|
|
|
115
115
|
height: options.height,
|
|
116
116
|
fit: options.fit,
|
|
117
117
|
position: options.position,
|
|
118
|
-
background: options.background ? toSharpColor(options.background) : void 0,
|
|
118
|
+
background: options.background !== void 0 ? toSharpColor(options.background) : void 0,
|
|
119
119
|
kernel: options.kernel,
|
|
120
120
|
withoutEnlargement: options.withoutEnlargement,
|
|
121
121
|
withoutReduction: options.withoutReduction,
|
|
@@ -216,14 +216,14 @@ async function format(input, options) {
|
|
|
216
216
|
if (isFormatHeifOptions(options)) return Outcome.makeSuccess(await resizedInstance.heif(toSharpHeifOptions(options)).toBuffer());
|
|
217
217
|
return Outcome.makeSuccess(await resizedInstance.toBuffer());
|
|
218
218
|
}
|
|
219
|
-
var toWidth = async (input, width) => (await toSharpInstance(input)).resize({ width }).toBuffer();
|
|
220
|
-
var toHeight = async (input, height) => (await toSharpInstance(input)).resize({ height }).toBuffer();
|
|
221
|
-
var toJpg = async (input, quality) => (await toSharpInstance(input)).jpeg({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
|
|
222
|
-
var toPng = async (input, quality, compressionLevel) => (await toSharpInstance(input)).png({ quality: clamp(quality ?? 100, 1, 100), compressionLevel }).toBuffer();
|
|
223
|
-
var toWebp = async (input, quality) => (await toSharpInstance(input)).webp({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
|
|
224
|
-
var toAvif = async (input, quality) => (await toSharpInstance(input)).avif({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
|
|
225
|
-
var toTiff = async (input, quality, compression) => (await toSharpInstance(input)).tiff({ quality: clamp(quality ?? 100, 1, 100), compression }).toBuffer();
|
|
226
|
-
var toHeif = async (input, quality) => (await toSharpInstance(input)).heif({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
|
|
219
|
+
var toWidth = async (input, width) => await (await toSharpInstance(input)).resize({ width }).toBuffer();
|
|
220
|
+
var toHeight = async (input, height) => await (await toSharpInstance(input)).resize({ height }).toBuffer();
|
|
221
|
+
var toJpg = async (input, quality) => await (await toSharpInstance(input)).jpeg({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
|
|
222
|
+
var toPng = async (input, quality, compressionLevel) => await (await toSharpInstance(input)).png({ quality: clamp(quality ?? 100, 1, 100), compressionLevel }).toBuffer();
|
|
223
|
+
var toWebp = async (input, quality) => await (await toSharpInstance(input)).webp({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
|
|
224
|
+
var toAvif = async (input, quality) => await (await toSharpInstance(input)).avif({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
|
|
225
|
+
var toTiff = async (input, quality, compression) => await (await toSharpInstance(input)).tiff({ quality: clamp(quality ?? 100, 1, 100), compression }).toBuffer();
|
|
226
|
+
var toHeif = async (input, quality) => await (await toSharpInstance(input)).heif({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
|
|
227
227
|
export {
|
|
228
228
|
format,
|
|
229
229
|
isFormatAvifOptions,
|
package/node/images/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * as create from './create/index.js'
|
|
2
2
|
export * as format from './format/index.js'
|
|
3
|
+
export * as utils from './utils/index.js'
|
|
3
4
|
export * as transform from './transform/index.js'
|
|
4
5
|
export * as metadata from './metadata/index.js'
|
|
5
|
-
export * as utils from './utils/index.js'
|
package/node/images/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * as create from './create/index.js'
|
|
2
2
|
export * as format from './format/index.js'
|
|
3
|
+
export * as utils from './utils/index.js'
|
|
3
4
|
export * as transform from './transform/index.js'
|
|
4
5
|
export * as metadata from './metadata/index.js'
|
|
5
|
-
export * as utils from './utils/index.js'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../agnostic/misc/outcome/index.js';
|
|
3
|
-
import { OperationDescriptor, TransformLimits, TransformErr, ImageLike } from '../types.js';
|
|
3
|
+
import { type OperationDescriptor, type TransformLimits, type TransformErr, type ImageLike } from '../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Validates and checks if an object is a valid operation descriptor.
|
|
6
6
|
*
|
|
@@ -43,13 +43,18 @@ function isOperationDescriptor(obj) {
|
|
|
43
43
|
const name = obj.name;
|
|
44
44
|
const validateOperation = (validatorFn) => {
|
|
45
45
|
const result = validatorFn(obj);
|
|
46
|
-
if (result.success) return Outcome.makeSuccess({
|
|
46
|
+
if (result.success) return Outcome.makeSuccess({
|
|
47
|
+
name: obj.name,
|
|
48
|
+
...result.payload
|
|
49
|
+
});
|
|
47
50
|
return Outcome.makeFailure(result.error);
|
|
48
51
|
};
|
|
49
52
|
const simpleOperations = /* @__PURE__ */ new Set([OpName.FLIP, OpName.FLOP]);
|
|
50
|
-
if (simpleOperations.has(name)) return Outcome.makeSuccess({
|
|
53
|
+
if (simpleOperations.has(name)) return Outcome.makeSuccess({
|
|
54
|
+
name
|
|
55
|
+
});
|
|
51
56
|
const validator = validators[name];
|
|
52
|
-
if (validator) return validateOperation(validator);
|
|
57
|
+
if (validator !== void 0) return validateOperation(validator);
|
|
53
58
|
return Outcome.makeFailure("Invalid operation descriptor");
|
|
54
59
|
}
|
|
55
60
|
async function transform(input, operationsSequence, limits) {
|
|
@@ -57,7 +62,7 @@ async function transform(input, operationsSequence, limits) {
|
|
|
57
62
|
const start = Date.now();
|
|
58
63
|
const deadline = limits?.timeoutMs !== void 0 ? start + limits.timeoutMs : void 0;
|
|
59
64
|
const runWithOpTimeout = async (op) => {
|
|
60
|
-
return limits?.opTimeoutMs === void 0 ? op() : Promise.race([op(), new Promise(
|
|
65
|
+
return limits?.opTimeoutMs === void 0 ? await op() : await Promise.race([op(), new Promise(
|
|
61
66
|
(resolve) => setTimeout(
|
|
62
67
|
() => resolve(TransformErrCodes.OP_TIMEOUT),
|
|
63
68
|
limits.opTimeoutMs
|
|
@@ -74,35 +79,35 @@ async function transform(input, operationsSequence, limits) {
|
|
|
74
79
|
result = await runWithOpTimeout(async () => {
|
|
75
80
|
switch (operation.name) {
|
|
76
81
|
case OpName.BLUR:
|
|
77
|
-
return blur(sharpInstance, operation);
|
|
82
|
+
return await blur(sharpInstance, operation);
|
|
78
83
|
case OpName.BRIGHTEN:
|
|
79
|
-
return brighten(sharpInstance, operation);
|
|
84
|
+
return await brighten(sharpInstance, operation);
|
|
80
85
|
case OpName.EXTEND:
|
|
81
|
-
return extend(sharpInstance, operation);
|
|
86
|
+
return await extend(sharpInstance, operation);
|
|
82
87
|
case OpName.EXTRACT:
|
|
83
|
-
return extract(sharpInstance, operation);
|
|
88
|
+
return await extract(sharpInstance, operation);
|
|
84
89
|
case OpName.FLATTEN:
|
|
85
|
-
return flatten(sharpInstance, operation);
|
|
90
|
+
return await flatten(sharpInstance, operation);
|
|
86
91
|
case OpName.FLIP:
|
|
87
|
-
return flip(sharpInstance);
|
|
92
|
+
return await flip(sharpInstance);
|
|
88
93
|
case OpName.FLOP:
|
|
89
|
-
return flop(sharpInstance);
|
|
94
|
+
return await flop(sharpInstance);
|
|
90
95
|
case OpName.HUE:
|
|
91
|
-
return hue(sharpInstance, operation);
|
|
96
|
+
return await hue(sharpInstance, operation);
|
|
92
97
|
case OpName.LEVEL:
|
|
93
|
-
return level(sharpInstance, operation);
|
|
98
|
+
return await level(sharpInstance, operation);
|
|
94
99
|
case OpName.LIGHTEN:
|
|
95
|
-
return lighten(sharpInstance, operation);
|
|
100
|
+
return await lighten(sharpInstance, operation);
|
|
96
101
|
case OpName.NORMALIZE:
|
|
97
|
-
return normalize(sharpInstance, operation);
|
|
102
|
+
return await normalize(sharpInstance, operation);
|
|
98
103
|
case OpName.OVERLAY:
|
|
99
|
-
return overlay(sharpInstance, operation);
|
|
104
|
+
return await overlay(sharpInstance, operation);
|
|
100
105
|
case OpName.RESIZE:
|
|
101
|
-
return resize(sharpInstance, operation);
|
|
106
|
+
return await resize(sharpInstance, operation);
|
|
102
107
|
case OpName.ROTATE:
|
|
103
|
-
return rotate(sharpInstance, operation);
|
|
108
|
+
return await rotate(sharpInstance, operation);
|
|
104
109
|
case OpName.SATURATE:
|
|
105
|
-
return saturate(sharpInstance, operation);
|
|
110
|
+
return await saturate(sharpInstance, operation);
|
|
106
111
|
default:
|
|
107
112
|
return sharpInstance;
|
|
108
113
|
}
|
|
@@ -124,11 +129,11 @@ async function transform(input, operationsSequence, limits) {
|
|
|
124
129
|
if (operation.name === OpName.RESIZE || operation.name === OpName.EXTEND || operation.name === OpName.EXTRACT || operation.name === OpName.ROTATE) {
|
|
125
130
|
try {
|
|
126
131
|
const meta = await sharpInstance.metadata();
|
|
127
|
-
if (limits.width !== void 0 && meta.width
|
|
132
|
+
if (limits.width !== void 0 && meta.width > limits.width) return Outcome.makeFailure({
|
|
128
133
|
code: TransformErrCodes.WIDTH_LIMIT_EXCEEDED,
|
|
129
134
|
details: `Image width exceeded the limit (${meta.width}px)`
|
|
130
135
|
});
|
|
131
|
-
if (limits.height !== void 0 && meta.height
|
|
136
|
+
if (limits.height !== void 0 && meta.height > limits.height) return Outcome.makeFailure({
|
|
132
137
|
code: TransformErrCodes.HEIGHT_LIMIT_EXCEEDED,
|
|
133
138
|
details: `Image height exceeded the limit (${meta.height}px)`
|
|
134
139
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { BlurOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isBlurOperationParams(obj: unknown): Outcome.Either<BlurOperationParams, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { BrightenOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isBrightenOperationParams(obj: unknown): Outcome.Either<BrightenOperationParams, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { ExtendOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isExtendOperationParams(obj: unknown): Outcome.Either<ExtendOperationParams, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { ExtractOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isExtractOperationParams(obj: unknown): Outcome.Either<ExtractOperationParams, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { FlattenOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isFlattenOperationParams(obj: unknown): Outcome.Either<FlattenOperationParams, string>;
|
|
@@ -14,7 +14,7 @@ function isFlattenOperationParams(obj) {
|
|
|
14
14
|
async function flatten(sharpInstance, params) {
|
|
15
15
|
const inputBg = params.background;
|
|
16
16
|
const rgbBackground = inputBg !== void 0 ? toSharpColor(inputBg) : void 0;
|
|
17
|
-
const background = rgbBackground
|
|
17
|
+
const background = rgbBackground ?? rgbBackground;
|
|
18
18
|
return sharpInstance.flatten({ background });
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
export declare function flip(sharpInstance: sharp.Sharp): Promise<sharp.Sharp>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
export declare function flop(sharpInstance: sharp.Sharp): Promise<sharp.Sharp>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { HueOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isHueOperationParams(obj: unknown): Outcome.Either<HueOperationParams, string>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * as blur from './blur/index.js'
|
|
2
1
|
export * as brighten from './brighten/index.js'
|
|
3
2
|
export * as extend from './extend/index.js'
|
|
4
3
|
export * as extract from './extract/index.js'
|
|
5
|
-
export * as
|
|
4
|
+
export * as blur from './blur/index.js'
|
|
6
5
|
export * as flip from './flip/index.js'
|
|
7
|
-
export * as
|
|
6
|
+
export * as flatten from './flatten/index.js'
|
|
8
7
|
export * as hue from './hue/index.js'
|
|
8
|
+
export * as flop from './flop/index.js'
|
|
9
9
|
export * as level from './level/index.js'
|
|
10
|
+
export * as lighten from './lighten/index.js'
|
|
10
11
|
export * as normalize from './normalize/index.js'
|
|
11
|
-
export * as resize from './resize/index.js'
|
|
12
12
|
export * as overlay from './overlay/index.js'
|
|
13
|
-
export * as
|
|
13
|
+
export * as resize from './resize/index.js'
|
|
14
14
|
export * as rotate from './rotate/index.js'
|
|
15
15
|
export * as saturate from './saturate/index.js'
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * as blur from './blur/index.js'
|
|
2
1
|
export * as brighten from './brighten/index.js'
|
|
3
2
|
export * as extend from './extend/index.js'
|
|
4
3
|
export * as extract from './extract/index.js'
|
|
5
|
-
export * as
|
|
4
|
+
export * as blur from './blur/index.js'
|
|
6
5
|
export * as flip from './flip/index.js'
|
|
7
|
-
export * as
|
|
6
|
+
export * as flatten from './flatten/index.js'
|
|
8
7
|
export * as hue from './hue/index.js'
|
|
8
|
+
export * as flop from './flop/index.js'
|
|
9
9
|
export * as level from './level/index.js'
|
|
10
|
+
export * as lighten from './lighten/index.js'
|
|
10
11
|
export * as normalize from './normalize/index.js'
|
|
11
|
-
export * as resize from './resize/index.js'
|
|
12
12
|
export * as overlay from './overlay/index.js'
|
|
13
|
-
export * as
|
|
13
|
+
export * as resize from './resize/index.js'
|
|
14
14
|
export * as rotate from './rotate/index.js'
|
|
15
15
|
export * as saturate from './saturate/index.js'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { LevelOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isLevelOperationParams(obj: unknown): Outcome.Either<LevelOperationParams, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { LightenOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isLightenOperationParams(obj: unknown): Outcome.Either<LightenOperationParams, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { NormalizeOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isNormalizeOperationParams(obj: unknown): Outcome.Either<NormalizeOperationParams, string>;
|
|
@@ -8,7 +8,7 @@ function isOverlayOperationParams(obj) {
|
|
|
8
8
|
const schema = z.object({
|
|
9
9
|
input: z.union([
|
|
10
10
|
z.custom(isDuckTypedSharpInstance),
|
|
11
|
-
z.custom(Buffer.isBuffer),
|
|
11
|
+
z.custom((data) => Buffer.isBuffer(data)),
|
|
12
12
|
z.string(),
|
|
13
13
|
z.object({
|
|
14
14
|
width: z.number().optional(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { ResizeOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isResizeOperationParams(obj: unknown): Outcome.Either<ResizeOperationParams, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { RotateOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isRotateOperationParams(obj: unknown): Outcome.Either<RotateOperationParams, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
1
|
+
import type sharp from 'sharp';
|
|
2
2
|
import * as Outcome from '../../../../../agnostic/misc/outcome/index.js';
|
|
3
3
|
import type { SaturateOperationParams } from '../../../types.js';
|
|
4
4
|
export declare function isSaturateOperationParams(obj: unknown): Outcome.Either<SaturateOperationParams, string>;
|
package/node/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
export * as express from './@express/index.js'
|
|
1
2
|
export * as awsS3 from './@aws-s3/index.js'
|
|
2
3
|
export * as designEdito from './@design-edito/index.js'
|
|
3
|
-
export * as express from './@express/index.js'
|
|
4
4
|
export * as googleCloud from './@google-cloud/index.js'
|
|
5
5
|
export * as cloudStorage from './cloud-storage/index.js'
|
|
6
6
|
export * as encryption from './encryption/index.js'
|
|
7
|
-
export * as files from './files/index.js'
|
|
8
7
|
export * as ftps from './ftps/index.js'
|
|
9
8
|
export * as images from './images/index.js'
|
|
9
|
+
export * as files from './files/index.js'
|
|
10
10
|
export * as sftp from './sftp/index.js'
|
|
11
11
|
export * as process from './process/index.js'
|
package/node/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
export * as express from './@express/index.js'
|
|
1
2
|
export * as awsS3 from './@aws-s3/index.js'
|
|
2
3
|
export * as designEdito from './@design-edito/index.js'
|
|
3
|
-
export * as express from './@express/index.js'
|
|
4
4
|
export * as googleCloud from './@google-cloud/index.js'
|
|
5
5
|
export * as cloudStorage from './cloud-storage/index.js'
|
|
6
6
|
export * as encryption from './encryption/index.js'
|
|
7
|
-
export * as files from './files/index.js'
|
|
8
7
|
export * as ftps from './ftps/index.js'
|
|
9
8
|
export * as images from './images/index.js'
|
|
9
|
+
export * as files from './files/index.js'
|
|
10
10
|
export * as sftp from './sftp/index.js'
|
|
11
11
|
export * as process from './process/index.js'
|
|
@@ -5,14 +5,65 @@ type Output = {
|
|
|
5
5
|
stderr: string;
|
|
6
6
|
err: unknown;
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
type ThisOptions = {
|
|
9
|
+
argsPrintFormat?: (args: string[]) => string[];
|
|
10
|
+
throwOnError?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Options for the asynchronous `spawner` function.
|
|
14
|
+
*
|
|
15
|
+
* Extends Node.js `SpawnOptions` with additional behaviors specific to this utility.
|
|
16
|
+
*
|
|
17
|
+
* - `argsPrintFormat`: Optional function used to transform the command arguments
|
|
18
|
+
* before they are printed to the console (does not affect execution).
|
|
19
|
+
* - `throwOnError`: If `true`, the function throws when the spawned process exits
|
|
20
|
+
* with a non-zero status instead of returning a failure outcome.
|
|
21
|
+
*/
|
|
22
|
+
export type Options = SpawnOptions & ThisOptions;
|
|
23
|
+
/**
|
|
24
|
+
* Options for the synchronous `spawnerSync` function.
|
|
25
|
+
*
|
|
26
|
+
* Extends Node.js `SpawnSyncOptions` with additional behaviors specific to this utility.
|
|
27
|
+
*
|
|
28
|
+
* - `argsPrintFormat`: Optional function used to transform the command arguments
|
|
29
|
+
* before they are printed to the console (does not affect execution).
|
|
30
|
+
* - `throwOnError`: If `true`, the function throws when the spawned process exits
|
|
31
|
+
* with a non-zero status instead of returning a failure outcome.
|
|
32
|
+
*/
|
|
33
|
+
export type SyncOptions = SpawnSyncOptions & ThisOptions;
|
|
34
|
+
/**
|
|
35
|
+
* Spawns a child process asynchronously and logs its execution and output.
|
|
36
|
+
*
|
|
37
|
+
* Stdout and stderr are streamed, logged in real time, and collected.
|
|
38
|
+
* The result is returned as an `Outcome.Either`, representing success or failure.
|
|
39
|
+
*
|
|
40
|
+
* @param label - Optional label printed before execution to visually group logs.
|
|
41
|
+
* @param command - The command to execute.
|
|
42
|
+
* @param args - Arguments passed to the command.
|
|
43
|
+
* @param options - Optional spawn configuration and utility-specific options:
|
|
44
|
+
* - `argsPrintFormat`: Function to format arguments for logging.
|
|
45
|
+
* - `throwOnError`: If `true`, rejects on non-zero exit code instead of resolving a failure.
|
|
46
|
+
* @returns A promise resolving to an `Outcome.Either`:
|
|
47
|
+
* - success: `{ stdout, stderr, err }` when the command exits with code `0`
|
|
48
|
+
* - failure: `{ stdout, stderr, err }` when the command exits with a non-zero code
|
|
49
|
+
*/
|
|
50
|
+
export declare function spawner(label: string | null, command: string, args: string[], options?: Options): Promise<Outcome.Either<Output, Output>>;
|
|
51
|
+
/**
|
|
52
|
+
* Spawns a child process synchronously and logs its execution and output.
|
|
53
|
+
*
|
|
54
|
+
* Stdout, stderr, and execution errors are logged after the process completes.
|
|
55
|
+
* The result is returned as an `Outcome.Either`, representing success or failure.
|
|
56
|
+
*
|
|
57
|
+
* @param label - Optional label printed before execution to visually group logs.
|
|
58
|
+
* @param command - The command to execute.
|
|
59
|
+
* @param args - Arguments passed to the command.
|
|
60
|
+
* @param options - Optional spawn configuration and utility-specific options:
|
|
61
|
+
* - `argsPrintFormat`: Function to format arguments for logging.
|
|
62
|
+
* - `throwOnError`: If `true`, throws on non-zero exit code instead of returning a failure.
|
|
63
|
+
* @returns An `Outcome.Either`:
|
|
64
|
+
* - success: `{ stdout, stderr, err }` when the command exits with code `0`
|
|
65
|
+
* - failure: `{ stdout, stderr, err }` when the command exits with a non-zero code
|
|
66
|
+
* @throws Error if `throwOnError` is `true` and the process exits with a non-zero status
|
|
67
|
+
*/
|
|
68
|
+
export declare function spawnerSync(label: string | null, command: string, args: string[], options?: SyncOptions): Outcome.Either<Output, Output>;
|
|
18
69
|
export {};
|