@design-edito/tools 0.1.53 → 0.1.54
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 -1
- package/agnostic/arrays/index.js +8 -8
- package/agnostic/arrays/is-array-of/index.js +1 -1
- package/agnostic/arrays/make/index.js +1 -1
- package/agnostic/arrays/random-pick/index.js +5 -5
- package/agnostic/arrays/shuffle/index.js +1 -1
- package/agnostic/booleans/index.js +1 -1
- package/agnostic/booleans/is-falsy/index.js +1 -1
- package/agnostic/css/bem/index.js +1 -1
- package/agnostic/css/generate-nice-color/index.js +1 -1
- package/agnostic/css/index.js +9 -9
- package/agnostic/css/is-valid-css-class-name/index.js +1 -1
- package/agnostic/css/styles-set/index.js +7 -7
- package/agnostic/errors/index.js +1 -1
- package/agnostic/errors/register/index.js +1 -1
- package/agnostic/errors/unknown-to-string/index.js +1 -1
- 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.js +5 -5
- package/agnostic/html/hyper-json/index.js +6 -6
- package/agnostic/html/hyper-json/method/index.js +1 -1
- package/agnostic/html/hyper-json/serialize/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/any/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/array/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/null/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +5 -5
- package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +5 -5
- package/agnostic/html/hyper-json/transformer/index.js +1 -1
- package/agnostic/html/hyper-json/tree/index.js +5 -5
- package/agnostic/html/hyper-json/types/index.js +1 -1
- package/agnostic/html/hyper-json/utils/index.js +5 -5
- package/agnostic/html/index.js +19 -19
- package/agnostic/html/insert-node/index.js +1 -1
- package/agnostic/html/placeholders/index.js +1 -1
- package/agnostic/html/replace-in-element/index.js +1 -1
- package/agnostic/html/sanitize/index.js +5 -5
- package/agnostic/html/selector-to-element/index.js +5 -5
- package/agnostic/html/string-to-nodes/index.js +6 -6
- package/agnostic/misc/assert/index.js +1 -1
- package/agnostic/misc/cast/index.js +1 -1
- package/agnostic/misc/crawler/index.js +1 -1
- package/agnostic/misc/crossenv/detect-runtime/index.js +1 -1
- package/agnostic/misc/crossenv/index.js +3 -3
- package/agnostic/misc/crossenv/types/index.js +1 -1
- package/agnostic/misc/crossenv/window/index.js +1 -1
- package/agnostic/misc/data-size/index.js +1 -1
- package/agnostic/misc/elo/index.js +1 -1
- package/agnostic/misc/get-current-downlink/index.js +1 -1
- package/agnostic/misc/index.js +28 -28
- package/agnostic/misc/is-constructor-function/index.js +1 -1
- package/agnostic/misc/is-nullish/index.js +1 -1
- package/agnostic/misc/logs/index.js +3 -3
- package/agnostic/misc/logs/logger/index.js +1 -1
- package/agnostic/misc/logs/make-text-block/index.js +1 -1
- package/agnostic/misc/logs/styles/index.js +1 -1
- package/agnostic/misc/lorem-ipsum/index.js +13 -13
- package/agnostic/misc/outcome/index.js +1 -1
- package/agnostic/numbers/absolute-modulo/index.js +1 -1
- package/agnostic/numbers/clamp/index.js +1 -1
- package/agnostic/numbers/index.js +5 -5
- package/agnostic/numbers/interpolate/index.js +1 -1
- package/agnostic/numbers/responsive-harmonics/index.js +1 -1
- package/agnostic/numbers/round/index.js +1 -1
- package/agnostic/objects/deep-get-property/index.js +1 -1
- package/agnostic/objects/enums/index.js +1 -1
- package/agnostic/objects/enums/is-in-enum/index.js +1 -1
- package/agnostic/objects/flatten-getters/index.js +1 -1
- package/agnostic/objects/index.js +13 -13
- package/agnostic/objects/is-object/index.js +1 -1
- package/agnostic/objects/is-record/index.js +1 -1
- package/agnostic/objects/record-format/index.js +1 -1
- package/agnostic/objects/record-map/index.js +1 -1
- package/agnostic/objects/validation/index.js +1 -1
- package/agnostic/optim/index.js +1 -1
- package/agnostic/optim/memoize/index.js +1 -1
- package/agnostic/optim/throttle-debounce/index.js +1 -1
- package/agnostic/random/hex-char/index.js +1 -1
- package/agnostic/random/index.js +3 -3
- package/agnostic/random/random/index.js +1 -1
- package/agnostic/random/uuid/index.js +1 -1
- package/agnostic/regexps/index.js +1 -1
- package/agnostic/strings/char-codes/index.js +1 -1
- package/agnostic/strings/index.js +7 -7
- package/agnostic/strings/matches/index.js +1 -1
- package/agnostic/strings/normalize-indent/index.js +1 -1
- package/agnostic/strings/replace-all/index.js +1 -1
- package/agnostic/strings/to-alphanum/index.js +1 -1
- package/agnostic/strings/trim/index.js +1 -1
- package/agnostic/time/dates/format-date/index.js +1 -1
- package/agnostic/time/dates/index.js +1 -1
- package/agnostic/time/duration/index.js +1 -1
- package/agnostic/time/index.js +4 -4
- package/agnostic/time/timeout/index.js +1 -1
- package/agnostic/time/transitions/index.js +1 -1
- package/agnostic/time/wait/index.js +1 -1
- package/chunks/chunk-35W7XRC3.js +173 -0
- package/chunks/chunk-3GTGE66Y.js +32 -0
- package/chunks/chunk-422KBDRV.js +203 -0
- package/chunks/chunk-4OH2EX3D.js +191 -0
- package/chunks/chunk-4WOYAD35.js +31 -0
- package/chunks/chunk-5JMTDJWX.js +37 -0
- package/chunks/chunk-5RGHYFQH.js +70 -0
- package/chunks/chunk-5VHFXWFM.js +31 -0
- package/chunks/chunk-6DA4S65P.js +37 -0
- package/chunks/chunk-7DDXALPH.js +49 -0
- package/chunks/chunk-7YSTZ7GY.js +31 -0
- package/chunks/chunk-A4FSJC46.js +58 -0
- package/chunks/chunk-BNNAZPI2.js +191 -0
- package/chunks/chunk-BONBND7I.js +239 -0
- package/chunks/chunk-EM37BFXO.js +35 -0
- package/chunks/chunk-ERAFJXWH.js +20 -0
- package/chunks/chunk-FEFY3V6P.js +31 -0
- package/chunks/chunk-FJTOFK3C.js +203 -0
- package/chunks/chunk-G66DWXF3.js +31 -0
- package/chunks/chunk-GP44TBRI.js +39 -0
- package/chunks/chunk-HTNLTDQT.js +28 -0
- package/chunks/chunk-I66DPQN2.js +31 -0
- package/chunks/chunk-JBDWHJ4Q.js +31 -0
- package/chunks/chunk-JJWKHBXD.js +68 -0
- package/chunks/chunk-MOA6JFUQ.js +2369 -0
- package/chunks/chunk-MUYZV5F3.js +2369 -0
- package/chunks/chunk-N4BZJOGW.js +56 -0
- package/chunks/chunk-N4LMP4UM.js +31 -0
- package/chunks/chunk-Q7HA7IAA.js +20 -0
- package/chunks/chunk-QTTNO4T6.js +37 -0
- package/chunks/chunk-QVIRBFMQ.js +31 -0
- package/chunks/chunk-ROJZUEYL.js +37 -0
- package/chunks/chunk-SPMF4X5X.js +31 -0
- package/chunks/chunk-UVSTFYSD.js +28 -0
- package/chunks/chunk-VQEP2EQF.js +100 -0
- package/chunks/chunk-VV72XGJJ.js +58 -0
- package/chunks/chunk-VXSOUAUT.js +100 -0
- package/chunks/chunk-W6BFU7Y5.js +56 -0
- package/chunks/chunk-WOGRENMM.js +31 -0
- package/chunks/chunk-X5FAZBWL.js +130 -0
- package/chunks/chunk-YMRAUWRW.js +20 -0
- package/chunks/chunk-ZNA7SWFK.js +29 -0
- package/components/Comp/index.js +1 -1
- package/node/@design-edito/index.js +6 -6
- package/node/@design-edito/thumbnails/colors/index.js +2 -2
- package/node/@design-edito/thumbnails/common/index.js +2 -2
- package/node/@design-edito/thumbnails/easings/index.js +2 -2
- package/node/@design-edito/thumbnails/index.js +6 -6
- package/node/@design-edito/thumbnails/layout/index.js +4 -4
- package/node/@express/@multer/index.js +2 -3
- package/node/@express/index.js +2 -3
- package/node/@google-cloud/index.js +17 -17
- package/node/@google-cloud/storage/bucket/get-metadata/index.js +2 -2
- package/node/@google-cloud/storage/bucket/index.js +6 -6
- package/node/@google-cloud/storage/bucket/list/index.js +2 -2
- package/node/@google-cloud/storage/file/copy/index.js +2 -2
- package/node/@google-cloud/storage/file/download/index.js +2 -2
- package/node/@google-cloud/storage/file/erase/index.js +2 -2
- package/node/@google-cloud/storage/file/exists/index.js +2 -2
- package/node/@google-cloud/storage/file/generate-signed-url/index.js +2 -2
- package/node/@google-cloud/storage/file/get-metadata/index.js +2 -2
- package/node/@google-cloud/storage/file/get-permissions/index.js +2 -2
- package/node/@google-cloud/storage/file/index.js +21 -21
- package/node/@google-cloud/storage/file/move/index.js +2 -2
- package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +5 -5
- package/node/@google-cloud/storage/file/update-metadata/index.js +2 -2
- package/node/@google-cloud/storage/file/upload/index.js +2 -2
- package/node/@google-cloud/storage/index.js +17 -17
- package/node/encryption/buffer/index.js +1 -1
- package/node/encryption/generate-key/index.js +1 -1
- package/node/encryption/index.js +1 -1
- package/node/encryption/uint8-array/index.js +1 -1
- package/node/files/index.js +4 -4
- package/node/files/is-in-directory/index.js +1 -1
- package/node/files/read-write/index.js +1 -1
- package/node/files/subpaths/index.js +1 -1
- package/node/images/exports/index.js +2 -4
- package/node/images/index.js +10 -12
- package/node/images/prepare/index.js +10 -12
- package/node/images/transform/area-composition/index.js +7 -8
- package/node/images/transform/index.js +8 -9
- package/node/process/index.js +1 -1
- package/node/process/on-exit/index.js +1 -1
- package/package.json +2 -4
@@ -0,0 +1,56 @@
|
|
1
|
+
import {
|
2
|
+
move_exports
|
3
|
+
} from "./chunk-3GTGE66Y.js";
|
4
|
+
import {
|
5
|
+
revoke_signed_urls_exports
|
6
|
+
} from "./chunk-ROJZUEYL.js";
|
7
|
+
import {
|
8
|
+
update_metadata_exports
|
9
|
+
} from "./chunk-JBDWHJ4Q.js";
|
10
|
+
import {
|
11
|
+
upload_exports
|
12
|
+
} from "./chunk-4WOYAD35.js";
|
13
|
+
import {
|
14
|
+
copy_exports
|
15
|
+
} from "./chunk-N4LMP4UM.js";
|
16
|
+
import {
|
17
|
+
generate_signed_url_exports
|
18
|
+
} from "./chunk-EM37BFXO.js";
|
19
|
+
import {
|
20
|
+
download_exports
|
21
|
+
} from "./chunk-I66DPQN2.js";
|
22
|
+
import {
|
23
|
+
erase_exports
|
24
|
+
} from "./chunk-G66DWXF3.js";
|
25
|
+
import {
|
26
|
+
exists_exports
|
27
|
+
} from "./chunk-5VHFXWFM.js";
|
28
|
+
import {
|
29
|
+
get_metadata_exports
|
30
|
+
} from "./chunk-QVIRBFMQ.js";
|
31
|
+
import {
|
32
|
+
get_permissions_exports
|
33
|
+
} from "./chunk-WOGRENMM.js";
|
34
|
+
import {
|
35
|
+
__export
|
36
|
+
} from "./chunk-WSFCRVEQ.js";
|
37
|
+
|
38
|
+
// src/node/@google-cloud/storage/file/index.ts
|
39
|
+
var file_exports = {};
|
40
|
+
__export(file_exports, {
|
41
|
+
Copy: () => copy_exports,
|
42
|
+
Download: () => download_exports,
|
43
|
+
Erase: () => erase_exports,
|
44
|
+
Exists: () => exists_exports,
|
45
|
+
GenerateSignedUrl: () => generate_signed_url_exports,
|
46
|
+
GetMetaData: () => get_metadata_exports,
|
47
|
+
GetPermissions: () => get_permissions_exports,
|
48
|
+
Move: () => move_exports,
|
49
|
+
RevokeSignedUrls: () => revoke_signed_urls_exports,
|
50
|
+
UpdateMetadata: () => update_metadata_exports,
|
51
|
+
Upload: () => upload_exports
|
52
|
+
});
|
53
|
+
|
54
|
+
export {
|
55
|
+
file_exports
|
56
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import {
|
2
|
+
Outcome
|
3
|
+
} from "./chunk-JMU5PDBD.js";
|
4
|
+
import {
|
5
|
+
unknownToString
|
6
|
+
} from "./chunk-FENXVJYO.js";
|
7
|
+
import {
|
8
|
+
__export
|
9
|
+
} from "./chunk-WSFCRVEQ.js";
|
10
|
+
|
11
|
+
// src/node/@google-cloud/storage/file/copy/index.ts
|
12
|
+
var copy_exports = {};
|
13
|
+
__export(copy_exports, {
|
14
|
+
copy: () => copy
|
15
|
+
});
|
16
|
+
async function copy(sourcePath, destinationPath, bucket, options) {
|
17
|
+
const { fileOptions, copyOptions } = options ?? {};
|
18
|
+
try {
|
19
|
+
const file = bucket.file(sourcePath, fileOptions);
|
20
|
+
await file.copy(destinationPath, copyOptions);
|
21
|
+
return Outcome.makeSuccess(true);
|
22
|
+
} catch (err) {
|
23
|
+
const errStr = unknownToString(err);
|
24
|
+
return Outcome.makeFailure(errStr);
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
export {
|
29
|
+
copy,
|
30
|
+
copy_exports
|
31
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import {
|
2
|
+
file_exports
|
3
|
+
} from "./chunk-W6BFU7Y5.js";
|
4
|
+
import {
|
5
|
+
bucket_exports
|
6
|
+
} from "./chunk-YMRAUWRW.js";
|
7
|
+
import {
|
8
|
+
__export
|
9
|
+
} from "./chunk-WSFCRVEQ.js";
|
10
|
+
|
11
|
+
// src/node/@google-cloud/storage/index.ts
|
12
|
+
var storage_exports = {};
|
13
|
+
__export(storage_exports, {
|
14
|
+
Bucket: () => bucket_exports,
|
15
|
+
File: () => file_exports
|
16
|
+
});
|
17
|
+
|
18
|
+
export {
|
19
|
+
storage_exports
|
20
|
+
};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import {
|
2
|
+
upload
|
3
|
+
} from "./chunk-4WOYAD35.js";
|
4
|
+
import {
|
5
|
+
erase
|
6
|
+
} from "./chunk-G66DWXF3.js";
|
7
|
+
import {
|
8
|
+
download
|
9
|
+
} from "./chunk-I66DPQN2.js";
|
10
|
+
import {
|
11
|
+
Outcome
|
12
|
+
} from "./chunk-JMU5PDBD.js";
|
13
|
+
import {
|
14
|
+
__export
|
15
|
+
} from "./chunk-WSFCRVEQ.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,31 @@
|
|
1
|
+
import {
|
2
|
+
Outcome
|
3
|
+
} from "./chunk-JMU5PDBD.js";
|
4
|
+
import {
|
5
|
+
unknownToString
|
6
|
+
} from "./chunk-FENXVJYO.js";
|
7
|
+
import {
|
8
|
+
__export
|
9
|
+
} from "./chunk-WSFCRVEQ.js";
|
10
|
+
|
11
|
+
// src/node/@google-cloud/storage/file/get-metadata/index.ts
|
12
|
+
var get_metadata_exports = {};
|
13
|
+
__export(get_metadata_exports, {
|
14
|
+
getMetadata: () => getMetadata
|
15
|
+
});
|
16
|
+
async function getMetadata(sourcePath, bucket, options) {
|
17
|
+
const { fileOptions, getFileMetadataOptions } = options ?? {};
|
18
|
+
try {
|
19
|
+
const file = bucket.file(sourcePath, fileOptions);
|
20
|
+
const [metadata] = await file.getMetadata(getFileMetadataOptions);
|
21
|
+
return Outcome.makeSuccess(metadata);
|
22
|
+
} catch (err) {
|
23
|
+
const errStr = unknownToString(err);
|
24
|
+
return Outcome.makeFailure(errStr);
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
export {
|
29
|
+
getMetadata,
|
30
|
+
get_metadata_exports
|
31
|
+
};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import {
|
2
|
+
upload
|
3
|
+
} from "./chunk-4WOYAD35.js";
|
4
|
+
import {
|
5
|
+
download
|
6
|
+
} from "./chunk-I66DPQN2.js";
|
7
|
+
import {
|
8
|
+
erase
|
9
|
+
} from "./chunk-G66DWXF3.js";
|
10
|
+
import {
|
11
|
+
Outcome
|
12
|
+
} from "./chunk-JMU5PDBD.js";
|
13
|
+
import {
|
14
|
+
__export
|
15
|
+
} from "./chunk-WSFCRVEQ.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,31 @@
|
|
1
|
+
import {
|
2
|
+
shuffle
|
3
|
+
} from "./chunk-VJJIYJMY.js";
|
4
|
+
import {
|
5
|
+
findDuplicates
|
6
|
+
} from "./chunk-YS6WMSWC.js";
|
7
|
+
import {
|
8
|
+
isArrayOf
|
9
|
+
} from "./chunk-6RGDWX4A.js";
|
10
|
+
import {
|
11
|
+
randomPick,
|
12
|
+
randomPickMany
|
13
|
+
} from "./chunk-C7SRAQMW.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
|
+
};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import {
|
2
|
+
colors_exports
|
3
|
+
} from "./chunk-X5FAZBWL.js";
|
4
|
+
import {
|
5
|
+
layout_exports
|
6
|
+
} from "./chunk-BONBND7I.js";
|
7
|
+
import {
|
8
|
+
common_exports
|
9
|
+
} from "./chunk-7DDXALPH.js";
|
10
|
+
import {
|
11
|
+
easings_exports
|
12
|
+
} from "./chunk-JJWKHBXD.js";
|
13
|
+
import {
|
14
|
+
__export
|
15
|
+
} from "./chunk-WSFCRVEQ.js";
|
16
|
+
|
17
|
+
// src/node/@design-edito/thumbnails/index.ts
|
18
|
+
var thumbnails_exports = {};
|
19
|
+
__export(thumbnails_exports, {
|
20
|
+
Colors: () => colors_exports,
|
21
|
+
Common: () => common_exports,
|
22
|
+
Easings: () => easings_exports,
|
23
|
+
Layout: () => layout_exports
|
24
|
+
});
|
25
|
+
|
26
|
+
export {
|
27
|
+
thumbnails_exports
|
28
|
+
};
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import {
|
2
|
+
transformImage
|
3
|
+
} from "./chunk-VV72XGJJ.js";
|
4
|
+
import {
|
5
|
+
thumbnails_exports
|
6
|
+
} from "./chunk-UVSTFYSD.js";
|
7
|
+
import {
|
8
|
+
exportZipBuffer,
|
9
|
+
prepareExport
|
10
|
+
} from "./chunk-5RGHYFQH.js";
|
11
|
+
import {
|
12
|
+
__export
|
13
|
+
} from "./chunk-WSFCRVEQ.js";
|
14
|
+
|
15
|
+
// src/node/images/prepare/index.ts
|
16
|
+
var prepare_exports = {};
|
17
|
+
__export(prepare_exports, {
|
18
|
+
MAX_NB_OUTPUTS: () => MAX_NB_OUTPUTS,
|
19
|
+
OUTPUT_ZIP_FOLDER: () => OUTPUT_ZIP_FOLDER,
|
20
|
+
prepareImage: () => prepareImage
|
21
|
+
});
|
22
|
+
import sharp from "sharp";
|
23
|
+
var MAX_NB_OUTPUTS = 50;
|
24
|
+
var OUTPUT_ZIP_FOLDER = "./output-zips";
|
25
|
+
async function prepareImage(imageBuffer, customOptions) {
|
26
|
+
const sharpImage = sharp(imageBuffer);
|
27
|
+
const sharpImageMetadata = await sharpImage.metadata();
|
28
|
+
const imageBufferMetadata = {
|
29
|
+
width: sharpImageMetadata.width || 0,
|
30
|
+
height: sharpImageMetadata.height || 0,
|
31
|
+
format: sharpImageMetadata.format || "png"
|
32
|
+
};
|
33
|
+
const options = getOptions(imageBufferMetadata, customOptions);
|
34
|
+
const nbOutputs = options.qualities.length * (options.ratios.length + 1) * (options.widths.length + 1) * (options.heights.length + 1);
|
35
|
+
if (nbOutputs > MAX_NB_OUTPUTS) {
|
36
|
+
throw Error("Nb output exceeds supported max nb output");
|
37
|
+
}
|
38
|
+
const transformedBuffer = await transformImage(imageBuffer, options.inputOperations, {
|
39
|
+
width: thumbnails_exports.Common.getArrayMax(options.widths) || 0,
|
40
|
+
height: thumbnails_exports.Common.getArrayMax(options.heights) || 0
|
41
|
+
});
|
42
|
+
const exportsBuffers = [{
|
43
|
+
buffer: imageBuffer,
|
44
|
+
name: generateFileName({
|
45
|
+
...imageBufferMetadata,
|
46
|
+
quality: 100,
|
47
|
+
suffix: "original",
|
48
|
+
preffix: options.name
|
49
|
+
})
|
50
|
+
}];
|
51
|
+
for await (const width of options.widths) {
|
52
|
+
for await (const height of options.heights) {
|
53
|
+
for await (const quality of options.qualities) {
|
54
|
+
for await (const format of options.formats) {
|
55
|
+
const exportBuffer = await prepareExport(transformedBuffer, {
|
56
|
+
format,
|
57
|
+
quality,
|
58
|
+
width,
|
59
|
+
height
|
60
|
+
});
|
61
|
+
exportsBuffers.push({
|
62
|
+
buffer: exportBuffer,
|
63
|
+
name: generateFileName({ width, height, quality, format, preffix: options.name })
|
64
|
+
});
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
const zipBuffer = exportZipBuffer(exportsBuffers, generateZipName());
|
70
|
+
return zipBuffer;
|
71
|
+
}
|
72
|
+
function getOptions(imageBufferMetadata, options) {
|
73
|
+
return {
|
74
|
+
center: [0.5, 0.5],
|
75
|
+
qualities: [100],
|
76
|
+
inputOperations: [],
|
77
|
+
...options,
|
78
|
+
name: options?.name || "",
|
79
|
+
formats: [imageBufferMetadata.format, ...options?.formats ? options.formats : []],
|
80
|
+
ratios: [...options?.ratios ? options.ratios : []],
|
81
|
+
widths: [imageBufferMetadata.width, ...options?.widths ? options.widths : []],
|
82
|
+
heights: [imageBufferMetadata.height, ...options?.heights ? options.heights : []]
|
83
|
+
};
|
84
|
+
}
|
85
|
+
function generateZipName() {
|
86
|
+
const date = /* @__PURE__ */ new Date();
|
87
|
+
return `image-exports_${date.toLocaleDateString()}_${date.toLocaleTimeString()}_${date.getTime()}`.replace(/\/|:/g, "-").replace(/ /g, "").trim();
|
88
|
+
}
|
89
|
+
function generateFileName({ width, height, quality, format, suffix, preffix }) {
|
90
|
+
const _preffix = preffix ? `${preffix}_` : "image-formats_";
|
91
|
+
const _suffix = `${suffix ? `_${suffix}` : ""}.${format}`;
|
92
|
+
return `${_preffix}${width}${height}_Q${quality}${_suffix}`;
|
93
|
+
}
|
94
|
+
|
95
|
+
export {
|
96
|
+
MAX_NB_OUTPUTS,
|
97
|
+
OUTPUT_ZIP_FOLDER,
|
98
|
+
prepareImage,
|
99
|
+
prepare_exports
|
100
|
+
};
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import {
|
2
|
+
areaCompose
|
3
|
+
} from "./chunk-422KBDRV.js";
|
4
|
+
import {
|
5
|
+
__export
|
6
|
+
} from "./chunk-WSFCRVEQ.js";
|
7
|
+
|
8
|
+
// src/node/images/transform/index.ts
|
9
|
+
var transform_exports = {};
|
10
|
+
__export(transform_exports, {
|
11
|
+
isOperation: () => isOperation,
|
12
|
+
transformImage: () => transformImage
|
13
|
+
});
|
14
|
+
import sharp from "sharp";
|
15
|
+
async function transformImage(imageBuffer, operations, maxDimensions) {
|
16
|
+
const imageSharp = sharp(imageBuffer);
|
17
|
+
let imageSharped = imageSharp;
|
18
|
+
for await (const operation of operations) {
|
19
|
+
if (isOperation(operation)) {
|
20
|
+
imageSharped = await applyOperation(imageSharped, operation, maxDimensions);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
return await imageSharped.toBuffer();
|
24
|
+
}
|
25
|
+
function isOperation(operation) {
|
26
|
+
return true;
|
27
|
+
}
|
28
|
+
async function applyOperation(imageSharp, operation, maxDimensions) {
|
29
|
+
switch (operation.name) {
|
30
|
+
case "rotate":
|
31
|
+
return imageSharp.rotate(operation.params.angle);
|
32
|
+
case "resize":
|
33
|
+
return imageSharp.resize({
|
34
|
+
width: operation.params.width,
|
35
|
+
height: operation.params.height,
|
36
|
+
fit: operation.params.fit || "cover",
|
37
|
+
background: { r: 255, g: 255, b: 255, alpha: 0 }
|
38
|
+
});
|
39
|
+
/* Adds a transparent background (necessary for png) */
|
40
|
+
case "area-composition":
|
41
|
+
const composedImage = await areaCompose(imageSharp, {
|
42
|
+
...operation.params,
|
43
|
+
dimensions: {
|
44
|
+
w: maxDimensions.width,
|
45
|
+
h: maxDimensions.height
|
46
|
+
}
|
47
|
+
});
|
48
|
+
return composedImage;
|
49
|
+
default:
|
50
|
+
return imageSharp;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
export {
|
55
|
+
transformImage,
|
56
|
+
isOperation,
|
57
|
+
transform_exports
|
58
|
+
};
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import {
|
2
|
+
exportZipBuffer,
|
3
|
+
prepareExport
|
4
|
+
} from "./chunk-5RGHYFQH.js";
|
5
|
+
import {
|
6
|
+
transformImage
|
7
|
+
} from "./chunk-A4FSJC46.js";
|
8
|
+
import {
|
9
|
+
thumbnails_exports
|
10
|
+
} from "./chunk-HTNLTDQT.js";
|
11
|
+
import {
|
12
|
+
__export
|
13
|
+
} from "./chunk-WSFCRVEQ.js";
|
14
|
+
|
15
|
+
// src/node/images/prepare/index.ts
|
16
|
+
var prepare_exports = {};
|
17
|
+
__export(prepare_exports, {
|
18
|
+
MAX_NB_OUTPUTS: () => MAX_NB_OUTPUTS,
|
19
|
+
OUTPUT_ZIP_FOLDER: () => OUTPUT_ZIP_FOLDER,
|
20
|
+
prepareImage: () => prepareImage
|
21
|
+
});
|
22
|
+
import sharp from "sharp";
|
23
|
+
var MAX_NB_OUTPUTS = 50;
|
24
|
+
var OUTPUT_ZIP_FOLDER = "./output-zips";
|
25
|
+
async function prepareImage(imageBuffer, customOptions) {
|
26
|
+
const sharpImage = sharp(imageBuffer);
|
27
|
+
const sharpImageMetadata = await sharpImage.metadata();
|
28
|
+
const imageBufferMetadata = {
|
29
|
+
width: sharpImageMetadata.width || 0,
|
30
|
+
height: sharpImageMetadata.height || 0,
|
31
|
+
format: sharpImageMetadata.format || "png"
|
32
|
+
};
|
33
|
+
const options = getOptions(imageBufferMetadata, customOptions);
|
34
|
+
const nbOutputs = options.qualities.length * (options.ratios.length + 1) * (options.widths.length + 1) * (options.heights.length + 1);
|
35
|
+
if (nbOutputs > MAX_NB_OUTPUTS) {
|
36
|
+
throw Error("Nb output exceeds supported max nb output");
|
37
|
+
}
|
38
|
+
const transformedBuffer = await transformImage(imageBuffer, options.inputOperations, {
|
39
|
+
width: thumbnails_exports.Common.getArrayMax(options.widths) || 0,
|
40
|
+
height: thumbnails_exports.Common.getArrayMax(options.heights) || 0
|
41
|
+
});
|
42
|
+
const exportsBuffers = [{
|
43
|
+
buffer: imageBuffer,
|
44
|
+
name: generateFileName({
|
45
|
+
...imageBufferMetadata,
|
46
|
+
quality: 100,
|
47
|
+
suffix: "original",
|
48
|
+
preffix: options.name
|
49
|
+
})
|
50
|
+
}];
|
51
|
+
for await (const width of options.widths) {
|
52
|
+
for await (const height of options.heights) {
|
53
|
+
for await (const quality of options.qualities) {
|
54
|
+
for await (const format of options.formats) {
|
55
|
+
const exportBuffer = await prepareExport(transformedBuffer, {
|
56
|
+
format,
|
57
|
+
quality,
|
58
|
+
width,
|
59
|
+
height
|
60
|
+
});
|
61
|
+
exportsBuffers.push({
|
62
|
+
buffer: exportBuffer,
|
63
|
+
name: generateFileName({ width, height, quality, format, preffix: options.name })
|
64
|
+
});
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
const zipBuffer = exportZipBuffer(exportsBuffers, generateZipName());
|
70
|
+
return zipBuffer;
|
71
|
+
}
|
72
|
+
function getOptions(imageBufferMetadata, options) {
|
73
|
+
return {
|
74
|
+
center: [0.5, 0.5],
|
75
|
+
qualities: [100],
|
76
|
+
inputOperations: [],
|
77
|
+
...options,
|
78
|
+
name: options?.name || "",
|
79
|
+
formats: [imageBufferMetadata.format, ...options?.formats ? options.formats : []],
|
80
|
+
ratios: [...options?.ratios ? options.ratios : []],
|
81
|
+
widths: [imageBufferMetadata.width, ...options?.widths ? options.widths : []],
|
82
|
+
heights: [imageBufferMetadata.height, ...options?.heights ? options.heights : []]
|
83
|
+
};
|
84
|
+
}
|
85
|
+
function generateZipName() {
|
86
|
+
const date = /* @__PURE__ */ new Date();
|
87
|
+
return `image-exports_${date.toLocaleDateString()}_${date.toLocaleTimeString()}_${date.getTime()}`.replace(/\/|:/g, "-").replace(/ /g, "").trim();
|
88
|
+
}
|
89
|
+
function generateFileName({ width, height, quality, format, suffix, preffix }) {
|
90
|
+
const _preffix = preffix ? `${preffix}_` : "image-formats_";
|
91
|
+
const _suffix = `${suffix ? `_${suffix}` : ""}.${format}`;
|
92
|
+
return `${_preffix}${width}${height}_Q${quality}${_suffix}`;
|
93
|
+
}
|
94
|
+
|
95
|
+
export {
|
96
|
+
MAX_NB_OUTPUTS,
|
97
|
+
OUTPUT_ZIP_FOLDER,
|
98
|
+
prepareImage,
|
99
|
+
prepare_exports
|
100
|
+
};
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import {
|
2
|
+
update_metadata_exports
|
3
|
+
} from "./chunk-JBDWHJ4Q.js";
|
4
|
+
import {
|
5
|
+
revoke_signed_urls_exports
|
6
|
+
} from "./chunk-QTTNO4T6.js";
|
7
|
+
import {
|
8
|
+
move_exports
|
9
|
+
} from "./chunk-3GTGE66Y.js";
|
10
|
+
import {
|
11
|
+
upload_exports
|
12
|
+
} from "./chunk-4WOYAD35.js";
|
13
|
+
import {
|
14
|
+
copy_exports
|
15
|
+
} from "./chunk-N4LMP4UM.js";
|
16
|
+
import {
|
17
|
+
erase_exports
|
18
|
+
} from "./chunk-G66DWXF3.js";
|
19
|
+
import {
|
20
|
+
download_exports
|
21
|
+
} from "./chunk-I66DPQN2.js";
|
22
|
+
import {
|
23
|
+
exists_exports
|
24
|
+
} from "./chunk-5VHFXWFM.js";
|
25
|
+
import {
|
26
|
+
get_metadata_exports
|
27
|
+
} from "./chunk-QVIRBFMQ.js";
|
28
|
+
import {
|
29
|
+
generate_signed_url_exports
|
30
|
+
} from "./chunk-EM37BFXO.js";
|
31
|
+
import {
|
32
|
+
get_permissions_exports
|
33
|
+
} from "./chunk-WOGRENMM.js";
|
34
|
+
import {
|
35
|
+
__export
|
36
|
+
} from "./chunk-WSFCRVEQ.js";
|
37
|
+
|
38
|
+
// src/node/@google-cloud/storage/file/index.ts
|
39
|
+
var file_exports = {};
|
40
|
+
__export(file_exports, {
|
41
|
+
Copy: () => copy_exports,
|
42
|
+
Download: () => download_exports,
|
43
|
+
Erase: () => erase_exports,
|
44
|
+
Exists: () => exists_exports,
|
45
|
+
GenerateSignedUrl: () => generate_signed_url_exports,
|
46
|
+
GetMetaData: () => get_metadata_exports,
|
47
|
+
GetPermissions: () => get_permissions_exports,
|
48
|
+
Move: () => move_exports,
|
49
|
+
RevokeSignedUrls: () => revoke_signed_urls_exports,
|
50
|
+
UpdateMetadata: () => update_metadata_exports,
|
51
|
+
Upload: () => upload_exports
|
52
|
+
});
|
53
|
+
|
54
|
+
export {
|
55
|
+
file_exports
|
56
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import {
|
2
|
+
Outcome
|
3
|
+
} from "./chunk-JMU5PDBD.js";
|
4
|
+
import {
|
5
|
+
unknownToString
|
6
|
+
} from "./chunk-FENXVJYO.js";
|
7
|
+
import {
|
8
|
+
__export
|
9
|
+
} from "./chunk-WSFCRVEQ.js";
|
10
|
+
|
11
|
+
// src/node/@google-cloud/storage/file/get-permissions/index.ts
|
12
|
+
var get_permissions_exports = {};
|
13
|
+
__export(get_permissions_exports, {
|
14
|
+
getPermissions: () => getPermissions
|
15
|
+
});
|
16
|
+
async function getPermissions(sourcePath, bucket, options) {
|
17
|
+
const { fileOptions, getAclOptions } = options ?? {};
|
18
|
+
try {
|
19
|
+
const file = bucket.file(sourcePath, fileOptions);
|
20
|
+
const [acl] = await file.acl.get(getAclOptions);
|
21
|
+
return Outcome.makeSuccess(acl);
|
22
|
+
} catch (err) {
|
23
|
+
const errStr = unknownToString(err);
|
24
|
+
return Outcome.makeFailure(errStr);
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
export {
|
29
|
+
getPermissions,
|
30
|
+
get_permissions_exports
|
31
|
+
};
|