@design-edito/tools 0.1.52 → 0.1.53
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/find-duplicates/index.js +1 -0
- package/agnostic/arrays/index.js +7 -6
- package/agnostic/arrays/is-array-of/index.js +1 -0
- package/agnostic/arrays/make/index.js +1 -0
- package/agnostic/arrays/random-pick/index.js +5 -4
- package/agnostic/arrays/shuffle/index.js +1 -0
- package/agnostic/booleans/index.js +1 -0
- package/agnostic/booleans/is-falsy/index.js +1 -0
- package/agnostic/css/bem/index.js +3 -2
- package/agnostic/css/generate-nice-color/index.js +1 -0
- package/agnostic/css/index.js +14 -13
- package/agnostic/css/is-valid-css-class-name/index.js +1 -0
- package/agnostic/css/styles-set/index.js +5 -4
- package/agnostic/errors/index.js +3 -2
- package/agnostic/errors/register/index.js +1 -0
- package/agnostic/errors/unknown-to-string/index.js +1 -0
- package/agnostic/html/get-node-ancestors/index.js +1 -0
- package/agnostic/html/get-position-inside-parent/index.js +1 -0
- package/agnostic/html/hyper-json/cast/index.js +6 -5
- package/agnostic/html/hyper-json/index.js +7 -6
- package/agnostic/html/hyper-json/method/index.js +1 -0
- package/agnostic/html/hyper-json/serialize/index.js +1 -0
- package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/index.js +1 -0
- package/agnostic/html/hyper-json/smart-tags/isolated/any/index.js +1 -0
- package/agnostic/html/hyper-json/smart-tags/isolated/array/index.js +1 -0
- package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/null/index.js +1 -0
- package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +6 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +6 -5
- package/agnostic/html/hyper-json/transformer/index.js +1 -0
- package/agnostic/html/hyper-json/tree/index.js +6 -5
- package/agnostic/html/hyper-json/types/index.js +1 -0
- package/agnostic/html/hyper-json/utils/index.js +6 -5
- package/agnostic/html/index.js +20 -19
- package/agnostic/html/insert-node/index.js +1 -0
- package/agnostic/html/placeholders/index.js +1 -0
- package/agnostic/html/replace-in-element/index.js +1 -0
- package/agnostic/html/sanitize/index.js +5 -4
- package/agnostic/html/selector-to-element/index.js +5 -4
- package/agnostic/html/string-to-nodes/index.js +6 -5
- package/agnostic/misc/assert/index.js +4 -3
- package/agnostic/misc/cast/index.js +1 -0
- package/agnostic/misc/crawler/index.js +1 -0
- package/agnostic/misc/crossenv/detect-runtime/index.js +1 -0
- package/agnostic/misc/crossenv/index.js +1 -0
- package/agnostic/misc/crossenv/types/index.js +1 -0
- package/agnostic/misc/crossenv/window/index.js +1 -0
- package/agnostic/misc/data-size/index.js +1 -0
- package/agnostic/misc/elo/index.js +2 -0
- package/agnostic/misc/get-current-downlink/index.js +1 -0
- package/agnostic/misc/index.js +26 -25
- package/agnostic/misc/is-constructor-function/index.js +1 -0
- package/agnostic/misc/is-nullish/index.js +1 -0
- package/agnostic/misc/logs/index.js +3 -2
- package/agnostic/misc/logs/logger/index.js +1 -0
- package/agnostic/misc/logs/make-text-block/index.js +1 -0
- package/agnostic/misc/logs/styles/index.js +1 -0
- package/agnostic/misc/lorem-ipsum/index.js +12 -11
- package/agnostic/misc/outcome/index.js +1 -0
- package/agnostic/numbers/absolute-modulo/index.js +1 -0
- package/agnostic/numbers/clamp/index.js +1 -0
- package/agnostic/numbers/index.js +6 -5
- package/agnostic/numbers/interpolate/index.js +1 -0
- package/agnostic/numbers/responsive-harmonics/index.js +1 -0
- package/agnostic/numbers/round/index.js +1 -0
- package/agnostic/objects/deep-get-property/index.js +1 -0
- package/agnostic/objects/enums/index.js +1 -0
- package/agnostic/objects/enums/is-in-enum/index.js +1 -0
- package/agnostic/objects/flatten-getters/index.js +1 -0
- package/agnostic/objects/index.js +15 -14
- package/agnostic/objects/is-object/index.js +1 -0
- package/agnostic/objects/is-record/index.js +1 -0
- package/agnostic/objects/record-format/index.js +1 -0
- package/agnostic/objects/record-map/index.js +1 -0
- package/agnostic/objects/validation/index.js +1 -0
- package/agnostic/optim/index.js +1 -0
- package/agnostic/optim/memoize/index.js +1 -0
- package/agnostic/optim/throttle-debounce/index.js +1 -0
- package/agnostic/random/hex-char/index.js +1 -0
- package/agnostic/random/index.js +1 -0
- package/agnostic/random/random/index.js +1 -0
- package/agnostic/random/uuid/index.js +1 -0
- package/agnostic/regexps/index.js +2 -0
- package/agnostic/strings/char-codes/index.js +1 -0
- package/agnostic/strings/index.js +6 -5
- package/agnostic/strings/matches/index.js +1 -0
- package/agnostic/strings/normalize-indent/index.js +1 -0
- package/agnostic/strings/replace-all/index.js +1 -0
- package/agnostic/strings/to-alphanum/index.js +1 -0
- package/agnostic/strings/trim/index.js +1 -0
- package/agnostic/time/dates/format-date/index.js +1 -0
- package/agnostic/time/dates/index.js +1 -0
- package/agnostic/time/duration/index.js +1 -0
- package/agnostic/time/index.js +4 -3
- package/agnostic/time/timeout/index.js +1 -0
- package/agnostic/time/transitions/index.js +1 -0
- package/agnostic/time/wait/index.js +1 -0
- package/chunks/chunk-2KCKWG7R.js +104 -0
- package/chunks/chunk-365LSZZ7.js +37 -0
- package/chunks/chunk-4FOK7DUZ.js +35 -0
- package/chunks/chunk-4LCL2RIC.js +209 -0
- package/chunks/chunk-4WOAFIVN.js +31 -0
- package/chunks/chunk-53MBV4TG.js +6212 -0
- package/chunks/chunk-57YCNOX7.js +15 -0
- package/chunks/chunk-5QVKJGTN.js +95 -0
- package/chunks/chunk-6GZXU2Z3.js +191 -0
- package/chunks/chunk-7QIYI4CK.js +209 -0
- package/chunks/chunk-AF2MI5O5.js +29 -0
- package/chunks/chunk-ARDAQZRR.js +239 -0
- package/chunks/chunk-BLAAWANI.js +191 -0
- package/chunks/chunk-BV67SWXG.js +20 -0
- package/chunks/chunk-CIJQHLIW.js +31 -0
- package/chunks/chunk-DHMARF6D.js +62 -0
- package/chunks/chunk-DHWHB53F.js +191 -0
- package/chunks/chunk-DMR2WE3C.js +62 -0
- package/chunks/chunk-DPBYDWV3.js +2369 -0
- package/chunks/chunk-ECKOTCS4.js +2369 -0
- package/chunks/chunk-EEIJDUNV.js +209 -0
- package/chunks/chunk-EIU72AEZ.js +31 -0
- package/chunks/chunk-F5GXXF3A.js +31 -0
- package/chunks/chunk-FG53JEP2.js +31 -0
- package/chunks/chunk-FTIDPZZ5.js +209 -0
- package/chunks/chunk-GARJTJ6V.js +6 -0
- package/chunks/chunk-GL54CDM2.js +20 -0
- package/chunks/chunk-GNZY3ZTH.js +14 -0
- package/chunks/chunk-GWXVHCAB.js +31 -0
- package/chunks/chunk-I2ILSLBK.js +32 -0
- package/chunks/chunk-IGHRNHVK.js +16 -0
- package/chunks/chunk-IOWZMFCU.js +28 -0
- package/chunks/chunk-IPON4W2H.js +31 -0
- package/chunks/chunk-IUFAHY2R.js +38 -0
- package/chunks/chunk-JBSS64SA.js +6 -0
- package/chunks/chunk-JRXTMXKV.js +15967 -0
- package/chunks/chunk-KEYRP27F.js +191 -0
- package/chunks/chunk-KYMCGWPM.js +31 -0
- package/chunks/chunk-L5JWJRZ7.js +484 -0
- package/chunks/chunk-L7EUEQZP.js +0 -0
- package/chunks/chunk-LAA2DQDK.js +31 -0
- package/chunks/chunk-LATEK24U.js +31 -0
- package/chunks/chunk-LDLSU4OG.js +191 -0
- package/chunks/chunk-LWWXPVXY.js +25173 -0
- package/chunks/chunk-MMPJODO2.js +31 -0
- package/chunks/chunk-MY4VMHSH.js +191 -0
- package/chunks/chunk-MZ2RAM5Y.js +62 -0
- package/chunks/chunk-NGYJGQT3.js +25002 -0
- package/chunks/chunk-NIOOIUSD.js +104 -0
- package/chunks/chunk-NLHFSJYR.js +15 -0
- package/chunks/chunk-NQ5ESZNO.js +191 -0
- package/chunks/chunk-O6NULFZI.js +37 -0
- package/chunks/chunk-OVMNSJOW.js +6 -0
- package/chunks/chunk-PPK2JEO6.js +28 -0
- package/chunks/chunk-PVHLWKA6.js +31 -0
- package/chunks/chunk-QMWX2A56.js +56 -0
- package/chunks/chunk-QPBY235R.js +239 -0
- package/chunks/chunk-REBANVPP.js +104 -0
- package/chunks/chunk-RSMUYH5H.js +31 -0
- package/chunks/chunk-RVVJ4QD4.js +173 -0
- package/chunks/chunk-TSQVG7GA.js +31 -0
- package/chunks/chunk-TXOUGP37.js +62 -0
- package/chunks/chunk-UG36UPJK.js +31 -0
- package/chunks/chunk-UXM54YBI.js +68 -0
- package/chunks/chunk-VHFMQI7Z.js +20 -0
- package/chunks/chunk-VP3Y6EMX.js +190 -0
- package/chunks/chunk-WLHJM76F.js +2369 -0
- package/chunks/chunk-WNLP6R5Y.js +191 -0
- package/chunks/chunk-WQKFVIUF.js +37 -0
- package/chunks/chunk-WSFCRVEQ.js +9 -0
- package/chunks/chunk-WTPUSGMJ.js +104 -0
- package/chunks/chunk-XCBH6NLF.js +42 -0
- package/chunks/chunk-XETVQW6S.js +56 -0
- package/chunks/chunk-XT6XKGKK.js +20 -0
- package/chunks/chunk-YDNQHZRS.js +31 -0
- package/chunks/chunk-YHT73ULP.js +2369 -0
- package/chunks/chunk-YRSNU7IX.js +49 -0
- package/chunks/chunk-YVSS4IT2.js +37 -0
- package/chunks/chunk-YZDZQ7AZ.js +37 -0
- package/chunks/chunk-Z4SQDCFG.js +37 -0
- package/chunks/chunk-ZS5OHINP.js +31 -0
- package/components/Comp/index.js +2 -0
- package/node/@design-edito/index.d.ts +2 -0
- package/node/@design-edito/index.js +12 -0
- package/node/@design-edito/thumbnails/colors/index.d.ts +35 -0
- package/node/@design-edito/thumbnails/colors/index.js +29 -0
- package/node/@design-edito/thumbnails/common/index.d.ts +5 -0
- package/node/@design-edito/thumbnails/common/index.js +15 -0
- package/node/@design-edito/thumbnails/easings/index.d.ts +8 -0
- package/node/@design-edito/thumbnails/easings/index.js +21 -0
- package/node/@design-edito/thumbnails/index.d.ts +5 -0
- package/node/@design-edito/thumbnails/index.js +20 -0
- package/node/@design-edito/thumbnails/layout/index.d.ts +63 -0
- package/node/@design-edito/thumbnails/layout/index.js +31 -0
- package/node/@express/@multer/index.d.ts +22 -0
- package/node/@express/@multer/index.js +9 -0
- package/node/@express/index.d.ts +2 -0
- package/node/@express/index.js +9 -0
- package/node/@google-cloud/index.d.ts +2 -0
- package/node/@google-cloud/index.js +24 -0
- package/node/@google-cloud/storage/bucket/get-metadata/index.d.ts +18 -0
- package/node/@google-cloud/storage/bucket/get-metadata/index.js +9 -0
- package/node/@google-cloud/storage/bucket/index.d.ts +3 -0
- package/node/@google-cloud/storage/bucket/index.js +14 -0
- package/node/@google-cloud/storage/bucket/list/index.d.ts +17 -0
- package/node/@google-cloud/storage/bucket/list/index.js +9 -0
- package/node/@google-cloud/storage/file/copy/index.d.ts +21 -0
- package/node/@google-cloud/storage/file/copy/index.js +9 -0
- package/node/@google-cloud/storage/file/download/index.d.ts +20 -0
- package/node/@google-cloud/storage/file/download/index.js +9 -0
- package/node/@google-cloud/storage/file/erase/index.d.ts +20 -0
- package/node/@google-cloud/storage/file/erase/index.js +9 -0
- package/node/@google-cloud/storage/file/exists/index.d.ts +19 -0
- package/node/@google-cloud/storage/file/exists/index.js +9 -0
- package/node/@google-cloud/storage/file/generate-signed-url/index.d.ts +23 -0
- package/node/@google-cloud/storage/file/generate-signed-url/index.js +9 -0
- package/node/@google-cloud/storage/file/get-metadata/index.d.ts +22 -0
- package/node/@google-cloud/storage/file/get-metadata/index.js +9 -0
- package/node/@google-cloud/storage/file/get-permissions/index.d.ts +19 -0
- package/node/@google-cloud/storage/file/get-permissions/index.js +9 -0
- package/node/@google-cloud/storage/file/index.d.ts +12 -0
- package/node/@google-cloud/storage/file/index.js +50 -0
- package/node/@google-cloud/storage/file/move/index.d.ts +24 -0
- package/node/@google-cloud/storage/file/move/index.js +9 -0
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.d.ts +26 -0
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +12 -0
- package/node/@google-cloud/storage/file/update-metadata/index.d.ts +24 -0
- package/node/@google-cloud/storage/file/update-metadata/index.js +9 -0
- package/node/@google-cloud/storage/file/upload/index.d.ts +21 -0
- package/node/@google-cloud/storage/file/upload/index.js +9 -0
- package/node/@google-cloud/storage/index.d.ts +3 -0
- package/node/@google-cloud/storage/index.js +27 -0
- package/node/encryption/buffer/index.d.ts +55 -0
- package/node/encryption/buffer/index.js +16 -0
- package/node/encryption/generate-key/index.d.ts +16 -0
- package/node/encryption/generate-key/index.js +7 -0
- package/node/encryption/index.d.ts +5 -0
- package/node/encryption/index.js +29 -0
- package/node/encryption/uint8-array/index.d.ts +57 -0
- package/node/encryption/uint8-array/index.js +15 -0
- package/node/files/index.d.ts +4 -6
- package/node/files/index.js +10 -10
- package/node/files/is-in-directory/index.js +1 -0
- package/node/files/read-write/index.d.ts +1 -1
- package/node/files/read-write/index.js +1 -0
- package/node/files/subpaths/index.js +1 -0
- package/node/images/exports/index.d.ts +15 -0
- package/node/images/exports/index.js +11 -0
- package/node/images/index.d.ts +4 -0
- package/node/images/index.js +24 -0
- package/node/images/prepare/index.d.ts +17 -0
- package/node/images/prepare/index.js +22 -0
- package/node/images/transform/area-composition/index.d.ts +60 -0
- package/node/images/transform/area-composition/index.js +16 -0
- package/node/images/transform/index.d.ts +30 -0
- package/node/images/transform/index.js +17 -0
- package/node/index.d.ts +8 -6
- package/node/process/index.d.ts +5 -7
- package/node/process/index.js +11 -9
- package/node/process/on-exit/index.js +1 -0
- package/package.json +15 -2
@@ -0,0 +1,49 @@
|
|
1
|
+
import {
|
2
|
+
__export
|
3
|
+
} from "./chunk-XCBH6NLF.js";
|
4
|
+
|
5
|
+
// src/node/@design-edito/thumbnails/common/index.ts
|
6
|
+
var common_exports = {};
|
7
|
+
__export(common_exports, {
|
8
|
+
clampNumber: () => clampNumber,
|
9
|
+
getArrayMax: () => getArrayMax,
|
10
|
+
randomInt: () => randomInt,
|
11
|
+
randomIntRange: () => randomIntRange,
|
12
|
+
shuffleArray: () => shuffleArray
|
13
|
+
});
|
14
|
+
function randomInt(max) {
|
15
|
+
return Math.floor(Math.random() * max);
|
16
|
+
}
|
17
|
+
function randomIntRange(min, max) {
|
18
|
+
const minCeiled = Math.ceil(min);
|
19
|
+
const maxFloored = Math.floor(max);
|
20
|
+
return Math.floor(Math.random() * (maxFloored - minCeiled) + minCeiled);
|
21
|
+
}
|
22
|
+
function shuffleArray(array) {
|
23
|
+
return [...array].sort((a, b) => 0.5 - Math.random());
|
24
|
+
}
|
25
|
+
function clampNumber(val, min, max) {
|
26
|
+
return Math.max(min, Math.min(val, max));
|
27
|
+
}
|
28
|
+
function getArrayMax(array) {
|
29
|
+
if (!array.length || !array[0]) {
|
30
|
+
return;
|
31
|
+
}
|
32
|
+
let max = array[0];
|
33
|
+
for (let i = 0; i < array.length; i++) {
|
34
|
+
const current = array[i];
|
35
|
+
if (current !== void 0 && current > max) {
|
36
|
+
max = current;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
return max;
|
40
|
+
}
|
41
|
+
|
42
|
+
export {
|
43
|
+
randomInt,
|
44
|
+
randomIntRange,
|
45
|
+
shuffleArray,
|
46
|
+
clampNumber,
|
47
|
+
getArrayMax,
|
48
|
+
common_exports
|
49
|
+
};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import {
|
2
|
+
Cast,
|
3
|
+
Tree,
|
4
|
+
Utils
|
5
|
+
} from "./chunk-YHT73ULP.js";
|
6
|
+
import {
|
7
|
+
SmartTags
|
8
|
+
} from "./chunk-UT2J62LH.js";
|
9
|
+
import {
|
10
|
+
Serialize
|
11
|
+
} from "./chunk-SXRWMH3U.js";
|
12
|
+
import {
|
13
|
+
Transformer
|
14
|
+
} from "./chunk-BKO7GLC2.js";
|
15
|
+
import {
|
16
|
+
Method
|
17
|
+
} from "./chunk-RW7VAKJW.js";
|
18
|
+
import {
|
19
|
+
Types
|
20
|
+
} from "./chunk-XEQ2PBT2.js";
|
21
|
+
|
22
|
+
// src/agnostic/html/hyper-json/index.ts
|
23
|
+
var HyperJson;
|
24
|
+
((HyperJson2) => {
|
25
|
+
HyperJson2.Cast = Cast;
|
26
|
+
HyperJson2.Method = Method;
|
27
|
+
HyperJson2.Serialize = Serialize;
|
28
|
+
HyperJson2.SmartTags = SmartTags;
|
29
|
+
HyperJson2.Transformer = Transformer;
|
30
|
+
HyperJson2.Tree = Tree;
|
31
|
+
HyperJson2.Types = Types;
|
32
|
+
HyperJson2.Utils = Utils;
|
33
|
+
})(HyperJson || (HyperJson = {}));
|
34
|
+
|
35
|
+
export {
|
36
|
+
HyperJson
|
37
|
+
};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import {
|
2
|
+
upload
|
3
|
+
} from "./chunk-RSMUYH5H.js";
|
4
|
+
import {
|
5
|
+
download
|
6
|
+
} from "./chunk-LAA2DQDK.js";
|
7
|
+
import {
|
8
|
+
erase
|
9
|
+
} from "./chunk-FG53JEP2.js";
|
10
|
+
import {
|
11
|
+
Outcome
|
12
|
+
} from "./chunk-JMU5PDBD.js";
|
13
|
+
import {
|
14
|
+
__export
|
15
|
+
} from "./chunk-XCBH6NLF.js";
|
16
|
+
|
17
|
+
// src/node/@google-cloud/storage/file/revoke-signed-urls/index.ts
|
18
|
+
var revoke_signed_urls_exports = {};
|
19
|
+
__export(revoke_signed_urls_exports, {
|
20
|
+
revokeSignedUrls: () => revokeSignedUrls
|
21
|
+
});
|
22
|
+
async function revokeSignedUrls(sourcePath, bucket, options) {
|
23
|
+
const { downloadOptions, eraseOptions, uploadOptions } = options ?? {};
|
24
|
+
const downloadAttempt = await download(sourcePath, bucket, downloadOptions);
|
25
|
+
if (!downloadAttempt.success) return downloadAttempt;
|
26
|
+
const deletionAttempt = await erase(sourcePath, bucket, eraseOptions);
|
27
|
+
if (!deletionAttempt.success) return deletionAttempt;
|
28
|
+
const downloaded = downloadAttempt.payload;
|
29
|
+
const reuploadAttempt = await upload(downloaded, sourcePath, bucket, uploadOptions);
|
30
|
+
if (!reuploadAttempt.success) return reuploadAttempt;
|
31
|
+
return Outcome.makeSuccess(true);
|
32
|
+
}
|
33
|
+
|
34
|
+
export {
|
35
|
+
revokeSignedUrls,
|
36
|
+
revoke_signed_urls_exports
|
37
|
+
};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import {
|
2
|
+
Cast,
|
3
|
+
Tree,
|
4
|
+
Utils
|
5
|
+
} from "./chunk-ECKOTCS4.js";
|
6
|
+
import {
|
7
|
+
Types
|
8
|
+
} from "./chunk-XEQ2PBT2.js";
|
9
|
+
import {
|
10
|
+
SmartTags
|
11
|
+
} from "./chunk-UT2J62LH.js";
|
12
|
+
import {
|
13
|
+
Serialize
|
14
|
+
} from "./chunk-SXRWMH3U.js";
|
15
|
+
import {
|
16
|
+
Transformer
|
17
|
+
} from "./chunk-BKO7GLC2.js";
|
18
|
+
import {
|
19
|
+
Method
|
20
|
+
} from "./chunk-RW7VAKJW.js";
|
21
|
+
|
22
|
+
// src/agnostic/html/hyper-json/index.ts
|
23
|
+
var HyperJson;
|
24
|
+
((HyperJson2) => {
|
25
|
+
HyperJson2.Cast = Cast;
|
26
|
+
HyperJson2.Method = Method;
|
27
|
+
HyperJson2.Serialize = Serialize;
|
28
|
+
HyperJson2.SmartTags = SmartTags;
|
29
|
+
HyperJson2.Transformer = Transformer;
|
30
|
+
HyperJson2.Tree = Tree;
|
31
|
+
HyperJson2.Types = Types;
|
32
|
+
HyperJson2.Utils = Utils;
|
33
|
+
})(HyperJson || (HyperJson = {}));
|
34
|
+
|
35
|
+
export {
|
36
|
+
HyperJson
|
37
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import {
|
2
|
+
isArrayOf
|
3
|
+
} from "./chunk-6RGDWX4A.js";
|
4
|
+
import {
|
5
|
+
findDuplicates
|
6
|
+
} from "./chunk-YS6WMSWC.js";
|
7
|
+
import {
|
8
|
+
shuffle
|
9
|
+
} from "./chunk-VJJIYJMY.js";
|
10
|
+
import {
|
11
|
+
randomPick,
|
12
|
+
randomPickMany
|
13
|
+
} from "./chunk-AQBJ6HNB.js";
|
14
|
+
import {
|
15
|
+
make
|
16
|
+
} from "./chunk-RLAZR3NL.js";
|
17
|
+
|
18
|
+
// src/agnostic/arrays/index.tsx
|
19
|
+
var Arrays;
|
20
|
+
((Arrays2) => {
|
21
|
+
Arrays2.findDuplicates = findDuplicates;
|
22
|
+
Arrays2.isArrayOf = isArrayOf;
|
23
|
+
Arrays2.make = make;
|
24
|
+
Arrays2.randomPick = randomPick;
|
25
|
+
Arrays2.randomPickMany = randomPickMany;
|
26
|
+
Arrays2.shuffle = shuffle;
|
27
|
+
})(Arrays || (Arrays = {}));
|
28
|
+
|
29
|
+
export {
|
30
|
+
Arrays
|
31
|
+
};
|
package/components/Comp/index.js
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
import "../../chunks/chunk-L7EUEQZP.js";
|
2
|
+
import {
|
3
|
+
thumbnails_exports
|
4
|
+
} from "../../chunks/chunk-IOWZMFCU.js";
|
5
|
+
import "../../chunks/chunk-L5JWJRZ7.js";
|
6
|
+
import "../../chunks/chunk-QPBY235R.js";
|
7
|
+
import "../../chunks/chunk-YRSNU7IX.js";
|
8
|
+
import "../../chunks/chunk-UXM54YBI.js";
|
9
|
+
import "../../chunks/chunk-XCBH6NLF.js";
|
10
|
+
export {
|
11
|
+
thumbnails_exports as Thumbnails
|
12
|
+
};
|
@@ -0,0 +1,35 @@
|
|
1
|
+
export type Palette = Color[];
|
2
|
+
export type Color = [number, number, number];
|
3
|
+
export type RGBColor = Color;
|
4
|
+
export type HSLColor = Color;
|
5
|
+
export type PaletteExtract = {
|
6
|
+
default: {
|
7
|
+
default: Palette;
|
8
|
+
saturate: Palette;
|
9
|
+
lighten: Palette;
|
10
|
+
};
|
11
|
+
complementary: {
|
12
|
+
default: Palette;
|
13
|
+
saturate: Palette;
|
14
|
+
lighten: Palette;
|
15
|
+
};
|
16
|
+
};
|
17
|
+
export declare function extractPaletteFromImage(data: Buffer<ArrayBufferLike>, imageDimensions: {
|
18
|
+
w: number;
|
19
|
+
h: number;
|
20
|
+
}, options: {
|
21
|
+
extractPaletteDensity: number;
|
22
|
+
lightenIntensity: number;
|
23
|
+
saturateIntensity: number;
|
24
|
+
}): PaletteExtract;
|
25
|
+
export declare const getPixel: (data: Buffer<ArrayBufferLike>, x: number, y: number, width: number, nbChannels: number) => RGBColor;
|
26
|
+
export declare const getPixels: (data: Buffer<ArrayBufferLike>, width: number, height: number, nbChannels?: number) => Color[];
|
27
|
+
export declare const getPalette: (pixels: Color[], paletteDensity: number) => Palette;
|
28
|
+
export declare const toHex: (c: number) => string;
|
29
|
+
export declare const RGBToHSL: (color: Color) => HSLColor;
|
30
|
+
export declare const HSLToRGB: (color: Color) => RGBColor;
|
31
|
+
export declare const HEXToRGB: (hexColor: string) => RGBColor;
|
32
|
+
export declare const RGBToHex: (color: RGBColor) => string;
|
33
|
+
export declare const complementColor: (color: RGBColor) => RGBColor;
|
34
|
+
export declare const ligthenColor: (color: RGBColor, intensity?: number) => RGBColor;
|
35
|
+
export declare const saturateColor: (color: RGBColor, intensity?: number) => RGBColor;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import {
|
2
|
+
HEXToRGB,
|
3
|
+
HSLToRGB,
|
4
|
+
RGBToHSL,
|
5
|
+
RGBToHex,
|
6
|
+
complementColor,
|
7
|
+
extractPaletteFromImage,
|
8
|
+
getPalette,
|
9
|
+
getPixel,
|
10
|
+
getPixels,
|
11
|
+
ligthenColor,
|
12
|
+
saturateColor,
|
13
|
+
toHex
|
14
|
+
} from "../../../../chunks/chunk-L5JWJRZ7.js";
|
15
|
+
import "../../../../chunks/chunk-XCBH6NLF.js";
|
16
|
+
export {
|
17
|
+
HEXToRGB,
|
18
|
+
HSLToRGB,
|
19
|
+
RGBToHSL,
|
20
|
+
RGBToHex,
|
21
|
+
complementColor,
|
22
|
+
extractPaletteFromImage,
|
23
|
+
getPalette,
|
24
|
+
getPixel,
|
25
|
+
getPixels,
|
26
|
+
ligthenColor,
|
27
|
+
saturateColor,
|
28
|
+
toHex
|
29
|
+
};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export declare function randomInt(max: number): number;
|
2
|
+
export declare function randomIntRange(min: number, max: number): number;
|
3
|
+
export declare function shuffleArray(array: any[]): any[];
|
4
|
+
export declare function clampNumber(val: number, min: number, max: number): number;
|
5
|
+
export declare function getArrayMax(array: number[]): number | undefined;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import {
|
2
|
+
clampNumber,
|
3
|
+
getArrayMax,
|
4
|
+
randomInt,
|
5
|
+
randomIntRange,
|
6
|
+
shuffleArray
|
7
|
+
} from "../../../../chunks/chunk-YRSNU7IX.js";
|
8
|
+
import "../../../../chunks/chunk-XCBH6NLF.js";
|
9
|
+
export {
|
10
|
+
clampNumber,
|
11
|
+
getArrayMax,
|
12
|
+
randomInt,
|
13
|
+
randomIntRange,
|
14
|
+
shuffleArray
|
15
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export declare function ease(t: number, name: string): number;
|
2
|
+
export declare function linear(t: number): number;
|
3
|
+
export declare function easeOutSine(t: number): number;
|
4
|
+
export declare function easeInSine(t: number): number;
|
5
|
+
export declare function easeInOutSine(t: number): number;
|
6
|
+
export declare function easeInQuad(t: number): number;
|
7
|
+
export declare function easeOutQuad(t: number): number;
|
8
|
+
export declare function easeInOutQuad(t: number): number;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import {
|
2
|
+
ease,
|
3
|
+
easeInOutQuad,
|
4
|
+
easeInOutSine,
|
5
|
+
easeInQuad,
|
6
|
+
easeInSine,
|
7
|
+
easeOutQuad,
|
8
|
+
easeOutSine,
|
9
|
+
linear
|
10
|
+
} from "../../../../chunks/chunk-UXM54YBI.js";
|
11
|
+
import "../../../../chunks/chunk-XCBH6NLF.js";
|
12
|
+
export {
|
13
|
+
ease,
|
14
|
+
easeInOutQuad,
|
15
|
+
easeInOutSine,
|
16
|
+
easeInQuad,
|
17
|
+
easeInSine,
|
18
|
+
easeOutQuad,
|
19
|
+
easeOutSine,
|
20
|
+
linear
|
21
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import "../../../chunks/chunk-IOWZMFCU.js";
|
2
|
+
import {
|
3
|
+
colors_exports
|
4
|
+
} from "../../../chunks/chunk-L5JWJRZ7.js";
|
5
|
+
import {
|
6
|
+
layout_exports
|
7
|
+
} from "../../../chunks/chunk-QPBY235R.js";
|
8
|
+
import {
|
9
|
+
common_exports
|
10
|
+
} from "../../../chunks/chunk-YRSNU7IX.js";
|
11
|
+
import {
|
12
|
+
easings_exports
|
13
|
+
} from "../../../chunks/chunk-UXM54YBI.js";
|
14
|
+
import "../../../chunks/chunk-XCBH6NLF.js";
|
15
|
+
export {
|
16
|
+
colors_exports as Colors,
|
17
|
+
common_exports as Common,
|
18
|
+
easings_exports as Easings,
|
19
|
+
layout_exports as Layout
|
20
|
+
};
|
@@ -0,0 +1,63 @@
|
|
1
|
+
export type Dimensions = {
|
2
|
+
w: number;
|
3
|
+
h: number;
|
4
|
+
};
|
5
|
+
export type Positions = {
|
6
|
+
x: number;
|
7
|
+
y: number;
|
8
|
+
};
|
9
|
+
export type Layout = Dimensions & Positions;
|
10
|
+
export type Tiles = Array<Layout>;
|
11
|
+
export type TileDensity = {
|
12
|
+
min: number;
|
13
|
+
max: number;
|
14
|
+
};
|
15
|
+
export type TileEasing = {
|
16
|
+
X: string;
|
17
|
+
Y: string;
|
18
|
+
};
|
19
|
+
export declare function getContainedDimensions(w: number, h: number, wrapperW: number, wrapperH: number, ignoreIfSmaller?: boolean): {
|
20
|
+
w: number;
|
21
|
+
h: number;
|
22
|
+
};
|
23
|
+
export declare function packAreasAndTiles(initialShape: Layout, dimensions: Dimensions, tileCoverage: number, tileDensity: {
|
24
|
+
A: TileDensity;
|
25
|
+
B: TileDensity;
|
26
|
+
}, tileEasing: TileEasing, tileFormat?: string): Tiles;
|
27
|
+
export declare function alignTopLeft(dimensions: Dimensions, containedDimensions: Dimensions, wrapperDimensions: Dimensions): {
|
28
|
+
x: number;
|
29
|
+
y: number;
|
30
|
+
};
|
31
|
+
export declare function alignTopCenter(dimensions: Dimensions, containedDimensions: Dimensions, wrapperDimensions: Dimensions): {
|
32
|
+
x: number;
|
33
|
+
y: number;
|
34
|
+
};
|
35
|
+
export declare function alignTopRight(dimensions: Dimensions, containedDimensions: Dimensions, wrapperDimensions: Dimensions): {
|
36
|
+
x: number;
|
37
|
+
y: number;
|
38
|
+
};
|
39
|
+
export declare function alignLeftCenter(dimensions: Dimensions, containedDimensions: Dimensions, wrapperDimensions: Dimensions): {
|
40
|
+
x: number;
|
41
|
+
y: number;
|
42
|
+
};
|
43
|
+
export declare function alignRightCenter(dimensions: Dimensions, containedDimensions: Dimensions, wrapperDimensions: Dimensions): {
|
44
|
+
x: number;
|
45
|
+
y: number;
|
46
|
+
};
|
47
|
+
export declare function alignCenter(dimensions: Dimensions, containedDimensions: Dimensions, wrapperDimensions: Dimensions): {
|
48
|
+
x: number;
|
49
|
+
y: number;
|
50
|
+
};
|
51
|
+
export declare function alignBottomLeft(dimensions: Dimensions, containedDimensions: Dimensions, wrapperDimensions: Dimensions): {
|
52
|
+
x: number;
|
53
|
+
y: number;
|
54
|
+
};
|
55
|
+
export declare function alignBottomCenter(dimensions: Dimensions, containedDimensions: Dimensions, wrapperDimensions: Dimensions): {
|
56
|
+
x: number;
|
57
|
+
y: number;
|
58
|
+
};
|
59
|
+
export declare function alignBottomRight(dimensions: Dimensions, containedDimensions: Dimensions, wrapperDimensions: Dimensions): {
|
60
|
+
x: number;
|
61
|
+
y: number;
|
62
|
+
};
|
63
|
+
export declare function getOffset(size: number, wrapperSize: number): number;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import {
|
2
|
+
alignBottomCenter,
|
3
|
+
alignBottomLeft,
|
4
|
+
alignBottomRight,
|
5
|
+
alignCenter,
|
6
|
+
alignLeftCenter,
|
7
|
+
alignRightCenter,
|
8
|
+
alignTopCenter,
|
9
|
+
alignTopLeft,
|
10
|
+
alignTopRight,
|
11
|
+
getContainedDimensions,
|
12
|
+
getOffset,
|
13
|
+
packAreasAndTiles
|
14
|
+
} from "../../../../chunks/chunk-QPBY235R.js";
|
15
|
+
import "../../../../chunks/chunk-YRSNU7IX.js";
|
16
|
+
import "../../../../chunks/chunk-UXM54YBI.js";
|
17
|
+
import "../../../../chunks/chunk-XCBH6NLF.js";
|
18
|
+
export {
|
19
|
+
alignBottomCenter,
|
20
|
+
alignBottomLeft,
|
21
|
+
alignBottomRight,
|
22
|
+
alignCenter,
|
23
|
+
alignLeftCenter,
|
24
|
+
alignRightCenter,
|
25
|
+
alignTopCenter,
|
26
|
+
alignTopLeft,
|
27
|
+
alignTopRight,
|
28
|
+
getContainedDimensions,
|
29
|
+
getOffset,
|
30
|
+
packAreasAndTiles
|
31
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Request, Response } from 'express';
|
2
|
+
import { Options, Field } from 'multer';
|
3
|
+
import { Outcome } from '../../../agnostic/misc/outcome';
|
4
|
+
export type WithMulterSharedOptions = {
|
5
|
+
limits?: Options['limits'];
|
6
|
+
fileFilter?: Options['fileFilter'];
|
7
|
+
};
|
8
|
+
export type WithMulterModeOptions = {
|
9
|
+
mode: 'none' | 'any';
|
10
|
+
} | {
|
11
|
+
mode: 'single';
|
12
|
+
fieldName: string;
|
13
|
+
} | {
|
14
|
+
mode: 'array';
|
15
|
+
fieldName: string;
|
16
|
+
maxCount?: number;
|
17
|
+
} | {
|
18
|
+
mode: 'fields';
|
19
|
+
fields: Field[];
|
20
|
+
};
|
21
|
+
export type WithMulterOptions = WithMulterSharedOptions & WithMulterModeOptions;
|
22
|
+
export declare function useMulterMiddleware(req: Request, res: Response, options: WithMulterOptions): Promise<Outcome.Either<true, unknown>>;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import {
|
2
|
+
storage_exports
|
3
|
+
} from "../../chunks/chunk-BV67SWXG.js";
|
4
|
+
import "../../chunks/chunk-QMWX2A56.js";
|
5
|
+
import "../../chunks/chunk-YZDZQ7AZ.js";
|
6
|
+
import "../../chunks/chunk-RSMUYH5H.js";
|
7
|
+
import "../../chunks/chunk-I2ILSLBK.js";
|
8
|
+
import "../../chunks/chunk-UG36UPJK.js";
|
9
|
+
import "../../chunks/chunk-PVHLWKA6.js";
|
10
|
+
import "../../chunks/chunk-LAA2DQDK.js";
|
11
|
+
import "../../chunks/chunk-FG53JEP2.js";
|
12
|
+
import "../../chunks/chunk-4FOK7DUZ.js";
|
13
|
+
import "../../chunks/chunk-CIJQHLIW.js";
|
14
|
+
import "../../chunks/chunk-F5GXXF3A.js";
|
15
|
+
import "../../chunks/chunk-YDNQHZRS.js";
|
16
|
+
import "../../chunks/chunk-GL54CDM2.js";
|
17
|
+
import "../../chunks/chunk-KYMCGWPM.js";
|
18
|
+
import "../../chunks/chunk-AF2MI5O5.js";
|
19
|
+
import "../../chunks/chunk-JMU5PDBD.js";
|
20
|
+
import "../../chunks/chunk-FENXVJYO.js";
|
21
|
+
import "../../chunks/chunk-XCBH6NLF.js";
|
22
|
+
export {
|
23
|
+
storage_exports as Storage
|
24
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Bucket, BucketMetadata, GetBucketMetadataOptions as GCSGetBucketMetadataOptions } from '@google-cloud/storage';
|
2
|
+
import { Outcome } from '~/agnostic/misc/outcome';
|
3
|
+
export type GetBucketMetadataOptions = GCSGetBucketMetadataOptions;
|
4
|
+
/**
|
5
|
+
* Retrieves metadata for a Google Cloud Storage bucket.
|
6
|
+
*
|
7
|
+
* This function calls the Google Cloud Storage API to get information about the bucket,
|
8
|
+
* such as its location, storage class, and other configuration details.
|
9
|
+
*
|
10
|
+
* @param {Bucket} bucket - The Google Cloud Storage bucket object.
|
11
|
+
* @param {GetBucketMetadataOptions} [options] - Optional configuration options to pass to the `getMetadata` method.
|
12
|
+
* @returns {Promise<Outcome.Either<BucketMetadata, string>>} A promise that resolves to an `Outcome.Either`.
|
13
|
+
* - On success: `Outcome.makeSuccess(metadata)` with the bucket metadata.
|
14
|
+
* - On failure: `Outcome.makeFailure(errStr)` with an error message.
|
15
|
+
*
|
16
|
+
* @throws {Error} Throws an error if the metadata retrieval fails (e.g., network issues, incorrect permissions).
|
17
|
+
*/
|
18
|
+
export declare function getMetadata(bucket: Bucket, options?: GetBucketMetadataOptions): Promise<Outcome.Either<BucketMetadata, string>>;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import "../../../../chunks/chunk-GL54CDM2.js";
|
2
|
+
import {
|
3
|
+
list_exports
|
4
|
+
} from "../../../../chunks/chunk-KYMCGWPM.js";
|
5
|
+
import {
|
6
|
+
get_metadata_exports
|
7
|
+
} from "../../../../chunks/chunk-AF2MI5O5.js";
|
8
|
+
import "../../../../chunks/chunk-JMU5PDBD.js";
|
9
|
+
import "../../../../chunks/chunk-FENXVJYO.js";
|
10
|
+
import "../../../../chunks/chunk-XCBH6NLF.js";
|
11
|
+
export {
|
12
|
+
get_metadata_exports as GetMetadata,
|
13
|
+
list_exports as List
|
14
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Bucket, GetFileOptions } from '@google-cloud/storage';
|
2
|
+
import { Outcome } from '~/agnostic/misc/outcome';
|
3
|
+
export type ListOptions = {
|
4
|
+
getFileOptions?: GetFileOptions;
|
5
|
+
};
|
6
|
+
/**
|
7
|
+
* Lists the children files (immediate files) of a given bucket.
|
8
|
+
*
|
9
|
+
* This function can be configured with options to customize the listing, such as including prefixes or limiting the number of results.
|
10
|
+
* If no options are provided, it lists all files in the bucket.
|
11
|
+
*
|
12
|
+
* @param {Bucket} bucket - The GCS bucket to list files from.
|
13
|
+
* @param {ListOptions} [options] - Optional configuration for the file listing.
|
14
|
+
* @param {GetFileOptions} [options.getFileOptions] - Additional options to control the file listing, such as delimiters or filters.
|
15
|
+
* @returns {Promise<Outcome.Either<string[], string>>} - Returns either a success with an array of file names or a failure with an error message.
|
16
|
+
*/
|
17
|
+
export declare function list(bucket: Bucket, options?: ListOptions): Promise<Outcome.Either<string[], string>>;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Bucket, FileOptions, CopyOptions as GCSFileCopyOptions } from '@google-cloud/storage';
|
2
|
+
import { Outcome } from '~/agnostic/misc/outcome';
|
3
|
+
export type CopyOptions = {
|
4
|
+
fileOptions?: FileOptions;
|
5
|
+
copyOptions?: GCSFileCopyOptions;
|
6
|
+
};
|
7
|
+
/**
|
8
|
+
* Copies a file from one location to another within a Google Cloud Storage bucket.
|
9
|
+
*
|
10
|
+
* This function copies the file located at `sourcePath` to `destinationPath` in the same or a different Google Cloud Storage bucket.
|
11
|
+
* It can be customized using optional `fileOptions` and `copyOptions` to control the copying behavior.
|
12
|
+
*
|
13
|
+
* @param {string} sourcePath - The path of the source file to be copied.
|
14
|
+
* @param {string} destinationPath - The destination path where the file will be copied to.
|
15
|
+
* @param {Bucket} bucket - The Google Cloud Storage bucket object containing the file to be copied.
|
16
|
+
* @param {CopyOptions} [options] - Optional configuration options for the file copy operation.
|
17
|
+
* @returns {Promise<Outcome.Either<true, string>>} A promise that resolves to an `Outcome.Either`.
|
18
|
+
* - On success: `Outcome.makeSuccess(true)` indicating the file was successfully copied.
|
19
|
+
* - On failure: `Outcome.makeFailure(errStr)` with an error message if the copy operation fails.
|
20
|
+
*/
|
21
|
+
export declare function copy(sourcePath: string, destinationPath: string, bucket: Bucket, options?: CopyOptions): Promise<Outcome.Either<true, string>>;
|